autumn-js 1.2.5 → 1.2.7

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 (134) 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 +67 -19
  4. package/dist/backend/adapters/express.mjs +8 -8
  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 +67 -19
  8. package/dist/backend/adapters/fetch.mjs +8 -8
  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 +67 -19
  12. package/dist/backend/adapters/hono.mjs +8 -8
  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 +67 -19
  16. package/dist/backend/adapters/index.mjs +11 -11
  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 +67 -19
  20. package/dist/backend/adapters/next.mjs +8 -8
  21. package/dist/backend/{authTypes-Bdpu8A6G.d.mts → authTypes-BapwVzwz.d.mts} +7 -5
  22. package/dist/backend/{authTypes-Bdpu8A6G.d.ts → authTypes-BapwVzwz.d.ts} +7 -5
  23. package/dist/backend/{chunk-ROGSCIQY.mjs → chunk-5CZDAFNW.mjs} +1 -1
  24. package/dist/backend/{chunk-VDUNE74N.mjs → chunk-DV2YHWEK.mjs} +1 -1
  25. package/dist/backend/{chunk-LKQP4KZQ.mjs → chunk-GLJ7FFOQ.mjs} +56 -17
  26. package/dist/backend/{chunk-DYVMFOAC.mjs → chunk-LNALJOXZ.mjs} +5 -5
  27. package/dist/backend/{chunk-CZ3GSCGC.mjs → chunk-PKA4GW4O.mjs} +7 -7
  28. package/dist/backend/{chunk-4VEVV4YT.mjs → chunk-RUMFBMKX.mjs} +1 -1
  29. package/dist/backend/{chunk-3RN6TO3T.mjs → chunk-THDDG3SC.mjs} +11 -2
  30. package/dist/backend/{chunk-J2P4XIDE.mjs → chunk-UC2X6SWS.mjs} +1 -1
  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 +67 -19
  34. package/dist/backend/core/handlers/coreHandler.mjs +6 -6
  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 +3 -3
  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 +67 -19
  41. package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
  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 +67 -19
  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 +67 -19
  51. package/dist/backend/core/index.mjs +7 -7
  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 +11 -2
  55. package/dist/backend/core/routes/index.mjs +1 -1
  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 +11 -2
  61. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  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/index.d.mts +4 -4
  71. package/dist/backend/index.d.ts +4 -4
  72. package/dist/backend/index.js +67 -19
  73. package/dist/backend/index.mjs +7 -7
  74. package/dist/backend/{routeTypes-ODZ6pr_U.d.mts → routeTypes-CeGvUnxR.d.mts} +115 -69
  75. package/dist/backend/{routeTypes-CmW3_-dX.d.ts → routeTypes-unMyXmbr.d.ts} +115 -69
  76. package/dist/better-auth/{chunk-3GJ25EX7.mjs → chunk-27T7GCI3.mjs} +57 -18
  77. package/dist/better-auth/{chunk-CG3LL2TQ.mjs → chunk-SAEKRWYS.mjs} +11 -2
  78. package/dist/better-auth/{chunk-UCMJFTKD.mjs → chunk-YHZ5P4JJ.mjs} +1 -1
  79. package/dist/better-auth/index.js +67 -19
  80. package/dist/better-auth/index.mjs +3 -3
  81. package/dist/better-auth/types.d.mts +7 -5
  82. package/dist/better-auth/types.d.ts +7 -5
  83. package/dist/better-auth/utils/createAutumnEndpoint.js +11 -2
  84. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  85. package/dist/better-auth/utils/handleBetterAuthRoute.js +67 -19
  86. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  87. package/dist/better-auth/utils/index.js +67 -19
  88. package/dist/better-auth/utils/index.mjs +3 -3
  89. package/dist/react/AutumnContext.d.mts +2 -2
  90. package/dist/react/AutumnContext.d.ts +2 -2
  91. package/dist/react/client/AutumnClient.d.mts +2 -2
  92. package/dist/react/client/AutumnClient.d.ts +2 -2
  93. package/dist/react/client/IAutumnClient.d.mts +2 -2
  94. package/dist/react/client/IAutumnClient.d.ts +2 -2
  95. package/dist/react/client/index.d.mts +2 -2
  96. package/dist/react/client/index.d.ts +2 -2
  97. package/dist/react/{customer-DDRi84Zq.d.mts → customer-C6YdbkAE.d.mts} +7 -5
  98. package/dist/react/{customer-BPHnUS4N.d.ts → customer-DTJHvcHL.d.ts} +7 -5
  99. package/dist/react/hooks/index.d.mts +2 -2
  100. package/dist/react/hooks/index.d.ts +2 -2
  101. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
  102. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
  103. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
  104. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
  105. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
  106. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
  107. package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
  108. package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
  109. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
  110. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
  111. package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
  112. package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
  113. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  114. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  115. package/dist/react/hooks/useCustomer.d.mts +2 -2
  116. package/dist/react/hooks/useCustomer.d.ts +2 -2
  117. package/dist/react/hooks/useEntity.d.mts +1 -1
  118. package/dist/react/hooks/useEntity.d.ts +1 -1
  119. package/dist/react/hooks/useListEvents.d.mts +1 -1
  120. package/dist/react/hooks/useListEvents.d.ts +1 -1
  121. package/dist/react/hooks/useListPlans.d.mts +1 -1
  122. package/dist/react/hooks/useListPlans.d.ts +1 -1
  123. package/dist/react/hooks/useReferrals.d.mts +1 -1
  124. package/dist/react/hooks/useReferrals.d.ts +1 -1
  125. package/dist/react/index.d.mts +2 -2
  126. package/dist/react/index.d.ts +2 -2
  127. package/dist/react/{params-Dpki_MJA.d.ts → params-CtLqnjHp.d.ts} +54 -28
  128. package/dist/react/{params-BUYYymIy.d.mts → params-IlPe7I2T.d.mts} +54 -28
  129. package/dist/sdk/index.d.mts +129 -79
  130. package/dist/sdk/index.d.ts +129 -79
  131. package/dist/sdk/index.js +61 -31
  132. package/dist/sdk/index.mjs +60 -28
  133. package/package.json +1 -1
  134. package/dist/backend/{chunk-S5HPMJ4U.mjs → chunk-55C2WWXQ.mjs} +3 -3
@@ -1,5 +1,5 @@
1
1
  import { Request, RequestHandler } from 'express';
2
- import { A as AuthResult } from '../authTypes-Bdpu8A6G.mjs';
2
+ import { A as AuthResult } from '../authTypes-BapwVzwz.mjs';
3
3
 
4
4
  type ExpressAutumnHandlerOptions = {
5
5
  /** Function to identify the customer from the request */
@@ -1,5 +1,5 @@
1
1
  import { Request, RequestHandler } from 'express';
2
- import { A as AuthResult } from '../authTypes-Bdpu8A6G.js';
2
+ import { A as AuthResult } from '../authTypes-BapwVzwz.js';
3
3
 
4
4
  type ExpressAutumnHandlerOptions = {
5
5
  /** Function to identify the customer from the request */
@@ -1695,6 +1695,7 @@ var AttachParams$outboundSchema = z10.pipe(
1695
1695
  ),
1696
1696
  successUrl: z10.optional(z10.string()),
1697
1697
  newBillingSubscription: z10.optional(z10.boolean()),
1698
+ billingCycleAnchor: z10.optional(z10.literal("now")),
1698
1699
  planSchedule: z10.optional(AttachPlanSchedule$outboundSchema),
1699
1700
  checkoutSessionParams: z10.optional(z10.record(z10.string(), z10.any())),
1700
1701
  customLineItems: z10.optional(
@@ -1721,6 +1722,7 @@ var AttachParams$outboundSchema = z10.pipe(
1721
1722
  subscriptionId: "subscription_id",
1722
1723
  successUrl: "success_url",
1723
1724
  newBillingSubscription: "new_billing_subscription",
1725
+ billingCycleAnchor: "billing_cycle_anchor",
1724
1726
  planSchedule: "plan_schedule",
1725
1727
  checkoutSessionParams: "checkout_session_params",
1726
1728
  customLineItems: "custom_line_items",
@@ -2198,6 +2200,7 @@ var UpdateSubscriptionParams$outboundSchema = z12.pipe(
2198
2200
  ),
2199
2201
  subscriptionId: z12.optional(z12.string()),
2200
2202
  cancelAction: z12.optional(BillingUpdateCancelAction$outboundSchema),
2203
+ billingCycleAnchor: z12.optional(z12.literal("now")),
2201
2204
  noBillingChanges: z12.optional(z12.boolean()),
2202
2205
  recalculateBalances: z12.optional(
2203
2206
  z12.lazy(() => BillingUpdateRecalculateBalances$outboundSchema)
@@ -2214,6 +2217,7 @@ var UpdateSubscriptionParams$outboundSchema = z12.pipe(
2214
2217
  redirectMode: "redirect_mode",
2215
2218
  subscriptionId: "subscription_id",
2216
2219
  cancelAction: "cancel_action",
2220
+ billingCycleAnchor: "billing_cycle_anchor",
2217
2221
  noBillingChanges: "no_billing_changes",
2218
2222
  recalculateBalances: "recalculate_balances"
2219
2223
  });
@@ -2531,7 +2535,7 @@ var CheckFreeTrial$inboundSchema = z13.pipe(
2531
2535
  })
2532
2536
  );
2533
2537
  var ProductScenario$inboundSchema = inboundSchema(ProductScenario);
2534
- var CheckProperties$inboundSchema = z13.pipe(
2538
+ var Properties$inboundSchema = z13.pipe(
2535
2539
  z13.object({
2536
2540
  is_free: boolean2(),
2537
2541
  is_one_off: boolean2(),
@@ -2563,7 +2567,7 @@ var Product$inboundSchema = z13.pipe(
2563
2567
  free_trial: nullable(z13.lazy(() => CheckFreeTrial$inboundSchema)),
2564
2568
  base_variant_id: nullable(string4()),
2565
2569
  scenario: optional2(ProductScenario$inboundSchema),
2566
- properties: optional2(z13.lazy(() => CheckProperties$inboundSchema))
2570
+ properties: optional2(z13.lazy(() => Properties$inboundSchema))
2567
2571
  }),
2568
2572
  z13.transform((v) => {
2569
2573
  return remap(v, {
@@ -2674,7 +2678,9 @@ var CustomerDataInterval = {
2674
2678
  };
2675
2679
  var CustomerDataThresholdType = {
2676
2680
  Usage: "usage",
2677
- UsagePercentage: "usage_percentage"
2681
+ UsagePercentage: "usage_percentage",
2682
+ Remaining: "remaining",
2683
+ RemainingPercentage: "remaining_percentage"
2678
2684
  };
2679
2685
  var CustomerDataInterval$outboundSchema = z15.enum(CustomerDataInterval);
2680
2686
  var CustomerDataPurchaseLimit$outboundSchema = z15.pipe(
@@ -3076,7 +3082,9 @@ var Plan$inboundSchema = z16.pipe(
3076
3082
  // ../sdk/src/models/create-entity-op.ts
3077
3083
  var CreateEntityThresholdTypeRequestBody = {
3078
3084
  Usage: "usage",
3079
- UsagePercentage: "usage_percentage"
3085
+ UsagePercentage: "usage_percentage",
3086
+ Remaining: "remaining",
3087
+ RemainingPercentage: "remaining_percentage"
3080
3088
  };
3081
3089
  var CreateEntityEnv = {
3082
3090
  Sandbox: "sandbox",
@@ -3093,7 +3101,9 @@ var CreateEntityType = {
3093
3101
  };
3094
3102
  var CreateEntityThresholdTypeResponse = {
3095
3103
  Usage: "usage",
3096
- UsagePercentage: "usage_percentage"
3104
+ UsagePercentage: "usage_percentage",
3105
+ Remaining: "remaining",
3106
+ RemainingPercentage: "remaining_percentage"
3097
3107
  };
3098
3108
  var CreateEntitySpendLimitRequest$outboundSchema = z17.pipe(
3099
3109
  z17.object({
@@ -4010,7 +4020,9 @@ var CustomerInterval = {
4010
4020
  };
4011
4021
  var CustomerThresholdType = {
4012
4022
  Usage: "usage",
4013
- UsagePercentage: "usage_percentage"
4023
+ UsagePercentage: "usage_percentage",
4024
+ Remaining: "remaining",
4025
+ RemainingPercentage: "remaining_percentage"
4014
4026
  };
4015
4027
  var CustomerStatus = {
4016
4028
  Active: "active",
@@ -4522,7 +4534,9 @@ var GetEntityType = {
4522
4534
  };
4523
4535
  var GetEntityThresholdType = {
4524
4536
  Usage: "usage",
4525
- UsagePercentage: "usage_percentage"
4537
+ UsagePercentage: "usage_percentage",
4538
+ Remaining: "remaining",
4539
+ RemainingPercentage: "remaining_percentage"
4526
4540
  };
4527
4541
  var GetEntityParams$outboundSchema = z28.pipe(
4528
4542
  z28.object({
@@ -4812,7 +4826,9 @@ var GetOrCreateCustomerInterval = {
4812
4826
  };
4813
4827
  var GetOrCreateCustomerThresholdType = {
4814
4828
  Usage: "usage",
4815
- UsagePercentage: "usage_percentage"
4829
+ UsagePercentage: "usage_percentage",
4830
+ Remaining: "remaining",
4831
+ RemainingPercentage: "remaining_percentage"
4816
4832
  };
4817
4833
  var GetOrCreateCustomerInterval$outboundSchema = z30.enum(GetOrCreateCustomerInterval);
4818
4834
  var GetOrCreateCustomerPurchaseLimit$outboundSchema = z30.pipe(
@@ -5275,7 +5291,9 @@ var ListCustomersInterval = {
5275
5291
  };
5276
5292
  var ListCustomersThresholdType = {
5277
5293
  Usage: "usage",
5278
- UsagePercentage: "usage_percentage"
5294
+ UsagePercentage: "usage_percentage",
5295
+ Remaining: "remaining",
5296
+ RemainingPercentage: "remaining_percentage"
5279
5297
  };
5280
5298
  var ListCustomersStatus = {
5281
5299
  Active: "active",
@@ -5576,7 +5594,6 @@ var EventsListParams$outboundSchema = z33.pipe(
5576
5594
  });
5577
5595
  })
5578
5596
  );
5579
- var ListEventsProperties$inboundSchema = z33.object({});
5580
5597
  var ListEventsList$inboundSchema = z33.pipe(
5581
5598
  z33.object({
5582
5599
  id: string4(),
@@ -5584,7 +5601,7 @@ var ListEventsList$inboundSchema = z33.pipe(
5584
5601
  feature_id: string4(),
5585
5602
  customer_id: string4(),
5586
5603
  value: number2(),
5587
- properties: z33.lazy(() => ListEventsProperties$inboundSchema)
5604
+ properties: z33.record(z33.string(), z33.any())
5588
5605
  }),
5589
5606
  z33.transform((v) => {
5590
5607
  return remap(v, {
@@ -6016,7 +6033,9 @@ var MultiAttachRedirectMode = {
6016
6033
  };
6017
6034
  var MultiAttachThresholdType = {
6018
6035
  Usage: "usage",
6019
- UsagePercentage: "usage_percentage"
6036
+ UsagePercentage: "usage_percentage",
6037
+ Remaining: "remaining",
6038
+ RemainingPercentage: "remaining_percentage"
6020
6039
  };
6021
6040
  var MultiAttachCode = {
6022
6041
  ThreedsRequired: "3ds_required",
@@ -6697,6 +6716,7 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
6697
6716
  ),
6698
6717
  successUrl: z38.optional(z38.string()),
6699
6718
  newBillingSubscription: z38.optional(z38.boolean()),
6719
+ billingCycleAnchor: z38.optional(z38.literal("now")),
6700
6720
  planSchedule: z38.optional(PreviewAttachPlanSchedule$outboundSchema),
6701
6721
  checkoutSessionParams: z38.optional(z38.record(z38.string(), z38.any())),
6702
6722
  customLineItems: z38.optional(
@@ -6723,6 +6743,7 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
6723
6743
  subscriptionId: "subscription_id",
6724
6744
  successUrl: "success_url",
6725
6745
  newBillingSubscription: "new_billing_subscription",
6746
+ billingCycleAnchor: "billing_cycle_anchor",
6726
6747
  planSchedule: "plan_schedule",
6727
6748
  checkoutSessionParams: "checkout_session_params",
6728
6749
  customLineItems: "custom_line_items",
@@ -7019,7 +7040,9 @@ var PreviewMultiAttachRedirectMode = {
7019
7040
  };
7020
7041
  var PreviewMultiAttachThresholdType = {
7021
7042
  Usage: "usage",
7022
- UsagePercentage: "usage_percentage"
7043
+ UsagePercentage: "usage_percentage",
7044
+ Remaining: "remaining",
7045
+ RemainingPercentage: "remaining_percentage"
7023
7046
  };
7024
7047
  var PreviewMultiAttachCheckoutType = {
7025
7048
  StripeCheckout: "stripe_checkout",
@@ -7837,6 +7860,7 @@ var PreviewUpdateParams$outboundSchema = z40.pipe(
7837
7860
  ),
7838
7861
  subscriptionId: z40.optional(z40.string()),
7839
7862
  cancelAction: z40.optional(PreviewUpdateCancelAction$outboundSchema),
7863
+ billingCycleAnchor: z40.optional(z40.literal("now")),
7840
7864
  noBillingChanges: z40.optional(z40.boolean()),
7841
7865
  recalculateBalances: z40.optional(
7842
7866
  z40.lazy(() => PreviewUpdateRecalculateBalances$outboundSchema)
@@ -7853,6 +7877,7 @@ var PreviewUpdateParams$outboundSchema = z40.pipe(
7853
7877
  redirectMode: "redirect_mode",
7854
7878
  subscriptionId: "subscription_id",
7855
7879
  cancelAction: "cancel_action",
7880
+ billingCycleAnchor: "billing_cycle_anchor",
7856
7881
  noBillingChanges: "no_billing_changes",
7857
7882
  recalculateBalances: "recalculate_balances"
7858
7883
  });
@@ -8374,6 +8399,7 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
8374
8399
  z42.array(z42.lazy(() => SetupPaymentAttachDiscount$outboundSchema))
8375
8400
  ),
8376
8401
  successUrl: z42.optional(z42.string()),
8402
+ billingCycleAnchor: z42.optional(z42.literal("now")),
8377
8403
  checkoutSessionParams: z42.optional(z42.record(z42.string(), z42.any())),
8378
8404
  customLineItems: z42.optional(
8379
8405
  z42.array(z42.lazy(() => SetupPaymentCustomLineItem$outboundSchema))
@@ -8396,6 +8422,7 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
8396
8422
  prorationBehavior: "proration_behavior",
8397
8423
  subscriptionId: "subscription_id",
8398
8424
  successUrl: "success_url",
8425
+ billingCycleAnchor: "billing_cycle_anchor",
8399
8426
  checkoutSessionParams: "checkout_session_params",
8400
8427
  customLineItems: "custom_line_items",
8401
8428
  processorSubscriptionId: "processor_subscription_id",
@@ -8523,7 +8550,9 @@ var UpdateCustomerIntervalRequest = {
8523
8550
  };
8524
8551
  var UpdateCustomerThresholdTypeRequestBody = {
8525
8552
  Usage: "usage",
8526
- UsagePercentage: "usage_percentage"
8553
+ UsagePercentage: "usage_percentage",
8554
+ Remaining: "remaining",
8555
+ RemainingPercentage: "remaining_percentage"
8527
8556
  };
8528
8557
  var UpdateCustomerEnv = {
8529
8558
  Sandbox: "sandbox",
@@ -8537,7 +8566,9 @@ var UpdateCustomerIntervalResponse = {
8537
8566
  };
8538
8567
  var UpdateCustomerThresholdTypeResponse = {
8539
8568
  Usage: "usage",
8540
- UsagePercentage: "usage_percentage"
8569
+ UsagePercentage: "usage_percentage",
8570
+ Remaining: "remaining",
8571
+ RemainingPercentage: "remaining_percentage"
8541
8572
  };
8542
8573
  var UpdateCustomerStatus = {
8543
8574
  Active: "active",
@@ -8907,7 +8938,9 @@ var UpdateCustomerResponse$inboundSchema = z45.pipe(
8907
8938
  var z46 = __toESM(require("zod/v4-mini"), 1);
8908
8939
  var UpdateEntityThresholdTypeRequestBody = {
8909
8940
  Usage: "usage",
8910
- UsagePercentage: "usage_percentage"
8941
+ UsagePercentage: "usage_percentage",
8942
+ Remaining: "remaining",
8943
+ RemainingPercentage: "remaining_percentage"
8911
8944
  };
8912
8945
  var UpdateEntityEnv = {
8913
8946
  Sandbox: "sandbox",
@@ -8924,7 +8957,9 @@ var UpdateEntityType = {
8924
8957
  };
8925
8958
  var UpdateEntityThresholdTypeResponse = {
8926
8959
  Usage: "usage",
8927
- UsagePercentage: "usage_percentage"
8960
+ UsagePercentage: "usage_percentage",
8961
+ Remaining: "remaining",
8962
+ RemainingPercentage: "remaining_percentage"
8928
8963
  };
8929
8964
  var UpdateEntitySpendLimitRequest$outboundSchema = z46.pipe(
8930
8965
  z46.object({
@@ -11605,6 +11640,7 @@ var Billing = class extends ClientSDK {
11605
11640
  * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
11606
11641
  * @param successUrl - URL to redirect to after successful checkout. (optional)
11607
11642
  * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
11643
+ * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now'. (optional)
11608
11644
  * @param planSchedule - When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled. (optional)
11609
11645
  * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
11610
11646
  * @param customLineItems - Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans). (optional)
@@ -11689,6 +11725,7 @@ var Billing = class extends ClientSDK {
11689
11725
  * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
11690
11726
  * @param successUrl - URL to redirect to after successful checkout. (optional)
11691
11727
  * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
11728
+ * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now'. (optional)
11692
11729
  * @param planSchedule - When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled. (optional)
11693
11730
  * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
11694
11731
  * @param customLineItems - Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans). (optional)
@@ -11771,6 +11808,7 @@ var Billing = class extends ClientSDK {
11771
11808
  * @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
11772
11809
  * @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
11773
11810
  * @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
11811
+ * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
11774
11812
  * @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
11775
11813
  * @param recalculateBalances - Controls whether balances should be recalculated during the subscription update. (optional)
11776
11814
  *
@@ -11805,6 +11843,7 @@ var Billing = class extends ClientSDK {
11805
11843
  * @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
11806
11844
  * @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
11807
11845
  * @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
11846
+ * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
11808
11847
  * @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
11809
11848
  * @param recalculateBalances - Controls whether balances should be recalculated during the subscription update. (optional)
11810
11849
  *
@@ -14464,6 +14503,7 @@ var attachParamsOutboundSchema = import_v42.z.object({
14464
14503
  discounts: import_v42.z.union([import_v42.z.array(attachAttachDiscountOutboundSchema), import_v42.z.undefined()]).optional(),
14465
14504
  success_url: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14466
14505
  new_billing_subscription: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
14506
+ billing_cycle_anchor: import_v42.z.union([import_v42.z.literal("now"), import_v42.z.undefined()]).optional(),
14467
14507
  plan_schedule: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14468
14508
  checkout_session_params: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.any()), import_v42.z.undefined()]).optional(),
14469
14509
  custom_line_items: import_v42.z.union([import_v42.z.array(attachCustomLineItemOutboundSchema), import_v42.z.undefined()]).optional(),
@@ -14548,6 +14588,7 @@ var attachParamsSchema = import_v42.z.object({
14548
14588
  discounts: import_v42.z.union([import_v42.z.array(attachAttachDiscountSchema), import_v42.z.undefined()]).optional(),
14549
14589
  successUrl: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14550
14590
  newBillingSubscription: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
14591
+ billingCycleAnchor: import_v42.z.union([import_v42.z.literal("now"), import_v42.z.undefined()]).optional(),
14551
14592
  planSchedule: import_v42.z.union([attachPlanScheduleSchema, import_v42.z.undefined()]).optional(),
14552
14593
  checkoutSessionParams: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.any()), import_v42.z.undefined()]).optional(),
14553
14594
  customLineItems: import_v42.z.union([import_v42.z.array(attachCustomLineItemSchema), import_v42.z.undefined()]).optional(),
@@ -14723,14 +14764,13 @@ var eventsListParamsSchema = import_v45.z.object({
14723
14764
  featureId: import_v45.z.union([import_v45.z.string(), import_v45.z.array(import_v45.z.string()), import_v45.z.undefined()]).optional(),
14724
14765
  customRange: import_v45.z.union([listEventsCustomRangeSchema, import_v45.z.undefined()]).optional()
14725
14766
  });
14726
- var listEventsPropertiesSchema = import_v45.z.object({});
14727
14767
  var listEventsListSchema = import_v45.z.object({
14728
14768
  id: import_v45.z.string(),
14729
14769
  timestamp: import_v45.z.number(),
14730
14770
  featureId: import_v45.z.string(),
14731
14771
  customerId: import_v45.z.string(),
14732
14772
  value: import_v45.z.number(),
14733
- properties: listEventsPropertiesSchema
14773
+ properties: import_v45.z.record(import_v45.z.string(), import_v45.z.any())
14734
14774
  });
14735
14775
  var listEventsResponseSchema = import_v45.z.object({
14736
14776
  list: import_v45.z.array(listEventsListSchema),
@@ -15365,6 +15405,7 @@ var previewAttachParamsOutboundSchema = import_v49.z.object({
15365
15405
  discounts: import_v49.z.union([import_v49.z.array(previewAttachAttachDiscountOutboundSchema), import_v49.z.undefined()]).optional(),
15366
15406
  success_url: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15367
15407
  new_billing_subscription: import_v49.z.union([import_v49.z.boolean(), import_v49.z.undefined()]).optional(),
15408
+ billing_cycle_anchor: import_v49.z.union([import_v49.z.literal("now"), import_v49.z.undefined()]).optional(),
15368
15409
  plan_schedule: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15369
15410
  checkout_session_params: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.any()), import_v49.z.undefined()]).optional(),
15370
15411
  custom_line_items: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemOutboundSchema), import_v49.z.undefined()]).optional(),
@@ -15450,6 +15491,7 @@ var previewAttachParamsSchema = import_v49.z.object({
15450
15491
  discounts: import_v49.z.union([import_v49.z.array(previewAttachAttachDiscountSchema), import_v49.z.undefined()]).optional(),
15451
15492
  successUrl: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15452
15493
  newBillingSubscription: import_v49.z.union([import_v49.z.boolean(), import_v49.z.undefined()]).optional(),
15494
+ billingCycleAnchor: import_v49.z.union([import_v49.z.literal("now"), import_v49.z.undefined()]).optional(),
15453
15495
  planSchedule: import_v49.z.union([previewAttachPlanScheduleSchema, import_v49.z.undefined()]).optional(),
15454
15496
  checkoutSessionParams: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.any()), import_v49.z.undefined()]).optional(),
15455
15497
  customLineItems: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemSchema), import_v49.z.undefined()]).optional(),
@@ -16024,6 +16066,7 @@ var previewUpdateParamsOutboundSchema = import_v411.z.object({
16024
16066
  redirect_mode: import_v411.z.string(),
16025
16067
  subscription_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
16026
16068
  cancel_action: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
16069
+ billing_cycle_anchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
16027
16070
  no_billing_changes: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
16028
16071
  recalculate_balances: import_v411.z.union([previewUpdateRecalculateBalancesOutboundSchema, import_v411.z.undefined()]).optional()
16029
16072
  });
@@ -16102,6 +16145,7 @@ var previewUpdateParamsSchema = import_v411.z.object({
16102
16145
  redirectMode: import_v411.z.union([previewUpdateRedirectModeSchema, import_v411.z.undefined()]).optional(),
16103
16146
  subscriptionId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
16104
16147
  cancelAction: import_v411.z.union([previewUpdateCancelActionSchema, import_v411.z.undefined()]).optional(),
16148
+ billingCycleAnchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
16105
16149
  noBillingChanges: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
16106
16150
  recalculateBalances: import_v411.z.union([previewUpdateRecalculateBalancesSchema, import_v411.z.undefined()]).optional()
16107
16151
  });
@@ -16277,6 +16321,7 @@ var setupPaymentParamsOutboundSchema = import_v413.z.object({
16277
16321
  subscription_id: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16278
16322
  discounts: import_v413.z.union([import_v413.z.array(setupPaymentAttachDiscountOutboundSchema), import_v413.z.undefined()]).optional(),
16279
16323
  success_url: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16324
+ billing_cycle_anchor: import_v413.z.union([import_v413.z.literal("now"), import_v413.z.undefined()]).optional(),
16280
16325
  checkout_session_params: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.any()), import_v413.z.undefined()]).optional(),
16281
16326
  custom_line_items: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemOutboundSchema), import_v413.z.undefined()]).optional(),
16282
16327
  processor_subscription_id: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
@@ -16354,6 +16399,7 @@ var setupPaymentParamsSchema = import_v413.z.object({
16354
16399
  subscriptionId: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16355
16400
  discounts: import_v413.z.union([import_v413.z.array(setupPaymentAttachDiscountSchema), import_v413.z.undefined()]).optional(),
16356
16401
  successUrl: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16402
+ billingCycleAnchor: import_v413.z.union([import_v413.z.literal("now"), import_v413.z.undefined()]).optional(),
16357
16403
  checkoutSessionParams: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.any()), import_v413.z.undefined()]).optional(),
16358
16404
  customLineItems: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemSchema), import_v413.z.undefined()]).optional(),
16359
16405
  processorSubscriptionId: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
@@ -16472,6 +16518,7 @@ var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
16472
16518
  redirect_mode: import_v414.z.string(),
16473
16519
  subscription_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
16474
16520
  cancel_action: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
16521
+ billing_cycle_anchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
16475
16522
  no_billing_changes: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
16476
16523
  recalculate_balances: import_v414.z.union([billingUpdateRecalculateBalancesOutboundSchema, import_v414.z.undefined()]).optional()
16477
16524
  });
@@ -16549,6 +16596,7 @@ var updateSubscriptionParamsSchema = import_v414.z.object({
16549
16596
  redirectMode: import_v414.z.union([billingUpdateRedirectModeSchema, import_v414.z.undefined()]).optional(),
16550
16597
  subscriptionId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
16551
16598
  cancelAction: import_v414.z.union([billingUpdateCancelActionSchema, import_v414.z.undefined()]).optional(),
16599
+ billingCycleAnchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
16552
16600
  noBillingChanges: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
16553
16601
  recalculateBalances: import_v414.z.union([billingUpdateRecalculateBalancesSchema, import_v414.z.undefined()]).optional()
16554
16602
  });
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4VEVV4YT.mjs";
3
+ } from "../chunk-RUMFBMKX.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-DYVMFOAC.mjs";
7
- import "../chunk-CZ3GSCGC.mjs";
6
+ import "../chunk-LNALJOXZ.mjs";
7
+ import "../chunk-PKA4GW4O.mjs";
8
+ import "../chunk-GLJ7FFOQ.mjs";
9
+ import "../chunk-55C2WWXQ.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-LKQP4KZQ.mjs";
11
- import "../chunk-3RN6TO3T.mjs";
12
- import "../chunk-S5HPMJ4U.mjs";
14
+ import "../chunk-THDDG3SC.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
16
  import "../chunk-VZIMT7AO.mjs";
15
17
  import "../chunk-Z6QP3YEA.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -1,4 +1,4 @@
1
- import { A as AuthResult } from '../authTypes-Bdpu8A6G.mjs';
1
+ import { A as AuthResult } from '../authTypes-BapwVzwz.mjs';
2
2
 
3
3
  type FetchAutumnHandlerOptions = {
4
4
  /** Function to identify the customer from the request */
@@ -1,4 +1,4 @@
1
- import { A as AuthResult } from '../authTypes-Bdpu8A6G.js';
1
+ import { A as AuthResult } from '../authTypes-BapwVzwz.js';
2
2
 
3
3
  type FetchAutumnHandlerOptions = {
4
4
  /** Function to identify the customer from the request */