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
@@ -3305,7 +3305,7 @@ declare const BalanceSource: {
3305
3305
  * Where this row's credits come from: shared at the customer level, or owned by the entity.
3306
3306
  */
3307
3307
  type BalanceSource = OpenEnum<typeof BalanceSource>;
3308
- type Allocation = {
3308
+ type BalanceAllocation = {
3309
3309
  /**
3310
3310
  * The amount allocated to this entity.
3311
3311
  */
@@ -3359,7 +3359,7 @@ type Breakdown = {
3359
3359
  /**
3360
3360
  * Set when this row's numbers are the entity's allocated share of the customer's credits.
3361
3361
  */
3362
- allocation?: Allocation | null | undefined;
3362
+ allocation?: BalanceAllocation | null | undefined;
3363
3363
  };
3364
3364
  type BalanceRollover = {
3365
3365
  /**
@@ -23472,6 +23472,48 @@ declare const CustomerEnv: {
23472
23472
  * The environment this customer was created in.
23473
23473
  */
23474
23474
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
23475
+ /**
23476
+ * The reset interval of the shared credits being allocated.
23477
+ */
23478
+ declare const CustomerBalanceAllocationInterval: {
23479
+ readonly OneOff: "one_off";
23480
+ readonly Minute: "minute";
23481
+ readonly Hour: "hour";
23482
+ readonly Day: "day";
23483
+ readonly Week: "week";
23484
+ readonly Month: "month";
23485
+ readonly Quarter: "quarter";
23486
+ readonly SemiAnnual: "semi_annual";
23487
+ readonly Year: "year";
23488
+ };
23489
+ /**
23490
+ * The reset interval of the shared credits being allocated.
23491
+ */
23492
+ type CustomerBalanceAllocationInterval = OpenEnum<typeof CustomerBalanceAllocationInterval>;
23493
+ type CustomerAllocation = {
23494
+ /**
23495
+ * The public entity ID.
23496
+ */
23497
+ entityId: string;
23498
+ /**
23499
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
23500
+ */
23501
+ amount: number;
23502
+ };
23503
+ type CustomerBalanceAllocation = {
23504
+ /**
23505
+ * The feature whose shared customer credits are allocated.
23506
+ */
23507
+ featureId: string;
23508
+ /**
23509
+ * The reset interval of the shared credits being allocated.
23510
+ */
23511
+ interval: CustomerBalanceAllocationInterval;
23512
+ /**
23513
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
23514
+ */
23515
+ allocations: Array<CustomerAllocation>;
23516
+ };
23475
23517
  /**
23476
23518
  * The time interval for the purchase limit window.
23477
23519
  */
@@ -23802,6 +23844,10 @@ type CustomerOverageAllowed = {
23802
23844
  * Billing controls for the customer (auto top-ups, etc.)
23803
23845
  */
23804
23846
  type CustomerBillingControls = {
23847
+ /**
23848
+ * Customer-level entity allocations of shared credits. Amounts are requested shares before proportional scaling.
23849
+ */
23850
+ balanceAllocations?: Array<CustomerBalanceAllocation> | undefined;
23805
23851
  /**
23806
23852
  * List of auto top-up configurations per feature.
23807
23853
  */
@@ -25244,6 +25290,48 @@ declare const GetCustomerEnv: {
25244
25290
  * The environment this customer was created in.
25245
25291
  */
25246
25292
  type GetCustomerEnv = OpenEnum<typeof GetCustomerEnv>;
25293
+ /**
25294
+ * The reset interval of the shared credits being allocated.
25295
+ */
25296
+ declare const GetCustomerBalanceAllocationInterval: {
25297
+ readonly OneOff: "one_off";
25298
+ readonly Minute: "minute";
25299
+ readonly Hour: "hour";
25300
+ readonly Day: "day";
25301
+ readonly Week: "week";
25302
+ readonly Month: "month";
25303
+ readonly Quarter: "quarter";
25304
+ readonly SemiAnnual: "semi_annual";
25305
+ readonly Year: "year";
25306
+ };
25307
+ /**
25308
+ * The reset interval of the shared credits being allocated.
25309
+ */
25310
+ type GetCustomerBalanceAllocationInterval = OpenEnum<typeof GetCustomerBalanceAllocationInterval>;
25311
+ type GetCustomerAllocation = {
25312
+ /**
25313
+ * The public entity ID.
25314
+ */
25315
+ entityId: string;
25316
+ /**
25317
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
25318
+ */
25319
+ amount: number;
25320
+ };
25321
+ type GetCustomerBalanceAllocation = {
25322
+ /**
25323
+ * The feature whose shared customer credits are allocated.
25324
+ */
25325
+ featureId: string;
25326
+ /**
25327
+ * The reset interval of the shared credits being allocated.
25328
+ */
25329
+ interval: GetCustomerBalanceAllocationInterval;
25330
+ /**
25331
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
25332
+ */
25333
+ allocations: Array<GetCustomerAllocation>;
25334
+ };
25247
25335
  /**
25248
25336
  * The time interval for the purchase limit window.
25249
25337
  */
@@ -25574,6 +25662,10 @@ type GetCustomerOverageAllowed = {
25574
25662
  * Billing controls for the customer (auto top-ups, etc.)
25575
25663
  */
25576
25664
  type GetCustomerBillingControls = {
25665
+ /**
25666
+ * Customer-level entity allocations of shared credits. Amounts are requested shares before proportional scaling.
25667
+ */
25668
+ balanceAllocations?: Array<GetCustomerBalanceAllocation> | undefined;
25577
25669
  /**
25578
25670
  * List of auto top-up configurations per feature.
25579
25671
  */
@@ -32361,6 +32453,48 @@ declare const ListCustomersEnv: {
32361
32453
  * The environment this customer was created in.
32362
32454
  */
32363
32455
  type ListCustomersEnv = OpenEnum<typeof ListCustomersEnv>;
32456
+ /**
32457
+ * The reset interval of the shared credits being allocated.
32458
+ */
32459
+ declare const ListCustomersBalanceAllocationInterval: {
32460
+ readonly OneOff: "one_off";
32461
+ readonly Minute: "minute";
32462
+ readonly Hour: "hour";
32463
+ readonly Day: "day";
32464
+ readonly Week: "week";
32465
+ readonly Month: "month";
32466
+ readonly Quarter: "quarter";
32467
+ readonly SemiAnnual: "semi_annual";
32468
+ readonly Year: "year";
32469
+ };
32470
+ /**
32471
+ * The reset interval of the shared credits being allocated.
32472
+ */
32473
+ type ListCustomersBalanceAllocationInterval = OpenEnum<typeof ListCustomersBalanceAllocationInterval>;
32474
+ type ListCustomersAllocation = {
32475
+ /**
32476
+ * The public entity ID.
32477
+ */
32478
+ entityId: string;
32479
+ /**
32480
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
32481
+ */
32482
+ amount: number;
32483
+ };
32484
+ type ListCustomersBalanceAllocation = {
32485
+ /**
32486
+ * The feature whose shared customer credits are allocated.
32487
+ */
32488
+ featureId: string;
32489
+ /**
32490
+ * The reset interval of the shared credits being allocated.
32491
+ */
32492
+ interval: ListCustomersBalanceAllocationInterval;
32493
+ /**
32494
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
32495
+ */
32496
+ allocations: Array<ListCustomersAllocation>;
32497
+ };
32364
32498
  /**
32365
32499
  * The time interval for the purchase limit window.
32366
32500
  */
@@ -32691,6 +32825,10 @@ type ListCustomersOverageAllowed = {
32691
32825
  * Billing controls for the customer (auto top-ups, etc.)
32692
32826
  */
32693
32827
  type ListCustomersBillingControls = {
32828
+ /**
32829
+ * Customer-level entity allocations of shared credits. Amounts are requested shares before proportional scaling.
32830
+ */
32831
+ balanceAllocations?: Array<ListCustomersBalanceAllocation> | undefined;
32694
32832
  /**
32695
32833
  * List of auto top-up configurations per feature.
32696
32834
  */
@@ -54772,6 +54910,48 @@ type UpdateBalanceResponse = {
54772
54910
  success: boolean;
54773
54911
  };
54774
54912
 
54913
+ /**
54914
+ * The reset interval of the shared credits being allocated.
54915
+ */
54916
+ declare const BalanceAllocationIntervalRequestBody: {
54917
+ readonly OneOff: "one_off";
54918
+ readonly Minute: "minute";
54919
+ readonly Hour: "hour";
54920
+ readonly Day: "day";
54921
+ readonly Week: "week";
54922
+ readonly Month: "month";
54923
+ readonly Quarter: "quarter";
54924
+ readonly SemiAnnual: "semi_annual";
54925
+ readonly Year: "year";
54926
+ };
54927
+ /**
54928
+ * The reset interval of the shared credits being allocated.
54929
+ */
54930
+ type BalanceAllocationIntervalRequestBody = ClosedEnum<typeof BalanceAllocationIntervalRequestBody>;
54931
+ type AllocationRequest = {
54932
+ /**
54933
+ * The public entity ID.
54934
+ */
54935
+ entityId: string;
54936
+ /**
54937
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
54938
+ */
54939
+ amount: number;
54940
+ };
54941
+ type BalanceAllocationRequest = {
54942
+ /**
54943
+ * The feature whose shared customer credits are allocated.
54944
+ */
54945
+ featureId: string;
54946
+ /**
54947
+ * The reset interval of the shared credits being allocated.
54948
+ */
54949
+ interval: BalanceAllocationIntervalRequestBody;
54950
+ /**
54951
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
54952
+ */
54953
+ allocations: Array<AllocationRequest>;
54954
+ };
54775
54955
  /**
54776
54956
  * The time interval for the purchase limit window.
54777
54957
  */
@@ -55054,6 +55234,10 @@ type UpdateCustomerOverageAllowedRequestBody = {
55054
55234
  enabled?: boolean | undefined;
55055
55235
  };
55056
55236
  type UpdateCustomerBillingControlsRequestBody = {
55237
+ /**
55238
+ * Replace all customer-level balance allocations. Omit to keep existing allocations; pass [] to release all. Available only when updating an existing customer.
55239
+ */
55240
+ balanceAllocations?: Array<BalanceAllocationRequest> | undefined;
55057
55241
  /**
55058
55242
  * List of auto top-up configurations per feature.
55059
55243
  */
@@ -55235,6 +55419,48 @@ declare const UpdateCustomerEnv: {
55235
55419
  * The environment this customer was created in.
55236
55420
  */
55237
55421
  type UpdateCustomerEnv = OpenEnum<typeof UpdateCustomerEnv>;
55422
+ /**
55423
+ * The reset interval of the shared credits being allocated.
55424
+ */
55425
+ declare const UpdateCustomerBalanceAllocationIntervalResponse: {
55426
+ readonly OneOff: "one_off";
55427
+ readonly Minute: "minute";
55428
+ readonly Hour: "hour";
55429
+ readonly Day: "day";
55430
+ readonly Week: "week";
55431
+ readonly Month: "month";
55432
+ readonly Quarter: "quarter";
55433
+ readonly SemiAnnual: "semi_annual";
55434
+ readonly Year: "year";
55435
+ };
55436
+ /**
55437
+ * The reset interval of the shared credits being allocated.
55438
+ */
55439
+ type UpdateCustomerBalanceAllocationIntervalResponse = OpenEnum<typeof UpdateCustomerBalanceAllocationIntervalResponse>;
55440
+ type UpdateCustomerAllocationResponse = {
55441
+ /**
55442
+ * The public entity ID.
55443
+ */
55444
+ entityId: string;
55445
+ /**
55446
+ * Requested credits per cycle, before proportional scaling. 0 releases the allocation.
55447
+ */
55448
+ amount: number;
55449
+ };
55450
+ type UpdateCustomerBalanceAllocationResponse = {
55451
+ /**
55452
+ * The feature whose shared customer credits are allocated.
55453
+ */
55454
+ featureId: string;
55455
+ /**
55456
+ * The reset interval of the shared credits being allocated.
55457
+ */
55458
+ interval: UpdateCustomerBalanceAllocationIntervalResponse;
55459
+ /**
55460
+ * Complete list of entity allocations for this feature. Omitted entities release their shares.
55461
+ */
55462
+ allocations: Array<UpdateCustomerAllocationResponse>;
55463
+ };
55238
55464
  /**
55239
55465
  * The time interval for the purchase limit window.
55240
55466
  */
@@ -55565,6 +55791,10 @@ type UpdateCustomerOverageAllowedResponse = {
55565
55791
  * Billing controls for the customer (auto top-ups, etc.)
55566
55792
  */
55567
55793
  type UpdateCustomerBillingControlsResponse = {
55794
+ /**
55795
+ * Customer-level entity allocations of shared credits. Amounts are requested shares before proportional scaling.
55796
+ */
55797
+ balanceAllocations?: Array<UpdateCustomerBalanceAllocationResponse> | undefined;
55568
55798
  /**
55569
55799
  * List of auto top-up configurations per feature.
55570
55800
  */
@@ -4034,7 +4034,7 @@ var BalancePrice$inboundSchema = z15.pipe(
4034
4034
  })
4035
4035
  );
4036
4036
  var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
4037
- var Allocation$inboundSchema = z15.object({
4037
+ var BalanceAllocation$inboundSchema = z15.object({
4038
4038
  amount: number2()
4039
4039
  });
4040
4040
  var Breakdown$inboundSchema = z15.pipe(
@@ -4051,7 +4051,7 @@ var Breakdown$inboundSchema = z15.pipe(
4051
4051
  expires_at: nullable(number2()),
4052
4052
  source: optional3(BalanceSource$inboundSchema),
4053
4053
  allocation: z15.optional(
4054
- z15.nullable(z15.lazy(() => Allocation$inboundSchema))
4054
+ z15.nullable(z15.lazy(() => BalanceAllocation$inboundSchema))
4055
4055
  )
4056
4056
  }),
4057
4057
  z15.transform((v) => {
@@ -21136,6 +21136,17 @@ var CustomerEnv = {
21136
21136
  Sandbox: "sandbox",
21137
21137
  Live: "live"
21138
21138
  };
21139
+ var CustomerBalanceAllocationInterval = {
21140
+ OneOff: "one_off",
21141
+ Minute: "minute",
21142
+ Hour: "hour",
21143
+ Day: "day",
21144
+ Week: "week",
21145
+ Month: "month",
21146
+ Quarter: "quarter",
21147
+ SemiAnnual: "semi_annual",
21148
+ Year: "year"
21149
+ };
21139
21150
  var CustomerAutoTopupInterval2 = {
21140
21151
  Hour: "hour",
21141
21152
  Day: "day",
@@ -21250,6 +21261,30 @@ var TaxExempt = {
21250
21261
  Reverse: "reverse"
21251
21262
  };
21252
21263
  var CustomerEnv$inboundSchema = inboundSchema(CustomerEnv);
21264
+ var CustomerBalanceAllocationInterval$inboundSchema = inboundSchema(CustomerBalanceAllocationInterval);
21265
+ var CustomerAllocation$inboundSchema = z39.pipe(
21266
+ z39.object({
21267
+ entity_id: string5(),
21268
+ amount: number2()
21269
+ }),
21270
+ z39.transform((v) => {
21271
+ return remap(v, {
21272
+ "entity_id": "entityId"
21273
+ });
21274
+ })
21275
+ );
21276
+ var CustomerBalanceAllocation$inboundSchema = z39.pipe(
21277
+ z39.object({
21278
+ feature_id: string5(),
21279
+ interval: CustomerBalanceAllocationInterval$inboundSchema,
21280
+ allocations: z39.array(z39.lazy(() => CustomerAllocation$inboundSchema))
21281
+ }),
21282
+ z39.transform((v) => {
21283
+ return remap(v, {
21284
+ "feature_id": "featureId"
21285
+ });
21286
+ })
21287
+ );
21253
21288
  var CustomerAutoTopupInterval2$inboundSchema = inboundSchema(CustomerAutoTopupInterval2);
21254
21289
  var CustomerPurchaseLimit2$inboundSchema = z39.pipe(
21255
21290
  z39.object({
@@ -21391,6 +21426,9 @@ var CustomerOverageAllowed$inboundSchema = z39.pipe(
21391
21426
  );
21392
21427
  var CustomerBillingControls$inboundSchema = z39.pipe(
21393
21428
  z39.object({
21429
+ balance_allocations: optional3(
21430
+ z39.array(z39.lazy(() => CustomerBalanceAllocation$inboundSchema))
21431
+ ),
21394
21432
  auto_topups: optional3(
21395
21433
  z39.array(z39.lazy(() => CustomerAutoTopup$inboundSchema))
21396
21434
  ),
@@ -21409,6 +21447,7 @@ var CustomerBillingControls$inboundSchema = z39.pipe(
21409
21447
  }),
21410
21448
  z39.transform((v) => {
21411
21449
  return remap(v, {
21450
+ "balance_allocations": "balanceAllocations",
21412
21451
  "auto_topups": "autoTopups",
21413
21452
  "spend_limits": "spendLimits",
21414
21453
  "usage_limits": "usageLimits",
@@ -22421,6 +22460,17 @@ var GetCustomerEnv = {
22421
22460
  Sandbox: "sandbox",
22422
22461
  Live: "live"
22423
22462
  };
22463
+ var GetCustomerBalanceAllocationInterval = {
22464
+ OneOff: "one_off",
22465
+ Minute: "minute",
22466
+ Hour: "hour",
22467
+ Day: "day",
22468
+ Week: "week",
22469
+ Month: "month",
22470
+ Quarter: "quarter",
22471
+ SemiAnnual: "semi_annual",
22472
+ Year: "year"
22473
+ };
22424
22474
  var GetCustomerAutoTopupInterval2 = {
22425
22475
  Hour: "hour",
22426
22476
  Day: "day",
@@ -22546,6 +22596,30 @@ var GetCustomerParams$outboundSchema = z52.pipe(
22546
22596
  })
22547
22597
  );
22548
22598
  var GetCustomerEnv$inboundSchema = inboundSchema(GetCustomerEnv);
22599
+ var GetCustomerBalanceAllocationInterval$inboundSchema = inboundSchema(GetCustomerBalanceAllocationInterval);
22600
+ var GetCustomerAllocation$inboundSchema = z52.pipe(
22601
+ z52.object({
22602
+ entity_id: string5(),
22603
+ amount: number2()
22604
+ }),
22605
+ z52.transform((v) => {
22606
+ return remap(v, {
22607
+ "entity_id": "entityId"
22608
+ });
22609
+ })
22610
+ );
22611
+ var GetCustomerBalanceAllocation$inboundSchema = z52.pipe(
22612
+ z52.object({
22613
+ feature_id: string5(),
22614
+ interval: GetCustomerBalanceAllocationInterval$inboundSchema,
22615
+ allocations: z52.array(z52.lazy(() => GetCustomerAllocation$inboundSchema))
22616
+ }),
22617
+ z52.transform((v) => {
22618
+ return remap(v, {
22619
+ "feature_id": "featureId"
22620
+ });
22621
+ })
22622
+ );
22549
22623
  var GetCustomerAutoTopupInterval2$inboundSchema = inboundSchema(GetCustomerAutoTopupInterval2);
22550
22624
  var GetCustomerPurchaseLimit2$inboundSchema = z52.pipe(
22551
22625
  z52.object({
@@ -22687,6 +22761,9 @@ var GetCustomerOverageAllowed$inboundSchema = z52.pipe(
22687
22761
  );
22688
22762
  var GetCustomerBillingControls$inboundSchema = z52.pipe(
22689
22763
  z52.object({
22764
+ balance_allocations: optional3(
22765
+ z52.array(z52.lazy(() => GetCustomerBalanceAllocation$inboundSchema))
22766
+ ),
22690
22767
  auto_topups: optional3(
22691
22768
  z52.array(z52.lazy(() => GetCustomerAutoTopup$inboundSchema))
22692
22769
  ),
@@ -22705,6 +22782,7 @@ var GetCustomerBillingControls$inboundSchema = z52.pipe(
22705
22782
  }),
22706
22783
  z52.transform((v) => {
22707
22784
  return remap(v, {
22785
+ "balance_allocations": "balanceAllocations",
22708
22786
  "auto_topups": "autoTopups",
22709
22787
  "spend_limits": "spendLimits",
22710
22788
  "usage_limits": "usageLimits",
@@ -28322,6 +28400,17 @@ var ListCustomersEnv = {
28322
28400
  Sandbox: "sandbox",
28323
28401
  Live: "live"
28324
28402
  };
28403
+ var ListCustomersBalanceAllocationInterval = {
28404
+ OneOff: "one_off",
28405
+ Minute: "minute",
28406
+ Hour: "hour",
28407
+ Day: "day",
28408
+ Week: "week",
28409
+ Month: "month",
28410
+ Quarter: "quarter",
28411
+ SemiAnnual: "semi_annual",
28412
+ Year: "year"
28413
+ };
28325
28414
  var ListCustomersAutoTopupInterval2 = {
28326
28415
  Hour: "hour",
28327
28416
  Day: "day",
@@ -28446,6 +28535,30 @@ var ListCustomersParams$outboundSchema = z67.pipe(
28446
28535
  })
28447
28536
  );
28448
28537
  var ListCustomersEnv$inboundSchema = inboundSchema(ListCustomersEnv);
28538
+ var ListCustomersBalanceAllocationInterval$inboundSchema = inboundSchema(ListCustomersBalanceAllocationInterval);
28539
+ var ListCustomersAllocation$inboundSchema = z67.pipe(
28540
+ z67.object({
28541
+ entity_id: string5(),
28542
+ amount: number2()
28543
+ }),
28544
+ z67.transform((v) => {
28545
+ return remap(v, {
28546
+ "entity_id": "entityId"
28547
+ });
28548
+ })
28549
+ );
28550
+ var ListCustomersBalanceAllocation$inboundSchema = z67.pipe(
28551
+ z67.object({
28552
+ feature_id: string5(),
28553
+ interval: ListCustomersBalanceAllocationInterval$inboundSchema,
28554
+ allocations: z67.array(z67.lazy(() => ListCustomersAllocation$inboundSchema))
28555
+ }),
28556
+ z67.transform((v) => {
28557
+ return remap(v, {
28558
+ "feature_id": "featureId"
28559
+ });
28560
+ })
28561
+ );
28449
28562
  var ListCustomersAutoTopupInterval2$inboundSchema = inboundSchema(ListCustomersAutoTopupInterval2);
28450
28563
  var ListCustomersPurchaseLimit2$inboundSchema = z67.pipe(
28451
28564
  z67.object({
@@ -28587,6 +28700,9 @@ var ListCustomersOverageAllowed$inboundSchema = z67.pipe(
28587
28700
  );
28588
28701
  var ListCustomersBillingControls$inboundSchema = z67.pipe(
28589
28702
  z67.object({
28703
+ balance_allocations: optional3(
28704
+ z67.array(z67.lazy(() => ListCustomersBalanceAllocation$inboundSchema))
28705
+ ),
28590
28706
  auto_topups: optional3(
28591
28707
  z67.array(z67.lazy(() => ListCustomersAutoTopup$inboundSchema))
28592
28708
  ),
@@ -28605,6 +28721,7 @@ var ListCustomersBillingControls$inboundSchema = z67.pipe(
28605
28721
  }),
28606
28722
  z67.transform((v) => {
28607
28723
  return remap(v, {
28724
+ "balance_allocations": "balanceAllocations",
28608
28725
  "auto_topups": "autoTopups",
28609
28726
  "spend_limits": "spendLimits",
28610
28727
  "usage_limits": "usageLimits",
@@ -46762,6 +46879,17 @@ var UpdateBalanceResponse$inboundSchema = z109.object({
46762
46879
 
46763
46880
  // ../sdk/src/models/update-customer-op.ts
46764
46881
  import * as z110 from "zod/v4-mini";
46882
+ var BalanceAllocationIntervalRequestBody = {
46883
+ OneOff: "one_off",
46884
+ Minute: "minute",
46885
+ Hour: "hour",
46886
+ Day: "day",
46887
+ Week: "week",
46888
+ Month: "month",
46889
+ Quarter: "quarter",
46890
+ SemiAnnual: "semi_annual",
46891
+ Year: "year"
46892
+ };
46765
46893
  var UpdateCustomerAutoTopupIntervalRequestBody = {
46766
46894
  Hour: "hour",
46767
46895
  Day: "day",
@@ -46811,6 +46939,17 @@ var UpdateCustomerEnv = {
46811
46939
  Sandbox: "sandbox",
46812
46940
  Live: "live"
46813
46941
  };
46942
+ var UpdateCustomerBalanceAllocationIntervalResponse = {
46943
+ OneOff: "one_off",
46944
+ Minute: "minute",
46945
+ Hour: "hour",
46946
+ Day: "day",
46947
+ Week: "week",
46948
+ Month: "month",
46949
+ Quarter: "quarter",
46950
+ SemiAnnual: "semi_annual",
46951
+ Year: "year"
46952
+ };
46814
46953
  var UpdateCustomerAutoTopupIntervalResponse2 = {
46815
46954
  Hour: "hour",
46816
46955
  Day: "day",
@@ -46899,6 +47038,30 @@ var UpdateCustomerDimensionsToEnum1 = {
46899
47038
  var UpdateCustomerToEnum = {
46900
47039
  Inf: "inf"
46901
47040
  };
47041
+ var BalanceAllocationIntervalRequestBody$outboundSchema = z110.enum(BalanceAllocationIntervalRequestBody);
47042
+ var AllocationRequest$outboundSchema = z110.pipe(
47043
+ z110.object({
47044
+ entityId: z110.string(),
47045
+ amount: z110.number()
47046
+ }),
47047
+ z110.transform((v) => {
47048
+ return remap(v, {
47049
+ entityId: "entity_id"
47050
+ });
47051
+ })
47052
+ );
47053
+ var BalanceAllocationRequest$outboundSchema = z110.pipe(
47054
+ z110.object({
47055
+ featureId: z110.string(),
47056
+ interval: BalanceAllocationIntervalRequestBody$outboundSchema,
47057
+ allocations: z110.array(z110.lazy(() => AllocationRequest$outboundSchema))
47058
+ }),
47059
+ z110.transform((v) => {
47060
+ return remap(v, {
47061
+ featureId: "feature_id"
47062
+ });
47063
+ })
47064
+ );
46902
47065
  var UpdateCustomerAutoTopupIntervalRequestBody$outboundSchema = z110.enum(
46903
47066
  UpdateCustomerAutoTopupIntervalRequestBody
46904
47067
  );
@@ -47053,6 +47216,9 @@ var UpdateCustomerOverageAllowedRequestBody$outboundSchema = z110.pipe(
47053
47216
  );
47054
47217
  var UpdateCustomerBillingControlsRequestBody$outboundSchema = z110.pipe(
47055
47218
  z110.object({
47219
+ balanceAllocations: z110.optional(
47220
+ z110.array(z110.lazy(() => BalanceAllocationRequest$outboundSchema))
47221
+ ),
47056
47222
  autoTopups: z110.optional(
47057
47223
  z110.array(
47058
47224
  z110.lazy(() => UpdateCustomerAutoTopupRequestBody$outboundSchema)
@@ -47084,6 +47250,7 @@ var UpdateCustomerBillingControlsRequestBody$outboundSchema = z110.pipe(
47084
47250
  }),
47085
47251
  z110.transform((v) => {
47086
47252
  return remap(v, {
47253
+ balanceAllocations: "balance_allocations",
47087
47254
  autoTopups: "auto_topups",
47088
47255
  spendLimits: "spend_limits",
47089
47256
  usageLimits: "usage_limits",
@@ -47208,6 +47375,32 @@ var UpdateCustomerParams$outboundSchema = z110.pipe(
47208
47375
  })
47209
47376
  );
47210
47377
  var UpdateCustomerEnv$inboundSchema = inboundSchema(UpdateCustomerEnv);
47378
+ var UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema = inboundSchema(UpdateCustomerBalanceAllocationIntervalResponse);
47379
+ var UpdateCustomerAllocationResponse$inboundSchema = z110.pipe(
47380
+ z110.object({
47381
+ entity_id: string5(),
47382
+ amount: number2()
47383
+ }),
47384
+ z110.transform((v) => {
47385
+ return remap(v, {
47386
+ "entity_id": "entityId"
47387
+ });
47388
+ })
47389
+ );
47390
+ var UpdateCustomerBalanceAllocationResponse$inboundSchema = z110.pipe(
47391
+ z110.object({
47392
+ feature_id: string5(),
47393
+ interval: UpdateCustomerBalanceAllocationIntervalResponse$inboundSchema,
47394
+ allocations: z110.array(z110.lazy(
47395
+ () => UpdateCustomerAllocationResponse$inboundSchema
47396
+ ))
47397
+ }),
47398
+ z110.transform((v) => {
47399
+ return remap(v, {
47400
+ "feature_id": "featureId"
47401
+ });
47402
+ })
47403
+ );
47211
47404
  var UpdateCustomerAutoTopupIntervalResponse2$inboundSchema = inboundSchema(UpdateCustomerAutoTopupIntervalResponse2);
47212
47405
  var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z110.pipe(
47213
47406
  z110.object({
@@ -47353,24 +47546,28 @@ var UpdateCustomerOverageAllowedResponse$inboundSchema = z110.pipe(
47353
47546
  );
47354
47547
  var UpdateCustomerBillingControlsResponse$inboundSchema = z110.pipe(
47355
47548
  z110.object({
47356
- auto_topups: optional3(
47357
- z110.array(z110.lazy(() => UpdateCustomerAutoTopupResponse$inboundSchema))
47358
- ),
47359
- spend_limits: optional3(
47360
- z110.array(z110.lazy(() => UpdateCustomerSpendLimitResponse$inboundSchema))
47361
- ),
47362
- usage_limits: optional3(
47363
- z110.array(z110.lazy(() => UpdateCustomerUsageLimitResponse$inboundSchema))
47364
- ),
47365
- usage_alerts: optional3(
47366
- z110.array(z110.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
47367
- ),
47368
- overage_allowed: optional3(
47369
- z110.array(z110.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
47370
- )
47549
+ balance_allocations: optional3(z110.array(z110.lazy(
47550
+ () => UpdateCustomerBalanceAllocationResponse$inboundSchema
47551
+ ))),
47552
+ auto_topups: optional3(z110.array(z110.lazy(
47553
+ () => UpdateCustomerAutoTopupResponse$inboundSchema
47554
+ ))),
47555
+ spend_limits: optional3(z110.array(z110.lazy(
47556
+ () => UpdateCustomerSpendLimitResponse$inboundSchema
47557
+ ))),
47558
+ usage_limits: optional3(z110.array(z110.lazy(
47559
+ () => UpdateCustomerUsageLimitResponse$inboundSchema
47560
+ ))),
47561
+ usage_alerts: optional3(z110.array(z110.lazy(
47562
+ () => UpdateCustomerUsageAlertResponse$inboundSchema
47563
+ ))),
47564
+ overage_allowed: optional3(z110.array(z110.lazy(
47565
+ () => UpdateCustomerOverageAllowedResponse$inboundSchema
47566
+ )))
47371
47567
  }),
47372
47568
  z110.transform((v) => {
47373
47569
  return remap(v, {
47570
+ "balance_allocations": "balanceAllocations",
47374
47571
  "auto_topups": "autoTopups",
47375
47572
  "spend_limits": "spendLimits",
47376
47573
  "usage_limits": "usageLimits",