@openmeter/sdk 1.0.0-beta-3087f852a0e8 → 1.0.0-beta-14ec9d225214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/client/schemas.d.cts +24 -9
- package/dist/cjs/src/zod/index.cjs +15 -7
- package/dist/cjs/src/zod/index.cjs.map +1 -1
- package/dist/cjs/src/zod/index.d.cts +11 -3
- package/dist/src/client/schemas.d.ts +24 -9
- package/dist/src/zod/index.d.ts +11 -3
- package/dist/src/zod/index.js +15 -7
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2188,9 +2188,17 @@ export interface paths {
|
|
|
2188
2188
|
put?: never;
|
|
2189
2189
|
/**
|
|
2190
2190
|
* Migrate subscription
|
|
2191
|
-
* @description Migrates
|
|
2192
|
-
* If
|
|
2193
|
-
*
|
|
2191
|
+
* @description Migrates a running subscription to a later version of its current plan.
|
|
2192
|
+
* If startingPhase is omitted and billingAnchor is omitted or unchanged, the subscription is amended in place.
|
|
2193
|
+
* Unchanged items retain their service periods. Changed or removed items end at
|
|
2194
|
+
* the effective time; replacements and additions start from that time.
|
|
2195
|
+
* For in-place migrations, existing addons must be compatible with the target plan version.
|
|
2196
|
+
* The phase timeline, billing anchor, and subscription-level billing settings
|
|
2197
|
+
* are preserved. Both response entries refer to the same subscription:
|
|
2198
|
+
* current is the before snapshot and next is the amended view.
|
|
2199
|
+
* Providing startingPhase or a different billingAnchor uses subscription change: the current subscription
|
|
2200
|
+
* ends and a replacement starts at the effective time. This resets the phase timeline
|
|
2201
|
+
* and can produce billing adjustments. Addons are not transferred to the replacement.
|
|
2194
2202
|
*/
|
|
2195
2203
|
post: operations['migrateSubscription'];
|
|
2196
2204
|
delete?: never;
|
|
@@ -26281,24 +26289,31 @@ export interface operations {
|
|
|
26281
26289
|
content: {
|
|
26282
26290
|
'application/json': {
|
|
26283
26291
|
/**
|
|
26284
|
-
* @description
|
|
26285
|
-
*
|
|
26292
|
+
* @description When the migration takes effect: immediately, at the next billing cycle, or at an explicit billing-aligned timestamp.
|
|
26293
|
+
* In-place migrations may be scheduled into a later phase when the current and target phase timelines match.
|
|
26294
|
+
* The target plan reference is saved immediately; changed items take effect at the requested time.
|
|
26295
|
+
* Past or unsupported times return an error.
|
|
26286
26296
|
* @default immediate
|
|
26287
26297
|
*/
|
|
26288
26298
|
timing?: components['schemas']['SubscriptionTiming'];
|
|
26289
26299
|
/**
|
|
26290
|
-
* @description
|
|
26300
|
+
* @description A strictly later version of the current plan to migrate to.
|
|
26291
26301
|
* If not provided, the subscription will migrate to the latest version of the current plan.
|
|
26292
26302
|
*/
|
|
26293
26303
|
targetVersion?: number;
|
|
26294
26304
|
/**
|
|
26295
|
-
* @description
|
|
26296
|
-
*
|
|
26305
|
+
* @description Explicitly replace the subscription, starting in this target plan phase.
|
|
26306
|
+
* Providing this field always selects replacement, even if the phase matches the current one.
|
|
26307
|
+
* Replacement may produce billing adjustments and does not transfer addons.
|
|
26308
|
+
* Omit it to migrate in place; incompatible phase timelines then return an error.
|
|
26297
26309
|
*/
|
|
26298
26310
|
startingPhase?: string;
|
|
26299
26311
|
/**
|
|
26300
26312
|
* Format: date-time
|
|
26301
|
-
* @description The
|
|
26313
|
+
* @description The anchor used with the plan's billing cadence to calculate billing periods.
|
|
26314
|
+
* If startingPhase is omitted and this anchor is omitted or equal to the existing one, migration preserves the current subscription.
|
|
26315
|
+
* Providing a different anchor ends the current subscription and creates a replacement.
|
|
26316
|
+
* The supplied anchor is preserved; it may be before or after the replacement's start time.
|
|
26302
26317
|
* @example 2023-01-01T01:01:01.001Z
|
|
26303
26318
|
*/
|
|
26304
26319
|
billingAnchor?: Date;
|
|
@@ -12569,9 +12569,17 @@ exports.ChangeSubscriptionBody = zod
|
|
|
12569
12569
|
])
|
|
12570
12570
|
.describe('Change a subscription.');
|
|
12571
12571
|
/**
|
|
12572
|
-
* Migrates
|
|
12573
|
-
* If
|
|
12574
|
-
*
|
|
12572
|
+
* Migrates a running subscription to a later version of its current plan.
|
|
12573
|
+
* If startingPhase is omitted and billingAnchor is omitted or unchanged, the subscription is amended in place.
|
|
12574
|
+
* Unchanged items retain their service periods. Changed or removed items end at
|
|
12575
|
+
* the effective time; replacements and additions start from that time.
|
|
12576
|
+
* For in-place migrations, existing addons must be compatible with the target plan version.
|
|
12577
|
+
* The phase timeline, billing anchor, and subscription-level billing settings
|
|
12578
|
+
* are preserved. Both response entries refer to the same subscription:
|
|
12579
|
+
* current is the before snapshot and next is the amended view.
|
|
12580
|
+
* Providing startingPhase or a different billingAnchor uses subscription change: the current subscription
|
|
12581
|
+
* ends and a replacement starts at the effective time. This resets the phase timeline
|
|
12582
|
+
* and can produce billing adjustments. Addons are not transferred to the replacement.
|
|
12575
12583
|
* @summary Migrate subscription
|
|
12576
12584
|
*/
|
|
12577
12585
|
exports.migrateSubscriptionPathSubscriptionIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
@@ -12585,18 +12593,18 @@ exports.MigrateSubscriptionBody = zod.object({
|
|
|
12585
12593
|
billingAnchor: zod.coerce
|
|
12586
12594
|
.date()
|
|
12587
12595
|
.optional()
|
|
12588
|
-
.describe(
|
|
12596
|
+
.describe("The anchor used with the plan's billing cadence to calculate billing periods.\nIf startingPhase is omitted and this anchor is omitted or equal to the existing one, migration preserves the current subscription.\nProviding a different anchor ends the current subscription and creates a replacement.\nThe supplied anchor is preserved; it may be before or after the replacement's start time."),
|
|
12589
12597
|
startingPhase: zod.coerce
|
|
12590
12598
|
.string()
|
|
12591
12599
|
.min(1)
|
|
12592
12600
|
.optional()
|
|
12593
|
-
.describe('
|
|
12601
|
+
.describe('Explicitly replace the subscription, starting in this target plan phase.\nProviding this field always selects replacement, even if the phase matches the current one.\nReplacement may produce billing adjustments and does not transfer addons.\nOmit it to migrate in place; incompatible phase timelines then return an error.'),
|
|
12594
12602
|
targetVersion: zod.coerce
|
|
12595
12603
|
.number()
|
|
12596
12604
|
.int()
|
|
12597
12605
|
.min(1)
|
|
12598
12606
|
.optional()
|
|
12599
|
-
.describe('
|
|
12607
|
+
.describe('A strictly later version of the current plan to migrate to.\nIf not provided, the subscription will migrate to the latest version of the current plan.'),
|
|
12600
12608
|
timing: zod
|
|
12601
12609
|
.union([
|
|
12602
12610
|
zod
|
|
@@ -12608,7 +12616,7 @@ exports.MigrateSubscriptionBody = zod.object({
|
|
|
12608
12616
|
])
|
|
12609
12617
|
.describe('Subscription edit timing defined when the changes should take effect.\nIf the provided configuration is not supported by the subscription, an error will be returned.')
|
|
12610
12618
|
.default(exports.migrateSubscriptionBodyTimingDefault)
|
|
12611
|
-
.describe('
|
|
12619
|
+
.describe('When the migration takes effect: immediately, at the next billing cycle, or at an explicit billing-aligned timestamp.\nIn-place migrations may be scheduled into a later phase when the current and target phase timelines match.\nThe target plan reference is saved immediately; changed items take effect at the requested time.\nPast or unsupported times return an error.'),
|
|
12612
12620
|
});
|
|
12613
12621
|
/**
|
|
12614
12622
|
* Restores a canceled subscription.
|