autumn-js 1.2.0 → 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 +337 -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 +337 -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 +337 -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 +337 -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 +337 -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-6YVVHFAT.mjs → chunk-2YEMC57K.mjs} +1 -1
  24. package/dist/backend/{chunk-MJBKNDWD.mjs → chunk-CCEZMERA.mjs} +279 -24
  25. package/dist/backend/{chunk-VR35K2UZ.mjs → chunk-ETHQSA52.mjs} +7 -7
  26. package/dist/backend/{chunk-RYP3CVST.mjs → chunk-FRKRWJ5S.mjs} +1 -1
  27. package/dist/backend/{chunk-5TDPAYPN.mjs → chunk-IFFSWLXT.mjs} +1 -1
  28. package/dist/backend/{chunk-3YYODLUY.mjs → chunk-IUFWKMTJ.mjs} +1 -1
  29. package/dist/backend/{chunk-BSY23UM3.mjs → chunk-N62MDT7U.mjs} +58 -5
  30. package/dist/backend/{chunk-JDL37I7Y.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 +337 -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 +337 -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 +337 -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 +337 -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 +58 -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 +58 -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 +337 -29
  74. package/dist/backend/index.mjs +10 -10
  75. package/dist/backend/{routeTypes-B7YXq83l.d.ts → routeTypes-BkSHRiCI.d.ts} +233 -2
  76. package/dist/backend/{routeTypes-BglWygTb.d.mts → routeTypes-C1hUtfD8.d.mts} +233 -2
  77. package/dist/better-auth/{chunk-LHA6NFFS.mjs → chunk-2PRVJULJ.mjs} +58 -5
  78. package/dist/better-auth/{chunk-I4LI2AOX.mjs → chunk-6J74ZVNY.mjs} +280 -25
  79. package/dist/better-auth/{chunk-TDX4NREA.mjs → chunk-IY7FPOWF.mjs} +1 -1
  80. package/dist/better-auth/index.js +337 -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 +58 -5
  85. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  86. package/dist/better-auth/utils/handleBetterAuthRoute.js +337 -29
  87. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  88. package/dist/better-auth/utils/index.js +337 -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-BmtAnULw.d.mts → params-CheyAQ0-.d.mts} +93 -2
  129. package/dist/react/{params-CL0lZNfr.d.ts → params-yCtJ7lOA.d.ts} +93 -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 +342 -4
  133. package/dist/sdk/index.d.ts +342 -4
  134. package/dist/sdk/index.js +384 -24
  135. package/dist/sdk/index.mjs +359 -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) {
@@ -1338,6 +1347,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1338
1347
  customRange: z8.optional(
1339
1348
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1340
1349
  ),
1350
+ filterBy: z8.optional(z8.record(z8.string(), z8.string())),
1341
1351
  maxGroups: z8.optional(z8.int())
1342
1352
  }),
1343
1353
  z8.transform((v) => {
@@ -1348,6 +1358,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1348
1358
  groupBy: "group_by",
1349
1359
  binSize: "bin_size",
1350
1360
  customRange: "custom_range",
1361
+ filterBy: "filter_by",
1351
1362
  maxGroups: "max_groups"
1352
1363
  });
1353
1364
  })
@@ -1556,11 +1567,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
1556
1567
  var AttachRollover$outboundSchema = z10.pipe(
1557
1568
  z10.object({
1558
1569
  max: z10.optional(z10.number()),
1570
+ maxPercentage: z10.optional(z10.number()),
1559
1571
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
1560
1572
  expiryDurationLength: z10.optional(z10.number())
1561
1573
  }),
1562
1574
  z10.transform((v) => {
1563
1575
  return remap(v, {
1576
+ maxPercentage: "max_percentage",
1564
1577
  expiryDurationType: "expiry_duration_type",
1565
1578
  expiryDurationLength: "expiry_duration_length"
1566
1579
  });
@@ -2085,11 +2098,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
2085
2098
  var BillingUpdateRollover$outboundSchema = z12.pipe(
2086
2099
  z12.object({
2087
2100
  max: z12.optional(z12.number()),
2101
+ maxPercentage: z12.optional(z12.number()),
2088
2102
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
2089
2103
  expiryDurationLength: z12.optional(z12.number())
2090
2104
  }),
2091
2105
  z12.transform((v) => {
2092
2106
  return remap(v, {
2107
+ maxPercentage: "max_percentage",
2093
2108
  expiryDurationType: "expiry_duration_type",
2094
2109
  expiryDurationLength: "expiry_duration_length"
2095
2110
  });
@@ -2431,11 +2446,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
2431
2446
  })
2432
2447
  );
2433
2448
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
2434
- var CheckRollover$inboundSchema = z13.object({
2435
- max: nullable(number2()),
2436
- duration: z13._default(RolloverDuration$inboundSchema, "month"),
2437
- length: number2()
2438
- });
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
+ );
2439
2462
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2440
2463
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2441
2464
  var Config$inboundSchema = z13.pipe(
@@ -2712,6 +2735,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
2712
2735
  });
2713
2736
  })
2714
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
+ );
2715
2749
  var CustomerDataBillingControls$outboundSchema = z15.pipe(
2716
2750
  z15.object({
2717
2751
  autoTopups: z15.optional(
@@ -2722,13 +2756,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
2722
2756
  ),
2723
2757
  usageAlerts: z15.optional(
2724
2758
  z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
2759
+ ),
2760
+ overageAllowed: z15.optional(
2761
+ z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
2725
2762
  )
2726
2763
  }),
2727
2764
  z15.transform((v) => {
2728
2765
  return remap(v, {
2729
2766
  autoTopups: "auto_topups",
2730
2767
  spendLimits: "spend_limits",
2731
- usageAlerts: "usage_alerts"
2768
+ usageAlerts: "usage_alerts",
2769
+ overageAllowed: "overage_allowed"
2732
2770
  });
2733
2771
  })
2734
2772
  );
@@ -2939,11 +2977,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
2939
2977
  var PlanRollover$inboundSchema = z16.pipe(
2940
2978
  z16.object({
2941
2979
  max: nullable(number2()),
2980
+ max_percentage: z16.optional(z16.nullable(number2())),
2942
2981
  expiry_duration_type: ExpiryDurationType$inboundSchema,
2943
2982
  expiry_duration_length: optional2(number2())
2944
2983
  }),
2945
2984
  z16.transform((v) => {
2946
2985
  return remap(v, {
2986
+ "max_percentage": "maxPercentage",
2947
2987
  "expiry_duration_type": "expiryDurationType",
2948
2988
  "expiry_duration_length": "expiryDurationLength"
2949
2989
  });
@@ -3082,6 +3122,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
3082
3122
  });
3083
3123
  })
3084
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
+ );
3085
3136
  var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3086
3137
  z17.object({
3087
3138
  spendLimits: z17.optional(
@@ -3089,12 +3140,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3089
3140
  ),
3090
3141
  usageAlerts: z17.optional(
3091
3142
  z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
3143
+ ),
3144
+ overageAllowed: z17.optional(
3145
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
3092
3146
  )
3093
3147
  }),
3094
3148
  z17.transform((v) => {
3095
3149
  return remap(v, {
3096
3150
  spendLimits: "spend_limits",
3097
- usageAlerts: "usage_alerts"
3151
+ usageAlerts: "usage_alerts",
3152
+ overageAllowed: "overage_allowed"
3098
3153
  });
3099
3154
  })
3100
3155
  );
@@ -3251,6 +3306,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
3251
3306
  });
3252
3307
  })
3253
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
+ );
3254
3320
  var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3255
3321
  z17.object({
3256
3322
  spend_limits: optional2(
@@ -3258,12 +3324,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3258
3324
  ),
3259
3325
  usage_alerts: optional2(
3260
3326
  z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
3327
+ ),
3328
+ overage_allowed: optional2(
3329
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
3261
3330
  )
3262
3331
  }),
3263
3332
  z17.transform((v) => {
3264
3333
  return remap(v, {
3265
3334
  "spend_limits": "spendLimits",
3266
- "usage_alerts": "usageAlerts"
3335
+ "usage_alerts": "usageAlerts",
3336
+ "overage_allowed": "overageAllowed"
3267
3337
  });
3268
3338
  })
3269
3339
  );
@@ -3613,11 +3683,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
3613
3683
  var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
3614
3684
  z19.object({
3615
3685
  max: z19.optional(z19.number()),
3686
+ maxPercentage: z19.optional(z19.number()),
3616
3687
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
3617
3688
  expiryDurationLength: z19.optional(z19.number())
3618
3689
  }),
3619
3690
  z19.transform((v) => {
3620
3691
  return remap(v, {
3692
+ maxPercentage: "max_percentage",
3621
3693
  expiryDurationType: "expiry_duration_type",
3622
3694
  expiryDurationLength: "expiry_duration_length"
3623
3695
  });
@@ -3794,11 +3866,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
3794
3866
  var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
3795
3867
  z19.object({
3796
3868
  max: nullable(number2()),
3869
+ max_percentage: z19.optional(z19.nullable(number2())),
3797
3870
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
3798
3871
  expiry_duration_length: optional2(number2())
3799
3872
  }),
3800
3873
  z19.transform((v) => {
3801
3874
  return remap(v, {
3875
+ "max_percentage": "maxPercentage",
3802
3876
  "expiry_duration_type": "expiryDurationType",
3803
3877
  "expiry_duration_length": "expiryDurationLength"
3804
3878
  });
@@ -4020,6 +4094,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
4020
4094
  });
4021
4095
  })
4022
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
+ );
4023
4108
  var CustomerBillingControls$inboundSchema = z21.pipe(
4024
4109
  z21.object({
4025
4110
  auto_topups: optional2(
@@ -4030,13 +4115,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
4030
4115
  ),
4031
4116
  usage_alerts: optional2(
4032
4117
  z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
4118
+ ),
4119
+ overage_allowed: optional2(
4120
+ z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
4033
4121
  )
4034
4122
  }),
4035
4123
  z21.transform((v) => {
4036
4124
  return remap(v, {
4037
4125
  "auto_topups": "autoTopups",
4038
4126
  "spend_limits": "spendLimits",
4039
- "usage_alerts": "usageAlerts"
4127
+ "usage_alerts": "usageAlerts",
4128
+ "overage_allowed": "overageAllowed"
4040
4129
  });
4041
4130
  })
4042
4131
  );
@@ -4575,6 +4664,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
4575
4664
  });
4576
4665
  })
4577
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
+ );
4578
4678
  var GetEntityBillingControls$inboundSchema = z28.pipe(
4579
4679
  z28.object({
4580
4680
  spend_limits: optional2(
@@ -4582,12 +4682,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
4582
4682
  ),
4583
4683
  usage_alerts: optional2(
4584
4684
  z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
4685
+ ),
4686
+ overage_allowed: optional2(
4687
+ z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
4585
4688
  )
4586
4689
  }),
4587
4690
  z28.transform((v) => {
4588
4691
  return remap(v, {
4589
4692
  "spend_limits": "spendLimits",
4590
- "usage_alerts": "usageAlerts"
4693
+ "usage_alerts": "usageAlerts",
4694
+ "overage_allowed": "overageAllowed"
4591
4695
  });
4592
4696
  })
4593
4697
  );
@@ -4765,6 +4869,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
4765
4869
  });
4766
4870
  })
4767
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
+ );
4768
4883
  var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4769
4884
  z30.object({
4770
4885
  autoTopups: z30.optional(
@@ -4775,13 +4890,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4775
4890
  ),
4776
4891
  usageAlerts: z30.optional(
4777
4892
  z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
4893
+ ),
4894
+ overageAllowed: z30.optional(
4895
+ z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
4778
4896
  )
4779
4897
  }),
4780
4898
  z30.transform((v) => {
4781
4899
  return remap(v, {
4782
4900
  autoTopups: "auto_topups",
4783
4901
  spendLimits: "spend_limits",
4784
- usageAlerts: "usage_alerts"
4902
+ usageAlerts: "usage_alerts",
4903
+ overageAllowed: "overage_allowed"
4785
4904
  });
4786
4905
  })
4787
4906
  );
@@ -5006,11 +5125,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
5006
5125
  var GetPlanRollover$inboundSchema = z31.pipe(
5007
5126
  z31.object({
5008
5127
  max: nullable(number2()),
5128
+ max_percentage: z31.optional(z31.nullable(number2())),
5009
5129
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
5010
5130
  expiry_duration_length: optional2(number2())
5011
5131
  }),
5012
5132
  z31.transform((v) => {
5013
5133
  return remap(v, {
5134
+ "max_percentage": "maxPercentage",
5014
5135
  "expiry_duration_type": "expiryDurationType",
5015
5136
  "expiry_duration_length": "expiryDurationLength"
5016
5137
  });
@@ -5238,6 +5359,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
5238
5359
  });
5239
5360
  })
5240
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
+ );
5241
5373
  var ListCustomersBillingControls$inboundSchema = z32.pipe(
5242
5374
  z32.object({
5243
5375
  auto_topups: optional2(
@@ -5248,13 +5380,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
5248
5380
  ),
5249
5381
  usage_alerts: optional2(
5250
5382
  z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
5383
+ ),
5384
+ overage_allowed: optional2(
5385
+ z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
5251
5386
  )
5252
5387
  }),
5253
5388
  z32.transform((v) => {
5254
5389
  return remap(v, {
5255
5390
  "auto_topups": "autoTopups",
5256
5391
  "spend_limits": "spendLimits",
5257
- "usage_alerts": "usageAlerts"
5392
+ "usage_alerts": "usageAlerts",
5393
+ "overage_allowed": "overageAllowed"
5258
5394
  });
5259
5395
  })
5260
5396
  );
@@ -5709,11 +5845,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
5709
5845
  var ListPlansRollover$inboundSchema = z35.pipe(
5710
5846
  z35.object({
5711
5847
  max: nullable(number2()),
5848
+ max_percentage: z35.optional(z35.nullable(number2())),
5712
5849
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
5713
5850
  expiry_duration_length: optional2(number2())
5714
5851
  }),
5715
5852
  z35.transform((v) => {
5716
5853
  return remap(v, {
5854
+ "max_percentage": "maxPercentage",
5717
5855
  "expiry_duration_type": "expiryDurationType",
5718
5856
  "expiry_duration_length": "expiryDurationLength"
5719
5857
  });
@@ -5957,11 +6095,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
5957
6095
  var MultiAttachRollover$outboundSchema = z36.pipe(
5958
6096
  z36.object({
5959
6097
  max: z36.optional(z36.number()),
6098
+ maxPercentage: z36.optional(z36.number()),
5960
6099
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
5961
6100
  expiryDurationLength: z36.optional(z36.number())
5962
6101
  }),
5963
6102
  z36.transform((v) => {
5964
6103
  return remap(v, {
6104
+ maxPercentage: "max_percentage",
5965
6105
  expiryDurationType: "expiry_duration_type",
5966
6106
  expiryDurationLength: "expiry_duration_length"
5967
6107
  });
@@ -6088,6 +6228,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
6088
6228
  });
6089
6229
  })
6090
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
+ );
6091
6242
  var MultiAttachBillingControls$outboundSchema = z36.pipe(
6092
6243
  z36.object({
6093
6244
  spendLimits: z36.optional(
@@ -6095,12 +6246,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
6095
6246
  ),
6096
6247
  usageAlerts: z36.optional(
6097
6248
  z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
6249
+ ),
6250
+ overageAllowed: z36.optional(
6251
+ z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
6098
6252
  )
6099
6253
  }),
6100
6254
  z36.transform((v) => {
6101
6255
  return remap(v, {
6102
6256
  spendLimits: "spend_limits",
6103
- usageAlerts: "usage_alerts"
6257
+ usageAlerts: "usage_alerts",
6258
+ overageAllowed: "overage_allowed"
6104
6259
  });
6105
6260
  })
6106
6261
  );
@@ -6394,11 +6549,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
6394
6549
  var PreviewAttachRollover$outboundSchema = z38.pipe(
6395
6550
  z38.object({
6396
6551
  max: z38.optional(z38.number()),
6552
+ maxPercentage: z38.optional(z38.number()),
6397
6553
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
6398
6554
  expiryDurationLength: z38.optional(z38.number())
6399
6555
  }),
6400
6556
  z38.transform((v) => {
6401
6557
  return remap(v, {
6558
+ maxPercentage: "max_percentage",
6402
6559
  expiryDurationType: "expiry_duration_type",
6403
6560
  expiryDurationLength: "expiry_duration_length"
6404
6561
  });
@@ -6942,11 +7099,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
6942
7099
  var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
6943
7100
  z39.object({
6944
7101
  max: z39.optional(z39.number()),
7102
+ maxPercentage: z39.optional(z39.number()),
6945
7103
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
6946
7104
  expiryDurationLength: z39.optional(z39.number())
6947
7105
  }),
6948
7106
  z39.transform((v) => {
6949
7107
  return remap(v, {
7108
+ maxPercentage: "max_percentage",
6950
7109
  expiryDurationType: "expiry_duration_type",
6951
7110
  expiryDurationLength: "expiry_duration_length"
6952
7111
  });
@@ -7086,6 +7245,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
7086
7245
  });
7087
7246
  })
7088
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
+ );
7089
7259
  var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7090
7260
  z39.object({
7091
7261
  spendLimits: z39.optional(
@@ -7093,12 +7263,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7093
7263
  ),
7094
7264
  usageAlerts: z39.optional(
7095
7265
  z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
7266
+ ),
7267
+ overageAllowed: z39.optional(
7268
+ z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
7096
7269
  )
7097
7270
  }),
7098
7271
  z39.transform((v) => {
7099
7272
  return remap(v, {
7100
7273
  spendLimits: "spend_limits",
7101
- usageAlerts: "usage_alerts"
7274
+ usageAlerts: "usage_alerts",
7275
+ overageAllowed: "overage_allowed"
7102
7276
  });
7103
7277
  })
7104
7278
  );
@@ -7554,11 +7728,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
7554
7728
  var PreviewUpdateRollover$outboundSchema = z40.pipe(
7555
7729
  z40.object({
7556
7730
  max: z40.optional(z40.number()),
7731
+ maxPercentage: z40.optional(z40.number()),
7557
7732
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
7558
7733
  expiryDurationLength: z40.optional(z40.number())
7559
7734
  }),
7560
7735
  z40.transform((v) => {
7561
7736
  return remap(v, {
7737
+ maxPercentage: "max_percentage",
7562
7738
  expiryDurationType: "expiry_duration_type",
7563
7739
  expiryDurationLength: "expiry_duration_length"
7564
7740
  });
@@ -8074,11 +8250,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
8074
8250
  var SetupPaymentRollover$outboundSchema = z42.pipe(
8075
8251
  z42.object({
8076
8252
  max: z42.optional(z42.number()),
8253
+ maxPercentage: z42.optional(z42.number()),
8077
8254
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
8078
8255
  expiryDurationLength: z42.optional(z42.number())
8079
8256
  }),
8080
8257
  z42.transform((v) => {
8081
8258
  return remap(v, {
8259
+ maxPercentage: "max_percentage",
8082
8260
  expiryDurationType: "expiry_duration_type",
8083
8261
  expiryDurationLength: "expiry_duration_length"
8084
8262
  });
@@ -8423,6 +8601,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
8423
8601
  });
8424
8602
  })
8425
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
+ );
8426
8615
  var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8427
8616
  z45.object({
8428
8617
  autoTopups: z45.optional(
@@ -8433,13 +8622,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8433
8622
  ),
8434
8623
  usageAlerts: z45.optional(
8435
8624
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
8625
+ ),
8626
+ overageAllowed: z45.optional(
8627
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
8436
8628
  )
8437
8629
  }),
8438
8630
  z45.transform((v) => {
8439
8631
  return remap(v, {
8440
8632
  autoTopups: "auto_topups",
8441
8633
  spendLimits: "spend_limits",
8442
- usageAlerts: "usage_alerts"
8634
+ usageAlerts: "usage_alerts",
8635
+ overageAllowed: "overage_allowed"
8443
8636
  });
8444
8637
  })
8445
8638
  );
@@ -8527,6 +8720,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
8527
8720
  });
8528
8721
  })
8529
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
+ );
8530
8734
  var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8531
8735
  z45.object({
8532
8736
  auto_topups: optional2(
@@ -8537,13 +8741,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8537
8741
  ),
8538
8742
  usage_alerts: optional2(
8539
8743
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
8744
+ ),
8745
+ overage_allowed: optional2(
8746
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
8540
8747
  )
8541
8748
  }),
8542
8749
  z45.transform((v) => {
8543
8750
  return remap(v, {
8544
8751
  "auto_topups": "autoTopups",
8545
8752
  "spend_limits": "spendLimits",
8546
- "usage_alerts": "usageAlerts"
8753
+ "usage_alerts": "usageAlerts",
8754
+ "overage_allowed": "overageAllowed"
8547
8755
  });
8548
8756
  })
8549
8757
  );
@@ -8735,6 +8943,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
8735
8943
  });
8736
8944
  })
8737
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
+ );
8738
8957
  var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8739
8958
  z46.object({
8740
8959
  spendLimits: z46.optional(
@@ -8742,12 +8961,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8742
8961
  ),
8743
8962
  usageAlerts: z46.optional(
8744
8963
  z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
8964
+ ),
8965
+ overageAllowed: z46.optional(
8966
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
8745
8967
  )
8746
8968
  }),
8747
8969
  z46.transform((v) => {
8748
8970
  return remap(v, {
8749
8971
  spendLimits: "spend_limits",
8750
- usageAlerts: "usage_alerts"
8972
+ usageAlerts: "usage_alerts",
8973
+ overageAllowed: "overage_allowed"
8751
8974
  });
8752
8975
  })
8753
8976
  );
@@ -8899,6 +9122,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
8899
9122
  });
8900
9123
  })
8901
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
+ );
8902
9136
  var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8903
9137
  z46.object({
8904
9138
  spend_limits: optional2(
@@ -8906,12 +9140,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8906
9140
  ),
8907
9141
  usage_alerts: optional2(
8908
9142
  z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
9143
+ ),
9144
+ overage_allowed: optional2(
9145
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
8909
9146
  )
8910
9147
  }),
8911
9148
  z46.transform((v) => {
8912
9149
  return remap(v, {
8913
9150
  "spend_limits": "spendLimits",
8914
- "usage_alerts": "usageAlerts"
9151
+ "usage_alerts": "usageAlerts",
9152
+ "overage_allowed": "overageAllowed"
8915
9153
  });
8916
9154
  })
8917
9155
  );
@@ -9264,11 +9502,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
9264
9502
  var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
9265
9503
  z48.object({
9266
9504
  max: z48.optional(z48.number()),
9505
+ maxPercentage: z48.optional(z48.number()),
9267
9506
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
9268
9507
  expiryDurationLength: z48.optional(z48.number())
9269
9508
  }),
9270
9509
  z48.transform((v) => {
9271
9510
  return remap(v, {
9511
+ maxPercentage: "max_percentage",
9272
9512
  expiryDurationType: "expiry_duration_type",
9273
9513
  expiryDurationLength: "expiry_duration_length"
9274
9514
  });
@@ -9453,11 +9693,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
9453
9693
  var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
9454
9694
  z48.object({
9455
9695
  max: nullable(number2()),
9696
+ max_percentage: z48.optional(z48.nullable(number2())),
9456
9697
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
9457
9698
  expiry_duration_length: optional2(number2())
9458
9699
  }),
9459
9700
  z48.transform((v) => {
9460
9701
  return remap(v, {
9702
+ "max_percentage": "maxPercentage",
9461
9703
  "expiry_duration_type": "expiryDurationType",
9462
9704
  "expiry_duration_length": "expiryDurationLength"
9463
9705
  });
@@ -9734,7 +9976,8 @@ async function $do2(client, request, options) {
9734
9976
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
9735
9977
  "check",
9736
9978
  "track",
9737
- "getOrCreateCustomer"
9979
+ "getOrCreateCustomer",
9980
+ "getEntity"
9738
9981
  ]);
9739
9982
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
9740
9983
  var FAIL_OPEN_BODIES = {
@@ -9764,6 +10007,18 @@ var FAIL_OPEN_BODIES = {
9764
10007
  purchases: [],
9765
10008
  balances: {},
9766
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: {}
9767
10022
  }
9768
10023
  };
9769
10024
  var FailOpenHook = class {
@@ -14041,6 +14296,7 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14041
14296
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14042
14297
  bin_size: import_v4.z.string(),
14043
14298
  custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14299
+ filter_by: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14044
14300
  max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14045
14301
  });
14046
14302
  var closedEnumSchema = import_v4.z.any();
@@ -14054,6 +14310,7 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14054
14310
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14055
14311
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14056
14312
  customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14313
+ filterBy: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14057
14314
  maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14058
14315
  });
14059
14316
 
@@ -14137,6 +14394,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14137
14394
  });
14138
14395
  var attachRolloverOutboundSchema = import_v42.z.object({
14139
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(),
14140
14398
  expiry_duration_type: import_v42.z.string(),
14141
14399
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14142
14400
  });
@@ -14237,6 +14495,7 @@ var attachProrationSchema = import_v42.z.object({
14237
14495
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14238
14496
  var attachRolloverSchema = import_v42.z.object({
14239
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(),
14240
14499
  expiryDurationType: attachExpiryDurationTypeSchema,
14241
14500
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14242
14501
  });
@@ -14327,6 +14586,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14327
14586
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14328
14587
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14329
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
+ });
14330
14593
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14331
14594
  interval: import_v44.z.string(),
14332
14595
  interval_count: import_v44.z.number(),
@@ -14351,6 +14614,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14351
14614
  threshold_type: import_v44.z.string(),
14352
14615
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14353
14616
  });
14617
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14618
+ feature_id: import_v44.z.string(),
14619
+ enabled: import_v44.z.boolean()
14620
+ });
14354
14621
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14355
14622
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14356
14623
  spend_limits: import_v44.z.union([
@@ -14360,6 +14627,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14360
14627
  usage_alerts: import_v44.z.union([
14361
14628
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14362
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()
14363
14634
  ]).optional()
14364
14635
  });
14365
14636
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14400,7 +14671,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14400
14671
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14401
14672
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14402
14673
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14403
- 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()
14404
14676
  });
14405
14677
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14406
14678
  customerId: import_v44.z.string().nullable(),
@@ -14539,6 +14811,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14539
14811
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14540
14812
  var listPlansRolloverSchema = import_v46.z.object({
14541
14813
  max: import_v46.z.number().nullable(),
14814
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14542
14815
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14543
14816
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14544
14817
  });
@@ -14619,6 +14892,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14619
14892
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14620
14893
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14621
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
+ });
14622
14899
  var multiAttachInvoiceSchema = import_v47.z.object({
14623
14900
  status: import_v47.z.string().nullable(),
14624
14901
  stripeId: import_v47.z.string(),
@@ -14657,6 +14934,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14657
14934
  });
14658
14935
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14659
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(),
14660
14938
  expiry_duration_type: import_v47.z.string(),
14661
14939
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14662
14940
  });
@@ -14711,9 +14989,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14711
14989
  threshold_type: import_v47.z.string(),
14712
14990
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14713
14991
  });
14992
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
14993
+ feature_id: import_v47.z.string(),
14994
+ enabled: import_v47.z.boolean()
14995
+ });
14714
14996
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14715
14997
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14716
- 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()
14717
15000
  });
14718
15001
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14719
15002
  feature_id: import_v47.z.string(),
@@ -14757,6 +15040,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14757
15040
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14758
15041
  var multiAttachRolloverSchema = import_v47.z.object({
14759
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(),
14760
15044
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14761
15045
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14762
15046
  });
@@ -14797,7 +15081,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14797
15081
  });
14798
15082
  var multiAttachBillingControlsSchema = import_v47.z.object({
14799
15083
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14800
- 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()
14801
15086
  });
14802
15087
  var multiAttachEntityDataSchema = import_v47.z.object({
14803
15088
  featureId: import_v47.z.string(),
@@ -15005,6 +15290,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
15005
15290
  });
15006
15291
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
15007
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(),
15008
15294
  expiry_duration_type: import_v49.z.string(),
15009
15295
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15010
15296
  });
@@ -15109,6 +15395,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15109
15395
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15110
15396
  var previewAttachRolloverSchema = import_v49.z.object({
15111
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(),
15112
15399
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15113
15400
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15114
15401
  });
@@ -15218,6 +15505,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15218
15505
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15219
15506
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15220
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
+ });
15221
15512
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15222
15513
  amountOff: import_v410.z.number(),
15223
15514
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15319,6 +15610,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15319
15610
  });
15320
15611
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15321
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(),
15322
15614
  expiry_duration_type: import_v410.z.string(),
15323
15615
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15324
15616
  });
@@ -15376,9 +15668,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15376
15668
  threshold_type: import_v410.z.string(),
15377
15669
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15378
15670
  });
15671
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15672
+ feature_id: import_v410.z.string(),
15673
+ enabled: import_v410.z.boolean()
15674
+ });
15379
15675
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15380
15676
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15381
- 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()
15382
15682
  });
15383
15683
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15384
15684
  feature_id: import_v410.z.string(),
@@ -15423,6 +15723,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15423
15723
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15424
15724
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15425
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(),
15426
15727
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15427
15728
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15428
15729
  });
@@ -15466,7 +15767,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15466
15767
  });
15467
15768
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15468
15769
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15469
- 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()
15470
15772
  });
15471
15773
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15472
15774
  featureId: import_v410.z.string(),
@@ -15662,6 +15964,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15662
15964
  });
15663
15965
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15664
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(),
15665
15968
  expiry_duration_type: import_v411.z.string(),
15666
15969
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15667
15970
  });
@@ -15746,6 +16049,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15746
16049
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15747
16050
  var previewUpdateRolloverSchema = import_v411.z.object({
15748
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(),
15749
16053
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15750
16054
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15751
16055
  });
@@ -15909,6 +16213,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15909
16213
  });
15910
16214
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15911
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(),
15912
16217
  expiry_duration_type: import_v413.z.string(),
15913
16218
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15914
16219
  });
@@ -15999,6 +16304,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
15999
16304
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
16000
16305
  var setupPaymentRolloverSchema = import_v413.z.object({
16001
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(),
16002
16308
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
16003
16309
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
16004
16310
  });
@@ -16109,6 +16415,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16109
16415
  });
16110
16416
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16111
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(),
16112
16419
  expiry_duration_type: import_v414.z.string(),
16113
16420
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16114
16421
  });
@@ -16189,6 +16496,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16189
16496
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16190
16497
  var billingUpdateRolloverSchema = import_v414.z.object({
16191
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(),
16192
16500
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16193
16501
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16194
16502
  });