autumn-js 1.2.2 → 1.2.4

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 (151) 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 +361 -43
  4. package/dist/backend/adapters/express.mjs +5 -5
  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 +361 -43
  8. package/dist/backend/adapters/fetch.mjs +5 -5
  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 +361 -43
  12. package/dist/backend/adapters/hono.mjs +5 -5
  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 +361 -43
  16. package/dist/backend/adapters/index.mjs +8 -8
  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 +361 -43
  20. package/dist/backend/adapters/next.mjs +5 -5
  21. package/dist/backend/{authTypes-BCoyMOAj.d.mts → authTypes-Bdpu8A6G.d.mts} +18 -0
  22. package/dist/backend/{authTypes-BCoyMOAj.d.ts → authTypes-Bdpu8A6G.d.ts} +18 -0
  23. package/dist/backend/{chunk-XU4OGYDV.mjs → chunk-3RN6TO3T.mjs} +60 -7
  24. package/dist/backend/{chunk-3QNAZFQH.mjs → chunk-AA2HLIP7.mjs} +2 -2
  25. package/dist/backend/{chunk-SX3CNUF5.mjs → chunk-AIKOHUUL.mjs} +1 -1
  26. package/dist/backend/{chunk-6BVI5XZX.mjs → chunk-BGGTI77T.mjs} +301 -36
  27. package/dist/backend/{chunk-OB47KG2H.mjs → chunk-MHFVVQCC.mjs} +1 -1
  28. package/dist/backend/{chunk-GLPHS5KF.mjs → chunk-OZRCCZTP.mjs} +2 -2
  29. package/dist/backend/{chunk-GENKYO6B.mjs → chunk-SCDE7Y52.mjs} +1 -1
  30. package/dist/backend/{chunk-C5ZDQJPP.mjs → chunk-UUMOHEAD.mjs} +1 -1
  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 +361 -43
  34. package/dist/backend/core/handlers/coreHandler.mjs +3 -3
  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/handleRouteByName.d.mts +1 -1
  38. package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
  39. package/dist/backend/core/handlers/handleRouteByName.js +361 -43
  40. package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
  41. package/dist/backend/core/handlers/index.d.mts +2 -2
  42. package/dist/backend/core/handlers/index.d.ts +2 -2
  43. package/dist/backend/core/handlers/index.js +361 -43
  44. package/dist/backend/core/handlers/index.mjs +4 -4
  45. package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
  46. package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
  47. package/dist/backend/core/index.d.mts +2 -2
  48. package/dist/backend/core/index.d.ts +2 -2
  49. package/dist/backend/core/index.js +361 -43
  50. package/dist/backend/core/index.mjs +4 -4
  51. package/dist/backend/core/routes/index.d.mts +2 -2
  52. package/dist/backend/core/routes/index.d.ts +2 -2
  53. package/dist/backend/core/routes/index.js +60 -7
  54. package/dist/backend/core/routes/index.mjs +1 -1
  55. package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
  56. package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
  57. package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
  58. package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
  59. package/dist/backend/core/routes/routeConfigs.js +60 -7
  60. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  61. package/dist/backend/core/types/authTypes.d.mts +1 -1
  62. package/dist/backend/core/types/authTypes.d.ts +1 -1
  63. package/dist/backend/core/types/handlerTypes.d.mts +2 -2
  64. package/dist/backend/core/types/handlerTypes.d.ts +2 -2
  65. package/dist/backend/core/types/index.d.mts +2 -2
  66. package/dist/backend/core/types/index.d.ts +2 -2
  67. package/dist/backend/core/types/routeTypes.d.mts +2 -2
  68. package/dist/backend/core/types/routeTypes.d.ts +2 -2
  69. package/dist/backend/index.d.mts +4 -4
  70. package/dist/backend/index.d.ts +4 -4
  71. package/dist/backend/index.js +361 -43
  72. package/dist/backend/index.mjs +4 -4
  73. package/dist/backend/{routeTypes-Che2nkqv.d.ts → routeTypes-DpH9YHyt.d.ts} +247 -2
  74. package/dist/backend/{routeTypes-RMeyKg5T.d.mts → routeTypes-mIP4rSxp.d.mts} +247 -2
  75. package/dist/better-auth/{chunk-5F3J4ZQQ.mjs → chunk-3C2VGNW3.mjs} +302 -37
  76. package/dist/better-auth/{chunk-6TAYCQUD.mjs → chunk-CG3LL2TQ.mjs} +60 -7
  77. package/dist/better-auth/{chunk-IODRHT4E.mjs → chunk-UCMJFTKD.mjs} +1 -1
  78. package/dist/better-auth/index.js +361 -43
  79. package/dist/better-auth/index.mjs +3 -3
  80. package/dist/better-auth/types.d.mts +18 -0
  81. package/dist/better-auth/types.d.ts +18 -0
  82. package/dist/better-auth/utils/createAutumnEndpoint.js +60 -7
  83. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  84. package/dist/better-auth/utils/handleBetterAuthRoute.js +361 -43
  85. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  86. package/dist/better-auth/utils/index.js +361 -43
  87. package/dist/better-auth/utils/index.mjs +3 -3
  88. package/dist/react/AutumnContext.d.mts +3 -3
  89. package/dist/react/AutumnContext.d.ts +3 -3
  90. package/dist/react/AutumnProvider.d.mts +2 -1
  91. package/dist/react/AutumnProvider.d.ts +2 -1
  92. package/dist/react/AutumnProvider.js +18 -8
  93. package/dist/react/AutumnProvider.mjs +3 -3
  94. package/dist/react/{chunk-R7I3UPL4.mjs → chunk-26CKSAPZ.mjs} +6 -4
  95. package/dist/react/{chunk-QEJLIFBC.mjs → chunk-QOFGTXEX.mjs} +3 -2
  96. package/dist/react/{chunk-M34U5F2H.mjs → chunk-SCDO26YC.mjs} +11 -4
  97. package/dist/react/client/AutumnClient.d.mts +4 -3
  98. package/dist/react/client/AutumnClient.d.ts +4 -3
  99. package/dist/react/client/AutumnClient.js +13 -5
  100. package/dist/react/client/AutumnClient.mjs +2 -2
  101. package/dist/react/client/IAutumnClient.d.mts +7 -3
  102. package/dist/react/client/IAutumnClient.d.ts +7 -3
  103. package/dist/react/client/index.d.mts +3 -3
  104. package/dist/react/client/index.d.ts +3 -3
  105. package/dist/react/client/index.js +13 -5
  106. package/dist/react/client/index.mjs +2 -2
  107. package/dist/react/client/internal/httpClient.d.mts +1 -0
  108. package/dist/react/client/internal/httpClient.d.ts +1 -0
  109. package/dist/react/client/internal/httpClient.js +11 -4
  110. package/dist/react/client/internal/httpClient.mjs +1 -1
  111. package/dist/react/{customer-CMAtwbJl.d.ts → customer-BPHnUS4N.d.ts} +19 -1
  112. package/dist/react/{customer-CNvpHhpS.d.mts → customer-DDRi84Zq.d.mts} +19 -1
  113. package/dist/react/hooks/index.d.mts +3 -3
  114. package/dist/react/hooks/index.d.ts +3 -3
  115. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  116. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  117. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  118. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  119. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  120. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  121. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  122. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  123. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  124. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  125. package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
  126. package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
  127. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  128. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  129. package/dist/react/hooks/useCustomer.d.mts +3 -3
  130. package/dist/react/hooks/useCustomer.d.ts +3 -3
  131. package/dist/react/hooks/useEntity.d.mts +2 -2
  132. package/dist/react/hooks/useEntity.d.ts +2 -2
  133. package/dist/react/hooks/useListEvents.d.mts +2 -2
  134. package/dist/react/hooks/useListEvents.d.ts +2 -2
  135. package/dist/react/hooks/useListPlans.d.mts +2 -2
  136. package/dist/react/hooks/useListPlans.d.ts +2 -2
  137. package/dist/react/hooks/useReferrals.d.mts +2 -2
  138. package/dist/react/hooks/useReferrals.d.ts +2 -2
  139. package/dist/react/index.d.mts +3 -3
  140. package/dist/react/index.d.ts +3 -3
  141. package/dist/react/index.js +18 -8
  142. package/dist/react/index.mjs +3 -3
  143. package/dist/react/{params-Cdkj83CV.d.mts → params-Bj6uyOX1.d.mts} +91 -2
  144. package/dist/react/{params-CnOvYjqJ.d.ts → params-DAVIR4YX.d.ts} +91 -2
  145. package/dist/react/{plan-BoMslu_O.d.mts → plan-CqxFGNk2.d.mts} +4 -0
  146. package/dist/react/{plan-BoMslu_O.d.ts → plan-CqxFGNk2.d.ts} +4 -0
  147. package/dist/sdk/index.d.mts +360 -4
  148. package/dist/sdk/index.d.ts +360 -4
  149. package/dist/sdk/index.js +406 -36
  150. package/dist/sdk/index.mjs +381 -37
  151. package/package.json +1 -1
@@ -183,6 +183,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
183
183
  });
184
184
  var attachRolloverOutboundSchema = import_v42.z.object({
185
185
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
186
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
186
187
  expiry_duration_type: import_v42.z.string(),
187
188
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
188
189
  });
@@ -283,6 +284,7 @@ var attachProrationSchema = import_v42.z.object({
283
284
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
284
285
  var attachRolloverSchema = import_v42.z.object({
285
286
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
287
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
286
288
  expiryDurationType: attachExpiryDurationTypeSchema,
287
289
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
288
290
  });
@@ -373,6 +375,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
373
375
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
374
376
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
375
377
  });
378
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
379
+ featureId: import_v44.z.string(),
380
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
381
+ });
376
382
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
377
383
  interval: import_v44.z.string(),
378
384
  interval_count: import_v44.z.number(),
@@ -383,7 +389,8 @@ var getOrCreateCustomerAutoTopupOutboundSchema = import_v44.z.object({
383
389
  enabled: import_v44.z.boolean(),
384
390
  threshold: import_v44.z.number(),
385
391
  quantity: import_v44.z.number(),
386
- purchase_limit: import_v44.z.union([getOrCreateCustomerPurchaseLimitOutboundSchema, import_v44.z.undefined()]).optional()
392
+ purchase_limit: import_v44.z.union([getOrCreateCustomerPurchaseLimitOutboundSchema, import_v44.z.undefined()]).optional(),
393
+ invoice_mode: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
387
394
  });
388
395
  var getOrCreateCustomerSpendLimitOutboundSchema = import_v44.z.object({
389
396
  feature_id: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional(),
@@ -397,6 +404,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
397
404
  threshold_type: import_v44.z.string(),
398
405
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
399
406
  });
407
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
408
+ feature_id: import_v44.z.string(),
409
+ enabled: import_v44.z.boolean()
410
+ });
400
411
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
401
412
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
402
413
  spend_limits: import_v44.z.union([
@@ -406,6 +417,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
406
417
  usage_alerts: import_v44.z.union([
407
418
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
408
419
  import_v44.z.undefined()
420
+ ]).optional(),
421
+ overage_allowed: import_v44.z.union([
422
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
423
+ import_v44.z.undefined()
409
424
  ]).optional()
410
425
  });
411
426
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -433,7 +448,8 @@ var getOrCreateCustomerAutoTopupSchema = import_v44.z.object({
433
448
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
434
449
  threshold: import_v44.z.number(),
435
450
  quantity: import_v44.z.number(),
436
- purchaseLimit: import_v44.z.union([getOrCreateCustomerPurchaseLimitSchema, import_v44.z.undefined()]).optional()
451
+ purchaseLimit: import_v44.z.union([getOrCreateCustomerPurchaseLimitSchema, import_v44.z.undefined()]).optional(),
452
+ invoiceMode: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
437
453
  });
438
454
  var getOrCreateCustomerThresholdTypeSchema = closedEnumSchema3;
439
455
  var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
@@ -446,7 +462,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
446
462
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
447
463
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
448
464
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
449
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
465
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
466
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
450
467
  });
451
468
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
452
469
  customerId: import_v44.z.string().nullable(),
@@ -585,6 +602,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
585
602
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
586
603
  var listPlansRolloverSchema = import_v46.z.object({
587
604
  max: import_v46.z.number().nullable(),
605
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
588
606
  expiryDurationType: listPlansExpiryDurationTypeSchema,
589
607
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
590
608
  });
@@ -665,6 +683,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
665
683
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
666
684
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
667
685
  });
686
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
687
+ featureId: import_v47.z.string(),
688
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
689
+ });
668
690
  var multiAttachInvoiceSchema = import_v47.z.object({
669
691
  status: import_v47.z.string().nullable(),
670
692
  stripeId: import_v47.z.string(),
@@ -703,6 +725,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
703
725
  });
704
726
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
705
727
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
728
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
706
729
  expiry_duration_type: import_v47.z.string(),
707
730
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
708
731
  });
@@ -757,9 +780,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
757
780
  threshold_type: import_v47.z.string(),
758
781
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
759
782
  });
783
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
784
+ feature_id: import_v47.z.string(),
785
+ enabled: import_v47.z.boolean()
786
+ });
760
787
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
761
788
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
762
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
789
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
790
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
763
791
  });
764
792
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
765
793
  feature_id: import_v47.z.string(),
@@ -803,6 +831,7 @@ var multiAttachProrationSchema = import_v47.z.object({
803
831
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
804
832
  var multiAttachRolloverSchema = import_v47.z.object({
805
833
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
834
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
806
835
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
807
836
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
808
837
  });
@@ -843,7 +872,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
843
872
  });
844
873
  var multiAttachBillingControlsSchema = import_v47.z.object({
845
874
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
846
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
875
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
876
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
847
877
  });
848
878
  var multiAttachEntityDataSchema = import_v47.z.object({
849
879
  featureId: import_v47.z.string(),
@@ -1051,6 +1081,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
1051
1081
  });
1052
1082
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
1053
1083
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1084
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1054
1085
  expiry_duration_type: import_v49.z.string(),
1055
1086
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
1056
1087
  });
@@ -1155,6 +1186,7 @@ var previewAttachProrationSchema = import_v49.z.object({
1155
1186
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
1156
1187
  var previewAttachRolloverSchema = import_v49.z.object({
1157
1188
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1189
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
1158
1190
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
1159
1191
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
1160
1192
  });
@@ -1264,6 +1296,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
1264
1296
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
1265
1297
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
1266
1298
  });
1299
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
1300
+ featureId: import_v410.z.string(),
1301
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
1302
+ });
1267
1303
  var previewMultiAttachDiscountSchema = import_v410.z.object({
1268
1304
  amountOff: import_v410.z.number(),
1269
1305
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -1365,6 +1401,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
1365
1401
  });
1366
1402
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
1367
1403
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1404
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1368
1405
  expiry_duration_type: import_v410.z.string(),
1369
1406
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
1370
1407
  });
@@ -1422,9 +1459,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
1422
1459
  threshold_type: import_v410.z.string(),
1423
1460
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
1424
1461
  });
1462
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
1463
+ feature_id: import_v410.z.string(),
1464
+ enabled: import_v410.z.boolean()
1465
+ });
1425
1466
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
1426
1467
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
1427
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
1468
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
1469
+ overage_allowed: import_v410.z.union([
1470
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
1471
+ import_v410.z.undefined()
1472
+ ]).optional()
1428
1473
  });
1429
1474
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
1430
1475
  feature_id: import_v410.z.string(),
@@ -1469,6 +1514,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
1469
1514
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
1470
1515
  var previewMultiAttachRolloverSchema = import_v410.z.object({
1471
1516
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1517
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
1472
1518
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
1473
1519
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
1474
1520
  });
@@ -1512,7 +1558,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
1512
1558
  });
1513
1559
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
1514
1560
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
1515
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
1561
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
1562
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
1516
1563
  });
1517
1564
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
1518
1565
  featureId: import_v410.z.string(),
@@ -1708,6 +1755,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
1708
1755
  });
1709
1756
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
1710
1757
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1758
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1711
1759
  expiry_duration_type: import_v411.z.string(),
1712
1760
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
1713
1761
  });
@@ -1792,6 +1840,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
1792
1840
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
1793
1841
  var previewUpdateRolloverSchema = import_v411.z.object({
1794
1842
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1843
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
1795
1844
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
1796
1845
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
1797
1846
  });
@@ -1955,6 +2004,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
1955
2004
  });
1956
2005
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
1957
2006
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
2007
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
1958
2008
  expiry_duration_type: import_v413.z.string(),
1959
2009
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
1960
2010
  });
@@ -2045,6 +2095,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
2045
2095
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
2046
2096
  var setupPaymentRolloverSchema = import_v413.z.object({
2047
2097
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
2098
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
2048
2099
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
2049
2100
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
2050
2101
  });
@@ -2155,6 +2206,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
2155
2206
  });
2156
2207
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
2157
2208
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2209
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2158
2210
  expiry_duration_type: import_v414.z.string(),
2159
2211
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
2160
2212
  });
@@ -2235,6 +2287,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
2235
2287
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
2236
2288
  var billingUpdateRolloverSchema = import_v414.z.object({
2237
2289
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2290
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
2238
2291
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
2239
2292
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
2240
2293
  });
@@ -2574,8 +2627,8 @@ var SDK_METADATA = {
2574
2627
  language: "typescript",
2575
2628
  openapiDocVersion: "2.2.0",
2576
2629
  sdkVersion: "0.10.17",
2577
- genVersion: "2.869.25",
2578
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
2630
+ genVersion: "2.879.6",
2631
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.6 2.2.0 @useautumn/sdk"
2579
2632
  };
2580
2633
 
2581
2634
  // ../sdk/src/lib/http.ts
@@ -3497,8 +3550,8 @@ function applyBearer(state, spec) {
3497
3550
  state.headers[spec.fieldName] = value;
3498
3551
  }
3499
3552
  }
3500
- function resolveGlobalSecurity(security) {
3501
- return resolveSecurity(
3553
+ function resolveGlobalSecurity(security, allowedFields) {
3554
+ let inputs = [
3502
3555
  [
3503
3556
  {
3504
3557
  fieldName: "Authorization",
@@ -3506,7 +3559,16 @@ function resolveGlobalSecurity(security) {
3506
3559
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
3507
3560
  }
3508
3561
  ]
3509
- );
3562
+ ];
3563
+ if (allowedFields) {
3564
+ inputs = allowedFields.map((i) => {
3565
+ if (i < 0 || i >= inputs.length) {
3566
+ throw new RangeError(`invalid allowedFields index ${i}`);
3567
+ }
3568
+ return inputs[i];
3569
+ });
3570
+ }
3571
+ return resolveSecurity(...inputs);
3510
3572
  }
3511
3573
  async function extractSecurity(sec) {
3512
3574
  if (sec == null) {
@@ -4053,11 +4115,13 @@ var AttachExpiryDurationType$outboundSchema = z26.enum(AttachExpiryDurationType)
4053
4115
  var AttachRollover$outboundSchema = z26.pipe(
4054
4116
  z26.object({
4055
4117
  max: z26.optional(z26.number()),
4118
+ maxPercentage: z26.optional(z26.number()),
4056
4119
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
4057
4120
  expiryDurationLength: z26.optional(z26.number())
4058
4121
  }),
4059
4122
  z26.transform((v) => {
4060
4123
  return remap(v, {
4124
+ maxPercentage: "max_percentage",
4061
4125
  expiryDurationType: "expiry_duration_type",
4062
4126
  expiryDurationLength: "expiry_duration_length"
4063
4127
  });
@@ -4582,11 +4646,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z28.enum(BillingUpdateExpir
4582
4646
  var BillingUpdateRollover$outboundSchema = z28.pipe(
4583
4647
  z28.object({
4584
4648
  max: z28.optional(z28.number()),
4649
+ maxPercentage: z28.optional(z28.number()),
4585
4650
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
4586
4651
  expiryDurationLength: z28.optional(z28.number())
4587
4652
  }),
4588
4653
  z28.transform((v) => {
4589
4654
  return remap(v, {
4655
+ maxPercentage: "max_percentage",
4590
4656
  expiryDurationType: "expiry_duration_type",
4591
4657
  expiryDurationLength: "expiry_duration_length"
4592
4658
  });
@@ -4928,11 +4994,19 @@ var ProductDisplay$inboundSchema = z29.pipe(
4928
4994
  })
4929
4995
  );
4930
4996
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
4931
- var CheckRollover$inboundSchema = z29.object({
4932
- max: nullable(number2()),
4933
- duration: z29._default(RolloverDuration$inboundSchema, "month"),
4934
- length: number2()
4935
- });
4997
+ var CheckRollover$inboundSchema = z29.pipe(
4998
+ z29.object({
4999
+ max: z29.optional(z29.nullable(number2())),
5000
+ max_percentage: z29.optional(z29.nullable(number2())),
5001
+ duration: z29._default(RolloverDuration$inboundSchema, "month"),
5002
+ length: number2()
5003
+ }),
5004
+ z29.transform((v) => {
5005
+ return remap(v, {
5006
+ "max_percentage": "maxPercentage"
5007
+ });
5008
+ })
5009
+ );
4936
5010
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
4937
5011
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
4938
5012
  var Config$inboundSchema = z29.pipe(
@@ -5171,12 +5245,14 @@ var CustomerDataAutoTopup$outboundSchema = z31.pipe(
5171
5245
  quantity: z31.number(),
5172
5246
  purchaseLimit: z31.optional(
5173
5247
  z31.lazy(() => CustomerDataPurchaseLimit$outboundSchema)
5174
- )
5248
+ ),
5249
+ invoiceMode: z31.optional(z31.boolean())
5175
5250
  }),
5176
5251
  z31.transform((v) => {
5177
5252
  return remap(v, {
5178
5253
  featureId: "feature_id",
5179
- purchaseLimit: "purchase_limit"
5254
+ purchaseLimit: "purchase_limit",
5255
+ invoiceMode: "invoice_mode"
5180
5256
  });
5181
5257
  })
5182
5258
  );
@@ -5209,6 +5285,17 @@ var CustomerDataUsageAlert$outboundSchema = z31.pipe(
5209
5285
  });
5210
5286
  })
5211
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
+ );
5212
5299
  var CustomerDataBillingControls$outboundSchema = z31.pipe(
5213
5300
  z31.object({
5214
5301
  autoTopups: z31.optional(
@@ -5219,13 +5306,17 @@ var CustomerDataBillingControls$outboundSchema = z31.pipe(
5219
5306
  ),
5220
5307
  usageAlerts: z31.optional(
5221
5308
  z31.array(z31.lazy(() => CustomerDataUsageAlert$outboundSchema))
5309
+ ),
5310
+ overageAllowed: z31.optional(
5311
+ z31.array(z31.lazy(() => CustomerDataOverageAllowed$outboundSchema))
5222
5312
  )
5223
5313
  }),
5224
5314
  z31.transform((v) => {
5225
5315
  return remap(v, {
5226
5316
  autoTopups: "auto_topups",
5227
5317
  spendLimits: "spend_limits",
5228
- usageAlerts: "usage_alerts"
5318
+ usageAlerts: "usage_alerts",
5319
+ overageAllowed: "overage_allowed"
5229
5320
  });
5230
5321
  })
5231
5322
  );
@@ -5436,11 +5527,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
5436
5527
  var PlanRollover$inboundSchema = z32.pipe(
5437
5528
  z32.object({
5438
5529
  max: nullable(number2()),
5530
+ max_percentage: z32.optional(z32.nullable(number2())),
5439
5531
  expiry_duration_type: ExpiryDurationType$inboundSchema,
5440
5532
  expiry_duration_length: optional2(number2())
5441
5533
  }),
5442
5534
  z32.transform((v) => {
5443
5535
  return remap(v, {
5536
+ "max_percentage": "maxPercentage",
5444
5537
  "expiry_duration_type": "expiryDurationType",
5445
5538
  "expiry_duration_length": "expiryDurationLength"
5446
5539
  });
@@ -5579,6 +5672,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z33.pipe(
5579
5672
  });
5580
5673
  })
5581
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
+ );
5582
5686
  var CreateEntityBillingControlsRequest$outboundSchema = z33.pipe(
5583
5687
  z33.object({
5584
5688
  spendLimits: z33.optional(
@@ -5586,12 +5690,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z33.pipe(
5586
5690
  ),
5587
5691
  usageAlerts: z33.optional(
5588
5692
  z33.array(z33.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
5693
+ ),
5694
+ overageAllowed: z33.optional(
5695
+ z33.array(z33.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
5589
5696
  )
5590
5697
  }),
5591
5698
  z33.transform((v) => {
5592
5699
  return remap(v, {
5593
5700
  spendLimits: "spend_limits",
5594
- usageAlerts: "usage_alerts"
5701
+ usageAlerts: "usage_alerts",
5702
+ overageAllowed: "overage_allowed"
5595
5703
  });
5596
5704
  })
5597
5705
  );
@@ -5748,6 +5856,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z33.pipe(
5748
5856
  });
5749
5857
  })
5750
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
+ );
5751
5870
  var CreateEntityBillingControlsResponse$inboundSchema = z33.pipe(
5752
5871
  z33.object({
5753
5872
  spend_limits: optional2(
@@ -5755,12 +5874,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z33.pipe(
5755
5874
  ),
5756
5875
  usage_alerts: optional2(
5757
5876
  z33.array(z33.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
5877
+ ),
5878
+ overage_allowed: optional2(
5879
+ z33.array(z33.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
5758
5880
  )
5759
5881
  }),
5760
5882
  z33.transform((v) => {
5761
5883
  return remap(v, {
5762
5884
  "spend_limits": "spendLimits",
5763
- "usage_alerts": "usageAlerts"
5885
+ "usage_alerts": "usageAlerts",
5886
+ "overage_allowed": "overageAllowed"
5764
5887
  });
5765
5888
  })
5766
5889
  );
@@ -6110,11 +6233,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z35.enum(CreatePlanExpi
6110
6233
  var CreatePlanRolloverRequest$outboundSchema = z35.pipe(
6111
6234
  z35.object({
6112
6235
  max: z35.optional(z35.number()),
6236
+ maxPercentage: z35.optional(z35.number()),
6113
6237
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
6114
6238
  expiryDurationLength: z35.optional(z35.number())
6115
6239
  }),
6116
6240
  z35.transform((v) => {
6117
6241
  return remap(v, {
6242
+ maxPercentage: "max_percentage",
6118
6243
  expiryDurationType: "expiry_duration_type",
6119
6244
  expiryDurationLength: "expiry_duration_length"
6120
6245
  });
@@ -6291,11 +6416,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
6291
6416
  var CreatePlanRolloverResponse$inboundSchema = z35.pipe(
6292
6417
  z35.object({
6293
6418
  max: nullable(number2()),
6419
+ max_percentage: z35.optional(z35.nullable(number2())),
6294
6420
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
6295
6421
  expiry_duration_length: optional2(number2())
6296
6422
  }),
6297
6423
  z35.transform((v) => {
6298
6424
  return remap(v, {
6425
+ "max_percentage": "maxPercentage",
6299
6426
  "expiry_duration_type": "expiryDurationType",
6300
6427
  "expiry_duration_length": "expiryDurationLength"
6301
6428
  });
@@ -6479,12 +6606,14 @@ var CustomerAutoTopup$inboundSchema = z37.pipe(
6479
6606
  quantity: number2(),
6480
6607
  purchase_limit: optional2(
6481
6608
  z37.lazy(() => CustomerPurchaseLimit$inboundSchema)
6482
- )
6609
+ ),
6610
+ invoice_mode: optional2(boolean2())
6483
6611
  }),
6484
6612
  z37.transform((v) => {
6485
6613
  return remap(v, {
6486
6614
  "feature_id": "featureId",
6487
- "purchase_limit": "purchaseLimit"
6615
+ "purchase_limit": "purchaseLimit",
6616
+ "invoice_mode": "invoiceMode"
6488
6617
  });
6489
6618
  })
6490
6619
  );
@@ -6517,6 +6646,17 @@ var CustomerUsageAlert$inboundSchema = z37.pipe(
6517
6646
  });
6518
6647
  })
6519
6648
  );
6649
+ var CustomerOverageAllowed$inboundSchema = z37.pipe(
6650
+ z37.object({
6651
+ feature_id: string4(),
6652
+ enabled: z37._default(boolean2(), false)
6653
+ }),
6654
+ z37.transform((v) => {
6655
+ return remap(v, {
6656
+ "feature_id": "featureId"
6657
+ });
6658
+ })
6659
+ );
6520
6660
  var CustomerBillingControls$inboundSchema = z37.pipe(
6521
6661
  z37.object({
6522
6662
  auto_topups: optional2(
@@ -6527,13 +6667,17 @@ var CustomerBillingControls$inboundSchema = z37.pipe(
6527
6667
  ),
6528
6668
  usage_alerts: optional2(
6529
6669
  z37.array(z37.lazy(() => CustomerUsageAlert$inboundSchema))
6670
+ ),
6671
+ overage_allowed: optional2(
6672
+ z37.array(z37.lazy(() => CustomerOverageAllowed$inboundSchema))
6530
6673
  )
6531
6674
  }),
6532
6675
  z37.transform((v) => {
6533
6676
  return remap(v, {
6534
6677
  "auto_topups": "autoTopups",
6535
6678
  "spend_limits": "spendLimits",
6536
- "usage_alerts": "usageAlerts"
6679
+ "usage_alerts": "usageAlerts",
6680
+ "overage_allowed": "overageAllowed"
6537
6681
  });
6538
6682
  })
6539
6683
  );
@@ -7072,6 +7216,17 @@ var GetEntityUsageAlert$inboundSchema = z44.pipe(
7072
7216
  });
7073
7217
  })
7074
7218
  );
7219
+ var GetEntityOverageAllowed$inboundSchema = z44.pipe(
7220
+ z44.object({
7221
+ feature_id: string4(),
7222
+ enabled: z44._default(boolean2(), false)
7223
+ }),
7224
+ z44.transform((v) => {
7225
+ return remap(v, {
7226
+ "feature_id": "featureId"
7227
+ });
7228
+ })
7229
+ );
7075
7230
  var GetEntityBillingControls$inboundSchema = z44.pipe(
7076
7231
  z44.object({
7077
7232
  spend_limits: optional2(
@@ -7079,12 +7234,16 @@ var GetEntityBillingControls$inboundSchema = z44.pipe(
7079
7234
  ),
7080
7235
  usage_alerts: optional2(
7081
7236
  z44.array(z44.lazy(() => GetEntityUsageAlert$inboundSchema))
7237
+ ),
7238
+ overage_allowed: optional2(
7239
+ z44.array(z44.lazy(() => GetEntityOverageAllowed$inboundSchema))
7082
7240
  )
7083
7241
  }),
7084
7242
  z44.transform((v) => {
7085
7243
  return remap(v, {
7086
7244
  "spend_limits": "spendLimits",
7087
- "usage_alerts": "usageAlerts"
7245
+ "usage_alerts": "usageAlerts",
7246
+ "overage_allowed": "overageAllowed"
7088
7247
  });
7089
7248
  })
7090
7249
  );
@@ -7224,12 +7383,14 @@ var GetOrCreateCustomerAutoTopup$outboundSchema = z46.pipe(
7224
7383
  quantity: z46.number(),
7225
7384
  purchaseLimit: z46.optional(
7226
7385
  z46.lazy(() => GetOrCreateCustomerPurchaseLimit$outboundSchema)
7227
- )
7386
+ ),
7387
+ invoiceMode: z46.optional(z46.boolean())
7228
7388
  }),
7229
7389
  z46.transform((v) => {
7230
7390
  return remap(v, {
7231
7391
  featureId: "feature_id",
7232
- purchaseLimit: "purchase_limit"
7392
+ purchaseLimit: "purchase_limit",
7393
+ invoiceMode: "invoice_mode"
7233
7394
  });
7234
7395
  })
7235
7396
  );
@@ -7262,6 +7423,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z46.pipe(
7262
7423
  });
7263
7424
  })
7264
7425
  );
7426
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z46.pipe(
7427
+ z46.object({
7428
+ featureId: z46.string(),
7429
+ enabled: z46._default(z46.boolean(), false)
7430
+ }),
7431
+ z46.transform((v) => {
7432
+ return remap(v, {
7433
+ featureId: "feature_id"
7434
+ });
7435
+ })
7436
+ );
7265
7437
  var GetOrCreateCustomerBillingControls$outboundSchema = z46.pipe(
7266
7438
  z46.object({
7267
7439
  autoTopups: z46.optional(
@@ -7272,13 +7444,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z46.pipe(
7272
7444
  ),
7273
7445
  usageAlerts: z46.optional(
7274
7446
  z46.array(z46.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
7447
+ ),
7448
+ overageAllowed: z46.optional(
7449
+ z46.array(z46.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
7275
7450
  )
7276
7451
  }),
7277
7452
  z46.transform((v) => {
7278
7453
  return remap(v, {
7279
7454
  autoTopups: "auto_topups",
7280
7455
  spendLimits: "spend_limits",
7281
- usageAlerts: "usage_alerts"
7456
+ usageAlerts: "usage_alerts",
7457
+ overageAllowed: "overage_allowed"
7282
7458
  });
7283
7459
  })
7284
7460
  );
@@ -7503,11 +7679,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
7503
7679
  var GetPlanRollover$inboundSchema = z47.pipe(
7504
7680
  z47.object({
7505
7681
  max: nullable(number2()),
7682
+ max_percentage: z47.optional(z47.nullable(number2())),
7506
7683
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
7507
7684
  expiry_duration_length: optional2(number2())
7508
7685
  }),
7509
7686
  z47.transform((v) => {
7510
7687
  return remap(v, {
7688
+ "max_percentage": "maxPercentage",
7511
7689
  "expiry_duration_type": "expiryDurationType",
7512
7690
  "expiry_duration_length": "expiryDurationLength"
7513
7691
  });
@@ -7697,12 +7875,14 @@ var ListCustomersAutoTopup$inboundSchema = z48.pipe(
7697
7875
  quantity: number2(),
7698
7876
  purchase_limit: optional2(
7699
7877
  z48.lazy(() => ListCustomersPurchaseLimit$inboundSchema)
7700
- )
7878
+ ),
7879
+ invoice_mode: optional2(boolean2())
7701
7880
  }),
7702
7881
  z48.transform((v) => {
7703
7882
  return remap(v, {
7704
7883
  "feature_id": "featureId",
7705
- "purchase_limit": "purchaseLimit"
7884
+ "purchase_limit": "purchaseLimit",
7885
+ "invoice_mode": "invoiceMode"
7706
7886
  });
7707
7887
  })
7708
7888
  );
@@ -7735,6 +7915,17 @@ var ListCustomersUsageAlert$inboundSchema = z48.pipe(
7735
7915
  });
7736
7916
  })
7737
7917
  );
7918
+ var ListCustomersOverageAllowed$inboundSchema = z48.pipe(
7919
+ z48.object({
7920
+ feature_id: string4(),
7921
+ enabled: z48._default(boolean2(), false)
7922
+ }),
7923
+ z48.transform((v) => {
7924
+ return remap(v, {
7925
+ "feature_id": "featureId"
7926
+ });
7927
+ })
7928
+ );
7738
7929
  var ListCustomersBillingControls$inboundSchema = z48.pipe(
7739
7930
  z48.object({
7740
7931
  auto_topups: optional2(
@@ -7745,13 +7936,17 @@ var ListCustomersBillingControls$inboundSchema = z48.pipe(
7745
7936
  ),
7746
7937
  usage_alerts: optional2(
7747
7938
  z48.array(z48.lazy(() => ListCustomersUsageAlert$inboundSchema))
7939
+ ),
7940
+ overage_allowed: optional2(
7941
+ z48.array(z48.lazy(() => ListCustomersOverageAllowed$inboundSchema))
7748
7942
  )
7749
7943
  }),
7750
7944
  z48.transform((v) => {
7751
7945
  return remap(v, {
7752
7946
  "auto_topups": "autoTopups",
7753
7947
  "spend_limits": "spendLimits",
7754
- "usage_alerts": "usageAlerts"
7948
+ "usage_alerts": "usageAlerts",
7949
+ "overage_allowed": "overageAllowed"
7755
7950
  });
7756
7951
  })
7757
7952
  );
@@ -8206,11 +8401,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
8206
8401
  var ListPlansRollover$inboundSchema = z51.pipe(
8207
8402
  z51.object({
8208
8403
  max: nullable(number2()),
8404
+ max_percentage: z51.optional(z51.nullable(number2())),
8209
8405
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
8210
8406
  expiry_duration_length: optional2(number2())
8211
8407
  }),
8212
8408
  z51.transform((v) => {
8213
8409
  return remap(v, {
8410
+ "max_percentage": "maxPercentage",
8214
8411
  "expiry_duration_type": "expiryDurationType",
8215
8412
  "expiry_duration_length": "expiryDurationLength"
8216
8413
  });
@@ -8454,11 +8651,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z52.enum(MultiAttachExpiryDur
8454
8651
  var MultiAttachRollover$outboundSchema = z52.pipe(
8455
8652
  z52.object({
8456
8653
  max: z52.optional(z52.number()),
8654
+ maxPercentage: z52.optional(z52.number()),
8457
8655
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
8458
8656
  expiryDurationLength: z52.optional(z52.number())
8459
8657
  }),
8460
8658
  z52.transform((v) => {
8461
8659
  return remap(v, {
8660
+ maxPercentage: "max_percentage",
8462
8661
  expiryDurationType: "expiry_duration_type",
8463
8662
  expiryDurationLength: "expiry_duration_length"
8464
8663
  });
@@ -8585,6 +8784,17 @@ var MultiAttachUsageAlert$outboundSchema = z52.pipe(
8585
8784
  });
8586
8785
  })
8587
8786
  );
8787
+ var MultiAttachOverageAllowed$outboundSchema = z52.pipe(
8788
+ z52.object({
8789
+ featureId: z52.string(),
8790
+ enabled: z52._default(z52.boolean(), false)
8791
+ }),
8792
+ z52.transform((v) => {
8793
+ return remap(v, {
8794
+ featureId: "feature_id"
8795
+ });
8796
+ })
8797
+ );
8588
8798
  var MultiAttachBillingControls$outboundSchema = z52.pipe(
8589
8799
  z52.object({
8590
8800
  spendLimits: z52.optional(
@@ -8592,12 +8802,16 @@ var MultiAttachBillingControls$outboundSchema = z52.pipe(
8592
8802
  ),
8593
8803
  usageAlerts: z52.optional(
8594
8804
  z52.array(z52.lazy(() => MultiAttachUsageAlert$outboundSchema))
8805
+ ),
8806
+ overageAllowed: z52.optional(
8807
+ z52.array(z52.lazy(() => MultiAttachOverageAllowed$outboundSchema))
8595
8808
  )
8596
8809
  }),
8597
8810
  z52.transform((v) => {
8598
8811
  return remap(v, {
8599
8812
  spendLimits: "spend_limits",
8600
- usageAlerts: "usage_alerts"
8813
+ usageAlerts: "usage_alerts",
8814
+ overageAllowed: "overage_allowed"
8601
8815
  });
8602
8816
  })
8603
8817
  );
@@ -8891,11 +9105,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z54.enum(PreviewAttachExpir
8891
9105
  var PreviewAttachRollover$outboundSchema = z54.pipe(
8892
9106
  z54.object({
8893
9107
  max: z54.optional(z54.number()),
9108
+ maxPercentage: z54.optional(z54.number()),
8894
9109
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
8895
9110
  expiryDurationLength: z54.optional(z54.number())
8896
9111
  }),
8897
9112
  z54.transform((v) => {
8898
9113
  return remap(v, {
9114
+ maxPercentage: "max_percentage",
8899
9115
  expiryDurationType: "expiry_duration_type",
8900
9116
  expiryDurationLength: "expiry_duration_length"
8901
9117
  });
@@ -9439,11 +9655,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z55.enum(PreviewMultiA
9439
9655
  var PreviewMultiAttachRollover$outboundSchema = z55.pipe(
9440
9656
  z55.object({
9441
9657
  max: z55.optional(z55.number()),
9658
+ maxPercentage: z55.optional(z55.number()),
9442
9659
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
9443
9660
  expiryDurationLength: z55.optional(z55.number())
9444
9661
  }),
9445
9662
  z55.transform((v) => {
9446
9663
  return remap(v, {
9664
+ maxPercentage: "max_percentage",
9447
9665
  expiryDurationType: "expiry_duration_type",
9448
9666
  expiryDurationLength: "expiry_duration_length"
9449
9667
  });
@@ -9583,6 +9801,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z55.pipe(
9583
9801
  });
9584
9802
  })
9585
9803
  );
9804
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z55.pipe(
9805
+ z55.object({
9806
+ featureId: z55.string(),
9807
+ enabled: z55._default(z55.boolean(), false)
9808
+ }),
9809
+ z55.transform((v) => {
9810
+ return remap(v, {
9811
+ featureId: "feature_id"
9812
+ });
9813
+ })
9814
+ );
9586
9815
  var PreviewMultiAttachBillingControls$outboundSchema = z55.pipe(
9587
9816
  z55.object({
9588
9817
  spendLimits: z55.optional(
@@ -9590,12 +9819,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z55.pipe(
9590
9819
  ),
9591
9820
  usageAlerts: z55.optional(
9592
9821
  z55.array(z55.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
9822
+ ),
9823
+ overageAllowed: z55.optional(
9824
+ z55.array(z55.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
9593
9825
  )
9594
9826
  }),
9595
9827
  z55.transform((v) => {
9596
9828
  return remap(v, {
9597
9829
  spendLimits: "spend_limits",
9598
- usageAlerts: "usage_alerts"
9830
+ usageAlerts: "usage_alerts",
9831
+ overageAllowed: "overage_allowed"
9599
9832
  });
9600
9833
  })
9601
9834
  );
@@ -10051,11 +10284,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z56.enum(PreviewUpdateExpir
10051
10284
  var PreviewUpdateRollover$outboundSchema = z56.pipe(
10052
10285
  z56.object({
10053
10286
  max: z56.optional(z56.number()),
10287
+ maxPercentage: z56.optional(z56.number()),
10054
10288
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
10055
10289
  expiryDurationLength: z56.optional(z56.number())
10056
10290
  }),
10057
10291
  z56.transform((v) => {
10058
10292
  return remap(v, {
10293
+ maxPercentage: "max_percentage",
10059
10294
  expiryDurationType: "expiry_duration_type",
10060
10295
  expiryDurationLength: "expiry_duration_length"
10061
10296
  });
@@ -10571,11 +10806,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z58.enum(SetupPaymentExpiryD
10571
10806
  var SetupPaymentRollover$outboundSchema = z58.pipe(
10572
10807
  z58.object({
10573
10808
  max: z58.optional(z58.number()),
10809
+ maxPercentage: z58.optional(z58.number()),
10574
10810
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
10575
10811
  expiryDurationLength: z58.optional(z58.number())
10576
10812
  }),
10577
10813
  z58.transform((v) => {
10578
10814
  return remap(v, {
10815
+ maxPercentage: "max_percentage",
10579
10816
  expiryDurationType: "expiry_duration_type",
10580
10817
  expiryDurationLength: "expiry_duration_length"
10581
10818
  });
@@ -10880,12 +11117,14 @@ var UpdateCustomerAutoTopupRequest$outboundSchema = z61.pipe(
10880
11117
  quantity: z61.number(),
10881
11118
  purchaseLimit: z61.optional(
10882
11119
  z61.lazy(() => UpdateCustomerPurchaseLimitRequest$outboundSchema)
10883
- )
11120
+ ),
11121
+ invoiceMode: z61.optional(z61.boolean())
10884
11122
  }),
10885
11123
  z61.transform((v) => {
10886
11124
  return remap(v, {
10887
11125
  featureId: "feature_id",
10888
- purchaseLimit: "purchase_limit"
11126
+ purchaseLimit: "purchase_limit",
11127
+ invoiceMode: "invoice_mode"
10889
11128
  });
10890
11129
  })
10891
11130
  );
@@ -10920,6 +11159,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z61.pipe(
10920
11159
  });
10921
11160
  })
10922
11161
  );
11162
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z61.pipe(
11163
+ z61.object({
11164
+ featureId: z61.string(),
11165
+ enabled: z61._default(z61.boolean(), false)
11166
+ }),
11167
+ z61.transform((v) => {
11168
+ return remap(v, {
11169
+ featureId: "feature_id"
11170
+ });
11171
+ })
11172
+ );
10923
11173
  var UpdateCustomerBillingControlsRequest$outboundSchema = z61.pipe(
10924
11174
  z61.object({
10925
11175
  autoTopups: z61.optional(
@@ -10930,13 +11180,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z61.pipe(
10930
11180
  ),
10931
11181
  usageAlerts: z61.optional(
10932
11182
  z61.array(z61.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
11183
+ ),
11184
+ overageAllowed: z61.optional(
11185
+ z61.array(z61.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
10933
11186
  )
10934
11187
  }),
10935
11188
  z61.transform((v) => {
10936
11189
  return remap(v, {
10937
11190
  autoTopups: "auto_topups",
10938
11191
  spendLimits: "spend_limits",
10939
- usageAlerts: "usage_alerts"
11192
+ usageAlerts: "usage_alerts",
11193
+ overageAllowed: "overage_allowed"
10940
11194
  });
10941
11195
  })
10942
11196
  );
@@ -10986,12 +11240,14 @@ var UpdateCustomerAutoTopupResponse$inboundSchema = z61.pipe(
10986
11240
  quantity: number2(),
10987
11241
  purchase_limit: optional2(
10988
11242
  z61.lazy(() => UpdateCustomerPurchaseLimitResponse$inboundSchema)
10989
- )
11243
+ ),
11244
+ invoice_mode: optional2(boolean2())
10990
11245
  }),
10991
11246
  z61.transform((v) => {
10992
11247
  return remap(v, {
10993
11248
  "feature_id": "featureId",
10994
- "purchase_limit": "purchaseLimit"
11249
+ "purchase_limit": "purchaseLimit",
11250
+ "invoice_mode": "invoiceMode"
10995
11251
  });
10996
11252
  })
10997
11253
  );
@@ -11024,6 +11280,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z61.pipe(
11024
11280
  });
11025
11281
  })
11026
11282
  );
11283
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z61.pipe(
11284
+ z61.object({
11285
+ feature_id: string4(),
11286
+ enabled: z61._default(boolean2(), false)
11287
+ }),
11288
+ z61.transform((v) => {
11289
+ return remap(v, {
11290
+ "feature_id": "featureId"
11291
+ });
11292
+ })
11293
+ );
11027
11294
  var UpdateCustomerBillingControlsResponse$inboundSchema = z61.pipe(
11028
11295
  z61.object({
11029
11296
  auto_topups: optional2(
@@ -11034,13 +11301,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z61.pipe(
11034
11301
  ),
11035
11302
  usage_alerts: optional2(
11036
11303
  z61.array(z61.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
11304
+ ),
11305
+ overage_allowed: optional2(
11306
+ z61.array(z61.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
11037
11307
  )
11038
11308
  }),
11039
11309
  z61.transform((v) => {
11040
11310
  return remap(v, {
11041
11311
  "auto_topups": "autoTopups",
11042
11312
  "spend_limits": "spendLimits",
11043
- "usage_alerts": "usageAlerts"
11313
+ "usage_alerts": "usageAlerts",
11314
+ "overage_allowed": "overageAllowed"
11044
11315
  });
11045
11316
  })
11046
11317
  );
@@ -11232,6 +11503,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z62.pipe(
11232
11503
  });
11233
11504
  })
11234
11505
  );
11506
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z62.pipe(
11507
+ z62.object({
11508
+ featureId: z62.string(),
11509
+ enabled: z62._default(z62.boolean(), false)
11510
+ }),
11511
+ z62.transform((v) => {
11512
+ return remap(v, {
11513
+ featureId: "feature_id"
11514
+ });
11515
+ })
11516
+ );
11235
11517
  var UpdateEntityBillingControlsRequest$outboundSchema = z62.pipe(
11236
11518
  z62.object({
11237
11519
  spendLimits: z62.optional(
@@ -11239,12 +11521,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z62.pipe(
11239
11521
  ),
11240
11522
  usageAlerts: z62.optional(
11241
11523
  z62.array(z62.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
11524
+ ),
11525
+ overageAllowed: z62.optional(
11526
+ z62.array(z62.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
11242
11527
  )
11243
11528
  }),
11244
11529
  z62.transform((v) => {
11245
11530
  return remap(v, {
11246
11531
  spendLimits: "spend_limits",
11247
- usageAlerts: "usage_alerts"
11532
+ usageAlerts: "usage_alerts",
11533
+ overageAllowed: "overage_allowed"
11248
11534
  });
11249
11535
  })
11250
11536
  );
@@ -11396,6 +11682,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z62.pipe(
11396
11682
  });
11397
11683
  })
11398
11684
  );
11685
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z62.pipe(
11686
+ z62.object({
11687
+ feature_id: string4(),
11688
+ enabled: z62._default(boolean2(), false)
11689
+ }),
11690
+ z62.transform((v) => {
11691
+ return remap(v, {
11692
+ "feature_id": "featureId"
11693
+ });
11694
+ })
11695
+ );
11399
11696
  var UpdateEntityBillingControlsResponse$inboundSchema = z62.pipe(
11400
11697
  z62.object({
11401
11698
  spend_limits: optional2(
@@ -11403,12 +11700,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z62.pipe(
11403
11700
  ),
11404
11701
  usage_alerts: optional2(
11405
11702
  z62.array(z62.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
11703
+ ),
11704
+ overage_allowed: optional2(
11705
+ z62.array(z62.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
11406
11706
  )
11407
11707
  }),
11408
11708
  z62.transform((v) => {
11409
11709
  return remap(v, {
11410
11710
  "spend_limits": "spendLimits",
11411
- "usage_alerts": "usageAlerts"
11711
+ "usage_alerts": "usageAlerts",
11712
+ "overage_allowed": "overageAllowed"
11412
11713
  });
11413
11714
  })
11414
11715
  );
@@ -11761,11 +12062,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z64.enum(UpdatePlanExpi
11761
12062
  var UpdatePlanRolloverRequest$outboundSchema = z64.pipe(
11762
12063
  z64.object({
11763
12064
  max: z64.optional(z64.number()),
12065
+ maxPercentage: z64.optional(z64.number()),
11764
12066
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
11765
12067
  expiryDurationLength: z64.optional(z64.number())
11766
12068
  }),
11767
12069
  z64.transform((v) => {
11768
12070
  return remap(v, {
12071
+ maxPercentage: "max_percentage",
11769
12072
  expiryDurationType: "expiry_duration_type",
11770
12073
  expiryDurationLength: "expiry_duration_length"
11771
12074
  });
@@ -11950,11 +12253,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
11950
12253
  var UpdatePlanRolloverResponse$inboundSchema = z64.pipe(
11951
12254
  z64.object({
11952
12255
  max: nullable(number2()),
12256
+ max_percentage: z64.optional(z64.nullable(number2())),
11953
12257
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
11954
12258
  expiry_duration_length: optional2(number2())
11955
12259
  }),
11956
12260
  z64.transform((v) => {
11957
12261
  return remap(v, {
12262
+ "max_percentage": "maxPercentage",
11958
12263
  "expiry_duration_type": "expiryDurationType",
11959
12264
  "expiry_duration_length": "expiryDurationLength"
11960
12265
  });
@@ -12231,7 +12536,8 @@ async function $do2(client, request, options) {
12231
12536
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
12232
12537
  "check",
12233
12538
  "track",
12234
- "getOrCreateCustomer"
12539
+ "getOrCreateCustomer",
12540
+ "getEntity"
12235
12541
  ]);
12236
12542
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
12237
12543
  var FAIL_OPEN_BODIES = {
@@ -12261,6 +12567,18 @@ var FAIL_OPEN_BODIES = {
12261
12567
  purchases: [],
12262
12568
  balances: {},
12263
12569
  flags: {}
12570
+ },
12571
+ getEntity: {
12572
+ id: null,
12573
+ name: null,
12574
+ customer_id: null,
12575
+ feature_id: null,
12576
+ created_at: 0,
12577
+ env: "live",
12578
+ subscriptions: [],
12579
+ purchases: [],
12580
+ balances: {},
12581
+ flags: {}
12264
12582
  }
12265
12583
  };
12266
12584
  var FailOpenHook = class {