autumn-js 1.2.39 → 1.2.41

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 (136) hide show
  1. package/dist/backend/adapters/express.d.mts +1 -1
  2. package/dist/backend/adapters/express.d.ts +1 -1
  3. package/dist/backend/adapters/express.js +10792 -6387
  4. package/dist/backend/adapters/express.mjs +5 -5
  5. package/dist/backend/adapters/fetch.d.mts +1 -1
  6. package/dist/backend/adapters/fetch.d.ts +1 -1
  7. package/dist/backend/adapters/fetch.js +10792 -6387
  8. package/dist/backend/adapters/fetch.mjs +5 -5
  9. package/dist/backend/adapters/hono.d.mts +1 -1
  10. package/dist/backend/adapters/hono.d.ts +1 -1
  11. package/dist/backend/adapters/hono.js +10792 -6387
  12. package/dist/backend/adapters/hono.mjs +5 -5
  13. package/dist/backend/adapters/index.d.mts +1 -1
  14. package/dist/backend/adapters/index.d.ts +1 -1
  15. package/dist/backend/adapters/index.js +10792 -6387
  16. package/dist/backend/adapters/index.mjs +8 -8
  17. package/dist/backend/adapters/next.d.mts +1 -1
  18. package/dist/backend/adapters/next.d.ts +1 -1
  19. package/dist/backend/adapters/next.js +10792 -6387
  20. package/dist/backend/adapters/next.mjs +5 -5
  21. package/dist/backend/{authTypes-jU7ON-I5.d.mts → authTypes-B2FK_0xh.d.mts} +4 -0
  22. package/dist/backend/{authTypes-jU7ON-I5.d.ts → authTypes-B2FK_0xh.d.ts} +4 -0
  23. package/dist/backend/{chunk-5IUIFE55.mjs → chunk-2VGKOWXH.mjs} +1 -1
  24. package/dist/backend/{chunk-MSMJS42G.mjs → chunk-5FKCJ3TB.mjs} +9204 -6330
  25. package/dist/backend/{chunk-V32P22RC.mjs → chunk-6IRM5YOA.mjs} +2 -2
  26. package/dist/backend/{chunk-NHBJ3QDV.mjs → chunk-6WHGF4WX.mjs} +1626 -95
  27. package/dist/backend/{chunk-GL2SBEQ5.mjs → chunk-CHL34LQO.mjs} +1 -1
  28. package/dist/backend/{chunk-KJP3DHPM.mjs → chunk-FS2XS32M.mjs} +1 -1
  29. package/dist/backend/{chunk-UMTASWZL.mjs → chunk-QKLYHQFJ.mjs} +1 -1
  30. package/dist/backend/{chunk-KM5AXZWJ.mjs → chunk-UD2T3GKC.mjs} +2 -2
  31. package/dist/backend/core/handlers/coreHandler.d.mts +2 -2
  32. package/dist/backend/core/handlers/coreHandler.d.ts +2 -2
  33. package/dist/backend/core/handlers/coreHandler.js +10792 -6387
  34. package/dist/backend/core/handlers/coreHandler.mjs +3 -3
  35. package/dist/backend/core/handlers/executeRoute.d.mts +2 -2
  36. package/dist/backend/core/handlers/executeRoute.d.ts +2 -2
  37. package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
  38. package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
  39. package/dist/backend/core/handlers/handleRouteByName.js +10792 -6387
  40. package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
  41. package/dist/backend/core/handlers/index.d.mts +2 -2
  42. package/dist/backend/core/handlers/index.d.ts +2 -2
  43. package/dist/backend/core/handlers/index.js +10792 -6387
  44. package/dist/backend/core/handlers/index.mjs +4 -4
  45. package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
  46. package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
  47. package/dist/backend/core/index.d.mts +2 -2
  48. package/dist/backend/core/index.d.ts +2 -2
  49. package/dist/backend/core/index.js +10792 -6387
  50. package/dist/backend/core/index.mjs +4 -4
  51. package/dist/backend/core/routes/index.d.mts +2 -2
  52. package/dist/backend/core/routes/index.d.ts +2 -2
  53. package/dist/backend/core/routes/index.js +1626 -95
  54. package/dist/backend/core/routes/index.mjs +1 -1
  55. package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
  56. package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
  57. package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
  58. package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
  59. package/dist/backend/core/routes/routeConfigs.js +1626 -95
  60. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  61. package/dist/backend/core/types/authTypes.d.mts +1 -1
  62. package/dist/backend/core/types/authTypes.d.ts +1 -1
  63. package/dist/backend/core/types/handlerTypes.d.mts +2 -2
  64. package/dist/backend/core/types/handlerTypes.d.ts +2 -2
  65. package/dist/backend/core/types/index.d.mts +2 -2
  66. package/dist/backend/core/types/index.d.ts +2 -2
  67. package/dist/backend/core/types/routeTypes.d.mts +2 -2
  68. package/dist/backend/core/types/routeTypes.d.ts +2 -2
  69. package/dist/backend/index.d.mts +4 -4
  70. package/dist/backend/index.d.ts +4 -4
  71. package/dist/backend/index.js +10792 -6387
  72. package/dist/backend/index.mjs +4 -4
  73. package/dist/backend/{routeTypes-CIqS7yVo.d.mts → routeTypes-6y6WfqD1.d.mts} +3750 -548
  74. package/dist/backend/{routeTypes-uWaE8YYa.d.ts → routeTypes-Bqeo1-G5.d.ts} +3750 -548
  75. package/dist/better-auth/{chunk-LLBM6UQN.mjs → chunk-CICEUVIO.mjs} +9205 -6331
  76. package/dist/better-auth/{chunk-DG2IPLR6.mjs → chunk-PQ5Y4SBX.mjs} +1626 -95
  77. package/dist/better-auth/{chunk-7NGK7FWC.mjs → chunk-UGW5CGCL.mjs} +1 -1
  78. package/dist/better-auth/index.js +10715 -6310
  79. package/dist/better-auth/index.mjs +3 -3
  80. package/dist/better-auth/types.d.mts +4 -0
  81. package/dist/better-auth/types.d.ts +4 -0
  82. package/dist/better-auth/utils/createAutumnEndpoint.js +1626 -95
  83. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  84. package/dist/better-auth/utils/handleBetterAuthRoute.js +10792 -6387
  85. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  86. package/dist/better-auth/utils/index.js +10715 -6310
  87. package/dist/better-auth/utils/index.mjs +3 -3
  88. package/dist/react/AutumnContext.d.mts +4 -4
  89. package/dist/react/AutumnContext.d.ts +4 -4
  90. package/dist/react/client/AutumnClient.d.mts +4 -4
  91. package/dist/react/client/AutumnClient.d.ts +4 -4
  92. package/dist/react/client/IAutumnClient.d.mts +4 -4
  93. package/dist/react/client/IAutumnClient.d.ts +4 -4
  94. package/dist/react/client/index.d.mts +4 -4
  95. package/dist/react/client/index.d.ts +4 -4
  96. package/dist/react/{customer-DM044m1a.d.mts → customer-BD_JdC0O.d.mts} +35 -1
  97. package/dist/react/{customer-CrxRrY4o.d.ts → customer-C95I_yQG.d.ts} +35 -1
  98. package/dist/react/hooks/index.d.mts +4 -4
  99. package/dist/react/hooks/index.d.ts +4 -4
  100. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  101. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  102. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  103. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  104. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  105. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  106. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  107. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  108. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  109. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  110. package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
  111. package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
  112. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  113. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  114. package/dist/react/hooks/useCustomer.d.mts +3 -3
  115. package/dist/react/hooks/useCustomer.d.ts +3 -3
  116. package/dist/react/hooks/useEntity.d.mts +2 -2
  117. package/dist/react/hooks/useEntity.d.ts +2 -2
  118. package/dist/react/hooks/useListEvents.d.mts +2 -2
  119. package/dist/react/hooks/useListEvents.d.ts +2 -2
  120. package/dist/react/hooks/useListPlans.d.mts +3 -3
  121. package/dist/react/hooks/useListPlans.d.ts +3 -3
  122. package/dist/react/hooks/useReferrals.d.mts +2 -2
  123. package/dist/react/hooks/useReferrals.d.ts +2 -2
  124. package/dist/react/index.d.mts +4 -4
  125. package/dist/react/index.d.ts +4 -4
  126. package/dist/react/{list-plans-op-DvXyRegM.d.mts → list-plans-op--w_i80gy.d.mts} +73 -1
  127. package/dist/react/{list-plans-op-Cwb5iIdA.d.ts → list-plans-op-BdOxN1FS.d.ts} +73 -1
  128. package/dist/react/{params-B-1vi9za.d.ts → params-Dk9XX3Ql.d.mts} +2736 -473
  129. package/dist/react/{params-Bf18ATYi.d.mts → params-_Bb3H0_F.d.ts} +2736 -473
  130. package/dist/react/{plan-CUExbmy9.d.mts → plan--HshF-xs.d.mts} +86 -0
  131. package/dist/react/{plan-CUExbmy9.d.ts → plan--HshF-xs.d.ts} +86 -0
  132. package/dist/sdk/index.d.mts +4648 -22
  133. package/dist/sdk/index.d.ts +4648 -22
  134. package/dist/sdk/index.js +10662 -6296
  135. package/dist/sdk/index.mjs +10234 -6296
  136. package/package.json +1 -1
@@ -281,6 +281,16 @@ type Balance = {
281
281
  rollovers?: Array<BalanceRollover> | undefined;
282
282
  };
283
283
 
284
+ type AdditionalCurrency = {
285
+ /**
286
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
287
+ */
288
+ currency: string;
289
+ /**
290
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
291
+ */
292
+ amount: number;
293
+ };
284
294
  /**
285
295
  * Billing interval (e.g. 'month', 'year').
286
296
  */
@@ -314,6 +324,10 @@ type PlanPrice = {
314
324
  * Base price amount for the plan.
315
325
  */
316
326
  amount: number;
327
+ /**
328
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
329
+ */
330
+ additionalCurrencies?: Array<AdditionalCurrency> | undefined;
317
331
  /**
318
332
  * Billing interval (e.g. 'month', 'year').
319
333
  */
@@ -419,10 +433,35 @@ type PlanItemReset = {
419
433
  */
420
434
  intervalCount?: number | undefined;
421
435
  };
436
+ type ItemAdditionalCurrency = {
437
+ /**
438
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
439
+ */
440
+ currency: string;
441
+ /**
442
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
443
+ */
444
+ amount: number;
445
+ };
446
+ type ItemTierAdditionalCurrency = {
447
+ /**
448
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
449
+ */
450
+ currency: string;
451
+ /**
452
+ * Per-unit amount for this tier in this currency.
453
+ */
454
+ amount?: number | undefined;
455
+ /**
456
+ * Flat amount for this tier in this currency, if the tier uses one.
457
+ */
458
+ flatAmount?: number | undefined;
459
+ };
422
460
  type PlanItemTier = {
423
461
  to: number | string;
424
462
  amount: number;
425
463
  flatAmount?: number | undefined;
464
+ additionalCurrencies?: Array<ItemTierAdditionalCurrency> | undefined;
426
465
  };
427
466
  declare const PlanItemTierBehavior: {
428
467
  readonly Graduated: "graduated";
@@ -460,6 +499,10 @@ type PlanItemPrice = {
460
499
  * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
461
500
  */
462
501
  amount?: number | undefined;
502
+ /**
503
+ * Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).
504
+ */
505
+ additionalCurrencies?: Array<ItemAdditionalCurrency> | undefined;
463
506
  /**
464
507
  * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
465
508
  */
@@ -629,6 +672,16 @@ declare const PlanPriceVariantDetailsInterval: {
629
672
  * Billing interval (e.g. 'month', 'year').
630
673
  */
631
674
  type PlanPriceVariantDetailsInterval = OpenEnum<typeof PlanPriceVariantDetailsInterval>;
675
+ type VariantDetailsAdditionalCurrency = {
676
+ /**
677
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
678
+ */
679
+ currency: string;
680
+ /**
681
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
682
+ */
683
+ amount: number;
684
+ };
632
685
  /**
633
686
  * Base price configuration for a plan.
634
687
  */
@@ -645,6 +698,10 @@ type BasePrice = {
645
698
  * Number of intervals per billing cycle. Defaults to 1.
646
699
  */
647
700
  intervalCount?: number | undefined;
701
+ /**
702
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
703
+ */
704
+ additionalCurrencies?: Array<VariantDetailsAdditionalCurrency> | undefined;
648
705
  };
649
706
  /**
650
707
  * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
@@ -677,10 +734,35 @@ type PlanVariantDetailsReset = {
677
734
  */
678
735
  intervalCount?: number | undefined;
679
736
  };
737
+ type AddItemAdditionalCurrency = {
738
+ /**
739
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
740
+ */
741
+ currency: string;
742
+ /**
743
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
744
+ */
745
+ amount: number;
746
+ };
747
+ type VariantDetailsTierAdditionalCurrency = {
748
+ /**
749
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
750
+ */
751
+ currency: string;
752
+ /**
753
+ * Per-unit amount for this tier in this currency.
754
+ */
755
+ amount?: number | undefined;
756
+ /**
757
+ * Flat amount for this tier in this currency, if the tier uses one.
758
+ */
759
+ flatAmount?: number | undefined;
760
+ };
680
761
  type PlanVariantDetailsTier = {
681
762
  to: number | string;
682
763
  amount: number;
683
764
  flatAmount?: number | undefined;
765
+ additionalCurrencies?: Array<VariantDetailsTierAdditionalCurrency> | undefined;
684
766
  };
685
767
  declare const PlanVariantDetailsTierBehavior: {
686
768
  readonly Graduated: "graduated";
@@ -721,6 +803,10 @@ type PlanVariantDetailsPrice = {
721
803
  * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
722
804
  */
723
805
  amount?: number | undefined;
806
+ /**
807
+ * Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
808
+ */
809
+ additionalCurrencies?: Array<AddItemAdditionalCurrency> | undefined;
724
810
  /**
725
811
  * Tiered pricing. Either 'amount' or 'tiers' is required.
726
812
  */
@@ -281,6 +281,16 @@ type Balance = {
281
281
  rollovers?: Array<BalanceRollover> | undefined;
282
282
  };
283
283
 
284
+ type AdditionalCurrency = {
285
+ /**
286
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
287
+ */
288
+ currency: string;
289
+ /**
290
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
291
+ */
292
+ amount: number;
293
+ };
284
294
  /**
285
295
  * Billing interval (e.g. 'month', 'year').
286
296
  */
@@ -314,6 +324,10 @@ type PlanPrice = {
314
324
  * Base price amount for the plan.
315
325
  */
316
326
  amount: number;
327
+ /**
328
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
329
+ */
330
+ additionalCurrencies?: Array<AdditionalCurrency> | undefined;
317
331
  /**
318
332
  * Billing interval (e.g. 'month', 'year').
319
333
  */
@@ -419,10 +433,35 @@ type PlanItemReset = {
419
433
  */
420
434
  intervalCount?: number | undefined;
421
435
  };
436
+ type ItemAdditionalCurrency = {
437
+ /**
438
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
439
+ */
440
+ currency: string;
441
+ /**
442
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
443
+ */
444
+ amount: number;
445
+ };
446
+ type ItemTierAdditionalCurrency = {
447
+ /**
448
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
449
+ */
450
+ currency: string;
451
+ /**
452
+ * Per-unit amount for this tier in this currency.
453
+ */
454
+ amount?: number | undefined;
455
+ /**
456
+ * Flat amount for this tier in this currency, if the tier uses one.
457
+ */
458
+ flatAmount?: number | undefined;
459
+ };
422
460
  type PlanItemTier = {
423
461
  to: number | string;
424
462
  amount: number;
425
463
  flatAmount?: number | undefined;
464
+ additionalCurrencies?: Array<ItemTierAdditionalCurrency> | undefined;
426
465
  };
427
466
  declare const PlanItemTierBehavior: {
428
467
  readonly Graduated: "graduated";
@@ -460,6 +499,10 @@ type PlanItemPrice = {
460
499
  * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
461
500
  */
462
501
  amount?: number | undefined;
502
+ /**
503
+ * Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers' (tiered prices carry per-currency amounts on each tier).
504
+ */
505
+ additionalCurrencies?: Array<ItemAdditionalCurrency> | undefined;
463
506
  /**
464
507
  * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
465
508
  */
@@ -629,6 +672,16 @@ declare const PlanPriceVariantDetailsInterval: {
629
672
  * Billing interval (e.g. 'month', 'year').
630
673
  */
631
674
  type PlanPriceVariantDetailsInterval = OpenEnum<typeof PlanPriceVariantDetailsInterval>;
675
+ type VariantDetailsAdditionalCurrency = {
676
+ /**
677
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
678
+ */
679
+ currency: string;
680
+ /**
681
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
682
+ */
683
+ amount: number;
684
+ };
632
685
  /**
633
686
  * Base price configuration for a plan.
634
687
  */
@@ -645,6 +698,10 @@ type BasePrice = {
645
698
  * Number of intervals per billing cycle. Defaults to 1.
646
699
  */
647
700
  intervalCount?: number | undefined;
701
+ /**
702
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
703
+ */
704
+ additionalCurrencies?: Array<VariantDetailsAdditionalCurrency> | undefined;
648
705
  };
649
706
  /**
650
707
  * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
@@ -677,10 +734,35 @@ type PlanVariantDetailsReset = {
677
734
  */
678
735
  intervalCount?: number | undefined;
679
736
  };
737
+ type AddItemAdditionalCurrency = {
738
+ /**
739
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
740
+ */
741
+ currency: string;
742
+ /**
743
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
744
+ */
745
+ amount: number;
746
+ };
747
+ type VariantDetailsTierAdditionalCurrency = {
748
+ /**
749
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
750
+ */
751
+ currency: string;
752
+ /**
753
+ * Per-unit amount for this tier in this currency.
754
+ */
755
+ amount?: number | undefined;
756
+ /**
757
+ * Flat amount for this tier in this currency, if the tier uses one.
758
+ */
759
+ flatAmount?: number | undefined;
760
+ };
680
761
  type PlanVariantDetailsTier = {
681
762
  to: number | string;
682
763
  amount: number;
683
764
  flatAmount?: number | undefined;
765
+ additionalCurrencies?: Array<VariantDetailsTierAdditionalCurrency> | undefined;
684
766
  };
685
767
  declare const PlanVariantDetailsTierBehavior: {
686
768
  readonly Graduated: "graduated";
@@ -721,6 +803,10 @@ type PlanVariantDetailsPrice = {
721
803
  * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
722
804
  */
723
805
  amount?: number | undefined;
806
+ /**
807
+ * Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
808
+ */
809
+ additionalCurrencies?: Array<AddItemAdditionalCurrency> | undefined;
724
810
  /**
725
811
  * Tiered pricing. Either 'amount' or 'tiers' is required.
726
812
  */