Skip to content
Merged
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
816 changes: 515 additions & 301 deletions api/api.gen.go

Large diffs are not rendered by default.

1,095 changes: 833 additions & 262 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

257 changes: 257 additions & 0 deletions api/client/javascript/src/client/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2331,6 +2331,47 @@ export interface paths {
patch?: never
trace?: never
}
'/api/v2/entitlements': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* List all entitlements
* @description List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only.
* To fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint.
*/
get: operations['listEntitlementsV2']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/api/v2/entitlements/{entitlementId}': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* Get entitlement by id
* @description Get entitlement by id.
*/
get: operations['getEntitlementByIdV2']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/api/v2/events': {
parameters: {
query?: never
Expand Down Expand Up @@ -26015,6 +26056,222 @@ export interface operations {
}
}
}
listEntitlementsV2: {
parameters: {
query?: {
/** @description Filtering by multiple features.
*
* Usage: `?feature=feature-1&feature=feature-2` */
feature?: string[]
/** @description Filtering by multiple customers.
*
* Usage: `?customerKeys=customer-1&customerKeys=customer-3` */
customerKeys?: string[]
/** @description Filtering by multiple customers.
*
* Usage: `?customerIds=01K4WAQ0J99ZZ0MD75HXR112H8&customerIds=01K4WAQ0J99ZZ0MD75HXR112H9` */
customerIds?: string[]
/** @description Filtering by multiple entitlement types.
*
* Usage: `?entitlementType=metered&entitlementType=boolean` */
entitlementType?: components['schemas']['EntitlementType'][]
/** @description Exclude inactive entitlements in the response (those scheduled for later or earlier) */
excludeInactive?: boolean
/** @description Page index.
*
* Default is 1. */
page?: components['parameters']['Pagination.page']
/** @description The maximum number of items per page.
*
* Default is 100. */
pageSize?: components['parameters']['Pagination.pageSize']
/** @description Number of items to skip.
*
* Default is 0. */
offset?: components['parameters']['LimitOffset.offset']
/** @description Number of items to return.
*
* Default is 100. */
limit?: components['parameters']['LimitOffset.limit']
/** @description The order direction. */
order?: components['parameters']['EntitlementOrderByOrdering.order']
/** @description The order by field. */
orderBy?: components['parameters']['EntitlementOrderByOrdering.orderBy']
}
header?: never
path?: never
cookie?: never
}
requestBody?: never
responses: {
/** @description The request has succeeded. */
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['EntitlementV2PaginatedResponse']
}
}
/** @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 One or more conditions given in the request header fields evaluated to false when tested on the server. */
412: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['PreconditionFailedProblemResponse']
}
}
/** @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']
}
}
}
}
getEntitlementByIdV2: {
parameters: {
query?: never
header?: never
path: {
entitlementId: string
}
cookie?: never
}
requestBody?: never
responses: {
/** @description The request has succeeded. */
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['EntitlementV2']
}
}
/** @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 origin server did not find a current representation for the target resource or is not willing to disclose that one exists. */
404: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['NotFoundProblemResponse']
}
}
/** @description One or more conditions given in the request header fields evaluated to false when tested on the server. */
412: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['PreconditionFailedProblemResponse']
}
}
/** @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']
}
}
}
}
listEventsV2: {
parameters: {
query?: {
Expand Down
92 changes: 92 additions & 0 deletions api/client/javascript/src/zod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17979,6 +17979,98 @@ export const getCustomerEntitlementValueV2QueryParams = zod.object({
time: zod.coerce.date().optional(),
})

/**
* List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only.
To fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint.
* @summary List all entitlements
*/
export const listEntitlementsV2QueryExcludeInactiveDefault = false
export const listEntitlementsV2QueryPageDefault = 1
export const listEntitlementsV2QueryPageSizeDefault = 100
export const listEntitlementsV2QueryPageSizeMax = 1000
export const listEntitlementsV2QueryOffsetDefault = 0
export const listEntitlementsV2QueryOffsetMin = 0
export const listEntitlementsV2QueryLimitDefault = 100
export const listEntitlementsV2QueryLimitMax = 1000

export const listEntitlementsV2QueryParams = zod.object({
customerIds: zod
.array(zod.coerce.string())
.optional()
.describe(
'Filtering by multiple customers.\n\nUsage: `?customerIds=01K4WAQ0J99ZZ0MD75HXR112H8&customerIds=01K4WAQ0J99ZZ0MD75HXR112H9`'
),
customerKeys: zod
.array(zod.coerce.string())
.optional()
.describe(
'Filtering by multiple customers.\n\nUsage: `?customerKeys=customer-1&customerKeys=customer-3`'
),
entitlementType: zod
.array(
zod
.enum(['metered', 'boolean', 'static'])
.describe('Type of the entitlement.')
)
.optional()
.describe(
'Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered&entitlementType=boolean`'
),
excludeInactive: zod.coerce
.boolean()
.optional()
.describe(
'Exclude inactive entitlements in the response (those scheduled for later or earlier)'
),
feature: zod
.array(zod.coerce.string())
.optional()
.describe(
'Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'
),
limit: zod.coerce
.number()
.min(1)
.max(listEntitlementsV2QueryLimitMax)
.default(listEntitlementsV2QueryLimitDefault)
.describe('Number of items to return.\n\nDefault is 100.'),
offset: zod.coerce
.number()
.min(listEntitlementsV2QueryOffsetMin)
.optional()
.describe('Number of items to skip.\n\nDefault is 0.'),
order: zod.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
orderBy: zod
.enum(['createdAt', 'updatedAt'])
.optional()
.describe('The order by field.'),
page: zod.coerce
.number()
.min(1)
.default(listEntitlementsV2QueryPageDefault)
.describe('Page index.\n\nDefault is 1.'),
pageSize: zod.coerce
.number()
.min(1)
.max(listEntitlementsV2QueryPageSizeMax)
.default(listEntitlementsV2QueryPageSizeDefault)
.describe('The maximum number of items per page.\n\nDefault is 100.'),
})

/**
* Get entitlement by id.
* @summary Get entitlement by id
*/
export const getEntitlementByIdV2PathEntitlementIdRegExp = new RegExp(
'^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$'
)

export const getEntitlementByIdV2Params = zod.object({
entitlementId: zod.coerce
.string()
.regex(getEntitlementByIdV2PathEntitlementIdRegExp),
})

/**
* List ingested events with advanced filtering and cursor pagination.
* @summary List ingested events
Expand Down
Loading
Loading