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
@@ -1,5 +1,15 @@
1
- import { O as OpenEnum } from './plan-CUExbmy9.mjs';
1
+ import { O as OpenEnum } from './plan--HshF-xs.mjs';
2
2
 
3
+ type ListPlansAdditionalCurrency = {
4
+ /**
5
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
6
+ */
7
+ currency: string;
8
+ /**
9
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
10
+ */
11
+ amount: number;
12
+ };
3
13
  /**
4
14
  * Billing interval (e.g. 'month', 'year').
5
15
  */
@@ -33,6 +43,10 @@ type ListPlansPrice = {
33
43
  * Base price amount for the plan.
34
44
  */
35
45
  amount: number;
46
+ /**
47
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
48
+ */
49
+ additionalCurrencies?: Array<ListPlansAdditionalCurrency> | undefined;
36
50
  /**
37
51
  * Billing interval (e.g. 'month', 'year').
38
52
  */
@@ -138,10 +152,35 @@ type ListPlansItemReset = {
138
152
  */
139
153
  intervalCount?: number | undefined;
140
154
  };
155
+ type ListPlansItemAdditionalCurrency = {
156
+ /**
157
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
158
+ */
159
+ currency: string;
160
+ /**
161
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
162
+ */
163
+ amount: number;
164
+ };
165
+ type ListPlansTierAdditionalCurrency = {
166
+ /**
167
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
168
+ */
169
+ currency: string;
170
+ /**
171
+ * Per-unit amount for this tier in this currency.
172
+ */
173
+ amount?: number | undefined;
174
+ /**
175
+ * Flat amount for this tier in this currency, if the tier uses one.
176
+ */
177
+ flatAmount?: number | undefined;
178
+ };
141
179
  type ListPlansItemTier = {
142
180
  to: number | string;
143
181
  amount: number;
144
182
  flatAmount?: number | undefined;
183
+ additionalCurrencies?: Array<ListPlansTierAdditionalCurrency> | undefined;
145
184
  };
146
185
  declare const ListPlansItemTierBehavior: {
147
186
  readonly Graduated: "graduated";
@@ -179,6 +218,10 @@ type ListPlansItemPrice = {
179
218
  * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
180
219
  */
181
220
  amount?: number | undefined;
221
+ /**
222
+ * 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).
223
+ */
224
+ additionalCurrencies?: Array<ListPlansItemAdditionalCurrency> | undefined;
182
225
  /**
183
226
  * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
184
227
  */
@@ -348,6 +391,16 @@ declare const ListPlansPriceVariantDetailsInterval: {
348
391
  * Billing interval (e.g. 'month', 'year').
349
392
  */
350
393
  type ListPlansPriceVariantDetailsInterval = OpenEnum<typeof ListPlansPriceVariantDetailsInterval>;
394
+ type ListPlansVariantDetailsAdditionalCurrency = {
395
+ /**
396
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
397
+ */
398
+ currency: string;
399
+ /**
400
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
401
+ */
402
+ amount: number;
403
+ };
351
404
  /**
352
405
  * Base price configuration for a plan.
353
406
  */
@@ -364,6 +417,10 @@ type ListPlansBasePrice = {
364
417
  * Number of intervals per billing cycle. Defaults to 1.
365
418
  */
366
419
  intervalCount?: number | undefined;
420
+ /**
421
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
422
+ */
423
+ additionalCurrencies?: Array<ListPlansVariantDetailsAdditionalCurrency> | undefined;
367
424
  };
368
425
  /**
369
426
  * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
@@ -396,10 +453,21 @@ type ListPlansVariantDetailsReset = {
396
453
  */
397
454
  intervalCount?: number | undefined;
398
455
  };
456
+ type ListPlansAddItemAdditionalCurrency = {
457
+ /**
458
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
459
+ */
460
+ currency: string;
461
+ /**
462
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
463
+ */
464
+ amount: number;
465
+ };
399
466
  type ListPlansVariantDetailsTier = {
400
467
  to?: any | undefined;
401
468
  amount: number;
402
469
  flatAmount?: number | undefined;
470
+ additionalCurrencies?: Array<any | null> | undefined;
403
471
  };
404
472
  declare const ListPlansVariantDetailsTierBehavior: {
405
473
  readonly Graduated: "graduated";
@@ -440,6 +508,10 @@ type ListPlansVariantDetailsPrice = {
440
508
  * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
441
509
  */
442
510
  amount?: number | undefined;
511
+ /**
512
+ * Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
513
+ */
514
+ additionalCurrencies?: Array<ListPlansAddItemAdditionalCurrency> | undefined;
443
515
  /**
444
516
  * Tiered pricing. Either 'amount' or 'tiers' is required.
445
517
  */
@@ -1,5 +1,15 @@
1
- import { O as OpenEnum } from './plan-CUExbmy9.js';
1
+ import { O as OpenEnum } from './plan--HshF-xs.js';
2
2
 
3
+ type ListPlansAdditionalCurrency = {
4
+ /**
5
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
6
+ */
7
+ currency: string;
8
+ /**
9
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
10
+ */
11
+ amount: number;
12
+ };
3
13
  /**
4
14
  * Billing interval (e.g. 'month', 'year').
5
15
  */
@@ -33,6 +43,10 @@ type ListPlansPrice = {
33
43
  * Base price amount for the plan.
34
44
  */
35
45
  amount: number;
46
+ /**
47
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
48
+ */
49
+ additionalCurrencies?: Array<ListPlansAdditionalCurrency> | undefined;
36
50
  /**
37
51
  * Billing interval (e.g. 'month', 'year').
38
52
  */
@@ -138,10 +152,35 @@ type ListPlansItemReset = {
138
152
  */
139
153
  intervalCount?: number | undefined;
140
154
  };
155
+ type ListPlansItemAdditionalCurrency = {
156
+ /**
157
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
158
+ */
159
+ currency: string;
160
+ /**
161
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
162
+ */
163
+ amount: number;
164
+ };
165
+ type ListPlansTierAdditionalCurrency = {
166
+ /**
167
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
168
+ */
169
+ currency: string;
170
+ /**
171
+ * Per-unit amount for this tier in this currency.
172
+ */
173
+ amount?: number | undefined;
174
+ /**
175
+ * Flat amount for this tier in this currency, if the tier uses one.
176
+ */
177
+ flatAmount?: number | undefined;
178
+ };
141
179
  type ListPlansItemTier = {
142
180
  to: number | string;
143
181
  amount: number;
144
182
  flatAmount?: number | undefined;
183
+ additionalCurrencies?: Array<ListPlansTierAdditionalCurrency> | undefined;
145
184
  };
146
185
  declare const ListPlansItemTierBehavior: {
147
186
  readonly Graduated: "graduated";
@@ -179,6 +218,10 @@ type ListPlansItemPrice = {
179
218
  * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
180
219
  */
181
220
  amount?: number | undefined;
221
+ /**
222
+ * 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).
223
+ */
224
+ additionalCurrencies?: Array<ListPlansItemAdditionalCurrency> | undefined;
182
225
  /**
183
226
  * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
184
227
  */
@@ -348,6 +391,16 @@ declare const ListPlansPriceVariantDetailsInterval: {
348
391
  * Billing interval (e.g. 'month', 'year').
349
392
  */
350
393
  type ListPlansPriceVariantDetailsInterval = OpenEnum<typeof ListPlansPriceVariantDetailsInterval>;
394
+ type ListPlansVariantDetailsAdditionalCurrency = {
395
+ /**
396
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
397
+ */
398
+ currency: string;
399
+ /**
400
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
401
+ */
402
+ amount: number;
403
+ };
351
404
  /**
352
405
  * Base price configuration for a plan.
353
406
  */
@@ -364,6 +417,10 @@ type ListPlansBasePrice = {
364
417
  * Number of intervals per billing cycle. Defaults to 1.
365
418
  */
366
419
  intervalCount?: number | undefined;
420
+ /**
421
+ * Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
422
+ */
423
+ additionalCurrencies?: Array<ListPlansVariantDetailsAdditionalCurrency> | undefined;
367
424
  };
368
425
  /**
369
426
  * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
@@ -396,10 +453,21 @@ type ListPlansVariantDetailsReset = {
396
453
  */
397
454
  intervalCount?: number | undefined;
398
455
  };
456
+ type ListPlansAddItemAdditionalCurrency = {
457
+ /**
458
+ * Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
459
+ */
460
+ currency: string;
461
+ /**
462
+ * Price amount in this currency. Set explicitly per currency, not converted from the base amount.
463
+ */
464
+ amount: number;
465
+ };
399
466
  type ListPlansVariantDetailsTier = {
400
467
  to?: any | undefined;
401
468
  amount: number;
402
469
  flatAmount?: number | undefined;
470
+ additionalCurrencies?: Array<any | null> | undefined;
403
471
  };
404
472
  declare const ListPlansVariantDetailsTierBehavior: {
405
473
  readonly Graduated: "graduated";
@@ -440,6 +508,10 @@ type ListPlansVariantDetailsPrice = {
440
508
  * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
441
509
  */
442
510
  amount?: number | undefined;
511
+ /**
512
+ * Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
513
+ */
514
+ additionalCurrencies?: Array<ListPlansAddItemAdditionalCurrency> | undefined;
443
515
  /**
444
516
  * Tiered pricing. Either 'amount' or 'tiers' is required.
445
517
  */