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
1,260 changes: 630 additions & 630 deletions api/api.gen.go

Large diffs are not rendered by default.

1,004 changes: 502 additions & 502 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions api/client/javascript/src/client/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15181,7 +15181,7 @@ export interface operations {
query?: never
header?: never
path: {
customerIdOrKey: string
customerIdOrKey: components['schemas']['ULIDOrExternalKey']
}
cookie?: never
}
Expand Down Expand Up @@ -15573,7 +15573,7 @@ export interface operations {
}
header?: never
path: {
customerIdOrKey: string
customerIdOrKey: components['schemas']['ULIDOrExternalKey']
featureKey: string
}
cookie?: never
Expand Down
43 changes: 28 additions & 15 deletions api/client/javascript/src/zod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6966,18 +6966,25 @@ export const deleteCustomerParams = zod.object({
* Get the overall access of a customer.
* @summary Get customer access
*/
export const getCustomerAccessPathCustomerIdOrKeyMax = 64

export const getCustomerAccessPathCustomerIdOrKeyRegExp = new RegExp(
'^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$'
export const getCustomerAccessPathCustomerIdOrKeyRegExpOne = new RegExp(
'^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$'
)
export const getCustomerAccessPathCustomerIdOrKeyMaxTwo = 256

export const getCustomerAccessParams = zod.object({
customerIdOrKey: zod.coerce
.string()
.min(1)
.max(getCustomerAccessPathCustomerIdOrKeyMax)
.regex(getCustomerAccessPathCustomerIdOrKeyRegExp),
.regex(getCustomerAccessPathCustomerIdOrKeyRegExpOne)
.describe(
'ULID (Universally Unique Lexicographically Sortable Identifier).'
)
.or(
zod.coerce
.string()
.min(1)
.max(getCustomerAccessPathCustomerIdOrKeyMaxTwo)
.describe('ExternalKey is a looser version of key.')
),
})

/**
Expand Down Expand Up @@ -7415,11 +7422,9 @@ export const deleteCustomerAppDataParams = zod.object({
* Checks customer access to a given feature (by key). All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.
* @summary Get customer entitlement value
*/
export const getCustomerEntitlementValuePathCustomerIdOrKeyMax = 64

export const getCustomerEntitlementValuePathCustomerIdOrKeyRegExp = new RegExp(
'^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$'
)
export const getCustomerEntitlementValuePathCustomerIdOrKeyRegExpOne =
new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$')
export const getCustomerEntitlementValuePathCustomerIdOrKeyMaxTwo = 256
export const getCustomerEntitlementValuePathFeatureKeyMax = 64

export const getCustomerEntitlementValuePathFeatureKeyRegExp = new RegExp(
Expand All @@ -7429,9 +7434,17 @@ export const getCustomerEntitlementValuePathFeatureKeyRegExp = new RegExp(
export const getCustomerEntitlementValueParams = zod.object({
customerIdOrKey: zod.coerce
.string()
.min(1)
.max(getCustomerEntitlementValuePathCustomerIdOrKeyMax)
.regex(getCustomerEntitlementValuePathCustomerIdOrKeyRegExp),
.regex(getCustomerEntitlementValuePathCustomerIdOrKeyRegExpOne)
.describe(
'ULID (Universally Unique Lexicographically Sortable Identifier).'
)
.or(
zod.coerce
.string()
.min(1)
.max(getCustomerEntitlementValuePathCustomerIdOrKeyMaxTwo)
.describe('ExternalKey is a looser version of key.')
),
featureKey: zod.coerce
.string()
.min(1)
Expand Down
10 changes: 2 additions & 8 deletions api/openapi.cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3247,10 +3247,7 @@ paths:
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
$ref: '#/components/schemas/ULIDOrExternalKey'
responses:
'200':
description: The request has succeeded.
Expand Down Expand Up @@ -3538,10 +3535,7 @@ paths:
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
$ref: '#/components/schemas/ULIDOrExternalKey'
- name: featureKey
in: path
required: true
Expand Down
10 changes: 2 additions & 8 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3246,10 +3246,7 @@ paths:
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
$ref: '#/components/schemas/ULIDOrExternalKey'
responses:
'200':
description: The request has succeeded.
Expand Down Expand Up @@ -3537,10 +3534,7 @@ paths:
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 64
pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
$ref: '#/components/schemas/ULIDOrExternalKey'
- name: featureKey
in: path
required: true
Expand Down
4 changes: 2 additions & 2 deletions api/spec/src/entitlements/customer.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface Customer {
@route("/entitlements/{featureKey}/value")
@summary("Get customer entitlement value")
getCustomerEntitlementValue(
@path customerIdOrKey: ULIDOrKey,
@path customerIdOrKey: ULIDOrExternalKey,
@path featureKey: Key,
@query(#{ explode: true }) time?: DateTime,
): EntitlementValue | OpenMeter.CommonErrors | OpenMeter.NotFoundError;
Expand All @@ -32,7 +32,7 @@ interface Customer {
@route("/access")
@summary("Get customer access")
getCustomerAccess(
@path customerIdOrKey: ULIDOrKey,
@path customerIdOrKey: ULIDOrExternalKey,
): CustomerAccess | OpenMeter.CommonErrors | OpenMeter.NotFoundError;
}

Expand Down