Skip to content

Commit 8bc3188

Browse files
committed
feat(api): add /api/v2/events route specification
1 parent 363729d commit 8bc3188

File tree

18 files changed

+2905
-1705
lines changed

18 files changed

+2905
-1705
lines changed

api/api.gen.go

Lines changed: 987 additions & 844 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/client/go/client.gen.go

Lines changed: 1255 additions & 844 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/client/javascript/src/client/schemas.ts

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,26 @@ export interface paths {
17591759
patch?: never
17601760
trace?: never
17611761
}
1762+
'/api/v2/events': {
1763+
parameters: {
1764+
query?: never
1765+
header?: never
1766+
path?: never
1767+
cookie?: never
1768+
}
1769+
/**
1770+
* List ingested events
1771+
* @description List ingested events with advanced filtering and cursor pagination.
1772+
*/
1773+
get: operations['listEventsV2']
1774+
put?: never
1775+
post?: never
1776+
delete?: never
1777+
options?: never
1778+
head?: never
1779+
patch?: never
1780+
trace?: never
1781+
}
17621782
}
17631783
export type webhooks = Record<string, never>
17641784
export interface components {
@@ -3904,6 +3924,64 @@ export interface components {
39043924
/** @description The items in the current page. */
39053925
items: components['schemas']['Feature'][]
39063926
}
3927+
/** @description A filter for a string field. */
3928+
FilterString: {
3929+
/** @description The field must be equal to the provided value. */
3930+
$eq?: string | null
3931+
/** @description The field must not be equal to the provided value. */
3932+
$ne?: string | null
3933+
/** @description The field must be in the provided list of values. */
3934+
$in?: string[] | null
3935+
/** @description The field must not be in the provided list of values. */
3936+
$nin?: string[] | null
3937+
/** @description The field must match the provided value. */
3938+
$like?: string | null
3939+
/** @description The field must not match the provided value. */
3940+
$nlike?: string | null
3941+
/** @description The field must match the provided value, ignoring case. */
3942+
$ilike?: string | null
3943+
/** @description The field must not match the provided value, ignoring case. */
3944+
$nilike?: string | null
3945+
/** @description The field must be greater than the provided value. */
3946+
$gt?: string | null
3947+
/** @description The field must be greater than or equal to the provided value. */
3948+
$gte?: string | null
3949+
/** @description The field must be less than the provided value. */
3950+
$lt?: string | null
3951+
/** @description The field must be less than or equal to the provided value. */
3952+
$lte?: string | null
3953+
/** @description Provide a list of filters to be combined with a logical AND. */
3954+
$and?: components['schemas']['FilterString'][] | null
3955+
/** @description Provide a list of filters to be combined with a logical OR. */
3956+
$or?: components['schemas']['FilterString'][] | null
3957+
}
3958+
/** @description A filter for a time field. */
3959+
FilterTime: {
3960+
/**
3961+
* Format: date-time
3962+
* @description The field must be greater than the provided value.
3963+
*/
3964+
$gt?: Date | null
3965+
/**
3966+
* Format: date-time
3967+
* @description The field must be greater than or equal to the provided value.
3968+
*/
3969+
$gte?: Date | null
3970+
/**
3971+
* Format: date-time
3972+
* @description The field must be less than the provided value.
3973+
*/
3974+
$lt?: Date | null
3975+
/**
3976+
* Format: date-time
3977+
* @description The field must be less than or equal to the provided value.
3978+
*/
3979+
$lte?: Date | null
3980+
/** @description Provide a list of filters to be combined with a logical AND. */
3981+
$and?: components['schemas']['FilterTime'][] | null
3982+
/** @description Provide a list of filters to be combined with a logical OR. */
3983+
$or?: components['schemas']['FilterTime'][] | null
3984+
}
39073985
/** @description Flat price. */
39083986
FlatPrice: {
39093987
/**
@@ -4071,6 +4149,13 @@ export interface components {
40714149
*/
40724150
storedAt: Date
40734151
}
4152+
/** @description A response for cursor pagination. */
4153+
IngestedEventCursorList: {
4154+
/** @description The items in the response. */
4155+
items: components['schemas']['IngestedEvent'][]
4156+
/** @description The cursor of the last item in the list. */
4157+
nextCursor: string
4158+
}
40744159
/** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
40754160
InternalServerErrorProblemResponse: components['schemas']['UnexpectedProblemResponse']
40764161
/** @description Invoice represents an invoice in the system. */
@@ -7868,6 +7953,10 @@ export interface components {
78687953
'BillingProfileOrderByOrdering.order': components['schemas']['SortOrder']
78697954
/** @description The order by field. */
78707955
'BillingProfileOrderByOrdering.orderBy': components['schemas']['BillingProfileOrderBy']
7956+
/** @description The cursor after which to start the pagination. */
7957+
'CursorPaginatedQuery.cursor': string
7958+
/** @description The limit of the pagination. */
7959+
'CursorPaginatedQuery.limit': number
78717960
/** @description The order direction. */
78727961
'CustomerOrderByOrdering.order': components['schemas']['SortOrder']
78737962
/** @description The order by field. */
@@ -8180,6 +8269,8 @@ export type FeatureMeta = components['schemas']['FeatureMeta']
81808269
export type FeatureOrderBy = components['schemas']['FeatureOrderBy']
81818270
export type FeaturePaginatedResponse =
81828271
components['schemas']['FeaturePaginatedResponse']
8272+
export type FilterString = components['schemas']['FilterString']
8273+
export type FilterTime = components['schemas']['FilterTime']
81838274
export type FlatPrice = components['schemas']['FlatPrice']
81848275
export type FlatPriceWithPaymentTerm =
81858276
components['schemas']['FlatPriceWithPaymentTerm']
@@ -8196,6 +8287,8 @@ export type GrantUsageRecord = components['schemas']['GrantUsageRecord']
81968287
export type IdResource = components['schemas']['IDResource']
81978288
export type IngestEventsBody = components['schemas']['IngestEventsBody']
81988289
export type IngestedEvent = components['schemas']['IngestedEvent']
8290+
export type IngestedEventCursorList =
8291+
components['schemas']['IngestedEventCursorList']
81998292
export type InternalServerErrorProblemResponse =
82008293
components['schemas']['InternalServerErrorProblemResponse']
82018294
export type Invoice = components['schemas']['Invoice']
@@ -8495,6 +8588,10 @@ export type ParameterBillingProfileOrderByOrderingOrder =
84958588
components['parameters']['BillingProfileOrderByOrdering.order']
84968589
export type ParameterBillingProfileOrderByOrderingOrderBy =
84978590
components['parameters']['BillingProfileOrderByOrdering.orderBy']
8591+
export type ParameterCursorPaginatedQueryCursor =
8592+
components['parameters']['CursorPaginatedQuery.cursor']
8593+
export type ParameterCursorPaginatedQueryLimit =
8594+
components['parameters']['CursorPaginatedQuery.limit']
84988595
export type ParameterCustomerOrderByOrderingOrder =
84998596
components['parameters']['CustomerOrderByOrdering.order']
85008597
export type ParameterCustomerOrderByOrderingOrderBy =
@@ -18232,6 +18329,94 @@ export interface operations {
1823218329
}
1823318330
}
1823418331
}
18332+
listEventsV2: {
18333+
parameters: {
18334+
query?: {
18335+
/** @description The cursor after which to start the pagination. */
18336+
cursor?: components['parameters']['CursorPaginatedQuery.cursor']
18337+
/** @description The limit of the pagination. */
18338+
limit?: components['parameters']['CursorPaginatedQuery.limit']
18339+
/** @description Client ID
18340+
* Useful to track progress of a query. */
18341+
clientId?: string
18342+
id?: components['schemas']['FilterString']
18343+
source?: components['schemas']['FilterString']
18344+
subject?: components['schemas']['FilterString']
18345+
type?: components['schemas']['FilterString']
18346+
time?: components['schemas']['FilterTime']
18347+
ingestedAt?: components['schemas']['FilterTime']
18348+
}
18349+
header?: never
18350+
path?: never
18351+
cookie?: never
18352+
}
18353+
requestBody?: never
18354+
responses: {
18355+
/** @description The request has succeeded. */
18356+
200: {
18357+
headers: {
18358+
[name: string]: unknown
18359+
}
18360+
content: {
18361+
'application/json': components['schemas']['IngestedEventCursorList']
18362+
}
18363+
}
18364+
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
18365+
400: {
18366+
headers: {
18367+
[name: string]: unknown
18368+
}
18369+
content: {
18370+
'application/problem+json': components['schemas']['BadRequestProblemResponse']
18371+
}
18372+
}
18373+
/** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
18374+
401: {
18375+
headers: {
18376+
[name: string]: unknown
18377+
}
18378+
content: {
18379+
'application/problem+json': components['schemas']['UnauthorizedProblemResponse']
18380+
}
18381+
}
18382+
/** @description The server understood the request but refuses to authorize it. */
18383+
403: {
18384+
headers: {
18385+
[name: string]: unknown
18386+
}
18387+
content: {
18388+
'application/problem+json': components['schemas']['ForbiddenProblemResponse']
18389+
}
18390+
}
18391+
/** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
18392+
500: {
18393+
headers: {
18394+
[name: string]: unknown
18395+
}
18396+
content: {
18397+
'application/problem+json': components['schemas']['InternalServerErrorProblemResponse']
18398+
}
18399+
}
18400+
/** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
18401+
503: {
18402+
headers: {
18403+
[name: string]: unknown
18404+
}
18405+
content: {
18406+
'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse']
18407+
}
18408+
}
18409+
/** @description An unexpected error response. */
18410+
default: {
18411+
headers: {
18412+
[name: string]: unknown
18413+
}
18414+
content: {
18415+
'application/problem+json': components['schemas']['UnexpectedProblemResponse']
18416+
}
18417+
}
18418+
}
18419+
}
1823518420
}
1823618421
type WithRequired<T, K extends keyof T> = T & {
1823718422
[P in K]-?: T[P]

0 commit comments

Comments
 (0)