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
@@ -78,8 +78,8 @@ var SDK_METADATA = {
78
78
  language: "typescript",
79
79
  openapiDocVersion: "2.2.0",
80
80
  sdkVersion: "0.10.17",
81
- genVersion: "2.869.25",
82
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
81
+ genVersion: "2.879.1",
82
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
83
83
  };
84
84
 
85
85
  // ../sdk/src/lib/http.ts
@@ -1001,8 +1001,8 @@ function applyBearer(state, spec) {
1001
1001
  state.headers[spec.fieldName] = value;
1002
1002
  }
1003
1003
  }
1004
- function resolveGlobalSecurity(security) {
1005
- return resolveSecurity(
1004
+ function resolveGlobalSecurity(security, allowedFields) {
1005
+ let inputs = [
1006
1006
  [
1007
1007
  {
1008
1008
  fieldName: "Authorization",
@@ -1010,7 +1010,16 @@ function resolveGlobalSecurity(security) {
1010
1010
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
1011
1011
  }
1012
1012
  ]
1013
- );
1013
+ ];
1014
+ if (allowedFields) {
1015
+ inputs = allowedFields.map((i) => {
1016
+ if (i < 0 || i >= inputs.length) {
1017
+ throw new RangeError(`invalid allowedFields index ${i}`);
1018
+ }
1019
+ return inputs[i];
1020
+ });
1021
+ }
1022
+ return resolveSecurity(...inputs);
1014
1023
  }
1015
1024
  async function extractSecurity(sec) {
1016
1025
  if (sec == null) {
@@ -1337,6 +1346,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1337
1346
  customRange: z8.optional(
1338
1347
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1339
1348
  ),
1349
+ filterBy: z8.optional(z8.record(z8.string(), z8.string())),
1340
1350
  maxGroups: z8.optional(z8.int())
1341
1351
  }),
1342
1352
  z8.transform((v) => {
@@ -1347,6 +1357,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1347
1357
  groupBy: "group_by",
1348
1358
  binSize: "bin_size",
1349
1359
  customRange: "custom_range",
1360
+ filterBy: "filter_by",
1350
1361
  maxGroups: "max_groups"
1351
1362
  });
1352
1363
  })
@@ -1555,11 +1566,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
1555
1566
  var AttachRollover$outboundSchema = z10.pipe(
1556
1567
  z10.object({
1557
1568
  max: z10.optional(z10.number()),
1569
+ maxPercentage: z10.optional(z10.number()),
1558
1570
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
1559
1571
  expiryDurationLength: z10.optional(z10.number())
1560
1572
  }),
1561
1573
  z10.transform((v) => {
1562
1574
  return remap(v, {
1575
+ maxPercentage: "max_percentage",
1563
1576
  expiryDurationType: "expiry_duration_type",
1564
1577
  expiryDurationLength: "expiry_duration_length"
1565
1578
  });
@@ -2084,11 +2097,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
2084
2097
  var BillingUpdateRollover$outboundSchema = z12.pipe(
2085
2098
  z12.object({
2086
2099
  max: z12.optional(z12.number()),
2100
+ maxPercentage: z12.optional(z12.number()),
2087
2101
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
2088
2102
  expiryDurationLength: z12.optional(z12.number())
2089
2103
  }),
2090
2104
  z12.transform((v) => {
2091
2105
  return remap(v, {
2106
+ maxPercentage: "max_percentage",
2092
2107
  expiryDurationType: "expiry_duration_type",
2093
2108
  expiryDurationLength: "expiry_duration_length"
2094
2109
  });
@@ -2430,11 +2445,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
2430
2445
  })
2431
2446
  );
2432
2447
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
2433
- var CheckRollover$inboundSchema = z13.object({
2434
- max: nullable(number2()),
2435
- duration: z13._default(RolloverDuration$inboundSchema, "month"),
2436
- length: number2()
2437
- });
2448
+ var CheckRollover$inboundSchema = z13.pipe(
2449
+ z13.object({
2450
+ max: z13.optional(z13.nullable(number2())),
2451
+ max_percentage: z13.optional(z13.nullable(number2())),
2452
+ duration: z13._default(RolloverDuration$inboundSchema, "month"),
2453
+ length: number2()
2454
+ }),
2455
+ z13.transform((v) => {
2456
+ return remap(v, {
2457
+ "max_percentage": "maxPercentage"
2458
+ });
2459
+ })
2460
+ );
2438
2461
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2439
2462
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2440
2463
  var Config$inboundSchema = z13.pipe(
@@ -2711,6 +2734,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
2711
2734
  });
2712
2735
  })
2713
2736
  );
2737
+ var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
2738
+ z15.object({
2739
+ featureId: z15.string(),
2740
+ enabled: z15._default(z15.boolean(), false)
2741
+ }),
2742
+ z15.transform((v) => {
2743
+ return remap(v, {
2744
+ featureId: "feature_id"
2745
+ });
2746
+ })
2747
+ );
2714
2748
  var CustomerDataBillingControls$outboundSchema = z15.pipe(
2715
2749
  z15.object({
2716
2750
  autoTopups: z15.optional(
@@ -2721,13 +2755,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
2721
2755
  ),
2722
2756
  usageAlerts: z15.optional(
2723
2757
  z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
2758
+ ),
2759
+ overageAllowed: z15.optional(
2760
+ z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
2724
2761
  )
2725
2762
  }),
2726
2763
  z15.transform((v) => {
2727
2764
  return remap(v, {
2728
2765
  autoTopups: "auto_topups",
2729
2766
  spendLimits: "spend_limits",
2730
- usageAlerts: "usage_alerts"
2767
+ usageAlerts: "usage_alerts",
2768
+ overageAllowed: "overage_allowed"
2731
2769
  });
2732
2770
  })
2733
2771
  );
@@ -2938,11 +2976,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
2938
2976
  var PlanRollover$inboundSchema = z16.pipe(
2939
2977
  z16.object({
2940
2978
  max: nullable(number2()),
2979
+ max_percentage: z16.optional(z16.nullable(number2())),
2941
2980
  expiry_duration_type: ExpiryDurationType$inboundSchema,
2942
2981
  expiry_duration_length: optional2(number2())
2943
2982
  }),
2944
2983
  z16.transform((v) => {
2945
2984
  return remap(v, {
2985
+ "max_percentage": "maxPercentage",
2946
2986
  "expiry_duration_type": "expiryDurationType",
2947
2987
  "expiry_duration_length": "expiryDurationLength"
2948
2988
  });
@@ -3081,6 +3121,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
3081
3121
  });
3082
3122
  })
3083
3123
  );
3124
+ var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
3125
+ z17.object({
3126
+ featureId: z17.string(),
3127
+ enabled: z17._default(z17.boolean(), false)
3128
+ }),
3129
+ z17.transform((v) => {
3130
+ return remap(v, {
3131
+ featureId: "feature_id"
3132
+ });
3133
+ })
3134
+ );
3084
3135
  var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3085
3136
  z17.object({
3086
3137
  spendLimits: z17.optional(
@@ -3088,12 +3139,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3088
3139
  ),
3089
3140
  usageAlerts: z17.optional(
3090
3141
  z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
3142
+ ),
3143
+ overageAllowed: z17.optional(
3144
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
3091
3145
  )
3092
3146
  }),
3093
3147
  z17.transform((v) => {
3094
3148
  return remap(v, {
3095
3149
  spendLimits: "spend_limits",
3096
- usageAlerts: "usage_alerts"
3150
+ usageAlerts: "usage_alerts",
3151
+ overageAllowed: "overage_allowed"
3097
3152
  });
3098
3153
  })
3099
3154
  );
@@ -3250,6 +3305,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
3250
3305
  });
3251
3306
  })
3252
3307
  );
3308
+ var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
3309
+ z17.object({
3310
+ feature_id: string4(),
3311
+ enabled: z17._default(boolean2(), false)
3312
+ }),
3313
+ z17.transform((v) => {
3314
+ return remap(v, {
3315
+ "feature_id": "featureId"
3316
+ });
3317
+ })
3318
+ );
3253
3319
  var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3254
3320
  z17.object({
3255
3321
  spend_limits: optional2(
@@ -3257,12 +3323,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3257
3323
  ),
3258
3324
  usage_alerts: optional2(
3259
3325
  z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
3326
+ ),
3327
+ overage_allowed: optional2(
3328
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
3260
3329
  )
3261
3330
  }),
3262
3331
  z17.transform((v) => {
3263
3332
  return remap(v, {
3264
3333
  "spend_limits": "spendLimits",
3265
- "usage_alerts": "usageAlerts"
3334
+ "usage_alerts": "usageAlerts",
3335
+ "overage_allowed": "overageAllowed"
3266
3336
  });
3267
3337
  })
3268
3338
  );
@@ -3612,11 +3682,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
3612
3682
  var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
3613
3683
  z19.object({
3614
3684
  max: z19.optional(z19.number()),
3685
+ maxPercentage: z19.optional(z19.number()),
3615
3686
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
3616
3687
  expiryDurationLength: z19.optional(z19.number())
3617
3688
  }),
3618
3689
  z19.transform((v) => {
3619
3690
  return remap(v, {
3691
+ maxPercentage: "max_percentage",
3620
3692
  expiryDurationType: "expiry_duration_type",
3621
3693
  expiryDurationLength: "expiry_duration_length"
3622
3694
  });
@@ -3793,11 +3865,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
3793
3865
  var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
3794
3866
  z19.object({
3795
3867
  max: nullable(number2()),
3868
+ max_percentage: z19.optional(z19.nullable(number2())),
3796
3869
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
3797
3870
  expiry_duration_length: optional2(number2())
3798
3871
  }),
3799
3872
  z19.transform((v) => {
3800
3873
  return remap(v, {
3874
+ "max_percentage": "maxPercentage",
3801
3875
  "expiry_duration_type": "expiryDurationType",
3802
3876
  "expiry_duration_length": "expiryDurationLength"
3803
3877
  });
@@ -4019,6 +4093,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
4019
4093
  });
4020
4094
  })
4021
4095
  );
4096
+ var CustomerOverageAllowed$inboundSchema = z21.pipe(
4097
+ z21.object({
4098
+ feature_id: string4(),
4099
+ enabled: z21._default(boolean2(), false)
4100
+ }),
4101
+ z21.transform((v) => {
4102
+ return remap(v, {
4103
+ "feature_id": "featureId"
4104
+ });
4105
+ })
4106
+ );
4022
4107
  var CustomerBillingControls$inboundSchema = z21.pipe(
4023
4108
  z21.object({
4024
4109
  auto_topups: optional2(
@@ -4029,13 +4114,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
4029
4114
  ),
4030
4115
  usage_alerts: optional2(
4031
4116
  z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
4117
+ ),
4118
+ overage_allowed: optional2(
4119
+ z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
4032
4120
  )
4033
4121
  }),
4034
4122
  z21.transform((v) => {
4035
4123
  return remap(v, {
4036
4124
  "auto_topups": "autoTopups",
4037
4125
  "spend_limits": "spendLimits",
4038
- "usage_alerts": "usageAlerts"
4126
+ "usage_alerts": "usageAlerts",
4127
+ "overage_allowed": "overageAllowed"
4039
4128
  });
4040
4129
  })
4041
4130
  );
@@ -4574,6 +4663,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
4574
4663
  });
4575
4664
  })
4576
4665
  );
4666
+ var GetEntityOverageAllowed$inboundSchema = z28.pipe(
4667
+ z28.object({
4668
+ feature_id: string4(),
4669
+ enabled: z28._default(boolean2(), false)
4670
+ }),
4671
+ z28.transform((v) => {
4672
+ return remap(v, {
4673
+ "feature_id": "featureId"
4674
+ });
4675
+ })
4676
+ );
4577
4677
  var GetEntityBillingControls$inboundSchema = z28.pipe(
4578
4678
  z28.object({
4579
4679
  spend_limits: optional2(
@@ -4581,12 +4681,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
4581
4681
  ),
4582
4682
  usage_alerts: optional2(
4583
4683
  z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
4684
+ ),
4685
+ overage_allowed: optional2(
4686
+ z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
4584
4687
  )
4585
4688
  }),
4586
4689
  z28.transform((v) => {
4587
4690
  return remap(v, {
4588
4691
  "spend_limits": "spendLimits",
4589
- "usage_alerts": "usageAlerts"
4692
+ "usage_alerts": "usageAlerts",
4693
+ "overage_allowed": "overageAllowed"
4590
4694
  });
4591
4695
  })
4592
4696
  );
@@ -4764,6 +4868,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
4764
4868
  });
4765
4869
  })
4766
4870
  );
4871
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
4872
+ z30.object({
4873
+ featureId: z30.string(),
4874
+ enabled: z30._default(z30.boolean(), false)
4875
+ }),
4876
+ z30.transform((v) => {
4877
+ return remap(v, {
4878
+ featureId: "feature_id"
4879
+ });
4880
+ })
4881
+ );
4767
4882
  var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4768
4883
  z30.object({
4769
4884
  autoTopups: z30.optional(
@@ -4774,13 +4889,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4774
4889
  ),
4775
4890
  usageAlerts: z30.optional(
4776
4891
  z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
4892
+ ),
4893
+ overageAllowed: z30.optional(
4894
+ z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
4777
4895
  )
4778
4896
  }),
4779
4897
  z30.transform((v) => {
4780
4898
  return remap(v, {
4781
4899
  autoTopups: "auto_topups",
4782
4900
  spendLimits: "spend_limits",
4783
- usageAlerts: "usage_alerts"
4901
+ usageAlerts: "usage_alerts",
4902
+ overageAllowed: "overage_allowed"
4784
4903
  });
4785
4904
  })
4786
4905
  );
@@ -5005,11 +5124,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
5005
5124
  var GetPlanRollover$inboundSchema = z31.pipe(
5006
5125
  z31.object({
5007
5126
  max: nullable(number2()),
5127
+ max_percentage: z31.optional(z31.nullable(number2())),
5008
5128
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
5009
5129
  expiry_duration_length: optional2(number2())
5010
5130
  }),
5011
5131
  z31.transform((v) => {
5012
5132
  return remap(v, {
5133
+ "max_percentage": "maxPercentage",
5013
5134
  "expiry_duration_type": "expiryDurationType",
5014
5135
  "expiry_duration_length": "expiryDurationLength"
5015
5136
  });
@@ -5237,6 +5358,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
5237
5358
  });
5238
5359
  })
5239
5360
  );
5361
+ var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
5362
+ z32.object({
5363
+ feature_id: string4(),
5364
+ enabled: z32._default(boolean2(), false)
5365
+ }),
5366
+ z32.transform((v) => {
5367
+ return remap(v, {
5368
+ "feature_id": "featureId"
5369
+ });
5370
+ })
5371
+ );
5240
5372
  var ListCustomersBillingControls$inboundSchema = z32.pipe(
5241
5373
  z32.object({
5242
5374
  auto_topups: optional2(
@@ -5247,13 +5379,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
5247
5379
  ),
5248
5380
  usage_alerts: optional2(
5249
5381
  z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
5382
+ ),
5383
+ overage_allowed: optional2(
5384
+ z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
5250
5385
  )
5251
5386
  }),
5252
5387
  z32.transform((v) => {
5253
5388
  return remap(v, {
5254
5389
  "auto_topups": "autoTopups",
5255
5390
  "spend_limits": "spendLimits",
5256
- "usage_alerts": "usageAlerts"
5391
+ "usage_alerts": "usageAlerts",
5392
+ "overage_allowed": "overageAllowed"
5257
5393
  });
5258
5394
  })
5259
5395
  );
@@ -5708,11 +5844,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
5708
5844
  var ListPlansRollover$inboundSchema = z35.pipe(
5709
5845
  z35.object({
5710
5846
  max: nullable(number2()),
5847
+ max_percentage: z35.optional(z35.nullable(number2())),
5711
5848
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
5712
5849
  expiry_duration_length: optional2(number2())
5713
5850
  }),
5714
5851
  z35.transform((v) => {
5715
5852
  return remap(v, {
5853
+ "max_percentage": "maxPercentage",
5716
5854
  "expiry_duration_type": "expiryDurationType",
5717
5855
  "expiry_duration_length": "expiryDurationLength"
5718
5856
  });
@@ -5956,11 +6094,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
5956
6094
  var MultiAttachRollover$outboundSchema = z36.pipe(
5957
6095
  z36.object({
5958
6096
  max: z36.optional(z36.number()),
6097
+ maxPercentage: z36.optional(z36.number()),
5959
6098
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
5960
6099
  expiryDurationLength: z36.optional(z36.number())
5961
6100
  }),
5962
6101
  z36.transform((v) => {
5963
6102
  return remap(v, {
6103
+ maxPercentage: "max_percentage",
5964
6104
  expiryDurationType: "expiry_duration_type",
5965
6105
  expiryDurationLength: "expiry_duration_length"
5966
6106
  });
@@ -6087,6 +6227,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
6087
6227
  });
6088
6228
  })
6089
6229
  );
6230
+ var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
6231
+ z36.object({
6232
+ featureId: z36.string(),
6233
+ enabled: z36._default(z36.boolean(), false)
6234
+ }),
6235
+ z36.transform((v) => {
6236
+ return remap(v, {
6237
+ featureId: "feature_id"
6238
+ });
6239
+ })
6240
+ );
6090
6241
  var MultiAttachBillingControls$outboundSchema = z36.pipe(
6091
6242
  z36.object({
6092
6243
  spendLimits: z36.optional(
@@ -6094,12 +6245,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
6094
6245
  ),
6095
6246
  usageAlerts: z36.optional(
6096
6247
  z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
6248
+ ),
6249
+ overageAllowed: z36.optional(
6250
+ z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
6097
6251
  )
6098
6252
  }),
6099
6253
  z36.transform((v) => {
6100
6254
  return remap(v, {
6101
6255
  spendLimits: "spend_limits",
6102
- usageAlerts: "usage_alerts"
6256
+ usageAlerts: "usage_alerts",
6257
+ overageAllowed: "overage_allowed"
6103
6258
  });
6104
6259
  })
6105
6260
  );
@@ -6393,11 +6548,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
6393
6548
  var PreviewAttachRollover$outboundSchema = z38.pipe(
6394
6549
  z38.object({
6395
6550
  max: z38.optional(z38.number()),
6551
+ maxPercentage: z38.optional(z38.number()),
6396
6552
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
6397
6553
  expiryDurationLength: z38.optional(z38.number())
6398
6554
  }),
6399
6555
  z38.transform((v) => {
6400
6556
  return remap(v, {
6557
+ maxPercentage: "max_percentage",
6401
6558
  expiryDurationType: "expiry_duration_type",
6402
6559
  expiryDurationLength: "expiry_duration_length"
6403
6560
  });
@@ -6941,11 +7098,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
6941
7098
  var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
6942
7099
  z39.object({
6943
7100
  max: z39.optional(z39.number()),
7101
+ maxPercentage: z39.optional(z39.number()),
6944
7102
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
6945
7103
  expiryDurationLength: z39.optional(z39.number())
6946
7104
  }),
6947
7105
  z39.transform((v) => {
6948
7106
  return remap(v, {
7107
+ maxPercentage: "max_percentage",
6949
7108
  expiryDurationType: "expiry_duration_type",
6950
7109
  expiryDurationLength: "expiry_duration_length"
6951
7110
  });
@@ -7085,6 +7244,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
7085
7244
  });
7086
7245
  })
7087
7246
  );
7247
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
7248
+ z39.object({
7249
+ featureId: z39.string(),
7250
+ enabled: z39._default(z39.boolean(), false)
7251
+ }),
7252
+ z39.transform((v) => {
7253
+ return remap(v, {
7254
+ featureId: "feature_id"
7255
+ });
7256
+ })
7257
+ );
7088
7258
  var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7089
7259
  z39.object({
7090
7260
  spendLimits: z39.optional(
@@ -7092,12 +7262,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7092
7262
  ),
7093
7263
  usageAlerts: z39.optional(
7094
7264
  z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
7265
+ ),
7266
+ overageAllowed: z39.optional(
7267
+ z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
7095
7268
  )
7096
7269
  }),
7097
7270
  z39.transform((v) => {
7098
7271
  return remap(v, {
7099
7272
  spendLimits: "spend_limits",
7100
- usageAlerts: "usage_alerts"
7273
+ usageAlerts: "usage_alerts",
7274
+ overageAllowed: "overage_allowed"
7101
7275
  });
7102
7276
  })
7103
7277
  );
@@ -7553,11 +7727,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
7553
7727
  var PreviewUpdateRollover$outboundSchema = z40.pipe(
7554
7728
  z40.object({
7555
7729
  max: z40.optional(z40.number()),
7730
+ maxPercentage: z40.optional(z40.number()),
7556
7731
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
7557
7732
  expiryDurationLength: z40.optional(z40.number())
7558
7733
  }),
7559
7734
  z40.transform((v) => {
7560
7735
  return remap(v, {
7736
+ maxPercentage: "max_percentage",
7561
7737
  expiryDurationType: "expiry_duration_type",
7562
7738
  expiryDurationLength: "expiry_duration_length"
7563
7739
  });
@@ -8073,11 +8249,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
8073
8249
  var SetupPaymentRollover$outboundSchema = z42.pipe(
8074
8250
  z42.object({
8075
8251
  max: z42.optional(z42.number()),
8252
+ maxPercentage: z42.optional(z42.number()),
8076
8253
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
8077
8254
  expiryDurationLength: z42.optional(z42.number())
8078
8255
  }),
8079
8256
  z42.transform((v) => {
8080
8257
  return remap(v, {
8258
+ maxPercentage: "max_percentage",
8081
8259
  expiryDurationType: "expiry_duration_type",
8082
8260
  expiryDurationLength: "expiry_duration_length"
8083
8261
  });
@@ -8422,6 +8600,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
8422
8600
  });
8423
8601
  })
8424
8602
  );
8603
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
8604
+ z45.object({
8605
+ featureId: z45.string(),
8606
+ enabled: z45._default(z45.boolean(), false)
8607
+ }),
8608
+ z45.transform((v) => {
8609
+ return remap(v, {
8610
+ featureId: "feature_id"
8611
+ });
8612
+ })
8613
+ );
8425
8614
  var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8426
8615
  z45.object({
8427
8616
  autoTopups: z45.optional(
@@ -8432,13 +8621,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8432
8621
  ),
8433
8622
  usageAlerts: z45.optional(
8434
8623
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
8624
+ ),
8625
+ overageAllowed: z45.optional(
8626
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
8435
8627
  )
8436
8628
  }),
8437
8629
  z45.transform((v) => {
8438
8630
  return remap(v, {
8439
8631
  autoTopups: "auto_topups",
8440
8632
  spendLimits: "spend_limits",
8441
- usageAlerts: "usage_alerts"
8633
+ usageAlerts: "usage_alerts",
8634
+ overageAllowed: "overage_allowed"
8442
8635
  });
8443
8636
  })
8444
8637
  );
@@ -8526,6 +8719,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
8526
8719
  });
8527
8720
  })
8528
8721
  );
8722
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
8723
+ z45.object({
8724
+ feature_id: string4(),
8725
+ enabled: z45._default(boolean2(), false)
8726
+ }),
8727
+ z45.transform((v) => {
8728
+ return remap(v, {
8729
+ "feature_id": "featureId"
8730
+ });
8731
+ })
8732
+ );
8529
8733
  var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8530
8734
  z45.object({
8531
8735
  auto_topups: optional2(
@@ -8536,13 +8740,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8536
8740
  ),
8537
8741
  usage_alerts: optional2(
8538
8742
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
8743
+ ),
8744
+ overage_allowed: optional2(
8745
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
8539
8746
  )
8540
8747
  }),
8541
8748
  z45.transform((v) => {
8542
8749
  return remap(v, {
8543
8750
  "auto_topups": "autoTopups",
8544
8751
  "spend_limits": "spendLimits",
8545
- "usage_alerts": "usageAlerts"
8752
+ "usage_alerts": "usageAlerts",
8753
+ "overage_allowed": "overageAllowed"
8546
8754
  });
8547
8755
  })
8548
8756
  );
@@ -8734,6 +8942,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
8734
8942
  });
8735
8943
  })
8736
8944
  );
8945
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
8946
+ z46.object({
8947
+ featureId: z46.string(),
8948
+ enabled: z46._default(z46.boolean(), false)
8949
+ }),
8950
+ z46.transform((v) => {
8951
+ return remap(v, {
8952
+ featureId: "feature_id"
8953
+ });
8954
+ })
8955
+ );
8737
8956
  var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8738
8957
  z46.object({
8739
8958
  spendLimits: z46.optional(
@@ -8741,12 +8960,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8741
8960
  ),
8742
8961
  usageAlerts: z46.optional(
8743
8962
  z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
8963
+ ),
8964
+ overageAllowed: z46.optional(
8965
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
8744
8966
  )
8745
8967
  }),
8746
8968
  z46.transform((v) => {
8747
8969
  return remap(v, {
8748
8970
  spendLimits: "spend_limits",
8749
- usageAlerts: "usage_alerts"
8971
+ usageAlerts: "usage_alerts",
8972
+ overageAllowed: "overage_allowed"
8750
8973
  });
8751
8974
  })
8752
8975
  );
@@ -8898,6 +9121,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
8898
9121
  });
8899
9122
  })
8900
9123
  );
9124
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
9125
+ z46.object({
9126
+ feature_id: string4(),
9127
+ enabled: z46._default(boolean2(), false)
9128
+ }),
9129
+ z46.transform((v) => {
9130
+ return remap(v, {
9131
+ "feature_id": "featureId"
9132
+ });
9133
+ })
9134
+ );
8901
9135
  var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8902
9136
  z46.object({
8903
9137
  spend_limits: optional2(
@@ -8905,12 +9139,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8905
9139
  ),
8906
9140
  usage_alerts: optional2(
8907
9141
  z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
9142
+ ),
9143
+ overage_allowed: optional2(
9144
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
8908
9145
  )
8909
9146
  }),
8910
9147
  z46.transform((v) => {
8911
9148
  return remap(v, {
8912
9149
  "spend_limits": "spendLimits",
8913
- "usage_alerts": "usageAlerts"
9150
+ "usage_alerts": "usageAlerts",
9151
+ "overage_allowed": "overageAllowed"
8914
9152
  });
8915
9153
  })
8916
9154
  );
@@ -9263,11 +9501,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
9263
9501
  var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
9264
9502
  z48.object({
9265
9503
  max: z48.optional(z48.number()),
9504
+ maxPercentage: z48.optional(z48.number()),
9266
9505
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
9267
9506
  expiryDurationLength: z48.optional(z48.number())
9268
9507
  }),
9269
9508
  z48.transform((v) => {
9270
9509
  return remap(v, {
9510
+ maxPercentage: "max_percentage",
9271
9511
  expiryDurationType: "expiry_duration_type",
9272
9512
  expiryDurationLength: "expiry_duration_length"
9273
9513
  });
@@ -9452,11 +9692,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
9452
9692
  var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
9453
9693
  z48.object({
9454
9694
  max: nullable(number2()),
9695
+ max_percentage: z48.optional(z48.nullable(number2())),
9455
9696
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
9456
9697
  expiry_duration_length: optional2(number2())
9457
9698
  }),
9458
9699
  z48.transform((v) => {
9459
9700
  return remap(v, {
9701
+ "max_percentage": "maxPercentage",
9460
9702
  "expiry_duration_type": "expiryDurationType",
9461
9703
  "expiry_duration_length": "expiryDurationLength"
9462
9704
  });
@@ -9733,7 +9975,8 @@ async function $do2(client, request, options) {
9733
9975
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
9734
9976
  "check",
9735
9977
  "track",
9736
- "getOrCreateCustomer"
9978
+ "getOrCreateCustomer",
9979
+ "getEntity"
9737
9980
  ]);
9738
9981
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
9739
9982
  var FAIL_OPEN_BODIES = {
@@ -9763,6 +10006,18 @@ var FAIL_OPEN_BODIES = {
9763
10006
  purchases: [],
9764
10007
  balances: {},
9765
10008
  flags: {}
10009
+ },
10010
+ getEntity: {
10011
+ id: null,
10012
+ name: null,
10013
+ customer_id: null,
10014
+ feature_id: null,
10015
+ created_at: 0,
10016
+ env: "live",
10017
+ subscriptions: [],
10018
+ purchases: [],
10019
+ balances: {},
10020
+ flags: {}
9766
10021
  }
9767
10022
  };
9768
10023
  var FailOpenHook = class {
@@ -14040,6 +14295,7 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14040
14295
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14041
14296
  bin_size: import_v4.z.string(),
14042
14297
  custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14298
+ filter_by: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14043
14299
  max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14044
14300
  });
14045
14301
  var closedEnumSchema = import_v4.z.any();
@@ -14053,6 +14309,7 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14053
14309
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14054
14310
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14055
14311
  customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14312
+ filterBy: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14056
14313
  maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14057
14314
  });
14058
14315
 
@@ -14136,6 +14393,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14136
14393
  });
14137
14394
  var attachRolloverOutboundSchema = import_v42.z.object({
14138
14395
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14396
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14139
14397
  expiry_duration_type: import_v42.z.string(),
14140
14398
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14141
14399
  });
@@ -14236,6 +14494,7 @@ var attachProrationSchema = import_v42.z.object({
14236
14494
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14237
14495
  var attachRolloverSchema = import_v42.z.object({
14238
14496
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14497
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14239
14498
  expiryDurationType: attachExpiryDurationTypeSchema,
14240
14499
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14241
14500
  });
@@ -14326,6 +14585,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14326
14585
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14327
14586
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14328
14587
  });
14588
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
14589
+ featureId: import_v44.z.string(),
14590
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
14591
+ });
14329
14592
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14330
14593
  interval: import_v44.z.string(),
14331
14594
  interval_count: import_v44.z.number(),
@@ -14350,6 +14613,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14350
14613
  threshold_type: import_v44.z.string(),
14351
14614
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14352
14615
  });
14616
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14617
+ feature_id: import_v44.z.string(),
14618
+ enabled: import_v44.z.boolean()
14619
+ });
14353
14620
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14354
14621
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14355
14622
  spend_limits: import_v44.z.union([
@@ -14359,6 +14626,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14359
14626
  usage_alerts: import_v44.z.union([
14360
14627
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14361
14628
  import_v44.z.undefined()
14629
+ ]).optional(),
14630
+ overage_allowed: import_v44.z.union([
14631
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
14632
+ import_v44.z.undefined()
14362
14633
  ]).optional()
14363
14634
  });
14364
14635
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14399,7 +14670,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14399
14670
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14400
14671
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14401
14672
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14402
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
14673
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
14674
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
14403
14675
  });
14404
14676
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14405
14677
  customerId: import_v44.z.string().nullable(),
@@ -14538,6 +14810,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14538
14810
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14539
14811
  var listPlansRolloverSchema = import_v46.z.object({
14540
14812
  max: import_v46.z.number().nullable(),
14813
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14541
14814
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14542
14815
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14543
14816
  });
@@ -14618,6 +14891,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14618
14891
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14619
14892
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14620
14893
  });
14894
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
14895
+ featureId: import_v47.z.string(),
14896
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
14897
+ });
14621
14898
  var multiAttachInvoiceSchema = import_v47.z.object({
14622
14899
  status: import_v47.z.string().nullable(),
14623
14900
  stripeId: import_v47.z.string(),
@@ -14656,6 +14933,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14656
14933
  });
14657
14934
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14658
14935
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14936
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14659
14937
  expiry_duration_type: import_v47.z.string(),
14660
14938
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14661
14939
  });
@@ -14710,9 +14988,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14710
14988
  threshold_type: import_v47.z.string(),
14711
14989
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14712
14990
  });
14991
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
14992
+ feature_id: import_v47.z.string(),
14993
+ enabled: import_v47.z.boolean()
14994
+ });
14713
14995
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14714
14996
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14715
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
14997
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
14998
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
14716
14999
  });
14717
15000
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14718
15001
  feature_id: import_v47.z.string(),
@@ -14756,6 +15039,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14756
15039
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14757
15040
  var multiAttachRolloverSchema = import_v47.z.object({
14758
15041
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
15042
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14759
15043
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14760
15044
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14761
15045
  });
@@ -14796,7 +15080,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14796
15080
  });
14797
15081
  var multiAttachBillingControlsSchema = import_v47.z.object({
14798
15082
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14799
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
15083
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
15084
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
14800
15085
  });
14801
15086
  var multiAttachEntityDataSchema = import_v47.z.object({
14802
15087
  featureId: import_v47.z.string(),
@@ -15004,6 +15289,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
15004
15289
  });
15005
15290
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
15006
15291
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15292
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15007
15293
  expiry_duration_type: import_v49.z.string(),
15008
15294
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15009
15295
  });
@@ -15108,6 +15394,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15108
15394
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15109
15395
  var previewAttachRolloverSchema = import_v49.z.object({
15110
15396
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15397
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15111
15398
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15112
15399
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15113
15400
  });
@@ -15217,6 +15504,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15217
15504
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15218
15505
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15219
15506
  });
15507
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
15508
+ featureId: import_v410.z.string(),
15509
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
15510
+ });
15220
15511
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15221
15512
  amountOff: import_v410.z.number(),
15222
15513
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15318,6 +15609,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15318
15609
  });
15319
15610
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15320
15611
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15612
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15321
15613
  expiry_duration_type: import_v410.z.string(),
15322
15614
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15323
15615
  });
@@ -15375,9 +15667,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15375
15667
  threshold_type: import_v410.z.string(),
15376
15668
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15377
15669
  });
15670
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15671
+ feature_id: import_v410.z.string(),
15672
+ enabled: import_v410.z.boolean()
15673
+ });
15378
15674
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15379
15675
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15380
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
15676
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
15677
+ overage_allowed: import_v410.z.union([
15678
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
15679
+ import_v410.z.undefined()
15680
+ ]).optional()
15381
15681
  });
15382
15682
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15383
15683
  feature_id: import_v410.z.string(),
@@ -15422,6 +15722,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15422
15722
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15423
15723
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15424
15724
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15725
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15425
15726
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15426
15727
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15427
15728
  });
@@ -15465,7 +15766,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15465
15766
  });
15466
15767
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15467
15768
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15468
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
15769
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
15770
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
15469
15771
  });
15470
15772
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15471
15773
  featureId: import_v410.z.string(),
@@ -15661,6 +15963,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15661
15963
  });
15662
15964
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15663
15965
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15966
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15664
15967
  expiry_duration_type: import_v411.z.string(),
15665
15968
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15666
15969
  });
@@ -15745,6 +16048,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15745
16048
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15746
16049
  var previewUpdateRolloverSchema = import_v411.z.object({
15747
16050
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
16051
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15748
16052
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15749
16053
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15750
16054
  });
@@ -15908,6 +16212,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15908
16212
  });
15909
16213
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15910
16214
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16215
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15911
16216
  expiry_duration_type: import_v413.z.string(),
15912
16217
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15913
16218
  });
@@ -15998,6 +16303,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
15998
16303
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
15999
16304
  var setupPaymentRolloverSchema = import_v413.z.object({
16000
16305
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16306
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16001
16307
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
16002
16308
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
16003
16309
  });
@@ -16108,6 +16414,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16108
16414
  });
16109
16415
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16110
16416
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16417
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16111
16418
  expiry_duration_type: import_v414.z.string(),
16112
16419
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16113
16420
  });
@@ -16188,6 +16495,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16188
16495
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16189
16496
  var billingUpdateRolloverSchema = import_v414.z.object({
16190
16497
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16498
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16191
16499
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16192
16500
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16193
16501
  });