autumn-js 1.3.47 → 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 (107) hide show
  1. package/dist/backend/adapters/express.js +214 -17
  2. package/dist/backend/adapters/express.mjs +4 -4
  3. package/dist/backend/adapters/fetch.js +214 -17
  4. package/dist/backend/adapters/fetch.mjs +4 -4
  5. package/dist/backend/adapters/hono.js +214 -17
  6. package/dist/backend/adapters/hono.mjs +4 -4
  7. package/dist/backend/adapters/index.js +214 -17
  8. package/dist/backend/adapters/index.mjs +7 -7
  9. package/dist/backend/adapters/next.js +214 -17
  10. package/dist/backend/adapters/next.mjs +4 -4
  11. package/dist/backend/{chunk-6RGLO6FV.mjs → chunk-5CDM4XIN.mjs} +1 -1
  12. package/dist/backend/{chunk-C4IENXIG.mjs → chunk-5DMQUWII.mjs} +1 -1
  13. package/dist/backend/{chunk-ESSDMDXJ.mjs → chunk-BZ54HK66.mjs} +1 -1
  14. package/dist/backend/{chunk-NOJP6FIN.mjs → chunk-HLYVCB6M.mjs} +1 -1
  15. package/dist/backend/{chunk-KSYN5FLV.mjs → chunk-JPQERXWV.mjs} +214 -17
  16. package/dist/backend/{chunk-ZFFEG27F.mjs → chunk-SS7EKOGZ.mjs} +1 -1
  17. package/dist/backend/{chunk-DZBBXOKT.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 +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 +214 -17
  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 +214 -17
  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 +214 -17
  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 +214 -17
  49. package/dist/backend/index.mjs +3 -3
  50. package/dist/backend/{routeTypes-DAI_E67X.d.mts → routeTypes-Czot4Qi-.d.mts} +232 -2
  51. package/dist/backend/{routeTypes-4TatmvQY.d.ts → routeTypes-D4pVj85I.d.ts} +232 -2
  52. package/dist/better-auth/{chunk-R7IEJQOY.mjs → chunk-57PPCUDF.mjs} +214 -17
  53. package/dist/better-auth/index.js +214 -17
  54. package/dist/better-auth/index.mjs +1 -1
  55. package/dist/better-auth/utils/handleBetterAuthRoute.js +214 -17
  56. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  57. package/dist/better-auth/utils/index.js +214 -17
  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-DfpvnPRk.d.mts → customer-CZn6Nd7a.d.mts} +47 -1
  68. package/dist/react/{customer-B0KAd7eZ.d.ts → customer-Dt0OdihJ.d.ts} +47 -1
  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-6iUDTnPQ.d.ts → list-plans-response-Bx4e7rvw.d.ts} +1 -1
  98. package/dist/react/{list-plans-response-BzsqJlxN.d.mts → list-plans-response-ibIt0k4N.d.mts} +1 -1
  99. package/dist/react/{params-CMcoADwO.d.ts → params-BGpmxI8B.d.mts} +1 -1
  100. package/dist/react/{params-vAoGWtk9.d.mts → params-C7_vr_BA.d.ts} +1 -1
  101. package/dist/react/{plan-Ct5TGTnS.d.mts → plan-CvxFKlF7.d.mts} +2 -2
  102. package/dist/react/{plan-Ct5TGTnS.d.ts → plan-CvxFKlF7.d.ts} +2 -2
  103. package/dist/sdk/index.d.mts +287 -5
  104. package/dist/sdk/index.d.ts +287 -5
  105. package/dist/sdk/index.js +317 -22
  106. package/dist/sdk/index.mjs +286 -21
  107. package/package.json +2 -2
package/dist/sdk/index.js CHANGED
@@ -5280,14 +5280,14 @@ function balancePriceFromJSON(jsonString) {
5280
5280
  );
5281
5281
  }
5282
5282
  var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
5283
- var Allocation$inboundSchema = z35__namespace.object({
5283
+ var BalanceAllocation$inboundSchema = z35__namespace.object({
5284
5284
  amount: number2()
5285
5285
  });
5286
- function allocationFromJSON(jsonString) {
5286
+ function balanceAllocationFromJSON(jsonString) {
5287
5287
  return safeParse(
5288
5288
  jsonString,
5289
- (x) => Allocation$inboundSchema.parse(JSON.parse(x)),
5290
- `Failed to parse 'Allocation' from JSON`
5289
+ (x) => BalanceAllocation$inboundSchema.parse(JSON.parse(x)),
5290
+ `Failed to parse 'BalanceAllocation' from JSON`
5291
5291
  );
5292
5292
  }
5293
5293
  var Breakdown$inboundSchema = z35__namespace.pipe(
@@ -5304,7 +5304,7 @@ var Breakdown$inboundSchema = z35__namespace.pipe(
5304
5304
  expires_at: nullable(number2()),
5305
5305
  source: optional3(BalanceSource$inboundSchema),
5306
5306
  allocation: z35__namespace.optional(
5307
- z35__namespace.nullable(z35__namespace.lazy(() => Allocation$inboundSchema))
5307
+ z35__namespace.nullable(z35__namespace.lazy(() => BalanceAllocation$inboundSchema))
5308
5308
  )
5309
5309
  }),
5310
5310
  z35__namespace.transform((v) => {
@@ -30468,6 +30468,17 @@ var CustomerEnv = {
30468
30468
  Sandbox: "sandbox",
30469
30469
  Live: "live"
30470
30470
  };
30471
+ var CustomerBalanceAllocationInterval = {
30472
+ OneOff: "one_off",
30473
+ Minute: "minute",
30474
+ Hour: "hour",
30475
+ Day: "day",
30476
+ Week: "week",
30477
+ Month: "month",
30478
+ Quarter: "quarter",
30479
+ SemiAnnual: "semi_annual",
30480
+ Year: "year"
30481
+ };
30471
30482
  var CustomerAutoTopupInterval2 = {
30472
30483
  Hour: "hour",
30473
30484
  Day: "day",
@@ -30582,6 +30593,44 @@ var TaxExempt = {
30582
30593
  Reverse: "reverse"
30583
30594
  };
30584
30595
  var CustomerEnv$inboundSchema = inboundSchema(CustomerEnv);
30596
+ var CustomerBalanceAllocationInterval$inboundSchema = inboundSchema(CustomerBalanceAllocationInterval);
30597
+ var CustomerAllocation$inboundSchema = z35__namespace.pipe(
30598
+ z35__namespace.object({
30599
+ entity_id: string5(),
30600
+ amount: number2()
30601
+ }),
30602
+ z35__namespace.transform((v) => {
30603
+ return remap(v, {
30604
+ "entity_id": "entityId"
30605
+ });
30606
+ })
30607
+ );
30608
+ function customerAllocationFromJSON(jsonString) {
30609
+ return safeParse(
30610
+ jsonString,
30611
+ (x) => CustomerAllocation$inboundSchema.parse(JSON.parse(x)),
30612
+ `Failed to parse 'CustomerAllocation' from JSON`
30613
+ );
30614
+ }
30615
+ var CustomerBalanceAllocation$inboundSchema = z35__namespace.pipe(
30616
+ z35__namespace.object({
30617
+ feature_id: string5(),
30618
+ interval: CustomerBalanceAllocationInterval$inboundSchema,
30619
+ allocations: z35__namespace.array(z35__namespace.lazy(() => CustomerAllocation$inboundSchema))
30620
+ }),
30621
+ z35__namespace.transform((v) => {
30622
+ return remap(v, {
30623
+ "feature_id": "featureId"
30624
+ });
30625
+ })
30626
+ );
30627
+ function customerBalanceAllocationFromJSON(jsonString) {
30628
+ return safeParse(
30629
+ jsonString,
30630
+ (x) => CustomerBalanceAllocation$inboundSchema.parse(JSON.parse(x)),
30631
+ `Failed to parse 'CustomerBalanceAllocation' from JSON`
30632
+ );
30633
+ }
30585
30634
  var CustomerAutoTopupInterval2$inboundSchema = inboundSchema(CustomerAutoTopupInterval2);
30586
30635
  var CustomerPurchaseLimit2$inboundSchema = z35__namespace.pipe(
30587
30636
  z35__namespace.object({
@@ -30793,6 +30842,9 @@ function customerOverageAllowedFromJSON(jsonString) {
30793
30842
  }
30794
30843
  var CustomerBillingControls$inboundSchema = z35__namespace.pipe(
30795
30844
  z35__namespace.object({
30845
+ balance_allocations: optional3(
30846
+ z35__namespace.array(z35__namespace.lazy(() => CustomerBalanceAllocation$inboundSchema))
30847
+ ),
30796
30848
  auto_topups: optional3(
30797
30849
  z35__namespace.array(z35__namespace.lazy(() => CustomerAutoTopup$inboundSchema))
30798
30850
  ),
@@ -30811,6 +30863,7 @@ var CustomerBillingControls$inboundSchema = z35__namespace.pipe(
30811
30863
  }),
30812
30864
  z35__namespace.transform((v) => {
30813
30865
  return remap(v, {
30866
+ "balance_allocations": "balanceAllocations",
30814
30867
  "auto_topups": "autoTopups",
30815
30868
  "spend_limits": "spendLimits",
30816
30869
  "usage_limits": "usageLimits",
@@ -32364,6 +32417,17 @@ var GetCustomerEnv = {
32364
32417
  Sandbox: "sandbox",
32365
32418
  Live: "live"
32366
32419
  };
32420
+ var GetCustomerBalanceAllocationInterval = {
32421
+ OneOff: "one_off",
32422
+ Minute: "minute",
32423
+ Hour: "hour",
32424
+ Day: "day",
32425
+ Week: "week",
32426
+ Month: "month",
32427
+ Quarter: "quarter",
32428
+ SemiAnnual: "semi_annual",
32429
+ Year: "year"
32430
+ };
32367
32431
  var GetCustomerAutoTopupInterval2 = {
32368
32432
  Hour: "hour",
32369
32433
  Day: "day",
@@ -32494,6 +32558,44 @@ function getCustomerParamsToJSON(getCustomerParams) {
32494
32558
  );
32495
32559
  }
32496
32560
  var GetCustomerEnv$inboundSchema = inboundSchema(GetCustomerEnv);
32561
+ var GetCustomerBalanceAllocationInterval$inboundSchema = inboundSchema(GetCustomerBalanceAllocationInterval);
32562
+ var GetCustomerAllocation$inboundSchema = z35__namespace.pipe(
32563
+ z35__namespace.object({
32564
+ entity_id: string5(),
32565
+ amount: number2()
32566
+ }),
32567
+ z35__namespace.transform((v) => {
32568
+ return remap(v, {
32569
+ "entity_id": "entityId"
32570
+ });
32571
+ })
32572
+ );
32573
+ function getCustomerAllocationFromJSON(jsonString) {
32574
+ return safeParse(
32575
+ jsonString,
32576
+ (x) => GetCustomerAllocation$inboundSchema.parse(JSON.parse(x)),
32577
+ `Failed to parse 'GetCustomerAllocation' from JSON`
32578
+ );
32579
+ }
32580
+ var GetCustomerBalanceAllocation$inboundSchema = z35__namespace.pipe(
32581
+ z35__namespace.object({
32582
+ feature_id: string5(),
32583
+ interval: GetCustomerBalanceAllocationInterval$inboundSchema,
32584
+ allocations: z35__namespace.array(z35__namespace.lazy(() => GetCustomerAllocation$inboundSchema))
32585
+ }),
32586
+ z35__namespace.transform((v) => {
32587
+ return remap(v, {
32588
+ "feature_id": "featureId"
32589
+ });
32590
+ })
32591
+ );
32592
+ function getCustomerBalanceAllocationFromJSON(jsonString) {
32593
+ return safeParse(
32594
+ jsonString,
32595
+ (x) => GetCustomerBalanceAllocation$inboundSchema.parse(JSON.parse(x)),
32596
+ `Failed to parse 'GetCustomerBalanceAllocation' from JSON`
32597
+ );
32598
+ }
32497
32599
  var GetCustomerAutoTopupInterval2$inboundSchema = inboundSchema(GetCustomerAutoTopupInterval2);
32498
32600
  var GetCustomerPurchaseLimit2$inboundSchema = z35__namespace.pipe(
32499
32601
  z35__namespace.object({
@@ -32705,6 +32807,9 @@ function getCustomerOverageAllowedFromJSON(jsonString) {
32705
32807
  }
32706
32808
  var GetCustomerBillingControls$inboundSchema = z35__namespace.pipe(
32707
32809
  z35__namespace.object({
32810
+ balance_allocations: optional3(
32811
+ z35__namespace.array(z35__namespace.lazy(() => GetCustomerBalanceAllocation$inboundSchema))
32812
+ ),
32708
32813
  auto_topups: optional3(
32709
32814
  z35__namespace.array(z35__namespace.lazy(() => GetCustomerAutoTopup$inboundSchema))
32710
32815
  ),
@@ -32723,6 +32828,7 @@ var GetCustomerBillingControls$inboundSchema = z35__namespace.pipe(
32723
32828
  }),
32724
32829
  z35__namespace.transform((v) => {
32725
32830
  return remap(v, {
32831
+ "balance_allocations": "balanceAllocations",
32726
32832
  "auto_topups": "autoTopups",
32727
32833
  "spend_limits": "spendLimits",
32728
32834
  "usage_limits": "usageLimits",
@@ -40953,6 +41059,17 @@ var ListCustomersEnv = {
40953
41059
  Sandbox: "sandbox",
40954
41060
  Live: "live"
40955
41061
  };
41062
+ var ListCustomersBalanceAllocationInterval = {
41063
+ OneOff: "one_off",
41064
+ Minute: "minute",
41065
+ Hour: "hour",
41066
+ Day: "day",
41067
+ Week: "week",
41068
+ Month: "month",
41069
+ Quarter: "quarter",
41070
+ SemiAnnual: "semi_annual",
41071
+ Year: "year"
41072
+ };
40956
41073
  var ListCustomersAutoTopupInterval2 = {
40957
41074
  Hour: "hour",
40958
41075
  Day: "day",
@@ -41090,6 +41207,44 @@ function listCustomersParamsToJSON(listCustomersParams) {
41090
41207
  );
41091
41208
  }
41092
41209
  var ListCustomersEnv$inboundSchema = inboundSchema(ListCustomersEnv);
41210
+ var ListCustomersBalanceAllocationInterval$inboundSchema = inboundSchema(ListCustomersBalanceAllocationInterval);
41211
+ var ListCustomersAllocation$inboundSchema = z35__namespace.pipe(
41212
+ z35__namespace.object({
41213
+ entity_id: string5(),
41214
+ amount: number2()
41215
+ }),
41216
+ z35__namespace.transform((v) => {
41217
+ return remap(v, {
41218
+ "entity_id": "entityId"
41219
+ });
41220
+ })
41221
+ );
41222
+ function listCustomersAllocationFromJSON(jsonString) {
41223
+ return safeParse(
41224
+ jsonString,
41225
+ (x) => ListCustomersAllocation$inboundSchema.parse(JSON.parse(x)),
41226
+ `Failed to parse 'ListCustomersAllocation' from JSON`
41227
+ );
41228
+ }
41229
+ var ListCustomersBalanceAllocation$inboundSchema = z35__namespace.pipe(
41230
+ z35__namespace.object({
41231
+ feature_id: string5(),
41232
+ interval: ListCustomersBalanceAllocationInterval$inboundSchema,
41233
+ allocations: z35__namespace.array(z35__namespace.lazy(() => ListCustomersAllocation$inboundSchema))
41234
+ }),
41235
+ z35__namespace.transform((v) => {
41236
+ return remap(v, {
41237
+ "feature_id": "featureId"
41238
+ });
41239
+ })
41240
+ );
41241
+ function listCustomersBalanceAllocationFromJSON(jsonString) {
41242
+ return safeParse(
41243
+ jsonString,
41244
+ (x) => ListCustomersBalanceAllocation$inboundSchema.parse(JSON.parse(x)),
41245
+ `Failed to parse 'ListCustomersBalanceAllocation' from JSON`
41246
+ );
41247
+ }
41093
41248
  var ListCustomersAutoTopupInterval2$inboundSchema = inboundSchema(ListCustomersAutoTopupInterval2);
41094
41249
  var ListCustomersPurchaseLimit2$inboundSchema = z35__namespace.pipe(
41095
41250
  z35__namespace.object({
@@ -41301,6 +41456,9 @@ function listCustomersOverageAllowedFromJSON(jsonString) {
41301
41456
  }
41302
41457
  var ListCustomersBillingControls$inboundSchema = z35__namespace.pipe(
41303
41458
  z35__namespace.object({
41459
+ balance_allocations: optional3(
41460
+ z35__namespace.array(z35__namespace.lazy(() => ListCustomersBalanceAllocation$inboundSchema))
41461
+ ),
41304
41462
  auto_topups: optional3(
41305
41463
  z35__namespace.array(z35__namespace.lazy(() => ListCustomersAutoTopup$inboundSchema))
41306
41464
  ),
@@ -41319,6 +41477,7 @@ var ListCustomersBillingControls$inboundSchema = z35__namespace.pipe(
41319
41477
  }),
41320
41478
  z35__namespace.transform((v) => {
41321
41479
  return remap(v, {
41480
+ "balance_allocations": "balanceAllocations",
41322
41481
  "auto_topups": "autoTopups",
41323
41482
  "spend_limits": "spendLimits",
41324
41483
  "usage_limits": "usageLimits",
@@ -68021,6 +68180,17 @@ function updateBalanceResponseFromJSON(jsonString) {
68021
68180
  `Failed to parse 'UpdateBalanceResponse' from JSON`
68022
68181
  );
68023
68182
  }
68183
+ var BalanceAllocationIntervalRequestBody = {
68184
+ OneOff: "one_off",
68185
+ Minute: "minute",
68186
+ Hour: "hour",
68187
+ Day: "day",
68188
+ Week: "week",
68189
+ Month: "month",
68190
+ Quarter: "quarter",
68191
+ SemiAnnual: "semi_annual",
68192
+ Year: "year"
68193
+ };
68024
68194
  var UpdateCustomerAutoTopupIntervalRequestBody = {
68025
68195
  Hour: "hour",
68026
68196
  Day: "day",
@@ -68070,6 +68240,17 @@ var UpdateCustomerEnv = {
68070
68240
  Sandbox: "sandbox",
68071
68241
  Live: "live"
68072
68242
  };
68243
+ var UpdateCustomerBalanceAllocationIntervalResponse = {
68244
+ OneOff: "one_off",
68245
+ Minute: "minute",
68246
+ Hour: "hour",
68247
+ Day: "day",
68248
+ Week: "week",
68249
+ Month: "month",
68250
+ Quarter: "quarter",
68251
+ SemiAnnual: "semi_annual",
68252
+ Year: "year"
68253
+ };
68073
68254
  var UpdateCustomerAutoTopupIntervalResponse2 = {
68074
68255
  Hour: "hour",
68075
68256
  Day: "day",
@@ -68158,6 +68339,40 @@ var UpdateCustomerDimensionsToEnum1 = {
68158
68339
  var UpdateCustomerToEnum = {
68159
68340
  Inf: "inf"
68160
68341
  };
68342
+ var BalanceAllocationIntervalRequestBody$outboundSchema = z35__namespace.enum(BalanceAllocationIntervalRequestBody);
68343
+ var AllocationRequest$outboundSchema = z35__namespace.pipe(
68344
+ z35__namespace.object({
68345
+ entityId: z35__namespace.string(),
68346
+ amount: z35__namespace.number()
68347
+ }),
68348
+ z35__namespace.transform((v) => {
68349
+ return remap(v, {
68350
+ entityId: "entity_id"
68351
+ });
68352
+ })
68353
+ );
68354
+ function allocationRequestToJSON(allocationRequest) {
68355
+ return JSON.stringify(
68356
+ AllocationRequest$outboundSchema.parse(allocationRequest)
68357
+ );
68358
+ }
68359
+ var BalanceAllocationRequest$outboundSchema = z35__namespace.pipe(
68360
+ z35__namespace.object({
68361
+ featureId: z35__namespace.string(),
68362
+ interval: BalanceAllocationIntervalRequestBody$outboundSchema,
68363
+ allocations: z35__namespace.array(z35__namespace.lazy(() => AllocationRequest$outboundSchema))
68364
+ }),
68365
+ z35__namespace.transform((v) => {
68366
+ return remap(v, {
68367
+ featureId: "feature_id"
68368
+ });
68369
+ })
68370
+ );
68371
+ function balanceAllocationRequestToJSON(balanceAllocationRequest) {
68372
+ return JSON.stringify(
68373
+ BalanceAllocationRequest$outboundSchema.parse(balanceAllocationRequest)
68374
+ );
68375
+ }
68161
68376
  var UpdateCustomerAutoTopupIntervalRequestBody$outboundSchema = z35__namespace.enum(
68162
68377
  UpdateCustomerAutoTopupIntervalRequestBody
68163
68378
  );
@@ -68410,6 +68625,9 @@ function updateCustomerOverageAllowedRequestBodyToJSON(updateCustomerOverageAllo
68410
68625
  }
68411
68626
  var UpdateCustomerBillingControlsRequestBody$outboundSchema = z35__namespace.pipe(
68412
68627
  z35__namespace.object({
68628
+ balanceAllocations: z35__namespace.optional(
68629
+ z35__namespace.array(z35__namespace.lazy(() => BalanceAllocationRequest$outboundSchema))
68630
+ ),
68413
68631
  autoTopups: z35__namespace.optional(
68414
68632
  z35__namespace.array(
68415
68633
  z35__namespace.lazy(() => UpdateCustomerAutoTopupRequestBody$outboundSchema)
@@ -68441,6 +68659,7 @@ var UpdateCustomerBillingControlsRequestBody$outboundSchema = z35__namespace.pip
68441
68659
  }),
68442
68660
  z35__namespace.transform((v) => {
68443
68661
  return remap(v, {
68662
+ balanceAllocations: "balance_allocations",
68444
68663
  autoTopups: "auto_topups",
68445
68664
  spendLimits: "spend_limits",
68446
68665
  usageLimits: "usage_limits",
@@ -68629,6 +68848,48 @@ function updateCustomerParamsToJSON(updateCustomerParams) {
68629
68848
  );
68630
68849
  }
68631
68850
  var UpdateCustomerEnv$inboundSchema = inboundSchema(UpdateCustomerEnv);
68851
+ var UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema = inboundSchema(UpdateCustomerBalanceAllocationIntervalResponse);
68852
+ var UpdateCustomerAllocationResponse$inboundSchema = z35__namespace.pipe(
68853
+ z35__namespace.object({
68854
+ entity_id: string5(),
68855
+ amount: number2()
68856
+ }),
68857
+ z35__namespace.transform((v) => {
68858
+ return remap(v, {
68859
+ "entity_id": "entityId"
68860
+ });
68861
+ })
68862
+ );
68863
+ function updateCustomerAllocationResponseFromJSON(jsonString) {
68864
+ return safeParse(
68865
+ jsonString,
68866
+ (x) => UpdateCustomerAllocationResponse$inboundSchema.parse(JSON.parse(x)),
68867
+ `Failed to parse 'UpdateCustomerAllocationResponse' from JSON`
68868
+ );
68869
+ }
68870
+ var UpdateCustomerBalanceAllocationResponse$inboundSchema = z35__namespace.pipe(
68871
+ z35__namespace.object({
68872
+ feature_id: string5(),
68873
+ interval: UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema,
68874
+ allocations: z35__namespace.array(z35__namespace.lazy(
68875
+ () => UpdateCustomerAllocationResponse$inboundSchema
68876
+ ))
68877
+ }),
68878
+ z35__namespace.transform((v) => {
68879
+ return remap(v, {
68880
+ "feature_id": "featureId"
68881
+ });
68882
+ })
68883
+ );
68884
+ function updateCustomerBalanceAllocationResponseFromJSON(jsonString) {
68885
+ return safeParse(
68886
+ jsonString,
68887
+ (x) => UpdateCustomerBalanceAllocationResponse$inboundSchema.parse(
68888
+ JSON.parse(x)
68889
+ ),
68890
+ `Failed to parse 'UpdateCustomerBalanceAllocationResponse' from JSON`
68891
+ );
68892
+ }
68632
68893
  var UpdateCustomerAutoTopupIntervalResponse2$inboundSchema = inboundSchema(UpdateCustomerAutoTopupIntervalResponse2);
68633
68894
  var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z35__namespace.pipe(
68634
68895
  z35__namespace.object({
@@ -68844,24 +69105,28 @@ function updateCustomerOverageAllowedResponseFromJSON(jsonString) {
68844
69105
  }
68845
69106
  var UpdateCustomerBillingControlsResponse$inboundSchema = z35__namespace.pipe(
68846
69107
  z35__namespace.object({
68847
- auto_topups: optional3(
68848
- z35__namespace.array(z35__namespace.lazy(() => UpdateCustomerAutoTopupResponse$inboundSchema))
68849
- ),
68850
- spend_limits: optional3(
68851
- z35__namespace.array(z35__namespace.lazy(() => UpdateCustomerSpendLimitResponse$inboundSchema))
68852
- ),
68853
- usage_limits: optional3(
68854
- z35__namespace.array(z35__namespace.lazy(() => UpdateCustomerUsageLimitResponse$inboundSchema))
68855
- ),
68856
- usage_alerts: optional3(
68857
- z35__namespace.array(z35__namespace.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
68858
- ),
68859
- overage_allowed: optional3(
68860
- z35__namespace.array(z35__namespace.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
68861
- )
69108
+ balance_allocations: optional3(z35__namespace.array(z35__namespace.lazy(
69109
+ () => UpdateCustomerBalanceAllocationResponse$inboundSchema
69110
+ ))),
69111
+ auto_topups: optional3(z35__namespace.array(z35__namespace.lazy(
69112
+ () => UpdateCustomerAutoTopupResponse$inboundSchema
69113
+ ))),
69114
+ spend_limits: optional3(z35__namespace.array(z35__namespace.lazy(
69115
+ () => UpdateCustomerSpendLimitResponse$inboundSchema
69116
+ ))),
69117
+ usage_limits: optional3(z35__namespace.array(z35__namespace.lazy(
69118
+ () => UpdateCustomerUsageLimitResponse$inboundSchema
69119
+ ))),
69120
+ usage_alerts: optional3(z35__namespace.array(z35__namespace.lazy(
69121
+ () => UpdateCustomerUsageAlertResponse$inboundSchema
69122
+ ))),
69123
+ overage_allowed: optional3(z35__namespace.array(z35__namespace.lazy(
69124
+ () => UpdateCustomerOverageAllowedResponse$inboundSchema
69125
+ )))
68862
69126
  }),
68863
69127
  z35__namespace.transform((v) => {
68864
69128
  return remap(v, {
69129
+ "balance_allocations": "balanceAllocations",
68865
69130
  "auto_topups": "autoTopups",
68866
69131
  "spend_limits": "spendLimits",
68867
69132
  "usage_limits": "usageLimits",
@@ -91247,7 +91512,7 @@ exports.AggregateEventsReset$inboundSchema = AggregateEventsReset$inboundSchema;
91247
91512
  exports.AggregateEventsResponse$inboundSchema = AggregateEventsResponse$inboundSchema;
91248
91513
  exports.AggregateOn = AggregateOn;
91249
91514
  exports.AggregateOn$outboundSchema = AggregateOn$outboundSchema;
91250
- exports.Allocation$inboundSchema = Allocation$inboundSchema;
91515
+ exports.AllocationRequest$outboundSchema = AllocationRequest$outboundSchema;
91251
91516
  exports.ApiKey$inboundSchema = ApiKey$inboundSchema;
91252
91517
  exports.AttachAction = AttachAction;
91253
91518
  exports.AttachAction$inboundSchema = AttachAction$inboundSchema;
@@ -91520,6 +91785,10 @@ exports.Autumn = Autumn;
91520
91785
  exports.AutumnDefaultError = AutumnDefaultError;
91521
91786
  exports.AutumnError = AutumnError;
91522
91787
  exports.Balance$inboundSchema = Balance$inboundSchema;
91788
+ exports.BalanceAllocation$inboundSchema = BalanceAllocation$inboundSchema;
91789
+ exports.BalanceAllocationIntervalRequestBody = BalanceAllocationIntervalRequestBody;
91790
+ exports.BalanceAllocationIntervalRequestBody$outboundSchema = BalanceAllocationIntervalRequestBody$outboundSchema;
91791
+ exports.BalanceAllocationRequest$outboundSchema = BalanceAllocationRequest$outboundSchema;
91523
91792
  exports.BalanceBillingMethod = BalanceBillingMethod;
91524
91793
  exports.BalanceBillingMethod$inboundSchema = BalanceBillingMethod$inboundSchema;
91525
91794
  exports.BalanceCreditSchema1$inboundSchema = BalanceCreditSchema1$inboundSchema;
@@ -92883,6 +93152,7 @@ exports.CreditSchemaVariantPlanFeatureOverride1$inboundSchema = CreditSchemaVari
92883
93152
  exports.CreditSchemaVariantPlanFeatureOverride2$inboundSchema = CreditSchemaVariantPlanFeatureOverride2$inboundSchema;
92884
93153
  exports.CustomField$outboundSchema = CustomField$outboundSchema;
92885
93154
  exports.Customer$inboundSchema = Customer$inboundSchema;
93155
+ exports.CustomerAllocation$inboundSchema = CustomerAllocation$inboundSchema;
92886
93156
  exports.CustomerAnchor = CustomerAnchor;
92887
93157
  exports.CustomerAnchor$inboundSchema = CustomerAnchor$inboundSchema;
92888
93158
  exports.CustomerAutoTopup$inboundSchema = CustomerAutoTopup$inboundSchema;
@@ -92892,6 +93162,9 @@ exports.CustomerAutoTopupInterval2 = CustomerAutoTopupInterval2;
92892
93162
  exports.CustomerAutoTopupInterval2$inboundSchema = CustomerAutoTopupInterval2$inboundSchema;
92893
93163
  exports.CustomerAutoTopupSource = CustomerAutoTopupSource;
92894
93164
  exports.CustomerAutoTopupSource$inboundSchema = CustomerAutoTopupSource$inboundSchema;
93165
+ exports.CustomerBalanceAllocation$inboundSchema = CustomerBalanceAllocation$inboundSchema;
93166
+ exports.CustomerBalanceAllocationInterval = CustomerBalanceAllocationInterval;
93167
+ exports.CustomerBalanceAllocationInterval$inboundSchema = CustomerBalanceAllocationInterval$inboundSchema;
92895
93168
  exports.CustomerBasis = CustomerBasis;
92896
93169
  exports.CustomerBasis$inboundSchema = CustomerBasis$inboundSchema;
92897
93170
  exports.CustomerBillingControls$inboundSchema = CustomerBillingControls$inboundSchema;
@@ -93184,6 +93457,7 @@ exports.FreeTrialDuration2 = FreeTrialDuration2;
93184
93457
  exports.FreeTrialDuration2$inboundSchema = FreeTrialDuration2$inboundSchema;
93185
93458
  exports.FreeTrialParams$inboundSchema = FreeTrialParams$inboundSchema;
93186
93459
  exports.FreeTrialRequestBody$outboundSchema = FreeTrialRequestBody$outboundSchema;
93460
+ exports.GetCustomerAllocation$inboundSchema = GetCustomerAllocation$inboundSchema;
93187
93461
  exports.GetCustomerAnchor = GetCustomerAnchor;
93188
93462
  exports.GetCustomerAnchor$inboundSchema = GetCustomerAnchor$inboundSchema;
93189
93463
  exports.GetCustomerAutoTopup$inboundSchema = GetCustomerAutoTopup$inboundSchema;
@@ -93193,6 +93467,9 @@ exports.GetCustomerAutoTopupInterval2 = GetCustomerAutoTopupInterval2;
93193
93467
  exports.GetCustomerAutoTopupInterval2$inboundSchema = GetCustomerAutoTopupInterval2$inboundSchema;
93194
93468
  exports.GetCustomerAutoTopupSource = GetCustomerAutoTopupSource;
93195
93469
  exports.GetCustomerAutoTopupSource$inboundSchema = GetCustomerAutoTopupSource$inboundSchema;
93470
+ exports.GetCustomerBalanceAllocation$inboundSchema = GetCustomerBalanceAllocation$inboundSchema;
93471
+ exports.GetCustomerBalanceAllocationInterval = GetCustomerBalanceAllocationInterval;
93472
+ exports.GetCustomerBalanceAllocationInterval$inboundSchema = GetCustomerBalanceAllocationInterval$inboundSchema;
93196
93473
  exports.GetCustomerBasis = GetCustomerBasis;
93197
93474
  exports.GetCustomerBasis$inboundSchema = GetCustomerBasis$inboundSchema;
93198
93475
  exports.GetCustomerBillingControls$inboundSchema = GetCustomerBillingControls$inboundSchema;
@@ -93914,6 +94191,7 @@ exports.ListBalancesTier$inboundSchema = ListBalancesTier$inboundSchema;
93914
94191
  exports.ListBalancesTierBehavior = ListBalancesTierBehavior;
93915
94192
  exports.ListBalancesTierBehavior$inboundSchema = ListBalancesTierBehavior$inboundSchema;
93916
94193
  exports.ListBalancesTo$inboundSchema = ListBalancesTo$inboundSchema;
94194
+ exports.ListCustomersAllocation$inboundSchema = ListCustomersAllocation$inboundSchema;
93917
94195
  exports.ListCustomersAnchor = ListCustomersAnchor;
93918
94196
  exports.ListCustomersAnchor$inboundSchema = ListCustomersAnchor$inboundSchema;
93919
94197
  exports.ListCustomersAutoTopup$inboundSchema = ListCustomersAutoTopup$inboundSchema;
@@ -93923,6 +94201,9 @@ exports.ListCustomersAutoTopupInterval2 = ListCustomersAutoTopupInterval2;
93923
94201
  exports.ListCustomersAutoTopupInterval2$inboundSchema = ListCustomersAutoTopupInterval2$inboundSchema;
93924
94202
  exports.ListCustomersAutoTopupSource = ListCustomersAutoTopupSource;
93925
94203
  exports.ListCustomersAutoTopupSource$inboundSchema = ListCustomersAutoTopupSource$inboundSchema;
94204
+ exports.ListCustomersBalanceAllocation$inboundSchema = ListCustomersBalanceAllocation$inboundSchema;
94205
+ exports.ListCustomersBalanceAllocationInterval = ListCustomersBalanceAllocationInterval;
94206
+ exports.ListCustomersBalanceAllocationInterval$inboundSchema = ListCustomersBalanceAllocationInterval$inboundSchema;
93926
94207
  exports.ListCustomersBasis = ListCustomersBasis;
93927
94208
  exports.ListCustomersBasis$inboundSchema = ListCustomersBasis$inboundSchema;
93928
94209
  exports.ListCustomersBillingControls$inboundSchema = ListCustomersBillingControls$inboundSchema;
@@ -96679,6 +96960,7 @@ exports.UpdateBalanceInterval$outboundSchema = UpdateBalanceInterval$outboundSch
96679
96960
  exports.UpdateBalanceParams$outboundSchema = UpdateBalanceParams$outboundSchema;
96680
96961
  exports.UpdateBalanceResponse$inboundSchema = UpdateBalanceResponse$inboundSchema;
96681
96962
  exports.UpdateCustomerAddBillingDetailsTaxId$outboundSchema = UpdateCustomerAddBillingDetailsTaxId$outboundSchema;
96963
+ exports.UpdateCustomerAllocationResponse$inboundSchema = UpdateCustomerAllocationResponse$inboundSchema;
96682
96964
  exports.UpdateCustomerAnchorRequestBody = UpdateCustomerAnchorRequestBody;
96683
96965
  exports.UpdateCustomerAnchorRequestBody$outboundSchema = UpdateCustomerAnchorRequestBody$outboundSchema;
96684
96966
  exports.UpdateCustomerAnchorResponse = UpdateCustomerAnchorResponse;
@@ -96693,6 +96975,9 @@ exports.UpdateCustomerAutoTopupRequestBody$outboundSchema = UpdateCustomerAutoTo
96693
96975
  exports.UpdateCustomerAutoTopupResponse$inboundSchema = UpdateCustomerAutoTopupResponse$inboundSchema;
96694
96976
  exports.UpdateCustomerAutoTopupSource = UpdateCustomerAutoTopupSource;
96695
96977
  exports.UpdateCustomerAutoTopupSource$inboundSchema = UpdateCustomerAutoTopupSource$inboundSchema;
96978
+ exports.UpdateCustomerBalanceAllocationIntervalResponse = UpdateCustomerBalanceAllocationIntervalResponse;
96979
+ exports.UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema = UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema;
96980
+ exports.UpdateCustomerBalanceAllocationResponse$inboundSchema = UpdateCustomerBalanceAllocationResponse$inboundSchema;
96696
96981
  exports.UpdateCustomerBasisRequestBody = UpdateCustomerBasisRequestBody;
96697
96982
  exports.UpdateCustomerBasisRequestBody$outboundSchema = UpdateCustomerBasisRequestBody$outboundSchema;
96698
96983
  exports.UpdateCustomerBasisResponse = UpdateCustomerBasisResponse;
@@ -97850,7 +98135,7 @@ exports.aggregateEventsFeatureIdToJSON = aggregateEventsFeatureIdToJSON;
97850
98135
  exports.aggregateEventsListFromJSON = aggregateEventsListFromJSON;
97851
98136
  exports.aggregateEventsResetFromJSON = aggregateEventsResetFromJSON;
97852
98137
  exports.aggregateEventsResponseFromJSON = aggregateEventsResponseFromJSON;
97853
- exports.allocationFromJSON = allocationFromJSON;
98138
+ exports.allocationRequestToJSON = allocationRequestToJSON;
97854
98139
  exports.apiKeyFromJSON = apiKeyFromJSON;
97855
98140
  exports.attachAddItemAdditionalCurrencyToJSON = attachAddItemAdditionalCurrencyToJSON;
97856
98141
  exports.attachAddItemCreditSchemaUnionToJSON = attachAddItemCreditSchemaUnionToJSON;
@@ -98007,6 +98292,8 @@ exports.attachUsageAlertToJSON = attachUsageAlertToJSON;
98007
98292
  exports.attachUsageLimitFilterToJSON = attachUsageLimitFilterToJSON;
98008
98293
  exports.attachUsageLimitPropertiesToJSON = attachUsageLimitPropertiesToJSON;
98009
98294
  exports.attachUsageLimitToJSON = attachUsageLimitToJSON;
98295
+ exports.balanceAllocationFromJSON = balanceAllocationFromJSON;
98296
+ exports.balanceAllocationRequestToJSON = balanceAllocationRequestToJSON;
98010
98297
  exports.balanceCreditSchema1FromJSON = balanceCreditSchema1FromJSON;
98011
98298
  exports.balanceCreditSchema2FromJSON = balanceCreditSchema2FromJSON;
98012
98299
  exports.balanceCreditSchema3FromJSON = balanceCreditSchema3FromJSON;
@@ -98805,7 +99092,9 @@ exports.creditSchemaUnscheduledPlanUpsertLicense2ToJSON = creditSchemaUnschedule
98805
99092
  exports.creditSchemaVariantPlanFeatureOverride1FromJSON = creditSchemaVariantPlanFeatureOverride1FromJSON;
98806
99093
  exports.creditSchemaVariantPlanFeatureOverride2FromJSON = creditSchemaVariantPlanFeatureOverride2FromJSON;
98807
99094
  exports.customFieldToJSON = customFieldToJSON;
99095
+ exports.customerAllocationFromJSON = customerAllocationFromJSON;
98808
99096
  exports.customerAutoTopupFromJSON = customerAutoTopupFromJSON;
99097
+ exports.customerBalanceAllocationFromJSON = customerBalanceAllocationFromJSON;
98809
99098
  exports.customerBillingControlsFromJSON = customerBillingControlsFromJSON;
98810
99099
  exports.customerConfigFromJSON = customerConfigFromJSON;
98811
99100
  exports.customerCreditSchema1FromJSON = customerCreditSchema1FromJSON;
@@ -98981,7 +99270,9 @@ exports.formatZodError = formatZodError;
98981
99270
  exports.freeTrialFromJSON = freeTrialFromJSON;
98982
99271
  exports.freeTrialParamsFromJSON = freeTrialParamsFromJSON;
98983
99272
  exports.freeTrialRequestBodyToJSON = freeTrialRequestBodyToJSON;
99273
+ exports.getCustomerAllocationFromJSON = getCustomerAllocationFromJSON;
98984
99274
  exports.getCustomerAutoTopupFromJSON = getCustomerAutoTopupFromJSON;
99275
+ exports.getCustomerBalanceAllocationFromJSON = getCustomerBalanceAllocationFromJSON;
98985
99276
  exports.getCustomerBillingControlsFromJSON = getCustomerBillingControlsFromJSON;
98986
99277
  exports.getCustomerBillingDetailsAddressFromJSON = getCustomerBillingDetailsAddressFromJSON;
98987
99278
  exports.getCustomerBillingDetailsCustomFieldFromJSON = getCustomerBillingDetailsCustomFieldFromJSON;
@@ -99388,7 +99679,9 @@ exports.listBalancesResponseFromJSON = listBalancesResponseFromJSON;
99388
99679
  exports.listBalancesRolloverFromJSON = listBalancesRolloverFromJSON;
99389
99680
  exports.listBalancesTierFromJSON = listBalancesTierFromJSON;
99390
99681
  exports.listBalancesToFromJSON = listBalancesToFromJSON;
99682
+ exports.listCustomersAllocationFromJSON = listCustomersAllocationFromJSON;
99391
99683
  exports.listCustomersAutoTopupFromJSON = listCustomersAutoTopupFromJSON;
99684
+ exports.listCustomersBalanceAllocationFromJSON = listCustomersBalanceAllocationFromJSON;
99392
99685
  exports.listCustomersBillingControlsFromJSON = listCustomersBillingControlsFromJSON;
99393
99686
  exports.listCustomersConfigFromJSON = listCustomersConfigFromJSON;
99394
99687
  exports.listCustomersCreditSchema1FromJSON = listCustomersCreditSchema1FromJSON;
@@ -100974,8 +101267,10 @@ exports.unscheduledPlanUsageLimitToJSON = unscheduledPlanUsageLimitToJSON;
100974
101267
  exports.updateBalanceParamsToJSON = updateBalanceParamsToJSON;
100975
101268
  exports.updateBalanceResponseFromJSON = updateBalanceResponseFromJSON;
100976
101269
  exports.updateCustomerAddBillingDetailsTaxIdToJSON = updateCustomerAddBillingDetailsTaxIdToJSON;
101270
+ exports.updateCustomerAllocationResponseFromJSON = updateCustomerAllocationResponseFromJSON;
100977
101271
  exports.updateCustomerAutoTopupRequestBodyToJSON = updateCustomerAutoTopupRequestBodyToJSON;
100978
101272
  exports.updateCustomerAutoTopupResponseFromJSON = updateCustomerAutoTopupResponseFromJSON;
101273
+ exports.updateCustomerBalanceAllocationResponseFromJSON = updateCustomerBalanceAllocationResponseFromJSON;
100979
101274
  exports.updateCustomerBillingControlsRequestBodyToJSON = updateCustomerBillingControlsRequestBodyToJSON;
100980
101275
  exports.updateCustomerBillingControlsResponseFromJSON = updateCustomerBillingControlsResponseFromJSON;
100981
101276
  exports.updateCustomerBillingDetailsAddressToJSON = updateCustomerBillingDetailsAddressToJSON;