@openmeter/sdk 1.0.0-beta-d6d4cd22dad8 → 1.0.0-beta-cf787e580aa1

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.
@@ -4761,9 +4761,11 @@ export declare const ResetEntitlementUsageBody: zod.ZodObject<{
4761
4761
  */
4762
4762
  export declare const createSubscriptionBodyOnePlanOneKeyMax = 64;
4763
4763
  export declare const createSubscriptionBodyOnePlanOneKeyRegExp: RegExp;
4764
+ export declare const createSubscriptionBodyOneCostBasisModeDefault = "dynamic";
4764
4765
  export declare const createSubscriptionBodyOneTimingDefault = "immediate";
4765
4766
  export declare const createSubscriptionBodyOneCustomerIdRegExp: RegExp;
4766
4767
  export declare const createSubscriptionBodyOneCustomerKeyMax = 256;
4768
+ export declare const createSubscriptionBodyTwoCostBasisModeDefault = "dynamic";
4767
4769
  export declare const createSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
4768
4770
  export declare const createSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
4769
4771
  export declare const createSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
@@ -4837,6 +4839,10 @@ export declare const CreateSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
4837
4839
  billablesMustAlign: zod.ZodOptional<zod.z.ZodCoercedBoolean<unknown>>;
4838
4840
  }, zod.z.core.$strip>>;
4839
4841
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
4842
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
4843
+ dynamic: "dynamic";
4844
+ pinned: "pinned";
4845
+ }>>;
4840
4846
  customerId: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4841
4847
  customerKey: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4842
4848
  description: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
@@ -4857,6 +4863,10 @@ export declare const CreateSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
4857
4863
  }>, zod.z.ZodCoercedDate<unknown>]>>;
4858
4864
  }, zod.z.core.$strip>, zod.ZodObject<{
4859
4865
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
4866
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
4867
+ dynamic: "dynamic";
4868
+ pinned: "pinned";
4869
+ }>>;
4860
4870
  customerId: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4861
4871
  customerKey: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4862
4872
  customPlan: zod.ZodObject<{
@@ -5466,6 +5476,8 @@ export declare const ChangeSubscriptionParams: zod.ZodObject<{
5466
5476
  }, zod.z.core.$strip>;
5467
5477
  export declare const changeSubscriptionBodyOnePlanOneKeyMax = 64;
5468
5478
  export declare const changeSubscriptionBodyOnePlanOneKeyRegExp: RegExp;
5479
+ export declare const changeSubscriptionBodyOneCostBasisModeDefault = "dynamic";
5480
+ export declare const changeSubscriptionBodyTwoCostBasisModeDefault = "dynamic";
5469
5481
  export declare const changeSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
5470
5482
  export declare const changeSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
5471
5483
  export declare const changeSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
@@ -5536,6 +5548,10 @@ export declare const ChangeSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
5536
5548
  billablesMustAlign: zod.ZodOptional<zod.z.ZodCoercedBoolean<unknown>>;
5537
5549
  }, zod.z.core.$strip>>;
5538
5550
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
5551
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
5552
+ dynamic: "dynamic";
5553
+ pinned: "pinned";
5554
+ }>>;
5539
5555
  description: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
5540
5556
  metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.z.ZodCoercedString<unknown>>>;
5541
5557
  name: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
@@ -5554,6 +5570,10 @@ export declare const ChangeSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
5554
5570
  }>, zod.z.ZodCoercedDate<unknown>]>;
5555
5571
  }, zod.z.core.$strip>, zod.ZodObject<{
5556
5572
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
5573
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
5574
+ dynamic: "dynamic";
5575
+ pinned: "pinned";
5576
+ }>>;
5557
5577
  customPlan: zod.ZodObject<{
5558
5578
  alignment: zod.ZodOptional<zod.ZodObject<{
5559
5579
  billablesMustAlign: zod.ZodOptional<zod.z.ZodCoercedBoolean<unknown>>;
@@ -3788,6 +3788,8 @@ export interface components {
3788
3788
  * @example USD
3789
3789
  */
3790
3790
  CurrencyCode: string;
3791
+ /** @description Fiat or managed custom currency code. */
3792
+ CurrencyCodeOrCustom: string;
3791
3793
  /**
3792
3794
  * @description Custom Invoicing app can be used for interface with any invoicing or payment system.
3793
3795
  *
@@ -4087,6 +4089,11 @@ export interface components {
4087
4089
  * @example 2023-01-01T01:01:01.001Z
4088
4090
  */
4089
4091
  billingAnchor?: Date;
4092
+ /**
4093
+ * @description Controls how custom-currency cost bases are selected for the new subscription.
4094
+ * @default dynamic
4095
+ */
4096
+ costBasisMode?: components['schemas']['SubscriptionCostBasisMode'];
4090
4097
  /** @description The custom plan description which defines the Subscription. */
4091
4098
  customPlan: components['schemas']['CustomPlanInput'];
4092
4099
  };
@@ -4095,6 +4102,11 @@ export interface components {
4095
4102
  * @description Create a custom subscription.
4096
4103
  */
4097
4104
  CustomSubscriptionCreate: {
4105
+ /**
4106
+ * @description Controls how custom-currency cost bases are selected for the new subscription.
4107
+ * @default dynamic
4108
+ */
4109
+ costBasisMode?: components['schemas']['SubscriptionCostBasisMode'];
4098
4110
  /** @description The custom plan description which defines the Subscription. */
4099
4111
  customPlan: components['schemas']['CustomPlanInput'];
4100
4112
  /**
@@ -9795,6 +9807,11 @@ export interface components {
9795
9807
  billingAnchor?: Date;
9796
9808
  /** @description The settlement mode of the subscription. */
9797
9809
  settlementMode?: components['schemas']['BillingSettlementMode'];
9810
+ /**
9811
+ * @description Controls how custom-currency cost bases are selected for the new subscription.
9812
+ * @default dynamic
9813
+ */
9814
+ costBasisMode?: components['schemas']['SubscriptionCostBasisMode'];
9798
9815
  };
9799
9816
  /**
9800
9817
  * Create from plan
@@ -9818,6 +9835,11 @@ export interface components {
9818
9835
  description?: string;
9819
9836
  /** @description The settlement mode of the subscription. */
9820
9837
  settlementMode?: components['schemas']['BillingSettlementMode'];
9838
+ /**
9839
+ * @description Controls how custom-currency cost bases are selected for the new subscription.
9840
+ * @default dynamic
9841
+ */
9842
+ costBasisMode?: components['schemas']['SubscriptionCostBasisMode'];
9821
9843
  /**
9822
9844
  * @description Timing configuration for the change, when the change should take effect.
9823
9845
  * The default is immediate.
@@ -10893,11 +10915,22 @@ export interface components {
10893
10915
  plan?: components['schemas']['PlanReference'];
10894
10916
  /**
10895
10917
  * Currency
10896
- * @description The currency code of the subscription.
10897
- * Will be revised once we add multi currency support.
10918
+ * @description The fiat currency in which the subscription is invoiced.
10898
10919
  * @default USD
10899
10920
  */
10900
10921
  currency: components['schemas']['CurrencyCode'];
10922
+ /**
10923
+ * Cost basis mode
10924
+ * @description Controls whether custom-currency cost bases are resolved dynamically or pinned
10925
+ * when their currency pair is introduced to the subscription.
10926
+ * @default dynamic
10927
+ */
10928
+ readonly costBasisMode: components['schemas']['SubscriptionCostBasisMode'];
10929
+ /**
10930
+ * Pinned cost bases
10931
+ * @description Cost bases pinned to custom-currency pairs for this subscription.
10932
+ */
10933
+ readonly costBasisPins: components['schemas']['SubscriptionCostBasisPin'][];
10901
10934
  /**
10902
10935
  * Billing cadence
10903
10936
  * Format: duration
@@ -11263,6 +11296,26 @@ export interface components {
11263
11296
  /** @description Additional properties specific to the problem type may be present. */
11264
11297
  extensions?: components['schemas']['SubscriptionErrorExtensions'];
11265
11298
  };
11299
+ /**
11300
+ * @description Controls how custom-currency cost bases are selected for the subscription.
11301
+ * @enum {string}
11302
+ */
11303
+ SubscriptionCostBasisMode: 'dynamic' | 'pinned';
11304
+ /** @description A cost basis pinned to a custom-currency pair for the subscription. */
11305
+ SubscriptionCostBasisPin: {
11306
+ /**
11307
+ * @description The managed custom currency ID.
11308
+ * @example 01G65Z755AFWAKHE12NY0CQ9FH
11309
+ */
11310
+ readonly customCurrencyId: string;
11311
+ /** @description The fiat currency in which the subscription is invoiced. */
11312
+ readonly invoiceCurrency: components['schemas']['CurrencyCode'];
11313
+ /**
11314
+ * @description The pinned cost basis resource ID.
11315
+ * @example 01G65Z755AFWAKHE12NY0CQ9FH
11316
+ */
11317
+ readonly costBasisId: string;
11318
+ };
11266
11319
  /** @description Create a subscription. */
11267
11320
  SubscriptionCreate: components['schemas']['PlanSubscriptionCreate'] | components['schemas']['CustomSubscriptionCreate'];
11268
11321
  /** @description Subscription edit input. */
@@ -11353,11 +11406,22 @@ export interface components {
11353
11406
  plan?: components['schemas']['PlanReference'];
11354
11407
  /**
11355
11408
  * Currency
11356
- * @description The currency code of the subscription.
11357
- * Will be revised once we add multi currency support.
11409
+ * @description The fiat currency in which the subscription is invoiced.
11358
11410
  * @default USD
11359
11411
  */
11360
11412
  currency: components['schemas']['CurrencyCode'];
11413
+ /**
11414
+ * Cost basis mode
11415
+ * @description Controls whether custom-currency cost bases are resolved dynamically or pinned
11416
+ * when their currency pair is introduced to the subscription.
11417
+ * @default dynamic
11418
+ */
11419
+ readonly costBasisMode: components['schemas']['SubscriptionCostBasisMode'];
11420
+ /**
11421
+ * Pinned cost bases
11422
+ * @description Cost bases pinned to custom-currency pairs for this subscription.
11423
+ */
11424
+ readonly costBasisPins: components['schemas']['SubscriptionCostBasisPin'][];
11361
11425
  /**
11362
11426
  * Billing cadence
11363
11427
  * Format: duration
@@ -11466,6 +11530,11 @@ export interface components {
11466
11530
  * 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.
11467
11531
  */
11468
11532
  key: string;
11533
+ /**
11534
+ * Currency
11535
+ * @description The materialized currency of the item's rate card. Present for priced items.
11536
+ */
11537
+ readonly currency?: components['schemas']['CurrencyCodeOrCustom'];
11469
11538
  /** @description The feature's key (if present). */
11470
11539
  featureKey?: string;
11471
11540
  /**
@@ -12358,6 +12427,7 @@ export type CreateStripeCustomerPortalSessionParams = components['schemas']['Cre
12358
12427
  export type CreditNoteOriginalInvoiceRef = components['schemas']['CreditNoteOriginalInvoiceRef'];
12359
12428
  export type Currency = components['schemas']['Currency'];
12360
12429
  export type CurrencyCode = components['schemas']['CurrencyCode'];
12430
+ export type CurrencyCodeOrCustom = components['schemas']['CurrencyCodeOrCustom'];
12361
12431
  export type CustomInvoicingApp = components['schemas']['CustomInvoicingApp'];
12362
12432
  export type CustomInvoicingAppReplaceUpdate = components['schemas']['CustomInvoicingAppReplaceUpdate'];
12363
12433
  export type CustomInvoicingCustomerAppData = components['schemas']['CustomInvoicingCustomerAppData'];
@@ -12637,6 +12707,8 @@ export type SubscriptionBadRequestErrorResponse = components['schemas']['Subscri
12637
12707
  export type SubscriptionChange = components['schemas']['SubscriptionChange'];
12638
12708
  export type SubscriptionChangeResponseBody = components['schemas']['SubscriptionChangeResponseBody'];
12639
12709
  export type SubscriptionConflictErrorResponse = components['schemas']['SubscriptionConflictErrorResponse'];
12710
+ export type SubscriptionCostBasisMode = components['schemas']['SubscriptionCostBasisMode'];
12711
+ export type SubscriptionCostBasisPin = components['schemas']['SubscriptionCostBasisPin'];
12640
12712
  export type SubscriptionCreate = components['schemas']['SubscriptionCreate'];
12641
12713
  export type SubscriptionEdit = components['schemas']['SubscriptionEdit'];
12642
12714
  export type SubscriptionEditOperation = components['schemas']['SubscriptionEditOperation'];
@@ -29,6 +29,8 @@ export declare class Subscriptions {
29
29
  customerId: string;
30
30
  plan?: import("./schemas.js").components["schemas"]["PlanReference"];
31
31
  currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
32
+ readonly costBasisMode: import("./schemas.js").components["schemas"]["SubscriptionCostBasisMode"];
33
+ readonly costBasisPins: import("./schemas.js").components["schemas"]["SubscriptionCostBasisPin"][];
32
34
  readonly billingCadence: string;
33
35
  readonly proRatingConfig?: import("./schemas.js").components["schemas"]["ProRatingConfig"];
34
36
  readonly billingAnchor: Date;
@@ -55,6 +57,8 @@ export declare class Subscriptions {
55
57
  customerId: string;
56
58
  plan?: import("./schemas.js").components["schemas"]["PlanReference"];
57
59
  currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
60
+ readonly costBasisMode: import("./schemas.js").components["schemas"]["SubscriptionCostBasisMode"];
61
+ readonly costBasisPins: import("./schemas.js").components["schemas"]["SubscriptionCostBasisPin"][];
58
62
  readonly billingCadence: string;
59
63
  readonly proRatingConfig?: import("./schemas.js").components["schemas"]["ProRatingConfig"];
60
64
  readonly billingAnchor: Date;
@@ -85,6 +89,8 @@ export declare class Subscriptions {
85
89
  customerId: string;
86
90
  plan?: import("./schemas.js").components["schemas"]["PlanReference"];
87
91
  currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
92
+ readonly costBasisMode: import("./schemas.js").components["schemas"]["SubscriptionCostBasisMode"];
93
+ readonly costBasisPins: import("./schemas.js").components["schemas"]["SubscriptionCostBasisPin"][];
88
94
  readonly billingCadence: string;
89
95
  readonly proRatingConfig?: import("./schemas.js").components["schemas"]["ProRatingConfig"];
90
96
  readonly billingAnchor: Date;
@@ -113,6 +119,8 @@ export declare class Subscriptions {
113
119
  customerId: string;
114
120
  plan?: import("./schemas.js").components["schemas"]["PlanReference"];
115
121
  currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
122
+ readonly costBasisMode: import("./schemas.js").components["schemas"]["SubscriptionCostBasisMode"];
123
+ readonly costBasisPins: import("./schemas.js").components["schemas"]["SubscriptionCostBasisPin"][];
116
124
  readonly billingCadence: string;
117
125
  readonly proRatingConfig?: import("./schemas.js").components["schemas"]["ProRatingConfig"];
118
126
  readonly billingAnchor: Date;
@@ -164,6 +172,8 @@ export declare class Subscriptions {
164
172
  customerId: string;
165
173
  plan?: import("./schemas.js").components["schemas"]["PlanReference"];
166
174
  currency: import("./schemas.js").components["schemas"]["CurrencyCode"];
175
+ readonly costBasisMode: import("./schemas.js").components["schemas"]["SubscriptionCostBasisMode"];
176
+ readonly costBasisPins: import("./schemas.js").components["schemas"]["SubscriptionCostBasisPin"][];
167
177
  readonly billingCadence: string;
168
178
  readonly proRatingConfig?: import("./schemas.js").components["schemas"]["ProRatingConfig"];
169
179
  readonly billingAnchor: Date;
@@ -4761,9 +4761,11 @@ export declare const ResetEntitlementUsageBody: zod.ZodObject<{
4761
4761
  */
4762
4762
  export declare const createSubscriptionBodyOnePlanOneKeyMax = 64;
4763
4763
  export declare const createSubscriptionBodyOnePlanOneKeyRegExp: RegExp;
4764
+ export declare const createSubscriptionBodyOneCostBasisModeDefault = "dynamic";
4764
4765
  export declare const createSubscriptionBodyOneTimingDefault = "immediate";
4765
4766
  export declare const createSubscriptionBodyOneCustomerIdRegExp: RegExp;
4766
4767
  export declare const createSubscriptionBodyOneCustomerKeyMax = 256;
4768
+ export declare const createSubscriptionBodyTwoCostBasisModeDefault = "dynamic";
4767
4769
  export declare const createSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
4768
4770
  export declare const createSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
4769
4771
  export declare const createSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
@@ -4837,6 +4839,10 @@ export declare const CreateSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
4837
4839
  billablesMustAlign: zod.ZodOptional<zod.z.ZodCoercedBoolean<unknown>>;
4838
4840
  }, zod.z.core.$strip>>;
4839
4841
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
4842
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
4843
+ dynamic: "dynamic";
4844
+ pinned: "pinned";
4845
+ }>>;
4840
4846
  customerId: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4841
4847
  customerKey: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4842
4848
  description: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
@@ -4857,6 +4863,10 @@ export declare const CreateSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
4857
4863
  }>, zod.z.ZodCoercedDate<unknown>]>>;
4858
4864
  }, zod.z.core.$strip>, zod.ZodObject<{
4859
4865
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
4866
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
4867
+ dynamic: "dynamic";
4868
+ pinned: "pinned";
4869
+ }>>;
4860
4870
  customerId: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4861
4871
  customerKey: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
4862
4872
  customPlan: zod.ZodObject<{
@@ -5466,6 +5476,8 @@ export declare const ChangeSubscriptionParams: zod.ZodObject<{
5466
5476
  }, zod.z.core.$strip>;
5467
5477
  export declare const changeSubscriptionBodyOnePlanOneKeyMax = 64;
5468
5478
  export declare const changeSubscriptionBodyOnePlanOneKeyRegExp: RegExp;
5479
+ export declare const changeSubscriptionBodyOneCostBasisModeDefault = "dynamic";
5480
+ export declare const changeSubscriptionBodyTwoCostBasisModeDefault = "dynamic";
5469
5481
  export declare const changeSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
5470
5482
  export declare const changeSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
5471
5483
  export declare const changeSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
@@ -5536,6 +5548,10 @@ export declare const ChangeSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
5536
5548
  billablesMustAlign: zod.ZodOptional<zod.z.ZodCoercedBoolean<unknown>>;
5537
5549
  }, zod.z.core.$strip>>;
5538
5550
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
5551
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
5552
+ dynamic: "dynamic";
5553
+ pinned: "pinned";
5554
+ }>>;
5539
5555
  description: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
5540
5556
  metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.z.ZodCoercedString<unknown>>>;
5541
5557
  name: zod.ZodOptional<zod.z.ZodCoercedString<unknown>>;
@@ -5554,6 +5570,10 @@ export declare const ChangeSubscriptionBody: zod.ZodUnion<readonly [zod.ZodObjec
5554
5570
  }>, zod.z.ZodCoercedDate<unknown>]>;
5555
5571
  }, zod.z.core.$strip>, zod.ZodObject<{
5556
5572
  billingAnchor: zod.ZodOptional<zod.z.ZodCoercedDate<unknown>>;
5573
+ costBasisMode: zod.ZodDefault<zod.ZodEnum<{
5574
+ dynamic: "dynamic";
5575
+ pinned: "pinned";
5576
+ }>>;
5557
5577
  customPlan: zod.ZodObject<{
5558
5578
  alignment: zod.ZodOptional<zod.ZodObject<{
5559
5579
  billablesMustAlign: zod.ZodOptional<zod.z.ZodCoercedBoolean<unknown>>;
@@ -9896,9 +9896,11 @@ export const ResetEntitlementUsageBody = zod
9896
9896
  */
9897
9897
  export const createSubscriptionBodyOnePlanOneKeyMax = 64;
9898
9898
  export const createSubscriptionBodyOnePlanOneKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
9899
+ export const createSubscriptionBodyOneCostBasisModeDefault = 'dynamic';
9899
9900
  export const createSubscriptionBodyOneTimingDefault = 'immediate';
9900
9901
  export const createSubscriptionBodyOneCustomerIdRegExp = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
9901
9902
  export const createSubscriptionBodyOneCustomerKeyMax = 256;
9903
+ export const createSubscriptionBodyTwoCostBasisModeDefault = 'dynamic';
9902
9904
  export const createSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
9903
9905
  export const createSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
9904
9906
  export const createSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
@@ -9985,6 +9987,11 @@ export const CreateSubscriptionBody = zod
9985
9987
  .date()
9986
9988
  .optional()
9987
9989
  .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.'),
9990
+ costBasisMode: zod
9991
+ .enum(['dynamic', 'pinned'])
9992
+ .describe('Controls how custom-currency cost bases are selected for the subscription.')
9993
+ .default(createSubscriptionBodyOneCostBasisModeDefault)
9994
+ .describe('Controls how custom-currency cost bases are selected for the new subscription.'),
9988
9995
  customerId: zod.coerce
9989
9996
  .string()
9990
9997
  .regex(createSubscriptionBodyOneCustomerIdRegExp)
@@ -10054,6 +10061,11 @@ export const CreateSubscriptionBody = zod
10054
10061
  .date()
10055
10062
  .optional()
10056
10063
  .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.'),
10064
+ costBasisMode: zod
10065
+ .enum(['dynamic', 'pinned'])
10066
+ .describe('Controls how custom-currency cost bases are selected for the subscription.')
10067
+ .default(createSubscriptionBodyTwoCostBasisModeDefault)
10068
+ .describe('Controls how custom-currency cost bases are selected for the new subscription.'),
10057
10069
  customerId: zod.coerce
10058
10070
  .string()
10059
10071
  .regex(createSubscriptionBodyTwoCustomerIdRegExp)
@@ -11577,6 +11589,8 @@ export const ChangeSubscriptionParams = zod.object({
11577
11589
  });
11578
11590
  export const changeSubscriptionBodyOnePlanOneKeyMax = 64;
11579
11591
  export const changeSubscriptionBodyOnePlanOneKeyRegExp = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
11592
+ export const changeSubscriptionBodyOneCostBasisModeDefault = 'dynamic';
11593
+ export const changeSubscriptionBodyTwoCostBasisModeDefault = 'dynamic';
11580
11594
  export const changeSubscriptionBodyTwoCustomPlanOneOneNameMax = 256;
11581
11595
  export const changeSubscriptionBodyTwoCustomPlanOneOneDescriptionMax = 1024;
11582
11596
  export const changeSubscriptionBodyTwoCustomPlanOneOneCurrencyOneMin = 3;
@@ -11660,6 +11674,11 @@ export const ChangeSubscriptionBody = zod
11660
11674
  .date()
11661
11675
  .optional()
11662
11676
  .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.'),
11677
+ costBasisMode: zod
11678
+ .enum(['dynamic', 'pinned'])
11679
+ .describe('Controls how custom-currency cost bases are selected for the subscription.')
11680
+ .default(changeSubscriptionBodyOneCostBasisModeDefault)
11681
+ .describe('Controls how custom-currency cost bases are selected for the new subscription.'),
11663
11682
  description: zod.coerce
11664
11683
  .string()
11665
11684
  .optional()
@@ -11717,6 +11736,11 @@ export const ChangeSubscriptionBody = zod
11717
11736
  .date()
11718
11737
  .optional()
11719
11738
  .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.'),
11739
+ costBasisMode: zod
11740
+ .enum(['dynamic', 'pinned'])
11741
+ .describe('Controls how custom-currency cost bases are selected for the subscription.')
11742
+ .default(changeSubscriptionBodyTwoCostBasisModeDefault)
11743
+ .describe('Controls how custom-currency cost bases are selected for the new subscription.'),
11720
11744
  customPlan: zod
11721
11745
  .object({
11722
11746
  alignment: zod