autumn-js 1.3.48 → 1.3.49

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 (112) hide show
  1. package/dist/backend/adapters/express.js +214 -17
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +214 -17
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +214 -17
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +214 -17
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +214 -17
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-JJEEJKM7.mjs → chunk-5CDM4XIN.mjs} +4 -4
  12. package/dist/backend/{chunk-5D6J5UMK.mjs → chunk-5DMQUWII.mjs} +1 -1
  13. package/dist/backend/{chunk-3T6FAZDO.mjs → chunk-BZ54HK66.mjs} +1 -1
  14. package/dist/backend/{chunk-RVOZXEI3.mjs → chunk-HLYVCB6M.mjs} +1 -1
  15. package/dist/backend/{chunk-KSYN5FLV.mjs → chunk-JPQERXWV.mjs} +214 -17
  16. package/dist/backend/{chunk-GBISDPPO.mjs → chunk-SS7EKOGZ.mjs} +6 -6
  17. package/dist/backend/{chunk-WXLAGRC4.mjs → chunk-ZJSWDKBL.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 +214 -17
  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 +214 -17
  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 +214 -17
  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 +214 -17
  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 +214 -17
  53. package/dist/backend/index.mjs +9 -9
  54. package/dist/backend/{routeTypes-DAI_E67X.d.mts → routeTypes-Czot4Qi-.d.mts} +232 -2
  55. package/dist/backend/{routeTypes-4TatmvQY.d.ts → routeTypes-D4pVj85I.d.ts} +232 -2
  56. package/dist/better-auth/{chunk-R7IEJQOY.mjs → chunk-57PPCUDF.mjs} +214 -17
  57. package/dist/better-auth/index.js +214 -17
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +214 -17
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +214 -17
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/react/AutumnContext.d.mts +4 -4
  64. package/dist/react/AutumnContext.d.ts +4 -4
  65. package/dist/react/client/AutumnClient.d.mts +4 -4
  66. package/dist/react/client/AutumnClient.d.ts +4 -4
  67. package/dist/react/client/IAutumnClient.d.mts +4 -4
  68. package/dist/react/client/IAutumnClient.d.ts +4 -4
  69. package/dist/react/client/index.d.mts +4 -4
  70. package/dist/react/client/index.d.ts +4 -4
  71. package/dist/react/{customer-DfpvnPRk.d.mts → customer-CZn6Nd7a.d.mts} +47 -1
  72. package/dist/react/{customer-B0KAd7eZ.d.ts → customer-Dt0OdihJ.d.ts} +47 -1
  73. package/dist/react/hooks/index.d.mts +4 -4
  74. package/dist/react/hooks/index.d.ts +4 -4
  75. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  76. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  77. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  78. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  79. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  80. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  81. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  82. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  83. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  84. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  85. package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
  86. package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
  87. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  88. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  89. package/dist/react/hooks/useCustomer.d.mts +3 -3
  90. package/dist/react/hooks/useCustomer.d.ts +3 -3
  91. package/dist/react/hooks/useEntity.d.mts +2 -2
  92. package/dist/react/hooks/useEntity.d.ts +2 -2
  93. package/dist/react/hooks/useListEvents.d.mts +2 -2
  94. package/dist/react/hooks/useListEvents.d.ts +2 -2
  95. package/dist/react/hooks/useListPlans.d.mts +3 -3
  96. package/dist/react/hooks/useListPlans.d.ts +3 -3
  97. package/dist/react/hooks/useReferrals.d.mts +2 -2
  98. package/dist/react/hooks/useReferrals.d.ts +2 -2
  99. package/dist/react/index.d.mts +4 -4
  100. package/dist/react/index.d.ts +4 -4
  101. package/dist/react/{list-plans-response-6iUDTnPQ.d.ts → list-plans-response-Bx4e7rvw.d.ts} +1 -1
  102. package/dist/react/{list-plans-response-BzsqJlxN.d.mts → list-plans-response-ibIt0k4N.d.mts} +1 -1
  103. package/dist/react/{params-CMcoADwO.d.ts → params-BGpmxI8B.d.mts} +1 -1
  104. package/dist/react/{params-vAoGWtk9.d.mts → params-C7_vr_BA.d.ts} +1 -1
  105. package/dist/react/{plan-Ct5TGTnS.d.mts → plan-CvxFKlF7.d.mts} +2 -2
  106. package/dist/react/{plan-Ct5TGTnS.d.ts → plan-CvxFKlF7.d.ts} +2 -2
  107. package/dist/sdk/index.d.mts +287 -5
  108. package/dist/sdk/index.d.ts +287 -5
  109. package/dist/sdk/index.js +317 -22
  110. package/dist/sdk/index.mjs +286 -21
  111. package/package.json +2 -2
  112. package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
@@ -10886,7 +10886,7 @@ var BalancePrice$inboundSchema = z34.pipe(
10886
10886
  })
10887
10887
  );
10888
10888
  var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
10889
- var Allocation$inboundSchema = z34.object({
10889
+ var BalanceAllocation$inboundSchema = z34.object({
10890
10890
  amount: number2()
10891
10891
  });
10892
10892
  var Breakdown$inboundSchema = z34.pipe(
@@ -10903,7 +10903,7 @@ var Breakdown$inboundSchema = z34.pipe(
10903
10903
  expires_at: nullable(number2()),
10904
10904
  source: optional3(BalanceSource$inboundSchema),
10905
10905
  allocation: z34.optional(
10906
- z34.nullable(z34.lazy(() => Allocation$inboundSchema))
10906
+ z34.nullable(z34.lazy(() => BalanceAllocation$inboundSchema))
10907
10907
  )
10908
10908
  }),
10909
10909
  z34.transform((v) => {
@@ -27988,6 +27988,17 @@ var CustomerEnv = {
27988
27988
  Sandbox: "sandbox",
27989
27989
  Live: "live"
27990
27990
  };
27991
+ var CustomerBalanceAllocationInterval = {
27992
+ OneOff: "one_off",
27993
+ Minute: "minute",
27994
+ Hour: "hour",
27995
+ Day: "day",
27996
+ Week: "week",
27997
+ Month: "month",
27998
+ Quarter: "quarter",
27999
+ SemiAnnual: "semi_annual",
28000
+ Year: "year"
28001
+ };
27991
28002
  var CustomerAutoTopupInterval2 = {
27992
28003
  Hour: "hour",
27993
28004
  Day: "day",
@@ -28102,6 +28113,30 @@ var TaxExempt = {
28102
28113
  Reverse: "reverse"
28103
28114
  };
28104
28115
  var CustomerEnv$inboundSchema = inboundSchema(CustomerEnv);
28116
+ var CustomerBalanceAllocationInterval$inboundSchema = inboundSchema(CustomerBalanceAllocationInterval);
28117
+ var CustomerAllocation$inboundSchema = z58.pipe(
28118
+ z58.object({
28119
+ entity_id: string5(),
28120
+ amount: number2()
28121
+ }),
28122
+ z58.transform((v) => {
28123
+ return remap(v, {
28124
+ "entity_id": "entityId"
28125
+ });
28126
+ })
28127
+ );
28128
+ var CustomerBalanceAllocation$inboundSchema = z58.pipe(
28129
+ z58.object({
28130
+ feature_id: string5(),
28131
+ interval: CustomerBalanceAllocationInterval$inboundSchema,
28132
+ allocations: z58.array(z58.lazy(() => CustomerAllocation$inboundSchema))
28133
+ }),
28134
+ z58.transform((v) => {
28135
+ return remap(v, {
28136
+ "feature_id": "featureId"
28137
+ });
28138
+ })
28139
+ );
28105
28140
  var CustomerAutoTopupInterval2$inboundSchema = inboundSchema(CustomerAutoTopupInterval2);
28106
28141
  var CustomerPurchaseLimit2$inboundSchema = z58.pipe(
28107
28142
  z58.object({
@@ -28243,6 +28278,9 @@ var CustomerOverageAllowed$inboundSchema = z58.pipe(
28243
28278
  );
28244
28279
  var CustomerBillingControls$inboundSchema = z58.pipe(
28245
28280
  z58.object({
28281
+ balance_allocations: optional3(
28282
+ z58.array(z58.lazy(() => CustomerBalanceAllocation$inboundSchema))
28283
+ ),
28246
28284
  auto_topups: optional3(
28247
28285
  z58.array(z58.lazy(() => CustomerAutoTopup$inboundSchema))
28248
28286
  ),
@@ -28261,6 +28299,7 @@ var CustomerBillingControls$inboundSchema = z58.pipe(
28261
28299
  }),
28262
28300
  z58.transform((v) => {
28263
28301
  return remap(v, {
28302
+ "balance_allocations": "balanceAllocations",
28264
28303
  "auto_topups": "autoTopups",
28265
28304
  "spend_limits": "spendLimits",
28266
28305
  "usage_limits": "usageLimits",
@@ -29273,6 +29312,17 @@ var GetCustomerEnv = {
29273
29312
  Sandbox: "sandbox",
29274
29313
  Live: "live"
29275
29314
  };
29315
+ var GetCustomerBalanceAllocationInterval = {
29316
+ OneOff: "one_off",
29317
+ Minute: "minute",
29318
+ Hour: "hour",
29319
+ Day: "day",
29320
+ Week: "week",
29321
+ Month: "month",
29322
+ Quarter: "quarter",
29323
+ SemiAnnual: "semi_annual",
29324
+ Year: "year"
29325
+ };
29276
29326
  var GetCustomerAutoTopupInterval2 = {
29277
29327
  Hour: "hour",
29278
29328
  Day: "day",
@@ -29398,6 +29448,30 @@ var GetCustomerParams$outboundSchema = z71.pipe(
29398
29448
  })
29399
29449
  );
29400
29450
  var GetCustomerEnv$inboundSchema = inboundSchema(GetCustomerEnv);
29451
+ var GetCustomerBalanceAllocationInterval$inboundSchema = inboundSchema(GetCustomerBalanceAllocationInterval);
29452
+ var GetCustomerAllocation$inboundSchema = z71.pipe(
29453
+ z71.object({
29454
+ entity_id: string5(),
29455
+ amount: number2()
29456
+ }),
29457
+ z71.transform((v) => {
29458
+ return remap(v, {
29459
+ "entity_id": "entityId"
29460
+ });
29461
+ })
29462
+ );
29463
+ var GetCustomerBalanceAllocation$inboundSchema = z71.pipe(
29464
+ z71.object({
29465
+ feature_id: string5(),
29466
+ interval: GetCustomerBalanceAllocationInterval$inboundSchema,
29467
+ allocations: z71.array(z71.lazy(() => GetCustomerAllocation$inboundSchema))
29468
+ }),
29469
+ z71.transform((v) => {
29470
+ return remap(v, {
29471
+ "feature_id": "featureId"
29472
+ });
29473
+ })
29474
+ );
29401
29475
  var GetCustomerAutoTopupInterval2$inboundSchema = inboundSchema(GetCustomerAutoTopupInterval2);
29402
29476
  var GetCustomerPurchaseLimit2$inboundSchema = z71.pipe(
29403
29477
  z71.object({
@@ -29539,6 +29613,9 @@ var GetCustomerOverageAllowed$inboundSchema = z71.pipe(
29539
29613
  );
29540
29614
  var GetCustomerBillingControls$inboundSchema = z71.pipe(
29541
29615
  z71.object({
29616
+ balance_allocations: optional3(
29617
+ z71.array(z71.lazy(() => GetCustomerBalanceAllocation$inboundSchema))
29618
+ ),
29542
29619
  auto_topups: optional3(
29543
29620
  z71.array(z71.lazy(() => GetCustomerAutoTopup$inboundSchema))
29544
29621
  ),
@@ -29557,6 +29634,7 @@ var GetCustomerBillingControls$inboundSchema = z71.pipe(
29557
29634
  }),
29558
29635
  z71.transform((v) => {
29559
29636
  return remap(v, {
29637
+ "balance_allocations": "balanceAllocations",
29560
29638
  "auto_topups": "autoTopups",
29561
29639
  "spend_limits": "spendLimits",
29562
29640
  "usage_limits": "usageLimits",
@@ -35174,6 +35252,17 @@ var ListCustomersEnv = {
35174
35252
  Sandbox: "sandbox",
35175
35253
  Live: "live"
35176
35254
  };
35255
+ var ListCustomersBalanceAllocationInterval = {
35256
+ OneOff: "one_off",
35257
+ Minute: "minute",
35258
+ Hour: "hour",
35259
+ Day: "day",
35260
+ Week: "week",
35261
+ Month: "month",
35262
+ Quarter: "quarter",
35263
+ SemiAnnual: "semi_annual",
35264
+ Year: "year"
35265
+ };
35177
35266
  var ListCustomersAutoTopupInterval2 = {
35178
35267
  Hour: "hour",
35179
35268
  Day: "day",
@@ -35298,6 +35387,30 @@ var ListCustomersParams$outboundSchema = z86.pipe(
35298
35387
  })
35299
35388
  );
35300
35389
  var ListCustomersEnv$inboundSchema = inboundSchema(ListCustomersEnv);
35390
+ var ListCustomersBalanceAllocationInterval$inboundSchema = inboundSchema(ListCustomersBalanceAllocationInterval);
35391
+ var ListCustomersAllocation$inboundSchema = z86.pipe(
35392
+ z86.object({
35393
+ entity_id: string5(),
35394
+ amount: number2()
35395
+ }),
35396
+ z86.transform((v) => {
35397
+ return remap(v, {
35398
+ "entity_id": "entityId"
35399
+ });
35400
+ })
35401
+ );
35402
+ var ListCustomersBalanceAllocation$inboundSchema = z86.pipe(
35403
+ z86.object({
35404
+ feature_id: string5(),
35405
+ interval: ListCustomersBalanceAllocationInterval$inboundSchema,
35406
+ allocations: z86.array(z86.lazy(() => ListCustomersAllocation$inboundSchema))
35407
+ }),
35408
+ z86.transform((v) => {
35409
+ return remap(v, {
35410
+ "feature_id": "featureId"
35411
+ });
35412
+ })
35413
+ );
35301
35414
  var ListCustomersAutoTopupInterval2$inboundSchema = inboundSchema(ListCustomersAutoTopupInterval2);
35302
35415
  var ListCustomersPurchaseLimit2$inboundSchema = z86.pipe(
35303
35416
  z86.object({
@@ -35439,6 +35552,9 @@ var ListCustomersOverageAllowed$inboundSchema = z86.pipe(
35439
35552
  );
35440
35553
  var ListCustomersBillingControls$inboundSchema = z86.pipe(
35441
35554
  z86.object({
35555
+ balance_allocations: optional3(
35556
+ z86.array(z86.lazy(() => ListCustomersBalanceAllocation$inboundSchema))
35557
+ ),
35442
35558
  auto_topups: optional3(
35443
35559
  z86.array(z86.lazy(() => ListCustomersAutoTopup$inboundSchema))
35444
35560
  ),
@@ -35457,6 +35573,7 @@ var ListCustomersBillingControls$inboundSchema = z86.pipe(
35457
35573
  }),
35458
35574
  z86.transform((v) => {
35459
35575
  return remap(v, {
35576
+ "balance_allocations": "balanceAllocations",
35460
35577
  "auto_topups": "autoTopups",
35461
35578
  "spend_limits": "spendLimits",
35462
35579
  "usage_limits": "usageLimits",
@@ -53614,6 +53731,17 @@ var UpdateBalanceResponse$inboundSchema = z128.object({
53614
53731
 
53615
53732
  // ../sdk/src/models/update-customer-op.ts
53616
53733
  var z129 = __toESM(require("zod/v4-mini"), 1);
53734
+ var BalanceAllocationIntervalRequestBody = {
53735
+ OneOff: "one_off",
53736
+ Minute: "minute",
53737
+ Hour: "hour",
53738
+ Day: "day",
53739
+ Week: "week",
53740
+ Month: "month",
53741
+ Quarter: "quarter",
53742
+ SemiAnnual: "semi_annual",
53743
+ Year: "year"
53744
+ };
53617
53745
  var UpdateCustomerAutoTopupIntervalRequestBody = {
53618
53746
  Hour: "hour",
53619
53747
  Day: "day",
@@ -53663,6 +53791,17 @@ var UpdateCustomerEnv = {
53663
53791
  Sandbox: "sandbox",
53664
53792
  Live: "live"
53665
53793
  };
53794
+ var UpdateCustomerBalanceAllocationIntervalResponse = {
53795
+ OneOff: "one_off",
53796
+ Minute: "minute",
53797
+ Hour: "hour",
53798
+ Day: "day",
53799
+ Week: "week",
53800
+ Month: "month",
53801
+ Quarter: "quarter",
53802
+ SemiAnnual: "semi_annual",
53803
+ Year: "year"
53804
+ };
53666
53805
  var UpdateCustomerAutoTopupIntervalResponse2 = {
53667
53806
  Hour: "hour",
53668
53807
  Day: "day",
@@ -53751,6 +53890,30 @@ var UpdateCustomerDimensionsToEnum1 = {
53751
53890
  var UpdateCustomerToEnum = {
53752
53891
  Inf: "inf"
53753
53892
  };
53893
+ var BalanceAllocationIntervalRequestBody$outboundSchema = z129.enum(BalanceAllocationIntervalRequestBody);
53894
+ var AllocationRequest$outboundSchema = z129.pipe(
53895
+ z129.object({
53896
+ entityId: z129.string(),
53897
+ amount: z129.number()
53898
+ }),
53899
+ z129.transform((v) => {
53900
+ return remap(v, {
53901
+ entityId: "entity_id"
53902
+ });
53903
+ })
53904
+ );
53905
+ var BalanceAllocationRequest$outboundSchema = z129.pipe(
53906
+ z129.object({
53907
+ featureId: z129.string(),
53908
+ interval: BalanceAllocationIntervalRequestBody$outboundSchema,
53909
+ allocations: z129.array(z129.lazy(() => AllocationRequest$outboundSchema))
53910
+ }),
53911
+ z129.transform((v) => {
53912
+ return remap(v, {
53913
+ featureId: "feature_id"
53914
+ });
53915
+ })
53916
+ );
53754
53917
  var UpdateCustomerAutoTopupIntervalRequestBody$outboundSchema = z129.enum(
53755
53918
  UpdateCustomerAutoTopupIntervalRequestBody
53756
53919
  );
@@ -53905,6 +54068,9 @@ var UpdateCustomerOverageAllowedRequestBody$outboundSchema = z129.pipe(
53905
54068
  );
53906
54069
  var UpdateCustomerBillingControlsRequestBody$outboundSchema = z129.pipe(
53907
54070
  z129.object({
54071
+ balanceAllocations: z129.optional(
54072
+ z129.array(z129.lazy(() => BalanceAllocationRequest$outboundSchema))
54073
+ ),
53908
54074
  autoTopups: z129.optional(
53909
54075
  z129.array(
53910
54076
  z129.lazy(() => UpdateCustomerAutoTopupRequestBody$outboundSchema)
@@ -53936,6 +54102,7 @@ var UpdateCustomerBillingControlsRequestBody$outboundSchema = z129.pipe(
53936
54102
  }),
53937
54103
  z129.transform((v) => {
53938
54104
  return remap(v, {
54105
+ balanceAllocations: "balance_allocations",
53939
54106
  autoTopups: "auto_topups",
53940
54107
  spendLimits: "spend_limits",
53941
54108
  usageLimits: "usage_limits",
@@ -54060,6 +54227,32 @@ var UpdateCustomerParams$outboundSchema = z129.pipe(
54060
54227
  })
54061
54228
  );
54062
54229
  var UpdateCustomerEnv$inboundSchema = inboundSchema(UpdateCustomerEnv);
54230
+ var UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema = inboundSchema(UpdateCustomerBalanceAllocationIntervalResponse);
54231
+ var UpdateCustomerAllocationResponse$inboundSchema = z129.pipe(
54232
+ z129.object({
54233
+ entity_id: string5(),
54234
+ amount: number2()
54235
+ }),
54236
+ z129.transform((v) => {
54237
+ return remap(v, {
54238
+ "entity_id": "entityId"
54239
+ });
54240
+ })
54241
+ );
54242
+ var UpdateCustomerBalanceAllocationResponse$inboundSchema = z129.pipe(
54243
+ z129.object({
54244
+ feature_id: string5(),
54245
+ interval: UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema,
54246
+ allocations: z129.array(z129.lazy(
54247
+ () => UpdateCustomerAllocationResponse$inboundSchema
54248
+ ))
54249
+ }),
54250
+ z129.transform((v) => {
54251
+ return remap(v, {
54252
+ "feature_id": "featureId"
54253
+ });
54254
+ })
54255
+ );
54063
54256
  var UpdateCustomerAutoTopupIntervalResponse2$inboundSchema = inboundSchema(UpdateCustomerAutoTopupIntervalResponse2);
54064
54257
  var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z129.pipe(
54065
54258
  z129.object({
@@ -54205,24 +54398,28 @@ var UpdateCustomerOverageAllowedResponse$inboundSchema = z129.pipe(
54205
54398
  );
54206
54399
  var UpdateCustomerBillingControlsResponse$inboundSchema = z129.pipe(
54207
54400
  z129.object({
54208
- auto_topups: optional3(
54209
- z129.array(z129.lazy(() => UpdateCustomerAutoTopupResponse$inboundSchema))
54210
- ),
54211
- spend_limits: optional3(
54212
- z129.array(z129.lazy(() => UpdateCustomerSpendLimitResponse$inboundSchema))
54213
- ),
54214
- usage_limits: optional3(
54215
- z129.array(z129.lazy(() => UpdateCustomerUsageLimitResponse$inboundSchema))
54216
- ),
54217
- usage_alerts: optional3(
54218
- z129.array(z129.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
54219
- ),
54220
- overage_allowed: optional3(
54221
- z129.array(z129.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
54222
- )
54401
+ balance_allocations: optional3(z129.array(z129.lazy(
54402
+ () => UpdateCustomerBalanceAllocationResponse$inboundSchema
54403
+ ))),
54404
+ auto_topups: optional3(z129.array(z129.lazy(
54405
+ () => UpdateCustomerAutoTopupResponse$inboundSchema
54406
+ ))),
54407
+ spend_limits: optional3(z129.array(z129.lazy(
54408
+ () => UpdateCustomerSpendLimitResponse$inboundSchema
54409
+ ))),
54410
+ usage_limits: optional3(z129.array(z129.lazy(
54411
+ () => UpdateCustomerUsageLimitResponse$inboundSchema
54412
+ ))),
54413
+ usage_alerts: optional3(z129.array(z129.lazy(
54414
+ () => UpdateCustomerUsageAlertResponse$inboundSchema
54415
+ ))),
54416
+ overage_allowed: optional3(z129.array(z129.lazy(
54417
+ () => UpdateCustomerOverageAllowedResponse$inboundSchema
54418
+ )))
54223
54419
  }),
54224
54420
  z129.transform((v) => {
54225
54421
  return remap(v, {
54422
+ "balance_allocations": "balanceAllocations",
54226
54423
  "auto_topups": "autoTopups",
54227
54424
  "spend_limits": "spendLimits",
54228
54425
  "usage_limits": "usageLimits",
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-MODSHKUF.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "../chunk-R7IEJQOY.mjs";
7
+ } from "../chunk-57PPCUDF.mjs";
8
8
  import {
9
9
  resolveIdentityFromScope
10
10
  } from "../chunk-J2WYVGHS.mjs";
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { IAutumnClient } from './client/IAutumnClient.mjs';
3
- import './params-vAoGWtk9.mjs';
4
- import './plan-Ct5TGTnS.mjs';
5
- import './customer-DfpvnPRk.mjs';
6
- import './list-plans-response-BzsqJlxN.mjs';
3
+ import './params-BGpmxI8B.mjs';
4
+ import './plan-CvxFKlF7.mjs';
5
+ import './customer-CZn6Nd7a.mjs';
6
+ import './list-plans-response-ibIt0k4N.mjs';
7
7
 
8
8
  type AutumnContextValue = {
9
9
  client: IAutumnClient;
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { IAutumnClient } from './client/IAutumnClient.js';
3
- import './params-CMcoADwO.js';
4
- import './plan-Ct5TGTnS.js';
5
- import './customer-B0KAd7eZ.js';
6
- import './list-plans-response-6iUDTnPQ.js';
3
+ import './params-C7_vr_BA.js';
4
+ import './plan-CvxFKlF7.js';
5
+ import './customer-Dt0OdihJ.js';
6
+ import './list-plans-response-Bx4e7rvw.js';
7
7
 
8
8
  type AutumnContextValue = {
9
9
  client: IAutumnClient;
@@ -1,8 +1,8 @@
1
1
  import { IAutumnClient } from './IAutumnClient.mjs';
2
- import '../params-vAoGWtk9.mjs';
3
- import '../plan-Ct5TGTnS.mjs';
4
- import '../customer-DfpvnPRk.mjs';
5
- import '../list-plans-response-BzsqJlxN.mjs';
2
+ import '../params-BGpmxI8B.mjs';
3
+ import '../plan-CvxFKlF7.mjs';
4
+ import '../customer-CZn6Nd7a.mjs';
5
+ import '../list-plans-response-ibIt0k4N.mjs';
6
6
 
7
7
  /** Configuration for Autumn client */
8
8
  type AutumnClientConfig = {
@@ -1,8 +1,8 @@
1
1
  import { IAutumnClient } from './IAutumnClient.js';
2
- import '../params-CMcoADwO.js';
3
- import '../plan-Ct5TGTnS.js';
4
- import '../customer-B0KAd7eZ.js';
5
- import '../list-plans-response-6iUDTnPQ.js';
2
+ import '../params-C7_vr_BA.js';
3
+ import '../plan-CvxFKlF7.js';
4
+ import '../customer-Dt0OdihJ.js';
5
+ import '../list-plans-response-Bx4e7rvw.js';
6
6
 
7
7
  /** Configuration for Autumn client */
8
8
  type AutumnClientConfig = {
@@ -1,7 +1,7 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-vAoGWtk9.mjs';
2
- import { C as Customer } from '../customer-DfpvnPRk.mjs';
3
- import { L as ListPlansResponse } from '../list-plans-response-BzsqJlxN.mjs';
4
- import '../plan-Ct5TGTnS.mjs';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BGpmxI8B.mjs';
2
+ import { C as Customer } from '../customer-CZn6Nd7a.mjs';
3
+ import { L as ListPlansResponse } from '../list-plans-response-ibIt0k4N.mjs';
4
+ import '../plan-CvxFKlF7.mjs';
5
5
 
6
6
  /** Client interface matching backend RPC routes */
7
7
  interface IAutumnClient {
@@ -1,7 +1,7 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-CMcoADwO.js';
2
- import { C as Customer } from '../customer-B0KAd7eZ.js';
3
- import { L as ListPlansResponse } from '../list-plans-response-6iUDTnPQ.js';
4
- import '../plan-Ct5TGTnS.js';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-C7_vr_BA.js';
2
+ import { C as Customer } from '../customer-Dt0OdihJ.js';
3
+ import { L as ListPlansResponse } from '../list-plans-response-Bx4e7rvw.js';
4
+ import '../plan-CvxFKlF7.js';
5
5
 
6
6
  /** Client interface matching backend RPC routes */
7
7
  interface IAutumnClient {
@@ -1,7 +1,7 @@
1
1
  export { AutumnClientConfig, createAutumnClient } from './AutumnClient.mjs';
2
2
  export { AutumnClientError } from './AutumnClientError.mjs';
3
3
  export { IAutumnClient } from './IAutumnClient.mjs';
4
- import '../params-vAoGWtk9.mjs';
5
- import '../plan-Ct5TGTnS.mjs';
6
- import '../customer-DfpvnPRk.mjs';
7
- import '../list-plans-response-BzsqJlxN.mjs';
4
+ import '../params-BGpmxI8B.mjs';
5
+ import '../plan-CvxFKlF7.mjs';
6
+ import '../customer-CZn6Nd7a.mjs';
7
+ import '../list-plans-response-ibIt0k4N.mjs';
@@ -1,7 +1,7 @@
1
1
  export { AutumnClientConfig, createAutumnClient } from './AutumnClient.js';
2
2
  export { AutumnClientError } from './AutumnClientError.js';
3
3
  export { IAutumnClient } from './IAutumnClient.js';
4
- import '../params-CMcoADwO.js';
5
- import '../plan-Ct5TGTnS.js';
6
- import '../customer-B0KAd7eZ.js';
7
- import '../list-plans-response-6iUDTnPQ.js';
4
+ import '../params-C7_vr_BA.js';
5
+ import '../plan-CvxFKlF7.js';
6
+ import '../customer-Dt0OdihJ.js';
7
+ import '../list-plans-response-Bx4e7rvw.js';
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, P as Plan, a as Balance, C as ClosedEnum } from './plan-Ct5TGTnS.mjs';
1
+ import { O as OpenEnum, P as Plan, a as Balance, C as ClosedEnum } from './plan-CvxFKlF7.mjs';
2
2
 
3
3
  /**
4
4
  * The environment this customer was created in.
@@ -11,6 +11,48 @@ declare const CustomerEnv: {
11
11
  * The environment this customer was created in.
12
12
  */
13
13
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
14
+ /**
15
+ * The reset interval of the shared credits being allocated.
16
+ */
17
+ declare const CustomerBalanceAllocationInterval: {
18
+ readonly OneOff: "one_off";
19
+ readonly Minute: "minute";
20
+ readonly Hour: "hour";
21
+ readonly Day: "day";
22
+ readonly Week: "week";
23
+ readonly Month: "month";
24
+ readonly Quarter: "quarter";
25
+ readonly SemiAnnual: "semi_annual";
26
+ readonly Year: "year";
27
+ };
28
+ /**
29
+ * The reset interval of the shared credits being allocated.
30
+ */
31
+ type CustomerBalanceAllocationInterval = OpenEnum<typeof CustomerBalanceAllocationInterval>;
32
+ type CustomerAllocation = {
33
+ /**
34
+ * The public entity ID.
35
+ */
36
+ entityId: string;
37
+ /**
38
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
39
+ */
40
+ amount: number;
41
+ };
42
+ type CustomerBalanceAllocation = {
43
+ /**
44
+ * The feature whose shared customer credits are allocated.
45
+ */
46
+ featureId: string;
47
+ /**
48
+ * The reset interval of the shared credits being allocated.
49
+ */
50
+ interval: CustomerBalanceAllocationInterval;
51
+ /**
52
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
53
+ */
54
+ allocations: Array<CustomerAllocation>;
55
+ };
14
56
  /**
15
57
  * The time interval for the purchase limit window.
16
58
  */
@@ -341,6 +383,10 @@ type CustomerOverageAllowed = {
341
383
  * Billing controls for the customer (auto top-ups, etc.)
342
384
  */
343
385
  type CustomerBillingControls = {
386
+ /**
387
+ * Customer-level entity allocations of shared credits. Amounts are requested shares before proportional scaling.
388
+ */
389
+ balanceAllocations?: Array<CustomerBalanceAllocation> | undefined;
344
390
  /**
345
391
  * List of auto top-up configurations per feature.
346
392
  */
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, P as Plan, a as Balance, C as ClosedEnum } from './plan-Ct5TGTnS.js';
1
+ import { O as OpenEnum, P as Plan, a as Balance, C as ClosedEnum } from './plan-CvxFKlF7.js';
2
2
 
3
3
  /**
4
4
  * The environment this customer was created in.
@@ -11,6 +11,48 @@ declare const CustomerEnv: {
11
11
  * The environment this customer was created in.
12
12
  */
13
13
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
14
+ /**
15
+ * The reset interval of the shared credits being allocated.
16
+ */
17
+ declare const CustomerBalanceAllocationInterval: {
18
+ readonly OneOff: "one_off";
19
+ readonly Minute: "minute";
20
+ readonly Hour: "hour";
21
+ readonly Day: "day";
22
+ readonly Week: "week";
23
+ readonly Month: "month";
24
+ readonly Quarter: "quarter";
25
+ readonly SemiAnnual: "semi_annual";
26
+ readonly Year: "year";
27
+ };
28
+ /**
29
+ * The reset interval of the shared credits being allocated.
30
+ */
31
+ type CustomerBalanceAllocationInterval = OpenEnum<typeof CustomerBalanceAllocationInterval>;
32
+ type CustomerAllocation = {
33
+ /**
34
+ * The public entity ID.
35
+ */
36
+ entityId: string;
37
+ /**
38
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
39
+ */
40
+ amount: number;
41
+ };
42
+ type CustomerBalanceAllocation = {
43
+ /**
44
+ * The feature whose shared customer credits are allocated.
45
+ */
46
+ featureId: string;
47
+ /**
48
+ * The reset interval of the shared credits being allocated.
49
+ */
50
+ interval: CustomerBalanceAllocationInterval;
51
+ /**
52
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
53
+ */
54
+ allocations: Array<CustomerAllocation>;
55
+ };
14
56
  /**
15
57
  * The time interval for the purchase limit window.
16
58
  */
@@ -341,6 +383,10 @@ type CustomerOverageAllowed = {
341
383
  * Billing controls for the customer (auto top-ups, etc.)
342
384
  */
343
385
  type CustomerBillingControls = {
386
+ /**
387
+ * Customer-level entity allocations of shared credits. Amounts are requested shares before proportional scaling.
388
+ */
389
+ balanceAllocations?: Array<CustomerBalanceAllocation> | undefined;
344
390
  /**
345
391
  * List of auto top-up configurations per feature.
346
392
  */
@@ -7,7 +7,7 @@ export { UseListPlansParams, useListPlans } from './useListPlans.mjs';
7
7
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './useReferrals.mjs';
8
8
  import '@tanstack/react-query';
9
9
  import '../client/AutumnClientError.mjs';
10
- import '../params-vAoGWtk9.mjs';
11
- import '../plan-Ct5TGTnS.mjs';
12
- import '../customer-DfpvnPRk.mjs';
13
- import '../list-plans-response-BzsqJlxN.mjs';
10
+ import '../params-BGpmxI8B.mjs';
11
+ import '../plan-CvxFKlF7.mjs';
12
+ import '../customer-CZn6Nd7a.mjs';
13
+ import '../list-plans-response-ibIt0k4N.mjs';
@@ -7,7 +7,7 @@ export { UseListPlansParams, useListPlans } from './useListPlans.js';
7
7
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './useReferrals.js';
8
8
  import '@tanstack/react-query';
9
9
  import '../client/AutumnClientError.js';
10
- import '../params-CMcoADwO.js';
11
- import '../plan-Ct5TGTnS.js';
12
- import '../customer-B0KAd7eZ.js';
13
- import '../list-plans-response-6iUDTnPQ.js';
10
+ import '../params-C7_vr_BA.js';
11
+ import '../plan-CvxFKlF7.js';
12
+ import '../customer-Dt0OdihJ.js';
13
+ import '../list-plans-response-Bx4e7rvw.js';
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-DfpvnPRk.mjs';
2
- import '../../../plan-Ct5TGTnS.mjs';
1
+ import { C as Customer } from '../../../customer-CZn6Nd7a.mjs';
2
+ import '../../../plan-CvxFKlF7.mjs';
3
3
 
4
4
  type CustomerBalance = Customer["balances"][string];
5
5
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-B0KAd7eZ.js';
2
- import '../../../plan-Ct5TGTnS.js';
1
+ import { C as Customer } from '../../../customer-Dt0OdihJ.js';
2
+ import '../../../plan-CvxFKlF7.js';
3
3
 
4
4
  type CustomerBalance = Customer["balances"][string];
5
5
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;