@openmeter/sdk 1.0.0-beta-0d93d499d6c6 → 1.0.0-beta-92144d27163b

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.
@@ -3515,6 +3515,12 @@ export interface components {
3515
3515
  customerId?: string;
3516
3516
  /** @description The key of the customer. Provide either the key or ID. */
3517
3517
  customerKey?: string;
3518
+ /**
3519
+ * Format: date-time
3520
+ * @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 subscription start time will be used.
3521
+ * @example 2023-01-01T01:01:01.001Z
3522
+ */
3523
+ billingAnchor?: Date;
3518
3524
  };
3519
3525
  /**
3520
3526
  * @description A customer object.
@@ -8011,6 +8017,12 @@ export interface components {
8011
8017
  customerId?: string;
8012
8018
  /** @description The key of the customer. Provide either the key or ID. */
8013
8019
  customerKey?: string;
8020
+ /**
8021
+ * Format: date-time
8022
+ * @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 subscription start time will be used.
8023
+ * @example 2023-01-01T01:01:01.001Z
8024
+ */
8025
+ billingAnchor?: Date;
8014
8026
  };
8015
8027
  /** @description A consumer portal token.
8016
8028
  *
@@ -8968,6 +8980,13 @@ export interface components {
8968
8980
  * }
8969
8981
  */
8970
8982
  readonly proRatingConfig?: components['schemas']['ProRatingConfig'];
8983
+ /**
8984
+ * Billing anchor
8985
+ * Format: date-time
8986
+ * @description The normalizedbilling anchor of the subscription.
8987
+ * @example 2023-01-01T01:01:01.001Z
8988
+ */
8989
+ readonly billingAnchor: Date;
8971
8990
  };
8972
8991
  /** @description A subscription add-on, represents concrete instances of an add-on for a given subscription. */
8973
8992
  SubscriptionAddon: {
@@ -9327,6 +9346,13 @@ export interface components {
9327
9346
  * }
9328
9347
  */
9329
9348
  readonly proRatingConfig?: components['schemas']['ProRatingConfig'];
9349
+ /**
9350
+ * Billing anchor
9351
+ * Format: date-time
9352
+ * @description The normalizedbilling anchor of the subscription.
9353
+ * @example 2023-01-01T01:01:01.001Z
9354
+ */
9355
+ readonly billingAnchor: Date;
9330
9356
  /** @description Alignment details enriched with the current billing period. */
9331
9357
  alignment?: components['schemas']['SubscriptionAlignment'];
9332
9358
  /** @description The phases of the subscription. */
@@ -30,6 +30,7 @@ export declare class Subscriptions {
30
30
  currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
31
31
  readonly billingCadence: string;
32
32
  readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
33
+ readonly billingAnchor: Date;
33
34
  }>;
34
35
  /**
35
36
  * Get a subscription
@@ -53,6 +54,7 @@ export declare class Subscriptions {
53
54
  currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
54
55
  readonly billingCadence: string;
55
56
  readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
57
+ readonly billingAnchor: Date;
56
58
  alignment?: import("./schemas.cjs").components["schemas"]["SubscriptionAlignment"];
57
59
  phases: import("./schemas.cjs").components["schemas"]["SubscriptionPhaseExpanded"][];
58
60
  }>;
@@ -80,6 +82,7 @@ export declare class Subscriptions {
80
82
  currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
81
83
  readonly billingCadence: string;
82
84
  readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
85
+ readonly billingAnchor: Date;
83
86
  }>;
84
87
  /**
85
88
  * Cancel a subscription
@@ -105,6 +108,7 @@ export declare class Subscriptions {
105
108
  currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
106
109
  readonly billingCadence: string;
107
110
  readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
111
+ readonly billingAnchor: Date;
108
112
  }>;
109
113
  /**
110
114
  * Change a subscription
@@ -153,6 +157,7 @@ export declare class Subscriptions {
153
157
  currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
154
158
  readonly billingCadence: string;
155
159
  readonly proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
160
+ readonly billingAnchor: Date;
156
161
  }>;
157
162
  /**
158
163
  * Delete subscription
@@ -8843,6 +8843,10 @@ exports.createSubscriptionBody = zod_1.z
8843
8843
  .describe('Alignment configuration for a plan or subscription.')
8844
8844
  .optional()
8845
8845
  .describe('What alignment settings the subscription should have.'),
8846
+ billingAnchor: zod_1.z
8847
+ .date()
8848
+ .optional()
8849
+ .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.'),
8846
8850
  customerId: zod_1.z
8847
8851
  .string()
8848
8852
  .regex(exports.createSubscriptionBodyCustomerIdRegExp)
@@ -8897,6 +8901,10 @@ exports.createSubscriptionBody = zod_1.z
8897
8901
  .describe('Create subscription based on plan.')
8898
8902
  .or(zod_1.z
8899
8903
  .object({
8904
+ billingAnchor: zod_1.z
8905
+ .date()
8906
+ .optional()
8907
+ .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.'),
8900
8908
  customerId: zod_1.z
8901
8909
  .string()
8902
8910
  .regex(exports.createSubscriptionBodyCustomerIdRegExpOne)
@@ -13626,6 +13626,7 @@ export declare const createSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
13626
13626
  }, {
13627
13627
  billablesMustAlign?: boolean | undefined;
13628
13628
  }>>;
13629
+ billingAnchor: zod.ZodOptional<zod.ZodDate>;
13629
13630
  customerId: zod.ZodOptional<zod.ZodString>;
13630
13631
  customerKey: zod.ZodOptional<zod.ZodString>;
13631
13632
  description: zod.ZodOptional<zod.ZodString>;
@@ -13657,6 +13658,7 @@ export declare const createSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
13657
13658
  alignment?: {
13658
13659
  billablesMustAlign?: boolean | undefined;
13659
13660
  } | undefined;
13661
+ billingAnchor?: Date | undefined;
13660
13662
  startingPhase?: string | undefined;
13661
13663
  }, {
13662
13664
  plan: {
@@ -13671,9 +13673,11 @@ export declare const createSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
13671
13673
  alignment?: {
13672
13674
  billablesMustAlign?: boolean | undefined;
13673
13675
  } | undefined;
13676
+ billingAnchor?: Date | undefined;
13674
13677
  startingPhase?: string | undefined;
13675
13678
  timing?: Date | "immediate" | "next_billing_cycle" | undefined;
13676
13679
  }>, zod.ZodObject<{
13680
+ billingAnchor: zod.ZodOptional<zod.ZodDate>;
13677
13681
  customerId: zod.ZodOptional<zod.ZodString>;
13678
13682
  customerKey: zod.ZodOptional<zod.ZodString>;
13679
13683
  customPlan: zod.ZodObject<{
@@ -15047,6 +15051,7 @@ export declare const createSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
15047
15051
  };
15048
15052
  customerId?: string | undefined;
15049
15053
  customerKey?: string | undefined;
15054
+ billingAnchor?: Date | undefined;
15050
15055
  }, {
15051
15056
  customPlan: {
15052
15057
  name: string;
@@ -15196,6 +15201,7 @@ export declare const createSubscriptionBody: zod.ZodUnion<[zod.ZodObject<{
15196
15201
  };
15197
15202
  customerId?: string | undefined;
15198
15203
  customerKey?: string | undefined;
15204
+ billingAnchor?: Date | undefined;
15199
15205
  timing?: Date | "immediate" | "next_billing_cycle" | undefined;
15200
15206
  }>]>;
15201
15207
  /**