autumn-js 1.2.2 → 1.2.3

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 (137) hide show
  1. package/dist/backend/adapters/express.d.mts +1 -1
  2. package/dist/backend/adapters/express.d.ts +1 -1
  3. package/dist/backend/adapters/express.js +333 -29
  4. package/dist/backend/adapters/express.mjs +9 -9
  5. package/dist/backend/adapters/fetch.d.mts +1 -1
  6. package/dist/backend/adapters/fetch.d.ts +1 -1
  7. package/dist/backend/adapters/fetch.js +333 -29
  8. package/dist/backend/adapters/fetch.mjs +9 -9
  9. package/dist/backend/adapters/hono.d.mts +1 -1
  10. package/dist/backend/adapters/hono.d.ts +1 -1
  11. package/dist/backend/adapters/hono.js +333 -29
  12. package/dist/backend/adapters/hono.mjs +9 -9
  13. package/dist/backend/adapters/index.d.mts +1 -1
  14. package/dist/backend/adapters/index.d.ts +1 -1
  15. package/dist/backend/adapters/index.js +333 -29
  16. package/dist/backend/adapters/index.mjs +12 -12
  17. package/dist/backend/adapters/next.d.mts +1 -1
  18. package/dist/backend/adapters/next.d.ts +1 -1
  19. package/dist/backend/adapters/next.js +333 -29
  20. package/dist/backend/adapters/next.mjs +9 -9
  21. package/dist/backend/{authTypes-BCoyMOAj.d.mts → authTypes-B5VxPaMo.d.mts} +14 -0
  22. package/dist/backend/{authTypes-BCoyMOAj.d.ts → authTypes-B5VxPaMo.d.ts} +14 -0
  23. package/dist/backend/{chunk-C5ZDQJPP.mjs → chunk-2YEMC57K.mjs} +1 -1
  24. package/dist/backend/{chunk-6BVI5XZX.mjs → chunk-CCEZMERA.mjs} +277 -24
  25. package/dist/backend/{chunk-GLPHS5KF.mjs → chunk-ETHQSA52.mjs} +7 -7
  26. package/dist/backend/{chunk-OB47KG2H.mjs → chunk-FRKRWJ5S.mjs} +1 -1
  27. package/dist/backend/{chunk-GENKYO6B.mjs → chunk-IFFSWLXT.mjs} +1 -1
  28. package/dist/backend/{chunk-SX3CNUF5.mjs → chunk-IUFWKMTJ.mjs} +1 -1
  29. package/dist/backend/{chunk-XU4OGYDV.mjs → chunk-N62MDT7U.mjs} +56 -5
  30. package/dist/backend/{chunk-3QNAZFQH.mjs → chunk-OLHAIHAX.mjs} +5 -5
  31. package/dist/backend/core/handlers/coreHandler.d.mts +2 -2
  32. package/dist/backend/core/handlers/coreHandler.d.ts +2 -2
  33. package/dist/backend/core/handlers/coreHandler.js +333 -29
  34. package/dist/backend/core/handlers/coreHandler.mjs +7 -7
  35. package/dist/backend/core/handlers/executeRoute.d.mts +2 -2
  36. package/dist/backend/core/handlers/executeRoute.d.ts +2 -2
  37. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  38. package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
  39. package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
  40. package/dist/backend/core/handlers/handleRouteByName.js +333 -29
  41. package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
  42. package/dist/backend/core/handlers/index.d.mts +2 -2
  43. package/dist/backend/core/handlers/index.d.ts +2 -2
  44. package/dist/backend/core/handlers/index.js +333 -29
  45. package/dist/backend/core/handlers/index.mjs +10 -10
  46. package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
  47. package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
  48. package/dist/backend/core/index.d.mts +2 -2
  49. package/dist/backend/core/index.d.ts +2 -2
  50. package/dist/backend/core/index.js +333 -29
  51. package/dist/backend/core/index.mjs +10 -10
  52. package/dist/backend/core/routes/index.d.mts +2 -2
  53. package/dist/backend/core/routes/index.d.ts +2 -2
  54. package/dist/backend/core/routes/index.js +56 -5
  55. package/dist/backend/core/routes/index.mjs +2 -2
  56. package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
  57. package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
  58. package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
  59. package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
  60. package/dist/backend/core/routes/routeConfigs.js +56 -5
  61. package/dist/backend/core/routes/routeConfigs.mjs +2 -2
  62. package/dist/backend/core/types/authTypes.d.mts +1 -1
  63. package/dist/backend/core/types/authTypes.d.ts +1 -1
  64. package/dist/backend/core/types/handlerTypes.d.mts +2 -2
  65. package/dist/backend/core/types/handlerTypes.d.ts +2 -2
  66. package/dist/backend/core/types/index.d.mts +2 -2
  67. package/dist/backend/core/types/index.d.ts +2 -2
  68. package/dist/backend/core/types/routeTypes.d.mts +2 -2
  69. package/dist/backend/core/types/routeTypes.d.ts +2 -2
  70. package/dist/backend/core/utils/index.mjs +3 -3
  71. package/dist/backend/index.d.mts +4 -4
  72. package/dist/backend/index.d.ts +4 -4
  73. package/dist/backend/index.js +333 -29
  74. package/dist/backend/index.mjs +10 -10
  75. package/dist/backend/{routeTypes-Che2nkqv.d.ts → routeTypes-BkSHRiCI.d.ts} +227 -2
  76. package/dist/backend/{routeTypes-RMeyKg5T.d.mts → routeTypes-C1hUtfD8.d.mts} +227 -2
  77. package/dist/better-auth/{chunk-6TAYCQUD.mjs → chunk-2PRVJULJ.mjs} +56 -5
  78. package/dist/better-auth/{chunk-5F3J4ZQQ.mjs → chunk-6J74ZVNY.mjs} +278 -25
  79. package/dist/better-auth/{chunk-IODRHT4E.mjs → chunk-IY7FPOWF.mjs} +1 -1
  80. package/dist/better-auth/index.js +333 -29
  81. package/dist/better-auth/index.mjs +3 -3
  82. package/dist/better-auth/types.d.mts +14 -0
  83. package/dist/better-auth/types.d.ts +14 -0
  84. package/dist/better-auth/utils/createAutumnEndpoint.js +56 -5
  85. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  86. package/dist/better-auth/utils/handleBetterAuthRoute.js +333 -29
  87. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  88. package/dist/better-auth/utils/index.js +333 -29
  89. package/dist/better-auth/utils/index.mjs +3 -3
  90. package/dist/react/AutumnContext.d.mts +3 -3
  91. package/dist/react/AutumnContext.d.ts +3 -3
  92. package/dist/react/client/AutumnClient.d.mts +3 -3
  93. package/dist/react/client/AutumnClient.d.ts +3 -3
  94. package/dist/react/client/IAutumnClient.d.mts +7 -3
  95. package/dist/react/client/IAutumnClient.d.ts +7 -3
  96. package/dist/react/client/index.d.mts +3 -3
  97. package/dist/react/client/index.d.ts +3 -3
  98. package/dist/react/{customer-CNvpHhpS.d.mts → customer-Bb7J-_p_.d.mts} +15 -1
  99. package/dist/react/{customer-CMAtwbJl.d.ts → customer-CJSDgQMF.d.ts} +15 -1
  100. package/dist/react/hooks/index.d.mts +3 -3
  101. package/dist/react/hooks/index.d.ts +3 -3
  102. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  103. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  104. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  105. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  106. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  107. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  108. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  109. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  110. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  111. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  112. package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
  113. package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
  114. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  115. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  116. package/dist/react/hooks/useCustomer.d.mts +3 -3
  117. package/dist/react/hooks/useCustomer.d.ts +3 -3
  118. package/dist/react/hooks/useEntity.d.mts +2 -2
  119. package/dist/react/hooks/useEntity.d.ts +2 -2
  120. package/dist/react/hooks/useListEvents.d.mts +2 -2
  121. package/dist/react/hooks/useListEvents.d.ts +2 -2
  122. package/dist/react/hooks/useListPlans.d.mts +2 -2
  123. package/dist/react/hooks/useListPlans.d.ts +2 -2
  124. package/dist/react/hooks/useReferrals.d.mts +2 -2
  125. package/dist/react/hooks/useReferrals.d.ts +2 -2
  126. package/dist/react/index.d.mts +3 -3
  127. package/dist/react/index.d.ts +3 -3
  128. package/dist/react/{params-CnOvYjqJ.d.ts → params-CheyAQ0-.d.mts} +87 -2
  129. package/dist/react/{params-Cdkj83CV.d.mts → params-yCtJ7lOA.d.ts} +87 -2
  130. package/dist/react/{plan-BoMslu_O.d.mts → plan-CqxFGNk2.d.mts} +4 -0
  131. package/dist/react/{plan-BoMslu_O.d.ts → plan-CqxFGNk2.d.ts} +4 -0
  132. package/dist/sdk/index.d.mts +333 -4
  133. package/dist/sdk/index.d.ts +333 -4
  134. package/dist/sdk/index.js +382 -24
  135. package/dist/sdk/index.mjs +357 -25
  136. package/package.json +1 -1
  137. package/dist/backend/{chunk-55C2WWXQ.mjs → chunk-S5HPMJ4U.mjs} +3 -3
@@ -187,6 +187,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
187
187
  });
188
188
  var attachRolloverOutboundSchema = import_v42.z.object({
189
189
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
190
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
190
191
  expiry_duration_type: import_v42.z.string(),
191
192
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
192
193
  });
@@ -287,6 +288,7 @@ var attachProrationSchema = import_v42.z.object({
287
288
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
288
289
  var attachRolloverSchema = import_v42.z.object({
289
290
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
291
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
290
292
  expiryDurationType: attachExpiryDurationTypeSchema,
291
293
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
292
294
  });
@@ -377,6 +379,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
377
379
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
378
380
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
379
381
  });
382
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
383
+ featureId: import_v44.z.string(),
384
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
385
+ });
380
386
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
381
387
  interval: import_v44.z.string(),
382
388
  interval_count: import_v44.z.number(),
@@ -401,6 +407,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
401
407
  threshold_type: import_v44.z.string(),
402
408
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
403
409
  });
410
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
411
+ feature_id: import_v44.z.string(),
412
+ enabled: import_v44.z.boolean()
413
+ });
404
414
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
405
415
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
406
416
  spend_limits: import_v44.z.union([
@@ -410,6 +420,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
410
420
  usage_alerts: import_v44.z.union([
411
421
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
412
422
  import_v44.z.undefined()
423
+ ]).optional(),
424
+ overage_allowed: import_v44.z.union([
425
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
426
+ import_v44.z.undefined()
413
427
  ]).optional()
414
428
  });
415
429
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -450,7 +464,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
450
464
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
451
465
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
452
466
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
453
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
467
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
468
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
454
469
  });
455
470
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
456
471
  customerId: import_v44.z.string().nullable(),
@@ -589,6 +604,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
589
604
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
590
605
  var listPlansRolloverSchema = import_v46.z.object({
591
606
  max: import_v46.z.number().nullable(),
607
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
592
608
  expiryDurationType: listPlansExpiryDurationTypeSchema,
593
609
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
594
610
  });
@@ -669,6 +685,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
669
685
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
670
686
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
671
687
  });
688
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
689
+ featureId: import_v47.z.string(),
690
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
691
+ });
672
692
  var multiAttachInvoiceSchema = import_v47.z.object({
673
693
  status: import_v47.z.string().nullable(),
674
694
  stripeId: import_v47.z.string(),
@@ -707,6 +727,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
707
727
  });
708
728
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
709
729
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
730
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
710
731
  expiry_duration_type: import_v47.z.string(),
711
732
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
712
733
  });
@@ -761,9 +782,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
761
782
  threshold_type: import_v47.z.string(),
762
783
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
763
784
  });
785
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
786
+ feature_id: import_v47.z.string(),
787
+ enabled: import_v47.z.boolean()
788
+ });
764
789
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
765
790
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
766
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
791
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
792
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
767
793
  });
768
794
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
769
795
  feature_id: import_v47.z.string(),
@@ -807,6 +833,7 @@ var multiAttachProrationSchema = import_v47.z.object({
807
833
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
808
834
  var multiAttachRolloverSchema = import_v47.z.object({
809
835
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
836
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
810
837
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
811
838
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
812
839
  });
@@ -847,7 +874,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
847
874
  });
848
875
  var multiAttachBillingControlsSchema = import_v47.z.object({
849
876
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
850
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
877
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
878
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
851
879
  });
852
880
  var multiAttachEntityDataSchema = import_v47.z.object({
853
881
  featureId: import_v47.z.string(),
@@ -1055,6 +1083,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
1055
1083
  });
1056
1084
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
1057
1085
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1086
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1058
1087
  expiry_duration_type: import_v49.z.string(),
1059
1088
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
1060
1089
  });
@@ -1159,6 +1188,7 @@ var previewAttachProrationSchema = import_v49.z.object({
1159
1188
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
1160
1189
  var previewAttachRolloverSchema = import_v49.z.object({
1161
1190
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1191
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1162
1192
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
1163
1193
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
1164
1194
  });
@@ -1268,6 +1298,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
1268
1298
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
1269
1299
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
1270
1300
  });
1301
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
1302
+ featureId: import_v410.z.string(),
1303
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
1304
+ });
1271
1305
  var previewMultiAttachDiscountSchema = import_v410.z.object({
1272
1306
  amountOff: import_v410.z.number(),
1273
1307
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -1369,6 +1403,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
1369
1403
  });
1370
1404
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
1371
1405
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1406
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1372
1407
  expiry_duration_type: import_v410.z.string(),
1373
1408
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
1374
1409
  });
@@ -1426,9 +1461,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
1426
1461
  threshold_type: import_v410.z.string(),
1427
1462
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
1428
1463
  });
1464
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
1465
+ feature_id: import_v410.z.string(),
1466
+ enabled: import_v410.z.boolean()
1467
+ });
1429
1468
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
1430
1469
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
1431
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
1470
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
1471
+ overage_allowed: import_v410.z.union([
1472
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
1473
+ import_v410.z.undefined()
1474
+ ]).optional()
1432
1475
  });
1433
1476
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
1434
1477
  feature_id: import_v410.z.string(),
@@ -1473,6 +1516,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
1473
1516
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
1474
1517
  var previewMultiAttachRolloverSchema = import_v410.z.object({
1475
1518
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1519
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1476
1520
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
1477
1521
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
1478
1522
  });
@@ -1516,7 +1560,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
1516
1560
  });
1517
1561
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
1518
1562
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
1519
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
1563
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
1564
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
1520
1565
  });
1521
1566
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
1522
1567
  featureId: import_v410.z.string(),
@@ -1712,6 +1757,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
1712
1757
  });
1713
1758
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
1714
1759
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1760
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1715
1761
  expiry_duration_type: import_v411.z.string(),
1716
1762
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
1717
1763
  });
@@ -1796,6 +1842,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
1796
1842
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
1797
1843
  var previewUpdateRolloverSchema = import_v411.z.object({
1798
1844
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1845
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1799
1846
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
1800
1847
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
1801
1848
  });
@@ -1959,6 +2006,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
1959
2006
  });
1960
2007
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
1961
2008
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
2009
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
1962
2010
  expiry_duration_type: import_v413.z.string(),
1963
2011
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
1964
2012
  });
@@ -2049,6 +2097,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
2049
2097
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
2050
2098
  var setupPaymentRolloverSchema = import_v413.z.object({
2051
2099
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
2100
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
2052
2101
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
2053
2102
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
2054
2103
  });
@@ -2159,6 +2208,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
2159
2208
  });
2160
2209
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
2161
2210
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2211
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2162
2212
  expiry_duration_type: import_v414.z.string(),
2163
2213
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
2164
2214
  });
@@ -2239,6 +2289,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
2239
2289
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
2240
2290
  var billingUpdateRolloverSchema = import_v414.z.object({
2241
2291
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2292
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2242
2293
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
2243
2294
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
2244
2295
  });
@@ -2578,8 +2629,8 @@ var SDK_METADATA = {
2578
2629
  language: "typescript",
2579
2630
  openapiDocVersion: "2.2.0",
2580
2631
  sdkVersion: "0.10.17",
2581
- genVersion: "2.869.25",
2582
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
2632
+ genVersion: "2.879.1",
2633
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
2583
2634
  };
2584
2635
 
2585
2636
  // ../sdk/src/lib/http.ts
@@ -3501,8 +3552,8 @@ function applyBearer(state, spec) {
3501
3552
  state.headers[spec.fieldName] = value;
3502
3553
  }
3503
3554
  }
3504
- function resolveGlobalSecurity(security) {
3505
- return resolveSecurity(
3555
+ function resolveGlobalSecurity(security, allowedFields) {
3556
+ let inputs = [
3506
3557
  [
3507
3558
  {
3508
3559
  fieldName: "Authorization",
@@ -3510,7 +3561,16 @@ function resolveGlobalSecurity(security) {
3510
3561
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
3511
3562
  }
3512
3563
  ]
3513
- );
3564
+ ];
3565
+ if (allowedFields) {
3566
+ inputs = allowedFields.map((i) => {
3567
+ if (i < 0 || i >= inputs.length) {
3568
+ throw new RangeError(`invalid allowedFields index ${i}`);
3569
+ }
3570
+ return inputs[i];
3571
+ });
3572
+ }
3573
+ return resolveSecurity(...inputs);
3514
3574
  }
3515
3575
  async function extractSecurity(sec) {
3516
3576
  if (sec == null) {
@@ -4057,11 +4117,13 @@ var AttachExpiryDurationType$outboundSchema = z26.enum(AttachExpiryDurationType)
4057
4117
  var AttachRollover$outboundSchema = z26.pipe(
4058
4118
  z26.object({
4059
4119
  max: z26.optional(z26.number()),
4120
+ maxPercentage: z26.optional(z26.number()),
4060
4121
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
4061
4122
  expiryDurationLength: z26.optional(z26.number())
4062
4123
  }),
4063
4124
  z26.transform((v) => {
4064
4125
  return remap(v, {
4126
+ maxPercentage: "max_percentage",
4065
4127
  expiryDurationType: "expiry_duration_type",
4066
4128
  expiryDurationLength: "expiry_duration_length"
4067
4129
  });
@@ -4586,11 +4648,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z28.enum(BillingUpdateExpir
4586
4648
  var BillingUpdateRollover$outboundSchema = z28.pipe(
4587
4649
  z28.object({
4588
4650
  max: z28.optional(z28.number()),
4651
+ maxPercentage: z28.optional(z28.number()),
4589
4652
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
4590
4653
  expiryDurationLength: z28.optional(z28.number())
4591
4654
  }),
4592
4655
  z28.transform((v) => {
4593
4656
  return remap(v, {
4657
+ maxPercentage: "max_percentage",
4594
4658
  expiryDurationType: "expiry_duration_type",
4595
4659
  expiryDurationLength: "expiry_duration_length"
4596
4660
  });
@@ -4932,11 +4996,19 @@ var ProductDisplay$inboundSchema = z29.pipe(
4932
4996
  })
4933
4997
  );
4934
4998
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
4935
- var CheckRollover$inboundSchema = z29.object({
4936
- max: nullable(number2()),
4937
- duration: z29._default(RolloverDuration$inboundSchema, "month"),
4938
- length: number2()
4939
- });
4999
+ var CheckRollover$inboundSchema = z29.pipe(
5000
+ z29.object({
5001
+ max: z29.optional(z29.nullable(number2())),
5002
+ max_percentage: z29.optional(z29.nullable(number2())),
5003
+ duration: z29._default(RolloverDuration$inboundSchema, "month"),
5004
+ length: number2()
5005
+ }),
5006
+ z29.transform((v) => {
5007
+ return remap(v, {
5008
+ "max_percentage": "maxPercentage"
5009
+ });
5010
+ })
5011
+ );
4940
5012
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
4941
5013
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
4942
5014
  var Config$inboundSchema = z29.pipe(
@@ -5213,6 +5285,17 @@ var CustomerDataUsageAlert$outboundSchema = z31.pipe(
5213
5285
  });
5214
5286
  })
5215
5287
  );
5288
+ var CustomerDataOverageAllowed$outboundSchema = z31.pipe(
5289
+ z31.object({
5290
+ featureId: z31.string(),
5291
+ enabled: z31._default(z31.boolean(), false)
5292
+ }),
5293
+ z31.transform((v) => {
5294
+ return remap(v, {
5295
+ featureId: "feature_id"
5296
+ });
5297
+ })
5298
+ );
5216
5299
  var CustomerDataBillingControls$outboundSchema = z31.pipe(
5217
5300
  z31.object({
5218
5301
  autoTopups: z31.optional(
@@ -5223,13 +5306,17 @@ var CustomerDataBillingControls$outboundSchema = z31.pipe(
5223
5306
  ),
5224
5307
  usageAlerts: z31.optional(
5225
5308
  z31.array(z31.lazy(() => CustomerDataUsageAlert$outboundSchema))
5309
+ ),
5310
+ overageAllowed: z31.optional(
5311
+ z31.array(z31.lazy(() => CustomerDataOverageAllowed$outboundSchema))
5226
5312
  )
5227
5313
  }),
5228
5314
  z31.transform((v) => {
5229
5315
  return remap(v, {
5230
5316
  autoTopups: "auto_topups",
5231
5317
  spendLimits: "spend_limits",
5232
- usageAlerts: "usage_alerts"
5318
+ usageAlerts: "usage_alerts",
5319
+ overageAllowed: "overage_allowed"
5233
5320
  });
5234
5321
  })
5235
5322
  );
@@ -5440,11 +5527,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
5440
5527
  var PlanRollover$inboundSchema = z32.pipe(
5441
5528
  z32.object({
5442
5529
  max: nullable(number2()),
5530
+ max_percentage: z32.optional(z32.nullable(number2())),
5443
5531
  expiry_duration_type: ExpiryDurationType$inboundSchema,
5444
5532
  expiry_duration_length: optional2(number2())
5445
5533
  }),
5446
5534
  z32.transform((v) => {
5447
5535
  return remap(v, {
5536
+ "max_percentage": "maxPercentage",
5448
5537
  "expiry_duration_type": "expiryDurationType",
5449
5538
  "expiry_duration_length": "expiryDurationLength"
5450
5539
  });
@@ -5583,6 +5672,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z33.pipe(
5583
5672
  });
5584
5673
  })
5585
5674
  );
5675
+ var CreateEntityOverageAllowedRequest$outboundSchema = z33.pipe(
5676
+ z33.object({
5677
+ featureId: z33.string(),
5678
+ enabled: z33._default(z33.boolean(), false)
5679
+ }),
5680
+ z33.transform((v) => {
5681
+ return remap(v, {
5682
+ featureId: "feature_id"
5683
+ });
5684
+ })
5685
+ );
5586
5686
  var CreateEntityBillingControlsRequest$outboundSchema = z33.pipe(
5587
5687
  z33.object({
5588
5688
  spendLimits: z33.optional(
@@ -5590,12 +5690,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z33.pipe(
5590
5690
  ),
5591
5691
  usageAlerts: z33.optional(
5592
5692
  z33.array(z33.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
5693
+ ),
5694
+ overageAllowed: z33.optional(
5695
+ z33.array(z33.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
5593
5696
  )
5594
5697
  }),
5595
5698
  z33.transform((v) => {
5596
5699
  return remap(v, {
5597
5700
  spendLimits: "spend_limits",
5598
- usageAlerts: "usage_alerts"
5701
+ usageAlerts: "usage_alerts",
5702
+ overageAllowed: "overage_allowed"
5599
5703
  });
5600
5704
  })
5601
5705
  );
@@ -5752,6 +5856,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z33.pipe(
5752
5856
  });
5753
5857
  })
5754
5858
  );
5859
+ var CreateEntityOverageAllowedResponse$inboundSchema = z33.pipe(
5860
+ z33.object({
5861
+ feature_id: string4(),
5862
+ enabled: z33._default(boolean2(), false)
5863
+ }),
5864
+ z33.transform((v) => {
5865
+ return remap(v, {
5866
+ "feature_id": "featureId"
5867
+ });
5868
+ })
5869
+ );
5755
5870
  var CreateEntityBillingControlsResponse$inboundSchema = z33.pipe(
5756
5871
  z33.object({
5757
5872
  spend_limits: optional2(
@@ -5759,12 +5874,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z33.pipe(
5759
5874
  ),
5760
5875
  usage_alerts: optional2(
5761
5876
  z33.array(z33.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
5877
+ ),
5878
+ overage_allowed: optional2(
5879
+ z33.array(z33.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
5762
5880
  )
5763
5881
  }),
5764
5882
  z33.transform((v) => {
5765
5883
  return remap(v, {
5766
5884
  "spend_limits": "spendLimits",
5767
- "usage_alerts": "usageAlerts"
5885
+ "usage_alerts": "usageAlerts",
5886
+ "overage_allowed": "overageAllowed"
5768
5887
  });
5769
5888
  })
5770
5889
  );
@@ -6114,11 +6233,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z35.enum(CreatePlanExpi
6114
6233
  var CreatePlanRolloverRequest$outboundSchema = z35.pipe(
6115
6234
  z35.object({
6116
6235
  max: z35.optional(z35.number()),
6236
+ maxPercentage: z35.optional(z35.number()),
6117
6237
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
6118
6238
  expiryDurationLength: z35.optional(z35.number())
6119
6239
  }),
6120
6240
  z35.transform((v) => {
6121
6241
  return remap(v, {
6242
+ maxPercentage: "max_percentage",
6122
6243
  expiryDurationType: "expiry_duration_type",
6123
6244
  expiryDurationLength: "expiry_duration_length"
6124
6245
  });
@@ -6295,11 +6416,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
6295
6416
  var CreatePlanRolloverResponse$inboundSchema = z35.pipe(
6296
6417
  z35.object({
6297
6418
  max: nullable(number2()),
6419
+ max_percentage: z35.optional(z35.nullable(number2())),
6298
6420
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
6299
6421
  expiry_duration_length: optional2(number2())
6300
6422
  }),
6301
6423
  z35.transform((v) => {
6302
6424
  return remap(v, {
6425
+ "max_percentage": "maxPercentage",
6303
6426
  "expiry_duration_type": "expiryDurationType",
6304
6427
  "expiry_duration_length": "expiryDurationLength"
6305
6428
  });
@@ -6521,6 +6644,17 @@ var CustomerUsageAlert$inboundSchema = z37.pipe(
6521
6644
  });
6522
6645
  })
6523
6646
  );
6647
+ var CustomerOverageAllowed$inboundSchema = z37.pipe(
6648
+ z37.object({
6649
+ feature_id: string4(),
6650
+ enabled: z37._default(boolean2(), false)
6651
+ }),
6652
+ z37.transform((v) => {
6653
+ return remap(v, {
6654
+ "feature_id": "featureId"
6655
+ });
6656
+ })
6657
+ );
6524
6658
  var CustomerBillingControls$inboundSchema = z37.pipe(
6525
6659
  z37.object({
6526
6660
  auto_topups: optional2(
@@ -6531,13 +6665,17 @@ var CustomerBillingControls$inboundSchema = z37.pipe(
6531
6665
  ),
6532
6666
  usage_alerts: optional2(
6533
6667
  z37.array(z37.lazy(() => CustomerUsageAlert$inboundSchema))
6668
+ ),
6669
+ overage_allowed: optional2(
6670
+ z37.array(z37.lazy(() => CustomerOverageAllowed$inboundSchema))
6534
6671
  )
6535
6672
  }),
6536
6673
  z37.transform((v) => {
6537
6674
  return remap(v, {
6538
6675
  "auto_topups": "autoTopups",
6539
6676
  "spend_limits": "spendLimits",
6540
- "usage_alerts": "usageAlerts"
6677
+ "usage_alerts": "usageAlerts",
6678
+ "overage_allowed": "overageAllowed"
6541
6679
  });
6542
6680
  })
6543
6681
  );
@@ -7076,6 +7214,17 @@ var GetEntityUsageAlert$inboundSchema = z44.pipe(
7076
7214
  });
7077
7215
  })
7078
7216
  );
7217
+ var GetEntityOverageAllowed$inboundSchema = z44.pipe(
7218
+ z44.object({
7219
+ feature_id: string4(),
7220
+ enabled: z44._default(boolean2(), false)
7221
+ }),
7222
+ z44.transform((v) => {
7223
+ return remap(v, {
7224
+ "feature_id": "featureId"
7225
+ });
7226
+ })
7227
+ );
7079
7228
  var GetEntityBillingControls$inboundSchema = z44.pipe(
7080
7229
  z44.object({
7081
7230
  spend_limits: optional2(
@@ -7083,12 +7232,16 @@ var GetEntityBillingControls$inboundSchema = z44.pipe(
7083
7232
  ),
7084
7233
  usage_alerts: optional2(
7085
7234
  z44.array(z44.lazy(() => GetEntityUsageAlert$inboundSchema))
7235
+ ),
7236
+ overage_allowed: optional2(
7237
+ z44.array(z44.lazy(() => GetEntityOverageAllowed$inboundSchema))
7086
7238
  )
7087
7239
  }),
7088
7240
  z44.transform((v) => {
7089
7241
  return remap(v, {
7090
7242
  "spend_limits": "spendLimits",
7091
- "usage_alerts": "usageAlerts"
7243
+ "usage_alerts": "usageAlerts",
7244
+ "overage_allowed": "overageAllowed"
7092
7245
  });
7093
7246
  })
7094
7247
  );
@@ -7266,6 +7419,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z46.pipe(
7266
7419
  });
7267
7420
  })
7268
7421
  );
7422
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z46.pipe(
7423
+ z46.object({
7424
+ featureId: z46.string(),
7425
+ enabled: z46._default(z46.boolean(), false)
7426
+ }),
7427
+ z46.transform((v) => {
7428
+ return remap(v, {
7429
+ featureId: "feature_id"
7430
+ });
7431
+ })
7432
+ );
7269
7433
  var GetOrCreateCustomerBillingControls$outboundSchema = z46.pipe(
7270
7434
  z46.object({
7271
7435
  autoTopups: z46.optional(
@@ -7276,13 +7440,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z46.pipe(
7276
7440
  ),
7277
7441
  usageAlerts: z46.optional(
7278
7442
  z46.array(z46.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
7443
+ ),
7444
+ overageAllowed: z46.optional(
7445
+ z46.array(z46.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
7279
7446
  )
7280
7447
  }),
7281
7448
  z46.transform((v) => {
7282
7449
  return remap(v, {
7283
7450
  autoTopups: "auto_topups",
7284
7451
  spendLimits: "spend_limits",
7285
- usageAlerts: "usage_alerts"
7452
+ usageAlerts: "usage_alerts",
7453
+ overageAllowed: "overage_allowed"
7286
7454
  });
7287
7455
  })
7288
7456
  );
@@ -7507,11 +7675,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
7507
7675
  var GetPlanRollover$inboundSchema = z47.pipe(
7508
7676
  z47.object({
7509
7677
  max: nullable(number2()),
7678
+ max_percentage: z47.optional(z47.nullable(number2())),
7510
7679
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
7511
7680
  expiry_duration_length: optional2(number2())
7512
7681
  }),
7513
7682
  z47.transform((v) => {
7514
7683
  return remap(v, {
7684
+ "max_percentage": "maxPercentage",
7515
7685
  "expiry_duration_type": "expiryDurationType",
7516
7686
  "expiry_duration_length": "expiryDurationLength"
7517
7687
  });
@@ -7739,6 +7909,17 @@ var ListCustomersUsageAlert$inboundSchema = z48.pipe(
7739
7909
  });
7740
7910
  })
7741
7911
  );
7912
+ var ListCustomersOverageAllowed$inboundSchema = z48.pipe(
7913
+ z48.object({
7914
+ feature_id: string4(),
7915
+ enabled: z48._default(boolean2(), false)
7916
+ }),
7917
+ z48.transform((v) => {
7918
+ return remap(v, {
7919
+ "feature_id": "featureId"
7920
+ });
7921
+ })
7922
+ );
7742
7923
  var ListCustomersBillingControls$inboundSchema = z48.pipe(
7743
7924
  z48.object({
7744
7925
  auto_topups: optional2(
@@ -7749,13 +7930,17 @@ var ListCustomersBillingControls$inboundSchema = z48.pipe(
7749
7930
  ),
7750
7931
  usage_alerts: optional2(
7751
7932
  z48.array(z48.lazy(() => ListCustomersUsageAlert$inboundSchema))
7933
+ ),
7934
+ overage_allowed: optional2(
7935
+ z48.array(z48.lazy(() => ListCustomersOverageAllowed$inboundSchema))
7752
7936
  )
7753
7937
  }),
7754
7938
  z48.transform((v) => {
7755
7939
  return remap(v, {
7756
7940
  "auto_topups": "autoTopups",
7757
7941
  "spend_limits": "spendLimits",
7758
- "usage_alerts": "usageAlerts"
7942
+ "usage_alerts": "usageAlerts",
7943
+ "overage_allowed": "overageAllowed"
7759
7944
  });
7760
7945
  })
7761
7946
  );
@@ -8210,11 +8395,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
8210
8395
  var ListPlansRollover$inboundSchema = z51.pipe(
8211
8396
  z51.object({
8212
8397
  max: nullable(number2()),
8398
+ max_percentage: z51.optional(z51.nullable(number2())),
8213
8399
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
8214
8400
  expiry_duration_length: optional2(number2())
8215
8401
  }),
8216
8402
  z51.transform((v) => {
8217
8403
  return remap(v, {
8404
+ "max_percentage": "maxPercentage",
8218
8405
  "expiry_duration_type": "expiryDurationType",
8219
8406
  "expiry_duration_length": "expiryDurationLength"
8220
8407
  });
@@ -8458,11 +8645,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z52.enum(MultiAttachExpiryDur
8458
8645
  var MultiAttachRollover$outboundSchema = z52.pipe(
8459
8646
  z52.object({
8460
8647
  max: z52.optional(z52.number()),
8648
+ maxPercentage: z52.optional(z52.number()),
8461
8649
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
8462
8650
  expiryDurationLength: z52.optional(z52.number())
8463
8651
  }),
8464
8652
  z52.transform((v) => {
8465
8653
  return remap(v, {
8654
+ maxPercentage: "max_percentage",
8466
8655
  expiryDurationType: "expiry_duration_type",
8467
8656
  expiryDurationLength: "expiry_duration_length"
8468
8657
  });
@@ -8589,6 +8778,17 @@ var MultiAttachUsageAlert$outboundSchema = z52.pipe(
8589
8778
  });
8590
8779
  })
8591
8780
  );
8781
+ var MultiAttachOverageAllowed$outboundSchema = z52.pipe(
8782
+ z52.object({
8783
+ featureId: z52.string(),
8784
+ enabled: z52._default(z52.boolean(), false)
8785
+ }),
8786
+ z52.transform((v) => {
8787
+ return remap(v, {
8788
+ featureId: "feature_id"
8789
+ });
8790
+ })
8791
+ );
8592
8792
  var MultiAttachBillingControls$outboundSchema = z52.pipe(
8593
8793
  z52.object({
8594
8794
  spendLimits: z52.optional(
@@ -8596,12 +8796,16 @@ var MultiAttachBillingControls$outboundSchema = z52.pipe(
8596
8796
  ),
8597
8797
  usageAlerts: z52.optional(
8598
8798
  z52.array(z52.lazy(() => MultiAttachUsageAlert$outboundSchema))
8799
+ ),
8800
+ overageAllowed: z52.optional(
8801
+ z52.array(z52.lazy(() => MultiAttachOverageAllowed$outboundSchema))
8599
8802
  )
8600
8803
  }),
8601
8804
  z52.transform((v) => {
8602
8805
  return remap(v, {
8603
8806
  spendLimits: "spend_limits",
8604
- usageAlerts: "usage_alerts"
8807
+ usageAlerts: "usage_alerts",
8808
+ overageAllowed: "overage_allowed"
8605
8809
  });
8606
8810
  })
8607
8811
  );
@@ -8895,11 +9099,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z54.enum(PreviewAttachExpir
8895
9099
  var PreviewAttachRollover$outboundSchema = z54.pipe(
8896
9100
  z54.object({
8897
9101
  max: z54.optional(z54.number()),
9102
+ maxPercentage: z54.optional(z54.number()),
8898
9103
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
8899
9104
  expiryDurationLength: z54.optional(z54.number())
8900
9105
  }),
8901
9106
  z54.transform((v) => {
8902
9107
  return remap(v, {
9108
+ maxPercentage: "max_percentage",
8903
9109
  expiryDurationType: "expiry_duration_type",
8904
9110
  expiryDurationLength: "expiry_duration_length"
8905
9111
  });
@@ -9443,11 +9649,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z55.enum(PreviewMultiA
9443
9649
  var PreviewMultiAttachRollover$outboundSchema = z55.pipe(
9444
9650
  z55.object({
9445
9651
  max: z55.optional(z55.number()),
9652
+ maxPercentage: z55.optional(z55.number()),
9446
9653
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
9447
9654
  expiryDurationLength: z55.optional(z55.number())
9448
9655
  }),
9449
9656
  z55.transform((v) => {
9450
9657
  return remap(v, {
9658
+ maxPercentage: "max_percentage",
9451
9659
  expiryDurationType: "expiry_duration_type",
9452
9660
  expiryDurationLength: "expiry_duration_length"
9453
9661
  });
@@ -9587,6 +9795,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z55.pipe(
9587
9795
  });
9588
9796
  })
9589
9797
  );
9798
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z55.pipe(
9799
+ z55.object({
9800
+ featureId: z55.string(),
9801
+ enabled: z55._default(z55.boolean(), false)
9802
+ }),
9803
+ z55.transform((v) => {
9804
+ return remap(v, {
9805
+ featureId: "feature_id"
9806
+ });
9807
+ })
9808
+ );
9590
9809
  var PreviewMultiAttachBillingControls$outboundSchema = z55.pipe(
9591
9810
  z55.object({
9592
9811
  spendLimits: z55.optional(
@@ -9594,12 +9813,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z55.pipe(
9594
9813
  ),
9595
9814
  usageAlerts: z55.optional(
9596
9815
  z55.array(z55.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
9816
+ ),
9817
+ overageAllowed: z55.optional(
9818
+ z55.array(z55.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
9597
9819
  )
9598
9820
  }),
9599
9821
  z55.transform((v) => {
9600
9822
  return remap(v, {
9601
9823
  spendLimits: "spend_limits",
9602
- usageAlerts: "usage_alerts"
9824
+ usageAlerts: "usage_alerts",
9825
+ overageAllowed: "overage_allowed"
9603
9826
  });
9604
9827
  })
9605
9828
  );
@@ -10055,11 +10278,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z56.enum(PreviewUpdateExpir
10055
10278
  var PreviewUpdateRollover$outboundSchema = z56.pipe(
10056
10279
  z56.object({
10057
10280
  max: z56.optional(z56.number()),
10281
+ maxPercentage: z56.optional(z56.number()),
10058
10282
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
10059
10283
  expiryDurationLength: z56.optional(z56.number())
10060
10284
  }),
10061
10285
  z56.transform((v) => {
10062
10286
  return remap(v, {
10287
+ maxPercentage: "max_percentage",
10063
10288
  expiryDurationType: "expiry_duration_type",
10064
10289
  expiryDurationLength: "expiry_duration_length"
10065
10290
  });
@@ -10575,11 +10800,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z58.enum(SetupPaymentExpiryD
10575
10800
  var SetupPaymentRollover$outboundSchema = z58.pipe(
10576
10801
  z58.object({
10577
10802
  max: z58.optional(z58.number()),
10803
+ maxPercentage: z58.optional(z58.number()),
10578
10804
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
10579
10805
  expiryDurationLength: z58.optional(z58.number())
10580
10806
  }),
10581
10807
  z58.transform((v) => {
10582
10808
  return remap(v, {
10809
+ maxPercentage: "max_percentage",
10583
10810
  expiryDurationType: "expiry_duration_type",
10584
10811
  expiryDurationLength: "expiry_duration_length"
10585
10812
  });
@@ -10924,6 +11151,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z61.pipe(
10924
11151
  });
10925
11152
  })
10926
11153
  );
11154
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z61.pipe(
11155
+ z61.object({
11156
+ featureId: z61.string(),
11157
+ enabled: z61._default(z61.boolean(), false)
11158
+ }),
11159
+ z61.transform((v) => {
11160
+ return remap(v, {
11161
+ featureId: "feature_id"
11162
+ });
11163
+ })
11164
+ );
10927
11165
  var UpdateCustomerBillingControlsRequest$outboundSchema = z61.pipe(
10928
11166
  z61.object({
10929
11167
  autoTopups: z61.optional(
@@ -10934,13 +11172,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z61.pipe(
10934
11172
  ),
10935
11173
  usageAlerts: z61.optional(
10936
11174
  z61.array(z61.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
11175
+ ),
11176
+ overageAllowed: z61.optional(
11177
+ z61.array(z61.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
10937
11178
  )
10938
11179
  }),
10939
11180
  z61.transform((v) => {
10940
11181
  return remap(v, {
10941
11182
  autoTopups: "auto_topups",
10942
11183
  spendLimits: "spend_limits",
10943
- usageAlerts: "usage_alerts"
11184
+ usageAlerts: "usage_alerts",
11185
+ overageAllowed: "overage_allowed"
10944
11186
  });
10945
11187
  })
10946
11188
  );
@@ -11028,6 +11270,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z61.pipe(
11028
11270
  });
11029
11271
  })
11030
11272
  );
11273
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z61.pipe(
11274
+ z61.object({
11275
+ feature_id: string4(),
11276
+ enabled: z61._default(boolean2(), false)
11277
+ }),
11278
+ z61.transform((v) => {
11279
+ return remap(v, {
11280
+ "feature_id": "featureId"
11281
+ });
11282
+ })
11283
+ );
11031
11284
  var UpdateCustomerBillingControlsResponse$inboundSchema = z61.pipe(
11032
11285
  z61.object({
11033
11286
  auto_topups: optional2(
@@ -11038,13 +11291,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z61.pipe(
11038
11291
  ),
11039
11292
  usage_alerts: optional2(
11040
11293
  z61.array(z61.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
11294
+ ),
11295
+ overage_allowed: optional2(
11296
+ z61.array(z61.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
11041
11297
  )
11042
11298
  }),
11043
11299
  z61.transform((v) => {
11044
11300
  return remap(v, {
11045
11301
  "auto_topups": "autoTopups",
11046
11302
  "spend_limits": "spendLimits",
11047
- "usage_alerts": "usageAlerts"
11303
+ "usage_alerts": "usageAlerts",
11304
+ "overage_allowed": "overageAllowed"
11048
11305
  });
11049
11306
  })
11050
11307
  );
@@ -11236,6 +11493,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z62.pipe(
11236
11493
  });
11237
11494
  })
11238
11495
  );
11496
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z62.pipe(
11497
+ z62.object({
11498
+ featureId: z62.string(),
11499
+ enabled: z62._default(z62.boolean(), false)
11500
+ }),
11501
+ z62.transform((v) => {
11502
+ return remap(v, {
11503
+ featureId: "feature_id"
11504
+ });
11505
+ })
11506
+ );
11239
11507
  var UpdateEntityBillingControlsRequest$outboundSchema = z62.pipe(
11240
11508
  z62.object({
11241
11509
  spendLimits: z62.optional(
@@ -11243,12 +11511,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z62.pipe(
11243
11511
  ),
11244
11512
  usageAlerts: z62.optional(
11245
11513
  z62.array(z62.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
11514
+ ),
11515
+ overageAllowed: z62.optional(
11516
+ z62.array(z62.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
11246
11517
  )
11247
11518
  }),
11248
11519
  z62.transform((v) => {
11249
11520
  return remap(v, {
11250
11521
  spendLimits: "spend_limits",
11251
- usageAlerts: "usage_alerts"
11522
+ usageAlerts: "usage_alerts",
11523
+ overageAllowed: "overage_allowed"
11252
11524
  });
11253
11525
  })
11254
11526
  );
@@ -11400,6 +11672,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z62.pipe(
11400
11672
  });
11401
11673
  })
11402
11674
  );
11675
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z62.pipe(
11676
+ z62.object({
11677
+ feature_id: string4(),
11678
+ enabled: z62._default(boolean2(), false)
11679
+ }),
11680
+ z62.transform((v) => {
11681
+ return remap(v, {
11682
+ "feature_id": "featureId"
11683
+ });
11684
+ })
11685
+ );
11403
11686
  var UpdateEntityBillingControlsResponse$inboundSchema = z62.pipe(
11404
11687
  z62.object({
11405
11688
  spend_limits: optional2(
@@ -11407,12 +11690,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z62.pipe(
11407
11690
  ),
11408
11691
  usage_alerts: optional2(
11409
11692
  z62.array(z62.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
11693
+ ),
11694
+ overage_allowed: optional2(
11695
+ z62.array(z62.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
11410
11696
  )
11411
11697
  }),
11412
11698
  z62.transform((v) => {
11413
11699
  return remap(v, {
11414
11700
  "spend_limits": "spendLimits",
11415
- "usage_alerts": "usageAlerts"
11701
+ "usage_alerts": "usageAlerts",
11702
+ "overage_allowed": "overageAllowed"
11416
11703
  });
11417
11704
  })
11418
11705
  );
@@ -11765,11 +12052,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z64.enum(UpdatePlanExpi
11765
12052
  var UpdatePlanRolloverRequest$outboundSchema = z64.pipe(
11766
12053
  z64.object({
11767
12054
  max: z64.optional(z64.number()),
12055
+ maxPercentage: z64.optional(z64.number()),
11768
12056
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
11769
12057
  expiryDurationLength: z64.optional(z64.number())
11770
12058
  }),
11771
12059
  z64.transform((v) => {
11772
12060
  return remap(v, {
12061
+ maxPercentage: "max_percentage",
11773
12062
  expiryDurationType: "expiry_duration_type",
11774
12063
  expiryDurationLength: "expiry_duration_length"
11775
12064
  });
@@ -11954,11 +12243,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
11954
12243
  var UpdatePlanRolloverResponse$inboundSchema = z64.pipe(
11955
12244
  z64.object({
11956
12245
  max: nullable(number2()),
12246
+ max_percentage: z64.optional(z64.nullable(number2())),
11957
12247
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
11958
12248
  expiry_duration_length: optional2(number2())
11959
12249
  }),
11960
12250
  z64.transform((v) => {
11961
12251
  return remap(v, {
12252
+ "max_percentage": "maxPercentage",
11962
12253
  "expiry_duration_type": "expiryDurationType",
11963
12254
  "expiry_duration_length": "expiryDurationLength"
11964
12255
  });
@@ -12235,7 +12526,8 @@ async function $do2(client, request, options) {
12235
12526
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
12236
12527
  "check",
12237
12528
  "track",
12238
- "getOrCreateCustomer"
12529
+ "getOrCreateCustomer",
12530
+ "getEntity"
12239
12531
  ]);
12240
12532
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
12241
12533
  var FAIL_OPEN_BODIES = {
@@ -12265,6 +12557,18 @@ var FAIL_OPEN_BODIES = {
12265
12557
  purchases: [],
12266
12558
  balances: {},
12267
12559
  flags: {}
12560
+ },
12561
+ getEntity: {
12562
+ id: null,
12563
+ name: null,
12564
+ customer_id: null,
12565
+ feature_id: null,
12566
+ created_at: 0,
12567
+ env: "live",
12568
+ subscriptions: [],
12569
+ purchases: [],
12570
+ balances: {},
12571
+ flags: {}
12268
12572
  }
12269
12573
  };
12270
12574
  var FailOpenHook = class {