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
@@ -81,8 +81,8 @@ var SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "2.2.0",
83
83
  sdkVersion: "0.10.17",
84
- genVersion: "2.869.25",
85
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
84
+ genVersion: "2.879.1",
85
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
86
86
  };
87
87
 
88
88
  // ../sdk/src/lib/http.ts
@@ -1004,8 +1004,8 @@ function applyBearer(state, spec) {
1004
1004
  state.headers[spec.fieldName] = value;
1005
1005
  }
1006
1006
  }
1007
- function resolveGlobalSecurity(security) {
1008
- return resolveSecurity(
1007
+ function resolveGlobalSecurity(security, allowedFields) {
1008
+ let inputs = [
1009
1009
  [
1010
1010
  {
1011
1011
  fieldName: "Authorization",
@@ -1013,7 +1013,16 @@ function resolveGlobalSecurity(security) {
1013
1013
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
1014
1014
  }
1015
1015
  ]
1016
- );
1016
+ ];
1017
+ if (allowedFields) {
1018
+ inputs = allowedFields.map((i) => {
1019
+ if (i < 0 || i >= inputs.length) {
1020
+ throw new RangeError(`invalid allowedFields index ${i}`);
1021
+ }
1022
+ return inputs[i];
1023
+ });
1024
+ }
1025
+ return resolveSecurity(...inputs);
1017
1026
  }
1018
1027
  async function extractSecurity(sec) {
1019
1028
  if (sec == null) {
@@ -1560,11 +1569,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
1560
1569
  var AttachRollover$outboundSchema = z10.pipe(
1561
1570
  z10.object({
1562
1571
  max: z10.optional(z10.number()),
1572
+ maxPercentage: z10.optional(z10.number()),
1563
1573
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
1564
1574
  expiryDurationLength: z10.optional(z10.number())
1565
1575
  }),
1566
1576
  z10.transform((v) => {
1567
1577
  return remap(v, {
1578
+ maxPercentage: "max_percentage",
1568
1579
  expiryDurationType: "expiry_duration_type",
1569
1580
  expiryDurationLength: "expiry_duration_length"
1570
1581
  });
@@ -2089,11 +2100,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
2089
2100
  var BillingUpdateRollover$outboundSchema = z12.pipe(
2090
2101
  z12.object({
2091
2102
  max: z12.optional(z12.number()),
2103
+ maxPercentage: z12.optional(z12.number()),
2092
2104
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
2093
2105
  expiryDurationLength: z12.optional(z12.number())
2094
2106
  }),
2095
2107
  z12.transform((v) => {
2096
2108
  return remap(v, {
2109
+ maxPercentage: "max_percentage",
2097
2110
  expiryDurationType: "expiry_duration_type",
2098
2111
  expiryDurationLength: "expiry_duration_length"
2099
2112
  });
@@ -2435,11 +2448,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
2435
2448
  })
2436
2449
  );
2437
2450
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
2438
- var CheckRollover$inboundSchema = z13.object({
2439
- max: nullable(number2()),
2440
- duration: z13._default(RolloverDuration$inboundSchema, "month"),
2441
- length: number2()
2442
- });
2451
+ var CheckRollover$inboundSchema = z13.pipe(
2452
+ z13.object({
2453
+ max: z13.optional(z13.nullable(number2())),
2454
+ max_percentage: z13.optional(z13.nullable(number2())),
2455
+ duration: z13._default(RolloverDuration$inboundSchema, "month"),
2456
+ length: number2()
2457
+ }),
2458
+ z13.transform((v) => {
2459
+ return remap(v, {
2460
+ "max_percentage": "maxPercentage"
2461
+ });
2462
+ })
2463
+ );
2443
2464
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2444
2465
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2445
2466
  var Config$inboundSchema = z13.pipe(
@@ -2716,6 +2737,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
2716
2737
  });
2717
2738
  })
2718
2739
  );
2740
+ var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
2741
+ z15.object({
2742
+ featureId: z15.string(),
2743
+ enabled: z15._default(z15.boolean(), false)
2744
+ }),
2745
+ z15.transform((v) => {
2746
+ return remap(v, {
2747
+ featureId: "feature_id"
2748
+ });
2749
+ })
2750
+ );
2719
2751
  var CustomerDataBillingControls$outboundSchema = z15.pipe(
2720
2752
  z15.object({
2721
2753
  autoTopups: z15.optional(
@@ -2726,13 +2758,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
2726
2758
  ),
2727
2759
  usageAlerts: z15.optional(
2728
2760
  z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
2761
+ ),
2762
+ overageAllowed: z15.optional(
2763
+ z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
2729
2764
  )
2730
2765
  }),
2731
2766
  z15.transform((v) => {
2732
2767
  return remap(v, {
2733
2768
  autoTopups: "auto_topups",
2734
2769
  spendLimits: "spend_limits",
2735
- usageAlerts: "usage_alerts"
2770
+ usageAlerts: "usage_alerts",
2771
+ overageAllowed: "overage_allowed"
2736
2772
  });
2737
2773
  })
2738
2774
  );
@@ -2943,11 +2979,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
2943
2979
  var PlanRollover$inboundSchema = z16.pipe(
2944
2980
  z16.object({
2945
2981
  max: nullable(number2()),
2982
+ max_percentage: z16.optional(z16.nullable(number2())),
2946
2983
  expiry_duration_type: ExpiryDurationType$inboundSchema,
2947
2984
  expiry_duration_length: optional2(number2())
2948
2985
  }),
2949
2986
  z16.transform((v) => {
2950
2987
  return remap(v, {
2988
+ "max_percentage": "maxPercentage",
2951
2989
  "expiry_duration_type": "expiryDurationType",
2952
2990
  "expiry_duration_length": "expiryDurationLength"
2953
2991
  });
@@ -3086,6 +3124,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
3086
3124
  });
3087
3125
  })
3088
3126
  );
3127
+ var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
3128
+ z17.object({
3129
+ featureId: z17.string(),
3130
+ enabled: z17._default(z17.boolean(), false)
3131
+ }),
3132
+ z17.transform((v) => {
3133
+ return remap(v, {
3134
+ featureId: "feature_id"
3135
+ });
3136
+ })
3137
+ );
3089
3138
  var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3090
3139
  z17.object({
3091
3140
  spendLimits: z17.optional(
@@ -3093,12 +3142,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3093
3142
  ),
3094
3143
  usageAlerts: z17.optional(
3095
3144
  z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
3145
+ ),
3146
+ overageAllowed: z17.optional(
3147
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
3096
3148
  )
3097
3149
  }),
3098
3150
  z17.transform((v) => {
3099
3151
  return remap(v, {
3100
3152
  spendLimits: "spend_limits",
3101
- usageAlerts: "usage_alerts"
3153
+ usageAlerts: "usage_alerts",
3154
+ overageAllowed: "overage_allowed"
3102
3155
  });
3103
3156
  })
3104
3157
  );
@@ -3255,6 +3308,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
3255
3308
  });
3256
3309
  })
3257
3310
  );
3311
+ var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
3312
+ z17.object({
3313
+ feature_id: string4(),
3314
+ enabled: z17._default(boolean2(), false)
3315
+ }),
3316
+ z17.transform((v) => {
3317
+ return remap(v, {
3318
+ "feature_id": "featureId"
3319
+ });
3320
+ })
3321
+ );
3258
3322
  var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3259
3323
  z17.object({
3260
3324
  spend_limits: optional2(
@@ -3262,12 +3326,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3262
3326
  ),
3263
3327
  usage_alerts: optional2(
3264
3328
  z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
3329
+ ),
3330
+ overage_allowed: optional2(
3331
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
3265
3332
  )
3266
3333
  }),
3267
3334
  z17.transform((v) => {
3268
3335
  return remap(v, {
3269
3336
  "spend_limits": "spendLimits",
3270
- "usage_alerts": "usageAlerts"
3337
+ "usage_alerts": "usageAlerts",
3338
+ "overage_allowed": "overageAllowed"
3271
3339
  });
3272
3340
  })
3273
3341
  );
@@ -3617,11 +3685,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
3617
3685
  var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
3618
3686
  z19.object({
3619
3687
  max: z19.optional(z19.number()),
3688
+ maxPercentage: z19.optional(z19.number()),
3620
3689
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
3621
3690
  expiryDurationLength: z19.optional(z19.number())
3622
3691
  }),
3623
3692
  z19.transform((v) => {
3624
3693
  return remap(v, {
3694
+ maxPercentage: "max_percentage",
3625
3695
  expiryDurationType: "expiry_duration_type",
3626
3696
  expiryDurationLength: "expiry_duration_length"
3627
3697
  });
@@ -3798,11 +3868,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
3798
3868
  var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
3799
3869
  z19.object({
3800
3870
  max: nullable(number2()),
3871
+ max_percentage: z19.optional(z19.nullable(number2())),
3801
3872
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
3802
3873
  expiry_duration_length: optional2(number2())
3803
3874
  }),
3804
3875
  z19.transform((v) => {
3805
3876
  return remap(v, {
3877
+ "max_percentage": "maxPercentage",
3806
3878
  "expiry_duration_type": "expiryDurationType",
3807
3879
  "expiry_duration_length": "expiryDurationLength"
3808
3880
  });
@@ -4024,6 +4096,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
4024
4096
  });
4025
4097
  })
4026
4098
  );
4099
+ var CustomerOverageAllowed$inboundSchema = z21.pipe(
4100
+ z21.object({
4101
+ feature_id: string4(),
4102
+ enabled: z21._default(boolean2(), false)
4103
+ }),
4104
+ z21.transform((v) => {
4105
+ return remap(v, {
4106
+ "feature_id": "featureId"
4107
+ });
4108
+ })
4109
+ );
4027
4110
  var CustomerBillingControls$inboundSchema = z21.pipe(
4028
4111
  z21.object({
4029
4112
  auto_topups: optional2(
@@ -4034,13 +4117,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
4034
4117
  ),
4035
4118
  usage_alerts: optional2(
4036
4119
  z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
4120
+ ),
4121
+ overage_allowed: optional2(
4122
+ z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
4037
4123
  )
4038
4124
  }),
4039
4125
  z21.transform((v) => {
4040
4126
  return remap(v, {
4041
4127
  "auto_topups": "autoTopups",
4042
4128
  "spend_limits": "spendLimits",
4043
- "usage_alerts": "usageAlerts"
4129
+ "usage_alerts": "usageAlerts",
4130
+ "overage_allowed": "overageAllowed"
4044
4131
  });
4045
4132
  })
4046
4133
  );
@@ -4579,6 +4666,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
4579
4666
  });
4580
4667
  })
4581
4668
  );
4669
+ var GetEntityOverageAllowed$inboundSchema = z28.pipe(
4670
+ z28.object({
4671
+ feature_id: string4(),
4672
+ enabled: z28._default(boolean2(), false)
4673
+ }),
4674
+ z28.transform((v) => {
4675
+ return remap(v, {
4676
+ "feature_id": "featureId"
4677
+ });
4678
+ })
4679
+ );
4582
4680
  var GetEntityBillingControls$inboundSchema = z28.pipe(
4583
4681
  z28.object({
4584
4682
  spend_limits: optional2(
@@ -4586,12 +4684,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
4586
4684
  ),
4587
4685
  usage_alerts: optional2(
4588
4686
  z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
4687
+ ),
4688
+ overage_allowed: optional2(
4689
+ z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
4589
4690
  )
4590
4691
  }),
4591
4692
  z28.transform((v) => {
4592
4693
  return remap(v, {
4593
4694
  "spend_limits": "spendLimits",
4594
- "usage_alerts": "usageAlerts"
4695
+ "usage_alerts": "usageAlerts",
4696
+ "overage_allowed": "overageAllowed"
4595
4697
  });
4596
4698
  })
4597
4699
  );
@@ -4769,6 +4871,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
4769
4871
  });
4770
4872
  })
4771
4873
  );
4874
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
4875
+ z30.object({
4876
+ featureId: z30.string(),
4877
+ enabled: z30._default(z30.boolean(), false)
4878
+ }),
4879
+ z30.transform((v) => {
4880
+ return remap(v, {
4881
+ featureId: "feature_id"
4882
+ });
4883
+ })
4884
+ );
4772
4885
  var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4773
4886
  z30.object({
4774
4887
  autoTopups: z30.optional(
@@ -4779,13 +4892,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4779
4892
  ),
4780
4893
  usageAlerts: z30.optional(
4781
4894
  z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
4895
+ ),
4896
+ overageAllowed: z30.optional(
4897
+ z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
4782
4898
  )
4783
4899
  }),
4784
4900
  z30.transform((v) => {
4785
4901
  return remap(v, {
4786
4902
  autoTopups: "auto_topups",
4787
4903
  spendLimits: "spend_limits",
4788
- usageAlerts: "usage_alerts"
4904
+ usageAlerts: "usage_alerts",
4905
+ overageAllowed: "overage_allowed"
4789
4906
  });
4790
4907
  })
4791
4908
  );
@@ -5010,11 +5127,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
5010
5127
  var GetPlanRollover$inboundSchema = z31.pipe(
5011
5128
  z31.object({
5012
5129
  max: nullable(number2()),
5130
+ max_percentage: z31.optional(z31.nullable(number2())),
5013
5131
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
5014
5132
  expiry_duration_length: optional2(number2())
5015
5133
  }),
5016
5134
  z31.transform((v) => {
5017
5135
  return remap(v, {
5136
+ "max_percentage": "maxPercentage",
5018
5137
  "expiry_duration_type": "expiryDurationType",
5019
5138
  "expiry_duration_length": "expiryDurationLength"
5020
5139
  });
@@ -5242,6 +5361,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
5242
5361
  });
5243
5362
  })
5244
5363
  );
5364
+ var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
5365
+ z32.object({
5366
+ feature_id: string4(),
5367
+ enabled: z32._default(boolean2(), false)
5368
+ }),
5369
+ z32.transform((v) => {
5370
+ return remap(v, {
5371
+ "feature_id": "featureId"
5372
+ });
5373
+ })
5374
+ );
5245
5375
  var ListCustomersBillingControls$inboundSchema = z32.pipe(
5246
5376
  z32.object({
5247
5377
  auto_topups: optional2(
@@ -5252,13 +5382,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
5252
5382
  ),
5253
5383
  usage_alerts: optional2(
5254
5384
  z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
5385
+ ),
5386
+ overage_allowed: optional2(
5387
+ z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
5255
5388
  )
5256
5389
  }),
5257
5390
  z32.transform((v) => {
5258
5391
  return remap(v, {
5259
5392
  "auto_topups": "autoTopups",
5260
5393
  "spend_limits": "spendLimits",
5261
- "usage_alerts": "usageAlerts"
5394
+ "usage_alerts": "usageAlerts",
5395
+ "overage_allowed": "overageAllowed"
5262
5396
  });
5263
5397
  })
5264
5398
  );
@@ -5713,11 +5847,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
5713
5847
  var ListPlansRollover$inboundSchema = z35.pipe(
5714
5848
  z35.object({
5715
5849
  max: nullable(number2()),
5850
+ max_percentage: z35.optional(z35.nullable(number2())),
5716
5851
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
5717
5852
  expiry_duration_length: optional2(number2())
5718
5853
  }),
5719
5854
  z35.transform((v) => {
5720
5855
  return remap(v, {
5856
+ "max_percentage": "maxPercentage",
5721
5857
  "expiry_duration_type": "expiryDurationType",
5722
5858
  "expiry_duration_length": "expiryDurationLength"
5723
5859
  });
@@ -5961,11 +6097,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
5961
6097
  var MultiAttachRollover$outboundSchema = z36.pipe(
5962
6098
  z36.object({
5963
6099
  max: z36.optional(z36.number()),
6100
+ maxPercentage: z36.optional(z36.number()),
5964
6101
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
5965
6102
  expiryDurationLength: z36.optional(z36.number())
5966
6103
  }),
5967
6104
  z36.transform((v) => {
5968
6105
  return remap(v, {
6106
+ maxPercentage: "max_percentage",
5969
6107
  expiryDurationType: "expiry_duration_type",
5970
6108
  expiryDurationLength: "expiry_duration_length"
5971
6109
  });
@@ -6092,6 +6230,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
6092
6230
  });
6093
6231
  })
6094
6232
  );
6233
+ var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
6234
+ z36.object({
6235
+ featureId: z36.string(),
6236
+ enabled: z36._default(z36.boolean(), false)
6237
+ }),
6238
+ z36.transform((v) => {
6239
+ return remap(v, {
6240
+ featureId: "feature_id"
6241
+ });
6242
+ })
6243
+ );
6095
6244
  var MultiAttachBillingControls$outboundSchema = z36.pipe(
6096
6245
  z36.object({
6097
6246
  spendLimits: z36.optional(
@@ -6099,12 +6248,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
6099
6248
  ),
6100
6249
  usageAlerts: z36.optional(
6101
6250
  z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
6251
+ ),
6252
+ overageAllowed: z36.optional(
6253
+ z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
6102
6254
  )
6103
6255
  }),
6104
6256
  z36.transform((v) => {
6105
6257
  return remap(v, {
6106
6258
  spendLimits: "spend_limits",
6107
- usageAlerts: "usage_alerts"
6259
+ usageAlerts: "usage_alerts",
6260
+ overageAllowed: "overage_allowed"
6108
6261
  });
6109
6262
  })
6110
6263
  );
@@ -6398,11 +6551,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
6398
6551
  var PreviewAttachRollover$outboundSchema = z38.pipe(
6399
6552
  z38.object({
6400
6553
  max: z38.optional(z38.number()),
6554
+ maxPercentage: z38.optional(z38.number()),
6401
6555
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
6402
6556
  expiryDurationLength: z38.optional(z38.number())
6403
6557
  }),
6404
6558
  z38.transform((v) => {
6405
6559
  return remap(v, {
6560
+ maxPercentage: "max_percentage",
6406
6561
  expiryDurationType: "expiry_duration_type",
6407
6562
  expiryDurationLength: "expiry_duration_length"
6408
6563
  });
@@ -6946,11 +7101,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
6946
7101
  var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
6947
7102
  z39.object({
6948
7103
  max: z39.optional(z39.number()),
7104
+ maxPercentage: z39.optional(z39.number()),
6949
7105
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
6950
7106
  expiryDurationLength: z39.optional(z39.number())
6951
7107
  }),
6952
7108
  z39.transform((v) => {
6953
7109
  return remap(v, {
7110
+ maxPercentage: "max_percentage",
6954
7111
  expiryDurationType: "expiry_duration_type",
6955
7112
  expiryDurationLength: "expiry_duration_length"
6956
7113
  });
@@ -7090,6 +7247,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
7090
7247
  });
7091
7248
  })
7092
7249
  );
7250
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
7251
+ z39.object({
7252
+ featureId: z39.string(),
7253
+ enabled: z39._default(z39.boolean(), false)
7254
+ }),
7255
+ z39.transform((v) => {
7256
+ return remap(v, {
7257
+ featureId: "feature_id"
7258
+ });
7259
+ })
7260
+ );
7093
7261
  var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7094
7262
  z39.object({
7095
7263
  spendLimits: z39.optional(
@@ -7097,12 +7265,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7097
7265
  ),
7098
7266
  usageAlerts: z39.optional(
7099
7267
  z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
7268
+ ),
7269
+ overageAllowed: z39.optional(
7270
+ z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
7100
7271
  )
7101
7272
  }),
7102
7273
  z39.transform((v) => {
7103
7274
  return remap(v, {
7104
7275
  spendLimits: "spend_limits",
7105
- usageAlerts: "usage_alerts"
7276
+ usageAlerts: "usage_alerts",
7277
+ overageAllowed: "overage_allowed"
7106
7278
  });
7107
7279
  })
7108
7280
  );
@@ -7558,11 +7730,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
7558
7730
  var PreviewUpdateRollover$outboundSchema = z40.pipe(
7559
7731
  z40.object({
7560
7732
  max: z40.optional(z40.number()),
7733
+ maxPercentage: z40.optional(z40.number()),
7561
7734
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
7562
7735
  expiryDurationLength: z40.optional(z40.number())
7563
7736
  }),
7564
7737
  z40.transform((v) => {
7565
7738
  return remap(v, {
7739
+ maxPercentage: "max_percentage",
7566
7740
  expiryDurationType: "expiry_duration_type",
7567
7741
  expiryDurationLength: "expiry_duration_length"
7568
7742
  });
@@ -8078,11 +8252,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
8078
8252
  var SetupPaymentRollover$outboundSchema = z42.pipe(
8079
8253
  z42.object({
8080
8254
  max: z42.optional(z42.number()),
8255
+ maxPercentage: z42.optional(z42.number()),
8081
8256
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
8082
8257
  expiryDurationLength: z42.optional(z42.number())
8083
8258
  }),
8084
8259
  z42.transform((v) => {
8085
8260
  return remap(v, {
8261
+ maxPercentage: "max_percentage",
8086
8262
  expiryDurationType: "expiry_duration_type",
8087
8263
  expiryDurationLength: "expiry_duration_length"
8088
8264
  });
@@ -8427,6 +8603,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
8427
8603
  });
8428
8604
  })
8429
8605
  );
8606
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
8607
+ z45.object({
8608
+ featureId: z45.string(),
8609
+ enabled: z45._default(z45.boolean(), false)
8610
+ }),
8611
+ z45.transform((v) => {
8612
+ return remap(v, {
8613
+ featureId: "feature_id"
8614
+ });
8615
+ })
8616
+ );
8430
8617
  var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8431
8618
  z45.object({
8432
8619
  autoTopups: z45.optional(
@@ -8437,13 +8624,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8437
8624
  ),
8438
8625
  usageAlerts: z45.optional(
8439
8626
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
8627
+ ),
8628
+ overageAllowed: z45.optional(
8629
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
8440
8630
  )
8441
8631
  }),
8442
8632
  z45.transform((v) => {
8443
8633
  return remap(v, {
8444
8634
  autoTopups: "auto_topups",
8445
8635
  spendLimits: "spend_limits",
8446
- usageAlerts: "usage_alerts"
8636
+ usageAlerts: "usage_alerts",
8637
+ overageAllowed: "overage_allowed"
8447
8638
  });
8448
8639
  })
8449
8640
  );
@@ -8531,6 +8722,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
8531
8722
  });
8532
8723
  })
8533
8724
  );
8725
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
8726
+ z45.object({
8727
+ feature_id: string4(),
8728
+ enabled: z45._default(boolean2(), false)
8729
+ }),
8730
+ z45.transform((v) => {
8731
+ return remap(v, {
8732
+ "feature_id": "featureId"
8733
+ });
8734
+ })
8735
+ );
8534
8736
  var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8535
8737
  z45.object({
8536
8738
  auto_topups: optional2(
@@ -8541,13 +8743,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8541
8743
  ),
8542
8744
  usage_alerts: optional2(
8543
8745
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
8746
+ ),
8747
+ overage_allowed: optional2(
8748
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
8544
8749
  )
8545
8750
  }),
8546
8751
  z45.transform((v) => {
8547
8752
  return remap(v, {
8548
8753
  "auto_topups": "autoTopups",
8549
8754
  "spend_limits": "spendLimits",
8550
- "usage_alerts": "usageAlerts"
8755
+ "usage_alerts": "usageAlerts",
8756
+ "overage_allowed": "overageAllowed"
8551
8757
  });
8552
8758
  })
8553
8759
  );
@@ -8739,6 +8945,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
8739
8945
  });
8740
8946
  })
8741
8947
  );
8948
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
8949
+ z46.object({
8950
+ featureId: z46.string(),
8951
+ enabled: z46._default(z46.boolean(), false)
8952
+ }),
8953
+ z46.transform((v) => {
8954
+ return remap(v, {
8955
+ featureId: "feature_id"
8956
+ });
8957
+ })
8958
+ );
8742
8959
  var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8743
8960
  z46.object({
8744
8961
  spendLimits: z46.optional(
@@ -8746,12 +8963,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8746
8963
  ),
8747
8964
  usageAlerts: z46.optional(
8748
8965
  z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
8966
+ ),
8967
+ overageAllowed: z46.optional(
8968
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
8749
8969
  )
8750
8970
  }),
8751
8971
  z46.transform((v) => {
8752
8972
  return remap(v, {
8753
8973
  spendLimits: "spend_limits",
8754
- usageAlerts: "usage_alerts"
8974
+ usageAlerts: "usage_alerts",
8975
+ overageAllowed: "overage_allowed"
8755
8976
  });
8756
8977
  })
8757
8978
  );
@@ -8903,6 +9124,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
8903
9124
  });
8904
9125
  })
8905
9126
  );
9127
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
9128
+ z46.object({
9129
+ feature_id: string4(),
9130
+ enabled: z46._default(boolean2(), false)
9131
+ }),
9132
+ z46.transform((v) => {
9133
+ return remap(v, {
9134
+ "feature_id": "featureId"
9135
+ });
9136
+ })
9137
+ );
8906
9138
  var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8907
9139
  z46.object({
8908
9140
  spend_limits: optional2(
@@ -8910,12 +9142,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8910
9142
  ),
8911
9143
  usage_alerts: optional2(
8912
9144
  z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
9145
+ ),
9146
+ overage_allowed: optional2(
9147
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
8913
9148
  )
8914
9149
  }),
8915
9150
  z46.transform((v) => {
8916
9151
  return remap(v, {
8917
9152
  "spend_limits": "spendLimits",
8918
- "usage_alerts": "usageAlerts"
9153
+ "usage_alerts": "usageAlerts",
9154
+ "overage_allowed": "overageAllowed"
8919
9155
  });
8920
9156
  })
8921
9157
  );
@@ -9268,11 +9504,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
9268
9504
  var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
9269
9505
  z48.object({
9270
9506
  max: z48.optional(z48.number()),
9507
+ maxPercentage: z48.optional(z48.number()),
9271
9508
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
9272
9509
  expiryDurationLength: z48.optional(z48.number())
9273
9510
  }),
9274
9511
  z48.transform((v) => {
9275
9512
  return remap(v, {
9513
+ maxPercentage: "max_percentage",
9276
9514
  expiryDurationType: "expiry_duration_type",
9277
9515
  expiryDurationLength: "expiry_duration_length"
9278
9516
  });
@@ -9457,11 +9695,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
9457
9695
  var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
9458
9696
  z48.object({
9459
9697
  max: nullable(number2()),
9698
+ max_percentage: z48.optional(z48.nullable(number2())),
9460
9699
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
9461
9700
  expiry_duration_length: optional2(number2())
9462
9701
  }),
9463
9702
  z48.transform((v) => {
9464
9703
  return remap(v, {
9704
+ "max_percentage": "maxPercentage",
9465
9705
  "expiry_duration_type": "expiryDurationType",
9466
9706
  "expiry_duration_length": "expiryDurationLength"
9467
9707
  });
@@ -9738,7 +9978,8 @@ async function $do2(client, request, options) {
9738
9978
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
9739
9979
  "check",
9740
9980
  "track",
9741
- "getOrCreateCustomer"
9981
+ "getOrCreateCustomer",
9982
+ "getEntity"
9742
9983
  ]);
9743
9984
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
9744
9985
  var FAIL_OPEN_BODIES = {
@@ -9768,6 +10009,18 @@ var FAIL_OPEN_BODIES = {
9768
10009
  purchases: [],
9769
10010
  balances: {},
9770
10011
  flags: {}
10012
+ },
10013
+ getEntity: {
10014
+ id: null,
10015
+ name: null,
10016
+ customer_id: null,
10017
+ feature_id: null,
10018
+ created_at: 0,
10019
+ env: "live",
10020
+ subscriptions: [],
10021
+ purchases: [],
10022
+ balances: {},
10023
+ flags: {}
9771
10024
  }
9772
10025
  };
9773
10026
  var FailOpenHook = class {
@@ -14143,6 +14396,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14143
14396
  });
14144
14397
  var attachRolloverOutboundSchema = import_v42.z.object({
14145
14398
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14399
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14146
14400
  expiry_duration_type: import_v42.z.string(),
14147
14401
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14148
14402
  });
@@ -14243,6 +14497,7 @@ var attachProrationSchema = import_v42.z.object({
14243
14497
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14244
14498
  var attachRolloverSchema = import_v42.z.object({
14245
14499
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14500
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14246
14501
  expiryDurationType: attachExpiryDurationTypeSchema,
14247
14502
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14248
14503
  });
@@ -14333,6 +14588,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14333
14588
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14334
14589
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14335
14590
  });
14591
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
14592
+ featureId: import_v44.z.string(),
14593
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
14594
+ });
14336
14595
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14337
14596
  interval: import_v44.z.string(),
14338
14597
  interval_count: import_v44.z.number(),
@@ -14357,6 +14616,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14357
14616
  threshold_type: import_v44.z.string(),
14358
14617
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14359
14618
  });
14619
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14620
+ feature_id: import_v44.z.string(),
14621
+ enabled: import_v44.z.boolean()
14622
+ });
14360
14623
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14361
14624
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14362
14625
  spend_limits: import_v44.z.union([
@@ -14366,6 +14629,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14366
14629
  usage_alerts: import_v44.z.union([
14367
14630
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14368
14631
  import_v44.z.undefined()
14632
+ ]).optional(),
14633
+ overage_allowed: import_v44.z.union([
14634
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
14635
+ import_v44.z.undefined()
14369
14636
  ]).optional()
14370
14637
  });
14371
14638
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14406,7 +14673,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14406
14673
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14407
14674
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14408
14675
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14409
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
14676
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
14677
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
14410
14678
  });
14411
14679
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14412
14680
  customerId: import_v44.z.string().nullable(),
@@ -14545,6 +14813,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14545
14813
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14546
14814
  var listPlansRolloverSchema = import_v46.z.object({
14547
14815
  max: import_v46.z.number().nullable(),
14816
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14548
14817
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14549
14818
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14550
14819
  });
@@ -14625,6 +14894,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14625
14894
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14626
14895
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14627
14896
  });
14897
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
14898
+ featureId: import_v47.z.string(),
14899
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
14900
+ });
14628
14901
  var multiAttachInvoiceSchema = import_v47.z.object({
14629
14902
  status: import_v47.z.string().nullable(),
14630
14903
  stripeId: import_v47.z.string(),
@@ -14663,6 +14936,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14663
14936
  });
14664
14937
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14665
14938
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14939
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14666
14940
  expiry_duration_type: import_v47.z.string(),
14667
14941
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14668
14942
  });
@@ -14717,9 +14991,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14717
14991
  threshold_type: import_v47.z.string(),
14718
14992
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14719
14993
  });
14994
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
14995
+ feature_id: import_v47.z.string(),
14996
+ enabled: import_v47.z.boolean()
14997
+ });
14720
14998
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14721
14999
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14722
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
15000
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
15001
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
14723
15002
  });
14724
15003
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14725
15004
  feature_id: import_v47.z.string(),
@@ -14763,6 +15042,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14763
15042
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14764
15043
  var multiAttachRolloverSchema = import_v47.z.object({
14765
15044
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
15045
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14766
15046
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14767
15047
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14768
15048
  });
@@ -14803,7 +15083,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14803
15083
  });
14804
15084
  var multiAttachBillingControlsSchema = import_v47.z.object({
14805
15085
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14806
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
15086
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
15087
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
14807
15088
  });
14808
15089
  var multiAttachEntityDataSchema = import_v47.z.object({
14809
15090
  featureId: import_v47.z.string(),
@@ -15011,6 +15292,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
15011
15292
  });
15012
15293
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
15013
15294
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15295
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15014
15296
  expiry_duration_type: import_v49.z.string(),
15015
15297
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15016
15298
  });
@@ -15115,6 +15397,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15115
15397
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15116
15398
  var previewAttachRolloverSchema = import_v49.z.object({
15117
15399
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15400
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15118
15401
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15119
15402
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15120
15403
  });
@@ -15224,6 +15507,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15224
15507
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15225
15508
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15226
15509
  });
15510
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
15511
+ featureId: import_v410.z.string(),
15512
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
15513
+ });
15227
15514
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15228
15515
  amountOff: import_v410.z.number(),
15229
15516
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15325,6 +15612,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15325
15612
  });
15326
15613
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15327
15614
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15615
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15328
15616
  expiry_duration_type: import_v410.z.string(),
15329
15617
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15330
15618
  });
@@ -15382,9 +15670,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15382
15670
  threshold_type: import_v410.z.string(),
15383
15671
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15384
15672
  });
15673
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15674
+ feature_id: import_v410.z.string(),
15675
+ enabled: import_v410.z.boolean()
15676
+ });
15385
15677
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15386
15678
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15387
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
15679
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
15680
+ overage_allowed: import_v410.z.union([
15681
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
15682
+ import_v410.z.undefined()
15683
+ ]).optional()
15388
15684
  });
15389
15685
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15390
15686
  feature_id: import_v410.z.string(),
@@ -15429,6 +15725,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15429
15725
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15430
15726
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15431
15727
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15728
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15432
15729
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15433
15730
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15434
15731
  });
@@ -15472,7 +15769,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15472
15769
  });
15473
15770
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15474
15771
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15475
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
15772
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
15773
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
15476
15774
  });
15477
15775
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15478
15776
  featureId: import_v410.z.string(),
@@ -15668,6 +15966,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15668
15966
  });
15669
15967
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15670
15968
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15969
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15671
15970
  expiry_duration_type: import_v411.z.string(),
15672
15971
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15673
15972
  });
@@ -15752,6 +16051,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15752
16051
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15753
16052
  var previewUpdateRolloverSchema = import_v411.z.object({
15754
16053
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
16054
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15755
16055
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15756
16056
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15757
16057
  });
@@ -15915,6 +16215,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15915
16215
  });
15916
16216
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15917
16217
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16218
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15918
16219
  expiry_duration_type: import_v413.z.string(),
15919
16220
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15920
16221
  });
@@ -16005,6 +16306,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
16005
16306
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
16006
16307
  var setupPaymentRolloverSchema = import_v413.z.object({
16007
16308
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16309
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16008
16310
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
16009
16311
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
16010
16312
  });
@@ -16115,6 +16417,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16115
16417
  });
16116
16418
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16117
16419
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16420
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16118
16421
  expiry_duration_type: import_v414.z.string(),
16119
16422
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16120
16423
  });
@@ -16195,6 +16498,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16195
16498
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16196
16499
  var billingUpdateRolloverSchema = import_v414.z.object({
16197
16500
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16501
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16198
16502
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16199
16503
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16200
16504
  });