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
@@ -3079,6 +3079,16 @@ var FreeTrial$inboundSchema = z16.pipe(
3079
3079
  })
3080
3080
  );
3081
3081
  var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
3082
+ var PlanConfig$inboundSchema = z16.pipe(
3083
+ z16.object({
3084
+ ignore_past_due: z16._default(boolean2(), false)
3085
+ }),
3086
+ z16.transform((v) => {
3087
+ return remap(v, {
3088
+ "ignore_past_due": "ignorePastDue"
3089
+ });
3090
+ })
3091
+ );
3082
3092
  var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
3083
3093
  var AttachAction$inboundSchema = inboundSchema(AttachAction);
3084
3094
  var CustomerEligibility$inboundSchema = z16.pipe(
@@ -3112,6 +3122,7 @@ var Plan$inboundSchema = z16.pipe(
3112
3122
  env: PlanEnv$inboundSchema,
3113
3123
  archived: boolean2(),
3114
3124
  base_variant_id: nullable(string4()),
3125
+ config: z16.lazy(() => PlanConfig$inboundSchema),
3115
3126
  customer_eligibility: optional2(z16.lazy(
3116
3127
  () => CustomerEligibility$inboundSchema
3117
3128
  ))
@@ -3792,6 +3803,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
3792
3803
  });
3793
3804
  })
3794
3805
  );
3806
+ var CreatePlanConfigRequest$outboundSchema = z19.pipe(
3807
+ z19.object({
3808
+ ignorePastDue: z19._default(z19.boolean(), false)
3809
+ }),
3810
+ z19.transform((v) => {
3811
+ return remap(v, {
3812
+ ignorePastDue: "ignore_past_due"
3813
+ });
3814
+ })
3815
+ );
3795
3816
  var CreatePlanParams$outboundSchema = z19.pipe(
3796
3817
  z19.object({
3797
3818
  planId: z19.string(),
@@ -3802,7 +3823,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
3802
3823
  autoEnable: z19._default(z19.boolean(), false),
3803
3824
  price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
3804
3825
  items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
3805
- freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
3826
+ freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
3827
+ config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
3806
3828
  }),
3807
3829
  z19.transform((v) => {
3808
3830
  return remap(v, {
@@ -3976,6 +3998,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
3976
3998
  })
3977
3999
  );
3978
4000
  var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
4001
+ var CreatePlanConfigResponse$inboundSchema = z19.pipe(
4002
+ z19.object({
4003
+ ignore_past_due: z19._default(boolean2(), false)
4004
+ }),
4005
+ z19.transform((v) => {
4006
+ return remap(v, {
4007
+ "ignore_past_due": "ignorePastDue"
4008
+ });
4009
+ })
4010
+ );
3979
4011
  var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
3980
4012
  var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
3981
4013
  var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
@@ -4011,6 +4043,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
4011
4043
  env: CreatePlanEnv$inboundSchema,
4012
4044
  archived: boolean2(),
4013
4045
  base_variant_id: nullable(string4()),
4046
+ config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
4014
4047
  customer_eligibility: optional2(
4015
4048
  z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
4016
4049
  )
@@ -5263,6 +5296,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
5263
5296
  })
5264
5297
  );
5265
5298
  var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
5299
+ var GetPlanConfig$inboundSchema = z31.pipe(
5300
+ z31.object({
5301
+ ignore_past_due: z31._default(boolean2(), false)
5302
+ }),
5303
+ z31.transform((v) => {
5304
+ return remap(v, {
5305
+ "ignore_past_due": "ignorePastDue"
5306
+ });
5307
+ })
5308
+ );
5266
5309
  var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
5267
5310
  var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
5268
5311
  var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
@@ -5296,6 +5339,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
5296
5339
  env: GetPlanEnv$inboundSchema,
5297
5340
  archived: boolean2(),
5298
5341
  base_variant_id: nullable(string4()),
5342
+ config: z31.lazy(() => GetPlanConfig$inboundSchema),
5299
5343
  customer_eligibility: optional2(
5300
5344
  z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
5301
5345
  )
@@ -6006,6 +6050,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
6006
6050
  })
6007
6051
  );
6008
6052
  var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
6053
+ var ListPlansConfig$inboundSchema = z35.pipe(
6054
+ z35.object({
6055
+ ignore_past_due: z35._default(boolean2(), false)
6056
+ }),
6057
+ z35.transform((v) => {
6058
+ return remap(v, {
6059
+ "ignore_past_due": "ignorePastDue"
6060
+ });
6061
+ })
6062
+ );
6009
6063
  var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
6010
6064
  var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
6011
6065
  var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
@@ -6039,6 +6093,7 @@ var ListPlansList$inboundSchema = z35.pipe(
6039
6093
  env: ListPlansEnv$inboundSchema,
6040
6094
  archived: boolean2(),
6041
6095
  base_variant_id: nullable(string4()),
6096
+ config: z35.lazy(() => ListPlansConfig$inboundSchema),
6042
6097
  customer_eligibility: optional2(
6043
6098
  z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
6044
6099
  )
@@ -9733,6 +9788,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
9733
9788
  });
9734
9789
  })
9735
9790
  );
9791
+ var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
9792
+ z48.object({
9793
+ ignorePastDue: z48._default(z48.boolean(), false)
9794
+ }),
9795
+ z48.transform((v) => {
9796
+ return remap(v, {
9797
+ ignorePastDue: "ignore_past_due"
9798
+ });
9799
+ })
9800
+ );
9736
9801
  var UpdatePlanParams$outboundSchema = z48.pipe(
9737
9802
  z48.object({
9738
9803
  planId: z48.string(),
@@ -9748,6 +9813,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
9748
9813
  freeTrial: z48.optional(
9749
9814
  z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
9750
9815
  ),
9816
+ config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
9751
9817
  version: z48.optional(z48.number()),
9752
9818
  archived: z48._default(z48.boolean(), false),
9753
9819
  newPlanId: z48.optional(z48.string())
@@ -9925,6 +9991,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
9925
9991
  })
9926
9992
  );
9927
9993
  var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
9994
+ var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
9995
+ z48.object({
9996
+ ignore_past_due: z48._default(boolean2(), false)
9997
+ }),
9998
+ z48.transform((v) => {
9999
+ return remap(v, {
10000
+ "ignore_past_due": "ignorePastDue"
10001
+ });
10002
+ })
10003
+ );
9928
10004
  var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
9929
10005
  var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
9930
10006
  var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
@@ -9958,6 +10034,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
9958
10034
  env: UpdatePlanEnv$inboundSchema,
9959
10035
  archived: boolean2(),
9960
10036
  base_variant_id: nullable(string4()),
10037
+ config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
9961
10038
  customer_eligibility: optional2(
9962
10039
  z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
9963
10040
  )
@@ -10216,10 +10293,14 @@ var FailOpenHook = class {
10216
10293
  fetcher: async (input, init) => {
10217
10294
  try {
10218
10295
  return init == null ? await fetch(input) : await fetch(input, init);
10219
- } catch {
10296
+ } catch (error) {
10297
+ console.log(error);
10298
+ console.log(
10299
+ `Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
10300
+ );
10220
10301
  return new Response(null, {
10221
- status: 503,
10222
- statusText: "Autumn Unreachable"
10302
+ status: 555,
10303
+ statusText: "Network Error"
10223
10304
  });
10224
10305
  }
10225
10306
  }
@@ -13981,6 +14062,7 @@ var Plans = class extends ClientSDK {
13981
14062
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
13982
14063
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13983
14064
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
14065
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13984
14066
  *
13985
14067
  * @returns The created plan object.
13986
14068
  */
@@ -14086,6 +14168,7 @@ var Plans = class extends ClientSDK {
14086
14168
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
14087
14169
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
14088
14170
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
14171
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
14089
14172
  * @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)
14090
14173
  *
14091
14174
  * @returns The updated plan object.
@@ -14971,6 +15054,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
14971
15054
  primaryText: import_v46.z.string(),
14972
15055
  secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
14973
15056
  });
15057
+ var listPlansConfigSchema = import_v46.z.object({
15058
+ ignorePastDue: import_v46.z.boolean()
15059
+ });
14974
15060
  var listPlansParamsOutboundSchema = import_v46.z.object({
14975
15061
  customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
14976
15062
  entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
@@ -15059,6 +15145,7 @@ var listPlansListSchema = import_v46.z.object({
15059
15145
  env: listPlansEnvSchema,
15060
15146
  archived: import_v46.z.boolean(),
15061
15147
  baseVariantId: import_v46.z.string().nullable(),
15148
+ config: listPlansConfigSchema,
15062
15149
  customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
15063
15150
  });
15064
15151
  var listPlansResponseSchema = import_v46.z.object({
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "../../chunk-ITXMMCSD.mjs";
3
+ } from "../../chunk-YSQQKZBU.mjs";
4
4
  import "../../chunk-TSF4YCUO.mjs";
5
5
  import "../../chunk-UAR3TMWI.mjs";
6
- import "../../chunk-UEYDU64U.mjs";
7
- import "../../chunk-X4LPDDOP.mjs";
6
+ import "../../chunk-T42RZEUZ.mjs";
7
+ import "../../chunk-MANTLPDT.mjs";
8
8
  import "../../chunk-S5HPMJ4U.mjs";
9
9
  import "../../chunk-OTXV5FY7.mjs";
10
- import "../../chunk-Z6QP3YEA.mjs";
11
10
  import "../../chunk-VZIMT7AO.mjs";
11
+ import "../../chunk-Z6QP3YEA.mjs";
12
12
  import "../../chunk-TBQ27LIK.mjs";
13
13
  import "../../chunk-J44WR3QZ.mjs";
14
14
  import "../../chunk-N7NFYY54.mjs";
@@ -1,4 +1,4 @@
1
- import { A as Autumn, R as RouteDefinition } from '../../routeTypes-Cu-XQy7A.mjs';
1
+ import { A as Autumn, R as RouteDefinition } from '../../routeTypes-DVwngaBn.mjs';
2
2
  import { A as AuthResult } from '../../authTypes-CyV4xBTB.mjs';
3
3
  import { BackendResult } from '../types/responseTypes.mjs';
4
4
  import 'zod/v4';
@@ -1,4 +1,4 @@
1
- import { A as Autumn, R as RouteDefinition } from '../../routeTypes-D0ag5-Tb.js';
1
+ import { A as Autumn, R as RouteDefinition } from '../../routeTypes-B94_Mq2J.js';
2
2
  import { A as AuthResult } from '../../authTypes-CyV4xBTB.js';
3
3
  import { BackendResult } from '../types/responseTypes.js';
4
4
  import 'zod/v4';
@@ -2,8 +2,8 @@ import {
2
2
  executeRoute
3
3
  } from "../../chunk-S5HPMJ4U.mjs";
4
4
  import "../../chunk-OTXV5FY7.mjs";
5
- import "../../chunk-Z6QP3YEA.mjs";
6
5
  import "../../chunk-VZIMT7AO.mjs";
6
+ import "../../chunk-Z6QP3YEA.mjs";
7
7
  import "../../chunk-TBQ27LIK.mjs";
8
8
  import "../../chunk-J44WR3QZ.mjs";
9
9
  import "../../chunk-N7NFYY54.mjs";
@@ -3079,6 +3079,16 @@ var FreeTrial$inboundSchema = z16.pipe(
3079
3079
  })
3080
3080
  );
3081
3081
  var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
3082
+ var PlanConfig$inboundSchema = z16.pipe(
3083
+ z16.object({
3084
+ ignore_past_due: z16._default(boolean2(), false)
3085
+ }),
3086
+ z16.transform((v) => {
3087
+ return remap(v, {
3088
+ "ignore_past_due": "ignorePastDue"
3089
+ });
3090
+ })
3091
+ );
3082
3092
  var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
3083
3093
  var AttachAction$inboundSchema = inboundSchema(AttachAction);
3084
3094
  var CustomerEligibility$inboundSchema = z16.pipe(
@@ -3112,6 +3122,7 @@ var Plan$inboundSchema = z16.pipe(
3112
3122
  env: PlanEnv$inboundSchema,
3113
3123
  archived: boolean2(),
3114
3124
  base_variant_id: nullable(string4()),
3125
+ config: z16.lazy(() => PlanConfig$inboundSchema),
3115
3126
  customer_eligibility: optional2(z16.lazy(
3116
3127
  () => CustomerEligibility$inboundSchema
3117
3128
  ))
@@ -3792,6 +3803,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
3792
3803
  });
3793
3804
  })
3794
3805
  );
3806
+ var CreatePlanConfigRequest$outboundSchema = z19.pipe(
3807
+ z19.object({
3808
+ ignorePastDue: z19._default(z19.boolean(), false)
3809
+ }),
3810
+ z19.transform((v) => {
3811
+ return remap(v, {
3812
+ ignorePastDue: "ignore_past_due"
3813
+ });
3814
+ })
3815
+ );
3795
3816
  var CreatePlanParams$outboundSchema = z19.pipe(
3796
3817
  z19.object({
3797
3818
  planId: z19.string(),
@@ -3802,7 +3823,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
3802
3823
  autoEnable: z19._default(z19.boolean(), false),
3803
3824
  price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
3804
3825
  items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
3805
- freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
3826
+ freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
3827
+ config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
3806
3828
  }),
3807
3829
  z19.transform((v) => {
3808
3830
  return remap(v, {
@@ -3976,6 +3998,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
3976
3998
  })
3977
3999
  );
3978
4000
  var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
4001
+ var CreatePlanConfigResponse$inboundSchema = z19.pipe(
4002
+ z19.object({
4003
+ ignore_past_due: z19._default(boolean2(), false)
4004
+ }),
4005
+ z19.transform((v) => {
4006
+ return remap(v, {
4007
+ "ignore_past_due": "ignorePastDue"
4008
+ });
4009
+ })
4010
+ );
3979
4011
  var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
3980
4012
  var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
3981
4013
  var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
@@ -4011,6 +4043,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
4011
4043
  env: CreatePlanEnv$inboundSchema,
4012
4044
  archived: boolean2(),
4013
4045
  base_variant_id: nullable(string4()),
4046
+ config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
4014
4047
  customer_eligibility: optional2(
4015
4048
  z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
4016
4049
  )
@@ -5263,6 +5296,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
5263
5296
  })
5264
5297
  );
5265
5298
  var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
5299
+ var GetPlanConfig$inboundSchema = z31.pipe(
5300
+ z31.object({
5301
+ ignore_past_due: z31._default(boolean2(), false)
5302
+ }),
5303
+ z31.transform((v) => {
5304
+ return remap(v, {
5305
+ "ignore_past_due": "ignorePastDue"
5306
+ });
5307
+ })
5308
+ );
5266
5309
  var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
5267
5310
  var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
5268
5311
  var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
@@ -5296,6 +5339,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
5296
5339
  env: GetPlanEnv$inboundSchema,
5297
5340
  archived: boolean2(),
5298
5341
  base_variant_id: nullable(string4()),
5342
+ config: z31.lazy(() => GetPlanConfig$inboundSchema),
5299
5343
  customer_eligibility: optional2(
5300
5344
  z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
5301
5345
  )
@@ -6006,6 +6050,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
6006
6050
  })
6007
6051
  );
6008
6052
  var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
6053
+ var ListPlansConfig$inboundSchema = z35.pipe(
6054
+ z35.object({
6055
+ ignore_past_due: z35._default(boolean2(), false)
6056
+ }),
6057
+ z35.transform((v) => {
6058
+ return remap(v, {
6059
+ "ignore_past_due": "ignorePastDue"
6060
+ });
6061
+ })
6062
+ );
6009
6063
  var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
6010
6064
  var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
6011
6065
  var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
@@ -6039,6 +6093,7 @@ var ListPlansList$inboundSchema = z35.pipe(
6039
6093
  env: ListPlansEnv$inboundSchema,
6040
6094
  archived: boolean2(),
6041
6095
  base_variant_id: nullable(string4()),
6096
+ config: z35.lazy(() => ListPlansConfig$inboundSchema),
6042
6097
  customer_eligibility: optional2(
6043
6098
  z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
6044
6099
  )
@@ -9733,6 +9788,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
9733
9788
  });
9734
9789
  })
9735
9790
  );
9791
+ var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
9792
+ z48.object({
9793
+ ignorePastDue: z48._default(z48.boolean(), false)
9794
+ }),
9795
+ z48.transform((v) => {
9796
+ return remap(v, {
9797
+ ignorePastDue: "ignore_past_due"
9798
+ });
9799
+ })
9800
+ );
9736
9801
  var UpdatePlanParams$outboundSchema = z48.pipe(
9737
9802
  z48.object({
9738
9803
  planId: z48.string(),
@@ -9748,6 +9813,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
9748
9813
  freeTrial: z48.optional(
9749
9814
  z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
9750
9815
  ),
9816
+ config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
9751
9817
  version: z48.optional(z48.number()),
9752
9818
  archived: z48._default(z48.boolean(), false),
9753
9819
  newPlanId: z48.optional(z48.string())
@@ -9925,6 +9991,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
9925
9991
  })
9926
9992
  );
9927
9993
  var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
9994
+ var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
9995
+ z48.object({
9996
+ ignore_past_due: z48._default(boolean2(), false)
9997
+ }),
9998
+ z48.transform((v) => {
9999
+ return remap(v, {
10000
+ "ignore_past_due": "ignorePastDue"
10001
+ });
10002
+ })
10003
+ );
9928
10004
  var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
9929
10005
  var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
9930
10006
  var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
@@ -9958,6 +10034,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
9958
10034
  env: UpdatePlanEnv$inboundSchema,
9959
10035
  archived: boolean2(),
9960
10036
  base_variant_id: nullable(string4()),
10037
+ config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
9961
10038
  customer_eligibility: optional2(
9962
10039
  z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
9963
10040
  )
@@ -10216,10 +10293,14 @@ var FailOpenHook = class {
10216
10293
  fetcher: async (input, init) => {
10217
10294
  try {
10218
10295
  return init == null ? await fetch(input) : await fetch(input, init);
10219
- } catch {
10296
+ } catch (error) {
10297
+ console.log(error);
10298
+ console.log(
10299
+ `Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
10300
+ );
10220
10301
  return new Response(null, {
10221
- status: 503,
10222
- statusText: "Autumn Unreachable"
10302
+ status: 555,
10303
+ statusText: "Network Error"
10223
10304
  });
10224
10305
  }
10225
10306
  }
@@ -13981,6 +14062,7 @@ var Plans = class extends ClientSDK {
13981
14062
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
13982
14063
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13983
14064
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
14065
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13984
14066
  *
13985
14067
  * @returns The created plan object.
13986
14068
  */
@@ -14086,6 +14168,7 @@ var Plans = class extends ClientSDK {
14086
14168
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
14087
14169
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
14088
14170
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
14171
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
14089
14172
  * @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)
14090
14173
  *
14091
14174
  * @returns The updated plan object.
@@ -14954,6 +15037,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
14954
15037
  primaryText: import_v46.z.string(),
14955
15038
  secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
14956
15039
  });
15040
+ var listPlansConfigSchema = import_v46.z.object({
15041
+ ignorePastDue: import_v46.z.boolean()
15042
+ });
14957
15043
  var listPlansParamsOutboundSchema = import_v46.z.object({
14958
15044
  customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
14959
15045
  entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
@@ -15042,6 +15128,7 @@ var listPlansListSchema = import_v46.z.object({
15042
15128
  env: listPlansEnvSchema,
15043
15129
  archived: import_v46.z.boolean(),
15044
15130
  baseVariantId: import_v46.z.string().nullable(),
15131
+ config: listPlansConfigSchema,
15045
15132
  customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
15046
15133
  });
15047
15134
  var listPlansResponseSchema = import_v46.z.object({
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  handleRouteByName
3
- } from "../../chunk-N53PKNZ6.mjs";
4
- import "../../chunk-UEYDU64U.mjs";
5
- import "../../chunk-X4LPDDOP.mjs";
3
+ } from "../../chunk-EJGHP7KT.mjs";
4
+ import "../../chunk-T42RZEUZ.mjs";
5
+ import "../../chunk-MANTLPDT.mjs";
6
6
  import "../../chunk-S5HPMJ4U.mjs";
7
7
  import "../../chunk-OTXV5FY7.mjs";
8
- import "../../chunk-Z6QP3YEA.mjs";
9
8
  import "../../chunk-VZIMT7AO.mjs";
9
+ import "../../chunk-Z6QP3YEA.mjs";
10
10
  import "../../chunk-TBQ27LIK.mjs";
11
11
  import "../../chunk-J44WR3QZ.mjs";
12
12
  import "../../chunk-N7NFYY54.mjs";
@@ -5,6 +5,6 @@ export { handleRouteByName } from './handleRouteByName.mjs';
5
5
  export { resolveIdentity } from './resolveIdentity.mjs';
6
6
  import '../types/handlerTypes.mjs';
7
7
  import '../../authTypes-CyV4xBTB.mjs';
8
- import '../../routeTypes-Cu-XQy7A.mjs';
8
+ import '../../routeTypes-DVwngaBn.mjs';
9
9
  import 'zod/v4';
10
10
  import '../types/responseTypes.mjs';
@@ -5,6 +5,6 @@ export { handleRouteByName } from './handleRouteByName.js';
5
5
  export { resolveIdentity } from './resolveIdentity.js';
6
6
  import '../types/handlerTypes.js';
7
7
  import '../../authTypes-CyV4xBTB.js';
8
- import '../../routeTypes-D0ag5-Tb.js';
8
+ import '../../routeTypes-B94_Mq2J.js';
9
9
  import 'zod/v4';
10
10
  import '../types/responseTypes.js';