@openmeter/sdk 1.0.0-beta-ea1c08fc3e64 → 1.0.0-beta-53340111806a

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.
@@ -3498,6 +3498,12 @@ export interface components {
3498
3498
  /** @description Timing configuration for the change, when the change should take effect.
3499
3499
  * For changing a subscription, the accepted values depend on the subscription configuration. */
3500
3500
  timing: components['schemas']['SubscriptionTiming'];
3501
+ /**
3502
+ * Format: date-time
3503
+ * @description 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.
3504
+ * @example 2023-01-01T01:01:01.001Z
3505
+ */
3506
+ billingAnchor?: Date;
3501
3507
  /** @description The custom plan description which defines the Subscription. */
3502
3508
  customPlan: components['schemas']['CustomPlanInput'];
3503
3509
  };
@@ -8004,6 +8010,12 @@ export interface components {
8004
8010
  name?: string;
8005
8011
  /** @description Description for the Subscription. */
8006
8012
  description?: string;
8013
+ /**
8014
+ * Format: date-time
8015
+ * @description 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.
8016
+ * @example 2023-01-01T01:01:01.001Z
8017
+ */
8018
+ billingAnchor?: Date;
8007
8019
  };
8008
8020
  /** @description Create subscription based on plan. */
8009
8021
  PlanSubscriptionCreate: {
@@ -9426,7 +9438,7 @@ export interface components {
9426
9438
  *
9427
9439
  * 2. If a Feature is not associated with the SubscriptionItem, it is referenced by the Price
9428
9440
  *
9429
- * 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. */
9441
+ * 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. */
9430
9442
  key: string;
9431
9443
  /** @description The feature's key (if present). */
9432
9444
  featureKey?: string;
@@ -23234,6 +23246,12 @@ export interface operations {
23234
23246
  /** @description The key of the phase to start the subscription in.
23235
23247
  * If not provided, the subscription will start in the first phase of the plan. */
23236
23248
  startingPhase?: string;
23249
+ /**
23250
+ * Format: date-time
23251
+ * @description 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.
23252
+ * @example 2023-01-01T01:01:01.001Z
23253
+ */
23254
+ billingAnchor?: Date;
23237
23255
  };
23238
23256
  };
23239
23257
  };
@@ -10411,6 +10411,10 @@ exports.changeSubscriptionBody = zod_1.z
10411
10411
  .describe('Alignment configuration for a plan or subscription.')
10412
10412
  .optional()
10413
10413
  .describe('What alignment settings the subscription should have.'),
10414
+ billingAnchor: zod_1.z
10415
+ .date()
10416
+ .optional()
10417
+ .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.'),
10414
10418
  description: zod_1.z
10415
10419
  .string()
10416
10420
  .optional()
@@ -10453,6 +10457,10 @@ exports.changeSubscriptionBody = zod_1.z
10453
10457
  .describe('Change subscription based on plan.')
10454
10458
  .or(zod_1.z
10455
10459
  .object({
10460
+ billingAnchor: zod_1.z
10461
+ .date()
10462
+ .optional()
10463
+ .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.'),
10456
10464
  customPlan: zod_1.z
10457
10465
  .object({
10458
10466
  alignment: zod_1.z
@@ -11053,6 +11061,10 @@ exports.migrateSubscriptionParams = zod_1.z.object({
11053
11061
  });
11054
11062
  exports.migrateSubscriptionBodyTimingDefault = 'immediate';
11055
11063
  exports.migrateSubscriptionBody = zod_1.z.object({
11064
+ billingAnchor: zod_1.z
11065
+ .date()
11066
+ .optional()
11067
+ .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.'),
11056
11068
  startingPhase: zod_1.z
11057
11069
  .string()
11058
11070
  .min(1)
@@ -16862,6 +16862,7 @@ export declare const changeSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
16862
16862
  }, {
16863
16863
  billablesMustAlign?: boolean | undefined;
16864
16864
  }>>;
16865
+ billingAnchor: zod.ZodOptional<zod.ZodDate>;
16865
16866
  description: zod.ZodOptional<zod.ZodString>;
16866
16867
  metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
16867
16868
  name: zod.ZodOptional<zod.ZodString>;
@@ -16889,6 +16890,7 @@ export declare const changeSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
16889
16890
  alignment?: {
16890
16891
  billablesMustAlign?: boolean | undefined;
16891
16892
  } | undefined;
16893
+ billingAnchor?: Date | undefined;
16892
16894
  startingPhase?: string | undefined;
16893
16895
  }, {
16894
16896
  plan: {
@@ -16902,8 +16904,10 @@ export declare const changeSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
16902
16904
  alignment?: {
16903
16905
  billablesMustAlign?: boolean | undefined;
16904
16906
  } | undefined;
16907
+ billingAnchor?: Date | undefined;
16905
16908
  startingPhase?: string | undefined;
16906
16909
  }>, zod.ZodObject<{
16910
+ billingAnchor: zod.ZodOptional<zod.ZodDate>;
16907
16911
  customPlan: zod.ZodObject<{
16908
16912
  alignment: zod.ZodOptional<zod.ZodObject<{
16909
16913
  billablesMustAlign: zod.ZodOptional<zod.ZodBoolean>;
@@ -18273,6 +18277,7 @@ export declare const changeSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
18273
18277
  billablesMustAlign?: boolean | undefined;
18274
18278
  } | undefined;
18275
18279
  };
18280
+ billingAnchor?: Date | undefined;
18276
18281
  }, {
18277
18282
  timing: Date | "immediate" | "next_billing_cycle";
18278
18283
  customPlan: {
@@ -18421,6 +18426,7 @@ export declare const changeSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
18421
18426
  enabled: boolean;
18422
18427
  } | undefined;
18423
18428
  };
18429
+ billingAnchor?: Date | undefined;
18424
18430
  }>]>;
18425
18431
  /**
18426
18432
  * Migrates the subscripiton to the provided version of the current plan.
@@ -18438,14 +18444,17 @@ export declare const migrateSubscriptionParams: zod.ZodObject<{
18438
18444
  }>;
18439
18445
  export declare const migrateSubscriptionBodyTimingDefault = "immediate";
18440
18446
  export declare const migrateSubscriptionBody: zod.ZodObject<{
18447
+ billingAnchor: zod.ZodOptional<zod.ZodDate>;
18441
18448
  startingPhase: zod.ZodOptional<zod.ZodString>;
18442
18449
  targetVersion: zod.ZodOptional<zod.ZodNumber>;
18443
18450
  timing: zod.ZodDefault<zod.ZodUnion<[zod.ZodEnum<["immediate", "next_billing_cycle"]>, zod.ZodDate]>>;
18444
18451
  }, "strip", zod.ZodTypeAny, {
18445
18452
  timing: Date | "immediate" | "next_billing_cycle";
18453
+ billingAnchor?: Date | undefined;
18446
18454
  startingPhase?: string | undefined;
18447
18455
  targetVersion?: number | undefined;
18448
18456
  }, {
18457
+ billingAnchor?: Date | undefined;
18449
18458
  startingPhase?: string | undefined;
18450
18459
  timing?: Date | "immediate" | "next_billing_cycle" | undefined;
18451
18460
  targetVersion?: number | undefined;