@@ -253,6 +253,23 @@ export const baseError = z
253253 )
254254 . describe ( 'Standard error response.' )
255255
256+ export const booleanFieldFilter = z
257+ . union ( [
258+ z . boolean ( ) ,
259+ z . object ( {
260+ eq : z
261+ . boolean ( )
262+ . describe ( 'Value strictly equals the given boolean value.' ) ,
263+ } ) ,
264+ ] )
265+ . describe ( 'Filter by a boolean value (true/false).' )
266+
267+ export const eventSubject = z
268+ . object ( {
269+ key : z . string ( ) . min ( 1 ) . describe ( 'The key of the subject.' ) ,
270+ } )
271+ . describe ( 'Subject of an event.' )
272+
256273export const resourceKey = z
257274 . string ( )
258275 . min ( 1 )
@@ -1045,17 +1062,6 @@ export const publicLabels = z
10451062 'Public labels store information about an entity that can be used for filtering a list of objects.' ,
10461063 )
10471064
1048- export const booleanFieldFilter = z
1049- . union ( [
1050- z . boolean ( ) ,
1051- z . object ( {
1052- eq : z
1053- . boolean ( )
1054- . describe ( 'Value strictly equals the given boolean value.' ) ,
1055- } ) ,
1056- ] )
1057- . describe ( 'Filter by a boolean value (true/false).' )
1058-
10591065export const numericFieldFilter = z
10601066 . union ( [
10611067 z . number ( ) ,
@@ -1927,6 +1933,13 @@ export const notImplemented = baseError.describe('Not Implemented.')
19271933
19281934export const notAvailable = baseError . describe ( 'Not Available.' )
19291935
1936+ export const listSubjectsParamsFilter = z
1937+ . object ( {
1938+ key : stringFieldFilter . optional ( ) ,
1939+ attributed : booleanFieldFilter . optional ( ) ,
1940+ } )
1941+ . describe ( 'Filter options for listing subjects.' )
1942+
19301943export const createCreditGrantFilters = z
19311944 . object ( {
19321945 features : z
@@ -3152,6 +3165,13 @@ export const featureCostQueryResult = z
31523165 } )
31533166 . describe ( 'Result of a feature cost query.' )
31543167
3168+ export const subjectPaginatedResponse = z
3169+ . object ( {
3170+ data : z . array ( eventSubject ) ,
3171+ meta : cursorMeta ,
3172+ } )
3173+ . describe ( 'Cursor paginated response.' )
3174+
31553175export const invalidParameter = z
31563176 . union ( [
31573177 invalidParameterStandard ,
@@ -4624,6 +4644,16 @@ export const listMeteringEventsResponse = z.object({
46244644
46254645export const ingestMeteringEventsBody = event
46264646
4647+ export const listEventSubjectsQueryParams = z . object ( {
4648+ page : cursorPaginationQueryPage . optional ( ) ,
4649+ filter : listSubjectsParamsFilter . optional ( ) ,
4650+ } )
4651+
4652+ export const listEventSubjectsResponse = z . object ( {
4653+ data : z . array ( eventSubject ) ,
4654+ meta : cursorMeta ,
4655+ } )
4656+
46274657export const createMeterBody = createMeterRequest
46284658
46294659export const createMeterResponse = meter
0 commit comments