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
@@ -3695,6 +3695,10 @@ var BalanceBillingMethod = {
3695
3695
  Prepaid: "prepaid",
3696
3696
  UsageBased: "usage_based"
3697
3697
  };
3698
+ var BalanceSource = {
3699
+ Customer: "customer",
3700
+ Entity: "entity"
3701
+ };
3698
3702
  var BalanceType$inboundSchema = inboundSchema(BalanceType);
3699
3703
  var BalanceDimensions6$inboundSchema = z15.pipe(
3700
3704
  z15.object({
@@ -4055,6 +4059,10 @@ var BalancePrice$inboundSchema = z15.pipe(
4055
4059
  });
4056
4060
  })
4057
4061
  );
4062
+ var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
4063
+ var Allocation$inboundSchema = z15.object({
4064
+ amount: number2()
4065
+ });
4058
4066
  var Breakdown$inboundSchema = z15.pipe(
4059
4067
  z15.object({
4060
4068
  id: z15._default(string5(), ""),
@@ -4066,7 +4074,11 @@ var Breakdown$inboundSchema = z15.pipe(
4066
4074
  unlimited: boolean2(),
4067
4075
  reset: nullable(z15.lazy(() => BalanceReset$inboundSchema)),
4068
4076
  price: nullable(z15.lazy(() => BalancePrice$inboundSchema)),
4069
- expires_at: nullable(number2())
4077
+ expires_at: nullable(number2()),
4078
+ source: optional3(BalanceSource$inboundSchema),
4079
+ allocation: z15.optional(
4080
+ z15.nullable(z15.lazy(() => Allocation$inboundSchema))
4081
+ )
4070
4082
  }),
4071
4083
  z15.transform((v) => {
4072
4084
  return remap(v, {
@@ -4103,7 +4115,9 @@ var Balance$inboundSchema = z15.pipe(
4103
4115
  breakdown: optional3(z15.array(z15.lazy(() => Breakdown$inboundSchema))),
4104
4116
  rollovers: optional3(z15.array(z15.lazy(
4105
4117
  () => BalanceRollover$inboundSchema
4106
- )))
4118
+ ))),
4119
+ allocated: optional3(number2()),
4120
+ unallocated: optional3(number2())
4107
4121
  }),
4108
4122
  z15.transform((v) => {
4109
4123
  return remap(v, {
@@ -21160,7 +21174,7 @@ var CustomerAutoTopupInterval1 = {
21160
21174
  Week: "week",
21161
21175
  Month: "month"
21162
21176
  };
21163
- var AutoTopupSource = {
21177
+ var CustomerAutoTopupSource = {
21164
21178
  Customer: "customer",
21165
21179
  Plan: "plan"
21166
21180
  };
@@ -21168,7 +21182,7 @@ var CustomerLimitType = {
21168
21182
  Absolute: "absolute",
21169
21183
  UsagePercentage: "usage_percentage"
21170
21184
  };
21171
- var SpendLimitSource = {
21185
+ var CustomerSpendLimitSource = {
21172
21186
  Customer: "customer",
21173
21187
  Plan: "plan"
21174
21188
  };
@@ -21182,7 +21196,7 @@ var CustomerAnchor = {
21182
21196
  BillingCycle: "billing_cycle",
21183
21197
  Utc: "utc"
21184
21198
  };
21185
- var UsageLimitSource = {
21199
+ var CustomerUsageLimitSource = {
21186
21200
  Customer: "customer",
21187
21201
  Plan: "plan"
21188
21202
  };
@@ -21198,11 +21212,11 @@ var CustomerBasis = {
21198
21212
  Recurring: "recurring",
21199
21213
  UsageLimit: "usage_limit"
21200
21214
  };
21201
- var UsageAlertSource = {
21215
+ var CustomerUsageAlertSource = {
21202
21216
  Customer: "customer",
21203
21217
  Plan: "plan"
21204
21218
  };
21205
- var OverageAllowedSource = {
21219
+ var CustomerOverageAllowedSource = {
21206
21220
  Customer: "customer",
21207
21221
  Plan: "plan"
21208
21222
  };
@@ -21295,7 +21309,7 @@ var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
21295
21309
  z39.lazy(() => CustomerPurchaseLimit1$inboundSchema),
21296
21310
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21297
21311
  ]);
21298
- var AutoTopupSource$inboundSchema = inboundSchema(AutoTopupSource);
21312
+ var CustomerAutoTopupSource$inboundSchema = inboundSchema(CustomerAutoTopupSource);
21299
21313
  var CustomerAutoTopup$inboundSchema = z39.pipe(
21300
21314
  z39.object({
21301
21315
  feature_id: string5(),
@@ -21307,7 +21321,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21307
21321
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21308
21322
  ])),
21309
21323
  invoice_mode: optional3(boolean2()),
21310
- source: optional3(AutoTopupSource$inboundSchema)
21324
+ source: optional3(CustomerAutoTopupSource$inboundSchema)
21311
21325
  }),
21312
21326
  z39.transform((v) => {
21313
21327
  return remap(v, {
@@ -21318,7 +21332,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21318
21332
  })
21319
21333
  );
21320
21334
  var CustomerLimitType$inboundSchema = inboundSchema(CustomerLimitType);
21321
- var SpendLimitSource$inboundSchema = inboundSchema(SpendLimitSource);
21335
+ var CustomerSpendLimitSource$inboundSchema = inboundSchema(CustomerSpendLimitSource);
21322
21336
  var CustomerSpendLimit$inboundSchema = z39.pipe(
21323
21337
  z39.object({
21324
21338
  feature_id: optional3(string5()),
@@ -21326,7 +21340,7 @@ var CustomerSpendLimit$inboundSchema = z39.pipe(
21326
21340
  limit_type: optional3(CustomerLimitType$inboundSchema),
21327
21341
  overage_limit: optional3(number2()),
21328
21342
  skip_overage_billing: optional3(boolean2()),
21329
- source: optional3(SpendLimitSource$inboundSchema)
21343
+ source: optional3(CustomerSpendLimitSource$inboundSchema)
21330
21344
  }),
21331
21345
  z39.transform((v) => {
21332
21346
  return remap(v, {
@@ -21342,7 +21356,7 @@ var CustomerAnchor$inboundSchema = inboundSchema(CustomerAnchor);
21342
21356
  var CustomerUsageLimitFilter$inboundSchema = z39.object({
21343
21357
  properties: z39.record(z39.string(), string5())
21344
21358
  });
21345
- var UsageLimitSource$inboundSchema = inboundSchema(UsageLimitSource);
21359
+ var CustomerUsageLimitSource$inboundSchema = inboundSchema(CustomerUsageLimitSource);
21346
21360
  var CustomerUsageLimit$inboundSchema = z39.pipe(
21347
21361
  z39.object({
21348
21362
  feature_id: string5(),
@@ -21354,7 +21368,7 @@ var CustomerUsageLimit$inboundSchema = z39.pipe(
21354
21368
  z39.lazy(() => CustomerUsageLimitFilter$inboundSchema)
21355
21369
  ),
21356
21370
  usage: optional3(number2()),
21357
- source: optional3(UsageLimitSource$inboundSchema)
21371
+ source: optional3(CustomerUsageLimitSource$inboundSchema)
21358
21372
  }),
21359
21373
  z39.transform((v) => {
21360
21374
  return remap(v, {
@@ -21367,7 +21381,7 @@ var CustomerBasis$inboundSchema = inboundSchema(CustomerBasis);
21367
21381
  var CustomerUsageAlertFilter$inboundSchema = z39.object({
21368
21382
  properties: z39.record(z39.string(), string5())
21369
21383
  });
21370
- var UsageAlertSource$inboundSchema = inboundSchema(UsageAlertSource);
21384
+ var CustomerUsageAlertSource$inboundSchema = inboundSchema(CustomerUsageAlertSource);
21371
21385
  var CustomerUsageAlert$inboundSchema = z39.pipe(
21372
21386
  z39.object({
21373
21387
  feature_id: optional3(string5()),
@@ -21379,7 +21393,7 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21379
21393
  z39.lazy(() => CustomerUsageAlertFilter$inboundSchema)
21380
21394
  ),
21381
21395
  name: optional3(string5()),
21382
- source: optional3(UsageAlertSource$inboundSchema)
21396
+ source: optional3(CustomerUsageAlertSource$inboundSchema)
21383
21397
  }),
21384
21398
  z39.transform((v) => {
21385
21399
  return remap(v, {
@@ -21388,12 +21402,12 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21388
21402
  });
21389
21403
  })
21390
21404
  );
21391
- var OverageAllowedSource$inboundSchema = inboundSchema(OverageAllowedSource);
21405
+ var CustomerOverageAllowedSource$inboundSchema = inboundSchema(CustomerOverageAllowedSource);
21392
21406
  var CustomerOverageAllowed$inboundSchema = z39.pipe(
21393
21407
  z39.object({
21394
21408
  feature_id: string5(),
21395
21409
  enabled: z39._default(boolean2(), false),
21396
- source: optional3(OverageAllowedSource$inboundSchema)
21410
+ source: optional3(CustomerOverageAllowedSource$inboundSchema)
21397
21411
  }),
21398
21412
  z39.transform((v) => {
21399
21413
  return remap(v, {
@@ -28166,6 +28180,10 @@ var ListBalancesBillingMethod = {
28166
28180
  Prepaid: "prepaid",
28167
28181
  UsageBased: "usage_based"
28168
28182
  };
28183
+ var ListBalancesSource = {
28184
+ Customer: "customer",
28185
+ Entity: "entity"
28186
+ };
28169
28187
  var ListBalancesListStatus = {
28170
28188
  Active: "active",
28171
28189
  Expired: "expired"
@@ -28244,6 +28262,10 @@ var ListBalancesPrice$inboundSchema = z66.pipe(
28244
28262
  });
28245
28263
  })
28246
28264
  );
28265
+ var ListBalancesSource$inboundSchema = inboundSchema(ListBalancesSource);
28266
+ var ListBalancesAllocation$inboundSchema = z66.object({
28267
+ amount: number2()
28268
+ });
28247
28269
  var ListBalancesListStatus$inboundSchema = inboundSchema(ListBalancesListStatus);
28248
28270
  var ListBalancesRollover$inboundSchema = z66.pipe(
28249
28271
  z66.object({
@@ -28269,6 +28291,10 @@ var ListBalancesList$inboundSchema = z66.pipe(
28269
28291
  reset: nullable(z66.lazy(() => ListBalancesReset$inboundSchema)),
28270
28292
  price: nullable(z66.lazy(() => ListBalancesPrice$inboundSchema)),
28271
28293
  expires_at: nullable(number2()),
28294
+ source: optional3(ListBalancesSource$inboundSchema),
28295
+ allocation: z66.optional(
28296
+ z66.nullable(z66.lazy(() => ListBalancesAllocation$inboundSchema))
28297
+ ),
28272
28298
  feature_id: string5(),
28273
28299
  status: ListBalancesListStatus$inboundSchema,
28274
28300
  rollovers: z66.array(z66.lazy(() => ListBalancesRollover$inboundSchema)),
@@ -58732,7 +58758,7 @@ var Billing = class extends ClientSDK {
58732
58758
  * @param noBillingChanges - If true, skips any billing changes for the schedule. (optional)
58733
58759
  * @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
58734
58760
  * @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)
58735
- * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not declare are always retained. (optional)
58761
+ * @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)
58736
58762
  * @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)
58737
58763
  * @param phases - Ordered phase definitions for the schedule.
58738
58764
  *
@@ -2,11 +2,11 @@ import "../chunk-WYDGEDEU.mjs";
2
2
  import "../chunk-VXND2UDT.mjs";
3
3
  import {
4
4
  handleRouteByName
5
- } from "../chunk-IDGAWOWG.mjs";
5
+ } from "../chunk-6RGLO6FV.mjs";
6
6
  import {
7
7
  createCoreHandler
8
- } from "../chunk-UNI5JBUD.mjs";
9
- import "../chunk-POJBSIOX.mjs";
8
+ } from "../chunk-ZFFEG27F.mjs";
9
+ import "../chunk-KSYN5FLV.mjs";
10
10
  import "../chunk-MOHYGUMA.mjs";
11
11
  import "../chunk-TBQ27LIK.mjs";
12
12
  import "../chunk-J44WR3QZ.mjs";
@@ -1,7 +1,7 @@
1
1
  export { RouteMatch, buildRouter } from './routeBuilder.mjs';
2
2
  export { routeConfigs } from './routeConfigs.mjs';
3
3
  import 'rou3';
4
- import '../../routeTypes-C90LbFI_.mjs';
4
+ import '../../routeTypes-DAI_E67X.mjs';
5
5
  import '../../authTypes-TPWTIfcM.mjs';
6
6
  import 'zod/v4';
7
7
  import '../utils/sanitizeBody.mjs';
@@ -1,7 +1,7 @@
1
1
  export { RouteMatch, buildRouter } from './routeBuilder.js';
2
2
  export { routeConfigs } from './routeConfigs.js';
3
3
  import 'rou3';
4
- import '../../routeTypes-Dr-THiSK.js';
4
+ import '../../routeTypes-4TatmvQY.js';
5
5
  import '../../authTypes-TPWTIfcM.js';
6
6
  import 'zod/v4';
7
7
  import '../utils/sanitizeBody.js';
@@ -1,5 +1,5 @@
1
1
  import { RouterContext } from 'rou3';
2
- import { R as RouteDefinition } from '../../routeTypes-C90LbFI_.mjs';
2
+ import { R as RouteDefinition } from '../../routeTypes-DAI_E67X.mjs';
3
3
  import '../../authTypes-TPWTIfcM.mjs';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.mjs';
@@ -1,5 +1,5 @@
1
1
  import { RouterContext } from 'rou3';
2
- import { R as RouteDefinition } from '../../routeTypes-Dr-THiSK.js';
2
+ import { R as RouteDefinition } from '../../routeTypes-4TatmvQY.js';
3
3
  import '../../authTypes-TPWTIfcM.js';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.js';
@@ -1,4 +1,4 @@
1
- import { R as RouteDefinition, b as RouteName } from '../../routeTypes-C90LbFI_.mjs';
1
+ import { R as RouteDefinition, b as RouteName } from '../../routeTypes-DAI_E67X.mjs';
2
2
  import '../../authTypes-TPWTIfcM.mjs';
3
3
  import 'zod/v4';
4
4
  import '../utils/sanitizeBody.mjs';
@@ -1,4 +1,4 @@
1
- import { R as RouteDefinition, b as RouteName } from '../../routeTypes-Dr-THiSK.js';
1
+ import { R as RouteDefinition, b as RouteName } from '../../routeTypes-4TatmvQY.js';
2
2
  import '../../authTypes-TPWTIfcM.js';
3
3
  import 'zod/v4';
4
4
  import '../utils/sanitizeBody.js';
@@ -1,5 +1,5 @@
1
1
  import { A as AuthResult } from '../../authTypes-TPWTIfcM.mjs';
2
- import { R as RouteDefinition } from '../../routeTypes-C90LbFI_.mjs';
2
+ import { R as RouteDefinition } from '../../routeTypes-DAI_E67X.mjs';
3
3
  import './responseTypes.mjs';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.mjs';
@@ -1,5 +1,5 @@
1
1
  import { A as AuthResult } from '../../authTypes-TPWTIfcM.js';
2
- import { R as RouteDefinition } from '../../routeTypes-Dr-THiSK.js';
2
+ import { R as RouteDefinition } from '../../routeTypes-4TatmvQY.js';
3
3
  import './responseTypes.js';
4
4
  import 'zod/v4';
5
5
  import '../utils/sanitizeBody.js';
@@ -1,6 +1,6 @@
1
1
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-TPWTIfcM.mjs';
2
2
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.mjs';
3
3
  export { BackendErrorBody, BackendResult } from './responseTypes.mjs';
4
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-C90LbFI_.mjs';
4
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DAI_E67X.mjs';
5
5
  import 'zod/v4';
6
6
  import '../utils/sanitizeBody.mjs';
@@ -1,6 +1,6 @@
1
1
  export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-TPWTIfcM.js';
2
2
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.js';
3
3
  export { BackendErrorBody, BackendResult } from './responseTypes.js';
4
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-Dr-THiSK.js';
4
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-4TatmvQY.js';
5
5
  import 'zod/v4';
6
6
  import '../utils/sanitizeBody.js';
@@ -1,4 +1,4 @@
1
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-C90LbFI_.mjs';
1
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DAI_E67X.mjs';
2
2
  import 'zod/v4';
3
3
  import '../utils/sanitizeBody.mjs';
4
4
  import '../../authTypes-TPWTIfcM.mjs';
@@ -1,4 +1,4 @@
1
- export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-Dr-THiSK.js';
1
+ export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-4TatmvQY.js';
2
2
  import 'zod/v4';
3
3
  import '../utils/sanitizeBody.js';
4
4
  import '../../authTypes-TPWTIfcM.js';
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-TPWTIfcM.mjs';
3
3
  export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-TPWTIfcM.mjs';
4
4
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.mjs';
5
5
  export { BackendErrorBody, BackendResult } from './core/types/responseTypes.mjs';
6
- import { R as RouteDefinition } from './routeTypes-C90LbFI_.mjs';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-C90LbFI_.mjs';
6
+ import { R as RouteDefinition } from './routeTypes-DAI_E67X.mjs';
7
+ export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-DAI_E67X.mjs';
8
8
  export { buildRouter } from './core/routes/routeBuilder.mjs';
9
9
  export { routeConfigs } from './core/routes/routeConfigs.mjs';
10
10
  export { secretKeyCheck } from './core/utils/secretKeyCheck.mjs';
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-TPWTIfcM.js';
3
3
  export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-TPWTIfcM.js';
4
4
  export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.js';
5
5
  export { BackendErrorBody, BackendResult } from './core/types/responseTypes.js';
6
- import { R as RouteDefinition } from './routeTypes-Dr-THiSK.js';
7
- export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-Dr-THiSK.js';
6
+ import { R as RouteDefinition } from './routeTypes-4TatmvQY.js';
7
+ export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-4TatmvQY.js';
8
8
  export { buildRouter } from './core/routes/routeBuilder.js';
9
9
  export { routeConfigs } from './core/routes/routeConfigs.js';
10
10
  export { secretKeyCheck } from './core/utils/secretKeyCheck.js';
@@ -3695,6 +3695,10 @@ var BalanceBillingMethod = {
3695
3695
  Prepaid: "prepaid",
3696
3696
  UsageBased: "usage_based"
3697
3697
  };
3698
+ var BalanceSource = {
3699
+ Customer: "customer",
3700
+ Entity: "entity"
3701
+ };
3698
3702
  var BalanceType$inboundSchema = inboundSchema(BalanceType);
3699
3703
  var BalanceDimensions6$inboundSchema = z15.pipe(
3700
3704
  z15.object({
@@ -4055,6 +4059,10 @@ var BalancePrice$inboundSchema = z15.pipe(
4055
4059
  });
4056
4060
  })
4057
4061
  );
4062
+ var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
4063
+ var Allocation$inboundSchema = z15.object({
4064
+ amount: number2()
4065
+ });
4058
4066
  var Breakdown$inboundSchema = z15.pipe(
4059
4067
  z15.object({
4060
4068
  id: z15._default(string5(), ""),
@@ -4066,7 +4074,11 @@ var Breakdown$inboundSchema = z15.pipe(
4066
4074
  unlimited: boolean2(),
4067
4075
  reset: nullable(z15.lazy(() => BalanceReset$inboundSchema)),
4068
4076
  price: nullable(z15.lazy(() => BalancePrice$inboundSchema)),
4069
- expires_at: nullable(number2())
4077
+ expires_at: nullable(number2()),
4078
+ source: optional3(BalanceSource$inboundSchema),
4079
+ allocation: z15.optional(
4080
+ z15.nullable(z15.lazy(() => Allocation$inboundSchema))
4081
+ )
4070
4082
  }),
4071
4083
  z15.transform((v) => {
4072
4084
  return remap(v, {
@@ -4103,7 +4115,9 @@ var Balance$inboundSchema = z15.pipe(
4103
4115
  breakdown: optional3(z15.array(z15.lazy(() => Breakdown$inboundSchema))),
4104
4116
  rollovers: optional3(z15.array(z15.lazy(
4105
4117
  () => BalanceRollover$inboundSchema
4106
- )))
4118
+ ))),
4119
+ allocated: optional3(number2()),
4120
+ unallocated: optional3(number2())
4107
4121
  }),
4108
4122
  z15.transform((v) => {
4109
4123
  return remap(v, {
@@ -21160,7 +21174,7 @@ var CustomerAutoTopupInterval1 = {
21160
21174
  Week: "week",
21161
21175
  Month: "month"
21162
21176
  };
21163
- var AutoTopupSource = {
21177
+ var CustomerAutoTopupSource = {
21164
21178
  Customer: "customer",
21165
21179
  Plan: "plan"
21166
21180
  };
@@ -21168,7 +21182,7 @@ var CustomerLimitType = {
21168
21182
  Absolute: "absolute",
21169
21183
  UsagePercentage: "usage_percentage"
21170
21184
  };
21171
- var SpendLimitSource = {
21185
+ var CustomerSpendLimitSource = {
21172
21186
  Customer: "customer",
21173
21187
  Plan: "plan"
21174
21188
  };
@@ -21182,7 +21196,7 @@ var CustomerAnchor = {
21182
21196
  BillingCycle: "billing_cycle",
21183
21197
  Utc: "utc"
21184
21198
  };
21185
- var UsageLimitSource = {
21199
+ var CustomerUsageLimitSource = {
21186
21200
  Customer: "customer",
21187
21201
  Plan: "plan"
21188
21202
  };
@@ -21198,11 +21212,11 @@ var CustomerBasis = {
21198
21212
  Recurring: "recurring",
21199
21213
  UsageLimit: "usage_limit"
21200
21214
  };
21201
- var UsageAlertSource = {
21215
+ var CustomerUsageAlertSource = {
21202
21216
  Customer: "customer",
21203
21217
  Plan: "plan"
21204
21218
  };
21205
- var OverageAllowedSource = {
21219
+ var CustomerOverageAllowedSource = {
21206
21220
  Customer: "customer",
21207
21221
  Plan: "plan"
21208
21222
  };
@@ -21295,7 +21309,7 @@ var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
21295
21309
  z39.lazy(() => CustomerPurchaseLimit1$inboundSchema),
21296
21310
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21297
21311
  ]);
21298
- var AutoTopupSource$inboundSchema = inboundSchema(AutoTopupSource);
21312
+ var CustomerAutoTopupSource$inboundSchema = inboundSchema(CustomerAutoTopupSource);
21299
21313
  var CustomerAutoTopup$inboundSchema = z39.pipe(
21300
21314
  z39.object({
21301
21315
  feature_id: string5(),
@@ -21307,7 +21321,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21307
21321
  z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
21308
21322
  ])),
21309
21323
  invoice_mode: optional3(boolean2()),
21310
- source: optional3(AutoTopupSource$inboundSchema)
21324
+ source: optional3(CustomerAutoTopupSource$inboundSchema)
21311
21325
  }),
21312
21326
  z39.transform((v) => {
21313
21327
  return remap(v, {
@@ -21318,7 +21332,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
21318
21332
  })
21319
21333
  );
21320
21334
  var CustomerLimitType$inboundSchema = inboundSchema(CustomerLimitType);
21321
- var SpendLimitSource$inboundSchema = inboundSchema(SpendLimitSource);
21335
+ var CustomerSpendLimitSource$inboundSchema = inboundSchema(CustomerSpendLimitSource);
21322
21336
  var CustomerSpendLimit$inboundSchema = z39.pipe(
21323
21337
  z39.object({
21324
21338
  feature_id: optional3(string5()),
@@ -21326,7 +21340,7 @@ var CustomerSpendLimit$inboundSchema = z39.pipe(
21326
21340
  limit_type: optional3(CustomerLimitType$inboundSchema),
21327
21341
  overage_limit: optional3(number2()),
21328
21342
  skip_overage_billing: optional3(boolean2()),
21329
- source: optional3(SpendLimitSource$inboundSchema)
21343
+ source: optional3(CustomerSpendLimitSource$inboundSchema)
21330
21344
  }),
21331
21345
  z39.transform((v) => {
21332
21346
  return remap(v, {
@@ -21342,7 +21356,7 @@ var CustomerAnchor$inboundSchema = inboundSchema(CustomerAnchor);
21342
21356
  var CustomerUsageLimitFilter$inboundSchema = z39.object({
21343
21357
  properties: z39.record(z39.string(), string5())
21344
21358
  });
21345
- var UsageLimitSource$inboundSchema = inboundSchema(UsageLimitSource);
21359
+ var CustomerUsageLimitSource$inboundSchema = inboundSchema(CustomerUsageLimitSource);
21346
21360
  var CustomerUsageLimit$inboundSchema = z39.pipe(
21347
21361
  z39.object({
21348
21362
  feature_id: string5(),
@@ -21354,7 +21368,7 @@ var CustomerUsageLimit$inboundSchema = z39.pipe(
21354
21368
  z39.lazy(() => CustomerUsageLimitFilter$inboundSchema)
21355
21369
  ),
21356
21370
  usage: optional3(number2()),
21357
- source: optional3(UsageLimitSource$inboundSchema)
21371
+ source: optional3(CustomerUsageLimitSource$inboundSchema)
21358
21372
  }),
21359
21373
  z39.transform((v) => {
21360
21374
  return remap(v, {
@@ -21367,7 +21381,7 @@ var CustomerBasis$inboundSchema = inboundSchema(CustomerBasis);
21367
21381
  var CustomerUsageAlertFilter$inboundSchema = z39.object({
21368
21382
  properties: z39.record(z39.string(), string5())
21369
21383
  });
21370
- var UsageAlertSource$inboundSchema = inboundSchema(UsageAlertSource);
21384
+ var CustomerUsageAlertSource$inboundSchema = inboundSchema(CustomerUsageAlertSource);
21371
21385
  var CustomerUsageAlert$inboundSchema = z39.pipe(
21372
21386
  z39.object({
21373
21387
  feature_id: optional3(string5()),
@@ -21379,7 +21393,7 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21379
21393
  z39.lazy(() => CustomerUsageAlertFilter$inboundSchema)
21380
21394
  ),
21381
21395
  name: optional3(string5()),
21382
- source: optional3(UsageAlertSource$inboundSchema)
21396
+ source: optional3(CustomerUsageAlertSource$inboundSchema)
21383
21397
  }),
21384
21398
  z39.transform((v) => {
21385
21399
  return remap(v, {
@@ -21388,12 +21402,12 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
21388
21402
  });
21389
21403
  })
21390
21404
  );
21391
- var OverageAllowedSource$inboundSchema = inboundSchema(OverageAllowedSource);
21405
+ var CustomerOverageAllowedSource$inboundSchema = inboundSchema(CustomerOverageAllowedSource);
21392
21406
  var CustomerOverageAllowed$inboundSchema = z39.pipe(
21393
21407
  z39.object({
21394
21408
  feature_id: string5(),
21395
21409
  enabled: z39._default(boolean2(), false),
21396
- source: optional3(OverageAllowedSource$inboundSchema)
21410
+ source: optional3(CustomerOverageAllowedSource$inboundSchema)
21397
21411
  }),
21398
21412
  z39.transform((v) => {
21399
21413
  return remap(v, {
@@ -28166,6 +28180,10 @@ var ListBalancesBillingMethod = {
28166
28180
  Prepaid: "prepaid",
28167
28181
  UsageBased: "usage_based"
28168
28182
  };
28183
+ var ListBalancesSource = {
28184
+ Customer: "customer",
28185
+ Entity: "entity"
28186
+ };
28169
28187
  var ListBalancesListStatus = {
28170
28188
  Active: "active",
28171
28189
  Expired: "expired"
@@ -28244,6 +28262,10 @@ var ListBalancesPrice$inboundSchema = z66.pipe(
28244
28262
  });
28245
28263
  })
28246
28264
  );
28265
+ var ListBalancesSource$inboundSchema = inboundSchema(ListBalancesSource);
28266
+ var ListBalancesAllocation$inboundSchema = z66.object({
28267
+ amount: number2()
28268
+ });
28247
28269
  var ListBalancesListStatus$inboundSchema = inboundSchema(ListBalancesListStatus);
28248
28270
  var ListBalancesRollover$inboundSchema = z66.pipe(
28249
28271
  z66.object({
@@ -28269,6 +28291,10 @@ var ListBalancesList$inboundSchema = z66.pipe(
28269
28291
  reset: nullable(z66.lazy(() => ListBalancesReset$inboundSchema)),
28270
28292
  price: nullable(z66.lazy(() => ListBalancesPrice$inboundSchema)),
28271
28293
  expires_at: nullable(number2()),
28294
+ source: optional3(ListBalancesSource$inboundSchema),
28295
+ allocation: z66.optional(
28296
+ z66.nullable(z66.lazy(() => ListBalancesAllocation$inboundSchema))
28297
+ ),
28272
28298
  feature_id: string5(),
28273
28299
  status: ListBalancesListStatus$inboundSchema,
28274
28300
  rollovers: z66.array(z66.lazy(() => ListBalancesRollover$inboundSchema)),
@@ -58732,7 +58758,7 @@ var Billing = class extends ClientSDK {
58732
58758
  * @param noBillingChanges - If true, skips any billing changes for the schedule. (optional)
58733
58759
  * @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
58734
58760
  * @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)
58735
- * @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not declare are always retained. (optional)
58761
+ * @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)
58736
58762
  * @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)
58737
58763
  * @param phases - Ordered phase definitions for the schedule.
58738
58764
  *
@@ -1,10 +1,10 @@
1
1
  import "./chunk-WYDGEDEU.mjs";
2
2
  import "./chunk-VXND2UDT.mjs";
3
- import "./chunk-IDGAWOWG.mjs";
3
+ import "./chunk-6RGLO6FV.mjs";
4
4
  import {
5
5
  createCoreHandler
6
- } from "./chunk-UNI5JBUD.mjs";
7
- import "./chunk-POJBSIOX.mjs";
6
+ } from "./chunk-ZFFEG27F.mjs";
7
+ import "./chunk-KSYN5FLV.mjs";
8
8
  import "./chunk-MOHYGUMA.mjs";
9
9
  import "./chunk-TBQ27LIK.mjs";
10
10
  import "./chunk-J44WR3QZ.mjs";