autumn-js 1.2.12 → 1.2.13

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 (159) hide show
  1. package/dist/backend/adapters/express.js +91 -4
  2. package/dist/backend/adapters/express.mjs +6 -6
  3. package/dist/backend/adapters/fetch.js +91 -4
  4. package/dist/backend/adapters/fetch.mjs +6 -6
  5. package/dist/backend/adapters/hono.js +91 -4
  6. package/dist/backend/adapters/hono.mjs +6 -6
  7. package/dist/backend/adapters/index.js +91 -4
  8. package/dist/backend/adapters/index.mjs +9 -9
  9. package/dist/backend/adapters/next.js +91 -4
  10. package/dist/backend/adapters/next.mjs +6 -6
  11. package/dist/backend/{chunk-JQX5WYYY.mjs → chunk-7BVATYGA.mjs} +1 -1
  12. package/dist/backend/{chunk-7Q77N2K2.mjs → chunk-DNNJOZAT.mjs} +1 -1
  13. package/dist/backend/{chunk-N53PKNZ6.mjs → chunk-EJGHP7KT.mjs} +2 -2
  14. package/dist/backend/{chunk-X4LPDDOP.mjs → chunk-MANTLPDT.mjs} +4 -0
  15. package/dist/backend/{chunk-4Q54RXI2.mjs → chunk-OUDB34Y7.mjs} +1 -1
  16. package/dist/backend/{chunk-SE5CK5NY.mjs → chunk-RPH5L44S.mjs} +1 -1
  17. package/dist/backend/{chunk-UEYDU64U.mjs → chunk-T42RZEUZ.mjs} +87 -4
  18. package/dist/backend/{chunk-ITXMMCSD.mjs → chunk-YSQQKZBU.mjs} +2 -2
  19. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  21. package/dist/backend/core/handlers/coreHandler.js +91 -4
  22. package/dist/backend/core/handlers/coreHandler.mjs +4 -4
  23. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  25. package/dist/backend/core/handlers/executeRoute.mjs +1 -1
  26. package/dist/backend/core/handlers/handleRouteByName.js +91 -4
  27. package/dist/backend/core/handlers/handleRouteByName.mjs +4 -4
  28. package/dist/backend/core/handlers/index.d.mts +1 -1
  29. package/dist/backend/core/handlers/index.d.ts +1 -1
  30. package/dist/backend/core/handlers/index.js +91 -4
  31. package/dist/backend/core/handlers/index.mjs +5 -5
  32. package/dist/backend/core/index.d.mts +1 -1
  33. package/dist/backend/core/index.d.ts +1 -1
  34. package/dist/backend/core/index.js +91 -4
  35. package/dist/backend/core/index.mjs +7 -7
  36. package/dist/backend/core/routes/index.d.mts +1 -1
  37. package/dist/backend/core/routes/index.d.ts +1 -1
  38. package/dist/backend/core/routes/index.js +4 -0
  39. package/dist/backend/core/routes/index.mjs +2 -2
  40. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  41. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  44. package/dist/backend/core/routes/routeConfigs.js +4 -0
  45. package/dist/backend/core/routes/routeConfigs.mjs +2 -2
  46. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  47. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  48. package/dist/backend/core/types/index.d.mts +1 -1
  49. package/dist/backend/core/types/index.d.ts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  51. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  52. package/dist/backend/core/utils/index.mjs +3 -3
  53. package/dist/backend/index.d.mts +2 -2
  54. package/dist/backend/index.d.ts +2 -2
  55. package/dist/backend/index.js +91 -4
  56. package/dist/backend/index.mjs +7 -7
  57. package/dist/backend/{routeTypes-D0ag5-Tb.d.ts → routeTypes-B94_Mq2J.d.ts} +93 -0
  58. package/dist/backend/{routeTypes-Cu-XQy7A.d.mts → routeTypes-DVwngaBn.d.mts} +93 -0
  59. package/dist/better-auth/{chunk-TEP6CVHR.mjs → chunk-4OWECHZC.mjs} +1 -1
  60. package/dist/better-auth/{chunk-GKUK5UGW.mjs → chunk-JIFD4TSN.mjs} +4 -0
  61. package/dist/better-auth/{chunk-XFATOIZD.mjs → chunk-ZZGFPTHO.mjs} +88 -5
  62. package/dist/better-auth/client.d.mts +3 -7
  63. package/dist/better-auth/client.d.ts +3 -7
  64. package/dist/better-auth/createAutumnEndpoint-CvXRCg-M.d.mts +43 -0
  65. package/dist/better-auth/createAutumnEndpoint-CvXRCg-M.d.ts +43 -0
  66. package/dist/better-auth/index.d.mts +3 -7
  67. package/dist/better-auth/index.d.ts +3 -7
  68. package/dist/better-auth/index.js +91 -4
  69. package/dist/better-auth/index.mjs +3 -3
  70. package/dist/better-auth/utils/createAutumnEndpoint.d.mts +3 -7
  71. package/dist/better-auth/utils/createAutumnEndpoint.d.ts +3 -7
  72. package/dist/better-auth/utils/createAutumnEndpoint.js +4 -0
  73. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  74. package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +3 -7
  75. package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +3 -7
  76. package/dist/better-auth/utils/handleBetterAuthRoute.js +91 -4
  77. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  78. package/dist/better-auth/utils/index.d.mts +3 -8
  79. package/dist/better-auth/utils/index.d.ts +3 -8
  80. package/dist/better-auth/utils/index.js +91 -4
  81. package/dist/better-auth/utils/index.mjs +3 -3
  82. package/dist/react/AutumnContext.d.mts +3 -3
  83. package/dist/react/AutumnContext.d.ts +3 -3
  84. package/dist/react/AutumnProvider.js +15 -15
  85. package/dist/react/AutumnProvider.mjs +2 -2
  86. package/dist/react/{chunk-26CKSAPZ.mjs → chunk-7IDH4OMG.mjs} +1 -1
  87. package/dist/react/{chunk-HSQUB3BZ.mjs → chunk-BDG6JHEW.mjs} +1 -1
  88. package/dist/react/{chunk-KB72KQKN.mjs → chunk-DEZBJQEG.mjs} +1 -1
  89. package/dist/react/{chunk-XJZH5NMZ.mjs → chunk-E5ZHOMZ4.mjs} +23 -23
  90. package/dist/react/{chunk-OXQG65ZT.mjs → chunk-FWWIAOPU.mjs} +1 -1
  91. package/dist/react/{chunk-ZGPE4R6H.mjs → chunk-HVBDZARN.mjs} +2 -2
  92. package/dist/react/{chunk-MC2YYATT.mjs → chunk-J6SLKTKE.mjs} +1 -1
  93. package/dist/react/{chunk-CHU7CIWP.mjs → chunk-NSFHAUTD.mjs} +1 -1
  94. package/dist/react/{chunk-G7FTQLT7.mjs → chunk-YQFYWH7J.mjs} +1 -1
  95. package/dist/react/client/AutumnClient.d.mts +3 -3
  96. package/dist/react/client/AutumnClient.d.ts +3 -3
  97. package/dist/react/client/IAutumnClient.d.mts +16 -3
  98. package/dist/react/client/IAutumnClient.d.ts +16 -3
  99. package/dist/react/client/index.d.mts +3 -3
  100. package/dist/react/client/index.d.ts +3 -3
  101. package/dist/react/{customer-CbcVyRCQ.d.ts → customer-CaGJEN5J.d.ts} +1 -1
  102. package/dist/react/{customer-BYYt9N1h.d.mts → customer-DB8vL_m7.d.mts} +1 -1
  103. package/dist/react/hooks/index.d.mts +3 -3
  104. package/dist/react/hooks/index.d.ts +3 -3
  105. package/dist/react/hooks/index.js +16 -16
  106. package/dist/react/hooks/index.mjs +8 -8
  107. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  108. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  109. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  110. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  111. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  112. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  113. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  114. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  115. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  116. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  117. package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
  118. package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
  119. package/dist/react/hooks/internal/useCustomerActions.js +1 -1
  120. package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
  121. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  122. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  123. package/dist/react/hooks/useAggregateEvents.js +16 -16
  124. package/dist/react/hooks/useAggregateEvents.mjs +2 -2
  125. package/dist/react/hooks/useCustomer.d.mts +3 -3
  126. package/dist/react/hooks/useCustomer.d.ts +3 -3
  127. package/dist/react/hooks/useCustomer.js +16 -16
  128. package/dist/react/hooks/useCustomer.mjs +3 -3
  129. package/dist/react/hooks/useEntity.d.mts +2 -2
  130. package/dist/react/hooks/useEntity.d.ts +2 -2
  131. package/dist/react/hooks/useEntity.js +16 -16
  132. package/dist/react/hooks/useEntity.mjs +2 -2
  133. package/dist/react/hooks/useListEvents.d.mts +2 -2
  134. package/dist/react/hooks/useListEvents.d.ts +2 -2
  135. package/dist/react/hooks/useListEvents.js +16 -16
  136. package/dist/react/hooks/useListEvents.mjs +2 -2
  137. package/dist/react/hooks/useListPlans.d.mts +2 -2
  138. package/dist/react/hooks/useListPlans.d.ts +2 -2
  139. package/dist/react/hooks/useListPlans.js +16 -16
  140. package/dist/react/hooks/useListPlans.mjs +2 -2
  141. package/dist/react/hooks/useReferrals.d.mts +2 -2
  142. package/dist/react/hooks/useReferrals.d.ts +2 -2
  143. package/dist/react/hooks/useReferrals.js +16 -16
  144. package/dist/react/hooks/useReferrals.mjs +2 -2
  145. package/dist/react/index.d.mts +3 -3
  146. package/dist/react/index.d.ts +3 -3
  147. package/dist/react/index.js +22 -22
  148. package/dist/react/index.mjs +9 -9
  149. package/dist/react/{params-By0MIRsJ.d.ts → params-B5l9vHfZ.d.ts} +1 -1
  150. package/dist/react/{params-CUb0ZlUG.d.mts → params-BVglT8vT.d.mts} +1 -1
  151. package/dist/react/{plan-CqxFGNk2.d.mts → plan-DSTBzzTY.d.mts} +13 -0
  152. package/dist/react/{plan-CqxFGNk2.d.ts → plan-DSTBzzTY.d.ts} +13 -0
  153. package/dist/sdk/index.d.mts +125 -1
  154. package/dist/sdk/index.d.ts +125 -1
  155. package/dist/sdk/index.js +146 -4
  156. package/dist/sdk/index.mjs +133 -5
  157. package/package.json +1 -1
  158. package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.mts +0 -309
  159. package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.ts +0 -309
@@ -2678,6 +2678,15 @@ declare const PlanEnv: {
2678
2678
  * Environment this plan belongs to ('sandbox' or 'live').
2679
2679
  */
2680
2680
  type PlanEnv = OpenEnum<typeof PlanEnv>;
2681
+ /**
2682
+ * Miscellaneous plan-level configuration flags.
2683
+ */
2684
+ type PlanConfig = {
2685
+ /**
2686
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
2687
+ */
2688
+ ignorePastDue: boolean;
2689
+ };
2681
2690
  /**
2682
2691
  * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
2683
2692
  */
@@ -2782,6 +2791,10 @@ type Plan = {
2782
2791
  * If this is a variant, the ID of the base plan it was created from.
2783
2792
  */
2784
2793
  baseVariantId: string | null;
2794
+ /**
2795
+ * Miscellaneous plan-level configuration flags.
2796
+ */
2797
+ config: PlanConfig;
2785
2798
  customerEligibility?: CustomerEligibility | undefined;
2786
2799
  };
2787
2800
 
@@ -3619,6 +3632,15 @@ type FreeTrialRequest = {
3619
3632
  */
3620
3633
  cardRequired?: boolean | undefined;
3621
3634
  };
3635
+ /**
3636
+ * Miscellaneous plan-level configuration flags.
3637
+ */
3638
+ type CreatePlanConfigRequest = {
3639
+ /**
3640
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
3641
+ */
3642
+ ignorePastDue?: boolean | undefined;
3643
+ };
3622
3644
  type CreatePlanParams = {
3623
3645
  /**
3624
3646
  * The ID of the plan to create.
@@ -3656,6 +3678,10 @@ type CreatePlanParams = {
3656
3678
  * Free trial configuration. Customers can try this plan before being charged.
3657
3679
  */
3658
3680
  freeTrial?: FreeTrialRequest | undefined;
3681
+ /**
3682
+ * Miscellaneous plan-level configuration flags.
3683
+ */
3684
+ config?: CreatePlanConfigRequest | undefined;
3659
3685
  };
3660
3686
  /**
3661
3687
  * Billing interval (e.g. 'month', 'year').
@@ -3975,6 +4001,15 @@ declare const CreatePlanEnv: {
3975
4001
  * Environment this plan belongs to ('sandbox' or 'live').
3976
4002
  */
3977
4003
  type CreatePlanEnv = OpenEnum<typeof CreatePlanEnv>;
4004
+ /**
4005
+ * Miscellaneous plan-level configuration flags.
4006
+ */
4007
+ type CreatePlanConfigResponse = {
4008
+ /**
4009
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
4010
+ */
4011
+ ignorePastDue: boolean;
4012
+ };
3978
4013
  /**
3979
4014
  * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
3980
4015
  */
@@ -4082,6 +4117,10 @@ type CreatePlanResponse = {
4082
4117
  * If this is a variant, the ID of the base plan it was created from.
4083
4118
  */
4084
4119
  baseVariantId: string | null;
4120
+ /**
4121
+ * Miscellaneous plan-level configuration flags.
4122
+ */
4123
+ config: CreatePlanConfigResponse;
4085
4124
  customerEligibility?: CreatePlanCustomerEligibility | undefined;
4086
4125
  };
4087
4126
 
@@ -5613,6 +5652,15 @@ declare const GetPlanEnv: {
5613
5652
  * Environment this plan belongs to ('sandbox' or 'live').
5614
5653
  */
5615
5654
  type GetPlanEnv = OpenEnum<typeof GetPlanEnv>;
5655
+ /**
5656
+ * Miscellaneous plan-level configuration flags.
5657
+ */
5658
+ type GetPlanConfig = {
5659
+ /**
5660
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
5661
+ */
5662
+ ignorePastDue: boolean;
5663
+ };
5616
5664
  /**
5617
5665
  * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
5618
5666
  */
@@ -5720,6 +5768,10 @@ type GetPlanResponse = {
5720
5768
  * If this is a variant, the ID of the base plan it was created from.
5721
5769
  */
5722
5770
  baseVariantId: string | null;
5771
+ /**
5772
+ * Miscellaneous plan-level configuration flags.
5773
+ */
5774
+ config: GetPlanConfig;
5723
5775
  customerEligibility?: GetPlanCustomerEligibility | undefined;
5724
5776
  };
5725
5777
 
@@ -6753,6 +6805,15 @@ declare const ListPlansEnv: {
6753
6805
  * Environment this plan belongs to ('sandbox' or 'live').
6754
6806
  */
6755
6807
  type ListPlansEnv = OpenEnum<typeof ListPlansEnv>;
6808
+ /**
6809
+ * Miscellaneous plan-level configuration flags.
6810
+ */
6811
+ type ListPlansConfig = {
6812
+ /**
6813
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
6814
+ */
6815
+ ignorePastDue: boolean;
6816
+ };
6756
6817
  /**
6757
6818
  * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
6758
6819
  */
@@ -6860,6 +6921,10 @@ type ListPlansList = {
6860
6921
  * If this is a variant, the ID of the base plan it was created from.
6861
6922
  */
6862
6923
  baseVariantId: string | null;
6924
+ /**
6925
+ * Miscellaneous plan-level configuration flags.
6926
+ */
6927
+ config: ListPlansConfig;
6863
6928
  customerEligibility?: ListPlansCustomerEligibility | undefined;
6864
6929
  };
6865
6930
  /**
@@ -11822,6 +11887,15 @@ type UpdatePlanFreeTrialParams = {
11822
11887
  */
11823
11888
  cardRequired?: boolean | undefined;
11824
11889
  };
11890
+ /**
11891
+ * Miscellaneous plan-level configuration flags.
11892
+ */
11893
+ type UpdatePlanConfigRequest = {
11894
+ /**
11895
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
11896
+ */
11897
+ ignorePastDue?: boolean | undefined;
11898
+ };
11825
11899
  type UpdatePlanParams = {
11826
11900
  /**
11827
11901
  * The ID of the plan to update.
@@ -11856,6 +11930,10 @@ type UpdatePlanParams = {
11856
11930
  * The free trial of the plan. Set to null to remove the free trial.
11857
11931
  */
11858
11932
  freeTrial?: UpdatePlanFreeTrialParams | null | undefined;
11933
+ /**
11934
+ * Miscellaneous plan-level configuration flags.
11935
+ */
11936
+ config?: UpdatePlanConfigRequest | undefined;
11859
11937
  version?: number | undefined;
11860
11938
  archived?: boolean | undefined;
11861
11939
  /**
@@ -12181,6 +12259,15 @@ declare const UpdatePlanEnv: {
12181
12259
  * Environment this plan belongs to ('sandbox' or 'live').
12182
12260
  */
12183
12261
  type UpdatePlanEnv = OpenEnum<typeof UpdatePlanEnv>;
12262
+ /**
12263
+ * Miscellaneous plan-level configuration flags.
12264
+ */
12265
+ type UpdatePlanConfigResponse = {
12266
+ /**
12267
+ * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
12268
+ */
12269
+ ignorePastDue: boolean;
12270
+ };
12184
12271
  /**
12185
12272
  * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
12186
12273
  */
@@ -12288,6 +12375,10 @@ type UpdatePlanResponse = {
12288
12375
  * If this is a variant, the ID of the base plan it was created from.
12289
12376
  */
12290
12377
  baseVariantId: string | null;
12378
+ /**
12379
+ * Miscellaneous plan-level configuration flags.
12380
+ */
12381
+ config: UpdatePlanConfigResponse;
12291
12382
  customerEligibility?: UpdatePlanCustomerEligibility | undefined;
12292
12383
  };
12293
12384
 
@@ -13034,6 +13125,7 @@ declare class Plans extends ClientSDK {
13034
13125
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
13035
13126
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13036
13127
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
13128
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13037
13129
  *
13038
13130
  * @returns The created plan object.
13039
13131
  */
@@ -13121,6 +13213,7 @@ declare class Plans extends ClientSDK {
13121
13213
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
13122
13214
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13123
13215
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
13216
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13124
13217
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
13125
13218
  *
13126
13219
  * @returns The updated plan object.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  routeConfigs
3
- } from "./chunk-GKUK5UGW.mjs";
3
+ } from "./chunk-JIFD4TSN.mjs";
4
4
  import {
5
5
  omitProtectedBodyFields
6
6
  } from "./chunk-GJAMWZNZ.mjs";
@@ -531,6 +531,9 @@ var listPlansItemDisplaySchema = z6.object({
531
531
  primaryText: z6.string(),
532
532
  secondaryText: z6.union([z6.string(), z6.undefined()]).optional()
533
533
  });
534
+ var listPlansConfigSchema = z6.object({
535
+ ignorePastDue: z6.boolean()
536
+ });
534
537
  var listPlansParamsOutboundSchema = z6.object({
535
538
  customer_id: z6.union([z6.string(), z6.undefined()]).optional(),
536
539
  entity_id: z6.union([z6.string(), z6.undefined()]).optional(),
@@ -619,6 +622,7 @@ var listPlansListSchema = z6.object({
619
622
  env: listPlansEnvSchema,
620
623
  archived: z6.boolean(),
621
624
  baseVariantId: z6.string().nullable(),
625
+ config: listPlansConfigSchema,
622
626
  customerEligibility: z6.union([listPlansCustomerEligibilitySchema, z6.undefined()]).optional()
623
627
  });
624
628
  var listPlansResponseSchema = z6.object({
@@ -8,7 +8,7 @@ import {
8
8
  routeConfigs,
9
9
  sanitizeBody,
10
10
  secretKeyCheck
11
- } from "./chunk-GKUK5UGW.mjs";
11
+ } from "./chunk-JIFD4TSN.mjs";
12
12
  import {
13
13
  getActiveOrganization
14
14
  } from "./chunk-BT3EAYVW.mjs";
@@ -3061,6 +3061,16 @@ var FreeTrial$inboundSchema = z16.pipe(
3061
3061
  })
3062
3062
  );
3063
3063
  var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
3064
+ var PlanConfig$inboundSchema = z16.pipe(
3065
+ z16.object({
3066
+ ignore_past_due: z16._default(boolean2(), false)
3067
+ }),
3068
+ z16.transform((v) => {
3069
+ return remap(v, {
3070
+ "ignore_past_due": "ignorePastDue"
3071
+ });
3072
+ })
3073
+ );
3064
3074
  var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
3065
3075
  var AttachAction$inboundSchema = inboundSchema(AttachAction);
3066
3076
  var CustomerEligibility$inboundSchema = z16.pipe(
@@ -3094,6 +3104,7 @@ var Plan$inboundSchema = z16.pipe(
3094
3104
  env: PlanEnv$inboundSchema,
3095
3105
  archived: boolean2(),
3096
3106
  base_variant_id: nullable(string4()),
3107
+ config: z16.lazy(() => PlanConfig$inboundSchema),
3097
3108
  customer_eligibility: optional2(z16.lazy(
3098
3109
  () => CustomerEligibility$inboundSchema
3099
3110
  ))
@@ -3774,6 +3785,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
3774
3785
  });
3775
3786
  })
3776
3787
  );
3788
+ var CreatePlanConfigRequest$outboundSchema = z19.pipe(
3789
+ z19.object({
3790
+ ignorePastDue: z19._default(z19.boolean(), false)
3791
+ }),
3792
+ z19.transform((v) => {
3793
+ return remap(v, {
3794
+ ignorePastDue: "ignore_past_due"
3795
+ });
3796
+ })
3797
+ );
3777
3798
  var CreatePlanParams$outboundSchema = z19.pipe(
3778
3799
  z19.object({
3779
3800
  planId: z19.string(),
@@ -3784,7 +3805,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
3784
3805
  autoEnable: z19._default(z19.boolean(), false),
3785
3806
  price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
3786
3807
  items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
3787
- freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
3808
+ freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
3809
+ config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
3788
3810
  }),
3789
3811
  z19.transform((v) => {
3790
3812
  return remap(v, {
@@ -3958,6 +3980,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
3958
3980
  })
3959
3981
  );
3960
3982
  var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
3983
+ var CreatePlanConfigResponse$inboundSchema = z19.pipe(
3984
+ z19.object({
3985
+ ignore_past_due: z19._default(boolean2(), false)
3986
+ }),
3987
+ z19.transform((v) => {
3988
+ return remap(v, {
3989
+ "ignore_past_due": "ignorePastDue"
3990
+ });
3991
+ })
3992
+ );
3961
3993
  var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
3962
3994
  var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
3963
3995
  var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
@@ -3993,6 +4025,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
3993
4025
  env: CreatePlanEnv$inboundSchema,
3994
4026
  archived: boolean2(),
3995
4027
  base_variant_id: nullable(string4()),
4028
+ config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
3996
4029
  customer_eligibility: optional2(
3997
4030
  z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
3998
4031
  )
@@ -5245,6 +5278,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
5245
5278
  })
5246
5279
  );
5247
5280
  var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
5281
+ var GetPlanConfig$inboundSchema = z31.pipe(
5282
+ z31.object({
5283
+ ignore_past_due: z31._default(boolean2(), false)
5284
+ }),
5285
+ z31.transform((v) => {
5286
+ return remap(v, {
5287
+ "ignore_past_due": "ignorePastDue"
5288
+ });
5289
+ })
5290
+ );
5248
5291
  var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
5249
5292
  var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
5250
5293
  var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
@@ -5278,6 +5321,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
5278
5321
  env: GetPlanEnv$inboundSchema,
5279
5322
  archived: boolean2(),
5280
5323
  base_variant_id: nullable(string4()),
5324
+ config: z31.lazy(() => GetPlanConfig$inboundSchema),
5281
5325
  customer_eligibility: optional2(
5282
5326
  z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
5283
5327
  )
@@ -5988,6 +6032,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
5988
6032
  })
5989
6033
  );
5990
6034
  var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
6035
+ var ListPlansConfig$inboundSchema = z35.pipe(
6036
+ z35.object({
6037
+ ignore_past_due: z35._default(boolean2(), false)
6038
+ }),
6039
+ z35.transform((v) => {
6040
+ return remap(v, {
6041
+ "ignore_past_due": "ignorePastDue"
6042
+ });
6043
+ })
6044
+ );
5991
6045
  var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
5992
6046
  var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
5993
6047
  var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
@@ -6021,6 +6075,7 @@ var ListPlansList$inboundSchema = z35.pipe(
6021
6075
  env: ListPlansEnv$inboundSchema,
6022
6076
  archived: boolean2(),
6023
6077
  base_variant_id: nullable(string4()),
6078
+ config: z35.lazy(() => ListPlansConfig$inboundSchema),
6024
6079
  customer_eligibility: optional2(
6025
6080
  z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
6026
6081
  )
@@ -9715,6 +9770,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
9715
9770
  });
9716
9771
  })
9717
9772
  );
9773
+ var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
9774
+ z48.object({
9775
+ ignorePastDue: z48._default(z48.boolean(), false)
9776
+ }),
9777
+ z48.transform((v) => {
9778
+ return remap(v, {
9779
+ ignorePastDue: "ignore_past_due"
9780
+ });
9781
+ })
9782
+ );
9718
9783
  var UpdatePlanParams$outboundSchema = z48.pipe(
9719
9784
  z48.object({
9720
9785
  planId: z48.string(),
@@ -9730,6 +9795,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
9730
9795
  freeTrial: z48.optional(
9731
9796
  z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
9732
9797
  ),
9798
+ config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
9733
9799
  version: z48.optional(z48.number()),
9734
9800
  archived: z48._default(z48.boolean(), false),
9735
9801
  newPlanId: z48.optional(z48.string())
@@ -9907,6 +9973,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
9907
9973
  })
9908
9974
  );
9909
9975
  var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
9976
+ var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
9977
+ z48.object({
9978
+ ignore_past_due: z48._default(boolean2(), false)
9979
+ }),
9980
+ z48.transform((v) => {
9981
+ return remap(v, {
9982
+ "ignore_past_due": "ignorePastDue"
9983
+ });
9984
+ })
9985
+ );
9910
9986
  var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
9911
9987
  var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
9912
9988
  var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
@@ -9940,6 +10016,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
9940
10016
  env: UpdatePlanEnv$inboundSchema,
9941
10017
  archived: boolean2(),
9942
10018
  base_variant_id: nullable(string4()),
10019
+ config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
9943
10020
  customer_eligibility: optional2(
9944
10021
  z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
9945
10022
  )
@@ -10198,10 +10275,14 @@ var FailOpenHook = class {
10198
10275
  fetcher: async (input, init) => {
10199
10276
  try {
10200
10277
  return init == null ? await fetch(input) : await fetch(input, init);
10201
- } catch {
10278
+ } catch (error) {
10279
+ console.log(error);
10280
+ console.log(
10281
+ `Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
10282
+ );
10202
10283
  return new Response(null, {
10203
- status: 503,
10204
- statusText: "Autumn Unreachable"
10284
+ status: 555,
10285
+ statusText: "Network Error"
10205
10286
  });
10206
10287
  }
10207
10288
  }
@@ -13963,6 +14044,7 @@ var Plans = class extends ClientSDK {
13963
14044
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
13964
14045
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13965
14046
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
14047
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13966
14048
  *
13967
14049
  * @returns The created plan object.
13968
14050
  */
@@ -14068,6 +14150,7 @@ var Plans = class extends ClientSDK {
14068
14150
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
14069
14151
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
14070
14152
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
14153
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
14071
14154
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
14072
14155
  *
14073
14156
  * @returns The updated plan object.
@@ -1,11 +1,7 @@
1
1
  import { autumn } from './index.mjs';
2
- import './createAutumnEndpoint-D9Plymvy.mjs';
3
- import './standard-schema.mjs';
4
- import './error.mjs';
5
- import './context.mjs';
6
- import './middleware.mjs';
7
- import './openapi.mjs';
8
- import 'zod';
2
+ import './createAutumnEndpoint-CvXRCg-M.mjs';
3
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
4
+ import 'zod/v4';
9
5
  import 'zod/v4/core';
10
6
  import './types.mjs';
11
7
 
@@ -1,11 +1,7 @@
1
1
  import { autumn } from './index.js';
2
- import './createAutumnEndpoint-D9Plymvy.js';
3
- import './standard-schema.mjs';
4
- import './error.mjs';
5
- import './context.mjs';
6
- import './middleware.mjs';
7
- import './openapi.mjs';
8
- import 'zod';
2
+ import './createAutumnEndpoint-CvXRCg-M.js';
3
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
4
+ import 'zod/v4';
9
5
  import 'zod/v4/core';
10
6
  import './types.js';
11
7
 
@@ -0,0 +1,43 @@
1
+ import * as _______________node_modules_better_call_dist_endpoint_mjs from '../../../../../node_modules/better-call/dist/endpoint.mjs';
2
+ import * as zod_v4 from 'zod/v4';
3
+ import * as z from 'zod/v4/core';
4
+
5
+ /** All supported route names as const for type safety */
6
+ declare const ROUTE_NAMES: {
7
+ readonly getOrCreateCustomer: "getOrCreateCustomer";
8
+ readonly getEntity: "getEntity";
9
+ readonly attach: "attach";
10
+ readonly previewAttach: "previewAttach";
11
+ readonly updateSubscription: "updateSubscription";
12
+ readonly previewUpdateSubscription: "previewUpdateSubscription";
13
+ readonly openCustomerPortal: "openCustomerPortal";
14
+ readonly createReferralCode: "createReferralCode";
15
+ readonly redeemReferralCode: "redeemReferralCode";
16
+ readonly listPlans: "listPlans";
17
+ readonly listEvents: "listEvents";
18
+ readonly aggregateEvents: "aggregateEvents";
19
+ readonly multiAttach: "multiAttach";
20
+ readonly previewMultiAttach: "previewMultiAttach";
21
+ readonly setupPayment: "setupPayment";
22
+ };
23
+ /** Union of all route names */
24
+ type RouteName = keyof typeof ROUTE_NAMES;
25
+
26
+ /** Type for the handleRoute function used by better-auth endpoints */
27
+ type HandleBetterAuthRouteFn = (args: {
28
+ ctx: unknown;
29
+ routeName: RouteName;
30
+ }) => Promise<{
31
+ status: number;
32
+ body: unknown;
33
+ }>;
34
+ /**
35
+ * Creates a better-auth endpoint for a given route name.
36
+ * Each route needs its own call to preserve TypeScript literal types for the path.
37
+ */
38
+ declare const createAutumnEndpoint: <T extends RouteName>(routeName: T, handleRoute: HandleBetterAuthRouteFn) => _______________node_modules_better_call_dist_endpoint_mjs.StrictEndpoint<`/autumn/${T}`, {
39
+ method: "POST";
40
+ body: zod_v4.ZodType<unknown, unknown, z.$ZodTypeInternals<unknown, unknown>> | undefined;
41
+ }, Record<string, unknown> | null>;
42
+
43
+ export { type HandleBetterAuthRouteFn as H, type RouteName as R, createAutumnEndpoint as c };
@@ -0,0 +1,43 @@
1
+ import * as _______________node_modules_better_call_dist_endpoint_mjs from '../../../../../node_modules/better-call/dist/endpoint.mjs';
2
+ import * as zod_v4 from 'zod/v4';
3
+ import * as z from 'zod/v4/core';
4
+
5
+ /** All supported route names as const for type safety */
6
+ declare const ROUTE_NAMES: {
7
+ readonly getOrCreateCustomer: "getOrCreateCustomer";
8
+ readonly getEntity: "getEntity";
9
+ readonly attach: "attach";
10
+ readonly previewAttach: "previewAttach";
11
+ readonly updateSubscription: "updateSubscription";
12
+ readonly previewUpdateSubscription: "previewUpdateSubscription";
13
+ readonly openCustomerPortal: "openCustomerPortal";
14
+ readonly createReferralCode: "createReferralCode";
15
+ readonly redeemReferralCode: "redeemReferralCode";
16
+ readonly listPlans: "listPlans";
17
+ readonly listEvents: "listEvents";
18
+ readonly aggregateEvents: "aggregateEvents";
19
+ readonly multiAttach: "multiAttach";
20
+ readonly previewMultiAttach: "previewMultiAttach";
21
+ readonly setupPayment: "setupPayment";
22
+ };
23
+ /** Union of all route names */
24
+ type RouteName = keyof typeof ROUTE_NAMES;
25
+
26
+ /** Type for the handleRoute function used by better-auth endpoints */
27
+ type HandleBetterAuthRouteFn = (args: {
28
+ ctx: unknown;
29
+ routeName: RouteName;
30
+ }) => Promise<{
31
+ status: number;
32
+ body: unknown;
33
+ }>;
34
+ /**
35
+ * Creates a better-auth endpoint for a given route name.
36
+ * Each route needs its own call to preserve TypeScript literal types for the path.
37
+ */
38
+ declare const createAutumnEndpoint: <T extends RouteName>(routeName: T, handleRoute: HandleBetterAuthRouteFn) => _______________node_modules_better_call_dist_endpoint_mjs.StrictEndpoint<`/autumn/${T}`, {
39
+ method: "POST";
40
+ body: zod_v4.ZodType<unknown, unknown, z.$ZodTypeInternals<unknown, unknown>> | undefined;
41
+ }, Record<string, unknown> | null>;
42
+
43
+ export { type HandleBetterAuthRouteFn as H, type RouteName as R, createAutumnEndpoint as c };
@@ -1,11 +1,7 @@
1
- import { R as RouteName, c as createAutumnEndpoint } from './createAutumnEndpoint-D9Plymvy.mjs';
1
+ import { R as RouteName, c as createAutumnEndpoint } from './createAutumnEndpoint-CvXRCg-M.mjs';
2
2
  import { AutumnOptions } from './types.mjs';
3
- import './standard-schema.mjs';
4
- import './error.mjs';
5
- import './context.mjs';
6
- import './middleware.mjs';
7
- import './openapi.mjs';
8
- import 'zod';
3
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
4
+ import 'zod/v4';
9
5
  import 'zod/v4/core';
10
6
 
11
7
  /** Type for a single autumn endpoint */
@@ -1,11 +1,7 @@
1
- import { R as RouteName, c as createAutumnEndpoint } from './createAutumnEndpoint-D9Plymvy.js';
1
+ import { R as RouteName, c as createAutumnEndpoint } from './createAutumnEndpoint-CvXRCg-M.js';
2
2
  import { AutumnOptions } from './types.js';
3
- import './standard-schema.mjs';
4
- import './error.mjs';
5
- import './context.mjs';
6
- import './middleware.mjs';
7
- import './openapi.mjs';
8
- import 'zod';
3
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
4
+ import 'zod/v4';
9
5
  import 'zod/v4/core';
10
6
 
11
7
  /** Type for a single autumn endpoint */