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
@@ -570,6 +570,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
570
570
  primaryText: import_v46.z.string(),
571
571
  secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
572
572
  });
573
+ var listPlansConfigSchema = import_v46.z.object({
574
+ ignorePastDue: import_v46.z.boolean()
575
+ });
573
576
  var listPlansParamsOutboundSchema = import_v46.z.object({
574
577
  customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
575
578
  entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
@@ -658,6 +661,7 @@ var listPlansListSchema = import_v46.z.object({
658
661
  env: listPlansEnvSchema,
659
662
  archived: import_v46.z.boolean(),
660
663
  baseVariantId: import_v46.z.string().nullable(),
664
+ config: listPlansConfigSchema,
661
665
  customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
662
666
  });
663
667
  var listPlansResponseSchema = import_v46.z.object({
@@ -5671,6 +5675,16 @@ var FreeTrial$inboundSchema = z32.pipe(
5671
5675
  })
5672
5676
  );
5673
5677
  var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
5678
+ var PlanConfig$inboundSchema = z32.pipe(
5679
+ z32.object({
5680
+ ignore_past_due: z32._default(boolean2(), false)
5681
+ }),
5682
+ z32.transform((v) => {
5683
+ return remap(v, {
5684
+ "ignore_past_due": "ignorePastDue"
5685
+ });
5686
+ })
5687
+ );
5674
5688
  var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
5675
5689
  var AttachAction$inboundSchema = inboundSchema(AttachAction);
5676
5690
  var CustomerEligibility$inboundSchema = z32.pipe(
@@ -5704,6 +5718,7 @@ var Plan$inboundSchema = z32.pipe(
5704
5718
  env: PlanEnv$inboundSchema,
5705
5719
  archived: boolean2(),
5706
5720
  base_variant_id: nullable(string4()),
5721
+ config: z32.lazy(() => PlanConfig$inboundSchema),
5707
5722
  customer_eligibility: optional2(z32.lazy(
5708
5723
  () => CustomerEligibility$inboundSchema
5709
5724
  ))
@@ -6384,6 +6399,16 @@ var FreeTrialRequest$outboundSchema = z35.pipe(
6384
6399
  });
6385
6400
  })
6386
6401
  );
6402
+ var CreatePlanConfigRequest$outboundSchema = z35.pipe(
6403
+ z35.object({
6404
+ ignorePastDue: z35._default(z35.boolean(), false)
6405
+ }),
6406
+ z35.transform((v) => {
6407
+ return remap(v, {
6408
+ ignorePastDue: "ignore_past_due"
6409
+ });
6410
+ })
6411
+ );
6387
6412
  var CreatePlanParams$outboundSchema = z35.pipe(
6388
6413
  z35.object({
6389
6414
  planId: z35.string(),
@@ -6394,7 +6419,8 @@ var CreatePlanParams$outboundSchema = z35.pipe(
6394
6419
  autoEnable: z35._default(z35.boolean(), false),
6395
6420
  price: z35.optional(z35.lazy(() => CreatePlanPriceRequest$outboundSchema)),
6396
6421
  items: z35.optional(z35.array(z35.lazy(() => CreatePlanPlanItem$outboundSchema))),
6397
- freeTrial: z35.optional(z35.lazy(() => FreeTrialRequest$outboundSchema))
6422
+ freeTrial: z35.optional(z35.lazy(() => FreeTrialRequest$outboundSchema)),
6423
+ config: z35.optional(z35.lazy(() => CreatePlanConfigRequest$outboundSchema))
6398
6424
  }),
6399
6425
  z35.transform((v) => {
6400
6426
  return remap(v, {
@@ -6568,6 +6594,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z35.pipe(
6568
6594
  })
6569
6595
  );
6570
6596
  var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
6597
+ var CreatePlanConfigResponse$inboundSchema = z35.pipe(
6598
+ z35.object({
6599
+ ignore_past_due: z35._default(boolean2(), false)
6600
+ }),
6601
+ z35.transform((v) => {
6602
+ return remap(v, {
6603
+ "ignore_past_due": "ignorePastDue"
6604
+ });
6605
+ })
6606
+ );
6571
6607
  var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
6572
6608
  var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
6573
6609
  var CreatePlanCustomerEligibility$inboundSchema = z35.pipe(
@@ -6603,6 +6639,7 @@ var CreatePlanResponse$inboundSchema = z35.pipe(
6603
6639
  env: CreatePlanEnv$inboundSchema,
6604
6640
  archived: boolean2(),
6605
6641
  base_variant_id: nullable(string4()),
6642
+ config: z35.lazy(() => CreatePlanConfigResponse$inboundSchema),
6606
6643
  customer_eligibility: optional2(
6607
6644
  z35.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
6608
6645
  )
@@ -7855,6 +7892,16 @@ var GetPlanFreeTrial$inboundSchema = z47.pipe(
7855
7892
  })
7856
7893
  );
7857
7894
  var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
7895
+ var GetPlanConfig$inboundSchema = z47.pipe(
7896
+ z47.object({
7897
+ ignore_past_due: z47._default(boolean2(), false)
7898
+ }),
7899
+ z47.transform((v) => {
7900
+ return remap(v, {
7901
+ "ignore_past_due": "ignorePastDue"
7902
+ });
7903
+ })
7904
+ );
7858
7905
  var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
7859
7906
  var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
7860
7907
  var GetPlanCustomerEligibility$inboundSchema = z47.pipe(
@@ -7888,6 +7935,7 @@ var GetPlanResponse$inboundSchema = z47.pipe(
7888
7935
  env: GetPlanEnv$inboundSchema,
7889
7936
  archived: boolean2(),
7890
7937
  base_variant_id: nullable(string4()),
7938
+ config: z47.lazy(() => GetPlanConfig$inboundSchema),
7891
7939
  customer_eligibility: optional2(
7892
7940
  z47.lazy(() => GetPlanCustomerEligibility$inboundSchema)
7893
7941
  )
@@ -8598,6 +8646,16 @@ var ListPlansFreeTrial$inboundSchema = z51.pipe(
8598
8646
  })
8599
8647
  );
8600
8648
  var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
8649
+ var ListPlansConfig$inboundSchema = z51.pipe(
8650
+ z51.object({
8651
+ ignore_past_due: z51._default(boolean2(), false)
8652
+ }),
8653
+ z51.transform((v) => {
8654
+ return remap(v, {
8655
+ "ignore_past_due": "ignorePastDue"
8656
+ });
8657
+ })
8658
+ );
8601
8659
  var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
8602
8660
  var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
8603
8661
  var ListPlansCustomerEligibility$inboundSchema = z51.pipe(
@@ -8631,6 +8689,7 @@ var ListPlansList$inboundSchema = z51.pipe(
8631
8689
  env: ListPlansEnv$inboundSchema,
8632
8690
  archived: boolean2(),
8633
8691
  base_variant_id: nullable(string4()),
8692
+ config: z51.lazy(() => ListPlansConfig$inboundSchema),
8634
8693
  customer_eligibility: optional2(
8635
8694
  z51.lazy(() => ListPlansCustomerEligibility$inboundSchema)
8636
8695
  )
@@ -12325,6 +12384,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z64.pipe(
12325
12384
  });
12326
12385
  })
12327
12386
  );
12387
+ var UpdatePlanConfigRequest$outboundSchema = z64.pipe(
12388
+ z64.object({
12389
+ ignorePastDue: z64._default(z64.boolean(), false)
12390
+ }),
12391
+ z64.transform((v) => {
12392
+ return remap(v, {
12393
+ ignorePastDue: "ignore_past_due"
12394
+ });
12395
+ })
12396
+ );
12328
12397
  var UpdatePlanParams$outboundSchema = z64.pipe(
12329
12398
  z64.object({
12330
12399
  planId: z64.string(),
@@ -12340,6 +12409,7 @@ var UpdatePlanParams$outboundSchema = z64.pipe(
12340
12409
  freeTrial: z64.optional(
12341
12410
  z64.nullable(z64.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
12342
12411
  ),
12412
+ config: z64.optional(z64.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
12343
12413
  version: z64.optional(z64.number()),
12344
12414
  archived: z64._default(z64.boolean(), false),
12345
12415
  newPlanId: z64.optional(z64.string())
@@ -12517,6 +12587,16 @@ var UpdatePlanFreeTrial$inboundSchema = z64.pipe(
12517
12587
  })
12518
12588
  );
12519
12589
  var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
12590
+ var UpdatePlanConfigResponse$inboundSchema = z64.pipe(
12591
+ z64.object({
12592
+ ignore_past_due: z64._default(boolean2(), false)
12593
+ }),
12594
+ z64.transform((v) => {
12595
+ return remap(v, {
12596
+ "ignore_past_due": "ignorePastDue"
12597
+ });
12598
+ })
12599
+ );
12520
12600
  var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
12521
12601
  var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
12522
12602
  var UpdatePlanCustomerEligibility$inboundSchema = z64.pipe(
@@ -12550,6 +12630,7 @@ var UpdatePlanResponse$inboundSchema = z64.pipe(
12550
12630
  env: UpdatePlanEnv$inboundSchema,
12551
12631
  archived: boolean2(),
12552
12632
  base_variant_id: nullable(string4()),
12633
+ config: z64.lazy(() => UpdatePlanConfigResponse$inboundSchema),
12553
12634
  customer_eligibility: optional2(
12554
12635
  z64.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
12555
12636
  )
@@ -12808,10 +12889,14 @@ var FailOpenHook = class {
12808
12889
  fetcher: async (input, init) => {
12809
12890
  try {
12810
12891
  return init == null ? await fetch(input) : await fetch(input, init);
12811
- } catch {
12892
+ } catch (error) {
12893
+ console.log(error);
12894
+ console.log(
12895
+ `Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
12896
+ );
12812
12897
  return new Response(null, {
12813
- status: 503,
12814
- statusText: "Autumn Unreachable"
12898
+ status: 555,
12899
+ statusText: "Network Error"
12815
12900
  });
12816
12901
  }
12817
12902
  }
@@ -16573,6 +16658,7 @@ var Plans = class extends ClientSDK {
16573
16658
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
16574
16659
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
16575
16660
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
16661
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
16576
16662
  *
16577
16663
  * @returns The created plan object.
16578
16664
  */
@@ -16678,6 +16764,7 @@ var Plans = class extends ClientSDK {
16678
16764
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
16679
16765
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
16680
16766
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
16767
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
16681
16768
  * @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)
16682
16769
  *
16683
16770
  * @returns The updated plan object.
@@ -1,12 +1,12 @@
1
1
  import "./chunk-HIWOK3G6.mjs";
2
2
  import {
3
3
  createAutumnEndpoint
4
- } from "./chunk-TEP6CVHR.mjs";
4
+ } from "./chunk-4OWECHZC.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "./chunk-XFATOIZD.mjs";
7
+ } from "./chunk-ZZGFPTHO.mjs";
8
8
  import "./chunk-J2WYVGHS.mjs";
9
- import "./chunk-GKUK5UGW.mjs";
9
+ import "./chunk-JIFD4TSN.mjs";
10
10
  import "./chunk-BT3EAYVW.mjs";
11
11
  import "./chunk-GJAMWZNZ.mjs";
12
12
 
@@ -1,8 +1,4 @@
1
- export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-D9Plymvy.mjs';
2
- import 'zod';
1
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
2
+ import 'zod/v4';
3
3
  import 'zod/v4/core';
4
- import './standard-schema.mjs';
5
- import './error.mjs';
6
- import './context.mjs';
7
- import './middleware.mjs';
8
- import './openapi.mjs';
4
+ export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-CvXRCg-M.mjs';
@@ -1,8 +1,4 @@
1
- export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-D9Plymvy.js';
2
- import 'zod';
1
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
2
+ import 'zod/v4';
3
3
  import 'zod/v4/core';
4
- import './standard-schema.mjs';
5
- import './error.mjs';
6
- import './context.mjs';
7
- import './middleware.mjs';
8
- import './openapi.mjs';
4
+ export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-CvXRCg-M.js';
@@ -558,6 +558,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
558
558
  primaryText: import_v46.z.string(),
559
559
  secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
560
560
  });
561
+ var listPlansConfigSchema = import_v46.z.object({
562
+ ignorePastDue: import_v46.z.boolean()
563
+ });
561
564
  var listPlansParamsOutboundSchema = import_v46.z.object({
562
565
  customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
563
566
  entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
@@ -646,6 +649,7 @@ var listPlansListSchema = import_v46.z.object({
646
649
  env: listPlansEnvSchema,
647
650
  archived: import_v46.z.boolean(),
648
651
  baseVariantId: import_v46.z.string().nullable(),
652
+ config: listPlansConfigSchema,
649
653
  customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
650
654
  });
651
655
  var listPlansResponseSchema = import_v46.z.object({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAutumnEndpoint
3
- } from "../chunk-TEP6CVHR.mjs";
4
- import "../chunk-GKUK5UGW.mjs";
3
+ } from "../chunk-4OWECHZC.mjs";
4
+ import "../chunk-JIFD4TSN.mjs";
5
5
  import "../chunk-GJAMWZNZ.mjs";
6
6
  export {
7
7
  createAutumnEndpoint
@@ -1,11 +1,7 @@
1
1
  import { CustomerScope, IdentifyFn } from '../types.mjs';
2
- import { H as HandleBetterAuthRouteFn } from '../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 { H as HandleBetterAuthRouteFn } from '../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
 
11
7
  /** Options for creating a better-auth route handler */
@@ -1,11 +1,7 @@
1
1
  import { CustomerScope, IdentifyFn } from '../types.js';
2
- import { H as HandleBetterAuthRouteFn } from '../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 { H as HandleBetterAuthRouteFn } from '../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
 
11
7
  /** Options for creating a better-auth route handler */
@@ -3080,6 +3080,16 @@ var FreeTrial$inboundSchema = z16.pipe(
3080
3080
  })
3081
3081
  );
3082
3082
  var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
3083
+ var PlanConfig$inboundSchema = z16.pipe(
3084
+ z16.object({
3085
+ ignore_past_due: z16._default(boolean2(), false)
3086
+ }),
3087
+ z16.transform((v) => {
3088
+ return remap(v, {
3089
+ "ignore_past_due": "ignorePastDue"
3090
+ });
3091
+ })
3092
+ );
3083
3093
  var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
3084
3094
  var AttachAction$inboundSchema = inboundSchema(AttachAction);
3085
3095
  var CustomerEligibility$inboundSchema = z16.pipe(
@@ -3113,6 +3123,7 @@ var Plan$inboundSchema = z16.pipe(
3113
3123
  env: PlanEnv$inboundSchema,
3114
3124
  archived: boolean2(),
3115
3125
  base_variant_id: nullable(string4()),
3126
+ config: z16.lazy(() => PlanConfig$inboundSchema),
3116
3127
  customer_eligibility: optional2(z16.lazy(
3117
3128
  () => CustomerEligibility$inboundSchema
3118
3129
  ))
@@ -3793,6 +3804,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
3793
3804
  });
3794
3805
  })
3795
3806
  );
3807
+ var CreatePlanConfigRequest$outboundSchema = z19.pipe(
3808
+ z19.object({
3809
+ ignorePastDue: z19._default(z19.boolean(), false)
3810
+ }),
3811
+ z19.transform((v) => {
3812
+ return remap(v, {
3813
+ ignorePastDue: "ignore_past_due"
3814
+ });
3815
+ })
3816
+ );
3796
3817
  var CreatePlanParams$outboundSchema = z19.pipe(
3797
3818
  z19.object({
3798
3819
  planId: z19.string(),
@@ -3803,7 +3824,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
3803
3824
  autoEnable: z19._default(z19.boolean(), false),
3804
3825
  price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
3805
3826
  items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
3806
- freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
3827
+ freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
3828
+ config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
3807
3829
  }),
3808
3830
  z19.transform((v) => {
3809
3831
  return remap(v, {
@@ -3977,6 +3999,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
3977
3999
  })
3978
4000
  );
3979
4001
  var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
4002
+ var CreatePlanConfigResponse$inboundSchema = z19.pipe(
4003
+ z19.object({
4004
+ ignore_past_due: z19._default(boolean2(), false)
4005
+ }),
4006
+ z19.transform((v) => {
4007
+ return remap(v, {
4008
+ "ignore_past_due": "ignorePastDue"
4009
+ });
4010
+ })
4011
+ );
3980
4012
  var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
3981
4013
  var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
3982
4014
  var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
@@ -4012,6 +4044,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
4012
4044
  env: CreatePlanEnv$inboundSchema,
4013
4045
  archived: boolean2(),
4014
4046
  base_variant_id: nullable(string4()),
4047
+ config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
4015
4048
  customer_eligibility: optional2(
4016
4049
  z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
4017
4050
  )
@@ -5264,6 +5297,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
5264
5297
  })
5265
5298
  );
5266
5299
  var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
5300
+ var GetPlanConfig$inboundSchema = z31.pipe(
5301
+ z31.object({
5302
+ ignore_past_due: z31._default(boolean2(), false)
5303
+ }),
5304
+ z31.transform((v) => {
5305
+ return remap(v, {
5306
+ "ignore_past_due": "ignorePastDue"
5307
+ });
5308
+ })
5309
+ );
5267
5310
  var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
5268
5311
  var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
5269
5312
  var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
@@ -5297,6 +5340,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
5297
5340
  env: GetPlanEnv$inboundSchema,
5298
5341
  archived: boolean2(),
5299
5342
  base_variant_id: nullable(string4()),
5343
+ config: z31.lazy(() => GetPlanConfig$inboundSchema),
5300
5344
  customer_eligibility: optional2(
5301
5345
  z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
5302
5346
  )
@@ -6007,6 +6051,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
6007
6051
  })
6008
6052
  );
6009
6053
  var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
6054
+ var ListPlansConfig$inboundSchema = z35.pipe(
6055
+ z35.object({
6056
+ ignore_past_due: z35._default(boolean2(), false)
6057
+ }),
6058
+ z35.transform((v) => {
6059
+ return remap(v, {
6060
+ "ignore_past_due": "ignorePastDue"
6061
+ });
6062
+ })
6063
+ );
6010
6064
  var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
6011
6065
  var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
6012
6066
  var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
@@ -6040,6 +6094,7 @@ var ListPlansList$inboundSchema = z35.pipe(
6040
6094
  env: ListPlansEnv$inboundSchema,
6041
6095
  archived: boolean2(),
6042
6096
  base_variant_id: nullable(string4()),
6097
+ config: z35.lazy(() => ListPlansConfig$inboundSchema),
6043
6098
  customer_eligibility: optional2(
6044
6099
  z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
6045
6100
  )
@@ -9734,6 +9789,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
9734
9789
  });
9735
9790
  })
9736
9791
  );
9792
+ var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
9793
+ z48.object({
9794
+ ignorePastDue: z48._default(z48.boolean(), false)
9795
+ }),
9796
+ z48.transform((v) => {
9797
+ return remap(v, {
9798
+ ignorePastDue: "ignore_past_due"
9799
+ });
9800
+ })
9801
+ );
9737
9802
  var UpdatePlanParams$outboundSchema = z48.pipe(
9738
9803
  z48.object({
9739
9804
  planId: z48.string(),
@@ -9749,6 +9814,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
9749
9814
  freeTrial: z48.optional(
9750
9815
  z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
9751
9816
  ),
9817
+ config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
9752
9818
  version: z48.optional(z48.number()),
9753
9819
  archived: z48._default(z48.boolean(), false),
9754
9820
  newPlanId: z48.optional(z48.string())
@@ -9926,6 +9992,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
9926
9992
  })
9927
9993
  );
9928
9994
  var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
9995
+ var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
9996
+ z48.object({
9997
+ ignore_past_due: z48._default(boolean2(), false)
9998
+ }),
9999
+ z48.transform((v) => {
10000
+ return remap(v, {
10001
+ "ignore_past_due": "ignorePastDue"
10002
+ });
10003
+ })
10004
+ );
9929
10005
  var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
9930
10006
  var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
9931
10007
  var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
@@ -9959,6 +10035,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
9959
10035
  env: UpdatePlanEnv$inboundSchema,
9960
10036
  archived: boolean2(),
9961
10037
  base_variant_id: nullable(string4()),
10038
+ config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
9962
10039
  customer_eligibility: optional2(
9963
10040
  z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
9964
10041
  )
@@ -10217,10 +10294,14 @@ var FailOpenHook = class {
10217
10294
  fetcher: async (input, init) => {
10218
10295
  try {
10219
10296
  return init == null ? await fetch(input) : await fetch(input, init);
10220
- } catch {
10297
+ } catch (error) {
10298
+ console.log(error);
10299
+ console.log(
10300
+ `Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
10301
+ );
10221
10302
  return new Response(null, {
10222
- status: 503,
10223
- statusText: "Autumn Unreachable"
10303
+ status: 555,
10304
+ statusText: "Network Error"
10224
10305
  });
10225
10306
  }
10226
10307
  }
@@ -13982,6 +14063,7 @@ var Plans = class extends ClientSDK {
13982
14063
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
13983
14064
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13984
14065
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
14066
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13985
14067
  *
13986
14068
  * @returns The created plan object.
13987
14069
  */
@@ -14087,6 +14169,7 @@ var Plans = class extends ClientSDK {
14087
14169
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
14088
14170
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
14089
14171
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
14172
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
14090
14173
  * @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)
14091
14174
  *
14092
14175
  * @returns The updated plan object.
@@ -14955,6 +15038,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
14955
15038
  primaryText: import_v46.z.string(),
14956
15039
  secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
14957
15040
  });
15041
+ var listPlansConfigSchema = import_v46.z.object({
15042
+ ignorePastDue: import_v46.z.boolean()
15043
+ });
14958
15044
  var listPlansParamsOutboundSchema = import_v46.z.object({
14959
15045
  customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
14960
15046
  entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
@@ -15043,6 +15129,7 @@ var listPlansListSchema = import_v46.z.object({
15043
15129
  env: listPlansEnvSchema,
15044
15130
  archived: import_v46.z.boolean(),
15045
15131
  baseVariantId: import_v46.z.string().nullable(),
15132
+ config: listPlansConfigSchema,
15046
15133
  customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
15047
15134
  });
15048
15135
  var listPlansResponseSchema = import_v46.z.object({
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createHandleBetterAuthRoute
3
- } from "../chunk-XFATOIZD.mjs";
3
+ } from "../chunk-ZZGFPTHO.mjs";
4
4
  import "../chunk-J2WYVGHS.mjs";
5
- import "../chunk-GKUK5UGW.mjs";
5
+ import "../chunk-JIFD4TSN.mjs";
6
6
  import "../chunk-BT3EAYVW.mjs";
7
7
  export {
8
8
  createHandleBetterAuthRoute
@@ -1,14 +1,9 @@
1
- export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-D9Plymvy.mjs';
1
+ export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-CvXRCg-M.mjs';
2
2
  export { getActiveOrganization } from './getActiveOrganization.mjs';
3
3
  export { CreateHandleBetterAuthRouteOptions, createHandleBetterAuthRoute } from './handleBetterAuthRoute.mjs';
4
4
  export { omitProtectedBodyFields } from './omitProtectedBodyFields.mjs';
5
5
  export { resolveIdentityFromScope } from './resolveIdentityFromScope.mjs';
6
- import './standard-schema.mjs';
7
- import './error.mjs';
8
- import './context.mjs';
9
- import './middleware.mjs';
10
- import './openapi.mjs';
11
- import 'zod';
6
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
7
+ import 'zod/v4';
12
8
  import 'zod/v4/core';
13
9
  import '../types.mjs';
14
- import 'zod/v4';
@@ -1,14 +1,9 @@
1
- export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-D9Plymvy.js';
1
+ export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-CvXRCg-M.js';
2
2
  export { getActiveOrganization } from './getActiveOrganization.js';
3
3
  export { CreateHandleBetterAuthRouteOptions, createHandleBetterAuthRoute } from './handleBetterAuthRoute.js';
4
4
  export { omitProtectedBodyFields } from './omitProtectedBodyFields.js';
5
5
  export { resolveIdentityFromScope } from './resolveIdentityFromScope.js';
6
- import './standard-schema.mjs';
7
- import './error.mjs';
8
- import './context.mjs';
9
- import './middleware.mjs';
10
- import './openapi.mjs';
11
- import 'zod';
6
+ import '../../../../../node_modules/better-call/dist/endpoint.mjs';
7
+ import 'zod/v4';
12
8
  import 'zod/v4/core';
13
9
  import '../types.js';
14
- import 'zod/v4';