autumn-js 1.2.37 → 1.2.39

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.
Files changed (108) hide show
  1. package/dist/backend/adapters/express.js +3330 -2533
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +3330 -2533
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +3330 -2533
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +3330 -2533
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +3330 -2533
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-UWZYM74E.mjs → chunk-5IUIFE55.mjs} +1 -1
  12. package/dist/backend/{chunk-PMD3Z6EM.mjs → chunk-GL2SBEQ5.mjs} +1 -1
  13. package/dist/backend/{chunk-VMYD4IWS.mjs → chunk-KJP3DHPM.mjs} +1 -1
  14. package/dist/backend/{chunk-DR35G6GS.mjs → chunk-KM5AXZWJ.mjs} +4 -4
  15. package/dist/backend/{chunk-QLH3M5PR.mjs → chunk-MSMJS42G.mjs} +3330 -2533
  16. package/dist/backend/{chunk-AFWY6NDJ.mjs → chunk-UMTASWZL.mjs} +1 -1
  17. package/dist/backend/{chunk-AOAGX4AS.mjs → chunk-V32P22RC.mjs} +6 -6
  18. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.js +3330 -2533
  21. package/dist/backend/core/handlers/coreHandler.mjs +6 -6
  22. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  23. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  25. package/dist/backend/core/handlers/handleRouteByName.js +3330 -2533
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
  27. package/dist/backend/core/handlers/index.d.mts +1 -1
  28. package/dist/backend/core/handlers/index.d.ts +1 -1
  29. package/dist/backend/core/handlers/index.js +3330 -2533
  30. package/dist/backend/core/handlers/index.mjs +10 -10
  31. package/dist/backend/core/index.d.mts +1 -1
  32. package/dist/backend/core/index.d.ts +1 -1
  33. package/dist/backend/core/index.js +3330 -2533
  34. package/dist/backend/core/index.mjs +9 -9
  35. package/dist/backend/core/routes/index.d.mts +1 -1
  36. package/dist/backend/core/routes/index.d.ts +1 -1
  37. package/dist/backend/core/routes/index.mjs +1 -1
  38. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  39. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  40. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  41. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  43. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  44. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  45. package/dist/backend/core/types/index.d.mts +1 -1
  46. package/dist/backend/core/types/index.d.ts +1 -1
  47. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  48. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  49. package/dist/backend/core/utils/index.mjs +3 -3
  50. package/dist/backend/index.d.mts +2 -2
  51. package/dist/backend/index.d.ts +2 -2
  52. package/dist/backend/index.js +3330 -2533
  53. package/dist/backend/index.mjs +9 -9
  54. package/dist/backend/{routeTypes-M8hsq6U-.d.mts → routeTypes-CIqS7yVo.d.mts} +1278 -197
  55. package/dist/backend/{routeTypes-B0zHyzyX.d.ts → routeTypes-uWaE8YYa.d.ts} +1278 -197
  56. package/dist/better-auth/{chunk-HCM5WABX.mjs → chunk-LLBM6UQN.mjs} +3330 -2533
  57. package/dist/better-auth/index.js +3330 -2533
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +3330 -2533
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +3330 -2533
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/react/AutumnContext.d.mts +2 -2
  64. package/dist/react/AutumnContext.d.ts +2 -2
  65. package/dist/react/client/AutumnClient.d.mts +2 -2
  66. package/dist/react/client/AutumnClient.d.ts +2 -2
  67. package/dist/react/client/IAutumnClient.d.mts +2 -2
  68. package/dist/react/client/IAutumnClient.d.ts +2 -2
  69. package/dist/react/client/index.d.mts +2 -2
  70. package/dist/react/client/index.d.ts +2 -2
  71. package/dist/react/{customer-D811_jP2.d.ts → customer-CrxRrY4o.d.ts} +99 -24
  72. package/dist/react/{customer-CkuydPCd.d.mts → customer-DM044m1a.d.mts} +99 -24
  73. package/dist/react/hooks/index.d.mts +2 -2
  74. package/dist/react/hooks/index.d.ts +2 -2
  75. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
  76. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
  77. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
  78. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
  79. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
  80. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
  81. package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
  82. package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
  83. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
  84. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
  85. package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
  86. package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
  87. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  88. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  89. package/dist/react/hooks/useCustomer.d.mts +2 -2
  90. package/dist/react/hooks/useCustomer.d.ts +2 -2
  91. package/dist/react/hooks/useEntity.d.mts +1 -1
  92. package/dist/react/hooks/useEntity.d.ts +1 -1
  93. package/dist/react/hooks/useListEvents.d.mts +1 -1
  94. package/dist/react/hooks/useListEvents.d.ts +1 -1
  95. package/dist/react/hooks/useListPlans.d.mts +1 -1
  96. package/dist/react/hooks/useListPlans.d.ts +1 -1
  97. package/dist/react/hooks/useReferrals.d.mts +1 -1
  98. package/dist/react/hooks/useReferrals.d.ts +1 -1
  99. package/dist/react/index.d.mts +2 -2
  100. package/dist/react/index.d.ts +2 -2
  101. package/dist/react/{params-CaUBdt-x.d.ts → params-B-1vi9za.d.ts} +60 -0
  102. package/dist/react/{params-C0cH2cYK.d.mts → params-Bf18ATYi.d.mts} +60 -0
  103. package/dist/sdk/index.d.mts +1447 -183
  104. package/dist/sdk/index.d.ts +1447 -183
  105. package/dist/sdk/index.js +7147 -6084
  106. package/dist/sdk/index.mjs +7021 -6084
  107. package/package.json +1 -1
  108. package/dist/backend/{chunk-MOHYGUMA.mjs → chunk-IXUCY7AU.mjs} +3 -3
@@ -6181,6 +6181,17 @@ declare const CreateEntityLimitTypeResponse: {
6181
6181
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
6182
6182
  */
6183
6183
  type CreateEntityLimitTypeResponse = OpenEnum<typeof CreateEntityLimitTypeResponse>;
6184
+ /**
6185
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6186
+ */
6187
+ declare const CreateEntitySpendLimitSource: {
6188
+ readonly Customer: "customer";
6189
+ readonly Plan: "plan";
6190
+ };
6191
+ /**
6192
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6193
+ */
6194
+ type CreateEntitySpendLimitSource = OpenEnum<typeof CreateEntitySpendLimitSource>;
6184
6195
  type CreateEntitySpendLimitResponse = {
6185
6196
  /**
6186
6197
  * Optional feature ID this spend limit applies to.
@@ -6202,6 +6213,10 @@ type CreateEntitySpendLimitResponse = {
6202
6213
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
6203
6214
  */
6204
6215
  skipOverageBilling?: boolean | undefined;
6216
+ /**
6217
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6218
+ */
6219
+ source?: CreateEntitySpendLimitSource | undefined;
6205
6220
  };
6206
6221
  /**
6207
6222
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -6224,6 +6239,17 @@ type CreateEntityFilterResponse = {
6224
6239
  [k: string]: any;
6225
6240
  };
6226
6241
  };
6242
+ /**
6243
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6244
+ */
6245
+ declare const CreateEntityUsageLimitSource: {
6246
+ readonly Customer: "customer";
6247
+ readonly Plan: "plan";
6248
+ };
6249
+ /**
6250
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6251
+ */
6252
+ type CreateEntityUsageLimitSource = OpenEnum<typeof CreateEntityUsageLimitSource>;
6227
6253
  type CreateEntityUsageLimitResponse = {
6228
6254
  /**
6229
6255
  * The feature this usage limit applies to.
@@ -6249,6 +6275,10 @@ type CreateEntityUsageLimitResponse = {
6249
6275
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
6250
6276
  */
6251
6277
  usage?: number | undefined;
6278
+ /**
6279
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6280
+ */
6281
+ source?: CreateEntityUsageLimitSource | undefined;
6252
6282
  };
6253
6283
  /**
6254
6284
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -6263,6 +6293,17 @@ declare const CreateEntityThresholdTypeResponse: {
6263
6293
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
6264
6294
  */
6265
6295
  type CreateEntityThresholdTypeResponse = OpenEnum<typeof CreateEntityThresholdTypeResponse>;
6296
+ /**
6297
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6298
+ */
6299
+ declare const CreateEntityUsageAlertSource: {
6300
+ readonly Customer: "customer";
6301
+ readonly Plan: "plan";
6302
+ };
6303
+ /**
6304
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6305
+ */
6306
+ type CreateEntityUsageAlertSource = OpenEnum<typeof CreateEntityUsageAlertSource>;
6266
6307
  type CreateEntityUsageAlertResponse = {
6267
6308
  /**
6268
6309
  * The feature ID this alert applies to.
@@ -6284,7 +6325,22 @@ type CreateEntityUsageAlertResponse = {
6284
6325
  * Optional user-defined label to distinguish multiple alerts on the same feature.
6285
6326
  */
6286
6327
  name?: string | undefined;
6328
+ /**
6329
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6330
+ */
6331
+ source?: CreateEntityUsageAlertSource | undefined;
6287
6332
  };
6333
+ /**
6334
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6335
+ */
6336
+ declare const CreateEntityOverageAllowedSource: {
6337
+ readonly Customer: "customer";
6338
+ readonly Plan: "plan";
6339
+ };
6340
+ /**
6341
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6342
+ */
6343
+ type CreateEntityOverageAllowedSource = OpenEnum<typeof CreateEntityOverageAllowedSource>;
6288
6344
  type CreateEntityOverageAllowedResponse = {
6289
6345
  /**
6290
6346
  * The feature ID this overage allowed control applies to.
@@ -6294,6 +6350,10 @@ type CreateEntityOverageAllowedResponse = {
6294
6350
  * Whether overage is allowed for this feature.
6295
6351
  */
6296
6352
  enabled: boolean;
6353
+ /**
6354
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
6355
+ */
6356
+ source?: CreateEntityOverageAllowedSource | undefined;
6297
6357
  };
6298
6358
  /**
6299
6359
  * Billing controls for the entity.
@@ -9444,18 +9504,45 @@ declare const CustomerEnv: {
9444
9504
  * The environment this customer was created in.
9445
9505
  */
9446
9506
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
9507
+ /**
9508
+ * The time interval for the purchase limit window.
9509
+ */
9447
9510
  declare const CustomerPurchaseLimitInterval2: {
9448
9511
  readonly Hour: "hour";
9449
9512
  readonly Day: "day";
9450
9513
  readonly Week: "week";
9451
9514
  readonly Month: "month";
9452
9515
  };
9516
+ /**
9517
+ * The time interval for the purchase limit window.
9518
+ */
9453
9519
  type CustomerPurchaseLimitInterval2 = OpenEnum<typeof CustomerPurchaseLimitInterval2>;
9454
9520
  type CustomerPurchaseLimit2 = {
9521
+ /**
9522
+ * The time interval for the purchase limit window.
9523
+ */
9524
+ interval: CustomerPurchaseLimitInterval2;
9525
+ /**
9526
+ * Number of intervals in the purchase limit window.
9527
+ */
9528
+ intervalCount: number;
9529
+ /**
9530
+ * Maximum number of auto top-ups allowed within the interval.
9531
+ */
9532
+ limit: number;
9533
+ };
9534
+ declare const CustomerPurchaseLimitInterval1: {
9535
+ readonly Hour: "hour";
9536
+ readonly Day: "day";
9537
+ readonly Week: "week";
9538
+ readonly Month: "month";
9539
+ };
9540
+ type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
9541
+ type CustomerPurchaseLimit1 = {
9455
9542
  /**
9456
9543
  * The time interval for the purchase limit window. Null when no purchase limit is configured.
9457
9544
  */
9458
- interval: CustomerPurchaseLimitInterval2 | null;
9545
+ interval: CustomerPurchaseLimitInterval1 | null;
9459
9546
  /**
9460
9547
  * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
9461
9548
  */
@@ -9474,32 +9561,16 @@ type CustomerPurchaseLimit2 = {
9474
9561
  nextResetAt: number;
9475
9562
  };
9476
9563
  /**
9477
- * The time interval for the purchase limit window.
9564
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9478
9565
  */
9479
- declare const CustomerPurchaseLimitInterval1: {
9480
- readonly Hour: "hour";
9481
- readonly Day: "day";
9482
- readonly Week: "week";
9483
- readonly Month: "month";
9566
+ declare const AutoTopupSource: {
9567
+ readonly Customer: "customer";
9568
+ readonly Plan: "plan";
9484
9569
  };
9485
9570
  /**
9486
- * The time interval for the purchase limit window.
9571
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9487
9572
  */
9488
- type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
9489
- type CustomerPurchaseLimit1 = {
9490
- /**
9491
- * The time interval for the purchase limit window.
9492
- */
9493
- interval: CustomerPurchaseLimitInterval1;
9494
- /**
9495
- * Number of intervals in the purchase limit window.
9496
- */
9497
- intervalCount: number;
9498
- /**
9499
- * Maximum number of auto top-ups allowed within the interval.
9500
- */
9501
- limit: number;
9502
- };
9573
+ type AutoTopupSource = OpenEnum<typeof AutoTopupSource>;
9503
9574
  type CustomerAutoTopup = {
9504
9575
  /**
9505
9576
  * The ID of the feature (credit balance) to auto top-up.
@@ -9520,11 +9591,15 @@ type CustomerAutoTopup = {
9520
9591
  /**
9521
9592
  * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
9522
9593
  */
9523
- purchaseLimit?: CustomerPurchaseLimit2 | CustomerPurchaseLimit1 | undefined;
9594
+ purchaseLimit?: CustomerPurchaseLimit1 | CustomerPurchaseLimit2 | undefined;
9524
9595
  /**
9525
9596
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
9526
9597
  */
9527
9598
  invoiceMode?: boolean | undefined;
9599
+ /**
9600
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9601
+ */
9602
+ source?: AutoTopupSource | undefined;
9528
9603
  };
9529
9604
  /**
9530
9605
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
@@ -9537,6 +9612,17 @@ declare const CustomerLimitType: {
9537
9612
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
9538
9613
  */
9539
9614
  type CustomerLimitType = OpenEnum<typeof CustomerLimitType>;
9615
+ /**
9616
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9617
+ */
9618
+ declare const SpendLimitSource: {
9619
+ readonly Customer: "customer";
9620
+ readonly Plan: "plan";
9621
+ };
9622
+ /**
9623
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9624
+ */
9625
+ type SpendLimitSource = OpenEnum<typeof SpendLimitSource>;
9540
9626
  type CustomerSpendLimit = {
9541
9627
  /**
9542
9628
  * Optional feature ID this spend limit applies to.
@@ -9558,6 +9644,10 @@ type CustomerSpendLimit = {
9558
9644
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
9559
9645
  */
9560
9646
  skipOverageBilling?: boolean | undefined;
9647
+ /**
9648
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9649
+ */
9650
+ source?: SpendLimitSource | undefined;
9561
9651
  };
9562
9652
  /**
9563
9653
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -9580,6 +9670,17 @@ type CustomerFilter = {
9580
9670
  [k: string]: any;
9581
9671
  };
9582
9672
  };
9673
+ /**
9674
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9675
+ */
9676
+ declare const UsageLimitSource: {
9677
+ readonly Customer: "customer";
9678
+ readonly Plan: "plan";
9679
+ };
9680
+ /**
9681
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9682
+ */
9683
+ type UsageLimitSource = OpenEnum<typeof UsageLimitSource>;
9583
9684
  type CustomerUsageLimit = {
9584
9685
  /**
9585
9686
  * The feature this usage limit applies to.
@@ -9605,6 +9706,10 @@ type CustomerUsageLimit = {
9605
9706
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
9606
9707
  */
9607
9708
  usage?: number | undefined;
9709
+ /**
9710
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9711
+ */
9712
+ source?: UsageLimitSource | undefined;
9608
9713
  };
9609
9714
  /**
9610
9715
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -9619,6 +9724,17 @@ declare const CustomerThresholdType: {
9619
9724
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
9620
9725
  */
9621
9726
  type CustomerThresholdType = OpenEnum<typeof CustomerThresholdType>;
9727
+ /**
9728
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9729
+ */
9730
+ declare const UsageAlertSource: {
9731
+ readonly Customer: "customer";
9732
+ readonly Plan: "plan";
9733
+ };
9734
+ /**
9735
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9736
+ */
9737
+ type UsageAlertSource = OpenEnum<typeof UsageAlertSource>;
9622
9738
  type CustomerUsageAlert = {
9623
9739
  /**
9624
9740
  * The feature ID this alert applies to.
@@ -9640,7 +9756,22 @@ type CustomerUsageAlert = {
9640
9756
  * Optional user-defined label to distinguish multiple alerts on the same feature.
9641
9757
  */
9642
9758
  name?: string | undefined;
9759
+ /**
9760
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9761
+ */
9762
+ source?: UsageAlertSource | undefined;
9763
+ };
9764
+ /**
9765
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9766
+ */
9767
+ declare const OverageAllowedSource: {
9768
+ readonly Customer: "customer";
9769
+ readonly Plan: "plan";
9643
9770
  };
9771
+ /**
9772
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9773
+ */
9774
+ type OverageAllowedSource = OpenEnum<typeof OverageAllowedSource>;
9644
9775
  type CustomerOverageAllowed = {
9645
9776
  /**
9646
9777
  * The feature ID this overage allowed control applies to.
@@ -9650,6 +9781,10 @@ type CustomerOverageAllowed = {
9650
9781
  * Whether overage is allowed for this feature.
9651
9782
  */
9652
9783
  enabled: boolean;
9784
+ /**
9785
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
9786
+ */
9787
+ source?: OverageAllowedSource | undefined;
9653
9788
  };
9654
9789
  /**
9655
9790
  * Billing controls for the customer (auto top-ups, etc.)
@@ -10425,18 +10560,45 @@ declare const GetCustomerEnv: {
10425
10560
  * The environment this customer was created in.
10426
10561
  */
10427
10562
  type GetCustomerEnv = OpenEnum<typeof GetCustomerEnv>;
10563
+ /**
10564
+ * The time interval for the purchase limit window.
10565
+ */
10428
10566
  declare const GetCustomerPurchaseLimitInterval2: {
10429
10567
  readonly Hour: "hour";
10430
10568
  readonly Day: "day";
10431
10569
  readonly Week: "week";
10432
10570
  readonly Month: "month";
10433
10571
  };
10572
+ /**
10573
+ * The time interval for the purchase limit window.
10574
+ */
10434
10575
  type GetCustomerPurchaseLimitInterval2 = OpenEnum<typeof GetCustomerPurchaseLimitInterval2>;
10435
10576
  type GetCustomerPurchaseLimit2 = {
10577
+ /**
10578
+ * The time interval for the purchase limit window.
10579
+ */
10580
+ interval: GetCustomerPurchaseLimitInterval2;
10581
+ /**
10582
+ * Number of intervals in the purchase limit window.
10583
+ */
10584
+ intervalCount: number;
10585
+ /**
10586
+ * Maximum number of auto top-ups allowed within the interval.
10587
+ */
10588
+ limit: number;
10589
+ };
10590
+ declare const GetCustomerPurchaseLimitInterval1: {
10591
+ readonly Hour: "hour";
10592
+ readonly Day: "day";
10593
+ readonly Week: "week";
10594
+ readonly Month: "month";
10595
+ };
10596
+ type GetCustomerPurchaseLimitInterval1 = OpenEnum<typeof GetCustomerPurchaseLimitInterval1>;
10597
+ type GetCustomerPurchaseLimit1 = {
10436
10598
  /**
10437
10599
  * The time interval for the purchase limit window. Null when no purchase limit is configured.
10438
10600
  */
10439
- interval: GetCustomerPurchaseLimitInterval2 | null;
10601
+ interval: GetCustomerPurchaseLimitInterval1 | null;
10440
10602
  /**
10441
10603
  * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
10442
10604
  */
@@ -10455,32 +10617,16 @@ type GetCustomerPurchaseLimit2 = {
10455
10617
  nextResetAt: number;
10456
10618
  };
10457
10619
  /**
10458
- * The time interval for the purchase limit window.
10620
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10459
10621
  */
10460
- declare const GetCustomerPurchaseLimitInterval1: {
10461
- readonly Hour: "hour";
10462
- readonly Day: "day";
10463
- readonly Week: "week";
10464
- readonly Month: "month";
10622
+ declare const GetCustomerAutoTopupSource: {
10623
+ readonly Customer: "customer";
10624
+ readonly Plan: "plan";
10465
10625
  };
10466
10626
  /**
10467
- * The time interval for the purchase limit window.
10627
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10468
10628
  */
10469
- type GetCustomerPurchaseLimitInterval1 = OpenEnum<typeof GetCustomerPurchaseLimitInterval1>;
10470
- type GetCustomerPurchaseLimit1 = {
10471
- /**
10472
- * The time interval for the purchase limit window.
10473
- */
10474
- interval: GetCustomerPurchaseLimitInterval1;
10475
- /**
10476
- * Number of intervals in the purchase limit window.
10477
- */
10478
- intervalCount: number;
10479
- /**
10480
- * Maximum number of auto top-ups allowed within the interval.
10481
- */
10482
- limit: number;
10483
- };
10629
+ type GetCustomerAutoTopupSource = OpenEnum<typeof GetCustomerAutoTopupSource>;
10484
10630
  type GetCustomerAutoTopup = {
10485
10631
  /**
10486
10632
  * The ID of the feature (credit balance) to auto top-up.
@@ -10501,11 +10647,15 @@ type GetCustomerAutoTopup = {
10501
10647
  /**
10502
10648
  * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
10503
10649
  */
10504
- purchaseLimit?: GetCustomerPurchaseLimit2 | GetCustomerPurchaseLimit1 | undefined;
10650
+ purchaseLimit?: GetCustomerPurchaseLimit1 | GetCustomerPurchaseLimit2 | undefined;
10505
10651
  /**
10506
10652
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
10507
10653
  */
10508
10654
  invoiceMode?: boolean | undefined;
10655
+ /**
10656
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10657
+ */
10658
+ source?: GetCustomerAutoTopupSource | undefined;
10509
10659
  };
10510
10660
  /**
10511
10661
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
@@ -10518,6 +10668,17 @@ declare const GetCustomerLimitType: {
10518
10668
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
10519
10669
  */
10520
10670
  type GetCustomerLimitType = OpenEnum<typeof GetCustomerLimitType>;
10671
+ /**
10672
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10673
+ */
10674
+ declare const GetCustomerSpendLimitSource: {
10675
+ readonly Customer: "customer";
10676
+ readonly Plan: "plan";
10677
+ };
10678
+ /**
10679
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10680
+ */
10681
+ type GetCustomerSpendLimitSource = OpenEnum<typeof GetCustomerSpendLimitSource>;
10521
10682
  type GetCustomerSpendLimit = {
10522
10683
  /**
10523
10684
  * Optional feature ID this spend limit applies to.
@@ -10539,6 +10700,10 @@ type GetCustomerSpendLimit = {
10539
10700
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
10540
10701
  */
10541
10702
  skipOverageBilling?: boolean | undefined;
10703
+ /**
10704
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10705
+ */
10706
+ source?: GetCustomerSpendLimitSource | undefined;
10542
10707
  };
10543
10708
  /**
10544
10709
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -10561,6 +10726,17 @@ type GetCustomerFilter = {
10561
10726
  [k: string]: any;
10562
10727
  };
10563
10728
  };
10729
+ /**
10730
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10731
+ */
10732
+ declare const GetCustomerUsageLimitSource: {
10733
+ readonly Customer: "customer";
10734
+ readonly Plan: "plan";
10735
+ };
10736
+ /**
10737
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10738
+ */
10739
+ type GetCustomerUsageLimitSource = OpenEnum<typeof GetCustomerUsageLimitSource>;
10564
10740
  type GetCustomerUsageLimit = {
10565
10741
  /**
10566
10742
  * The feature this usage limit applies to.
@@ -10586,6 +10762,10 @@ type GetCustomerUsageLimit = {
10586
10762
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
10587
10763
  */
10588
10764
  usage?: number | undefined;
10765
+ /**
10766
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10767
+ */
10768
+ source?: GetCustomerUsageLimitSource | undefined;
10589
10769
  };
10590
10770
  /**
10591
10771
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -10600,6 +10780,17 @@ declare const GetCustomerThresholdType: {
10600
10780
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
10601
10781
  */
10602
10782
  type GetCustomerThresholdType = OpenEnum<typeof GetCustomerThresholdType>;
10783
+ /**
10784
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10785
+ */
10786
+ declare const GetCustomerUsageAlertSource: {
10787
+ readonly Customer: "customer";
10788
+ readonly Plan: "plan";
10789
+ };
10790
+ /**
10791
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10792
+ */
10793
+ type GetCustomerUsageAlertSource = OpenEnum<typeof GetCustomerUsageAlertSource>;
10603
10794
  type GetCustomerUsageAlert = {
10604
10795
  /**
10605
10796
  * The feature ID this alert applies to.
@@ -10621,7 +10812,22 @@ type GetCustomerUsageAlert = {
10621
10812
  * Optional user-defined label to distinguish multiple alerts on the same feature.
10622
10813
  */
10623
10814
  name?: string | undefined;
10815
+ /**
10816
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10817
+ */
10818
+ source?: GetCustomerUsageAlertSource | undefined;
10819
+ };
10820
+ /**
10821
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10822
+ */
10823
+ declare const GetCustomerOverageAllowedSource: {
10824
+ readonly Customer: "customer";
10825
+ readonly Plan: "plan";
10624
10826
  };
10827
+ /**
10828
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10829
+ */
10830
+ type GetCustomerOverageAllowedSource = OpenEnum<typeof GetCustomerOverageAllowedSource>;
10625
10831
  type GetCustomerOverageAllowed = {
10626
10832
  /**
10627
10833
  * The feature ID this overage allowed control applies to.
@@ -10631,6 +10837,10 @@ type GetCustomerOverageAllowed = {
10631
10837
  * Whether overage is allowed for this feature.
10632
10838
  */
10633
10839
  enabled: boolean;
10840
+ /**
10841
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
10842
+ */
10843
+ source?: GetCustomerOverageAllowedSource | undefined;
10634
10844
  };
10635
10845
  /**
10636
10846
  * Billing controls for the customer (auto top-ups, etc.)
@@ -11494,6 +11704,17 @@ declare const GetEntityLimitType: {
11494
11704
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
11495
11705
  */
11496
11706
  type GetEntityLimitType = OpenEnum<typeof GetEntityLimitType>;
11707
+ /**
11708
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11709
+ */
11710
+ declare const GetEntitySpendLimitSource: {
11711
+ readonly Customer: "customer";
11712
+ readonly Plan: "plan";
11713
+ };
11714
+ /**
11715
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11716
+ */
11717
+ type GetEntitySpendLimitSource = OpenEnum<typeof GetEntitySpendLimitSource>;
11497
11718
  type GetEntitySpendLimit = {
11498
11719
  /**
11499
11720
  * Optional feature ID this spend limit applies to.
@@ -11515,6 +11736,10 @@ type GetEntitySpendLimit = {
11515
11736
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
11516
11737
  */
11517
11738
  skipOverageBilling?: boolean | undefined;
11739
+ /**
11740
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11741
+ */
11742
+ source?: GetEntitySpendLimitSource | undefined;
11518
11743
  };
11519
11744
  /**
11520
11745
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -11537,6 +11762,17 @@ type GetEntityFilter = {
11537
11762
  [k: string]: any;
11538
11763
  };
11539
11764
  };
11765
+ /**
11766
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11767
+ */
11768
+ declare const GetEntityUsageLimitSource: {
11769
+ readonly Customer: "customer";
11770
+ readonly Plan: "plan";
11771
+ };
11772
+ /**
11773
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11774
+ */
11775
+ type GetEntityUsageLimitSource = OpenEnum<typeof GetEntityUsageLimitSource>;
11540
11776
  type GetEntityUsageLimit = {
11541
11777
  /**
11542
11778
  * The feature this usage limit applies to.
@@ -11562,6 +11798,10 @@ type GetEntityUsageLimit = {
11562
11798
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
11563
11799
  */
11564
11800
  usage?: number | undefined;
11801
+ /**
11802
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11803
+ */
11804
+ source?: GetEntityUsageLimitSource | undefined;
11565
11805
  };
11566
11806
  /**
11567
11807
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -11576,6 +11816,17 @@ declare const GetEntityThresholdType: {
11576
11816
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
11577
11817
  */
11578
11818
  type GetEntityThresholdType = OpenEnum<typeof GetEntityThresholdType>;
11819
+ /**
11820
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11821
+ */
11822
+ declare const GetEntityUsageAlertSource: {
11823
+ readonly Customer: "customer";
11824
+ readonly Plan: "plan";
11825
+ };
11826
+ /**
11827
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11828
+ */
11829
+ type GetEntityUsageAlertSource = OpenEnum<typeof GetEntityUsageAlertSource>;
11579
11830
  type GetEntityUsageAlert = {
11580
11831
  /**
11581
11832
  * The feature ID this alert applies to.
@@ -11597,7 +11848,22 @@ type GetEntityUsageAlert = {
11597
11848
  * Optional user-defined label to distinguish multiple alerts on the same feature.
11598
11849
  */
11599
11850
  name?: string | undefined;
11851
+ /**
11852
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11853
+ */
11854
+ source?: GetEntityUsageAlertSource | undefined;
11855
+ };
11856
+ /**
11857
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11858
+ */
11859
+ declare const GetEntityOverageAllowedSource: {
11860
+ readonly Customer: "customer";
11861
+ readonly Plan: "plan";
11600
11862
  };
11863
+ /**
11864
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11865
+ */
11866
+ type GetEntityOverageAllowedSource = OpenEnum<typeof GetEntityOverageAllowedSource>;
11601
11867
  type GetEntityOverageAllowed = {
11602
11868
  /**
11603
11869
  * The feature ID this overage allowed control applies to.
@@ -11607,6 +11873,10 @@ type GetEntityOverageAllowed = {
11607
11873
  * Whether overage is allowed for this feature.
11608
11874
  */
11609
11875
  enabled: boolean;
11876
+ /**
11877
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
11878
+ */
11879
+ source?: GetEntityOverageAllowedSource | undefined;
11610
11880
  };
11611
11881
  /**
11612
11882
  * Billing controls for the entity.
@@ -13524,18 +13794,45 @@ declare const ListCustomersEnv: {
13524
13794
  * The environment this customer was created in.
13525
13795
  */
13526
13796
  type ListCustomersEnv = OpenEnum<typeof ListCustomersEnv>;
13797
+ /**
13798
+ * The time interval for the purchase limit window.
13799
+ */
13527
13800
  declare const ListCustomersPurchaseLimitInterval2: {
13528
13801
  readonly Hour: "hour";
13529
13802
  readonly Day: "day";
13530
13803
  readonly Week: "week";
13531
13804
  readonly Month: "month";
13532
13805
  };
13806
+ /**
13807
+ * The time interval for the purchase limit window.
13808
+ */
13533
13809
  type ListCustomersPurchaseLimitInterval2 = OpenEnum<typeof ListCustomersPurchaseLimitInterval2>;
13534
13810
  type ListCustomersPurchaseLimit2 = {
13811
+ /**
13812
+ * The time interval for the purchase limit window.
13813
+ */
13814
+ interval: ListCustomersPurchaseLimitInterval2;
13815
+ /**
13816
+ * Number of intervals in the purchase limit window.
13817
+ */
13818
+ intervalCount: number;
13819
+ /**
13820
+ * Maximum number of auto top-ups allowed within the interval.
13821
+ */
13822
+ limit: number;
13823
+ };
13824
+ declare const ListCustomersPurchaseLimitInterval1: {
13825
+ readonly Hour: "hour";
13826
+ readonly Day: "day";
13827
+ readonly Week: "week";
13828
+ readonly Month: "month";
13829
+ };
13830
+ type ListCustomersPurchaseLimitInterval1 = OpenEnum<typeof ListCustomersPurchaseLimitInterval1>;
13831
+ type ListCustomersPurchaseLimit1 = {
13535
13832
  /**
13536
13833
  * The time interval for the purchase limit window. Null when no purchase limit is configured.
13537
13834
  */
13538
- interval: ListCustomersPurchaseLimitInterval2 | null;
13835
+ interval: ListCustomersPurchaseLimitInterval1 | null;
13539
13836
  /**
13540
13837
  * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
13541
13838
  */
@@ -13554,32 +13851,16 @@ type ListCustomersPurchaseLimit2 = {
13554
13851
  nextResetAt: number;
13555
13852
  };
13556
13853
  /**
13557
- * The time interval for the purchase limit window.
13854
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13558
13855
  */
13559
- declare const ListCustomersPurchaseLimitInterval1: {
13560
- readonly Hour: "hour";
13561
- readonly Day: "day";
13562
- readonly Week: "week";
13563
- readonly Month: "month";
13856
+ declare const ListCustomersAutoTopupSource: {
13857
+ readonly Customer: "customer";
13858
+ readonly Plan: "plan";
13564
13859
  };
13565
13860
  /**
13566
- * The time interval for the purchase limit window.
13861
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13567
13862
  */
13568
- type ListCustomersPurchaseLimitInterval1 = OpenEnum<typeof ListCustomersPurchaseLimitInterval1>;
13569
- type ListCustomersPurchaseLimit1 = {
13570
- /**
13571
- * The time interval for the purchase limit window.
13572
- */
13573
- interval: ListCustomersPurchaseLimitInterval1;
13574
- /**
13575
- * Number of intervals in the purchase limit window.
13576
- */
13577
- intervalCount: number;
13578
- /**
13579
- * Maximum number of auto top-ups allowed within the interval.
13580
- */
13581
- limit: number;
13582
- };
13863
+ type ListCustomersAutoTopupSource = OpenEnum<typeof ListCustomersAutoTopupSource>;
13583
13864
  type ListCustomersAutoTopup = {
13584
13865
  /**
13585
13866
  * The ID of the feature (credit balance) to auto top-up.
@@ -13600,11 +13881,15 @@ type ListCustomersAutoTopup = {
13600
13881
  /**
13601
13882
  * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
13602
13883
  */
13603
- purchaseLimit?: ListCustomersPurchaseLimit2 | ListCustomersPurchaseLimit1 | undefined;
13884
+ purchaseLimit?: ListCustomersPurchaseLimit1 | ListCustomersPurchaseLimit2 | undefined;
13604
13885
  /**
13605
13886
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
13606
13887
  */
13607
13888
  invoiceMode?: boolean | undefined;
13889
+ /**
13890
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13891
+ */
13892
+ source?: ListCustomersAutoTopupSource | undefined;
13608
13893
  };
13609
13894
  /**
13610
13895
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
@@ -13617,6 +13902,17 @@ declare const ListCustomersLimitType: {
13617
13902
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
13618
13903
  */
13619
13904
  type ListCustomersLimitType = OpenEnum<typeof ListCustomersLimitType>;
13905
+ /**
13906
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13907
+ */
13908
+ declare const ListCustomersSpendLimitSource: {
13909
+ readonly Customer: "customer";
13910
+ readonly Plan: "plan";
13911
+ };
13912
+ /**
13913
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13914
+ */
13915
+ type ListCustomersSpendLimitSource = OpenEnum<typeof ListCustomersSpendLimitSource>;
13620
13916
  type ListCustomersSpendLimit = {
13621
13917
  /**
13622
13918
  * Optional feature ID this spend limit applies to.
@@ -13638,6 +13934,10 @@ type ListCustomersSpendLimit = {
13638
13934
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
13639
13935
  */
13640
13936
  skipOverageBilling?: boolean | undefined;
13937
+ /**
13938
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13939
+ */
13940
+ source?: ListCustomersSpendLimitSource | undefined;
13641
13941
  };
13642
13942
  /**
13643
13943
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -13660,6 +13960,17 @@ type ListCustomersFilter = {
13660
13960
  [k: string]: any;
13661
13961
  };
13662
13962
  };
13963
+ /**
13964
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13965
+ */
13966
+ declare const ListCustomersUsageLimitSource: {
13967
+ readonly Customer: "customer";
13968
+ readonly Plan: "plan";
13969
+ };
13970
+ /**
13971
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
13972
+ */
13973
+ type ListCustomersUsageLimitSource = OpenEnum<typeof ListCustomersUsageLimitSource>;
13663
13974
  type ListCustomersUsageLimit = {
13664
13975
  /**
13665
13976
  * The feature this usage limit applies to.
@@ -13685,6 +13996,10 @@ type ListCustomersUsageLimit = {
13685
13996
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
13686
13997
  */
13687
13998
  usage?: number | undefined;
13999
+ /**
14000
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14001
+ */
14002
+ source?: ListCustomersUsageLimitSource | undefined;
13688
14003
  };
13689
14004
  /**
13690
14005
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -13699,6 +14014,17 @@ declare const ListCustomersThresholdType: {
13699
14014
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
13700
14015
  */
13701
14016
  type ListCustomersThresholdType = OpenEnum<typeof ListCustomersThresholdType>;
14017
+ /**
14018
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14019
+ */
14020
+ declare const ListCustomersUsageAlertSource: {
14021
+ readonly Customer: "customer";
14022
+ readonly Plan: "plan";
14023
+ };
14024
+ /**
14025
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14026
+ */
14027
+ type ListCustomersUsageAlertSource = OpenEnum<typeof ListCustomersUsageAlertSource>;
13702
14028
  type ListCustomersUsageAlert = {
13703
14029
  /**
13704
14030
  * The feature ID this alert applies to.
@@ -13720,7 +14046,22 @@ type ListCustomersUsageAlert = {
13720
14046
  * Optional user-defined label to distinguish multiple alerts on the same feature.
13721
14047
  */
13722
14048
  name?: string | undefined;
14049
+ /**
14050
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14051
+ */
14052
+ source?: ListCustomersUsageAlertSource | undefined;
14053
+ };
14054
+ /**
14055
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14056
+ */
14057
+ declare const ListCustomersOverageAllowedSource: {
14058
+ readonly Customer: "customer";
14059
+ readonly Plan: "plan";
13723
14060
  };
14061
+ /**
14062
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14063
+ */
14064
+ type ListCustomersOverageAllowedSource = OpenEnum<typeof ListCustomersOverageAllowedSource>;
13724
14065
  type ListCustomersOverageAllowed = {
13725
14066
  /**
13726
14067
  * The feature ID this overage allowed control applies to.
@@ -13730,6 +14071,10 @@ type ListCustomersOverageAllowed = {
13730
14071
  * Whether overage is allowed for this feature.
13731
14072
  */
13732
14073
  enabled: boolean;
14074
+ /**
14075
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14076
+ */
14077
+ source?: ListCustomersOverageAllowedSource | undefined;
13733
14078
  };
13734
14079
  /**
13735
14080
  * Billing controls for the customer (auto top-ups, etc.)
@@ -14444,6 +14789,17 @@ declare const ListEntitiesLimitType: {
14444
14789
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
14445
14790
  */
14446
14791
  type ListEntitiesLimitType = OpenEnum<typeof ListEntitiesLimitType>;
14792
+ /**
14793
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14794
+ */
14795
+ declare const ListEntitiesSpendLimitSource: {
14796
+ readonly Customer: "customer";
14797
+ readonly Plan: "plan";
14798
+ };
14799
+ /**
14800
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14801
+ */
14802
+ type ListEntitiesSpendLimitSource = OpenEnum<typeof ListEntitiesSpendLimitSource>;
14447
14803
  type ListEntitiesSpendLimit = {
14448
14804
  /**
14449
14805
  * Optional feature ID this spend limit applies to.
@@ -14465,6 +14821,10 @@ type ListEntitiesSpendLimit = {
14465
14821
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
14466
14822
  */
14467
14823
  skipOverageBilling?: boolean | undefined;
14824
+ /**
14825
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14826
+ */
14827
+ source?: ListEntitiesSpendLimitSource | undefined;
14468
14828
  };
14469
14829
  /**
14470
14830
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -14487,6 +14847,17 @@ type ListEntitiesFilter = {
14487
14847
  [k: string]: any;
14488
14848
  };
14489
14849
  };
14850
+ /**
14851
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14852
+ */
14853
+ declare const ListEntitiesUsageLimitSource: {
14854
+ readonly Customer: "customer";
14855
+ readonly Plan: "plan";
14856
+ };
14857
+ /**
14858
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14859
+ */
14860
+ type ListEntitiesUsageLimitSource = OpenEnum<typeof ListEntitiesUsageLimitSource>;
14490
14861
  type ListEntitiesUsageLimit = {
14491
14862
  /**
14492
14863
  * The feature this usage limit applies to.
@@ -14512,6 +14883,10 @@ type ListEntitiesUsageLimit = {
14512
14883
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
14513
14884
  */
14514
14885
  usage?: number | undefined;
14886
+ /**
14887
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14888
+ */
14889
+ source?: ListEntitiesUsageLimitSource | undefined;
14515
14890
  };
14516
14891
  /**
14517
14892
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -14526,6 +14901,17 @@ declare const ListEntitiesThresholdType: {
14526
14901
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
14527
14902
  */
14528
14903
  type ListEntitiesThresholdType = OpenEnum<typeof ListEntitiesThresholdType>;
14904
+ /**
14905
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14906
+ */
14907
+ declare const ListEntitiesUsageAlertSource: {
14908
+ readonly Customer: "customer";
14909
+ readonly Plan: "plan";
14910
+ };
14911
+ /**
14912
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14913
+ */
14914
+ type ListEntitiesUsageAlertSource = OpenEnum<typeof ListEntitiesUsageAlertSource>;
14529
14915
  type ListEntitiesUsageAlert = {
14530
14916
  /**
14531
14917
  * The feature ID this alert applies to.
@@ -14547,7 +14933,22 @@ type ListEntitiesUsageAlert = {
14547
14933
  * Optional user-defined label to distinguish multiple alerts on the same feature.
14548
14934
  */
14549
14935
  name?: string | undefined;
14936
+ /**
14937
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14938
+ */
14939
+ source?: ListEntitiesUsageAlertSource | undefined;
14940
+ };
14941
+ /**
14942
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14943
+ */
14944
+ declare const ListEntitiesOverageAllowedSource: {
14945
+ readonly Customer: "customer";
14946
+ readonly Plan: "plan";
14550
14947
  };
14948
+ /**
14949
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14950
+ */
14951
+ type ListEntitiesOverageAllowedSource = OpenEnum<typeof ListEntitiesOverageAllowedSource>;
14551
14952
  type ListEntitiesOverageAllowed = {
14552
14953
  /**
14553
14954
  * The feature ID this overage allowed control applies to.
@@ -14557,6 +14958,10 @@ type ListEntitiesOverageAllowed = {
14557
14958
  * Whether overage is allowed for this feature.
14558
14959
  */
14559
14960
  enabled: boolean;
14961
+ /**
14962
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
14963
+ */
14964
+ source?: ListEntitiesOverageAllowedSource | undefined;
14560
14965
  };
14561
14966
  /**
14562
14967
  * Billing controls for the entity.
@@ -17057,6 +17462,142 @@ type MultiAttachResponse = {
17057
17462
  requiredAction?: MultiAttachRequiredAction | undefined;
17058
17463
  };
17059
17464
 
17465
+ /**
17466
+ * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
17467
+ */
17468
+ declare const MultiUpdateCancelAction: {
17469
+ readonly CancelImmediately: "cancel_immediately";
17470
+ readonly CancelEndOfCycle: "cancel_end_of_cycle";
17471
+ readonly Uncancel: "uncancel";
17472
+ };
17473
+ /**
17474
+ * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
17475
+ */
17476
+ type MultiUpdateCancelAction = ClosedEnum<typeof MultiUpdateCancelAction>;
17477
+ /**
17478
+ * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
17479
+ */
17480
+ declare const MultiUpdateProrationBehavior: {
17481
+ readonly ProrateImmediately: "prorate_immediately";
17482
+ readonly None: "none";
17483
+ };
17484
+ /**
17485
+ * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
17486
+ */
17487
+ type MultiUpdateProrationBehavior = ClosedEnum<typeof MultiUpdateProrationBehavior>;
17488
+ type MultiUpdateUpdate = {
17489
+ /**
17490
+ * The ID of the plan to update. Optional if subscription_id is provided.
17491
+ */
17492
+ planId?: string | undefined;
17493
+ /**
17494
+ * A unique ID to identify the subscription to update. Useful when a customer has multiple products with the same plan.
17495
+ */
17496
+ subscriptionId?: string | undefined;
17497
+ /**
17498
+ * The ID of the entity this update targets. Overrides the top-level entity_id for this update.
17499
+ */
17500
+ entityId?: string | undefined;
17501
+ /**
17502
+ * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
17503
+ */
17504
+ cancelAction: MultiUpdateCancelAction;
17505
+ /**
17506
+ * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
17507
+ */
17508
+ prorationBehavior?: MultiUpdateProrationBehavior | undefined;
17509
+ };
17510
+ type MultiUpdateParams = {
17511
+ /**
17512
+ * The ID of the customer to update plans for.
17513
+ */
17514
+ customerId: string;
17515
+ /**
17516
+ * The ID of the entity to update plans for. Individual updates can override this with their own entity_id.
17517
+ */
17518
+ entityId?: string | undefined;
17519
+ /**
17520
+ * The list of plan updates to apply to the customer.
17521
+ */
17522
+ updates: Array<MultiUpdateUpdate>;
17523
+ };
17524
+ /**
17525
+ * Invoice details if an invoice was created. Only present when a charge was made.
17526
+ */
17527
+ type MultiUpdateInvoice = {
17528
+ /**
17529
+ * The status of the invoice (e.g., 'paid', 'open', 'draft').
17530
+ */
17531
+ status: string | null;
17532
+ /**
17533
+ * The Stripe invoice ID.
17534
+ */
17535
+ stripeId: string;
17536
+ /**
17537
+ * The total amount of the invoice in cents.
17538
+ */
17539
+ total: number;
17540
+ /**
17541
+ * The three-letter ISO currency code (e.g., 'usd').
17542
+ */
17543
+ currency: string;
17544
+ /**
17545
+ * URL to the hosted invoice page where the customer can view and pay the invoice.
17546
+ */
17547
+ hostedInvoiceUrl: string | null;
17548
+ };
17549
+ /**
17550
+ * The type of action required to complete the payment.
17551
+ */
17552
+ declare const MultiUpdateCode: {
17553
+ readonly ThreedsRequired: "3ds_required";
17554
+ readonly PaymentMethodRequired: "payment_method_required";
17555
+ readonly PaymentFailed: "payment_failed";
17556
+ readonly PaymentProcessing: "payment_processing";
17557
+ };
17558
+ /**
17559
+ * The type of action required to complete the payment.
17560
+ */
17561
+ type MultiUpdateCode = OpenEnum<typeof MultiUpdateCode>;
17562
+ /**
17563
+ * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
17564
+ */
17565
+ type MultiUpdateRequiredAction = {
17566
+ /**
17567
+ * The type of action required to complete the payment.
17568
+ */
17569
+ code: MultiUpdateCode;
17570
+ /**
17571
+ * A human-readable explanation of why this action is required.
17572
+ */
17573
+ reason: string;
17574
+ };
17575
+ /**
17576
+ * OK
17577
+ */
17578
+ type MultiUpdateResponse = {
17579
+ /**
17580
+ * The ID of the customer.
17581
+ */
17582
+ customerId: string;
17583
+ /**
17584
+ * The ID of the entity, if the plan was attached to an entity.
17585
+ */
17586
+ entityId?: string | undefined;
17587
+ /**
17588
+ * Invoice details if an invoice was created. Only present when a charge was made.
17589
+ */
17590
+ invoice?: MultiUpdateInvoice | undefined;
17591
+ /**
17592
+ * URL to redirect the customer to complete payment. Null if no payment action is required.
17593
+ */
17594
+ paymentUrl: string | null;
17595
+ /**
17596
+ * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
17597
+ */
17598
+ requiredAction?: MultiUpdateRequiredAction | undefined;
17599
+ };
17600
+
17060
17601
  type OpenCustomerPortalParams = {
17061
17602
  /**
17062
17603
  * The ID of the customer to open the billing portal for.
@@ -19019,22 +19560,426 @@ type PreviewMultiAttachParams = {
19019
19560
  /**
19020
19561
  * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
19021
19562
  */
19022
- redirectMode?: PreviewMultiAttachRedirectMode | undefined;
19563
+ redirectMode?: PreviewMultiAttachRedirectMode | undefined;
19564
+ /**
19565
+ * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
19566
+ */
19567
+ newBillingSubscription?: boolean | undefined;
19568
+ /**
19569
+ * If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.
19570
+ */
19571
+ enablePlanImmediately?: boolean | undefined;
19572
+ /**
19573
+ * Customer details to set when creating a customer
19574
+ */
19575
+ customerData?: CustomerData | undefined;
19576
+ entityData?: PreviewMultiAttachEntityData | undefined;
19577
+ };
19578
+ type PreviewMultiAttachDiscount = {
19579
+ amountOff: number;
19580
+ percentOff?: number | undefined;
19581
+ rewardId?: string | undefined;
19582
+ rewardName?: string | undefined;
19583
+ };
19584
+ /**
19585
+ * The period of time that this line item is being charged for.
19586
+ */
19587
+ type PreviewMultiAttachLineItemPeriod = {
19588
+ /**
19589
+ * The start of the period in milliseconds since the Unix epoch.
19590
+ */
19591
+ start: number;
19592
+ /**
19593
+ * The end of the period in milliseconds since the Unix epoch.
19594
+ */
19595
+ end: number;
19596
+ };
19597
+ type PreviewMultiAttachLineItem = {
19598
+ /**
19599
+ * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
19600
+ */
19601
+ displayName: string;
19602
+ /**
19603
+ * A detailed description of the line item.
19604
+ */
19605
+ description: string;
19606
+ /**
19607
+ * The amount in cents before discounts and tax for this line item.
19608
+ */
19609
+ subtotal: number;
19610
+ /**
19611
+ * The final amount in cents after discounts and tax for this line item.
19612
+ */
19613
+ total: number;
19614
+ /**
19615
+ * List of discounts applied to this line item.
19616
+ */
19617
+ discounts?: Array<PreviewMultiAttachDiscount> | undefined;
19618
+ /**
19619
+ * The ID of the plan that this line item belongs to.
19620
+ */
19621
+ planId: string;
19622
+ /**
19623
+ * The ID of the feature that this line item belongs to.
19624
+ */
19625
+ featureId: string | null;
19626
+ /**
19627
+ * The period of time that this line item is being charged for.
19628
+ */
19629
+ period?: PreviewMultiAttachLineItemPeriod | undefined;
19630
+ /**
19631
+ * The quantity of the line item.
19632
+ */
19633
+ quantity: number;
19634
+ };
19635
+ type PreviewMultiAttachNextCycleDiscount = {
19636
+ amountOff: number;
19637
+ percentOff?: number | undefined;
19638
+ rewardId?: string | undefined;
19639
+ rewardName?: string | undefined;
19640
+ };
19641
+ /**
19642
+ * The period of time that this line item is being charged for.
19643
+ */
19644
+ type PreviewMultiAttachNextCycleLineItemPeriod = {
19645
+ /**
19646
+ * The start of the period in milliseconds since the Unix epoch.
19647
+ */
19648
+ start: number;
19649
+ /**
19650
+ * The end of the period in milliseconds since the Unix epoch.
19651
+ */
19652
+ end: number;
19653
+ };
19654
+ type PreviewMultiAttachNextCycleLineItem = {
19655
+ /**
19656
+ * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
19657
+ */
19658
+ displayName: string;
19659
+ /**
19660
+ * A detailed description of the line item.
19661
+ */
19662
+ description: string;
19663
+ /**
19664
+ * The amount in cents before discounts and tax for this line item.
19665
+ */
19666
+ subtotal: number;
19667
+ /**
19668
+ * The final amount in cents after discounts and tax for this line item.
19669
+ */
19670
+ total: number;
19671
+ /**
19672
+ * List of discounts applied to this line item.
19673
+ */
19674
+ discounts?: Array<PreviewMultiAttachNextCycleDiscount> | undefined;
19675
+ /**
19676
+ * The ID of the plan that this line item belongs to.
19677
+ */
19678
+ planId: string;
19679
+ /**
19680
+ * The ID of the feature that this line item belongs to.
19681
+ */
19682
+ featureId: string | null;
19683
+ /**
19684
+ * The period of time that this line item is being charged for.
19685
+ */
19686
+ period?: PreviewMultiAttachNextCycleLineItemPeriod | undefined;
19687
+ /**
19688
+ * The quantity of the line item.
19689
+ */
19690
+ quantity: number;
19691
+ };
19692
+ /**
19693
+ * The period of time that this line item is being charged for.
19694
+ */
19695
+ type PreviewMultiAttachUsageLineItemPeriod = {
19696
+ /**
19697
+ * The start of the period in milliseconds since the Unix epoch.
19698
+ */
19699
+ start: number;
19700
+ /**
19701
+ * The end of the period in milliseconds since the Unix epoch.
19702
+ */
19703
+ end: number;
19704
+ };
19705
+ type PreviewMultiAttachUsageLineItem = {
19706
+ /**
19707
+ * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
19708
+ */
19709
+ displayName: string;
19710
+ /**
19711
+ * The ID of the plan that this line item belongs to.
19712
+ */
19713
+ planId: string;
19714
+ /**
19715
+ * The ID of the feature that this line item belongs to.
19716
+ */
19717
+ featureId: string | null;
19718
+ /**
19719
+ * The period of time that this line item is being charged for.
19720
+ */
19721
+ period?: PreviewMultiAttachUsageLineItemPeriod | undefined;
19722
+ };
19723
+ /**
19724
+ * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
19725
+ */
19726
+ type PreviewMultiAttachNextCycle = {
19727
+ /**
19728
+ * Unix timestamp (milliseconds) when the next billing cycle starts.
19729
+ */
19730
+ startsAt: number;
19731
+ /**
19732
+ * The total amount in cents before discounts and tax for the next cycle.
19733
+ */
19734
+ subtotal: number;
19735
+ /**
19736
+ * The final amount in cents after discounts and tax for the next cycle.
19737
+ */
19738
+ total: number;
19739
+ /**
19740
+ * List of line items for the next billing cycle.
19741
+ */
19742
+ lineItems: Array<PreviewMultiAttachNextCycleLineItem>;
19743
+ /**
19744
+ * List of line items for usage-based features in the next cycle.
19745
+ */
19746
+ usageLineItems: Array<PreviewMultiAttachUsageLineItem>;
19747
+ };
19748
+ type PreviewMultiAttachIncomingFeatureQuantity = {
19749
+ /**
19750
+ * The ID of the adjustable feature included in this change.
19751
+ */
19752
+ featureId: string;
19753
+ /**
19754
+ * The quantity that will apply for this feature in the change.
19755
+ */
19756
+ quantity: number;
19757
+ };
19758
+ type PreviewMultiAttachIncoming = {
19759
+ /**
19760
+ * The ID of the plan affected by this preview change.
19761
+ */
19762
+ planId: string;
19763
+ plan?: Plan | undefined;
19764
+ /**
19765
+ * The feature quantity selections associated with this plan change.
19766
+ */
19767
+ featureQuantities: Array<PreviewMultiAttachIncomingFeatureQuantity>;
19768
+ /**
19769
+ * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
19770
+ */
19771
+ effectiveAt: number | null;
19772
+ /**
19773
+ * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
19774
+ */
19775
+ canceledAt: number | null;
19776
+ /**
19777
+ * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
19778
+ */
19779
+ expiresAt: number | null;
19780
+ };
19781
+ type PreviewMultiAttachOutgoingFeatureQuantity = {
19782
+ /**
19783
+ * The ID of the adjustable feature included in this change.
19784
+ */
19785
+ featureId: string;
19786
+ /**
19787
+ * The quantity that will apply for this feature in the change.
19788
+ */
19789
+ quantity: number;
19790
+ };
19791
+ type PreviewMultiAttachOutgoing = {
19792
+ /**
19793
+ * The ID of the plan affected by this preview change.
19794
+ */
19795
+ planId: string;
19796
+ plan?: Plan | undefined;
19797
+ /**
19798
+ * The feature quantity selections associated with this plan change.
19799
+ */
19800
+ featureQuantities: Array<PreviewMultiAttachOutgoingFeatureQuantity>;
19801
+ /**
19802
+ * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
19803
+ */
19804
+ effectiveAt: number | null;
19805
+ /**
19806
+ * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
19807
+ */
19808
+ canceledAt: number | null;
19809
+ /**
19810
+ * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
19811
+ */
19812
+ expiresAt: number | null;
19813
+ };
19814
+ declare const PreviewMultiAttachCheckoutType: {
19815
+ readonly StripeCheckout: "stripe_checkout";
19816
+ readonly AutumnCheckout: "autumn_checkout";
19817
+ };
19818
+ type PreviewMultiAttachCheckoutType = OpenEnum<typeof PreviewMultiAttachCheckoutType>;
19819
+ /**
19820
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
19821
+ */
19822
+ declare const PreviewMultiAttachStatus: {
19823
+ readonly Complete: "complete";
19824
+ readonly Incomplete: "incomplete";
19825
+ };
19826
+ /**
19827
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
19828
+ */
19829
+ type PreviewMultiAttachStatus = OpenEnum<typeof PreviewMultiAttachStatus>;
19830
+ /**
19831
+ * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
19832
+ */
19833
+ type PreviewMultiAttachTax = {
19834
+ /**
19835
+ * Total tax amount in major currency units.
19836
+ */
19837
+ total: number;
19838
+ /**
19839
+ * Tax included in line item subtotals.
19840
+ */
19841
+ amountInclusive: number;
19842
+ /**
19843
+ * Tax added on top of subtotals.
19844
+ */
19845
+ amountExclusive: number;
19846
+ /**
19847
+ * Three-letter currency code.
19848
+ */
19849
+ currency: string;
19850
+ /**
19851
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
19852
+ */
19853
+ status: PreviewMultiAttachStatus;
19854
+ };
19855
+ /**
19856
+ * Stripe customer invoice credits preview.
19857
+ */
19858
+ type PreviewMultiAttachInvoiceCredits = {
19859
+ /**
19860
+ * Stripe customer credit balance available, expressed as a positive number in major currency units.
19861
+ */
19862
+ balance: number;
19863
+ /**
19864
+ * Three-letter currency code.
19865
+ */
19866
+ currency: string;
19867
+ };
19868
+ /**
19869
+ * OK
19870
+ */
19871
+ type PreviewMultiAttachResponse = {
19872
+ /**
19873
+ * The ID of the customer.
19874
+ */
19875
+ customerId: string;
19876
+ lineItems: Array<PreviewMultiAttachLineItem>;
19877
+ /**
19878
+ * The total amount in cents before discounts and tax for the current billing period.
19879
+ */
19880
+ subtotal: number;
19881
+ /**
19882
+ * The final amount in cents after discounts and tax for the current billing period.
19883
+ */
19884
+ total: number;
19885
+ /**
19886
+ * The three-letter ISO currency code (e.g., 'usd').
19887
+ */
19888
+ currency: string;
19889
+ /**
19890
+ * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
19891
+ */
19892
+ nextCycle?: PreviewMultiAttachNextCycle | undefined;
19893
+ /**
19894
+ * Expand the response with additional data.
19895
+ */
19896
+ expand?: Array<string> | undefined;
19897
+ /**
19898
+ * Products or subscription changes being added or updated.
19899
+ */
19900
+ incoming: Array<PreviewMultiAttachIncoming>;
19901
+ /**
19902
+ * Products or subscription changes being removed or ended.
19903
+ */
19904
+ outgoing: Array<PreviewMultiAttachOutgoing>;
19905
+ /**
19906
+ * Whether the customer will be redirected to a checkout page if attach is called.
19907
+ */
19908
+ redirectToCheckout: boolean;
19909
+ /**
19910
+ * The type of checkout that will be used if the customer is redirected to a checkout page.
19911
+ */
19912
+ checkoutType: PreviewMultiAttachCheckoutType | null;
19913
+ /**
19914
+ * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
19915
+ */
19916
+ tax?: PreviewMultiAttachTax | undefined;
19917
+ /**
19918
+ * Stripe customer invoice credits preview.
19919
+ */
19920
+ invoiceCredits?: PreviewMultiAttachInvoiceCredits | undefined;
19921
+ };
19922
+
19923
+ /**
19924
+ * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
19925
+ */
19926
+ declare const PreviewMultiUpdateCancelAction: {
19927
+ readonly CancelImmediately: "cancel_immediately";
19928
+ readonly CancelEndOfCycle: "cancel_end_of_cycle";
19929
+ readonly Uncancel: "uncancel";
19930
+ };
19931
+ /**
19932
+ * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
19933
+ */
19934
+ type PreviewMultiUpdateCancelAction = ClosedEnum<typeof PreviewMultiUpdateCancelAction>;
19935
+ /**
19936
+ * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
19937
+ */
19938
+ declare const PreviewMultiUpdateProrationBehavior: {
19939
+ readonly ProrateImmediately: "prorate_immediately";
19940
+ readonly None: "none";
19941
+ };
19942
+ /**
19943
+ * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
19944
+ */
19945
+ type PreviewMultiUpdateProrationBehavior = ClosedEnum<typeof PreviewMultiUpdateProrationBehavior>;
19946
+ type PreviewMultiUpdateUpdate = {
19947
+ /**
19948
+ * The ID of the plan to update. Optional if subscription_id is provided.
19949
+ */
19950
+ planId?: string | undefined;
19951
+ /**
19952
+ * A unique ID to identify the subscription to update. Useful when a customer has multiple products with the same plan.
19953
+ */
19954
+ subscriptionId?: string | undefined;
19955
+ /**
19956
+ * The ID of the entity this update targets. Overrides the top-level entity_id for this update.
19957
+ */
19958
+ entityId?: string | undefined;
19959
+ /**
19960
+ * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
19961
+ */
19962
+ cancelAction: PreviewMultiUpdateCancelAction;
19963
+ /**
19964
+ * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
19965
+ */
19966
+ prorationBehavior?: PreviewMultiUpdateProrationBehavior | undefined;
19967
+ };
19968
+ type PreviewMultiUpdateParams = {
19023
19969
  /**
19024
- * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
19970
+ * The ID of the customer to update plans for.
19025
19971
  */
19026
- newBillingSubscription?: boolean | undefined;
19972
+ customerId: string;
19027
19973
  /**
19028
- * If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.
19974
+ * The ID of the entity to update plans for. Individual updates can override this with their own entity_id.
19029
19975
  */
19030
- enablePlanImmediately?: boolean | undefined;
19976
+ entityId?: string | undefined;
19031
19977
  /**
19032
- * Customer details to set when creating a customer
19978
+ * The list of plan updates to apply to the customer.
19033
19979
  */
19034
- customerData?: CustomerData | undefined;
19035
- entityData?: PreviewMultiAttachEntityData | undefined;
19980
+ updates: Array<PreviewMultiUpdateUpdate>;
19036
19981
  };
19037
- type PreviewMultiAttachDiscount = {
19982
+ type PreviewMultiUpdateDiscount = {
19038
19983
  amountOff: number;
19039
19984
  percentOff?: number | undefined;
19040
19985
  rewardId?: string | undefined;
@@ -19043,7 +19988,7 @@ type PreviewMultiAttachDiscount = {
19043
19988
  /**
19044
19989
  * The period of time that this line item is being charged for.
19045
19990
  */
19046
- type PreviewMultiAttachLineItemPeriod = {
19991
+ type PreviewMultiUpdateLineItemPeriod = {
19047
19992
  /**
19048
19993
  * The start of the period in milliseconds since the Unix epoch.
19049
19994
  */
@@ -19053,7 +19998,7 @@ type PreviewMultiAttachLineItemPeriod = {
19053
19998
  */
19054
19999
  end: number;
19055
20000
  };
19056
- type PreviewMultiAttachLineItem = {
20001
+ type PreviewMultiUpdateLineItem = {
19057
20002
  /**
19058
20003
  * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
19059
20004
  */
@@ -19073,7 +20018,7 @@ type PreviewMultiAttachLineItem = {
19073
20018
  /**
19074
20019
  * List of discounts applied to this line item.
19075
20020
  */
19076
- discounts?: Array<PreviewMultiAttachDiscount> | undefined;
20021
+ discounts?: Array<PreviewMultiUpdateDiscount> | undefined;
19077
20022
  /**
19078
20023
  * The ID of the plan that this line item belongs to.
19079
20024
  */
@@ -19085,13 +20030,13 @@ type PreviewMultiAttachLineItem = {
19085
20030
  /**
19086
20031
  * The period of time that this line item is being charged for.
19087
20032
  */
19088
- period?: PreviewMultiAttachLineItemPeriod | undefined;
20033
+ period?: PreviewMultiUpdateLineItemPeriod | undefined;
19089
20034
  /**
19090
20035
  * The quantity of the line item.
19091
20036
  */
19092
20037
  quantity: number;
19093
20038
  };
19094
- type PreviewMultiAttachNextCycleDiscount = {
20039
+ type PreviewMultiUpdateNextCycleDiscount = {
19095
20040
  amountOff: number;
19096
20041
  percentOff?: number | undefined;
19097
20042
  rewardId?: string | undefined;
@@ -19100,7 +20045,7 @@ type PreviewMultiAttachNextCycleDiscount = {
19100
20045
  /**
19101
20046
  * The period of time that this line item is being charged for.
19102
20047
  */
19103
- type PreviewMultiAttachNextCycleLineItemPeriod = {
20048
+ type PreviewMultiUpdateNextCycleLineItemPeriod = {
19104
20049
  /**
19105
20050
  * The start of the period in milliseconds since the Unix epoch.
19106
20051
  */
@@ -19110,7 +20055,7 @@ type PreviewMultiAttachNextCycleLineItemPeriod = {
19110
20055
  */
19111
20056
  end: number;
19112
20057
  };
19113
- type PreviewMultiAttachNextCycleLineItem = {
20058
+ type PreviewMultiUpdateNextCycleLineItem = {
19114
20059
  /**
19115
20060
  * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
19116
20061
  */
@@ -19130,7 +20075,7 @@ type PreviewMultiAttachNextCycleLineItem = {
19130
20075
  /**
19131
20076
  * List of discounts applied to this line item.
19132
20077
  */
19133
- discounts?: Array<PreviewMultiAttachNextCycleDiscount> | undefined;
20078
+ discounts?: Array<PreviewMultiUpdateNextCycleDiscount> | undefined;
19134
20079
  /**
19135
20080
  * The ID of the plan that this line item belongs to.
19136
20081
  */
@@ -19142,7 +20087,7 @@ type PreviewMultiAttachNextCycleLineItem = {
19142
20087
  /**
19143
20088
  * The period of time that this line item is being charged for.
19144
20089
  */
19145
- period?: PreviewMultiAttachNextCycleLineItemPeriod | undefined;
20090
+ period?: PreviewMultiUpdateNextCycleLineItemPeriod | undefined;
19146
20091
  /**
19147
20092
  * The quantity of the line item.
19148
20093
  */
@@ -19151,7 +20096,7 @@ type PreviewMultiAttachNextCycleLineItem = {
19151
20096
  /**
19152
20097
  * The period of time that this line item is being charged for.
19153
20098
  */
19154
- type PreviewMultiAttachUsageLineItemPeriod = {
20099
+ type PreviewMultiUpdateUsageLineItemPeriod = {
19155
20100
  /**
19156
20101
  * The start of the period in milliseconds since the Unix epoch.
19157
20102
  */
@@ -19161,7 +20106,7 @@ type PreviewMultiAttachUsageLineItemPeriod = {
19161
20106
  */
19162
20107
  end: number;
19163
20108
  };
19164
- type PreviewMultiAttachUsageLineItem = {
20109
+ type PreviewMultiUpdateUsageLineItem = {
19165
20110
  /**
19166
20111
  * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
19167
20112
  */
@@ -19177,12 +20122,12 @@ type PreviewMultiAttachUsageLineItem = {
19177
20122
  /**
19178
20123
  * The period of time that this line item is being charged for.
19179
20124
  */
19180
- period?: PreviewMultiAttachUsageLineItemPeriod | undefined;
20125
+ period?: PreviewMultiUpdateUsageLineItemPeriod | undefined;
19181
20126
  };
19182
20127
  /**
19183
20128
  * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
19184
20129
  */
19185
- type PreviewMultiAttachNextCycle = {
20130
+ type PreviewMultiUpdateNextCycle = {
19186
20131
  /**
19187
20132
  * Unix timestamp (milliseconds) when the next billing cycle starts.
19188
20133
  */
@@ -19198,13 +20143,13 @@ type PreviewMultiAttachNextCycle = {
19198
20143
  /**
19199
20144
  * List of line items for the next billing cycle.
19200
20145
  */
19201
- lineItems: Array<PreviewMultiAttachNextCycleLineItem>;
20146
+ lineItems: Array<PreviewMultiUpdateNextCycleLineItem>;
19202
20147
  /**
19203
20148
  * List of line items for usage-based features in the next cycle.
19204
20149
  */
19205
- usageLineItems: Array<PreviewMultiAttachUsageLineItem>;
20150
+ usageLineItems: Array<PreviewMultiUpdateUsageLineItem>;
19206
20151
  };
19207
- type PreviewMultiAttachIncomingFeatureQuantity = {
20152
+ type PreviewMultiUpdateIncomingFeatureQuantity = {
19208
20153
  /**
19209
20154
  * The ID of the adjustable feature included in this change.
19210
20155
  */
@@ -19214,7 +20159,7 @@ type PreviewMultiAttachIncomingFeatureQuantity = {
19214
20159
  */
19215
20160
  quantity: number;
19216
20161
  };
19217
- type PreviewMultiAttachIncoming = {
20162
+ type PreviewMultiUpdateIncoming = {
19218
20163
  /**
19219
20164
  * The ID of the plan affected by this preview change.
19220
20165
  */
@@ -19223,7 +20168,7 @@ type PreviewMultiAttachIncoming = {
19223
20168
  /**
19224
20169
  * The feature quantity selections associated with this plan change.
19225
20170
  */
19226
- featureQuantities: Array<PreviewMultiAttachIncomingFeatureQuantity>;
20171
+ featureQuantities: Array<PreviewMultiUpdateIncomingFeatureQuantity>;
19227
20172
  /**
19228
20173
  * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
19229
20174
  */
@@ -19237,7 +20182,7 @@ type PreviewMultiAttachIncoming = {
19237
20182
  */
19238
20183
  expiresAt: number | null;
19239
20184
  };
19240
- type PreviewMultiAttachOutgoingFeatureQuantity = {
20185
+ type PreviewMultiUpdateOutgoingFeatureQuantity = {
19241
20186
  /**
19242
20187
  * The ID of the adjustable feature included in this change.
19243
20188
  */
@@ -19247,7 +20192,7 @@ type PreviewMultiAttachOutgoingFeatureQuantity = {
19247
20192
  */
19248
20193
  quantity: number;
19249
20194
  };
19250
- type PreviewMultiAttachOutgoing = {
20195
+ type PreviewMultiUpdateOutgoing = {
19251
20196
  /**
19252
20197
  * The ID of the plan affected by this preview change.
19253
20198
  */
@@ -19256,7 +20201,7 @@ type PreviewMultiAttachOutgoing = {
19256
20201
  /**
19257
20202
  * The feature quantity selections associated with this plan change.
19258
20203
  */
19259
- featureQuantities: Array<PreviewMultiAttachOutgoingFeatureQuantity>;
20204
+ featureQuantities: Array<PreviewMultiUpdateOutgoingFeatureQuantity>;
19260
20205
  /**
19261
20206
  * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
19262
20207
  */
@@ -19270,69 +20215,15 @@ type PreviewMultiAttachOutgoing = {
19270
20215
  */
19271
20216
  expiresAt: number | null;
19272
20217
  };
19273
- declare const PreviewMultiAttachCheckoutType: {
19274
- readonly StripeCheckout: "stripe_checkout";
19275
- readonly AutumnCheckout: "autumn_checkout";
19276
- };
19277
- type PreviewMultiAttachCheckoutType = OpenEnum<typeof PreviewMultiAttachCheckoutType>;
19278
- /**
19279
- * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
19280
- */
19281
- declare const PreviewMultiAttachStatus: {
19282
- readonly Complete: "complete";
19283
- readonly Incomplete: "incomplete";
19284
- };
19285
- /**
19286
- * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
19287
- */
19288
- type PreviewMultiAttachStatus = OpenEnum<typeof PreviewMultiAttachStatus>;
19289
- /**
19290
- * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
19291
- */
19292
- type PreviewMultiAttachTax = {
19293
- /**
19294
- * Total tax amount in major currency units.
19295
- */
19296
- total: number;
19297
- /**
19298
- * Tax included in line item subtotals.
19299
- */
19300
- amountInclusive: number;
19301
- /**
19302
- * Tax added on top of subtotals.
19303
- */
19304
- amountExclusive: number;
19305
- /**
19306
- * Three-letter currency code.
19307
- */
19308
- currency: string;
19309
- /**
19310
- * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
19311
- */
19312
- status: PreviewMultiAttachStatus;
19313
- };
19314
- /**
19315
- * Stripe customer invoice credits preview.
19316
- */
19317
- type PreviewMultiAttachInvoiceCredits = {
19318
- /**
19319
- * Stripe customer credit balance available, expressed as a positive number in major currency units.
19320
- */
19321
- balance: number;
19322
- /**
19323
- * Three-letter currency code.
19324
- */
19325
- currency: string;
19326
- };
19327
- /**
19328
- * OK
19329
- */
19330
- type PreviewMultiAttachResponse = {
20218
+ type PreviewMultiUpdateSubscription = {
19331
20219
  /**
19332
20220
  * The ID of the customer.
19333
20221
  */
19334
20222
  customerId: string;
19335
- lineItems: Array<PreviewMultiAttachLineItem>;
20223
+ /**
20224
+ * List of line items for the current billing period.
20225
+ */
20226
+ lineItems: Array<PreviewMultiUpdateLineItem>;
19336
20227
  /**
19337
20228
  * The total amount in cents before discounts and tax for the current billing period.
19338
20229
  */
@@ -19348,7 +20239,7 @@ type PreviewMultiAttachResponse = {
19348
20239
  /**
19349
20240
  * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
19350
20241
  */
19351
- nextCycle?: PreviewMultiAttachNextCycle | undefined;
20242
+ nextCycle?: PreviewMultiUpdateNextCycle | undefined;
19352
20243
  /**
19353
20244
  * Expand the response with additional data.
19354
20245
  */
@@ -19356,27 +20247,36 @@ type PreviewMultiAttachResponse = {
19356
20247
  /**
19357
20248
  * Products or subscription changes being added or updated.
19358
20249
  */
19359
- incoming: Array<PreviewMultiAttachIncoming>;
20250
+ incoming: Array<PreviewMultiUpdateIncoming>;
19360
20251
  /**
19361
20252
  * Products or subscription changes being removed or ended.
19362
20253
  */
19363
- outgoing: Array<PreviewMultiAttachOutgoing>;
20254
+ outgoing: Array<PreviewMultiUpdateOutgoing>;
19364
20255
  /**
19365
- * Whether the customer will be redirected to a checkout page if attach is called.
20256
+ * The IDs of the plans updated on this subscription.
19366
20257
  */
19367
- redirectToCheckout: boolean;
20258
+ planIds: Array<string>;
20259
+ };
20260
+ /**
20261
+ * OK
20262
+ */
20263
+ type MultiUpdatePreviewResponse = {
19368
20264
  /**
19369
- * The type of checkout that will be used if the customer is redirected to a checkout page.
20265
+ * The ID of the customer the preview applies to.
19370
20266
  */
19371
- checkoutType: PreviewMultiAttachCheckoutType | null;
20267
+ customerId: string;
19372
20268
  /**
19373
- * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
20269
+ * The three-letter ISO currency code (e.g., 'usd').
19374
20270
  */
19375
- tax?: PreviewMultiAttachTax | undefined;
20271
+ currency: string;
19376
20272
  /**
19377
- * Stripe customer invoice credits preview.
20273
+ * The combined amount due today across all subscriptions (sum of subscriptions[].total).
19378
20274
  */
19379
- invoiceCredits?: PreviewMultiAttachInvoiceCredits | undefined;
20275
+ total: number;
20276
+ /**
20277
+ * One preview per affected Stripe subscription. Updates to plans without a subscription (free plans) produce no entry.
20278
+ */
20279
+ subscriptions: Array<PreviewMultiUpdateSubscription>;
19380
20280
  };
19381
20281
 
19382
20282
  /**
@@ -22326,6 +23226,10 @@ type UpdateBalanceParams = {
22326
23226
  * The next reset time for the balance. If there are multiple breakdowns, this will update the breakdown with the next reset time.
22327
23227
  */
22328
23228
  nextResetAt?: number | undefined;
23229
+ /**
23230
+ * Unix timestamp (milliseconds) when the balance expires. Targets a specific balance via balance_id / interval when the customer has multiple balances for the same feature.
23231
+ */
23232
+ expiresAt?: number | undefined;
22329
23233
  };
22330
23234
  /**
22331
23235
  * OK
@@ -22604,18 +23508,45 @@ declare const UpdateCustomerEnv: {
22604
23508
  * The environment this customer was created in.
22605
23509
  */
22606
23510
  type UpdateCustomerEnv = OpenEnum<typeof UpdateCustomerEnv>;
23511
+ /**
23512
+ * The time interval for the purchase limit window.
23513
+ */
22607
23514
  declare const UpdateCustomerPurchaseLimitIntervalResponse2: {
22608
23515
  readonly Hour: "hour";
22609
23516
  readonly Day: "day";
22610
23517
  readonly Week: "week";
22611
23518
  readonly Month: "month";
22612
23519
  };
23520
+ /**
23521
+ * The time interval for the purchase limit window.
23522
+ */
22613
23523
  type UpdateCustomerPurchaseLimitIntervalResponse2 = OpenEnum<typeof UpdateCustomerPurchaseLimitIntervalResponse2>;
22614
23524
  type UpdateCustomerPurchaseLimitResponse2 = {
23525
+ /**
23526
+ * The time interval for the purchase limit window.
23527
+ */
23528
+ interval: UpdateCustomerPurchaseLimitIntervalResponse2;
23529
+ /**
23530
+ * Number of intervals in the purchase limit window.
23531
+ */
23532
+ intervalCount: number;
23533
+ /**
23534
+ * Maximum number of auto top-ups allowed within the interval.
23535
+ */
23536
+ limit: number;
23537
+ };
23538
+ declare const UpdateCustomerPurchaseLimitIntervalResponse1: {
23539
+ readonly Hour: "hour";
23540
+ readonly Day: "day";
23541
+ readonly Week: "week";
23542
+ readonly Month: "month";
23543
+ };
23544
+ type UpdateCustomerPurchaseLimitIntervalResponse1 = OpenEnum<typeof UpdateCustomerPurchaseLimitIntervalResponse1>;
23545
+ type UpdateCustomerPurchaseLimitResponse1 = {
22615
23546
  /**
22616
23547
  * The time interval for the purchase limit window. Null when no purchase limit is configured.
22617
23548
  */
22618
- interval: UpdateCustomerPurchaseLimitIntervalResponse2 | null;
23549
+ interval: UpdateCustomerPurchaseLimitIntervalResponse1 | null;
22619
23550
  /**
22620
23551
  * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
22621
23552
  */
@@ -22634,32 +23565,16 @@ type UpdateCustomerPurchaseLimitResponse2 = {
22634
23565
  nextResetAt: number;
22635
23566
  };
22636
23567
  /**
22637
- * The time interval for the purchase limit window.
23568
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
22638
23569
  */
22639
- declare const UpdateCustomerPurchaseLimitIntervalResponse1: {
22640
- readonly Hour: "hour";
22641
- readonly Day: "day";
22642
- readonly Week: "week";
22643
- readonly Month: "month";
23570
+ declare const UpdateCustomerAutoTopupSource: {
23571
+ readonly Customer: "customer";
23572
+ readonly Plan: "plan";
22644
23573
  };
22645
23574
  /**
22646
- * The time interval for the purchase limit window.
23575
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
22647
23576
  */
22648
- type UpdateCustomerPurchaseLimitIntervalResponse1 = OpenEnum<typeof UpdateCustomerPurchaseLimitIntervalResponse1>;
22649
- type UpdateCustomerPurchaseLimitResponse1 = {
22650
- /**
22651
- * The time interval for the purchase limit window.
22652
- */
22653
- interval: UpdateCustomerPurchaseLimitIntervalResponse1;
22654
- /**
22655
- * Number of intervals in the purchase limit window.
22656
- */
22657
- intervalCount: number;
22658
- /**
22659
- * Maximum number of auto top-ups allowed within the interval.
22660
- */
22661
- limit: number;
22662
- };
23577
+ type UpdateCustomerAutoTopupSource = OpenEnum<typeof UpdateCustomerAutoTopupSource>;
22663
23578
  type UpdateCustomerAutoTopupResponse = {
22664
23579
  /**
22665
23580
  * The ID of the feature (credit balance) to auto top-up.
@@ -22680,11 +23595,15 @@ type UpdateCustomerAutoTopupResponse = {
22680
23595
  /**
22681
23596
  * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
22682
23597
  */
22683
- purchaseLimit?: UpdateCustomerPurchaseLimitResponse2 | UpdateCustomerPurchaseLimitResponse1 | undefined;
23598
+ purchaseLimit?: UpdateCustomerPurchaseLimitResponse1 | UpdateCustomerPurchaseLimitResponse2 | undefined;
22684
23599
  /**
22685
23600
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
22686
23601
  */
22687
23602
  invoiceMode?: boolean | undefined;
23603
+ /**
23604
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23605
+ */
23606
+ source?: UpdateCustomerAutoTopupSource | undefined;
22688
23607
  };
22689
23608
  /**
22690
23609
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
@@ -22697,6 +23616,17 @@ declare const UpdateCustomerLimitTypeResponse: {
22697
23616
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
22698
23617
  */
22699
23618
  type UpdateCustomerLimitTypeResponse = OpenEnum<typeof UpdateCustomerLimitTypeResponse>;
23619
+ /**
23620
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23621
+ */
23622
+ declare const UpdateCustomerSpendLimitSource: {
23623
+ readonly Customer: "customer";
23624
+ readonly Plan: "plan";
23625
+ };
23626
+ /**
23627
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23628
+ */
23629
+ type UpdateCustomerSpendLimitSource = OpenEnum<typeof UpdateCustomerSpendLimitSource>;
22700
23630
  type UpdateCustomerSpendLimitResponse = {
22701
23631
  /**
22702
23632
  * Optional feature ID this spend limit applies to.
@@ -22718,6 +23648,10 @@ type UpdateCustomerSpendLimitResponse = {
22718
23648
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
22719
23649
  */
22720
23650
  skipOverageBilling?: boolean | undefined;
23651
+ /**
23652
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23653
+ */
23654
+ source?: UpdateCustomerSpendLimitSource | undefined;
22721
23655
  };
22722
23656
  /**
22723
23657
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -22740,6 +23674,17 @@ type UpdateCustomerFilterResponse = {
22740
23674
  [k: string]: any;
22741
23675
  };
22742
23676
  };
23677
+ /**
23678
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23679
+ */
23680
+ declare const UpdateCustomerUsageLimitSource: {
23681
+ readonly Customer: "customer";
23682
+ readonly Plan: "plan";
23683
+ };
23684
+ /**
23685
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23686
+ */
23687
+ type UpdateCustomerUsageLimitSource = OpenEnum<typeof UpdateCustomerUsageLimitSource>;
22743
23688
  type UpdateCustomerUsageLimitResponse = {
22744
23689
  /**
22745
23690
  * The feature this usage limit applies to.
@@ -22765,6 +23710,10 @@ type UpdateCustomerUsageLimitResponse = {
22765
23710
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
22766
23711
  */
22767
23712
  usage?: number | undefined;
23713
+ /**
23714
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23715
+ */
23716
+ source?: UpdateCustomerUsageLimitSource | undefined;
22768
23717
  };
22769
23718
  /**
22770
23719
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -22779,6 +23728,17 @@ declare const UpdateCustomerThresholdTypeResponse: {
22779
23728
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
22780
23729
  */
22781
23730
  type UpdateCustomerThresholdTypeResponse = OpenEnum<typeof UpdateCustomerThresholdTypeResponse>;
23731
+ /**
23732
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23733
+ */
23734
+ declare const UpdateCustomerUsageAlertSource: {
23735
+ readonly Customer: "customer";
23736
+ readonly Plan: "plan";
23737
+ };
23738
+ /**
23739
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23740
+ */
23741
+ type UpdateCustomerUsageAlertSource = OpenEnum<typeof UpdateCustomerUsageAlertSource>;
22782
23742
  type UpdateCustomerUsageAlertResponse = {
22783
23743
  /**
22784
23744
  * The feature ID this alert applies to.
@@ -22800,7 +23760,22 @@ type UpdateCustomerUsageAlertResponse = {
22800
23760
  * Optional user-defined label to distinguish multiple alerts on the same feature.
22801
23761
  */
22802
23762
  name?: string | undefined;
23763
+ /**
23764
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23765
+ */
23766
+ source?: UpdateCustomerUsageAlertSource | undefined;
23767
+ };
23768
+ /**
23769
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23770
+ */
23771
+ declare const UpdateCustomerOverageAllowedSource: {
23772
+ readonly Customer: "customer";
23773
+ readonly Plan: "plan";
22803
23774
  };
23775
+ /**
23776
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23777
+ */
23778
+ type UpdateCustomerOverageAllowedSource = OpenEnum<typeof UpdateCustomerOverageAllowedSource>;
22804
23779
  type UpdateCustomerOverageAllowedResponse = {
22805
23780
  /**
22806
23781
  * The feature ID this overage allowed control applies to.
@@ -22810,6 +23785,10 @@ type UpdateCustomerOverageAllowedResponse = {
22810
23785
  * Whether overage is allowed for this feature.
22811
23786
  */
22812
23787
  enabled: boolean;
23788
+ /**
23789
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
23790
+ */
23791
+ source?: UpdateCustomerOverageAllowedSource | undefined;
22813
23792
  };
22814
23793
  /**
22815
23794
  * Billing controls for the customer (auto top-ups, etc.)
@@ -23619,6 +24598,17 @@ declare const UpdateEntityLimitTypeResponse: {
23619
24598
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
23620
24599
  */
23621
24600
  type UpdateEntityLimitTypeResponse = OpenEnum<typeof UpdateEntityLimitTypeResponse>;
24601
+ /**
24602
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24603
+ */
24604
+ declare const UpdateEntitySpendLimitSource: {
24605
+ readonly Customer: "customer";
24606
+ readonly Plan: "plan";
24607
+ };
24608
+ /**
24609
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24610
+ */
24611
+ type UpdateEntitySpendLimitSource = OpenEnum<typeof UpdateEntitySpendLimitSource>;
23622
24612
  type UpdateEntitySpendLimitResponse = {
23623
24613
  /**
23624
24614
  * Optional feature ID this spend limit applies to.
@@ -23640,6 +24630,10 @@ type UpdateEntitySpendLimitResponse = {
23640
24630
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
23641
24631
  */
23642
24632
  skipOverageBilling?: boolean | undefined;
24633
+ /**
24634
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24635
+ */
24636
+ source?: UpdateEntitySpendLimitSource | undefined;
23643
24637
  };
23644
24638
  /**
23645
24639
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -23662,6 +24656,17 @@ type UpdateEntityFilterResponse = {
23662
24656
  [k: string]: any;
23663
24657
  };
23664
24658
  };
24659
+ /**
24660
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24661
+ */
24662
+ declare const UpdateEntityUsageLimitSource: {
24663
+ readonly Customer: "customer";
24664
+ readonly Plan: "plan";
24665
+ };
24666
+ /**
24667
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24668
+ */
24669
+ type UpdateEntityUsageLimitSource = OpenEnum<typeof UpdateEntityUsageLimitSource>;
23665
24670
  type UpdateEntityUsageLimitResponse = {
23666
24671
  /**
23667
24672
  * The feature this usage limit applies to.
@@ -23687,6 +24692,10 @@ type UpdateEntityUsageLimitResponse = {
23687
24692
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
23688
24693
  */
23689
24694
  usage?: number | undefined;
24695
+ /**
24696
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24697
+ */
24698
+ source?: UpdateEntityUsageLimitSource | undefined;
23690
24699
  };
23691
24700
  /**
23692
24701
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -23701,6 +24710,17 @@ declare const UpdateEntityThresholdTypeResponse: {
23701
24710
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
23702
24711
  */
23703
24712
  type UpdateEntityThresholdTypeResponse = OpenEnum<typeof UpdateEntityThresholdTypeResponse>;
24713
+ /**
24714
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24715
+ */
24716
+ declare const UpdateEntityUsageAlertSource: {
24717
+ readonly Customer: "customer";
24718
+ readonly Plan: "plan";
24719
+ };
24720
+ /**
24721
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24722
+ */
24723
+ type UpdateEntityUsageAlertSource = OpenEnum<typeof UpdateEntityUsageAlertSource>;
23704
24724
  type UpdateEntityUsageAlertResponse = {
23705
24725
  /**
23706
24726
  * The feature ID this alert applies to.
@@ -23722,7 +24742,22 @@ type UpdateEntityUsageAlertResponse = {
23722
24742
  * Optional user-defined label to distinguish multiple alerts on the same feature.
23723
24743
  */
23724
24744
  name?: string | undefined;
24745
+ /**
24746
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24747
+ */
24748
+ source?: UpdateEntityUsageAlertSource | undefined;
24749
+ };
24750
+ /**
24751
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24752
+ */
24753
+ declare const UpdateEntityOverageAllowedSource: {
24754
+ readonly Customer: "customer";
24755
+ readonly Plan: "plan";
23725
24756
  };
24757
+ /**
24758
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24759
+ */
24760
+ type UpdateEntityOverageAllowedSource = OpenEnum<typeof UpdateEntityOverageAllowedSource>;
23726
24761
  type UpdateEntityOverageAllowedResponse = {
23727
24762
  /**
23728
24763
  * The feature ID this overage allowed control applies to.
@@ -23732,6 +24767,10 @@ type UpdateEntityOverageAllowedResponse = {
23732
24767
  * Whether overage is allowed for this feature.
23733
24768
  */
23734
24769
  enabled: boolean;
24770
+ /**
24771
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
24772
+ */
24773
+ source?: UpdateEntityOverageAllowedSource | undefined;
23735
24774
  };
23736
24775
  /**
23737
24776
  * Billing controls for the entity.
@@ -26696,7 +27735,7 @@ declare class Billing extends ClientSDK {
26696
27735
  * @example
26697
27736
  * ```typescript
26698
27737
  * // Schedule a transition from a trial plan to a paid plan
26699
- * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1783539171816,"plans":[{"planId":"trial_plan"}]},{"startsAt":1784748771816,"plans":[{"planId":"pro_plan"}]}] });
27738
+ * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1783701939170,"plans":[{"planId":"trial_plan"}]},{"startsAt":1784911539170,"plans":[{"planId":"pro_plan"}]}] });
26700
27739
  * ```
26701
27740
  *
26702
27741
  * @param customerId - The ID of the customer to create the schedule for.
@@ -26896,6 +27935,48 @@ declare class Billing extends ClientSDK {
26896
27935
  * @returns A preview response with line items showing prorated charges or credits for the proposed changes.
26897
27936
  */
26898
27937
  previewUpdate(request: PreviewUpdateParams, options?: RequestOptions): Promise<PreviewUpdateResponse>;
27938
+ /**
27939
+ * Updates multiple plans on a customer in a single request. Currently supports cancel actions (immediately, end of cycle, or uncancel) across one or more subscriptions.
27940
+ *
27941
+ * Use this endpoint to cancel or uncancel several plans atomically in one call — for example canceling a main plan together with its add-ons, or plans across multiple entities.
27942
+ *
27943
+ * @example
27944
+ * ```typescript
27945
+ * // Cancel a plan and an add-on at end of cycle
27946
+ * const response = await client.billing.multiUpdate({ customerId: "cus_123", updates: [{"planId":"pro_plan","cancelAction":"cancel_end_of_cycle"},{"planId":"addon_seats","cancelAction":"cancel_end_of_cycle"}] });
27947
+ * ```
27948
+ *
27949
+ * @example
27950
+ * ```typescript
27951
+ * // Uncancel one plan and cancel another immediately
27952
+ * const response = await client.billing.multiUpdate({ customerId: "cus_123", updates: [{"planId":"pro_plan","cancelAction":"uncancel"},{"planId":"addon_seats","cancelAction":"cancel_immediately"}] });
27953
+ * ```
27954
+ *
27955
+ * @param customerId - The ID of the customer to update plans for.
27956
+ * @param entityId - The ID of the entity to update plans for. Individual updates can override this with their own entity_id. (optional)
27957
+ * @param updates - The list of plan updates to apply to the customer.
27958
+ *
27959
+ * @returns A billing response with the resulting invoice summary (one credit invoice per affected subscription for immediate cancels).
27960
+ */
27961
+ multiUpdate(request: MultiUpdateParams, options?: RequestOptions): Promise<MultiUpdateResponse>;
27962
+ /**
27963
+ * Previews the billing changes of a multi-plan update without making any changes. Returns one core preview per affected subscription.
27964
+ *
27965
+ * Use this endpoint to show customers the credits and next-cycle changes of canceling multiple plans before confirming.
27966
+ *
27967
+ * @example
27968
+ * ```typescript
27969
+ * // Preview canceling two plans immediately
27970
+ * const response = await client.billing.previewMultiUpdate({ customerId: "cus_123", updates: [{"planId":"pro_plan","cancelAction":"cancel_immediately"},{"planId":"addon_seats","cancelAction":"cancel_immediately"}] });
27971
+ * ```
27972
+ *
27973
+ * @param customerId - The ID of the customer to update plans for.
27974
+ * @param entityId - The ID of the entity to update plans for. Individual updates can override this with their own entity_id. (optional)
27975
+ * @param updates - The list of plan updates to apply to the customer.
27976
+ *
27977
+ * @returns A preview with the combined total plus one entry per subscription, each with its own line items, totals, and next-cycle preview.
27978
+ */
27979
+ previewMultiUpdate(request: PreviewMultiUpdateParams, options?: RequestOptions): Promise<MultiUpdatePreviewResponse>;
26899
27980
  /**
26900
27981
  * Create a billing portal session for a customer to manage their subscription.
26901
27982
  */