Skip to content
Draft
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
2,616 changes: 1,343 additions & 1,273 deletions api/api.gen.go

Large diffs are not rendered by default.

2,154 changes: 1,112 additions & 1,042 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

82 changes: 78 additions & 4 deletions api/client/javascript/src/client/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3825,6 +3825,8 @@ export interface components {
* @example USD
*/
CurrencyCode: string
/** @description Fiat or managed custom currency code. */
CurrencyCodeOrCustom: string
/**
* @description Custom Invoicing app can be used for interface with any invoicing or payment system.
*
Expand Down Expand Up @@ -4130,6 +4132,11 @@ export interface components {
* @example 2023-01-01T01:01:01.001Z
*/
billingAnchor?: Date
/**
* @description Controls how custom-currency cost bases are selected for the new subscription.
* @default dynamic
*/
costBasisMode?: components['schemas']['SubscriptionCostBasisMode']
/** @description The custom plan description which defines the Subscription. */
customPlan: components['schemas']['CustomPlanInput']
}
Expand All @@ -4138,6 +4145,11 @@ export interface components {
* @description Create a custom subscription.
*/
CustomSubscriptionCreate: {
/**
* @description Controls how custom-currency cost bases are selected for the new subscription.
* @default dynamic
*/
costBasisMode?: components['schemas']['SubscriptionCostBasisMode']
/** @description The custom plan description which defines the Subscription. */
customPlan: components['schemas']['CustomPlanInput']
/**
Expand Down Expand Up @@ -9927,6 +9939,11 @@ export interface components {
billingAnchor?: Date
/** @description The settlement mode of the subscription. */
settlementMode?: components['schemas']['BillingSettlementMode']
/**
* @description Controls how custom-currency cost bases are selected for the new subscription.
* @default dynamic
*/
costBasisMode?: components['schemas']['SubscriptionCostBasisMode']
}
/**
* Create from plan
Expand All @@ -9950,6 +9967,11 @@ export interface components {
description?: string
/** @description The settlement mode of the subscription. */
settlementMode?: components['schemas']['BillingSettlementMode']
/**
* @description Controls how custom-currency cost bases are selected for the new subscription.
* @default dynamic
*/
costBasisMode?: components['schemas']['SubscriptionCostBasisMode']
/**
* @description Timing configuration for the change, when the change should take effect.
* The default is immediate.
Expand Down Expand Up @@ -11037,11 +11059,22 @@ export interface components {
plan?: components['schemas']['PlanReference']
/**
* Currency
* @description The currency code of the subscription.
* Will be revised once we add multi currency support.
* @description The fiat currency in which the subscription is invoiced.
* @default USD
*/
currency: components['schemas']['CurrencyCode']
/**
* Cost basis mode
* @description Controls whether custom-currency cost bases are resolved dynamically or pinned
* when their currency pair is introduced to the subscription.
* @default dynamic
*/
readonly costBasisMode: components['schemas']['SubscriptionCostBasisMode']
/**
* Pinned cost bases
* @description Cost bases pinned to custom-currency pairs for this subscription.
*/
readonly costBasisPins: components['schemas']['SubscriptionCostBasisPin'][]
/**
* Billing cadence
* Format: duration
Expand Down Expand Up @@ -11409,6 +11442,26 @@ export interface components {
/** @description Additional properties specific to the problem type may be present. */
extensions?: components['schemas']['SubscriptionErrorExtensions']
}
/**
* @description Controls how custom-currency cost bases are selected for the subscription.
* @enum {string}
*/
SubscriptionCostBasisMode: 'dynamic' | 'pinned'
/** @description A cost basis pinned to a custom-currency pair for the subscription. */
SubscriptionCostBasisPin: {
/**
* @description The managed custom currency ID.
* @example 01G65Z755AFWAKHE12NY0CQ9FH
*/
readonly customCurrencyId: string
/** @description The fiat currency in which the subscription is invoiced. */
readonly invoiceCurrency: components['schemas']['CurrencyCode']
/**
* @description The pinned cost basis resource ID.
* @example 01G65Z755AFWAKHE12NY0CQ9FH
*/
readonly costBasisId: string
}
/** @description Create a subscription. */
SubscriptionCreate:
| components['schemas']['PlanSubscriptionCreate']
Expand Down Expand Up @@ -11507,11 +11560,22 @@ export interface components {
plan?: components['schemas']['PlanReference']
/**
* Currency
* @description The currency code of the subscription.
* Will be revised once we add multi currency support.
* @description The fiat currency in which the subscription is invoiced.
* @default USD
*/
currency: components['schemas']['CurrencyCode']
/**
* Cost basis mode
* @description Controls whether custom-currency cost bases are resolved dynamically or pinned
* when their currency pair is introduced to the subscription.
* @default dynamic
*/
readonly costBasisMode: components['schemas']['SubscriptionCostBasisMode']
/**
* Pinned cost bases
* @description Cost bases pinned to custom-currency pairs for this subscription.
*/
readonly costBasisPins: components['schemas']['SubscriptionCostBasisPin'][]
/**
* Billing cadence
* Format: duration
Expand Down Expand Up @@ -11620,6 +11684,11 @@ export interface components {
* We say "referenced by the Price" regardless of how a price itself is referenced, it colloquially makes sense to say "paying the same price for the same thing". In practice this should be derived from what's printed on the invoice line-item.
*/
key: string
/**
* Currency
* @description The materialized currency of the item's rate card. Present for priced items.
*/
readonly currency?: components['schemas']['CurrencyCodeOrCustom']
/** @description The feature's key (if present). */
featureKey?: string
/**
Expand Down Expand Up @@ -12569,6 +12638,7 @@ export type CreditNoteOriginalInvoiceRef =
components['schemas']['CreditNoteOriginalInvoiceRef']
export type Currency = components['schemas']['Currency']
export type CurrencyCode = components['schemas']['CurrencyCode']
export type CurrencyCodeOrCustom = components['schemas']['CurrencyCodeOrCustom']
export type CustomInvoicingApp = components['schemas']['CustomInvoicingApp']
export type CustomInvoicingAppReplaceUpdate =
components['schemas']['CustomInvoicingAppReplaceUpdate']
Expand Down Expand Up @@ -13003,6 +13073,10 @@ export type SubscriptionChangeResponseBody =
components['schemas']['SubscriptionChangeResponseBody']
export type SubscriptionConflictErrorResponse =
components['schemas']['SubscriptionConflictErrorResponse']
export type SubscriptionCostBasisMode =
components['schemas']['SubscriptionCostBasisMode']
export type SubscriptionCostBasisPin =
components['schemas']['SubscriptionCostBasisPin']
export type SubscriptionCreate = components['schemas']['SubscriptionCreate']
export type SubscriptionEdit = components['schemas']['SubscriptionEdit']
export type SubscriptionEditOperation =
Expand Down
40 changes: 40 additions & 0 deletions api/client/javascript/src/zod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14323,11 +14323,13 @@ export const createSubscriptionBodyOnePlanOneKeyMax = 64
export const createSubscriptionBodyOnePlanOneKeyRegExp =
/^[a-z0-9]+(?:_[a-z0-9]+)*$/

export const createSubscriptionBodyOneCostBasisModeDefault = 'dynamic'
export const createSubscriptionBodyOneTimingDefault = 'immediate'
export const createSubscriptionBodyOneCustomerIdRegExp =
/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/
export const createSubscriptionBodyOneCustomerKeyMax = 256

export const createSubscriptionBodyTwoCostBasisModeDefault = 'dynamic'
export const createSubscriptionBodyTwoCustomPlanOneOneNameMax = 256

export const createSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024
Expand Down Expand Up @@ -14474,6 +14476,15 @@ export const CreateSubscriptionBody = zod
.describe(
'The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.',
),
costBasisMode: zod
.enum(['dynamic', 'pinned'])
.describe(
'Controls how custom-currency cost bases are selected for the subscription.',
)
.default(createSubscriptionBodyOneCostBasisModeDefault)
.describe(
'Controls how custom-currency cost bases are selected for the new subscription.',
),
customerId: zod.coerce
.string()
.regex(createSubscriptionBodyOneCustomerIdRegExp)
Expand Down Expand Up @@ -14565,6 +14576,15 @@ export const CreateSubscriptionBody = zod
.describe(
'The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the subscription start time will be used.',
),
costBasisMode: zod
.enum(['dynamic', 'pinned'])
.describe(
'Controls how custom-currency cost bases are selected for the subscription.',
)
.default(createSubscriptionBodyTwoCostBasisModeDefault)
.describe(
'Controls how custom-currency cost bases are selected for the new subscription.',
),
customerId: zod.coerce
.string()
.regex(createSubscriptionBodyTwoCustomerIdRegExp)
Expand Down Expand Up @@ -17027,6 +17047,8 @@ export const changeSubscriptionBodyOnePlanOneKeyMax = 64
export const changeSubscriptionBodyOnePlanOneKeyRegExp =
/^[a-z0-9]+(?:_[a-z0-9]+)*$/

export const changeSubscriptionBodyOneCostBasisModeDefault = 'dynamic'
export const changeSubscriptionBodyTwoCostBasisModeDefault = 'dynamic'
export const changeSubscriptionBodyTwoCustomPlanOneOneNameMax = 256

export const changeSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024
Expand Down Expand Up @@ -17168,6 +17190,15 @@ export const ChangeSubscriptionBody = zod
.describe(
'The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.',
),
costBasisMode: zod
.enum(['dynamic', 'pinned'])
.describe(
'Controls how custom-currency cost bases are selected for the subscription.',
)
.default(changeSubscriptionBodyOneCostBasisModeDefault)
.describe(
'Controls how custom-currency cost bases are selected for the new subscription.',
),
description: zod.coerce
.string()
.optional()
Expand Down Expand Up @@ -17245,6 +17276,15 @@ export const ChangeSubscriptionBody = zod
.describe(
'The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.',
),
costBasisMode: zod
.enum(['dynamic', 'pinned'])
.describe(
'Controls how custom-currency cost bases are selected for the subscription.',
)
.default(changeSubscriptionBodyTwoCostBasisModeDefault)
.describe(
'Controls how custom-currency cost bases are selected for the new subscription.',
),
customPlan: zod
.object({
alignment: zod
Expand Down
4 changes: 4 additions & 0 deletions api/client/python/openmeter/_generated/models/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions api/client/python/openmeter/_generated/models/_enums.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading