autumn-js 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/backend/adapters/express.js +75 -21
  2. package/dist/backend/adapters/express.mjs +7 -7
  3. package/dist/backend/adapters/fetch.js +75 -21
  4. package/dist/backend/adapters/fetch.mjs +7 -7
  5. package/dist/backend/adapters/hono.js +75 -21
  6. package/dist/backend/adapters/hono.mjs +7 -7
  7. package/dist/backend/adapters/index.js +75 -21
  8. package/dist/backend/adapters/index.mjs +10 -10
  9. package/dist/backend/adapters/next.js +75 -21
  10. package/dist/backend/adapters/next.mjs +7 -7
  11. package/dist/backend/{chunk-HNVAMCWE.mjs → chunk-6FBNASNY.mjs} +1 -1
  12. package/dist/backend/{chunk-WFVUFPBT.mjs → chunk-7NQ7N6TP.mjs} +1 -1
  13. package/dist/backend/{chunk-S7XG2ILR.mjs → chunk-AZTQQRQ3.mjs} +1 -1
  14. package/dist/backend/{chunk-ZKDGEDOA.mjs → chunk-C5HM3DOU.mjs} +75 -21
  15. package/dist/backend/{chunk-JBTI5ZG4.mjs → chunk-HCHRACMY.mjs} +6 -6
  16. package/dist/backend/{chunk-OGT3KDLO.mjs → chunk-ICZOKLZL.mjs} +4 -4
  17. package/dist/backend/{chunk-EJV4XYF2.mjs → chunk-IQSTYSMQ.mjs} +1 -1
  18. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.js +75 -21
  21. package/dist/backend/core/handlers/coreHandler.mjs +5 -5
  22. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  23. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.mjs +3 -3
  25. package/dist/backend/core/handlers/handleRouteByName.js +75 -21
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +5 -5
  27. package/dist/backend/core/handlers/index.d.mts +1 -1
  28. package/dist/backend/core/handlers/index.d.ts +1 -1
  29. package/dist/backend/core/handlers/index.js +75 -21
  30. package/dist/backend/core/handlers/index.mjs +10 -10
  31. package/dist/backend/core/index.d.mts +1 -1
  32. package/dist/backend/core/index.d.ts +1 -1
  33. package/dist/backend/core/index.js +75 -21
  34. package/dist/backend/core/index.mjs +6 -6
  35. package/dist/backend/core/routes/index.d.mts +1 -1
  36. package/dist/backend/core/routes/index.d.ts +1 -1
  37. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  38. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  39. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  40. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  41. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  42. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  43. package/dist/backend/core/types/index.d.mts +1 -1
  44. package/dist/backend/core/types/index.d.ts +1 -1
  45. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  46. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  47. package/dist/backend/index.d.mts +2 -2
  48. package/dist/backend/index.d.ts +2 -2
  49. package/dist/backend/index.js +75 -21
  50. package/dist/backend/index.mjs +6 -6
  51. package/dist/backend/{routeTypes-Dim-bli2.d.mts → routeTypes-B-4uTfUz.d.mts} +80 -16
  52. package/dist/backend/{routeTypes-CrplVEuG.d.ts → routeTypes-BJu57J2W.d.ts} +80 -16
  53. package/dist/better-auth/{chunk-TBLGR7LG.mjs → chunk-NBTNHNWD.mjs} +75 -21
  54. package/dist/better-auth/index.js +75 -21
  55. package/dist/better-auth/index.mjs +1 -1
  56. package/dist/better-auth/utils/handleBetterAuthRoute.js +75 -21
  57. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  58. package/dist/better-auth/utils/index.js +75 -21
  59. package/dist/better-auth/utils/index.mjs +1 -1
  60. package/dist/sdk/index.d.mts +95 -21
  61. package/dist/sdk/index.d.ts +95 -21
  62. package/dist/sdk/index.js +103 -27
  63. package/dist/sdk/index.mjs +96 -28
  64. package/package.json +2 -2
  65. package/dist/backend/{chunk-MOHYGUMA.mjs → chunk-IXUCY7AU.mjs} +3 -3
@@ -49573,6 +49573,10 @@ var UpdateWebhookWebhook$inboundSchema = z116.pipe(
49573
49573
 
49574
49574
  // ../sdk/src/models/verify-op.ts
49575
49575
  var z117 = __toESM(require("zod/v4-mini"), 1);
49576
+ var CustomerMismatchSeverity13 = {
49577
+ Error: "error",
49578
+ Warning: "warning"
49579
+ };
49576
49580
  var CustomerMismatchSeverity12 = {
49577
49581
  Error: "error",
49578
49582
  Warning: "warning"
@@ -49649,6 +49653,10 @@ var VerifyStatus = {
49649
49653
  Correct: "correct",
49650
49654
  Mismatched: "mismatched"
49651
49655
  };
49656
+ var MismatchSeverity13 = {
49657
+ Error: "error",
49658
+ Warning: "warning"
49659
+ };
49652
49660
  var MismatchSeverity12 = {
49653
49661
  Error: "error",
49654
49662
  Warning: "warning"
@@ -49734,17 +49742,17 @@ var VerifyParams$outboundSchema = z117.pipe(
49734
49742
  });
49735
49743
  })
49736
49744
  );
49737
- var CustomerMismatchSeverity12$inboundSchema = inboundSchema(CustomerMismatchSeverity12);
49745
+ var CustomerMismatchSeverity13$inboundSchema = inboundSchema(CustomerMismatchSeverity13);
49738
49746
  var CustomerMismatchOtherCustomer$inboundSchema = z117.object({
49739
49747
  id: string5(),
49740
49748
  name: nullable(string5()),
49741
49749
  email: nullable(string5())
49742
49750
  });
49743
- var CustomerMismatch12$inboundSchema = z117.pipe(
49751
+ var CustomerMismatch13$inboundSchema = z117.pipe(
49744
49752
  z117.object({
49745
49753
  type: literal3("shared_stripe_customer"),
49746
49754
  message: optional3(string5()),
49747
- severity: optional3(CustomerMismatchSeverity12$inboundSchema),
49755
+ severity: optional3(CustomerMismatchSeverity13$inboundSchema),
49748
49756
  stripe_customer_id: string5(),
49749
49757
  other_customer_ids: z117.array(string5()),
49750
49758
  other_customers: optional3(
@@ -49759,13 +49767,33 @@ var CustomerMismatch12$inboundSchema = z117.pipe(
49759
49767
  });
49760
49768
  })
49761
49769
  );
49762
- var CustomerMismatchSeverity11$inboundSchema = inboundSchema(CustomerMismatchSeverity11);
49763
- var CustomerMismatch11$inboundSchema = z117.object({
49770
+ var CustomerMismatchSeverity12$inboundSchema = inboundSchema(CustomerMismatchSeverity12);
49771
+ var CustomerMismatch12$inboundSchema = z117.object({
49764
49772
  type: literal3("expected_state_error"),
49765
49773
  message: optional3(string5()),
49766
- severity: optional3(CustomerMismatchSeverity11$inboundSchema),
49774
+ severity: optional3(CustomerMismatchSeverity12$inboundSchema),
49767
49775
  error: string5()
49768
49776
  });
49777
+ var CustomerMismatchSeverity11$inboundSchema = inboundSchema(CustomerMismatchSeverity11);
49778
+ var CustomerMismatch11$inboundSchema = z117.pipe(
49779
+ z117.object({
49780
+ type: literal3("missing_stripe_subscription"),
49781
+ message: optional3(string5()),
49782
+ severity: optional3(CustomerMismatchSeverity11$inboundSchema),
49783
+ customer_product_id: string5(),
49784
+ plan_id: string5(),
49785
+ plan_name: optional3(string5()),
49786
+ entity_id: optional3(string5())
49787
+ }),
49788
+ z117.transform((v) => {
49789
+ return remap(v, {
49790
+ "customer_product_id": "customerProductId",
49791
+ "plan_id": "planId",
49792
+ "plan_name": "planName",
49793
+ "entity_id": "entityId"
49794
+ });
49795
+ })
49796
+ );
49769
49797
  var CustomerMismatchSeverity10$inboundSchema = inboundSchema(CustomerMismatchSeverity10);
49770
49798
  var CustomerMismatch10$inboundSchema = z117.object({
49771
49799
  type: literal3("stale_subscription_link"),
@@ -49978,21 +50006,22 @@ var CustomerMismatchUnion$inboundSchema = discriminatedUnion("type", {
49978
50006
  stripe_sub_not_in_autumn: z117.lazy(() => CustomerMismatch8$inboundSchema),
49979
50007
  plan_on_ending_subscription: z117.lazy(() => CustomerMismatch9$inboundSchema),
49980
50008
  stale_subscription_link: z117.lazy(() => CustomerMismatch10$inboundSchema),
49981
- expected_state_error: z117.lazy(() => CustomerMismatch11$inboundSchema),
49982
- shared_stripe_customer: z117.lazy(() => CustomerMismatch12$inboundSchema)
50009
+ missing_stripe_subscription: z117.lazy(() => CustomerMismatch11$inboundSchema),
50010
+ expected_state_error: z117.lazy(() => CustomerMismatch12$inboundSchema),
50011
+ shared_stripe_customer: z117.lazy(() => CustomerMismatch13$inboundSchema)
49983
50012
  });
49984
50013
  var VerifyStatus$inboundSchema = inboundSchema(VerifyStatus);
49985
- var MismatchSeverity12$inboundSchema = inboundSchema(MismatchSeverity12);
50014
+ var MismatchSeverity13$inboundSchema = inboundSchema(MismatchSeverity13);
49986
50015
  var MismatchOtherCustomer$inboundSchema = z117.object({
49987
50016
  id: string5(),
49988
50017
  name: nullable(string5()),
49989
50018
  email: nullable(string5())
49990
50019
  });
49991
- var Mismatch12$inboundSchema = z117.pipe(
50020
+ var Mismatch13$inboundSchema = z117.pipe(
49992
50021
  z117.object({
49993
50022
  type: literal3("shared_stripe_customer"),
49994
50023
  message: optional3(string5()),
49995
- severity: optional3(MismatchSeverity12$inboundSchema),
50024
+ severity: optional3(MismatchSeverity13$inboundSchema),
49996
50025
  stripe_customer_id: string5(),
49997
50026
  other_customer_ids: z117.array(string5()),
49998
50027
  other_customers: optional3(
@@ -50007,13 +50036,33 @@ var Mismatch12$inboundSchema = z117.pipe(
50007
50036
  });
50008
50037
  })
50009
50038
  );
50010
- var MismatchSeverity11$inboundSchema = inboundSchema(MismatchSeverity11);
50011
- var Mismatch11$inboundSchema = z117.object({
50039
+ var MismatchSeverity12$inboundSchema = inboundSchema(MismatchSeverity12);
50040
+ var Mismatch12$inboundSchema = z117.object({
50012
50041
  type: literal3("expected_state_error"),
50013
50042
  message: optional3(string5()),
50014
- severity: optional3(MismatchSeverity11$inboundSchema),
50043
+ severity: optional3(MismatchSeverity12$inboundSchema),
50015
50044
  error: string5()
50016
50045
  });
50046
+ var MismatchSeverity11$inboundSchema = inboundSchema(MismatchSeverity11);
50047
+ var Mismatch11$inboundSchema = z117.pipe(
50048
+ z117.object({
50049
+ type: literal3("missing_stripe_subscription"),
50050
+ message: optional3(string5()),
50051
+ severity: optional3(MismatchSeverity11$inboundSchema),
50052
+ customer_product_id: string5(),
50053
+ plan_id: string5(),
50054
+ plan_name: optional3(string5()),
50055
+ entity_id: optional3(string5())
50056
+ }),
50057
+ z117.transform((v) => {
50058
+ return remap(v, {
50059
+ "customer_product_id": "customerProductId",
50060
+ "plan_id": "planId",
50061
+ "plan_name": "planName",
50062
+ "entity_id": "entityId"
50063
+ });
50064
+ })
50065
+ );
50017
50066
  var MismatchSeverity10$inboundSchema = inboundSchema(MismatchSeverity10);
50018
50067
  var Mismatch10$inboundSchema = z117.object({
50019
50068
  type: literal3("stale_subscription_link"),
@@ -50226,8 +50275,9 @@ var MismatchUnion$inboundSchema = discriminatedUnion("type", {
50226
50275
  stripe_sub_not_in_autumn: z117.lazy(() => Mismatch8$inboundSchema),
50227
50276
  plan_on_ending_subscription: z117.lazy(() => Mismatch9$inboundSchema),
50228
50277
  stale_subscription_link: z117.lazy(() => Mismatch10$inboundSchema),
50229
- expected_state_error: z117.lazy(() => Mismatch11$inboundSchema),
50230
- shared_stripe_customer: z117.lazy(() => Mismatch12$inboundSchema)
50278
+ missing_stripe_subscription: z117.lazy(() => Mismatch11$inboundSchema),
50279
+ expected_state_error: z117.lazy(() => Mismatch12$inboundSchema),
50280
+ shared_stripe_customer: z117.lazy(() => Mismatch13$inboundSchema)
50231
50281
  });
50232
50282
  var VerifySubscription$inboundSchema = z117.pipe(
50233
50283
  z117.object({
@@ -50244,8 +50294,9 @@ var VerifySubscription$inboundSchema = z117.pipe(
50244
50294
  stripe_sub_not_in_autumn: z117.lazy(() => Mismatch8$inboundSchema),
50245
50295
  plan_on_ending_subscription: z117.lazy(() => Mismatch9$inboundSchema),
50246
50296
  stale_subscription_link: z117.lazy(() => Mismatch10$inboundSchema),
50247
- expected_state_error: z117.lazy(() => Mismatch11$inboundSchema),
50248
- shared_stripe_customer: z117.lazy(() => Mismatch12$inboundSchema)
50297
+ missing_stripe_subscription: z117.lazy(() => Mismatch11$inboundSchema),
50298
+ expected_state_error: z117.lazy(() => Mismatch12$inboundSchema),
50299
+ shared_stripe_customer: z117.lazy(() => Mismatch13$inboundSchema)
50249
50300
  }))
50250
50301
  }),
50251
50302
  z117.transform((v) => {
@@ -50270,8 +50321,11 @@ var VerifyResponse$inboundSchema = z117.pipe(
50270
50321
  () => CustomerMismatch9$inboundSchema
50271
50322
  ),
50272
50323
  stale_subscription_link: z117.lazy(() => CustomerMismatch10$inboundSchema),
50273
- expected_state_error: z117.lazy(() => CustomerMismatch11$inboundSchema),
50274
- shared_stripe_customer: z117.lazy(() => CustomerMismatch12$inboundSchema)
50324
+ missing_stripe_subscription: z117.lazy(
50325
+ () => CustomerMismatch11$inboundSchema
50326
+ ),
50327
+ expected_state_error: z117.lazy(() => CustomerMismatch12$inboundSchema),
50328
+ shared_stripe_customer: z117.lazy(() => CustomerMismatch13$inboundSchema)
50275
50329
  })),
50276
50330
  subscriptions: z117.array(z117.lazy(() => VerifySubscription$inboundSchema))
50277
50331
  }),
@@ -53369,7 +53423,7 @@ var Billing = class extends ClientSDK {
53369
53423
  * ```
53370
53424
  *
53371
53425
  * @param customerId - Autumn customer whose Stripe subscriptions should be checked against Autumn's customer_products.
53372
- * @param subscriptionIds - Optional whitelist of Stripe subscription IDs to verify. Defaults to every subscription linked to the customer's plans, plus any other active Stripe subscription on the customer, which is reported as not linked to Autumn. (optional)
53426
+ * @param subscriptionIds - Optional whitelist of Stripe subscription IDs to verify. Defaults to every subscription linked to the customer's plans, plus any other active Stripe subscription on the customer, which is reported as not linked to Autumn. Paid plans with no Stripe subscription are only reported when this is omitted. (optional)
53373
53427
  * @param strict - When true, report missing usage-based items and unexpected metered Stripe items. Defaults to false. (optional)
53374
53428
  *
53375
53429
  * @returns A verify response with account-level mismatches and a per-subscription status (correct or mismatched) with the mismatches found.
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-HNVAMCWE.mjs";
3
+ } from "../chunk-6FBNASNY.mjs";
4
4
  import {
5
5
  autumnHandler as autumnHandler2
6
- } from "../chunk-S7XG2ILR.mjs";
6
+ } from "../chunk-AZTQQRQ3.mjs";
7
7
  import {
8
8
  autumnHandler as autumnHandler3
9
- } from "../chunk-EJV4XYF2.mjs";
9
+ } from "../chunk-IQSTYSMQ.mjs";
10
10
  import {
11
11
  autumnHandler as autumnHandler4
12
- } from "../chunk-WFVUFPBT.mjs";
12
+ } from "../chunk-7NQ7N6TP.mjs";
13
13
  import "../chunk-WYDGEDEU.mjs";
14
14
  import "../chunk-VXND2UDT.mjs";
15
- import "../chunk-OGT3KDLO.mjs";
16
- import "../chunk-JBTI5ZG4.mjs";
17
- import "../chunk-ZKDGEDOA.mjs";
18
- import "../chunk-MOHYGUMA.mjs";
19
- import "../chunk-TBQ27LIK.mjs";
20
- import "../chunk-J44WR3QZ.mjs";
15
+ import "../chunk-ICZOKLZL.mjs";
16
+ import "../chunk-HCHRACMY.mjs";
21
17
  import "../chunk-TSF4YCUO.mjs";
22
18
  import "../chunk-UAR3TMWI.mjs";
19
+ import "../chunk-C5HM3DOU.mjs";
23
20
  import "../chunk-ZRT6PJPJ.mjs";
21
+ import "../chunk-IXUCY7AU.mjs";
24
22
  import "../chunk-OTXV5FY7.mjs";
25
23
  import "../chunk-I7CD6EB6.mjs";
26
24
  import "../chunk-VZIMT7AO.mjs";
25
+ import "../chunk-TBQ27LIK.mjs";
26
+ import "../chunk-J44WR3QZ.mjs";
27
27
  import "../chunk-N7NFYY54.mjs";
28
28
  export {
29
29
  autumnHandler as expressAutumnHandler,
@@ -49571,6 +49571,10 @@ var UpdateWebhookWebhook$inboundSchema = z116.pipe(
49571
49571
 
49572
49572
  // ../sdk/src/models/verify-op.ts
49573
49573
  var z117 = __toESM(require("zod/v4-mini"), 1);
49574
+ var CustomerMismatchSeverity13 = {
49575
+ Error: "error",
49576
+ Warning: "warning"
49577
+ };
49574
49578
  var CustomerMismatchSeverity12 = {
49575
49579
  Error: "error",
49576
49580
  Warning: "warning"
@@ -49647,6 +49651,10 @@ var VerifyStatus = {
49647
49651
  Correct: "correct",
49648
49652
  Mismatched: "mismatched"
49649
49653
  };
49654
+ var MismatchSeverity13 = {
49655
+ Error: "error",
49656
+ Warning: "warning"
49657
+ };
49650
49658
  var MismatchSeverity12 = {
49651
49659
  Error: "error",
49652
49660
  Warning: "warning"
@@ -49732,17 +49740,17 @@ var VerifyParams$outboundSchema = z117.pipe(
49732
49740
  });
49733
49741
  })
49734
49742
  );
49735
- var CustomerMismatchSeverity12$inboundSchema = inboundSchema(CustomerMismatchSeverity12);
49743
+ var CustomerMismatchSeverity13$inboundSchema = inboundSchema(CustomerMismatchSeverity13);
49736
49744
  var CustomerMismatchOtherCustomer$inboundSchema = z117.object({
49737
49745
  id: string5(),
49738
49746
  name: nullable(string5()),
49739
49747
  email: nullable(string5())
49740
49748
  });
49741
- var CustomerMismatch12$inboundSchema = z117.pipe(
49749
+ var CustomerMismatch13$inboundSchema = z117.pipe(
49742
49750
  z117.object({
49743
49751
  type: literal3("shared_stripe_customer"),
49744
49752
  message: optional3(string5()),
49745
- severity: optional3(CustomerMismatchSeverity12$inboundSchema),
49753
+ severity: optional3(CustomerMismatchSeverity13$inboundSchema),
49746
49754
  stripe_customer_id: string5(),
49747
49755
  other_customer_ids: z117.array(string5()),
49748
49756
  other_customers: optional3(
@@ -49757,13 +49765,33 @@ var CustomerMismatch12$inboundSchema = z117.pipe(
49757
49765
  });
49758
49766
  })
49759
49767
  );
49760
- var CustomerMismatchSeverity11$inboundSchema = inboundSchema(CustomerMismatchSeverity11);
49761
- var CustomerMismatch11$inboundSchema = z117.object({
49768
+ var CustomerMismatchSeverity12$inboundSchema = inboundSchema(CustomerMismatchSeverity12);
49769
+ var CustomerMismatch12$inboundSchema = z117.object({
49762
49770
  type: literal3("expected_state_error"),
49763
49771
  message: optional3(string5()),
49764
- severity: optional3(CustomerMismatchSeverity11$inboundSchema),
49772
+ severity: optional3(CustomerMismatchSeverity12$inboundSchema),
49765
49773
  error: string5()
49766
49774
  });
49775
+ var CustomerMismatchSeverity11$inboundSchema = inboundSchema(CustomerMismatchSeverity11);
49776
+ var CustomerMismatch11$inboundSchema = z117.pipe(
49777
+ z117.object({
49778
+ type: literal3("missing_stripe_subscription"),
49779
+ message: optional3(string5()),
49780
+ severity: optional3(CustomerMismatchSeverity11$inboundSchema),
49781
+ customer_product_id: string5(),
49782
+ plan_id: string5(),
49783
+ plan_name: optional3(string5()),
49784
+ entity_id: optional3(string5())
49785
+ }),
49786
+ z117.transform((v) => {
49787
+ return remap(v, {
49788
+ "customer_product_id": "customerProductId",
49789
+ "plan_id": "planId",
49790
+ "plan_name": "planName",
49791
+ "entity_id": "entityId"
49792
+ });
49793
+ })
49794
+ );
49767
49795
  var CustomerMismatchSeverity10$inboundSchema = inboundSchema(CustomerMismatchSeverity10);
49768
49796
  var CustomerMismatch10$inboundSchema = z117.object({
49769
49797
  type: literal3("stale_subscription_link"),
@@ -49976,21 +50004,22 @@ var CustomerMismatchUnion$inboundSchema = discriminatedUnion("type", {
49976
50004
  stripe_sub_not_in_autumn: z117.lazy(() => CustomerMismatch8$inboundSchema),
49977
50005
  plan_on_ending_subscription: z117.lazy(() => CustomerMismatch9$inboundSchema),
49978
50006
  stale_subscription_link: z117.lazy(() => CustomerMismatch10$inboundSchema),
49979
- expected_state_error: z117.lazy(() => CustomerMismatch11$inboundSchema),
49980
- shared_stripe_customer: z117.lazy(() => CustomerMismatch12$inboundSchema)
50007
+ missing_stripe_subscription: z117.lazy(() => CustomerMismatch11$inboundSchema),
50008
+ expected_state_error: z117.lazy(() => CustomerMismatch12$inboundSchema),
50009
+ shared_stripe_customer: z117.lazy(() => CustomerMismatch13$inboundSchema)
49981
50010
  });
49982
50011
  var VerifyStatus$inboundSchema = inboundSchema(VerifyStatus);
49983
- var MismatchSeverity12$inboundSchema = inboundSchema(MismatchSeverity12);
50012
+ var MismatchSeverity13$inboundSchema = inboundSchema(MismatchSeverity13);
49984
50013
  var MismatchOtherCustomer$inboundSchema = z117.object({
49985
50014
  id: string5(),
49986
50015
  name: nullable(string5()),
49987
50016
  email: nullable(string5())
49988
50017
  });
49989
- var Mismatch12$inboundSchema = z117.pipe(
50018
+ var Mismatch13$inboundSchema = z117.pipe(
49990
50019
  z117.object({
49991
50020
  type: literal3("shared_stripe_customer"),
49992
50021
  message: optional3(string5()),
49993
- severity: optional3(MismatchSeverity12$inboundSchema),
50022
+ severity: optional3(MismatchSeverity13$inboundSchema),
49994
50023
  stripe_customer_id: string5(),
49995
50024
  other_customer_ids: z117.array(string5()),
49996
50025
  other_customers: optional3(
@@ -50005,13 +50034,33 @@ var Mismatch12$inboundSchema = z117.pipe(
50005
50034
  });
50006
50035
  })
50007
50036
  );
50008
- var MismatchSeverity11$inboundSchema = inboundSchema(MismatchSeverity11);
50009
- var Mismatch11$inboundSchema = z117.object({
50037
+ var MismatchSeverity12$inboundSchema = inboundSchema(MismatchSeverity12);
50038
+ var Mismatch12$inboundSchema = z117.object({
50010
50039
  type: literal3("expected_state_error"),
50011
50040
  message: optional3(string5()),
50012
- severity: optional3(MismatchSeverity11$inboundSchema),
50041
+ severity: optional3(MismatchSeverity12$inboundSchema),
50013
50042
  error: string5()
50014
50043
  });
50044
+ var MismatchSeverity11$inboundSchema = inboundSchema(MismatchSeverity11);
50045
+ var Mismatch11$inboundSchema = z117.pipe(
50046
+ z117.object({
50047
+ type: literal3("missing_stripe_subscription"),
50048
+ message: optional3(string5()),
50049
+ severity: optional3(MismatchSeverity11$inboundSchema),
50050
+ customer_product_id: string5(),
50051
+ plan_id: string5(),
50052
+ plan_name: optional3(string5()),
50053
+ entity_id: optional3(string5())
50054
+ }),
50055
+ z117.transform((v) => {
50056
+ return remap(v, {
50057
+ "customer_product_id": "customerProductId",
50058
+ "plan_id": "planId",
50059
+ "plan_name": "planName",
50060
+ "entity_id": "entityId"
50061
+ });
50062
+ })
50063
+ );
50015
50064
  var MismatchSeverity10$inboundSchema = inboundSchema(MismatchSeverity10);
50016
50065
  var Mismatch10$inboundSchema = z117.object({
50017
50066
  type: literal3("stale_subscription_link"),
@@ -50224,8 +50273,9 @@ var MismatchUnion$inboundSchema = discriminatedUnion("type", {
50224
50273
  stripe_sub_not_in_autumn: z117.lazy(() => Mismatch8$inboundSchema),
50225
50274
  plan_on_ending_subscription: z117.lazy(() => Mismatch9$inboundSchema),
50226
50275
  stale_subscription_link: z117.lazy(() => Mismatch10$inboundSchema),
50227
- expected_state_error: z117.lazy(() => Mismatch11$inboundSchema),
50228
- shared_stripe_customer: z117.lazy(() => Mismatch12$inboundSchema)
50276
+ missing_stripe_subscription: z117.lazy(() => Mismatch11$inboundSchema),
50277
+ expected_state_error: z117.lazy(() => Mismatch12$inboundSchema),
50278
+ shared_stripe_customer: z117.lazy(() => Mismatch13$inboundSchema)
50229
50279
  });
50230
50280
  var VerifySubscription$inboundSchema = z117.pipe(
50231
50281
  z117.object({
@@ -50242,8 +50292,9 @@ var VerifySubscription$inboundSchema = z117.pipe(
50242
50292
  stripe_sub_not_in_autumn: z117.lazy(() => Mismatch8$inboundSchema),
50243
50293
  plan_on_ending_subscription: z117.lazy(() => Mismatch9$inboundSchema),
50244
50294
  stale_subscription_link: z117.lazy(() => Mismatch10$inboundSchema),
50245
- expected_state_error: z117.lazy(() => Mismatch11$inboundSchema),
50246
- shared_stripe_customer: z117.lazy(() => Mismatch12$inboundSchema)
50295
+ missing_stripe_subscription: z117.lazy(() => Mismatch11$inboundSchema),
50296
+ expected_state_error: z117.lazy(() => Mismatch12$inboundSchema),
50297
+ shared_stripe_customer: z117.lazy(() => Mismatch13$inboundSchema)
50247
50298
  }))
50248
50299
  }),
50249
50300
  z117.transform((v) => {
@@ -50268,8 +50319,11 @@ var VerifyResponse$inboundSchema = z117.pipe(
50268
50319
  () => CustomerMismatch9$inboundSchema
50269
50320
  ),
50270
50321
  stale_subscription_link: z117.lazy(() => CustomerMismatch10$inboundSchema),
50271
- expected_state_error: z117.lazy(() => CustomerMismatch11$inboundSchema),
50272
- shared_stripe_customer: z117.lazy(() => CustomerMismatch12$inboundSchema)
50322
+ missing_stripe_subscription: z117.lazy(
50323
+ () => CustomerMismatch11$inboundSchema
50324
+ ),
50325
+ expected_state_error: z117.lazy(() => CustomerMismatch12$inboundSchema),
50326
+ shared_stripe_customer: z117.lazy(() => CustomerMismatch13$inboundSchema)
50273
50327
  })),
50274
50328
  subscriptions: z117.array(z117.lazy(() => VerifySubscription$inboundSchema))
50275
50329
  }),
@@ -53367,7 +53421,7 @@ var Billing = class extends ClientSDK {
53367
53421
  * ```
53368
53422
  *
53369
53423
  * @param customerId - Autumn customer whose Stripe subscriptions should be checked against Autumn's customer_products.
53370
- * @param subscriptionIds - Optional whitelist of Stripe subscription IDs to verify. Defaults to every subscription linked to the customer's plans, plus any other active Stripe subscription on the customer, which is reported as not linked to Autumn. (optional)
53424
+ * @param subscriptionIds - Optional whitelist of Stripe subscription IDs to verify. Defaults to every subscription linked to the customer's plans, plus any other active Stripe subscription on the customer, which is reported as not linked to Autumn. Paid plans with no Stripe subscription are only reported when this is omitted. (optional)
53371
53425
  * @param strict - When true, report missing usage-based items and unexpected metered Stripe items. Defaults to false. (optional)
53372
53426
  *
53373
53427
  * @returns A verify response with account-level mismatches and a per-subscription status (correct or mismatched) with the mismatches found.
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-WFVUFPBT.mjs";
3
+ } from "../chunk-7NQ7N6TP.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-OGT3KDLO.mjs";
7
- import "../chunk-JBTI5ZG4.mjs";
8
- import "../chunk-ZKDGEDOA.mjs";
9
- import "../chunk-MOHYGUMA.mjs";
10
- import "../chunk-TBQ27LIK.mjs";
11
- import "../chunk-J44WR3QZ.mjs";
6
+ import "../chunk-ICZOKLZL.mjs";
7
+ import "../chunk-HCHRACMY.mjs";
12
8
  import "../chunk-TSF4YCUO.mjs";
13
9
  import "../chunk-UAR3TMWI.mjs";
10
+ import "../chunk-C5HM3DOU.mjs";
14
11
  import "../chunk-ZRT6PJPJ.mjs";
12
+ import "../chunk-IXUCY7AU.mjs";
15
13
  import "../chunk-OTXV5FY7.mjs";
16
14
  import "../chunk-I7CD6EB6.mjs";
17
15
  import "../chunk-VZIMT7AO.mjs";
16
+ import "../chunk-TBQ27LIK.mjs";
17
+ import "../chunk-J44WR3QZ.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-JBTI5ZG4.mjs";
3
+ } from "./chunk-HCHRACMY.mjs";
4
4
 
5
5
  // src/backend/adapters/express.ts
6
6
  function autumnHandler(options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-JBTI5ZG4.mjs";
3
+ } from "./chunk-HCHRACMY.mjs";
4
4
 
5
5
  // src/backend/adapters/next.ts
6
6
  import { NextResponse } from "next/server";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-JBTI5ZG4.mjs";
3
+ } from "./chunk-HCHRACMY.mjs";
4
4
 
5
5
  // src/backend/adapters/fetch.ts
6
6
  function autumnHandler(options) {
@@ -49487,6 +49487,10 @@ var UpdateWebhookWebhook$inboundSchema = z116.pipe(
49487
49487
 
49488
49488
  // ../sdk/src/models/verify-op.ts
49489
49489
  import * as z117 from "zod/v4-mini";
49490
+ var CustomerMismatchSeverity13 = {
49491
+ Error: "error",
49492
+ Warning: "warning"
49493
+ };
49490
49494
  var CustomerMismatchSeverity12 = {
49491
49495
  Error: "error",
49492
49496
  Warning: "warning"
@@ -49563,6 +49567,10 @@ var VerifyStatus = {
49563
49567
  Correct: "correct",
49564
49568
  Mismatched: "mismatched"
49565
49569
  };
49570
+ var MismatchSeverity13 = {
49571
+ Error: "error",
49572
+ Warning: "warning"
49573
+ };
49566
49574
  var MismatchSeverity12 = {
49567
49575
  Error: "error",
49568
49576
  Warning: "warning"
@@ -49648,17 +49656,17 @@ var VerifyParams$outboundSchema = z117.pipe(
49648
49656
  });
49649
49657
  })
49650
49658
  );
49651
- var CustomerMismatchSeverity12$inboundSchema = inboundSchema(CustomerMismatchSeverity12);
49659
+ var CustomerMismatchSeverity13$inboundSchema = inboundSchema(CustomerMismatchSeverity13);
49652
49660
  var CustomerMismatchOtherCustomer$inboundSchema = z117.object({
49653
49661
  id: string5(),
49654
49662
  name: nullable(string5()),
49655
49663
  email: nullable(string5())
49656
49664
  });
49657
- var CustomerMismatch12$inboundSchema = z117.pipe(
49665
+ var CustomerMismatch13$inboundSchema = z117.pipe(
49658
49666
  z117.object({
49659
49667
  type: literal3("shared_stripe_customer"),
49660
49668
  message: optional3(string5()),
49661
- severity: optional3(CustomerMismatchSeverity12$inboundSchema),
49669
+ severity: optional3(CustomerMismatchSeverity13$inboundSchema),
49662
49670
  stripe_customer_id: string5(),
49663
49671
  other_customer_ids: z117.array(string5()),
49664
49672
  other_customers: optional3(
@@ -49673,13 +49681,33 @@ var CustomerMismatch12$inboundSchema = z117.pipe(
49673
49681
  });
49674
49682
  })
49675
49683
  );
49676
- var CustomerMismatchSeverity11$inboundSchema = inboundSchema(CustomerMismatchSeverity11);
49677
- var CustomerMismatch11$inboundSchema = z117.object({
49684
+ var CustomerMismatchSeverity12$inboundSchema = inboundSchema(CustomerMismatchSeverity12);
49685
+ var CustomerMismatch12$inboundSchema = z117.object({
49678
49686
  type: literal3("expected_state_error"),
49679
49687
  message: optional3(string5()),
49680
- severity: optional3(CustomerMismatchSeverity11$inboundSchema),
49688
+ severity: optional3(CustomerMismatchSeverity12$inboundSchema),
49681
49689
  error: string5()
49682
49690
  });
49691
+ var CustomerMismatchSeverity11$inboundSchema = inboundSchema(CustomerMismatchSeverity11);
49692
+ var CustomerMismatch11$inboundSchema = z117.pipe(
49693
+ z117.object({
49694
+ type: literal3("missing_stripe_subscription"),
49695
+ message: optional3(string5()),
49696
+ severity: optional3(CustomerMismatchSeverity11$inboundSchema),
49697
+ customer_product_id: string5(),
49698
+ plan_id: string5(),
49699
+ plan_name: optional3(string5()),
49700
+ entity_id: optional3(string5())
49701
+ }),
49702
+ z117.transform((v) => {
49703
+ return remap(v, {
49704
+ "customer_product_id": "customerProductId",
49705
+ "plan_id": "planId",
49706
+ "plan_name": "planName",
49707
+ "entity_id": "entityId"
49708
+ });
49709
+ })
49710
+ );
49683
49711
  var CustomerMismatchSeverity10$inboundSchema = inboundSchema(CustomerMismatchSeverity10);
49684
49712
  var CustomerMismatch10$inboundSchema = z117.object({
49685
49713
  type: literal3("stale_subscription_link"),
@@ -49892,21 +49920,22 @@ var CustomerMismatchUnion$inboundSchema = discriminatedUnion("type", {
49892
49920
  stripe_sub_not_in_autumn: z117.lazy(() => CustomerMismatch8$inboundSchema),
49893
49921
  plan_on_ending_subscription: z117.lazy(() => CustomerMismatch9$inboundSchema),
49894
49922
  stale_subscription_link: z117.lazy(() => CustomerMismatch10$inboundSchema),
49895
- expected_state_error: z117.lazy(() => CustomerMismatch11$inboundSchema),
49896
- shared_stripe_customer: z117.lazy(() => CustomerMismatch12$inboundSchema)
49923
+ missing_stripe_subscription: z117.lazy(() => CustomerMismatch11$inboundSchema),
49924
+ expected_state_error: z117.lazy(() => CustomerMismatch12$inboundSchema),
49925
+ shared_stripe_customer: z117.lazy(() => CustomerMismatch13$inboundSchema)
49897
49926
  });
49898
49927
  var VerifyStatus$inboundSchema = inboundSchema(VerifyStatus);
49899
- var MismatchSeverity12$inboundSchema = inboundSchema(MismatchSeverity12);
49928
+ var MismatchSeverity13$inboundSchema = inboundSchema(MismatchSeverity13);
49900
49929
  var MismatchOtherCustomer$inboundSchema = z117.object({
49901
49930
  id: string5(),
49902
49931
  name: nullable(string5()),
49903
49932
  email: nullable(string5())
49904
49933
  });
49905
- var Mismatch12$inboundSchema = z117.pipe(
49934
+ var Mismatch13$inboundSchema = z117.pipe(
49906
49935
  z117.object({
49907
49936
  type: literal3("shared_stripe_customer"),
49908
49937
  message: optional3(string5()),
49909
- severity: optional3(MismatchSeverity12$inboundSchema),
49938
+ severity: optional3(MismatchSeverity13$inboundSchema),
49910
49939
  stripe_customer_id: string5(),
49911
49940
  other_customer_ids: z117.array(string5()),
49912
49941
  other_customers: optional3(
@@ -49921,13 +49950,33 @@ var Mismatch12$inboundSchema = z117.pipe(
49921
49950
  });
49922
49951
  })
49923
49952
  );
49924
- var MismatchSeverity11$inboundSchema = inboundSchema(MismatchSeverity11);
49925
- var Mismatch11$inboundSchema = z117.object({
49953
+ var MismatchSeverity12$inboundSchema = inboundSchema(MismatchSeverity12);
49954
+ var Mismatch12$inboundSchema = z117.object({
49926
49955
  type: literal3("expected_state_error"),
49927
49956
  message: optional3(string5()),
49928
- severity: optional3(MismatchSeverity11$inboundSchema),
49957
+ severity: optional3(MismatchSeverity12$inboundSchema),
49929
49958
  error: string5()
49930
49959
  });
49960
+ var MismatchSeverity11$inboundSchema = inboundSchema(MismatchSeverity11);
49961
+ var Mismatch11$inboundSchema = z117.pipe(
49962
+ z117.object({
49963
+ type: literal3("missing_stripe_subscription"),
49964
+ message: optional3(string5()),
49965
+ severity: optional3(MismatchSeverity11$inboundSchema),
49966
+ customer_product_id: string5(),
49967
+ plan_id: string5(),
49968
+ plan_name: optional3(string5()),
49969
+ entity_id: optional3(string5())
49970
+ }),
49971
+ z117.transform((v) => {
49972
+ return remap(v, {
49973
+ "customer_product_id": "customerProductId",
49974
+ "plan_id": "planId",
49975
+ "plan_name": "planName",
49976
+ "entity_id": "entityId"
49977
+ });
49978
+ })
49979
+ );
49931
49980
  var MismatchSeverity10$inboundSchema = inboundSchema(MismatchSeverity10);
49932
49981
  var Mismatch10$inboundSchema = z117.object({
49933
49982
  type: literal3("stale_subscription_link"),
@@ -50140,8 +50189,9 @@ var MismatchUnion$inboundSchema = discriminatedUnion("type", {
50140
50189
  stripe_sub_not_in_autumn: z117.lazy(() => Mismatch8$inboundSchema),
50141
50190
  plan_on_ending_subscription: z117.lazy(() => Mismatch9$inboundSchema),
50142
50191
  stale_subscription_link: z117.lazy(() => Mismatch10$inboundSchema),
50143
- expected_state_error: z117.lazy(() => Mismatch11$inboundSchema),
50144
- shared_stripe_customer: z117.lazy(() => Mismatch12$inboundSchema)
50192
+ missing_stripe_subscription: z117.lazy(() => Mismatch11$inboundSchema),
50193
+ expected_state_error: z117.lazy(() => Mismatch12$inboundSchema),
50194
+ shared_stripe_customer: z117.lazy(() => Mismatch13$inboundSchema)
50145
50195
  });
50146
50196
  var VerifySubscription$inboundSchema = z117.pipe(
50147
50197
  z117.object({
@@ -50158,8 +50208,9 @@ var VerifySubscription$inboundSchema = z117.pipe(
50158
50208
  stripe_sub_not_in_autumn: z117.lazy(() => Mismatch8$inboundSchema),
50159
50209
  plan_on_ending_subscription: z117.lazy(() => Mismatch9$inboundSchema),
50160
50210
  stale_subscription_link: z117.lazy(() => Mismatch10$inboundSchema),
50161
- expected_state_error: z117.lazy(() => Mismatch11$inboundSchema),
50162
- shared_stripe_customer: z117.lazy(() => Mismatch12$inboundSchema)
50211
+ missing_stripe_subscription: z117.lazy(() => Mismatch11$inboundSchema),
50212
+ expected_state_error: z117.lazy(() => Mismatch12$inboundSchema),
50213
+ shared_stripe_customer: z117.lazy(() => Mismatch13$inboundSchema)
50163
50214
  }))
50164
50215
  }),
50165
50216
  z117.transform((v) => {
@@ -50184,8 +50235,11 @@ var VerifyResponse$inboundSchema = z117.pipe(
50184
50235
  () => CustomerMismatch9$inboundSchema
50185
50236
  ),
50186
50237
  stale_subscription_link: z117.lazy(() => CustomerMismatch10$inboundSchema),
50187
- expected_state_error: z117.lazy(() => CustomerMismatch11$inboundSchema),
50188
- shared_stripe_customer: z117.lazy(() => CustomerMismatch12$inboundSchema)
50238
+ missing_stripe_subscription: z117.lazy(
50239
+ () => CustomerMismatch11$inboundSchema
50240
+ ),
50241
+ expected_state_error: z117.lazy(() => CustomerMismatch12$inboundSchema),
50242
+ shared_stripe_customer: z117.lazy(() => CustomerMismatch13$inboundSchema)
50189
50243
  })),
50190
50244
  subscriptions: z117.array(z117.lazy(() => VerifySubscription$inboundSchema))
50191
50245
  }),
@@ -53311,7 +53365,7 @@ var Billing = class extends ClientSDK {
53311
53365
  * ```
53312
53366
  *
53313
53367
  * @param customerId - Autumn customer whose Stripe subscriptions should be checked against Autumn's customer_products.
53314
- * @param subscriptionIds - Optional whitelist of Stripe subscription IDs to verify. Defaults to every subscription linked to the customer's plans, plus any other active Stripe subscription on the customer, which is reported as not linked to Autumn. (optional)
53368
+ * @param subscriptionIds - Optional whitelist of Stripe subscription IDs to verify. Defaults to every subscription linked to the customer's plans, plus any other active Stripe subscription on the customer, which is reported as not linked to Autumn. Paid plans with no Stripe subscription are only reported when this is omitted. (optional)
53315
53369
  * @param strict - When true, report missing usage-based items and unexpected metered Stripe items. Defaults to false. (optional)
53316
53370
  *
53317
53371
  * @returns A verify response with account-level mismatches and a per-subscription status (correct or mismatched) with the mismatches found.