Skip to content

feat(api): add /api/v2/events route specification #2419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,831 changes: 987 additions & 844 deletions api/api.gen.go

Large diffs are not rendered by default.

2,099 changes: 1,255 additions & 844 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions api/client/javascript/src/client/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,26 @@ export interface paths {
patch?: never
trace?: never
}
'/api/v2/events': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* List ingested events
* @description List ingested events with advanced filtering and cursor pagination.
*/
get: operations['listEventsV2']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
}
export type webhooks = Record<string, never>
export interface components {
Expand Down Expand Up @@ -3904,6 +3924,64 @@ export interface components {
/** @description The items in the current page. */
items: components['schemas']['Feature'][]
}
/** @description A filter for a string field. */
FilterString: {
/** @description The field must be equal to the provided value. */
$eq?: string | null
/** @description The field must not be equal to the provided value. */
$ne?: string | null
/** @description The field must be in the provided list of values. */
$in?: string[] | null
/** @description The field must not be in the provided list of values. */
$nin?: string[] | null
/** @description The field must match the provided value. */
$like?: string | null
/** @description The field must not match the provided value. */
$nlike?: string | null
/** @description The field must match the provided value, ignoring case. */
$ilike?: string | null
/** @description The field must not match the provided value, ignoring case. */
$nilike?: string | null
/** @description The field must be greater than the provided value. */
$gt?: string | null
/** @description The field must be greater than or equal to the provided value. */
$gte?: string | null
/** @description The field must be less than the provided value. */
$lt?: string | null
/** @description The field must be less than or equal to the provided value. */
$lte?: string | null
/** @description Provide a list of filters to be combined with a logical AND. */
$and?: components['schemas']['FilterString'][] | null
/** @description Provide a list of filters to be combined with a logical OR. */
$or?: components['schemas']['FilterString'][] | null
}
/** @description A filter for a time field. */
FilterTime: {
/**
* Format: date-time
* @description The field must be greater than the provided value.
*/
$gt?: Date | null
/**
* Format: date-time
* @description The field must be greater than or equal to the provided value.
*/
$gte?: Date | null
/**
* Format: date-time
* @description The field must be less than the provided value.
*/
$lt?: Date | null
/**
* Format: date-time
* @description The field must be less than or equal to the provided value.
*/
$lte?: Date | null
/** @description Provide a list of filters to be combined with a logical AND. */
$and?: components['schemas']['FilterTime'][] | null
/** @description Provide a list of filters to be combined with a logical OR. */
$or?: components['schemas']['FilterTime'][] | null
}
/** @description Flat price. */
FlatPrice: {
/**
Expand Down Expand Up @@ -4071,6 +4149,13 @@ export interface components {
*/
storedAt: Date
}
/** @description A response for cursor pagination. */
IngestedEventCursorList: {
/** @description The items in the response. */
items: components['schemas']['IngestedEvent'][]
/** @description The cursor of the last item in the list. */
nextCursor: string
}
/** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
InternalServerErrorProblemResponse: components['schemas']['UnexpectedProblemResponse']
/** @description Invoice represents an invoice in the system. */
Expand Down Expand Up @@ -7868,6 +7953,10 @@ export interface components {
'BillingProfileOrderByOrdering.order': components['schemas']['SortOrder']
/** @description The order by field. */
'BillingProfileOrderByOrdering.orderBy': components['schemas']['BillingProfileOrderBy']
/** @description The cursor after which to start the pagination. */
'CursorPaginatedQuery.cursor': string
/** @description The limit of the pagination. */
'CursorPaginatedQuery.limit': number
/** @description The order direction. */
'CustomerOrderByOrdering.order': components['schemas']['SortOrder']
/** @description The order by field. */
Expand Down Expand Up @@ -8180,6 +8269,8 @@ export type FeatureMeta = components['schemas']['FeatureMeta']
export type FeatureOrderBy = components['schemas']['FeatureOrderBy']
export type FeaturePaginatedResponse =
components['schemas']['FeaturePaginatedResponse']
export type FilterString = components['schemas']['FilterString']
export type FilterTime = components['schemas']['FilterTime']
export type FlatPrice = components['schemas']['FlatPrice']
export type FlatPriceWithPaymentTerm =
components['schemas']['FlatPriceWithPaymentTerm']
Expand All @@ -8196,6 +8287,8 @@ export type GrantUsageRecord = components['schemas']['GrantUsageRecord']
export type IdResource = components['schemas']['IDResource']
export type IngestEventsBody = components['schemas']['IngestEventsBody']
export type IngestedEvent = components['schemas']['IngestedEvent']
export type IngestedEventCursorList =
components['schemas']['IngestedEventCursorList']
export type InternalServerErrorProblemResponse =
components['schemas']['InternalServerErrorProblemResponse']
export type Invoice = components['schemas']['Invoice']
Expand Down Expand Up @@ -8495,6 +8588,10 @@ export type ParameterBillingProfileOrderByOrderingOrder =
components['parameters']['BillingProfileOrderByOrdering.order']
export type ParameterBillingProfileOrderByOrderingOrderBy =
components['parameters']['BillingProfileOrderByOrdering.orderBy']
export type ParameterCursorPaginatedQueryCursor =
components['parameters']['CursorPaginatedQuery.cursor']
export type ParameterCursorPaginatedQueryLimit =
components['parameters']['CursorPaginatedQuery.limit']
export type ParameterCustomerOrderByOrderingOrder =
components['parameters']['CustomerOrderByOrdering.order']
export type ParameterCustomerOrderByOrderingOrderBy =
Expand Down Expand Up @@ -18232,6 +18329,94 @@ export interface operations {
}
}
}
listEventsV2: {
parameters: {
query?: {
/** @description The cursor after which to start the pagination. */
cursor?: components['parameters']['CursorPaginatedQuery.cursor']
/** @description The limit of the pagination. */
limit?: components['parameters']['CursorPaginatedQuery.limit']
/** @description Client ID
* Useful to track progress of a query. */
clientId?: string
id?: components['schemas']['FilterString']
source?: components['schemas']['FilterString']
subject?: components['schemas']['FilterString']
type?: components['schemas']['FilterString']
time?: components['schemas']['FilterTime']
ingestedAt?: components['schemas']['FilterTime']
}
header?: never
path?: never
cookie?: never
}
requestBody?: never
responses: {
/** @description The request has succeeded. */
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['IngestedEventCursorList']
}
}
/** @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). */
400: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['BadRequestProblemResponse']
}
}
/** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['UnauthorizedProblemResponse']
}
}
/** @description The server understood the request but refuses to authorize it. */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['ForbiddenProblemResponse']
}
}
/** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
500: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['InternalServerErrorProblemResponse']
}
}
/** @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. */
503: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse']
}
}
/** @description An unexpected error response. */
default: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['UnexpectedProblemResponse']
}
}
}
}
}
type WithRequired<T, K extends keyof T> = T & {
[P in K]-?: T[P]
Expand Down
Loading