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 {
@@ -14024,6 +14279,7 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14024
14279
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14025
14280
  bin_size: import_v4.z.string(),
14026
14281
  custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14282
+ filter_by: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14027
14283
  max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14028
14284
  });
14029
14285
  var closedEnumSchema = import_v4.z.any();
@@ -14037,6 +14293,7 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14037
14293
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14038
14294
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14039
14295
  customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14296
+ filterBy: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14040
14297
  maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14041
14298
  });
14042
14299
 
@@ -14120,6 +14377,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14120
14377
  });
14121
14378
  var attachRolloverOutboundSchema = import_v42.z.object({
14122
14379
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14380
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14123
14381
  expiry_duration_type: import_v42.z.string(),
14124
14382
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14125
14383
  });
@@ -14220,6 +14478,7 @@ var attachProrationSchema = import_v42.z.object({
14220
14478
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14221
14479
  var attachRolloverSchema = import_v42.z.object({
14222
14480
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14481
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14223
14482
  expiryDurationType: attachExpiryDurationTypeSchema,
14224
14483
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14225
14484
  });
@@ -14310,6 +14569,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14310
14569
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14311
14570
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14312
14571
  });
14572
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
14573
+ featureId: import_v44.z.string(),
14574
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
14575
+ });
14313
14576
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14314
14577
  interval: import_v44.z.string(),
14315
14578
  interval_count: import_v44.z.number(),
@@ -14334,6 +14597,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14334
14597
  threshold_type: import_v44.z.string(),
14335
14598
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14336
14599
  });
14600
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14601
+ feature_id: import_v44.z.string(),
14602
+ enabled: import_v44.z.boolean()
14603
+ });
14337
14604
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14338
14605
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14339
14606
  spend_limits: import_v44.z.union([
@@ -14343,6 +14610,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14343
14610
  usage_alerts: import_v44.z.union([
14344
14611
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14345
14612
  import_v44.z.undefined()
14613
+ ]).optional(),
14614
+ overage_allowed: import_v44.z.union([
14615
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
14616
+ import_v44.z.undefined()
14346
14617
  ]).optional()
14347
14618
  });
14348
14619
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14383,7 +14654,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14383
14654
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14384
14655
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14385
14656
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14386
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
14657
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
14658
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
14387
14659
  });
14388
14660
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14389
14661
  customerId: import_v44.z.string().nullable(),
@@ -14522,6 +14794,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14522
14794
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14523
14795
  var listPlansRolloverSchema = import_v46.z.object({
14524
14796
  max: import_v46.z.number().nullable(),
14797
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14525
14798
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14526
14799
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14527
14800
  });
@@ -14602,6 +14875,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14602
14875
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14603
14876
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14604
14877
  });
14878
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
14879
+ featureId: import_v47.z.string(),
14880
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
14881
+ });
14605
14882
  var multiAttachInvoiceSchema = import_v47.z.object({
14606
14883
  status: import_v47.z.string().nullable(),
14607
14884
  stripeId: import_v47.z.string(),
@@ -14640,6 +14917,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14640
14917
  });
14641
14918
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14642
14919
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14920
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14643
14921
  expiry_duration_type: import_v47.z.string(),
14644
14922
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14645
14923
  });
@@ -14694,9 +14972,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14694
14972
  threshold_type: import_v47.z.string(),
14695
14973
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14696
14974
  });
14975
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
14976
+ feature_id: import_v47.z.string(),
14977
+ enabled: import_v47.z.boolean()
14978
+ });
14697
14979
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14698
14980
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14699
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
14981
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
14982
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
14700
14983
  });
14701
14984
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14702
14985
  feature_id: import_v47.z.string(),
@@ -14740,6 +15023,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14740
15023
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14741
15024
  var multiAttachRolloverSchema = import_v47.z.object({
14742
15025
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
15026
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14743
15027
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14744
15028
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14745
15029
  });
@@ -14780,7 +15064,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14780
15064
  });
14781
15065
  var multiAttachBillingControlsSchema = import_v47.z.object({
14782
15066
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14783
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
15067
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
15068
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
14784
15069
  });
14785
15070
  var multiAttachEntityDataSchema = import_v47.z.object({
14786
15071
  featureId: import_v47.z.string(),
@@ -14988,6 +15273,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
14988
15273
  });
14989
15274
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
14990
15275
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15276
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
14991
15277
  expiry_duration_type: import_v49.z.string(),
14992
15278
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
14993
15279
  });
@@ -15092,6 +15378,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15092
15378
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15093
15379
  var previewAttachRolloverSchema = import_v49.z.object({
15094
15380
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15381
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15095
15382
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15096
15383
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15097
15384
  });
@@ -15201,6 +15488,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15201
15488
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15202
15489
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15203
15490
  });
15491
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
15492
+ featureId: import_v410.z.string(),
15493
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
15494
+ });
15204
15495
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15205
15496
  amountOff: import_v410.z.number(),
15206
15497
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15302,6 +15593,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15302
15593
  });
15303
15594
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15304
15595
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15596
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15305
15597
  expiry_duration_type: import_v410.z.string(),
15306
15598
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15307
15599
  });
@@ -15359,9 +15651,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15359
15651
  threshold_type: import_v410.z.string(),
15360
15652
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15361
15653
  });
15654
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15655
+ feature_id: import_v410.z.string(),
15656
+ enabled: import_v410.z.boolean()
15657
+ });
15362
15658
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15363
15659
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15364
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
15660
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
15661
+ overage_allowed: import_v410.z.union([
15662
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
15663
+ import_v410.z.undefined()
15664
+ ]).optional()
15365
15665
  });
15366
15666
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15367
15667
  feature_id: import_v410.z.string(),
@@ -15406,6 +15706,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15406
15706
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15407
15707
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15408
15708
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15709
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15409
15710
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15410
15711
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15411
15712
  });
@@ -15449,7 +15750,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15449
15750
  });
15450
15751
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15451
15752
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15452
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
15753
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
15754
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
15453
15755
  });
15454
15756
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15455
15757
  featureId: import_v410.z.string(),
@@ -15645,6 +15947,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15645
15947
  });
15646
15948
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15647
15949
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15950
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15648
15951
  expiry_duration_type: import_v411.z.string(),
15649
15952
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15650
15953
  });
@@ -15729,6 +16032,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15729
16032
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15730
16033
  var previewUpdateRolloverSchema = import_v411.z.object({
15731
16034
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
16035
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15732
16036
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15733
16037
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15734
16038
  });
@@ -15892,6 +16196,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15892
16196
  });
15893
16197
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15894
16198
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16199
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15895
16200
  expiry_duration_type: import_v413.z.string(),
15896
16201
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15897
16202
  });
@@ -15982,6 +16287,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
15982
16287
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
15983
16288
  var setupPaymentRolloverSchema = import_v413.z.object({
15984
16289
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16290
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15985
16291
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
15986
16292
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15987
16293
  });
@@ -16092,6 +16398,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16092
16398
  });
16093
16399
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16094
16400
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16401
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16095
16402
  expiry_duration_type: import_v414.z.string(),
16096
16403
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16097
16404
  });
@@ -16172,6 +16479,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16172
16479
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16173
16480
  var billingUpdateRolloverSchema = import_v414.z.object({
16174
16481
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16482
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16175
16483
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16176
16484
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16177
16485
  });