autumn-js 1.3.44 → 1.3.46

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 (107) hide show
  1. package/dist/backend/adapters/express.js +44 -18
  2. package/dist/backend/adapters/express.mjs +4 -4
  3. package/dist/backend/adapters/fetch.js +44 -18
  4. package/dist/backend/adapters/fetch.mjs +4 -4
  5. package/dist/backend/adapters/hono.js +44 -18
  6. package/dist/backend/adapters/hono.mjs +4 -4
  7. package/dist/backend/adapters/index.js +44 -18
  8. package/dist/backend/adapters/index.mjs +7 -7
  9. package/dist/backend/adapters/next.js +44 -18
  10. package/dist/backend/adapters/next.mjs +4 -4
  11. package/dist/backend/{chunk-IDGAWOWG.mjs → chunk-6RGLO6FV.mjs} +1 -1
  12. package/dist/backend/{chunk-JN27ZIEU.mjs → chunk-C4IENXIG.mjs} +1 -1
  13. package/dist/backend/{chunk-WNSOQEDD.mjs → chunk-DZBBXOKT.mjs} +1 -1
  14. package/dist/backend/{chunk-FKYHGK3J.mjs → chunk-ESSDMDXJ.mjs} +1 -1
  15. package/dist/backend/{chunk-POJBSIOX.mjs → chunk-KSYN5FLV.mjs} +44 -18
  16. package/dist/backend/{chunk-4S63ZJ56.mjs → chunk-NOJP6FIN.mjs} +1 -1
  17. package/dist/backend/{chunk-UNI5JBUD.mjs → chunk-ZFFEG27F.mjs} +1 -1
  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 +44 -18
  21. package/dist/backend/core/handlers/coreHandler.mjs +2 -2
  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/handleRouteByName.js +44 -18
  25. package/dist/backend/core/handlers/handleRouteByName.mjs +2 -2
  26. package/dist/backend/core/handlers/index.d.mts +1 -1
  27. package/dist/backend/core/handlers/index.d.ts +1 -1
  28. package/dist/backend/core/handlers/index.js +44 -18
  29. package/dist/backend/core/handlers/index.mjs +3 -3
  30. package/dist/backend/core/index.d.mts +1 -1
  31. package/dist/backend/core/index.d.ts +1 -1
  32. package/dist/backend/core/index.js +44 -18
  33. package/dist/backend/core/index.mjs +3 -3
  34. package/dist/backend/core/routes/index.d.mts +1 -1
  35. package/dist/backend/core/routes/index.d.ts +1 -1
  36. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  37. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  38. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  39. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  40. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  41. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  42. package/dist/backend/core/types/index.d.mts +1 -1
  43. package/dist/backend/core/types/index.d.ts +1 -1
  44. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  45. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  46. package/dist/backend/index.d.mts +2 -2
  47. package/dist/backend/index.d.ts +2 -2
  48. package/dist/backend/index.js +44 -18
  49. package/dist/backend/index.mjs +3 -3
  50. package/dist/backend/{routeTypes-Dr-THiSK.d.ts → routeTypes-4TatmvQY.d.ts} +75 -17
  51. package/dist/backend/{routeTypes-C90LbFI_.d.mts → routeTypes-DAI_E67X.d.mts} +75 -17
  52. package/dist/better-auth/{chunk-CBB6UDNH.mjs → chunk-R7IEJQOY.mjs} +44 -18
  53. package/dist/better-auth/index.js +44 -18
  54. package/dist/better-auth/index.mjs +1 -1
  55. package/dist/better-auth/utils/handleBetterAuthRoute.js +44 -18
  56. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  57. package/dist/better-auth/utils/index.js +44 -18
  58. package/dist/better-auth/utils/index.mjs +1 -1
  59. package/dist/react/AutumnContext.d.mts +4 -4
  60. package/dist/react/AutumnContext.d.ts +4 -4
  61. package/dist/react/client/AutumnClient.d.mts +4 -4
  62. package/dist/react/client/AutumnClient.d.ts +4 -4
  63. package/dist/react/client/IAutumnClient.d.mts +4 -4
  64. package/dist/react/client/IAutumnClient.d.ts +4 -4
  65. package/dist/react/client/index.d.mts +4 -4
  66. package/dist/react/client/index.d.ts +4 -4
  67. package/dist/react/{customer-B0VDWypn.d.ts → customer-B0KAd7eZ.d.ts} +16 -16
  68. package/dist/react/{customer-BIYGF3IC.d.mts → customer-DfpvnPRk.d.mts} +16 -16
  69. package/dist/react/hooks/index.d.mts +4 -4
  70. package/dist/react/hooks/index.d.ts +4 -4
  71. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  72. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  73. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  74. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  75. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  76. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  77. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  78. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  79. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  80. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  81. package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
  82. package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
  83. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  84. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  85. package/dist/react/hooks/useCustomer.d.mts +3 -3
  86. package/dist/react/hooks/useCustomer.d.ts +3 -3
  87. package/dist/react/hooks/useEntity.d.mts +2 -2
  88. package/dist/react/hooks/useEntity.d.ts +2 -2
  89. package/dist/react/hooks/useListEvents.d.mts +2 -2
  90. package/dist/react/hooks/useListEvents.d.ts +2 -2
  91. package/dist/react/hooks/useListPlans.d.mts +3 -3
  92. package/dist/react/hooks/useListPlans.d.ts +3 -3
  93. package/dist/react/hooks/useReferrals.d.mts +2 -2
  94. package/dist/react/hooks/useReferrals.d.ts +2 -2
  95. package/dist/react/index.d.mts +4 -4
  96. package/dist/react/index.d.ts +4 -4
  97. package/dist/react/{list-plans-response-kGzo3GRQ.d.ts → list-plans-response-6iUDTnPQ.d.ts} +1 -1
  98. package/dist/react/{list-plans-response-BqtwCPty.d.mts → list-plans-response-BzsqJlxN.d.mts} +1 -1
  99. package/dist/react/{params-DP6BNkc0.d.ts → params-CMcoADwO.d.ts} +1 -1
  100. package/dist/react/{params-DZznA-no.d.mts → params-vAoGWtk9.d.mts} +1 -1
  101. package/dist/react/{plan-CEOgE_On.d.mts → plan-Ct5TGTnS.d.mts} +33 -0
  102. package/dist/react/{plan-CEOgE_On.d.ts → plan-Ct5TGTnS.d.ts} +33 -0
  103. package/dist/sdk/index.d.mts +91 -23
  104. package/dist/sdk/index.d.ts +91 -23
  105. package/dist/sdk/index.js +76 -28
  106. package/dist/sdk/index.mjs +59 -19
  107. package/package.json +2 -2
@@ -3687,6 +3687,10 @@ var BalanceBillingMethod = {
3687
3687
  Prepaid: "prepaid",
3688
3688
  UsageBased: "usage_based"
3689
3689
  };
3690
+ var BalanceSource = {
3691
+ Customer: "customer",
3692
+ Entity: "entity"
3693
+ };
3690
3694
  var BalanceType$inboundSchema = inboundSchema(BalanceType);
3691
3695
  var BalanceDimensions6$inboundSchema = z15.pipe(
3692
3696
  z15.object({
@@ -4047,6 +4051,10 @@ var BalancePrice$inboundSchema = z15.pipe(
4047
4051
  });
4048
4052
  })
4049
4053
  );
4054
+ var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
4055
+ var Allocation$inboundSchema = z15.object({
4056
+ amount: number2()
4057
+ });
4050
4058
  var Breakdown$inboundSchema = z15.pipe(
4051
4059
  z15.object({
4052
4060
  id: z15._default(string5(), ""),
@@ -4058,7 +4066,11 @@ var Breakdown$inboundSchema = z15.pipe(
4058
4066
  unlimited: boolean2(),
4059
4067
  reset: nullable(z15.lazy(() => BalanceReset$inboundSchema)),
4060
4068
  price: nullable(z15.lazy(() => BalancePrice$inboundSchema)),
4061
- expires_at: nullable(number2())
4069
+ expires_at: nullable(number2()),
4070
+ source: optional3(BalanceSource$inboundSchema),
4071
+ allocation: z15.optional(
4072
+ z15.nullable(z15.lazy(() => Allocation$inboundSchema))
4073
+ )
4062
4074
  }),
4063
4075
  z15.transform((v) => {
4064
4076
  return remap(v, {
@@ -4095,7 +4107,9 @@ var Balance$inboundSchema = z15.pipe(
4095
4107
  breakdown: optional3(z15.array(z15.lazy(() => Breakdown$inboundSchema))),
4096
4108
  rollovers: optional3(z15.array(z15.lazy(
4097
4109
  () => BalanceRollover$inboundSchema
4098
- )))
4110
+ ))),
4111
+ allocated: optional3(number2()),
4112
+ unallocated: optional3(number2())
4099
4113
  }),
4100
4114
  z15.transform((v) => {
4101
4115
  return remap(v, {
@@ -21152,7 +21166,7 @@ var CustomerAutoTopupInterval1 = {
21152
21166
  Week: "week",
21153
21167
  Month: "month"
21154
21168
  };
21155
- var AutoTopupSource = {
21169
+ var CustomerAutoTopupSource = {
21156
21170
  Customer: "customer",
21157
21171
  Plan: "plan"
21158
21172
  };
@@ -21160,7 +21174,7 @@ var CustomerLimitType = {
21160
21174
  Absolute: "absolute",
21161
21175
  UsagePercentage: "usage_percentage"
21162
21176
  };
21163
- var SpendLimitSource = {
21177
+ var CustomerSpendLimitSource = {
21164
21178
  Customer: "customer",
21165
21179
  Plan: "plan"
21166
21180
  };
@@ -21174,7 +21188,7 @@ var CustomerAnchor = {
21174
21188
  BillingCycle: "billing_cycle",
21175
21189
  Utc: "utc"
21176
21190
  };
21177
- var UsageLimitSource = {
21191
+ var CustomerUsageLimitSource = {
21178
21192
  Customer: "customer",
21179
21193
  Plan: "plan"
21180
21194
  };
@@ -21190,11 +21204,11 @@ var CustomerBasis = {
21190
21204
  Recurring: "recurring",
21191
21205
  UsageLimit: "usage_limit"
21192
21206
  };
21193
- var UsageAlertSource = {
21207
+ var CustomerUsageAlertSource = {
21194
21208
  Customer: "customer",
21195
21209
  Plan: "plan"
21196
21210
  };
21197
- var OverageAllowedSource = {
21211
+ var CustomerOverageAllowedSource = {
21198
21212
  Customer: "customer",
21199
21213
  Plan: "plan"
21200
21214
  };
@@ -21287,7 +21301,7 @@ var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
21287
21301
  z39.lazy(() => CustomerPurchaseLimit1$inboundSchema),
21288
21302
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21289
21303
  ]);
21290
- var AutoTopupSource$inboundSchema = inboundSchema(AutoTopupSource);
21304
+ var CustomerAutoTopupSource$inboundSchema = inboundSchema(CustomerAutoTopupSource);
21291
21305
  var CustomerAutoTopup$inboundSchema = z39.pipe(
21292
21306
  z39.object({
21293
21307
  feature_id: string5(),
@@ -21299,7 +21313,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21299
21313
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21300
21314
  ])),
21301
21315
  invoice_mode: optional3(boolean2()),
21302
- source: optional3(AutoTopupSource$inboundSchema)
21316
+ source: optional3(CustomerAutoTopupSource$inboundSchema)
21303
21317
  }),
21304
21318
  z39.transform((v) => {
21305
21319
  return remap(v, {
@@ -21310,7 +21324,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21310
21324
  })
21311
21325
  );
21312
21326
  var CustomerLimitType$inboundSchema = inboundSchema(CustomerLimitType);
21313
- var SpendLimitSource$inboundSchema = inboundSchema(SpendLimitSource);
21327
+ var CustomerSpendLimitSource$inboundSchema = inboundSchema(CustomerSpendLimitSource);
21314
21328
  var CustomerSpendLimit$inboundSchema = z39.pipe(
21315
21329
  z39.object({
21316
21330
  feature_id: optional3(string5()),
@@ -21318,7 +21332,7 @@ var CustomerSpendLimit$inboundSchema = z39.pipe(
21318
21332
  limit_type: optional3(CustomerLimitType$inboundSchema),
21319
21333
  overage_limit: optional3(number2()),
21320
21334
  skip_overage_billing: optional3(boolean2()),
21321
- source: optional3(SpendLimitSource$inboundSchema)
21335
+ source: optional3(CustomerSpendLimitSource$inboundSchema)
21322
21336
  }),
21323
21337
  z39.transform((v) => {
21324
21338
  return remap(v, {
@@ -21334,7 +21348,7 @@ var CustomerAnchor$inboundSchema = inboundSchema(CustomerAnchor);
21334
21348
  var CustomerUsageLimitFilter$inboundSchema = z39.object({
21335
21349
  properties: z39.record(z39.string(), string5())
21336
21350
  });
21337
- var UsageLimitSource$inboundSchema = inboundSchema(UsageLimitSource);
21351
+ var CustomerUsageLimitSource$inboundSchema = inboundSchema(CustomerUsageLimitSource);
21338
21352
  var CustomerUsageLimit$inboundSchema = z39.pipe(
21339
21353
  z39.object({
21340
21354
  feature_id: string5(),
@@ -21346,7 +21360,7 @@ var CustomerUsageLimit$inboundSchema = z39.pipe(
21346
21360
  z39.lazy(() => CustomerUsageLimitFilter$inboundSchema)
21347
21361
  ),
21348
21362
  usage: optional3(number2()),
21349
- source: optional3(UsageLimitSource$inboundSchema)
21363
+ source: optional3(CustomerUsageLimitSource$inboundSchema)
21350
21364
  }),
21351
21365
  z39.transform((v) => {
21352
21366
  return remap(v, {
@@ -21359,7 +21373,7 @@ var CustomerBasis$inboundSchema = inboundSchema(CustomerBasis);
21359
21373
  var CustomerUsageAlertFilter$inboundSchema = z39.object({
21360
21374
  properties: z39.record(z39.string(), string5())
21361
21375
  });
21362
- var UsageAlertSource$inboundSchema = inboundSchema(UsageAlertSource);
21376
+ var CustomerUsageAlertSource$inboundSchema = inboundSchema(CustomerUsageAlertSource);
21363
21377
  var CustomerUsageAlert$inboundSchema = z39.pipe(
21364
21378
  z39.object({
21365
21379
  feature_id: optional3(string5()),
@@ -21371,7 +21385,7 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21371
21385
  z39.lazy(() => CustomerUsageAlertFilter$inboundSchema)
21372
21386
  ),
21373
21387
  name: optional3(string5()),
21374
- source: optional3(UsageAlertSource$inboundSchema)
21388
+ source: optional3(CustomerUsageAlertSource$inboundSchema)
21375
21389
  }),
21376
21390
  z39.transform((v) => {
21377
21391
  return remap(v, {
@@ -21380,12 +21394,12 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21380
21394
  });
21381
21395
  })
21382
21396
  );
21383
- var OverageAllowedSource$inboundSchema = inboundSchema(OverageAllowedSource);
21397
+ var CustomerOverageAllowedSource$inboundSchema = inboundSchema(CustomerOverageAllowedSource);
21384
21398
  var CustomerOverageAllowed$inboundSchema = z39.pipe(
21385
21399
  z39.object({
21386
21400
  feature_id: string5(),
21387
21401
  enabled: z39._default(boolean2(), false),
21388
- source: optional3(OverageAllowedSource$inboundSchema)
21402
+ source: optional3(CustomerOverageAllowedSource$inboundSchema)
21389
21403
  }),
21390
21404
  z39.transform((v) => {
21391
21405
  return remap(v, {
@@ -28158,6 +28172,10 @@ var ListBalancesBillingMethod = {
28158
28172
  Prepaid: "prepaid",
28159
28173
  UsageBased: "usage_based"
28160
28174
  };
28175
+ var ListBalancesSource = {
28176
+ Customer: "customer",
28177
+ Entity: "entity"
28178
+ };
28161
28179
  var ListBalancesListStatus = {
28162
28180
  Active: "active",
28163
28181
  Expired: "expired"
@@ -28236,6 +28254,10 @@ var ListBalancesPrice$inboundSchema = z66.pipe(
28236
28254
  });
28237
28255
  })
28238
28256
  );
28257
+ var ListBalancesSource$inboundSchema = inboundSchema(ListBalancesSource);
28258
+ var ListBalancesAllocation$inboundSchema = z66.object({
28259
+ amount: number2()
28260
+ });
28239
28261
  var ListBalancesListStatus$inboundSchema = inboundSchema(ListBalancesListStatus);
28240
28262
  var ListBalancesRollover$inboundSchema = z66.pipe(
28241
28263
  z66.object({
@@ -28261,6 +28283,10 @@ var ListBalancesList$inboundSchema = z66.pipe(
28261
28283
  reset: nullable(z66.lazy(() => ListBalancesReset$inboundSchema)),
28262
28284
  price: nullable(z66.lazy(() => ListBalancesPrice$inboundSchema)),
28263
28285
  expires_at: nullable(number2()),
28286
+ source: optional3(ListBalancesSource$inboundSchema),
28287
+ allocation: z66.optional(
28288
+ z66.nullable(z66.lazy(() => ListBalancesAllocation$inboundSchema))
28289
+ ),
28264
28290
  feature_id: string5(),
28265
28291
  status: ListBalancesListStatus$inboundSchema,
28266
28292
  rollovers: z66.array(z66.lazy(() => ListBalancesRollover$inboundSchema)),
@@ -58724,7 +58750,7 @@ var Billing = class extends ClientSDK {
58724
58750
  * @param noBillingChanges - If true, skips any billing changes for the schedule. (optional)
58725
58751
  * @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
58726
58752
  * @param enablePlanImmediately - If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed. (optional)
58727
- * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not declare are always retained. (optional)
58753
+ * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not list keep running until a listed plan in their group replaces them or the schedule ends. (optional)
58728
58754
  * @param unscheduledPlans - Plans billed with the immediate phase that the schedule never expires or replaces. No phase may declare a plan in the same group and scope. (optional)
58729
58755
  * @param phases - Ordered phase definitions for the schedule.
58730
58756
  *
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4S63ZJ56.mjs";
3
+ } from "../chunk-NOJP6FIN.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-IDGAWOWG.mjs";
7
- import "../chunk-UNI5JBUD.mjs";
8
- import "../chunk-POJBSIOX.mjs";
6
+ import "../chunk-6RGLO6FV.mjs";
7
+ import "../chunk-ZFFEG27F.mjs";
8
+ import "../chunk-KSYN5FLV.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
@@ -3687,6 +3687,10 @@ var BalanceBillingMethod = {
3687
3687
  Prepaid: "prepaid",
3688
3688
  UsageBased: "usage_based"
3689
3689
  };
3690
+ var BalanceSource = {
3691
+ Customer: "customer",
3692
+ Entity: "entity"
3693
+ };
3690
3694
  var BalanceType$inboundSchema = inboundSchema(BalanceType);
3691
3695
  var BalanceDimensions6$inboundSchema = z15.pipe(
3692
3696
  z15.object({
@@ -4047,6 +4051,10 @@ var BalancePrice$inboundSchema = z15.pipe(
4047
4051
  });
4048
4052
  })
4049
4053
  );
4054
+ var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
4055
+ var Allocation$inboundSchema = z15.object({
4056
+ amount: number2()
4057
+ });
4050
4058
  var Breakdown$inboundSchema = z15.pipe(
4051
4059
  z15.object({
4052
4060
  id: z15._default(string5(), ""),
@@ -4058,7 +4066,11 @@ var Breakdown$inboundSchema = z15.pipe(
4058
4066
  unlimited: boolean2(),
4059
4067
  reset: nullable(z15.lazy(() => BalanceReset$inboundSchema)),
4060
4068
  price: nullable(z15.lazy(() => BalancePrice$inboundSchema)),
4061
- expires_at: nullable(number2())
4069
+ expires_at: nullable(number2()),
4070
+ source: optional3(BalanceSource$inboundSchema),
4071
+ allocation: z15.optional(
4072
+ z15.nullable(z15.lazy(() => Allocation$inboundSchema))
4073
+ )
4062
4074
  }),
4063
4075
  z15.transform((v) => {
4064
4076
  return remap(v, {
@@ -4095,7 +4107,9 @@ var Balance$inboundSchema = z15.pipe(
4095
4107
  breakdown: optional3(z15.array(z15.lazy(() => Breakdown$inboundSchema))),
4096
4108
  rollovers: optional3(z15.array(z15.lazy(
4097
4109
  () => BalanceRollover$inboundSchema
4098
- )))
4110
+ ))),
4111
+ allocated: optional3(number2()),
4112
+ unallocated: optional3(number2())
4099
4113
  }),
4100
4114
  z15.transform((v) => {
4101
4115
  return remap(v, {
@@ -21152,7 +21166,7 @@ var CustomerAutoTopupInterval1 = {
21152
21166
  Week: "week",
21153
21167
  Month: "month"
21154
21168
  };
21155
- var AutoTopupSource = {
21169
+ var CustomerAutoTopupSource = {
21156
21170
  Customer: "customer",
21157
21171
  Plan: "plan"
21158
21172
  };
@@ -21160,7 +21174,7 @@ var CustomerLimitType = {
21160
21174
  Absolute: "absolute",
21161
21175
  UsagePercentage: "usage_percentage"
21162
21176
  };
21163
- var SpendLimitSource = {
21177
+ var CustomerSpendLimitSource = {
21164
21178
  Customer: "customer",
21165
21179
  Plan: "plan"
21166
21180
  };
@@ -21174,7 +21188,7 @@ var CustomerAnchor = {
21174
21188
  BillingCycle: "billing_cycle",
21175
21189
  Utc: "utc"
21176
21190
  };
21177
- var UsageLimitSource = {
21191
+ var CustomerUsageLimitSource = {
21178
21192
  Customer: "customer",
21179
21193
  Plan: "plan"
21180
21194
  };
@@ -21190,11 +21204,11 @@ var CustomerBasis = {
21190
21204
  Recurring: "recurring",
21191
21205
  UsageLimit: "usage_limit"
21192
21206
  };
21193
- var UsageAlertSource = {
21207
+ var CustomerUsageAlertSource = {
21194
21208
  Customer: "customer",
21195
21209
  Plan: "plan"
21196
21210
  };
21197
- var OverageAllowedSource = {
21211
+ var CustomerOverageAllowedSource = {
21198
21212
  Customer: "customer",
21199
21213
  Plan: "plan"
21200
21214
  };
@@ -21287,7 +21301,7 @@ var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
21287
21301
  z39.lazy(() => CustomerPurchaseLimit1$inboundSchema),
21288
21302
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21289
21303
  ]);
21290
- var AutoTopupSource$inboundSchema = inboundSchema(AutoTopupSource);
21304
+ var CustomerAutoTopupSource$inboundSchema = inboundSchema(CustomerAutoTopupSource);
21291
21305
  var CustomerAutoTopup$inboundSchema = z39.pipe(
21292
21306
  z39.object({
21293
21307
  feature_id: string5(),
@@ -21299,7 +21313,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21299
21313
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21300
21314
  ])),
21301
21315
  invoice_mode: optional3(boolean2()),
21302
- source: optional3(AutoTopupSource$inboundSchema)
21316
+ source: optional3(CustomerAutoTopupSource$inboundSchema)
21303
21317
  }),
21304
21318
  z39.transform((v) => {
21305
21319
  return remap(v, {
@@ -21310,7 +21324,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21310
21324
  })
21311
21325
  );
21312
21326
  var CustomerLimitType$inboundSchema = inboundSchema(CustomerLimitType);
21313
- var SpendLimitSource$inboundSchema = inboundSchema(SpendLimitSource);
21327
+ var CustomerSpendLimitSource$inboundSchema = inboundSchema(CustomerSpendLimitSource);
21314
21328
  var CustomerSpendLimit$inboundSchema = z39.pipe(
21315
21329
  z39.object({
21316
21330
  feature_id: optional3(string5()),
@@ -21318,7 +21332,7 @@ var CustomerSpendLimit$inboundSchema = z39.pipe(
21318
21332
  limit_type: optional3(CustomerLimitType$inboundSchema),
21319
21333
  overage_limit: optional3(number2()),
21320
21334
  skip_overage_billing: optional3(boolean2()),
21321
- source: optional3(SpendLimitSource$inboundSchema)
21335
+ source: optional3(CustomerSpendLimitSource$inboundSchema)
21322
21336
  }),
21323
21337
  z39.transform((v) => {
21324
21338
  return remap(v, {
@@ -21334,7 +21348,7 @@ var CustomerAnchor$inboundSchema = inboundSchema(CustomerAnchor);
21334
21348
  var CustomerUsageLimitFilter$inboundSchema = z39.object({
21335
21349
  properties: z39.record(z39.string(), string5())
21336
21350
  });
21337
- var UsageLimitSource$inboundSchema = inboundSchema(UsageLimitSource);
21351
+ var CustomerUsageLimitSource$inboundSchema = inboundSchema(CustomerUsageLimitSource);
21338
21352
  var CustomerUsageLimit$inboundSchema = z39.pipe(
21339
21353
  z39.object({
21340
21354
  feature_id: string5(),
@@ -21346,7 +21360,7 @@ var CustomerUsageLimit$inboundSchema = z39.pipe(
21346
21360
  z39.lazy(() => CustomerUsageLimitFilter$inboundSchema)
21347
21361
  ),
21348
21362
  usage: optional3(number2()),
21349
- source: optional3(UsageLimitSource$inboundSchema)
21363
+ source: optional3(CustomerUsageLimitSource$inboundSchema)
21350
21364
  }),
21351
21365
  z39.transform((v) => {
21352
21366
  return remap(v, {
@@ -21359,7 +21373,7 @@ var CustomerBasis$inboundSchema = inboundSchema(CustomerBasis);
21359
21373
  var CustomerUsageAlertFilter$inboundSchema = z39.object({
21360
21374
  properties: z39.record(z39.string(), string5())
21361
21375
  });
21362
- var UsageAlertSource$inboundSchema = inboundSchema(UsageAlertSource);
21376
+ var CustomerUsageAlertSource$inboundSchema = inboundSchema(CustomerUsageAlertSource);
21363
21377
  var CustomerUsageAlert$inboundSchema = z39.pipe(
21364
21378
  z39.object({
21365
21379
  feature_id: optional3(string5()),
@@ -21371,7 +21385,7 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21371
21385
  z39.lazy(() => CustomerUsageAlertFilter$inboundSchema)
21372
21386
  ),
21373
21387
  name: optional3(string5()),
21374
- source: optional3(UsageAlertSource$inboundSchema)
21388
+ source: optional3(CustomerUsageAlertSource$inboundSchema)
21375
21389
  }),
21376
21390
  z39.transform((v) => {
21377
21391
  return remap(v, {
@@ -21380,12 +21394,12 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21380
21394
  });
21381
21395
  })
21382
21396
  );
21383
- var OverageAllowedSource$inboundSchema = inboundSchema(OverageAllowedSource);
21397
+ var CustomerOverageAllowedSource$inboundSchema = inboundSchema(CustomerOverageAllowedSource);
21384
21398
  var CustomerOverageAllowed$inboundSchema = z39.pipe(
21385
21399
  z39.object({
21386
21400
  feature_id: string5(),
21387
21401
  enabled: z39._default(boolean2(), false),
21388
- source: optional3(OverageAllowedSource$inboundSchema)
21402
+ source: optional3(CustomerOverageAllowedSource$inboundSchema)
21389
21403
  }),
21390
21404
  z39.transform((v) => {
21391
21405
  return remap(v, {
@@ -28158,6 +28172,10 @@ var ListBalancesBillingMethod = {
28158
28172
  Prepaid: "prepaid",
28159
28173
  UsageBased: "usage_based"
28160
28174
  };
28175
+ var ListBalancesSource = {
28176
+ Customer: "customer",
28177
+ Entity: "entity"
28178
+ };
28161
28179
  var ListBalancesListStatus = {
28162
28180
  Active: "active",
28163
28181
  Expired: "expired"
@@ -28236,6 +28254,10 @@ var ListBalancesPrice$inboundSchema = z66.pipe(
28236
28254
  });
28237
28255
  })
28238
28256
  );
28257
+ var ListBalancesSource$inboundSchema = inboundSchema(ListBalancesSource);
28258
+ var ListBalancesAllocation$inboundSchema = z66.object({
28259
+ amount: number2()
28260
+ });
28239
28261
  var ListBalancesListStatus$inboundSchema = inboundSchema(ListBalancesListStatus);
28240
28262
  var ListBalancesRollover$inboundSchema = z66.pipe(
28241
28263
  z66.object({
@@ -28261,6 +28283,10 @@ var ListBalancesList$inboundSchema = z66.pipe(
28261
28283
  reset: nullable(z66.lazy(() => ListBalancesReset$inboundSchema)),
28262
28284
  price: nullable(z66.lazy(() => ListBalancesPrice$inboundSchema)),
28263
28285
  expires_at: nullable(number2()),
28286
+ source: optional3(ListBalancesSource$inboundSchema),
28287
+ allocation: z66.optional(
28288
+ z66.nullable(z66.lazy(() => ListBalancesAllocation$inboundSchema))
28289
+ ),
28264
28290
  feature_id: string5(),
28265
28291
  status: ListBalancesListStatus$inboundSchema,
28266
28292
  rollovers: z66.array(z66.lazy(() => ListBalancesRollover$inboundSchema)),
@@ -58724,7 +58750,7 @@ var Billing = class extends ClientSDK {
58724
58750
  * @param noBillingChanges - If true, skips any billing changes for the schedule. (optional)
58725
58751
  * @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
58726
58752
  * @param enablePlanImmediately - If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed. (optional)
58727
- * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not declare are always retained. (optional)
58753
+ * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not list keep running until a listed plan in their group replaces them or the schedule ends. (optional)
58728
58754
  * @param unscheduledPlans - Plans billed with the immediate phase that the schedule never expires or replaces. No phase may declare a plan in the same group and scope. (optional)
58729
58755
  * @param phases - Ordered phase definitions for the schedule.
58730
58756
  *
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-JN27ZIEU.mjs";
3
+ } from "../chunk-C4IENXIG.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-IDGAWOWG.mjs";
7
- import "../chunk-UNI5JBUD.mjs";
8
- import "../chunk-POJBSIOX.mjs";
6
+ import "../chunk-6RGLO6FV.mjs";
7
+ import "../chunk-ZFFEG27F.mjs";
8
+ import "../chunk-KSYN5FLV.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
@@ -3687,6 +3687,10 @@ var BalanceBillingMethod = {
3687
3687
  Prepaid: "prepaid",
3688
3688
  UsageBased: "usage_based"
3689
3689
  };
3690
+ var BalanceSource = {
3691
+ Customer: "customer",
3692
+ Entity: "entity"
3693
+ };
3690
3694
  var BalanceType$inboundSchema = inboundSchema(BalanceType);
3691
3695
  var BalanceDimensions6$inboundSchema = z15.pipe(
3692
3696
  z15.object({
@@ -4047,6 +4051,10 @@ var BalancePrice$inboundSchema = z15.pipe(
4047
4051
  });
4048
4052
  })
4049
4053
  );
4054
+ var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
4055
+ var Allocation$inboundSchema = z15.object({
4056
+ amount: number2()
4057
+ });
4050
4058
  var Breakdown$inboundSchema = z15.pipe(
4051
4059
  z15.object({
4052
4060
  id: z15._default(string5(), ""),
@@ -4058,7 +4066,11 @@ var Breakdown$inboundSchema = z15.pipe(
4058
4066
  unlimited: boolean2(),
4059
4067
  reset: nullable(z15.lazy(() => BalanceReset$inboundSchema)),
4060
4068
  price: nullable(z15.lazy(() => BalancePrice$inboundSchema)),
4061
- expires_at: nullable(number2())
4069
+ expires_at: nullable(number2()),
4070
+ source: optional3(BalanceSource$inboundSchema),
4071
+ allocation: z15.optional(
4072
+ z15.nullable(z15.lazy(() => Allocation$inboundSchema))
4073
+ )
4062
4074
  }),
4063
4075
  z15.transform((v) => {
4064
4076
  return remap(v, {
@@ -4095,7 +4107,9 @@ var Balance$inboundSchema = z15.pipe(
4095
4107
  breakdown: optional3(z15.array(z15.lazy(() => Breakdown$inboundSchema))),
4096
4108
  rollovers: optional3(z15.array(z15.lazy(
4097
4109
  () => BalanceRollover$inboundSchema
4098
- )))
4110
+ ))),
4111
+ allocated: optional3(number2()),
4112
+ unallocated: optional3(number2())
4099
4113
  }),
4100
4114
  z15.transform((v) => {
4101
4115
  return remap(v, {
@@ -21152,7 +21166,7 @@ var CustomerAutoTopupInterval1 = {
21152
21166
  Week: "week",
21153
21167
  Month: "month"
21154
21168
  };
21155
- var AutoTopupSource = {
21169
+ var CustomerAutoTopupSource = {
21156
21170
  Customer: "customer",
21157
21171
  Plan: "plan"
21158
21172
  };
@@ -21160,7 +21174,7 @@ var CustomerLimitType = {
21160
21174
  Absolute: "absolute",
21161
21175
  UsagePercentage: "usage_percentage"
21162
21176
  };
21163
- var SpendLimitSource = {
21177
+ var CustomerSpendLimitSource = {
21164
21178
  Customer: "customer",
21165
21179
  Plan: "plan"
21166
21180
  };
@@ -21174,7 +21188,7 @@ var CustomerAnchor = {
21174
21188
  BillingCycle: "billing_cycle",
21175
21189
  Utc: "utc"
21176
21190
  };
21177
- var UsageLimitSource = {
21191
+ var CustomerUsageLimitSource = {
21178
21192
  Customer: "customer",
21179
21193
  Plan: "plan"
21180
21194
  };
@@ -21190,11 +21204,11 @@ var CustomerBasis = {
21190
21204
  Recurring: "recurring",
21191
21205
  UsageLimit: "usage_limit"
21192
21206
  };
21193
- var UsageAlertSource = {
21207
+ var CustomerUsageAlertSource = {
21194
21208
  Customer: "customer",
21195
21209
  Plan: "plan"
21196
21210
  };
21197
- var OverageAllowedSource = {
21211
+ var CustomerOverageAllowedSource = {
21198
21212
  Customer: "customer",
21199
21213
  Plan: "plan"
21200
21214
  };
@@ -21287,7 +21301,7 @@ var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
21287
21301
  z39.lazy(() => CustomerPurchaseLimit1$inboundSchema),
21288
21302
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21289
21303
  ]);
21290
- var AutoTopupSource$inboundSchema = inboundSchema(AutoTopupSource);
21304
+ var CustomerAutoTopupSource$inboundSchema = inboundSchema(CustomerAutoTopupSource);
21291
21305
  var CustomerAutoTopup$inboundSchema = z39.pipe(
21292
21306
  z39.object({
21293
21307
  feature_id: string5(),
@@ -21299,7 +21313,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21299
21313
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21300
21314
  ])),
21301
21315
  invoice_mode: optional3(boolean2()),
21302
- source: optional3(AutoTopupSource$inboundSchema)
21316
+ source: optional3(CustomerAutoTopupSource$inboundSchema)
21303
21317
  }),
21304
21318
  z39.transform((v) => {
21305
21319
  return remap(v, {
@@ -21310,7 +21324,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21310
21324
  })
21311
21325
  );
21312
21326
  var CustomerLimitType$inboundSchema = inboundSchema(CustomerLimitType);
21313
- var SpendLimitSource$inboundSchema = inboundSchema(SpendLimitSource);
21327
+ var CustomerSpendLimitSource$inboundSchema = inboundSchema(CustomerSpendLimitSource);
21314
21328
  var CustomerSpendLimit$inboundSchema = z39.pipe(
21315
21329
  z39.object({
21316
21330
  feature_id: optional3(string5()),
@@ -21318,7 +21332,7 @@ var CustomerSpendLimit$inboundSchema = z39.pipe(
21318
21332
  limit_type: optional3(CustomerLimitType$inboundSchema),
21319
21333
  overage_limit: optional3(number2()),
21320
21334
  skip_overage_billing: optional3(boolean2()),
21321
- source: optional3(SpendLimitSource$inboundSchema)
21335
+ source: optional3(CustomerSpendLimitSource$inboundSchema)
21322
21336
  }),
21323
21337
  z39.transform((v) => {
21324
21338
  return remap(v, {
@@ -21334,7 +21348,7 @@ var CustomerAnchor$inboundSchema = inboundSchema(CustomerAnchor);
21334
21348
  var CustomerUsageLimitFilter$inboundSchema = z39.object({
21335
21349
  properties: z39.record(z39.string(), string5())
21336
21350
  });
21337
- var UsageLimitSource$inboundSchema = inboundSchema(UsageLimitSource);
21351
+ var CustomerUsageLimitSource$inboundSchema = inboundSchema(CustomerUsageLimitSource);
21338
21352
  var CustomerUsageLimit$inboundSchema = z39.pipe(
21339
21353
  z39.object({
21340
21354
  feature_id: string5(),
@@ -21346,7 +21360,7 @@ var CustomerUsageLimit$inboundSchema = z39.pipe(
21346
21360
  z39.lazy(() => CustomerUsageLimitFilter$inboundSchema)
21347
21361
  ),
21348
21362
  usage: optional3(number2()),
21349
- source: optional3(UsageLimitSource$inboundSchema)
21363
+ source: optional3(CustomerUsageLimitSource$inboundSchema)
21350
21364
  }),
21351
21365
  z39.transform((v) => {
21352
21366
  return remap(v, {
@@ -21359,7 +21373,7 @@ var CustomerBasis$inboundSchema = inboundSchema(CustomerBasis);
21359
21373
  var CustomerUsageAlertFilter$inboundSchema = z39.object({
21360
21374
  properties: z39.record(z39.string(), string5())
21361
21375
  });
21362
- var UsageAlertSource$inboundSchema = inboundSchema(UsageAlertSource);
21376
+ var CustomerUsageAlertSource$inboundSchema = inboundSchema(CustomerUsageAlertSource);
21363
21377
  var CustomerUsageAlert$inboundSchema = z39.pipe(
21364
21378
  z39.object({
21365
21379
  feature_id: optional3(string5()),
@@ -21371,7 +21385,7 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21371
21385
  z39.lazy(() => CustomerUsageAlertFilter$inboundSchema)
21372
21386
  ),
21373
21387
  name: optional3(string5()),
21374
- source: optional3(UsageAlertSource$inboundSchema)
21388
+ source: optional3(CustomerUsageAlertSource$inboundSchema)
21375
21389
  }),
21376
21390
  z39.transform((v) => {
21377
21391
  return remap(v, {
@@ -21380,12 +21394,12 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21380
21394
  });
21381
21395
  })
21382
21396
  );
21383
- var OverageAllowedSource$inboundSchema = inboundSchema(OverageAllowedSource);
21397
+ var CustomerOverageAllowedSource$inboundSchema = inboundSchema(CustomerOverageAllowedSource);
21384
21398
  var CustomerOverageAllowed$inboundSchema = z39.pipe(
21385
21399
  z39.object({
21386
21400
  feature_id: string5(),
21387
21401
  enabled: z39._default(boolean2(), false),
21388
- source: optional3(OverageAllowedSource$inboundSchema)
21402
+ source: optional3(CustomerOverageAllowedSource$inboundSchema)
21389
21403
  }),
21390
21404
  z39.transform((v) => {
21391
21405
  return remap(v, {
@@ -28158,6 +28172,10 @@ var ListBalancesBillingMethod = {
28158
28172
  Prepaid: "prepaid",
28159
28173
  UsageBased: "usage_based"
28160
28174
  };
28175
+ var ListBalancesSource = {
28176
+ Customer: "customer",
28177
+ Entity: "entity"
28178
+ };
28161
28179
  var ListBalancesListStatus = {
28162
28180
  Active: "active",
28163
28181
  Expired: "expired"
@@ -28236,6 +28254,10 @@ var ListBalancesPrice$inboundSchema = z66.pipe(
28236
28254
  });
28237
28255
  })
28238
28256
  );
28257
+ var ListBalancesSource$inboundSchema = inboundSchema(ListBalancesSource);
28258
+ var ListBalancesAllocation$inboundSchema = z66.object({
28259
+ amount: number2()
28260
+ });
28239
28261
  var ListBalancesListStatus$inboundSchema = inboundSchema(ListBalancesListStatus);
28240
28262
  var ListBalancesRollover$inboundSchema = z66.pipe(
28241
28263
  z66.object({
@@ -28261,6 +28283,10 @@ var ListBalancesList$inboundSchema = z66.pipe(
28261
28283
  reset: nullable(z66.lazy(() => ListBalancesReset$inboundSchema)),
28262
28284
  price: nullable(z66.lazy(() => ListBalancesPrice$inboundSchema)),
28263
28285
  expires_at: nullable(number2()),
28286
+ source: optional3(ListBalancesSource$inboundSchema),
28287
+ allocation: z66.optional(
28288
+ z66.nullable(z66.lazy(() => ListBalancesAllocation$inboundSchema))
28289
+ ),
28264
28290
  feature_id: string5(),
28265
28291
  status: ListBalancesListStatus$inboundSchema,
28266
28292
  rollovers: z66.array(z66.lazy(() => ListBalancesRollover$inboundSchema)),
@@ -58724,7 +58750,7 @@ var Billing = class extends ClientSDK {
58724
58750
  * @param noBillingChanges - If true, skips any billing changes for the schedule. (optional)
58725
58751
  * @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
58726
58752
  * @param enablePlanImmediately - If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed. (optional)
58727
- * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not declare are always retained. (optional)
58753
+ * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not list keep running until a listed plan in their group replaces them or the schedule ends. (optional)
58728
58754
  * @param unscheduledPlans - Plans billed with the immediate phase that the schedule never expires or replaces. No phase may declare a plan in the same group and scope. (optional)
58729
58755
  * @param phases - Ordered phase definitions for the schedule.
58730
58756
  *
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-WNSOQEDD.mjs";
3
+ } from "../chunk-DZBBXOKT.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-IDGAWOWG.mjs";
7
- import "../chunk-UNI5JBUD.mjs";
8
- import "../chunk-POJBSIOX.mjs";
6
+ import "../chunk-6RGLO6FV.mjs";
7
+ import "../chunk-ZFFEG27F.mjs";
8
+ import "../chunk-KSYN5FLV.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";