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
@@ -82,8 +82,8 @@ var SDK_METADATA = {
82
82
  language: "typescript",
83
83
  openapiDocVersion: "2.2.0",
84
84
  sdkVersion: "0.10.17",
85
- genVersion: "2.869.25",
86
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
85
+ genVersion: "2.879.1",
86
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
87
87
  };
88
88
 
89
89
  // ../sdk/src/lib/http.ts
@@ -1005,8 +1005,8 @@ function applyBearer(state, spec) {
1005
1005
  state.headers[spec.fieldName] = value;
1006
1006
  }
1007
1007
  }
1008
- function resolveGlobalSecurity(security) {
1009
- return resolveSecurity(
1008
+ function resolveGlobalSecurity(security, allowedFields) {
1009
+ let inputs = [
1010
1010
  [
1011
1011
  {
1012
1012
  fieldName: "Authorization",
@@ -1014,7 +1014,16 @@ function resolveGlobalSecurity(security) {
1014
1014
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
1015
1015
  }
1016
1016
  ]
1017
- );
1017
+ ];
1018
+ if (allowedFields) {
1019
+ inputs = allowedFields.map((i) => {
1020
+ if (i < 0 || i >= inputs.length) {
1021
+ throw new RangeError(`invalid allowedFields index ${i}`);
1022
+ }
1023
+ return inputs[i];
1024
+ });
1025
+ }
1026
+ return resolveSecurity(...inputs);
1018
1027
  }
1019
1028
  async function extractSecurity(sec) {
1020
1029
  if (sec == null) {
@@ -1341,6 +1350,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1341
1350
  customRange: z8.optional(
1342
1351
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1343
1352
  ),
1353
+ filterBy: z8.optional(z8.record(z8.string(), z8.string())),
1344
1354
  maxGroups: z8.optional(z8.int())
1345
1355
  }),
1346
1356
  z8.transform((v) => {
@@ -1351,6 +1361,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1351
1361
  groupBy: "group_by",
1352
1362
  binSize: "bin_size",
1353
1363
  customRange: "custom_range",
1364
+ filterBy: "filter_by",
1354
1365
  maxGroups: "max_groups"
1355
1366
  });
1356
1367
  })
@@ -1559,11 +1570,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
1559
1570
  var AttachRollover$outboundSchema = z10.pipe(
1560
1571
  z10.object({
1561
1572
  max: z10.optional(z10.number()),
1573
+ maxPercentage: z10.optional(z10.number()),
1562
1574
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
1563
1575
  expiryDurationLength: z10.optional(z10.number())
1564
1576
  }),
1565
1577
  z10.transform((v) => {
1566
1578
  return remap(v, {
1579
+ maxPercentage: "max_percentage",
1567
1580
  expiryDurationType: "expiry_duration_type",
1568
1581
  expiryDurationLength: "expiry_duration_length"
1569
1582
  });
@@ -2088,11 +2101,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
2088
2101
  var BillingUpdateRollover$outboundSchema = z12.pipe(
2089
2102
  z12.object({
2090
2103
  max: z12.optional(z12.number()),
2104
+ maxPercentage: z12.optional(z12.number()),
2091
2105
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
2092
2106
  expiryDurationLength: z12.optional(z12.number())
2093
2107
  }),
2094
2108
  z12.transform((v) => {
2095
2109
  return remap(v, {
2110
+ maxPercentage: "max_percentage",
2096
2111
  expiryDurationType: "expiry_duration_type",
2097
2112
  expiryDurationLength: "expiry_duration_length"
2098
2113
  });
@@ -2434,11 +2449,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
2434
2449
  })
2435
2450
  );
2436
2451
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
2437
- var CheckRollover$inboundSchema = z13.object({
2438
- max: nullable(number2()),
2439
- duration: z13._default(RolloverDuration$inboundSchema, "month"),
2440
- length: number2()
2441
- });
2452
+ var CheckRollover$inboundSchema = z13.pipe(
2453
+ z13.object({
2454
+ max: z13.optional(z13.nullable(number2())),
2455
+ max_percentage: z13.optional(z13.nullable(number2())),
2456
+ duration: z13._default(RolloverDuration$inboundSchema, "month"),
2457
+ length: number2()
2458
+ }),
2459
+ z13.transform((v) => {
2460
+ return remap(v, {
2461
+ "max_percentage": "maxPercentage"
2462
+ });
2463
+ })
2464
+ );
2442
2465
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2443
2466
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2444
2467
  var Config$inboundSchema = z13.pipe(
@@ -2715,6 +2738,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
2715
2738
  });
2716
2739
  })
2717
2740
  );
2741
+ var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
2742
+ z15.object({
2743
+ featureId: z15.string(),
2744
+ enabled: z15._default(z15.boolean(), false)
2745
+ }),
2746
+ z15.transform((v) => {
2747
+ return remap(v, {
2748
+ featureId: "feature_id"
2749
+ });
2750
+ })
2751
+ );
2718
2752
  var CustomerDataBillingControls$outboundSchema = z15.pipe(
2719
2753
  z15.object({
2720
2754
  autoTopups: z15.optional(
@@ -2725,13 +2759,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
2725
2759
  ),
2726
2760
  usageAlerts: z15.optional(
2727
2761
  z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
2762
+ ),
2763
+ overageAllowed: z15.optional(
2764
+ z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
2728
2765
  )
2729
2766
  }),
2730
2767
  z15.transform((v) => {
2731
2768
  return remap(v, {
2732
2769
  autoTopups: "auto_topups",
2733
2770
  spendLimits: "spend_limits",
2734
- usageAlerts: "usage_alerts"
2771
+ usageAlerts: "usage_alerts",
2772
+ overageAllowed: "overage_allowed"
2735
2773
  });
2736
2774
  })
2737
2775
  );
@@ -2942,11 +2980,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
2942
2980
  var PlanRollover$inboundSchema = z16.pipe(
2943
2981
  z16.object({
2944
2982
  max: nullable(number2()),
2983
+ max_percentage: z16.optional(z16.nullable(number2())),
2945
2984
  expiry_duration_type: ExpiryDurationType$inboundSchema,
2946
2985
  expiry_duration_length: optional2(number2())
2947
2986
  }),
2948
2987
  z16.transform((v) => {
2949
2988
  return remap(v, {
2989
+ "max_percentage": "maxPercentage",
2950
2990
  "expiry_duration_type": "expiryDurationType",
2951
2991
  "expiry_duration_length": "expiryDurationLength"
2952
2992
  });
@@ -3085,6 +3125,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
3085
3125
  });
3086
3126
  })
3087
3127
  );
3128
+ var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
3129
+ z17.object({
3130
+ featureId: z17.string(),
3131
+ enabled: z17._default(z17.boolean(), false)
3132
+ }),
3133
+ z17.transform((v) => {
3134
+ return remap(v, {
3135
+ featureId: "feature_id"
3136
+ });
3137
+ })
3138
+ );
3088
3139
  var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3089
3140
  z17.object({
3090
3141
  spendLimits: z17.optional(
@@ -3092,12 +3143,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3092
3143
  ),
3093
3144
  usageAlerts: z17.optional(
3094
3145
  z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
3146
+ ),
3147
+ overageAllowed: z17.optional(
3148
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
3095
3149
  )
3096
3150
  }),
3097
3151
  z17.transform((v) => {
3098
3152
  return remap(v, {
3099
3153
  spendLimits: "spend_limits",
3100
- usageAlerts: "usage_alerts"
3154
+ usageAlerts: "usage_alerts",
3155
+ overageAllowed: "overage_allowed"
3101
3156
  });
3102
3157
  })
3103
3158
  );
@@ -3254,6 +3309,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
3254
3309
  });
3255
3310
  })
3256
3311
  );
3312
+ var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
3313
+ z17.object({
3314
+ feature_id: string4(),
3315
+ enabled: z17._default(boolean2(), false)
3316
+ }),
3317
+ z17.transform((v) => {
3318
+ return remap(v, {
3319
+ "feature_id": "featureId"
3320
+ });
3321
+ })
3322
+ );
3257
3323
  var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3258
3324
  z17.object({
3259
3325
  spend_limits: optional2(
@@ -3261,12 +3327,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3261
3327
  ),
3262
3328
  usage_alerts: optional2(
3263
3329
  z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
3330
+ ),
3331
+ overage_allowed: optional2(
3332
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
3264
3333
  )
3265
3334
  }),
3266
3335
  z17.transform((v) => {
3267
3336
  return remap(v, {
3268
3337
  "spend_limits": "spendLimits",
3269
- "usage_alerts": "usageAlerts"
3338
+ "usage_alerts": "usageAlerts",
3339
+ "overage_allowed": "overageAllowed"
3270
3340
  });
3271
3341
  })
3272
3342
  );
@@ -3616,11 +3686,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
3616
3686
  var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
3617
3687
  z19.object({
3618
3688
  max: z19.optional(z19.number()),
3689
+ maxPercentage: z19.optional(z19.number()),
3619
3690
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
3620
3691
  expiryDurationLength: z19.optional(z19.number())
3621
3692
  }),
3622
3693
  z19.transform((v) => {
3623
3694
  return remap(v, {
3695
+ maxPercentage: "max_percentage",
3624
3696
  expiryDurationType: "expiry_duration_type",
3625
3697
  expiryDurationLength: "expiry_duration_length"
3626
3698
  });
@@ -3797,11 +3869,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
3797
3869
  var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
3798
3870
  z19.object({
3799
3871
  max: nullable(number2()),
3872
+ max_percentage: z19.optional(z19.nullable(number2())),
3800
3873
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
3801
3874
  expiry_duration_length: optional2(number2())
3802
3875
  }),
3803
3876
  z19.transform((v) => {
3804
3877
  return remap(v, {
3878
+ "max_percentage": "maxPercentage",
3805
3879
  "expiry_duration_type": "expiryDurationType",
3806
3880
  "expiry_duration_length": "expiryDurationLength"
3807
3881
  });
@@ -4023,6 +4097,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
4023
4097
  });
4024
4098
  })
4025
4099
  );
4100
+ var CustomerOverageAllowed$inboundSchema = z21.pipe(
4101
+ z21.object({
4102
+ feature_id: string4(),
4103
+ enabled: z21._default(boolean2(), false)
4104
+ }),
4105
+ z21.transform((v) => {
4106
+ return remap(v, {
4107
+ "feature_id": "featureId"
4108
+ });
4109
+ })
4110
+ );
4026
4111
  var CustomerBillingControls$inboundSchema = z21.pipe(
4027
4112
  z21.object({
4028
4113
  auto_topups: optional2(
@@ -4033,13 +4118,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
4033
4118
  ),
4034
4119
  usage_alerts: optional2(
4035
4120
  z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
4121
+ ),
4122
+ overage_allowed: optional2(
4123
+ z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
4036
4124
  )
4037
4125
  }),
4038
4126
  z21.transform((v) => {
4039
4127
  return remap(v, {
4040
4128
  "auto_topups": "autoTopups",
4041
4129
  "spend_limits": "spendLimits",
4042
- "usage_alerts": "usageAlerts"
4130
+ "usage_alerts": "usageAlerts",
4131
+ "overage_allowed": "overageAllowed"
4043
4132
  });
4044
4133
  })
4045
4134
  );
@@ -4578,6 +4667,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
4578
4667
  });
4579
4668
  })
4580
4669
  );
4670
+ var GetEntityOverageAllowed$inboundSchema = z28.pipe(
4671
+ z28.object({
4672
+ feature_id: string4(),
4673
+ enabled: z28._default(boolean2(), false)
4674
+ }),
4675
+ z28.transform((v) => {
4676
+ return remap(v, {
4677
+ "feature_id": "featureId"
4678
+ });
4679
+ })
4680
+ );
4581
4681
  var GetEntityBillingControls$inboundSchema = z28.pipe(
4582
4682
  z28.object({
4583
4683
  spend_limits: optional2(
@@ -4585,12 +4685,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
4585
4685
  ),
4586
4686
  usage_alerts: optional2(
4587
4687
  z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
4688
+ ),
4689
+ overage_allowed: optional2(
4690
+ z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
4588
4691
  )
4589
4692
  }),
4590
4693
  z28.transform((v) => {
4591
4694
  return remap(v, {
4592
4695
  "spend_limits": "spendLimits",
4593
- "usage_alerts": "usageAlerts"
4696
+ "usage_alerts": "usageAlerts",
4697
+ "overage_allowed": "overageAllowed"
4594
4698
  });
4595
4699
  })
4596
4700
  );
@@ -4768,6 +4872,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
4768
4872
  });
4769
4873
  })
4770
4874
  );
4875
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
4876
+ z30.object({
4877
+ featureId: z30.string(),
4878
+ enabled: z30._default(z30.boolean(), false)
4879
+ }),
4880
+ z30.transform((v) => {
4881
+ return remap(v, {
4882
+ featureId: "feature_id"
4883
+ });
4884
+ })
4885
+ );
4771
4886
  var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4772
4887
  z30.object({
4773
4888
  autoTopups: z30.optional(
@@ -4778,13 +4893,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4778
4893
  ),
4779
4894
  usageAlerts: z30.optional(
4780
4895
  z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
4896
+ ),
4897
+ overageAllowed: z30.optional(
4898
+ z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
4781
4899
  )
4782
4900
  }),
4783
4901
  z30.transform((v) => {
4784
4902
  return remap(v, {
4785
4903
  autoTopups: "auto_topups",
4786
4904
  spendLimits: "spend_limits",
4787
- usageAlerts: "usage_alerts"
4905
+ usageAlerts: "usage_alerts",
4906
+ overageAllowed: "overage_allowed"
4788
4907
  });
4789
4908
  })
4790
4909
  );
@@ -5009,11 +5128,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
5009
5128
  var GetPlanRollover$inboundSchema = z31.pipe(
5010
5129
  z31.object({
5011
5130
  max: nullable(number2()),
5131
+ max_percentage: z31.optional(z31.nullable(number2())),
5012
5132
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
5013
5133
  expiry_duration_length: optional2(number2())
5014
5134
  }),
5015
5135
  z31.transform((v) => {
5016
5136
  return remap(v, {
5137
+ "max_percentage": "maxPercentage",
5017
5138
  "expiry_duration_type": "expiryDurationType",
5018
5139
  "expiry_duration_length": "expiryDurationLength"
5019
5140
  });
@@ -5241,6 +5362,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
5241
5362
  });
5242
5363
  })
5243
5364
  );
5365
+ var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
5366
+ z32.object({
5367
+ feature_id: string4(),
5368
+ enabled: z32._default(boolean2(), false)
5369
+ }),
5370
+ z32.transform((v) => {
5371
+ return remap(v, {
5372
+ "feature_id": "featureId"
5373
+ });
5374
+ })
5375
+ );
5244
5376
  var ListCustomersBillingControls$inboundSchema = z32.pipe(
5245
5377
  z32.object({
5246
5378
  auto_topups: optional2(
@@ -5251,13 +5383,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
5251
5383
  ),
5252
5384
  usage_alerts: optional2(
5253
5385
  z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
5386
+ ),
5387
+ overage_allowed: optional2(
5388
+ z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
5254
5389
  )
5255
5390
  }),
5256
5391
  z32.transform((v) => {
5257
5392
  return remap(v, {
5258
5393
  "auto_topups": "autoTopups",
5259
5394
  "spend_limits": "spendLimits",
5260
- "usage_alerts": "usageAlerts"
5395
+ "usage_alerts": "usageAlerts",
5396
+ "overage_allowed": "overageAllowed"
5261
5397
  });
5262
5398
  })
5263
5399
  );
@@ -5712,11 +5848,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
5712
5848
  var ListPlansRollover$inboundSchema = z35.pipe(
5713
5849
  z35.object({
5714
5850
  max: nullable(number2()),
5851
+ max_percentage: z35.optional(z35.nullable(number2())),
5715
5852
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
5716
5853
  expiry_duration_length: optional2(number2())
5717
5854
  }),
5718
5855
  z35.transform((v) => {
5719
5856
  return remap(v, {
5857
+ "max_percentage": "maxPercentage",
5720
5858
  "expiry_duration_type": "expiryDurationType",
5721
5859
  "expiry_duration_length": "expiryDurationLength"
5722
5860
  });
@@ -5960,11 +6098,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
5960
6098
  var MultiAttachRollover$outboundSchema = z36.pipe(
5961
6099
  z36.object({
5962
6100
  max: z36.optional(z36.number()),
6101
+ maxPercentage: z36.optional(z36.number()),
5963
6102
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
5964
6103
  expiryDurationLength: z36.optional(z36.number())
5965
6104
  }),
5966
6105
  z36.transform((v) => {
5967
6106
  return remap(v, {
6107
+ maxPercentage: "max_percentage",
5968
6108
  expiryDurationType: "expiry_duration_type",
5969
6109
  expiryDurationLength: "expiry_duration_length"
5970
6110
  });
@@ -6091,6 +6231,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
6091
6231
  });
6092
6232
  })
6093
6233
  );
6234
+ var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
6235
+ z36.object({
6236
+ featureId: z36.string(),
6237
+ enabled: z36._default(z36.boolean(), false)
6238
+ }),
6239
+ z36.transform((v) => {
6240
+ return remap(v, {
6241
+ featureId: "feature_id"
6242
+ });
6243
+ })
6244
+ );
6094
6245
  var MultiAttachBillingControls$outboundSchema = z36.pipe(
6095
6246
  z36.object({
6096
6247
  spendLimits: z36.optional(
@@ -6098,12 +6249,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
6098
6249
  ),
6099
6250
  usageAlerts: z36.optional(
6100
6251
  z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
6252
+ ),
6253
+ overageAllowed: z36.optional(
6254
+ z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
6101
6255
  )
6102
6256
  }),
6103
6257
  z36.transform((v) => {
6104
6258
  return remap(v, {
6105
6259
  spendLimits: "spend_limits",
6106
- usageAlerts: "usage_alerts"
6260
+ usageAlerts: "usage_alerts",
6261
+ overageAllowed: "overage_allowed"
6107
6262
  });
6108
6263
  })
6109
6264
  );
@@ -6397,11 +6552,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
6397
6552
  var PreviewAttachRollover$outboundSchema = z38.pipe(
6398
6553
  z38.object({
6399
6554
  max: z38.optional(z38.number()),
6555
+ maxPercentage: z38.optional(z38.number()),
6400
6556
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
6401
6557
  expiryDurationLength: z38.optional(z38.number())
6402
6558
  }),
6403
6559
  z38.transform((v) => {
6404
6560
  return remap(v, {
6561
+ maxPercentage: "max_percentage",
6405
6562
  expiryDurationType: "expiry_duration_type",
6406
6563
  expiryDurationLength: "expiry_duration_length"
6407
6564
  });
@@ -6945,11 +7102,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
6945
7102
  var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
6946
7103
  z39.object({
6947
7104
  max: z39.optional(z39.number()),
7105
+ maxPercentage: z39.optional(z39.number()),
6948
7106
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
6949
7107
  expiryDurationLength: z39.optional(z39.number())
6950
7108
  }),
6951
7109
  z39.transform((v) => {
6952
7110
  return remap(v, {
7111
+ maxPercentage: "max_percentage",
6953
7112
  expiryDurationType: "expiry_duration_type",
6954
7113
  expiryDurationLength: "expiry_duration_length"
6955
7114
  });
@@ -7089,6 +7248,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
7089
7248
  });
7090
7249
  })
7091
7250
  );
7251
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
7252
+ z39.object({
7253
+ featureId: z39.string(),
7254
+ enabled: z39._default(z39.boolean(), false)
7255
+ }),
7256
+ z39.transform((v) => {
7257
+ return remap(v, {
7258
+ featureId: "feature_id"
7259
+ });
7260
+ })
7261
+ );
7092
7262
  var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7093
7263
  z39.object({
7094
7264
  spendLimits: z39.optional(
@@ -7096,12 +7266,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7096
7266
  ),
7097
7267
  usageAlerts: z39.optional(
7098
7268
  z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
7269
+ ),
7270
+ overageAllowed: z39.optional(
7271
+ z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
7099
7272
  )
7100
7273
  }),
7101
7274
  z39.transform((v) => {
7102
7275
  return remap(v, {
7103
7276
  spendLimits: "spend_limits",
7104
- usageAlerts: "usage_alerts"
7277
+ usageAlerts: "usage_alerts",
7278
+ overageAllowed: "overage_allowed"
7105
7279
  });
7106
7280
  })
7107
7281
  );
@@ -7557,11 +7731,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
7557
7731
  var PreviewUpdateRollover$outboundSchema = z40.pipe(
7558
7732
  z40.object({
7559
7733
  max: z40.optional(z40.number()),
7734
+ maxPercentage: z40.optional(z40.number()),
7560
7735
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
7561
7736
  expiryDurationLength: z40.optional(z40.number())
7562
7737
  }),
7563
7738
  z40.transform((v) => {
7564
7739
  return remap(v, {
7740
+ maxPercentage: "max_percentage",
7565
7741
  expiryDurationType: "expiry_duration_type",
7566
7742
  expiryDurationLength: "expiry_duration_length"
7567
7743
  });
@@ -8077,11 +8253,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
8077
8253
  var SetupPaymentRollover$outboundSchema = z42.pipe(
8078
8254
  z42.object({
8079
8255
  max: z42.optional(z42.number()),
8256
+ maxPercentage: z42.optional(z42.number()),
8080
8257
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
8081
8258
  expiryDurationLength: z42.optional(z42.number())
8082
8259
  }),
8083
8260
  z42.transform((v) => {
8084
8261
  return remap(v, {
8262
+ maxPercentage: "max_percentage",
8085
8263
  expiryDurationType: "expiry_duration_type",
8086
8264
  expiryDurationLength: "expiry_duration_length"
8087
8265
  });
@@ -8426,6 +8604,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
8426
8604
  });
8427
8605
  })
8428
8606
  );
8607
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
8608
+ z45.object({
8609
+ featureId: z45.string(),
8610
+ enabled: z45._default(z45.boolean(), false)
8611
+ }),
8612
+ z45.transform((v) => {
8613
+ return remap(v, {
8614
+ featureId: "feature_id"
8615
+ });
8616
+ })
8617
+ );
8429
8618
  var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8430
8619
  z45.object({
8431
8620
  autoTopups: z45.optional(
@@ -8436,13 +8625,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8436
8625
  ),
8437
8626
  usageAlerts: z45.optional(
8438
8627
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
8628
+ ),
8629
+ overageAllowed: z45.optional(
8630
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
8439
8631
  )
8440
8632
  }),
8441
8633
  z45.transform((v) => {
8442
8634
  return remap(v, {
8443
8635
  autoTopups: "auto_topups",
8444
8636
  spendLimits: "spend_limits",
8445
- usageAlerts: "usage_alerts"
8637
+ usageAlerts: "usage_alerts",
8638
+ overageAllowed: "overage_allowed"
8446
8639
  });
8447
8640
  })
8448
8641
  );
@@ -8530,6 +8723,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
8530
8723
  });
8531
8724
  })
8532
8725
  );
8726
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
8727
+ z45.object({
8728
+ feature_id: string4(),
8729
+ enabled: z45._default(boolean2(), false)
8730
+ }),
8731
+ z45.transform((v) => {
8732
+ return remap(v, {
8733
+ "feature_id": "featureId"
8734
+ });
8735
+ })
8736
+ );
8533
8737
  var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8534
8738
  z45.object({
8535
8739
  auto_topups: optional2(
@@ -8540,13 +8744,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8540
8744
  ),
8541
8745
  usage_alerts: optional2(
8542
8746
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
8747
+ ),
8748
+ overage_allowed: optional2(
8749
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
8543
8750
  )
8544
8751
  }),
8545
8752
  z45.transform((v) => {
8546
8753
  return remap(v, {
8547
8754
  "auto_topups": "autoTopups",
8548
8755
  "spend_limits": "spendLimits",
8549
- "usage_alerts": "usageAlerts"
8756
+ "usage_alerts": "usageAlerts",
8757
+ "overage_allowed": "overageAllowed"
8550
8758
  });
8551
8759
  })
8552
8760
  );
@@ -8738,6 +8946,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
8738
8946
  });
8739
8947
  })
8740
8948
  );
8949
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
8950
+ z46.object({
8951
+ featureId: z46.string(),
8952
+ enabled: z46._default(z46.boolean(), false)
8953
+ }),
8954
+ z46.transform((v) => {
8955
+ return remap(v, {
8956
+ featureId: "feature_id"
8957
+ });
8958
+ })
8959
+ );
8741
8960
  var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8742
8961
  z46.object({
8743
8962
  spendLimits: z46.optional(
@@ -8745,12 +8964,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8745
8964
  ),
8746
8965
  usageAlerts: z46.optional(
8747
8966
  z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
8967
+ ),
8968
+ overageAllowed: z46.optional(
8969
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
8748
8970
  )
8749
8971
  }),
8750
8972
  z46.transform((v) => {
8751
8973
  return remap(v, {
8752
8974
  spendLimits: "spend_limits",
8753
- usageAlerts: "usage_alerts"
8975
+ usageAlerts: "usage_alerts",
8976
+ overageAllowed: "overage_allowed"
8754
8977
  });
8755
8978
  })
8756
8979
  );
@@ -8902,6 +9125,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
8902
9125
  });
8903
9126
  })
8904
9127
  );
9128
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
9129
+ z46.object({
9130
+ feature_id: string4(),
9131
+ enabled: z46._default(boolean2(), false)
9132
+ }),
9133
+ z46.transform((v) => {
9134
+ return remap(v, {
9135
+ "feature_id": "featureId"
9136
+ });
9137
+ })
9138
+ );
8905
9139
  var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8906
9140
  z46.object({
8907
9141
  spend_limits: optional2(
@@ -8909,12 +9143,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8909
9143
  ),
8910
9144
  usage_alerts: optional2(
8911
9145
  z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
9146
+ ),
9147
+ overage_allowed: optional2(
9148
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
8912
9149
  )
8913
9150
  }),
8914
9151
  z46.transform((v) => {
8915
9152
  return remap(v, {
8916
9153
  "spend_limits": "spendLimits",
8917
- "usage_alerts": "usageAlerts"
9154
+ "usage_alerts": "usageAlerts",
9155
+ "overage_allowed": "overageAllowed"
8918
9156
  });
8919
9157
  })
8920
9158
  );
@@ -9267,11 +9505,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
9267
9505
  var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
9268
9506
  z48.object({
9269
9507
  max: z48.optional(z48.number()),
9508
+ maxPercentage: z48.optional(z48.number()),
9270
9509
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
9271
9510
  expiryDurationLength: z48.optional(z48.number())
9272
9511
  }),
9273
9512
  z48.transform((v) => {
9274
9513
  return remap(v, {
9514
+ maxPercentage: "max_percentage",
9275
9515
  expiryDurationType: "expiry_duration_type",
9276
9516
  expiryDurationLength: "expiry_duration_length"
9277
9517
  });
@@ -9456,11 +9696,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
9456
9696
  var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
9457
9697
  z48.object({
9458
9698
  max: nullable(number2()),
9699
+ max_percentage: z48.optional(z48.nullable(number2())),
9459
9700
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
9460
9701
  expiry_duration_length: optional2(number2())
9461
9702
  }),
9462
9703
  z48.transform((v) => {
9463
9704
  return remap(v, {
9705
+ "max_percentage": "maxPercentage",
9464
9706
  "expiry_duration_type": "expiryDurationType",
9465
9707
  "expiry_duration_length": "expiryDurationLength"
9466
9708
  });
@@ -9737,7 +9979,8 @@ async function $do2(client, request, options) {
9737
9979
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
9738
9980
  "check",
9739
9981
  "track",
9740
- "getOrCreateCustomer"
9982
+ "getOrCreateCustomer",
9983
+ "getEntity"
9741
9984
  ]);
9742
9985
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
9743
9986
  var FAIL_OPEN_BODIES = {
@@ -9767,6 +10010,18 @@ var FAIL_OPEN_BODIES = {
9767
10010
  purchases: [],
9768
10011
  balances: {},
9769
10012
  flags: {}
10013
+ },
10014
+ getEntity: {
10015
+ id: null,
10016
+ name: null,
10017
+ customer_id: null,
10018
+ feature_id: null,
10019
+ created_at: 0,
10020
+ env: "live",
10021
+ subscriptions: [],
10022
+ purchases: [],
10023
+ balances: {},
10024
+ flags: {}
9770
10025
  }
9771
10026
  };
9772
10027
  var FailOpenHook = class {
@@ -14044,6 +14299,7 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14044
14299
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14045
14300
  bin_size: import_v4.z.string(),
14046
14301
  custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14302
+ filter_by: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14047
14303
  max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14048
14304
  });
14049
14305
  var closedEnumSchema = import_v4.z.any();
@@ -14057,6 +14313,7 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14057
14313
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14058
14314
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14059
14315
  customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14316
+ filterBy: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14060
14317
  maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14061
14318
  });
14062
14319
 
@@ -14140,6 +14397,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14140
14397
  });
14141
14398
  var attachRolloverOutboundSchema = import_v42.z.object({
14142
14399
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14400
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14143
14401
  expiry_duration_type: import_v42.z.string(),
14144
14402
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14145
14403
  });
@@ -14240,6 +14498,7 @@ var attachProrationSchema = import_v42.z.object({
14240
14498
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14241
14499
  var attachRolloverSchema = import_v42.z.object({
14242
14500
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14501
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14243
14502
  expiryDurationType: attachExpiryDurationTypeSchema,
14244
14503
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14245
14504
  });
@@ -14330,6 +14589,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14330
14589
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14331
14590
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14332
14591
  });
14592
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
14593
+ featureId: import_v44.z.string(),
14594
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
14595
+ });
14333
14596
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14334
14597
  interval: import_v44.z.string(),
14335
14598
  interval_count: import_v44.z.number(),
@@ -14354,6 +14617,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14354
14617
  threshold_type: import_v44.z.string(),
14355
14618
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14356
14619
  });
14620
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14621
+ feature_id: import_v44.z.string(),
14622
+ enabled: import_v44.z.boolean()
14623
+ });
14357
14624
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14358
14625
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14359
14626
  spend_limits: import_v44.z.union([
@@ -14363,6 +14630,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14363
14630
  usage_alerts: import_v44.z.union([
14364
14631
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14365
14632
  import_v44.z.undefined()
14633
+ ]).optional(),
14634
+ overage_allowed: import_v44.z.union([
14635
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
14636
+ import_v44.z.undefined()
14366
14637
  ]).optional()
14367
14638
  });
14368
14639
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14403,7 +14674,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14403
14674
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14404
14675
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14405
14676
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14406
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
14677
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
14678
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
14407
14679
  });
14408
14680
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14409
14681
  customerId: import_v44.z.string().nullable(),
@@ -14542,6 +14814,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14542
14814
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14543
14815
  var listPlansRolloverSchema = import_v46.z.object({
14544
14816
  max: import_v46.z.number().nullable(),
14817
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14545
14818
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14546
14819
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14547
14820
  });
@@ -14622,6 +14895,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14622
14895
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14623
14896
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14624
14897
  });
14898
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
14899
+ featureId: import_v47.z.string(),
14900
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
14901
+ });
14625
14902
  var multiAttachInvoiceSchema = import_v47.z.object({
14626
14903
  status: import_v47.z.string().nullable(),
14627
14904
  stripeId: import_v47.z.string(),
@@ -14660,6 +14937,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14660
14937
  });
14661
14938
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14662
14939
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14940
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14663
14941
  expiry_duration_type: import_v47.z.string(),
14664
14942
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14665
14943
  });
@@ -14714,9 +14992,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14714
14992
  threshold_type: import_v47.z.string(),
14715
14993
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14716
14994
  });
14995
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
14996
+ feature_id: import_v47.z.string(),
14997
+ enabled: import_v47.z.boolean()
14998
+ });
14717
14999
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14718
15000
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14719
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
15001
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
15002
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
14720
15003
  });
14721
15004
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14722
15005
  feature_id: import_v47.z.string(),
@@ -14760,6 +15043,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14760
15043
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14761
15044
  var multiAttachRolloverSchema = import_v47.z.object({
14762
15045
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
15046
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14763
15047
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14764
15048
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14765
15049
  });
@@ -14800,7 +15084,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14800
15084
  });
14801
15085
  var multiAttachBillingControlsSchema = import_v47.z.object({
14802
15086
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14803
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
15087
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
15088
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
14804
15089
  });
14805
15090
  var multiAttachEntityDataSchema = import_v47.z.object({
14806
15091
  featureId: import_v47.z.string(),
@@ -15008,6 +15293,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
15008
15293
  });
15009
15294
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
15010
15295
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15296
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15011
15297
  expiry_duration_type: import_v49.z.string(),
15012
15298
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15013
15299
  });
@@ -15112,6 +15398,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15112
15398
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15113
15399
  var previewAttachRolloverSchema = import_v49.z.object({
15114
15400
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15401
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15115
15402
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15116
15403
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15117
15404
  });
@@ -15221,6 +15508,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15221
15508
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15222
15509
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15223
15510
  });
15511
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
15512
+ featureId: import_v410.z.string(),
15513
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
15514
+ });
15224
15515
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15225
15516
  amountOff: import_v410.z.number(),
15226
15517
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15322,6 +15613,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15322
15613
  });
15323
15614
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15324
15615
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15616
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15325
15617
  expiry_duration_type: import_v410.z.string(),
15326
15618
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15327
15619
  });
@@ -15379,9 +15671,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15379
15671
  threshold_type: import_v410.z.string(),
15380
15672
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15381
15673
  });
15674
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15675
+ feature_id: import_v410.z.string(),
15676
+ enabled: import_v410.z.boolean()
15677
+ });
15382
15678
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15383
15679
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15384
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
15680
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
15681
+ overage_allowed: import_v410.z.union([
15682
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
15683
+ import_v410.z.undefined()
15684
+ ]).optional()
15385
15685
  });
15386
15686
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15387
15687
  feature_id: import_v410.z.string(),
@@ -15426,6 +15726,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15426
15726
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15427
15727
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15428
15728
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15729
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15429
15730
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15430
15731
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15431
15732
  });
@@ -15469,7 +15770,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15469
15770
  });
15470
15771
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15471
15772
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15472
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
15773
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
15774
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
15473
15775
  });
15474
15776
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15475
15777
  featureId: import_v410.z.string(),
@@ -15665,6 +15967,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15665
15967
  });
15666
15968
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15667
15969
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15970
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15668
15971
  expiry_duration_type: import_v411.z.string(),
15669
15972
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15670
15973
  });
@@ -15749,6 +16052,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15749
16052
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15750
16053
  var previewUpdateRolloverSchema = import_v411.z.object({
15751
16054
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
16055
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15752
16056
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15753
16057
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15754
16058
  });
@@ -15912,6 +16216,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15912
16216
  });
15913
16217
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15914
16218
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16219
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15915
16220
  expiry_duration_type: import_v413.z.string(),
15916
16221
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15917
16222
  });
@@ -16002,6 +16307,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
16002
16307
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
16003
16308
  var setupPaymentRolloverSchema = import_v413.z.object({
16004
16309
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16310
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16005
16311
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
16006
16312
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
16007
16313
  });
@@ -16112,6 +16418,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16112
16418
  });
16113
16419
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16114
16420
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16421
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16115
16422
  expiry_duration_type: import_v414.z.string(),
16116
16423
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16117
16424
  });
@@ -16192,6 +16499,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16192
16499
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16193
16500
  var billingUpdateRolloverSchema = import_v414.z.object({
16194
16501
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16502
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16195
16503
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16196
16504
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16197
16505
  });