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
@@ -86,8 +86,8 @@ var SDK_METADATA = {
86
86
  language: "typescript",
87
87
  openapiDocVersion: "2.2.0",
88
88
  sdkVersion: "0.10.17",
89
- genVersion: "2.869.25",
90
- userAgent: "speakeasy-sdk/typescript 0.10.17 2.869.25 2.2.0 @useautumn/sdk"
89
+ genVersion: "2.879.1",
90
+ userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
91
91
  };
92
92
 
93
93
  // ../sdk/src/lib/http.ts
@@ -1009,8 +1009,8 @@ function applyBearer(state, spec) {
1009
1009
  state.headers[spec.fieldName] = value;
1010
1010
  }
1011
1011
  }
1012
- function resolveGlobalSecurity(security) {
1013
- return resolveSecurity(
1012
+ function resolveGlobalSecurity(security, allowedFields) {
1013
+ let inputs = [
1014
1014
  [
1015
1015
  {
1016
1016
  fieldName: "Authorization",
@@ -1018,7 +1018,16 @@ function resolveGlobalSecurity(security) {
1018
1018
  value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
1019
1019
  }
1020
1020
  ]
1021
- );
1021
+ ];
1022
+ if (allowedFields) {
1023
+ inputs = allowedFields.map((i) => {
1024
+ if (i < 0 || i >= inputs.length) {
1025
+ throw new RangeError(`invalid allowedFields index ${i}`);
1026
+ }
1027
+ return inputs[i];
1028
+ });
1029
+ }
1030
+ return resolveSecurity(...inputs);
1022
1031
  }
1023
1032
  async function extractSecurity(sec) {
1024
1033
  if (sec == null) {
@@ -1345,6 +1354,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1345
1354
  customRange: z8.optional(
1346
1355
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1347
1356
  ),
1357
+ filterBy: z8.optional(z8.record(z8.string(), z8.string())),
1348
1358
  maxGroups: z8.optional(z8.int())
1349
1359
  }),
1350
1360
  z8.transform((v) => {
@@ -1355,6 +1365,7 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1355
1365
  groupBy: "group_by",
1356
1366
  binSize: "bin_size",
1357
1367
  customRange: "custom_range",
1368
+ filterBy: "filter_by",
1358
1369
  maxGroups: "max_groups"
1359
1370
  });
1360
1371
  })
@@ -1563,11 +1574,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
1563
1574
  var AttachRollover$outboundSchema = z10.pipe(
1564
1575
  z10.object({
1565
1576
  max: z10.optional(z10.number()),
1577
+ maxPercentage: z10.optional(z10.number()),
1566
1578
  expiryDurationType: AttachExpiryDurationType$outboundSchema,
1567
1579
  expiryDurationLength: z10.optional(z10.number())
1568
1580
  }),
1569
1581
  z10.transform((v) => {
1570
1582
  return remap(v, {
1583
+ maxPercentage: "max_percentage",
1571
1584
  expiryDurationType: "expiry_duration_type",
1572
1585
  expiryDurationLength: "expiry_duration_length"
1573
1586
  });
@@ -2092,11 +2105,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
2092
2105
  var BillingUpdateRollover$outboundSchema = z12.pipe(
2093
2106
  z12.object({
2094
2107
  max: z12.optional(z12.number()),
2108
+ maxPercentage: z12.optional(z12.number()),
2095
2109
  expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
2096
2110
  expiryDurationLength: z12.optional(z12.number())
2097
2111
  }),
2098
2112
  z12.transform((v) => {
2099
2113
  return remap(v, {
2114
+ maxPercentage: "max_percentage",
2100
2115
  expiryDurationType: "expiry_duration_type",
2101
2116
  expiryDurationLength: "expiry_duration_length"
2102
2117
  });
@@ -2438,11 +2453,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
2438
2453
  })
2439
2454
  );
2440
2455
  var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
2441
- var CheckRollover$inboundSchema = z13.object({
2442
- max: nullable(number2()),
2443
- duration: z13._default(RolloverDuration$inboundSchema, "month"),
2444
- length: number2()
2445
- });
2456
+ var CheckRollover$inboundSchema = z13.pipe(
2457
+ z13.object({
2458
+ max: z13.optional(z13.nullable(number2())),
2459
+ max_percentage: z13.optional(z13.nullable(number2())),
2460
+ duration: z13._default(RolloverDuration$inboundSchema, "month"),
2461
+ length: number2()
2462
+ }),
2463
+ z13.transform((v) => {
2464
+ return remap(v, {
2465
+ "max_percentage": "maxPercentage"
2466
+ });
2467
+ })
2468
+ );
2446
2469
  var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2447
2470
  var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2448
2471
  var Config$inboundSchema = z13.pipe(
@@ -2719,6 +2742,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
2719
2742
  });
2720
2743
  })
2721
2744
  );
2745
+ var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
2746
+ z15.object({
2747
+ featureId: z15.string(),
2748
+ enabled: z15._default(z15.boolean(), false)
2749
+ }),
2750
+ z15.transform((v) => {
2751
+ return remap(v, {
2752
+ featureId: "feature_id"
2753
+ });
2754
+ })
2755
+ );
2722
2756
  var CustomerDataBillingControls$outboundSchema = z15.pipe(
2723
2757
  z15.object({
2724
2758
  autoTopups: z15.optional(
@@ -2729,13 +2763,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
2729
2763
  ),
2730
2764
  usageAlerts: z15.optional(
2731
2765
  z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
2766
+ ),
2767
+ overageAllowed: z15.optional(
2768
+ z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
2732
2769
  )
2733
2770
  }),
2734
2771
  z15.transform((v) => {
2735
2772
  return remap(v, {
2736
2773
  autoTopups: "auto_topups",
2737
2774
  spendLimits: "spend_limits",
2738
- usageAlerts: "usage_alerts"
2775
+ usageAlerts: "usage_alerts",
2776
+ overageAllowed: "overage_allowed"
2739
2777
  });
2740
2778
  })
2741
2779
  );
@@ -2946,11 +2984,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
2946
2984
  var PlanRollover$inboundSchema = z16.pipe(
2947
2985
  z16.object({
2948
2986
  max: nullable(number2()),
2987
+ max_percentage: z16.optional(z16.nullable(number2())),
2949
2988
  expiry_duration_type: ExpiryDurationType$inboundSchema,
2950
2989
  expiry_duration_length: optional2(number2())
2951
2990
  }),
2952
2991
  z16.transform((v) => {
2953
2992
  return remap(v, {
2993
+ "max_percentage": "maxPercentage",
2954
2994
  "expiry_duration_type": "expiryDurationType",
2955
2995
  "expiry_duration_length": "expiryDurationLength"
2956
2996
  });
@@ -3089,6 +3129,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
3089
3129
  });
3090
3130
  })
3091
3131
  );
3132
+ var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
3133
+ z17.object({
3134
+ featureId: z17.string(),
3135
+ enabled: z17._default(z17.boolean(), false)
3136
+ }),
3137
+ z17.transform((v) => {
3138
+ return remap(v, {
3139
+ featureId: "feature_id"
3140
+ });
3141
+ })
3142
+ );
3092
3143
  var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3093
3144
  z17.object({
3094
3145
  spendLimits: z17.optional(
@@ -3096,12 +3147,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
3096
3147
  ),
3097
3148
  usageAlerts: z17.optional(
3098
3149
  z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
3150
+ ),
3151
+ overageAllowed: z17.optional(
3152
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
3099
3153
  )
3100
3154
  }),
3101
3155
  z17.transform((v) => {
3102
3156
  return remap(v, {
3103
3157
  spendLimits: "spend_limits",
3104
- usageAlerts: "usage_alerts"
3158
+ usageAlerts: "usage_alerts",
3159
+ overageAllowed: "overage_allowed"
3105
3160
  });
3106
3161
  })
3107
3162
  );
@@ -3258,6 +3313,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
3258
3313
  });
3259
3314
  })
3260
3315
  );
3316
+ var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
3317
+ z17.object({
3318
+ feature_id: string4(),
3319
+ enabled: z17._default(boolean2(), false)
3320
+ }),
3321
+ z17.transform((v) => {
3322
+ return remap(v, {
3323
+ "feature_id": "featureId"
3324
+ });
3325
+ })
3326
+ );
3261
3327
  var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3262
3328
  z17.object({
3263
3329
  spend_limits: optional2(
@@ -3265,12 +3331,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
3265
3331
  ),
3266
3332
  usage_alerts: optional2(
3267
3333
  z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
3334
+ ),
3335
+ overage_allowed: optional2(
3336
+ z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
3268
3337
  )
3269
3338
  }),
3270
3339
  z17.transform((v) => {
3271
3340
  return remap(v, {
3272
3341
  "spend_limits": "spendLimits",
3273
- "usage_alerts": "usageAlerts"
3342
+ "usage_alerts": "usageAlerts",
3343
+ "overage_allowed": "overageAllowed"
3274
3344
  });
3275
3345
  })
3276
3346
  );
@@ -3620,11 +3690,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
3620
3690
  var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
3621
3691
  z19.object({
3622
3692
  max: z19.optional(z19.number()),
3693
+ maxPercentage: z19.optional(z19.number()),
3623
3694
  expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
3624
3695
  expiryDurationLength: z19.optional(z19.number())
3625
3696
  }),
3626
3697
  z19.transform((v) => {
3627
3698
  return remap(v, {
3699
+ maxPercentage: "max_percentage",
3628
3700
  expiryDurationType: "expiry_duration_type",
3629
3701
  expiryDurationLength: "expiry_duration_length"
3630
3702
  });
@@ -3801,11 +3873,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
3801
3873
  var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
3802
3874
  z19.object({
3803
3875
  max: nullable(number2()),
3876
+ max_percentage: z19.optional(z19.nullable(number2())),
3804
3877
  expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
3805
3878
  expiry_duration_length: optional2(number2())
3806
3879
  }),
3807
3880
  z19.transform((v) => {
3808
3881
  return remap(v, {
3882
+ "max_percentage": "maxPercentage",
3809
3883
  "expiry_duration_type": "expiryDurationType",
3810
3884
  "expiry_duration_length": "expiryDurationLength"
3811
3885
  });
@@ -4027,6 +4101,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
4027
4101
  });
4028
4102
  })
4029
4103
  );
4104
+ var CustomerOverageAllowed$inboundSchema = z21.pipe(
4105
+ z21.object({
4106
+ feature_id: string4(),
4107
+ enabled: z21._default(boolean2(), false)
4108
+ }),
4109
+ z21.transform((v) => {
4110
+ return remap(v, {
4111
+ "feature_id": "featureId"
4112
+ });
4113
+ })
4114
+ );
4030
4115
  var CustomerBillingControls$inboundSchema = z21.pipe(
4031
4116
  z21.object({
4032
4117
  auto_topups: optional2(
@@ -4037,13 +4122,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
4037
4122
  ),
4038
4123
  usage_alerts: optional2(
4039
4124
  z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
4125
+ ),
4126
+ overage_allowed: optional2(
4127
+ z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
4040
4128
  )
4041
4129
  }),
4042
4130
  z21.transform((v) => {
4043
4131
  return remap(v, {
4044
4132
  "auto_topups": "autoTopups",
4045
4133
  "spend_limits": "spendLimits",
4046
- "usage_alerts": "usageAlerts"
4134
+ "usage_alerts": "usageAlerts",
4135
+ "overage_allowed": "overageAllowed"
4047
4136
  });
4048
4137
  })
4049
4138
  );
@@ -4582,6 +4671,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
4582
4671
  });
4583
4672
  })
4584
4673
  );
4674
+ var GetEntityOverageAllowed$inboundSchema = z28.pipe(
4675
+ z28.object({
4676
+ feature_id: string4(),
4677
+ enabled: z28._default(boolean2(), false)
4678
+ }),
4679
+ z28.transform((v) => {
4680
+ return remap(v, {
4681
+ "feature_id": "featureId"
4682
+ });
4683
+ })
4684
+ );
4585
4685
  var GetEntityBillingControls$inboundSchema = z28.pipe(
4586
4686
  z28.object({
4587
4687
  spend_limits: optional2(
@@ -4589,12 +4689,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
4589
4689
  ),
4590
4690
  usage_alerts: optional2(
4591
4691
  z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
4692
+ ),
4693
+ overage_allowed: optional2(
4694
+ z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
4592
4695
  )
4593
4696
  }),
4594
4697
  z28.transform((v) => {
4595
4698
  return remap(v, {
4596
4699
  "spend_limits": "spendLimits",
4597
- "usage_alerts": "usageAlerts"
4700
+ "usage_alerts": "usageAlerts",
4701
+ "overage_allowed": "overageAllowed"
4598
4702
  });
4599
4703
  })
4600
4704
  );
@@ -4772,6 +4876,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
4772
4876
  });
4773
4877
  })
4774
4878
  );
4879
+ var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
4880
+ z30.object({
4881
+ featureId: z30.string(),
4882
+ enabled: z30._default(z30.boolean(), false)
4883
+ }),
4884
+ z30.transform((v) => {
4885
+ return remap(v, {
4886
+ featureId: "feature_id"
4887
+ });
4888
+ })
4889
+ );
4775
4890
  var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4776
4891
  z30.object({
4777
4892
  autoTopups: z30.optional(
@@ -4782,13 +4897,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
4782
4897
  ),
4783
4898
  usageAlerts: z30.optional(
4784
4899
  z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
4900
+ ),
4901
+ overageAllowed: z30.optional(
4902
+ z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
4785
4903
  )
4786
4904
  }),
4787
4905
  z30.transform((v) => {
4788
4906
  return remap(v, {
4789
4907
  autoTopups: "auto_topups",
4790
4908
  spendLimits: "spend_limits",
4791
- usageAlerts: "usage_alerts"
4909
+ usageAlerts: "usage_alerts",
4910
+ overageAllowed: "overage_allowed"
4792
4911
  });
4793
4912
  })
4794
4913
  );
@@ -5013,11 +5132,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
5013
5132
  var GetPlanRollover$inboundSchema = z31.pipe(
5014
5133
  z31.object({
5015
5134
  max: nullable(number2()),
5135
+ max_percentage: z31.optional(z31.nullable(number2())),
5016
5136
  expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
5017
5137
  expiry_duration_length: optional2(number2())
5018
5138
  }),
5019
5139
  z31.transform((v) => {
5020
5140
  return remap(v, {
5141
+ "max_percentage": "maxPercentage",
5021
5142
  "expiry_duration_type": "expiryDurationType",
5022
5143
  "expiry_duration_length": "expiryDurationLength"
5023
5144
  });
@@ -5245,6 +5366,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
5245
5366
  });
5246
5367
  })
5247
5368
  );
5369
+ var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
5370
+ z32.object({
5371
+ feature_id: string4(),
5372
+ enabled: z32._default(boolean2(), false)
5373
+ }),
5374
+ z32.transform((v) => {
5375
+ return remap(v, {
5376
+ "feature_id": "featureId"
5377
+ });
5378
+ })
5379
+ );
5248
5380
  var ListCustomersBillingControls$inboundSchema = z32.pipe(
5249
5381
  z32.object({
5250
5382
  auto_topups: optional2(
@@ -5255,13 +5387,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
5255
5387
  ),
5256
5388
  usage_alerts: optional2(
5257
5389
  z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
5390
+ ),
5391
+ overage_allowed: optional2(
5392
+ z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
5258
5393
  )
5259
5394
  }),
5260
5395
  z32.transform((v) => {
5261
5396
  return remap(v, {
5262
5397
  "auto_topups": "autoTopups",
5263
5398
  "spend_limits": "spendLimits",
5264
- "usage_alerts": "usageAlerts"
5399
+ "usage_alerts": "usageAlerts",
5400
+ "overage_allowed": "overageAllowed"
5265
5401
  });
5266
5402
  })
5267
5403
  );
@@ -5716,11 +5852,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
5716
5852
  var ListPlansRollover$inboundSchema = z35.pipe(
5717
5853
  z35.object({
5718
5854
  max: nullable(number2()),
5855
+ max_percentage: z35.optional(z35.nullable(number2())),
5719
5856
  expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
5720
5857
  expiry_duration_length: optional2(number2())
5721
5858
  }),
5722
5859
  z35.transform((v) => {
5723
5860
  return remap(v, {
5861
+ "max_percentage": "maxPercentage",
5724
5862
  "expiry_duration_type": "expiryDurationType",
5725
5863
  "expiry_duration_length": "expiryDurationLength"
5726
5864
  });
@@ -5964,11 +6102,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
5964
6102
  var MultiAttachRollover$outboundSchema = z36.pipe(
5965
6103
  z36.object({
5966
6104
  max: z36.optional(z36.number()),
6105
+ maxPercentage: z36.optional(z36.number()),
5967
6106
  expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
5968
6107
  expiryDurationLength: z36.optional(z36.number())
5969
6108
  }),
5970
6109
  z36.transform((v) => {
5971
6110
  return remap(v, {
6111
+ maxPercentage: "max_percentage",
5972
6112
  expiryDurationType: "expiry_duration_type",
5973
6113
  expiryDurationLength: "expiry_duration_length"
5974
6114
  });
@@ -6095,6 +6235,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
6095
6235
  });
6096
6236
  })
6097
6237
  );
6238
+ var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
6239
+ z36.object({
6240
+ featureId: z36.string(),
6241
+ enabled: z36._default(z36.boolean(), false)
6242
+ }),
6243
+ z36.transform((v) => {
6244
+ return remap(v, {
6245
+ featureId: "feature_id"
6246
+ });
6247
+ })
6248
+ );
6098
6249
  var MultiAttachBillingControls$outboundSchema = z36.pipe(
6099
6250
  z36.object({
6100
6251
  spendLimits: z36.optional(
@@ -6102,12 +6253,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
6102
6253
  ),
6103
6254
  usageAlerts: z36.optional(
6104
6255
  z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
6256
+ ),
6257
+ overageAllowed: z36.optional(
6258
+ z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
6105
6259
  )
6106
6260
  }),
6107
6261
  z36.transform((v) => {
6108
6262
  return remap(v, {
6109
6263
  spendLimits: "spend_limits",
6110
- usageAlerts: "usage_alerts"
6264
+ usageAlerts: "usage_alerts",
6265
+ overageAllowed: "overage_allowed"
6111
6266
  });
6112
6267
  })
6113
6268
  );
@@ -6401,11 +6556,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
6401
6556
  var PreviewAttachRollover$outboundSchema = z38.pipe(
6402
6557
  z38.object({
6403
6558
  max: z38.optional(z38.number()),
6559
+ maxPercentage: z38.optional(z38.number()),
6404
6560
  expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
6405
6561
  expiryDurationLength: z38.optional(z38.number())
6406
6562
  }),
6407
6563
  z38.transform((v) => {
6408
6564
  return remap(v, {
6565
+ maxPercentage: "max_percentage",
6409
6566
  expiryDurationType: "expiry_duration_type",
6410
6567
  expiryDurationLength: "expiry_duration_length"
6411
6568
  });
@@ -6949,11 +7106,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
6949
7106
  var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
6950
7107
  z39.object({
6951
7108
  max: z39.optional(z39.number()),
7109
+ maxPercentage: z39.optional(z39.number()),
6952
7110
  expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
6953
7111
  expiryDurationLength: z39.optional(z39.number())
6954
7112
  }),
6955
7113
  z39.transform((v) => {
6956
7114
  return remap(v, {
7115
+ maxPercentage: "max_percentage",
6957
7116
  expiryDurationType: "expiry_duration_type",
6958
7117
  expiryDurationLength: "expiry_duration_length"
6959
7118
  });
@@ -7093,6 +7252,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
7093
7252
  });
7094
7253
  })
7095
7254
  );
7255
+ var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
7256
+ z39.object({
7257
+ featureId: z39.string(),
7258
+ enabled: z39._default(z39.boolean(), false)
7259
+ }),
7260
+ z39.transform((v) => {
7261
+ return remap(v, {
7262
+ featureId: "feature_id"
7263
+ });
7264
+ })
7265
+ );
7096
7266
  var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7097
7267
  z39.object({
7098
7268
  spendLimits: z39.optional(
@@ -7100,12 +7270,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
7100
7270
  ),
7101
7271
  usageAlerts: z39.optional(
7102
7272
  z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
7273
+ ),
7274
+ overageAllowed: z39.optional(
7275
+ z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
7103
7276
  )
7104
7277
  }),
7105
7278
  z39.transform((v) => {
7106
7279
  return remap(v, {
7107
7280
  spendLimits: "spend_limits",
7108
- usageAlerts: "usage_alerts"
7281
+ usageAlerts: "usage_alerts",
7282
+ overageAllowed: "overage_allowed"
7109
7283
  });
7110
7284
  })
7111
7285
  );
@@ -7561,11 +7735,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
7561
7735
  var PreviewUpdateRollover$outboundSchema = z40.pipe(
7562
7736
  z40.object({
7563
7737
  max: z40.optional(z40.number()),
7738
+ maxPercentage: z40.optional(z40.number()),
7564
7739
  expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
7565
7740
  expiryDurationLength: z40.optional(z40.number())
7566
7741
  }),
7567
7742
  z40.transform((v) => {
7568
7743
  return remap(v, {
7744
+ maxPercentage: "max_percentage",
7569
7745
  expiryDurationType: "expiry_duration_type",
7570
7746
  expiryDurationLength: "expiry_duration_length"
7571
7747
  });
@@ -8081,11 +8257,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
8081
8257
  var SetupPaymentRollover$outboundSchema = z42.pipe(
8082
8258
  z42.object({
8083
8259
  max: z42.optional(z42.number()),
8260
+ maxPercentage: z42.optional(z42.number()),
8084
8261
  expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
8085
8262
  expiryDurationLength: z42.optional(z42.number())
8086
8263
  }),
8087
8264
  z42.transform((v) => {
8088
8265
  return remap(v, {
8266
+ maxPercentage: "max_percentage",
8089
8267
  expiryDurationType: "expiry_duration_type",
8090
8268
  expiryDurationLength: "expiry_duration_length"
8091
8269
  });
@@ -8430,6 +8608,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
8430
8608
  });
8431
8609
  })
8432
8610
  );
8611
+ var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
8612
+ z45.object({
8613
+ featureId: z45.string(),
8614
+ enabled: z45._default(z45.boolean(), false)
8615
+ }),
8616
+ z45.transform((v) => {
8617
+ return remap(v, {
8618
+ featureId: "feature_id"
8619
+ });
8620
+ })
8621
+ );
8433
8622
  var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8434
8623
  z45.object({
8435
8624
  autoTopups: z45.optional(
@@ -8440,13 +8629,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
8440
8629
  ),
8441
8630
  usageAlerts: z45.optional(
8442
8631
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
8632
+ ),
8633
+ overageAllowed: z45.optional(
8634
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
8443
8635
  )
8444
8636
  }),
8445
8637
  z45.transform((v) => {
8446
8638
  return remap(v, {
8447
8639
  autoTopups: "auto_topups",
8448
8640
  spendLimits: "spend_limits",
8449
- usageAlerts: "usage_alerts"
8641
+ usageAlerts: "usage_alerts",
8642
+ overageAllowed: "overage_allowed"
8450
8643
  });
8451
8644
  })
8452
8645
  );
@@ -8534,6 +8727,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
8534
8727
  });
8535
8728
  })
8536
8729
  );
8730
+ var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
8731
+ z45.object({
8732
+ feature_id: string4(),
8733
+ enabled: z45._default(boolean2(), false)
8734
+ }),
8735
+ z45.transform((v) => {
8736
+ return remap(v, {
8737
+ "feature_id": "featureId"
8738
+ });
8739
+ })
8740
+ );
8537
8741
  var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8538
8742
  z45.object({
8539
8743
  auto_topups: optional2(
@@ -8544,13 +8748,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
8544
8748
  ),
8545
8749
  usage_alerts: optional2(
8546
8750
  z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
8751
+ ),
8752
+ overage_allowed: optional2(
8753
+ z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
8547
8754
  )
8548
8755
  }),
8549
8756
  z45.transform((v) => {
8550
8757
  return remap(v, {
8551
8758
  "auto_topups": "autoTopups",
8552
8759
  "spend_limits": "spendLimits",
8553
- "usage_alerts": "usageAlerts"
8760
+ "usage_alerts": "usageAlerts",
8761
+ "overage_allowed": "overageAllowed"
8554
8762
  });
8555
8763
  })
8556
8764
  );
@@ -8742,6 +8950,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
8742
8950
  });
8743
8951
  })
8744
8952
  );
8953
+ var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
8954
+ z46.object({
8955
+ featureId: z46.string(),
8956
+ enabled: z46._default(z46.boolean(), false)
8957
+ }),
8958
+ z46.transform((v) => {
8959
+ return remap(v, {
8960
+ featureId: "feature_id"
8961
+ });
8962
+ })
8963
+ );
8745
8964
  var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8746
8965
  z46.object({
8747
8966
  spendLimits: z46.optional(
@@ -8749,12 +8968,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
8749
8968
  ),
8750
8969
  usageAlerts: z46.optional(
8751
8970
  z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
8971
+ ),
8972
+ overageAllowed: z46.optional(
8973
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
8752
8974
  )
8753
8975
  }),
8754
8976
  z46.transform((v) => {
8755
8977
  return remap(v, {
8756
8978
  spendLimits: "spend_limits",
8757
- usageAlerts: "usage_alerts"
8979
+ usageAlerts: "usage_alerts",
8980
+ overageAllowed: "overage_allowed"
8758
8981
  });
8759
8982
  })
8760
8983
  );
@@ -8906,6 +9129,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
8906
9129
  });
8907
9130
  })
8908
9131
  );
9132
+ var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
9133
+ z46.object({
9134
+ feature_id: string4(),
9135
+ enabled: z46._default(boolean2(), false)
9136
+ }),
9137
+ z46.transform((v) => {
9138
+ return remap(v, {
9139
+ "feature_id": "featureId"
9140
+ });
9141
+ })
9142
+ );
8909
9143
  var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8910
9144
  z46.object({
8911
9145
  spend_limits: optional2(
@@ -8913,12 +9147,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
8913
9147
  ),
8914
9148
  usage_alerts: optional2(
8915
9149
  z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
9150
+ ),
9151
+ overage_allowed: optional2(
9152
+ z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
8916
9153
  )
8917
9154
  }),
8918
9155
  z46.transform((v) => {
8919
9156
  return remap(v, {
8920
9157
  "spend_limits": "spendLimits",
8921
- "usage_alerts": "usageAlerts"
9158
+ "usage_alerts": "usageAlerts",
9159
+ "overage_allowed": "overageAllowed"
8922
9160
  });
8923
9161
  })
8924
9162
  );
@@ -9271,11 +9509,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
9271
9509
  var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
9272
9510
  z48.object({
9273
9511
  max: z48.optional(z48.number()),
9512
+ maxPercentage: z48.optional(z48.number()),
9274
9513
  expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
9275
9514
  expiryDurationLength: z48.optional(z48.number())
9276
9515
  }),
9277
9516
  z48.transform((v) => {
9278
9517
  return remap(v, {
9518
+ maxPercentage: "max_percentage",
9279
9519
  expiryDurationType: "expiry_duration_type",
9280
9520
  expiryDurationLength: "expiry_duration_length"
9281
9521
  });
@@ -9460,11 +9700,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
9460
9700
  var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
9461
9701
  z48.object({
9462
9702
  max: nullable(number2()),
9703
+ max_percentage: z48.optional(z48.nullable(number2())),
9463
9704
  expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
9464
9705
  expiry_duration_length: optional2(number2())
9465
9706
  }),
9466
9707
  z48.transform((v) => {
9467
9708
  return remap(v, {
9709
+ "max_percentage": "maxPercentage",
9468
9710
  "expiry_duration_type": "expiryDurationType",
9469
9711
  "expiry_duration_length": "expiryDurationLength"
9470
9712
  });
@@ -9741,7 +9983,8 @@ async function $do2(client, request, options) {
9741
9983
  var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
9742
9984
  "check",
9743
9985
  "track",
9744
- "getOrCreateCustomer"
9986
+ "getOrCreateCustomer",
9987
+ "getEntity"
9745
9988
  ]);
9746
9989
  var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
9747
9990
  var FAIL_OPEN_BODIES = {
@@ -9771,6 +10014,18 @@ var FAIL_OPEN_BODIES = {
9771
10014
  purchases: [],
9772
10015
  balances: {},
9773
10016
  flags: {}
10017
+ },
10018
+ getEntity: {
10019
+ id: null,
10020
+ name: null,
10021
+ customer_id: null,
10022
+ feature_id: null,
10023
+ created_at: 0,
10024
+ env: "live",
10025
+ subscriptions: [],
10026
+ purchases: [],
10027
+ balances: {},
10028
+ flags: {}
9774
10029
  }
9775
10030
  };
9776
10031
  var FailOpenHook = class {
@@ -14048,6 +14303,7 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14048
14303
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14049
14304
  bin_size: import_v4.z.string(),
14050
14305
  custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14306
+ filter_by: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14051
14307
  max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14052
14308
  });
14053
14309
  var closedEnumSchema = import_v4.z.any();
@@ -14061,6 +14317,7 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14061
14317
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14062
14318
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14063
14319
  customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14320
+ filterBy: import_v4.z.union([import_v4.z.record(import_v4.z.string(), import_v4.z.string()), import_v4.z.undefined()]).optional(),
14064
14321
  maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14065
14322
  });
14066
14323
 
@@ -14144,6 +14401,7 @@ var attachProrationOutboundSchema = import_v42.z.object({
14144
14401
  });
14145
14402
  var attachRolloverOutboundSchema = import_v42.z.object({
14146
14403
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14404
+ max_percentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14147
14405
  expiry_duration_type: import_v42.z.string(),
14148
14406
  expiry_duration_length: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14149
14407
  });
@@ -14244,6 +14502,7 @@ var attachProrationSchema = import_v42.z.object({
14244
14502
  var attachExpiryDurationTypeSchema = closedEnumSchema2;
14245
14503
  var attachRolloverSchema = import_v42.z.object({
14246
14504
  max: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14505
+ maxPercentage: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
14247
14506
  expiryDurationType: attachExpiryDurationTypeSchema,
14248
14507
  expiryDurationLength: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional()
14249
14508
  });
@@ -14334,6 +14593,10 @@ var getOrCreateCustomerSpendLimitSchema = import_v44.z.object({
14334
14593
  enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional(),
14335
14594
  overageLimit: import_v44.z.union([import_v44.z.number(), import_v44.z.undefined()]).optional()
14336
14595
  });
14596
+ var getOrCreateCustomerOverageAllowedSchema = import_v44.z.object({
14597
+ featureId: import_v44.z.string(),
14598
+ enabled: import_v44.z.union([import_v44.z.boolean(), import_v44.z.undefined()]).optional()
14599
+ });
14337
14600
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v44.z.object({
14338
14601
  interval: import_v44.z.string(),
14339
14602
  interval_count: import_v44.z.number(),
@@ -14358,6 +14621,10 @@ var getOrCreateCustomerUsageAlertOutboundSchema = import_v44.z.object({
14358
14621
  threshold_type: import_v44.z.string(),
14359
14622
  name: import_v44.z.union([import_v44.z.string(), import_v44.z.undefined()]).optional()
14360
14623
  });
14624
+ var getOrCreateCustomerOverageAllowedOutboundSchema = import_v44.z.object({
14625
+ feature_id: import_v44.z.string(),
14626
+ enabled: import_v44.z.boolean()
14627
+ });
14361
14628
  var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14362
14629
  auto_topups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupOutboundSchema), import_v44.z.undefined()]).optional(),
14363
14630
  spend_limits: import_v44.z.union([
@@ -14367,6 +14634,10 @@ var getOrCreateCustomerBillingControlsOutboundSchema = import_v44.z.object({
14367
14634
  usage_alerts: import_v44.z.union([
14368
14635
  import_v44.z.array(getOrCreateCustomerUsageAlertOutboundSchema),
14369
14636
  import_v44.z.undefined()
14637
+ ]).optional(),
14638
+ overage_allowed: import_v44.z.union([
14639
+ import_v44.z.array(getOrCreateCustomerOverageAllowedOutboundSchema),
14640
+ import_v44.z.undefined()
14370
14641
  ]).optional()
14371
14642
  });
14372
14643
  var getOrCreateCustomerParamsOutboundSchema = import_v44.z.object({
@@ -14407,7 +14678,8 @@ var getOrCreateCustomerUsageAlertSchema = import_v44.z.object({
14407
14678
  var getOrCreateCustomerBillingControlsSchema = import_v44.z.object({
14408
14679
  autoTopups: import_v44.z.union([import_v44.z.array(getOrCreateCustomerAutoTopupSchema), import_v44.z.undefined()]).optional(),
14409
14680
  spendLimits: import_v44.z.union([import_v44.z.array(getOrCreateCustomerSpendLimitSchema), import_v44.z.undefined()]).optional(),
14410
- usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional()
14681
+ usageAlerts: import_v44.z.union([import_v44.z.array(getOrCreateCustomerUsageAlertSchema), import_v44.z.undefined()]).optional(),
14682
+ overageAllowed: import_v44.z.union([import_v44.z.array(getOrCreateCustomerOverageAllowedSchema), import_v44.z.undefined()]).optional()
14411
14683
  });
14412
14684
  var getOrCreateCustomerParamsSchema = import_v44.z.object({
14413
14685
  customerId: import_v44.z.string().nullable(),
@@ -14546,6 +14818,7 @@ var listPlansItemPriceSchema = import_v46.z.object({
14546
14818
  var listPlansExpiryDurationTypeSchema = openEnumSchema2;
14547
14819
  var listPlansRolloverSchema = import_v46.z.object({
14548
14820
  max: import_v46.z.number().nullable(),
14821
+ maxPercentage: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional().nullable(),
14549
14822
  expiryDurationType: listPlansExpiryDurationTypeSchema,
14550
14823
  expiryDurationLength: import_v46.z.union([import_v46.z.number(), import_v46.z.undefined()]).optional()
14551
14824
  });
@@ -14626,6 +14899,10 @@ var multiAttachSpendLimitSchema = import_v47.z.object({
14626
14899
  enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional(),
14627
14900
  overageLimit: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14628
14901
  });
14902
+ var multiAttachOverageAllowedSchema = import_v47.z.object({
14903
+ featureId: import_v47.z.string(),
14904
+ enabled: import_v47.z.union([import_v47.z.boolean(), import_v47.z.undefined()]).optional()
14905
+ });
14629
14906
  var multiAttachInvoiceSchema = import_v47.z.object({
14630
14907
  status: import_v47.z.string().nullable(),
14631
14908
  stripeId: import_v47.z.string(),
@@ -14664,6 +14941,7 @@ var multiAttachProrationOutboundSchema = import_v47.z.object({
14664
14941
  });
14665
14942
  var multiAttachRolloverOutboundSchema = import_v47.z.object({
14666
14943
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14944
+ max_percentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14667
14945
  expiry_duration_type: import_v47.z.string(),
14668
14946
  expiry_duration_length: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14669
14947
  });
@@ -14718,9 +14996,14 @@ var multiAttachUsageAlertOutboundSchema = import_v47.z.object({
14718
14996
  threshold_type: import_v47.z.string(),
14719
14997
  name: import_v47.z.union([import_v47.z.string(), import_v47.z.undefined()]).optional()
14720
14998
  });
14999
+ var multiAttachOverageAllowedOutboundSchema = import_v47.z.object({
15000
+ feature_id: import_v47.z.string(),
15001
+ enabled: import_v47.z.boolean()
15002
+ });
14721
15003
  var multiAttachBillingControlsOutboundSchema = import_v47.z.object({
14722
15004
  spend_limits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitOutboundSchema), import_v47.z.undefined()]).optional(),
14723
- usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional()
15005
+ usage_alerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertOutboundSchema), import_v47.z.undefined()]).optional(),
15006
+ overage_allowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedOutboundSchema), import_v47.z.undefined()]).optional()
14724
15007
  });
14725
15008
  var multiAttachEntityDataOutboundSchema = import_v47.z.object({
14726
15009
  feature_id: import_v47.z.string(),
@@ -14764,6 +15047,7 @@ var multiAttachProrationSchema = import_v47.z.object({
14764
15047
  var multiAttachExpiryDurationTypeSchema = closedEnumSchema4;
14765
15048
  var multiAttachRolloverSchema = import_v47.z.object({
14766
15049
  max: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
15050
+ maxPercentage: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional(),
14767
15051
  expiryDurationType: multiAttachExpiryDurationTypeSchema,
14768
15052
  expiryDurationLength: import_v47.z.union([import_v47.z.number(), import_v47.z.undefined()]).optional()
14769
15053
  });
@@ -14804,7 +15088,8 @@ var multiAttachUsageAlertSchema = import_v47.z.object({
14804
15088
  });
14805
15089
  var multiAttachBillingControlsSchema = import_v47.z.object({
14806
15090
  spendLimits: import_v47.z.union([import_v47.z.array(multiAttachSpendLimitSchema), import_v47.z.undefined()]).optional(),
14807
- usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional()
15091
+ usageAlerts: import_v47.z.union([import_v47.z.array(multiAttachUsageAlertSchema), import_v47.z.undefined()]).optional(),
15092
+ overageAllowed: import_v47.z.union([import_v47.z.array(multiAttachOverageAllowedSchema), import_v47.z.undefined()]).optional()
14808
15093
  });
14809
15094
  var multiAttachEntityDataSchema = import_v47.z.object({
14810
15095
  featureId: import_v47.z.string(),
@@ -15012,6 +15297,7 @@ var previewAttachProrationOutboundSchema = import_v49.z.object({
15012
15297
  });
15013
15298
  var previewAttachRolloverOutboundSchema = import_v49.z.object({
15014
15299
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15300
+ max_percentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15015
15301
  expiry_duration_type: import_v49.z.string(),
15016
15302
  expiry_duration_length: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15017
15303
  });
@@ -15116,6 +15402,7 @@ var previewAttachProrationSchema = import_v49.z.object({
15116
15402
  var previewAttachExpiryDurationTypeSchema = closedEnumSchema5;
15117
15403
  var previewAttachRolloverSchema = import_v49.z.object({
15118
15404
  max: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15405
+ maxPercentage: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
15119
15406
  expiryDurationType: previewAttachExpiryDurationTypeSchema,
15120
15407
  expiryDurationLength: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional()
15121
15408
  });
@@ -15225,6 +15512,10 @@ var previewMultiAttachSpendLimitSchema = import_v410.z.object({
15225
15512
  enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional(),
15226
15513
  overageLimit: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15227
15514
  });
15515
+ var previewMultiAttachOverageAllowedSchema = import_v410.z.object({
15516
+ featureId: import_v410.z.string(),
15517
+ enabled: import_v410.z.union([import_v410.z.boolean(), import_v410.z.undefined()]).optional()
15518
+ });
15228
15519
  var previewMultiAttachDiscountSchema = import_v410.z.object({
15229
15520
  amountOff: import_v410.z.number(),
15230
15521
  percentOff: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
@@ -15326,6 +15617,7 @@ var previewMultiAttachProrationOutboundSchema = import_v410.z.object({
15326
15617
  });
15327
15618
  var previewMultiAttachRolloverOutboundSchema = import_v410.z.object({
15328
15619
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15620
+ max_percentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15329
15621
  expiry_duration_type: import_v410.z.string(),
15330
15622
  expiry_duration_length: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15331
15623
  });
@@ -15383,9 +15675,17 @@ var previewMultiAttachUsageAlertOutboundSchema = import_v410.z.object({
15383
15675
  threshold_type: import_v410.z.string(),
15384
15676
  name: import_v410.z.union([import_v410.z.string(), import_v410.z.undefined()]).optional()
15385
15677
  });
15678
+ var previewMultiAttachOverageAllowedOutboundSchema = import_v410.z.object({
15679
+ feature_id: import_v410.z.string(),
15680
+ enabled: import_v410.z.boolean()
15681
+ });
15386
15682
  var previewMultiAttachBillingControlsOutboundSchema = import_v410.z.object({
15387
15683
  spend_limits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitOutboundSchema), import_v410.z.undefined()]).optional(),
15388
- usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional()
15684
+ usage_alerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertOutboundSchema), import_v410.z.undefined()]).optional(),
15685
+ overage_allowed: import_v410.z.union([
15686
+ import_v410.z.array(previewMultiAttachOverageAllowedOutboundSchema),
15687
+ import_v410.z.undefined()
15688
+ ]).optional()
15389
15689
  });
15390
15690
  var previewMultiAttachEntityDataOutboundSchema = import_v410.z.object({
15391
15691
  feature_id: import_v410.z.string(),
@@ -15430,6 +15730,7 @@ var previewMultiAttachProrationSchema = import_v410.z.object({
15430
15730
  var previewMultiAttachExpiryDurationTypeSchema = closedEnumSchema6;
15431
15731
  var previewMultiAttachRolloverSchema = import_v410.z.object({
15432
15732
  max: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15733
+ maxPercentage: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional(),
15433
15734
  expiryDurationType: previewMultiAttachExpiryDurationTypeSchema,
15434
15735
  expiryDurationLength: import_v410.z.union([import_v410.z.number(), import_v410.z.undefined()]).optional()
15435
15736
  });
@@ -15473,7 +15774,8 @@ var previewMultiAttachUsageAlertSchema = import_v410.z.object({
15473
15774
  });
15474
15775
  var previewMultiAttachBillingControlsSchema = import_v410.z.object({
15475
15776
  spendLimits: import_v410.z.union([import_v410.z.array(previewMultiAttachSpendLimitSchema), import_v410.z.undefined()]).optional(),
15476
- usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional()
15777
+ usageAlerts: import_v410.z.union([import_v410.z.array(previewMultiAttachUsageAlertSchema), import_v410.z.undefined()]).optional(),
15778
+ overageAllowed: import_v410.z.union([import_v410.z.array(previewMultiAttachOverageAllowedSchema), import_v410.z.undefined()]).optional()
15477
15779
  });
15478
15780
  var previewMultiAttachEntityDataSchema = import_v410.z.object({
15479
15781
  featureId: import_v410.z.string(),
@@ -15669,6 +15971,7 @@ var previewUpdateProrationOutboundSchema = import_v411.z.object({
15669
15971
  });
15670
15972
  var previewUpdateRolloverOutboundSchema = import_v411.z.object({
15671
15973
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15974
+ max_percentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15672
15975
  expiry_duration_type: import_v411.z.string(),
15673
15976
  expiry_duration_length: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15674
15977
  });
@@ -15753,6 +16056,7 @@ var previewUpdateProrationSchema = import_v411.z.object({
15753
16056
  var previewUpdateExpiryDurationTypeSchema = closedEnumSchema7;
15754
16057
  var previewUpdateRolloverSchema = import_v411.z.object({
15755
16058
  max: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
16059
+ maxPercentage: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
15756
16060
  expiryDurationType: previewUpdateExpiryDurationTypeSchema,
15757
16061
  expiryDurationLength: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional()
15758
16062
  });
@@ -15916,6 +16220,7 @@ var setupPaymentProrationOutboundSchema = import_v413.z.object({
15916
16220
  });
15917
16221
  var setupPaymentRolloverOutboundSchema = import_v413.z.object({
15918
16222
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16223
+ max_percentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
15919
16224
  expiry_duration_type: import_v413.z.string(),
15920
16225
  expiry_duration_length: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
15921
16226
  });
@@ -16006,6 +16311,7 @@ var setupPaymentProrationSchema = import_v413.z.object({
16006
16311
  var setupPaymentExpiryDurationTypeSchema = closedEnumSchema8;
16007
16312
  var setupPaymentRolloverSchema = import_v413.z.object({
16008
16313
  max: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16314
+ maxPercentage: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional(),
16009
16315
  expiryDurationType: setupPaymentExpiryDurationTypeSchema,
16010
16316
  expiryDurationLength: import_v413.z.union([import_v413.z.number(), import_v413.z.undefined()]).optional()
16011
16317
  });
@@ -16116,6 +16422,7 @@ var billingUpdateProrationOutboundSchema = import_v414.z.object({
16116
16422
  });
16117
16423
  var billingUpdateRolloverOutboundSchema = import_v414.z.object({
16118
16424
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16425
+ max_percentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16119
16426
  expiry_duration_type: import_v414.z.string(),
16120
16427
  expiry_duration_length: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16121
16428
  });
@@ -16196,6 +16503,7 @@ var billingUpdateProrationSchema = import_v414.z.object({
16196
16503
  var billingUpdateExpiryDurationTypeSchema = closedEnumSchema9;
16197
16504
  var billingUpdateRolloverSchema = import_v414.z.object({
16198
16505
  max: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16506
+ maxPercentage: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional(),
16199
16507
  expiryDurationType: billingUpdateExpiryDurationTypeSchema,
16200
16508
  expiryDurationLength: import_v414.z.union([import_v414.z.number(), import_v414.z.undefined()]).optional()
16201
16509
  });