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
@@ -79,8 +79,8 @@ var SDK_METADATA = {
79
79
  language: "typescript",
80
80
  openapiDocVersion: "2.2.0",
81
81
  sdkVersion: "0.10.17",
82
- genVersion: "2.869.25",
83
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
82
+ genVersion: "2.879.1",
83
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
84
84
  };
85
85
 
86
86
  // ../sdk/src/lib/http.ts
@@ -1002,8 +1002,8 @@ function applyBearer(state, spec) {
1002
1002
  state.headers[spec.fieldName] = value;
1003
1003
  }
1004
1004
  }
1005
- function resolveGlobalSecurity(security) {
1006
- return resolveSecurity(
1005
+ function resolveGlobalSecurity(security, allowedFields) {
1006
+ let inputs = [
1007
1007
  [
1008
1008
  {
1009
1009
  fieldName: "Authorization",
@@ -1011,7 +1011,16 @@ function resolveGlobalSecurity(security) {
1011
1011
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
1012
1012
  }
1013
1013
  ]
1014
- );
1014
+ ];
1015
+ if (allowedFields) {
1016
+ inputs = allowedFields.map((i) => {
1017
+ if (i < 0 || i >= inputs.length) {
1018
+ throw new RangeError(`invalid allowedFields index ${i}`);
1019
+ }
1020
+ return inputs[i];
1021
+ });
1022
+ }
1023
+ return resolveSecurity(...inputs);
1015
1024
  }
1016
1025
  async function extractSecurity(sec) {
1017
1026
  if (sec == null) {
@@ -1558,11 +1567,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
1558
1567
  var AttachRollover$outboundSchema = z10.pipe(
1559
1568
  z10.object({
1560
1569
  max: z10.optional(z10.number()),
1570
+ maxPercentage: z10.optional(z10.number()),
1561
1571
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
1562
1572
  expiryDurationLength: z10.optional(z10.number())
1563
1573
  }),
1564
1574
  z10.transform((v) => {
1565
1575
  return remap(v, {
1576
+ maxPercentage: "max_percentage",
1566
1577
  expiryDurationType: "expiry_duration_type",
1567
1578
  expiryDurationLength: "expiry_duration_length"
1568
1579
  });
@@ -2087,11 +2098,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
2087
2098
  var BillingUpdateRollover$outboundSchema = z12.pipe(
2088
2099
  z12.object({
2089
2100
  max: z12.optional(z12.number()),
2101
+ maxPercentage: z12.optional(z12.number()),
2090
2102
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
2091
2103
  expiryDurationLength: z12.optional(z12.number())
2092
2104
  }),
2093
2105
  z12.transform((v) => {
2094
2106
  return remap(v, {
2107
+ maxPercentage: "max_percentage",
2095
2108
  expiryDurationType: "expiry_duration_type",
2096
2109
  expiryDurationLength: "expiry_duration_length"
2097
2110
  });
@@ -2433,11 +2446,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
2433
2446
  })
2434
2447
  );
2435
2448
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
2436
- var CheckRollover$inboundSchema = z13.object({
2437
- max: nullable(number2()),
2438
- duration: z13._default(RolloverDuration$inboundSchema, "month"),
2439
- length: number2()
2440
- });
2449
+ var CheckRollover$inboundSchema = z13.pipe(
2450
+ z13.object({
2451
+ max: z13.optional(z13.nullable(number2())),
2452
+ max_percentage: z13.optional(z13.nullable(number2())),
2453
+ duration: z13._default(RolloverDuration$inboundSchema, "month"),
2454
+ length: number2()
2455
+ }),
2456
+ z13.transform((v) => {
2457
+ return remap(v, {
2458
+ "max_percentage": "maxPercentage"
2459
+ });
2460
+ })
2461
+ );
2441
2462
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2442
2463
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2443
2464
  var Config$inboundSchema = z13.pipe(
@@ -2714,6 +2735,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
2714
2735
  });
2715
2736
  })
2716
2737
  );
2738
+ var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
2739
+ z15.object({
2740
+ featureId: z15.string(),
2741
+ enabled: z15._default(z15.boolean(), false)
2742
+ }),
2743
+ z15.transform((v) => {
2744
+ return remap(v, {
2745
+ featureId: "feature_id"
2746
+ });
2747
+ })
2748
+ );
2717
2749
  var CustomerDataBillingControls$outboundSchema = z15.pipe(
2718
2750
  z15.object({
2719
2751
  autoTopups: z15.optional(
@@ -2724,13 +2756,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
2724
2756
  ),
2725
2757
  usageAlerts: z15.optional(
2726
2758
  z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
2759
+ ),
2760
+ overageAllowed: z15.optional(
2761
+ z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
2727
2762
  )
2728
2763
  }),
2729
2764
  z15.transform((v) => {
2730
2765
  return remap(v, {
2731
2766
  autoTopups: "auto_topups",
2732
2767
  spendLimits: "spend_limits",
2733
- usageAlerts: "usage_alerts"
2768
+ usageAlerts: "usage_alerts",
2769
+ overageAllowed: "overage_allowed"
2734
2770
  });
2735
2771
  })
2736
2772
  );
@@ -2941,11 +2977,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
2941
2977
  var PlanRollover$inboundSchema = z16.pipe(
2942
2978
  z16.object({
2943
2979
  max: nullable(number2()),
2980
+ max_percentage: z16.optional(z16.nullable(number2())),
2944
2981
  expiry_duration_type: ExpiryDurationType$inboundSchema,
2945
2982
  expiry_duration_length: optional2(number2())
2946
2983
  }),
2947
2984
  z16.transform((v) => {
2948
2985
  return remap(v, {
2986
+ "max_percentage": "maxPercentage",
2949
2987
  "expiry_duration_type": "expiryDurationType",
2950
2988
  "expiry_duration_length": "expiryDurationLength"
2951
2989
  });
@@ -3084,6 +3122,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
3084
3122
  });
3085
3123
  })
3086
3124
  );
3125
+ var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
3126
+ z17.object({
3127
+ featureId: z17.string(),
3128
+ enabled: z17._default(z17.boolean(), false)
3129
+ }),
3130
+ z17.transform((v) => {
3131
+ return remap(v, {
3132
+ featureId: "feature_id"
3133
+ });
3134
+ })
3135
+ );
3087
3136
  var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3088
3137
  z17.object({
3089
3138
  spendLimits: z17.optional(
@@ -3091,12 +3140,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3091
3140
  ),
3092
3141
  usageAlerts: z17.optional(
3093
3142
  z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
3143
+ ),
3144
+ overageAllowed: z17.optional(
3145
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
3094
3146
  )
3095
3147
  }),
3096
3148
  z17.transform((v) => {
3097
3149
  return remap(v, {
3098
3150
  spendLimits: "spend_limits",
3099
- usageAlerts: "usage_alerts"
3151
+ usageAlerts: "usage_alerts",
3152
+ overageAllowed: "overage_allowed"
3100
3153
  });
3101
3154
  })
3102
3155
  );
@@ -3253,6 +3306,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
3253
3306
  });
3254
3307
  })
3255
3308
  );
3309
+ var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
3310
+ z17.object({
3311
+ feature_id: string4(),
3312
+ enabled: z17._default(boolean2(), false)
3313
+ }),
3314
+ z17.transform((v) => {
3315
+ return remap(v, {
3316
+ "feature_id": "featureId"
3317
+ });
3318
+ })
3319
+ );
3256
3320
  var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3257
3321
  z17.object({
3258
3322
  spend_limits: optional2(
@@ -3260,12 +3324,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3260
3324
  ),
3261
3325
  usage_alerts: optional2(
3262
3326
  z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
3327
+ ),
3328
+ overage_allowed: optional2(
3329
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
3263
3330
  )
3264
3331
  }),
3265
3332
  z17.transform((v) => {
3266
3333
  return remap(v, {
3267
3334
  "spend_limits": "spendLimits",
3268
- "usage_alerts": "usageAlerts"
3335
+ "usage_alerts": "usageAlerts",
3336
+ "overage_allowed": "overageAllowed"
3269
3337
  });
3270
3338
  })
3271
3339
  );
@@ -3615,11 +3683,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
3615
3683
  var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
3616
3684
  z19.object({
3617
3685
  max: z19.optional(z19.number()),
3686
+ maxPercentage: z19.optional(z19.number()),
3618
3687
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
3619
3688
  expiryDurationLength: z19.optional(z19.number())
3620
3689
  }),
3621
3690
  z19.transform((v) => {
3622
3691
  return remap(v, {
3692
+ maxPercentage: "max_percentage",
3623
3693
  expiryDurationType: "expiry_duration_type",
3624
3694
  expiryDurationLength: "expiry_duration_length"
3625
3695
  });
@@ -3796,11 +3866,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
3796
3866
  var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
3797
3867
  z19.object({
3798
3868
  max: nullable(number2()),
3869
+ max_percentage: z19.optional(z19.nullable(number2())),
3799
3870
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
3800
3871
  expiry_duration_length: optional2(number2())
3801
3872
  }),
3802
3873
  z19.transform((v) => {
3803
3874
  return remap(v, {
3875
+ "max_percentage": "maxPercentage",
3804
3876
  "expiry_duration_type": "expiryDurationType",
3805
3877
  "expiry_duration_length": "expiryDurationLength"
3806
3878
  });
@@ -4022,6 +4094,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
4022
4094
  });
4023
4095
  })
4024
4096
  );
4097
+ var CustomerOverageAllowed$inboundSchema = z21.pipe(
4098
+ z21.object({
4099
+ feature_id: string4(),
4100
+ enabled: z21._default(boolean2(), false)
4101
+ }),
4102
+ z21.transform((v) => {
4103
+ return remap(v, {
4104
+ "feature_id": "featureId"
4105
+ });
4106
+ })
4107
+ );
4025
4108
  var CustomerBillingControls$inboundSchema = z21.pipe(
4026
4109
  z21.object({
4027
4110
  auto_topups: optional2(
@@ -4032,13 +4115,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
4032
4115
  ),
4033
4116
  usage_alerts: optional2(
4034
4117
  z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
4118
+ ),
4119
+ overage_allowed: optional2(
4120
+ z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
4035
4121
  )
4036
4122
  }),
4037
4123
  z21.transform((v) => {
4038
4124
  return remap(v, {
4039
4125
  "auto_topups": "autoTopups",
4040
4126
  "spend_limits": "spendLimits",
4041
- "usage_alerts": "usageAlerts"
4127
+ "usage_alerts": "usageAlerts",
4128
+ "overage_allowed": "overageAllowed"
4042
4129
  });
4043
4130
  })
4044
4131
  );
@@ -4577,6 +4664,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
4577
4664
  });
4578
4665
  })
4579
4666
  );
4667
+ var GetEntityOverageAllowed$inboundSchema = z28.pipe(
4668
+ z28.object({
4669
+ feature_id: string4(),
4670
+ enabled: z28._default(boolean2(), false)
4671
+ }),
4672
+ z28.transform((v) => {
4673
+ return remap(v, {
4674
+ "feature_id": "featureId"
4675
+ });
4676
+ })
4677
+ );
4580
4678
  var GetEntityBillingControls$inboundSchema = z28.pipe(
4581
4679
  z28.object({
4582
4680
  spend_limits: optional2(
@@ -4584,12 +4682,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
4584
4682
  ),
4585
4683
  usage_alerts: optional2(
4586
4684
  z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
4685
+ ),
4686
+ overage_allowed: optional2(
4687
+ z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
4587
4688
  )
4588
4689
  }),
4589
4690
  z28.transform((v) => {
4590
4691
  return remap(v, {
4591
4692
  "spend_limits": "spendLimits",
4592
- "usage_alerts": "usageAlerts"
4693
+ "usage_alerts": "usageAlerts",
4694
+ "overage_allowed": "overageAllowed"
4593
4695
  });
4594
4696
  })
4595
4697
  );
@@ -4767,6 +4869,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
4767
4869
  });
4768
4870
  })
4769
4871
  );
4872
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
4873
+ z30.object({
4874
+ featureId: z30.string(),
4875
+ enabled: z30._default(z30.boolean(), false)
4876
+ }),
4877
+ z30.transform((v) => {
4878
+ return remap(v, {
4879
+ featureId: "feature_id"
4880
+ });
4881
+ })
4882
+ );
4770
4883
  var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4771
4884
  z30.object({
4772
4885
  autoTopups: z30.optional(
@@ -4777,13 +4890,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4777
4890
  ),
4778
4891
  usageAlerts: z30.optional(
4779
4892
  z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
4893
+ ),
4894
+ overageAllowed: z30.optional(
4895
+ z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
4780
4896
  )
4781
4897
  }),
4782
4898
  z30.transform((v) => {
4783
4899
  return remap(v, {
4784
4900
  autoTopups: "auto_topups",
4785
4901
  spendLimits: "spend_limits",
4786
- usageAlerts: "usage_alerts"
4902
+ usageAlerts: "usage_alerts",
4903
+ overageAllowed: "overage_allowed"
4787
4904
  });
4788
4905
  })
4789
4906
  );
@@ -5008,11 +5125,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
5008
5125
  var GetPlanRollover$inboundSchema = z31.pipe(
5009
5126
  z31.object({
5010
5127
  max: nullable(number2()),
5128
+ max_percentage: z31.optional(z31.nullable(number2())),
5011
5129
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
5012
5130
  expiry_duration_length: optional2(number2())
5013
5131
  }),
5014
5132
  z31.transform((v) => {
5015
5133
  return remap(v, {
5134
+ "max_percentage": "maxPercentage",
5016
5135
  "expiry_duration_type": "expiryDurationType",
5017
5136
  "expiry_duration_length": "expiryDurationLength"
5018
5137
  });
@@ -5240,6 +5359,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
5240
5359
  });
5241
5360
  })
5242
5361
  );
5362
+ var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
5363
+ z32.object({
5364
+ feature_id: string4(),
5365
+ enabled: z32._default(boolean2(), false)
5366
+ }),
5367
+ z32.transform((v) => {
5368
+ return remap(v, {
5369
+ "feature_id": "featureId"
5370
+ });
5371
+ })
5372
+ );
5243
5373
  var ListCustomersBillingControls$inboundSchema = z32.pipe(
5244
5374
  z32.object({
5245
5375
  auto_topups: optional2(
@@ -5250,13 +5380,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
5250
5380
  ),
5251
5381
  usage_alerts: optional2(
5252
5382
  z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
5383
+ ),
5384
+ overage_allowed: optional2(
5385
+ z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
5253
5386
  )
5254
5387
  }),
5255
5388
  z32.transform((v) => {
5256
5389
  return remap(v, {
5257
5390
  "auto_topups": "autoTopups",
5258
5391
  "spend_limits": "spendLimits",
5259
- "usage_alerts": "usageAlerts"
5392
+ "usage_alerts": "usageAlerts",
5393
+ "overage_allowed": "overageAllowed"
5260
5394
  });
5261
5395
  })
5262
5396
  );
@@ -5711,11 +5845,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
5711
5845
  var ListPlansRollover$inboundSchema = z35.pipe(
5712
5846
  z35.object({
5713
5847
  max: nullable(number2()),
5848
+ max_percentage: z35.optional(z35.nullable(number2())),
5714
5849
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
5715
5850
  expiry_duration_length: optional2(number2())
5716
5851
  }),
5717
5852
  z35.transform((v) => {
5718
5853
  return remap(v, {
5854
+ "max_percentage": "maxPercentage",
5719
5855
  "expiry_duration_type": "expiryDurationType",
5720
5856
  "expiry_duration_length": "expiryDurationLength"
5721
5857
  });
@@ -5959,11 +6095,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
5959
6095
  var MultiAttachRollover$outboundSchema = z36.pipe(
5960
6096
  z36.object({
5961
6097
  max: z36.optional(z36.number()),
6098
+ maxPercentage: z36.optional(z36.number()),
5962
6099
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
5963
6100
  expiryDurationLength: z36.optional(z36.number())
5964
6101
  }),
5965
6102
  z36.transform((v) => {
5966
6103
  return remap(v, {
6104
+ maxPercentage: "max_percentage",
5967
6105
  expiryDurationType: "expiry_duration_type",
5968
6106
  expiryDurationLength: "expiry_duration_length"
5969
6107
  });
@@ -6090,6 +6228,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
6090
6228
  });
6091
6229
  })
6092
6230
  );
6231
+ var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
6232
+ z36.object({
6233
+ featureId: z36.string(),
6234
+ enabled: z36._default(z36.boolean(), false)
6235
+ }),
6236
+ z36.transform((v) => {
6237
+ return remap(v, {
6238
+ featureId: "feature_id"
6239
+ });
6240
+ })
6241
+ );
6093
6242
  var MultiAttachBillingControls$outboundSchema = z36.pipe(
6094
6243
  z36.object({
6095
6244
  spendLimits: z36.optional(
@@ -6097,12 +6246,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
6097
6246
  ),
6098
6247
  usageAlerts: z36.optional(
6099
6248
  z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
6249
+ ),
6250
+ overageAllowed: z36.optional(
6251
+ z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
6100
6252
  )
6101
6253
  }),
6102
6254
  z36.transform((v) => {
6103
6255
  return remap(v, {
6104
6256
  spendLimits: "spend_limits",
6105
- usageAlerts: "usage_alerts"
6257
+ usageAlerts: "usage_alerts",
6258
+ overageAllowed: "overage_allowed"
6106
6259
  });
6107
6260
  })
6108
6261
  );
@@ -6396,11 +6549,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
6396
6549
  var PreviewAttachRollover$outboundSchema = z38.pipe(
6397
6550
  z38.object({
6398
6551
  max: z38.optional(z38.number()),
6552
+ maxPercentage: z38.optional(z38.number()),
6399
6553
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
6400
6554
  expiryDurationLength: z38.optional(z38.number())
6401
6555
  }),
6402
6556
  z38.transform((v) => {
6403
6557
  return remap(v, {
6558
+ maxPercentage: "max_percentage",
6404
6559
  expiryDurationType: "expiry_duration_type",
6405
6560
  expiryDurationLength: "expiry_duration_length"
6406
6561
  });
@@ -6944,11 +7099,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
6944
7099
  var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
6945
7100
  z39.object({
6946
7101
  max: z39.optional(z39.number()),
7102
+ maxPercentage: z39.optional(z39.number()),
6947
7103
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
6948
7104
  expiryDurationLength: z39.optional(z39.number())
6949
7105
  }),
6950
7106
  z39.transform((v) => {
6951
7107
  return remap(v, {
7108
+ maxPercentage: "max_percentage",
6952
7109
  expiryDurationType: "expiry_duration_type",
6953
7110
  expiryDurationLength: "expiry_duration_length"
6954
7111
  });
@@ -7088,6 +7245,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
7088
7245
  });
7089
7246
  })
7090
7247
  );
7248
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
7249
+ z39.object({
7250
+ featureId: z39.string(),
7251
+ enabled: z39._default(z39.boolean(), false)
7252
+ }),
7253
+ z39.transform((v) => {
7254
+ return remap(v, {
7255
+ featureId: "feature_id"
7256
+ });
7257
+ })
7258
+ );
7091
7259
  var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7092
7260
  z39.object({
7093
7261
  spendLimits: z39.optional(
@@ -7095,12 +7263,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7095
7263
  ),
7096
7264
  usageAlerts: z39.optional(
7097
7265
  z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
7266
+ ),
7267
+ overageAllowed: z39.optional(
7268
+ z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
7098
7269
  )
7099
7270
  }),
7100
7271
  z39.transform((v) => {
7101
7272
  return remap(v, {
7102
7273
  spendLimits: "spend_limits",
7103
- usageAlerts: "usage_alerts"
7274
+ usageAlerts: "usage_alerts",
7275
+ overageAllowed: "overage_allowed"
7104
7276
  });
7105
7277
  })
7106
7278
  );
@@ -7556,11 +7728,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
7556
7728
  var PreviewUpdateRollover$outboundSchema = z40.pipe(
7557
7729
  z40.object({
7558
7730
  max: z40.optional(z40.number()),
7731
+ maxPercentage: z40.optional(z40.number()),
7559
7732
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
7560
7733
  expiryDurationLength: z40.optional(z40.number())
7561
7734
  }),
7562
7735
  z40.transform((v) => {
7563
7736
  return remap(v, {
7737
+ maxPercentage: "max_percentage",
7564
7738
  expiryDurationType: "expiry_duration_type",
7565
7739
  expiryDurationLength: "expiry_duration_length"
7566
7740
  });
@@ -8076,11 +8250,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
8076
8250
  var SetupPaymentRollover$outboundSchema = z42.pipe(
8077
8251
  z42.object({
8078
8252
  max: z42.optional(z42.number()),
8253
+ maxPercentage: z42.optional(z42.number()),
8079
8254
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
8080
8255
  expiryDurationLength: z42.optional(z42.number())
8081
8256
  }),
8082
8257
  z42.transform((v) => {
8083
8258
  return remap(v, {
8259
+ maxPercentage: "max_percentage",
8084
8260
  expiryDurationType: "expiry_duration_type",
8085
8261
  expiryDurationLength: "expiry_duration_length"
8086
8262
  });
@@ -8425,6 +8601,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
8425
8601
  });
8426
8602
  })
8427
8603
  );
8604
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
8605
+ z45.object({
8606
+ featureId: z45.string(),
8607
+ enabled: z45._default(z45.boolean(), false)
8608
+ }),
8609
+ z45.transform((v) => {
8610
+ return remap(v, {
8611
+ featureId: "feature_id"
8612
+ });
8613
+ })
8614
+ );
8428
8615
  var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8429
8616
  z45.object({
8430
8617
  autoTopups: z45.optional(
@@ -8435,13 +8622,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8435
8622
  ),
8436
8623
  usageAlerts: z45.optional(
8437
8624
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
8625
+ ),
8626
+ overageAllowed: z45.optional(
8627
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
8438
8628
  )
8439
8629
  }),
8440
8630
  z45.transform((v) => {
8441
8631
  return remap(v, {
8442
8632
  autoTopups: "auto_topups",
8443
8633
  spendLimits: "spend_limits",
8444
- usageAlerts: "usage_alerts"
8634
+ usageAlerts: "usage_alerts",
8635
+ overageAllowed: "overage_allowed"
8445
8636
  });
8446
8637
  })
8447
8638
  );
@@ -8529,6 +8720,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
8529
8720
  });
8530
8721
  })
8531
8722
  );
8723
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
8724
+ z45.object({
8725
+ feature_id: string4(),
8726
+ enabled: z45._default(boolean2(), false)
8727
+ }),
8728
+ z45.transform((v) => {
8729
+ return remap(v, {
8730
+ "feature_id": "featureId"
8731
+ });
8732
+ })
8733
+ );
8532
8734
  var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8533
8735
  z45.object({
8534
8736
  auto_topups: optional2(
@@ -8539,13 +8741,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8539
8741
  ),
8540
8742
  usage_alerts: optional2(
8541
8743
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
8744
+ ),
8745
+ overage_allowed: optional2(
8746
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
8542
8747
  )
8543
8748
  }),
8544
8749
  z45.transform((v) => {
8545
8750
  return remap(v, {
8546
8751
  "auto_topups": "autoTopups",
8547
8752
  "spend_limits": "spendLimits",
8548
- "usage_alerts": "usageAlerts"
8753
+ "usage_alerts": "usageAlerts",
8754
+ "overage_allowed": "overageAllowed"
8549
8755
  });
8550
8756
  })
8551
8757
  );
@@ -8737,6 +8943,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
8737
8943
  });
8738
8944
  })
8739
8945
  );
8946
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
8947
+ z46.object({
8948
+ featureId: z46.string(),
8949
+ enabled: z46._default(z46.boolean(), false)
8950
+ }),
8951
+ z46.transform((v) => {
8952
+ return remap(v, {
8953
+ featureId: "feature_id"
8954
+ });
8955
+ })
8956
+ );
8740
8957
  var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8741
8958
  z46.object({
8742
8959
  spendLimits: z46.optional(
@@ -8744,12 +8961,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8744
8961
  ),
8745
8962
  usageAlerts: z46.optional(
8746
8963
  z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
8964
+ ),
8965
+ overageAllowed: z46.optional(
8966
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
8747
8967
  )
8748
8968
  }),
8749
8969
  z46.transform((v) => {
8750
8970
  return remap(v, {
8751
8971
  spendLimits: "spend_limits",
8752
- usageAlerts: "usage_alerts"
8972
+ usageAlerts: "usage_alerts",
8973
+ overageAllowed: "overage_allowed"
8753
8974
  });
8754
8975
  })
8755
8976
  );
@@ -8901,6 +9122,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
8901
9122
  });
8902
9123
  })
8903
9124
  );
9125
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
9126
+ z46.object({
9127
+ feature_id: string4(),
9128
+ enabled: z46._default(boolean2(), false)
9129
+ }),
9130
+ z46.transform((v) => {
9131
+ return remap(v, {
9132
+ "feature_id": "featureId"
9133
+ });
9134
+ })
9135
+ );
8904
9136
  var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8905
9137
  z46.object({
8906
9138
  spend_limits: optional2(
@@ -8908,12 +9140,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8908
9140
  ),
8909
9141
  usage_alerts: optional2(
8910
9142
  z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
9143
+ ),
9144
+ overage_allowed: optional2(
9145
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
8911
9146
  )
8912
9147
  }),
8913
9148
  z46.transform((v) => {
8914
9149
  return remap(v, {
8915
9150
  "spend_limits": "spendLimits",
8916
- "usage_alerts": "usageAlerts"
9151
+ "usage_alerts": "usageAlerts",
9152
+ "overage_allowed": "overageAllowed"
8917
9153
  });
8918
9154
  })
8919
9155
  );
@@ -9266,11 +9502,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
9266
9502
  var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
9267
9503
  z48.object({
9268
9504
  max: z48.optional(z48.number()),
9505
+ maxPercentage: z48.optional(z48.number()),
9269
9506
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
9270
9507
  expiryDurationLength: z48.optional(z48.number())
9271
9508
  }),
9272
9509
  z48.transform((v) => {
9273
9510
  return remap(v, {
9511
+ maxPercentage: "max_percentage",
9274
9512
  expiryDurationType: "expiry_duration_type",
9275
9513
  expiryDurationLength: "expiry_duration_length"
9276
9514
  });
@@ -9455,11 +9693,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
9455
9693
  var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
9456
9694
  z48.object({
9457
9695
  max: nullable(number2()),
9696
+ max_percentage: z48.optional(z48.nullable(number2())),
9458
9697
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
9459
9698
  expiry_duration_length: optional2(number2())
9460
9699
  }),
9461
9700
  z48.transform((v) => {
9462
9701
  return remap(v, {
9702
+ "max_percentage": "maxPercentage",
9463
9703
  "expiry_duration_type": "expiryDurationType",
9464
9704
  "expiry_duration_length": "expiryDurationLength"
9465
9705
  });
@@ -9736,7 +9976,8 @@ async function $do2(client, request, options) {
9736
9976
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
9737
9977
  "check",
9738
9978
  "track",
9739
- "getOrCreateCustomer"
9979
+ "getOrCreateCustomer",
9980
+ "getEntity"
9740
9981
  ]);
9741
9982
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
9742
9983
  var FAIL_OPEN_BODIES = {
@@ -9766,6 +10007,18 @@ var FAIL_OPEN_BODIES = {
9766
10007
  purchases: [],
9767
10008
  balances: {},
9768
10009
  flags: {}
10010
+ },
10011
+ getEntity: {
10012
+ id: null,
10013
+ name: null,
10014
+ customer_id: null,
10015
+ feature_id: null,
10016
+ created_at: 0,
10017
+ env: "live",
10018
+ subscriptions: [],
10019
+ purchases: [],
10020
+ balances: {},
10021
+ flags: {}
9769
10022
  }
9770
10023
  };
9771
10024
  var FailOpenHook = class {
@@ -14141,6 +14394,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14141
14394
  });
14142
14395
  var attachRolloverOutboundSchema = import_v42.z.object({
14143
14396
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14397
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14144
14398
  expiry_duration_type: import_v42.z.string(),
14145
14399
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14146
14400
  });
@@ -14241,6 +14495,7 @@ var attachProrationSchema = import_v42.z.object({
14241
14495
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14242
14496
  var attachRolloverSchema = import_v42.z.object({
14243
14497
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14498
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14244
14499
  expiryDurationType: attachExpiryDurationTypeSchema,
14245
14500
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14246
14501
  });
@@ -14331,6 +14586,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14331
14586
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14332
14587
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14333
14588
  });
14589
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
14590
+ featureId: import_v44.z.string(),
14591
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
14592
+ });
14334
14593
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14335
14594
  interval: import_v44.z.string(),
14336
14595
  interval_count: import_v44.z.number(),
@@ -14355,6 +14614,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14355
14614
  threshold_type: import_v44.z.string(),
14356
14615
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14357
14616
  });
14617
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14618
+ feature_id: import_v44.z.string(),
14619
+ enabled: import_v44.z.boolean()
14620
+ });
14358
14621
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14359
14622
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14360
14623
  spend_limits: import_v44.z.union([
@@ -14364,6 +14627,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14364
14627
  usage_alerts: import_v44.z.union([
14365
14628
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14366
14629
  import_v44.z.undefined()
14630
+ ]).optional(),
14631
+ overage_allowed: import_v44.z.union([
14632
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
14633
+ import_v44.z.undefined()
14367
14634
  ]).optional()
14368
14635
  });
14369
14636
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14404,7 +14671,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14404
14671
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14405
14672
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14406
14673
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14407
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
14674
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
14675
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
14408
14676
  });
14409
14677
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14410
14678
  customerId: import_v44.z.string().nullable(),
@@ -14543,6 +14811,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14543
14811
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14544
14812
  var listPlansRolloverSchema = import_v46.z.object({
14545
14813
  max: import_v46.z.number().nullable(),
14814
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14546
14815
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14547
14816
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14548
14817
  });
@@ -14623,6 +14892,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14623
14892
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14624
14893
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14625
14894
  });
14895
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
14896
+ featureId: import_v47.z.string(),
14897
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
14898
+ });
14626
14899
  var multiAttachInvoiceSchema = import_v47.z.object({
14627
14900
  status: import_v47.z.string().nullable(),
14628
14901
  stripeId: import_v47.z.string(),
@@ -14661,6 +14934,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14661
14934
  });
14662
14935
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14663
14936
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14937
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14664
14938
  expiry_duration_type: import_v47.z.string(),
14665
14939
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14666
14940
  });
@@ -14715,9 +14989,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14715
14989
  threshold_type: import_v47.z.string(),
14716
14990
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14717
14991
  });
14992
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
14993
+ feature_id: import_v47.z.string(),
14994
+ enabled: import_v47.z.boolean()
14995
+ });
14718
14996
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14719
14997
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14720
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
14998
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
14999
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
14721
15000
  });
14722
15001
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14723
15002
  feature_id: import_v47.z.string(),
@@ -14761,6 +15040,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14761
15040
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14762
15041
  var multiAttachRolloverSchema = import_v47.z.object({
14763
15042
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
15043
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14764
15044
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14765
15045
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14766
15046
  });
@@ -14801,7 +15081,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14801
15081
  });
14802
15082
  var multiAttachBillingControlsSchema = import_v47.z.object({
14803
15083
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14804
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
15084
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
15085
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
14805
15086
  });
14806
15087
  var multiAttachEntityDataSchema = import_v47.z.object({
14807
15088
  featureId: import_v47.z.string(),
@@ -15009,6 +15290,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
15009
15290
  });
15010
15291
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
15011
15292
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15293
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15012
15294
  expiry_duration_type: import_v49.z.string(),
15013
15295
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15014
15296
  });
@@ -15113,6 +15395,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15113
15395
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15114
15396
  var previewAttachRolloverSchema = import_v49.z.object({
15115
15397
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15398
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15116
15399
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15117
15400
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15118
15401
  });
@@ -15222,6 +15505,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15222
15505
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15223
15506
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15224
15507
  });
15508
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
15509
+ featureId: import_v410.z.string(),
15510
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
15511
+ });
15225
15512
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15226
15513
  amountOff: import_v410.z.number(),
15227
15514
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15323,6 +15610,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15323
15610
  });
15324
15611
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15325
15612
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15613
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15326
15614
  expiry_duration_type: import_v410.z.string(),
15327
15615
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15328
15616
  });
@@ -15380,9 +15668,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15380
15668
  threshold_type: import_v410.z.string(),
15381
15669
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15382
15670
  });
15671
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15672
+ feature_id: import_v410.z.string(),
15673
+ enabled: import_v410.z.boolean()
15674
+ });
15383
15675
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15384
15676
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15385
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
15677
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
15678
+ overage_allowed: import_v410.z.union([
15679
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
15680
+ import_v410.z.undefined()
15681
+ ]).optional()
15386
15682
  });
15387
15683
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15388
15684
  feature_id: import_v410.z.string(),
@@ -15427,6 +15723,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15427
15723
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15428
15724
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15429
15725
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15726
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15430
15727
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15431
15728
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15432
15729
  });
@@ -15470,7 +15767,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15470
15767
  });
15471
15768
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15472
15769
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15473
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
15770
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
15771
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
15474
15772
  });
15475
15773
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15476
15774
  featureId: import_v410.z.string(),
@@ -15666,6 +15964,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15666
15964
  });
15667
15965
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15668
15966
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15967
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15669
15968
  expiry_duration_type: import_v411.z.string(),
15670
15969
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15671
15970
  });
@@ -15750,6 +16049,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15750
16049
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15751
16050
  var previewUpdateRolloverSchema = import_v411.z.object({
15752
16051
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
16052
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15753
16053
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15754
16054
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15755
16055
  });
@@ -15913,6 +16213,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15913
16213
  });
15914
16214
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15915
16215
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16216
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15916
16217
  expiry_duration_type: import_v413.z.string(),
15917
16218
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15918
16219
  });
@@ -16003,6 +16304,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
16003
16304
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
16004
16305
  var setupPaymentRolloverSchema = import_v413.z.object({
16005
16306
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16307
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16006
16308
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
16007
16309
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
16008
16310
  });
@@ -16113,6 +16415,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16113
16415
  });
16114
16416
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16115
16417
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16418
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16116
16419
  expiry_duration_type: import_v414.z.string(),
16117
16420
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16118
16421
  });
@@ -16193,6 +16496,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16193
16496
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16194
16497
  var billingUpdateRolloverSchema = import_v414.z.object({
16195
16498
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16499
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16196
16500
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16197
16501
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16198
16502
  });