autumn-js 1.2.49 → 1.2.51

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 +15401 -13523
  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 +15401 -13523
  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 +15401 -13523
  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 +15401 -13523
  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 +15401 -13523
  20. package/dist/backend/adapters/next.mjs +5 -5
  21. package/dist/backend/{authTypes-COW88tnI.d.mts → authTypes-BPv82hMB.d.mts} +1 -0
  22. package/dist/backend/{authTypes-COW88tnI.d.ts → authTypes-BPv82hMB.d.ts} +1 -0
  23. package/dist/backend/{chunk-WIIJIELJ.mjs → chunk-3IERCYTR.mjs} +2 -2
  24. package/dist/backend/{chunk-25GD3WCE.mjs → chunk-6GOQC5SD.mjs} +1 -1
  25. package/dist/backend/{chunk-EIR56X56.mjs → chunk-GOHDQNPO.mjs} +1 -1
  26. package/dist/backend/{chunk-QEJJM4BY.mjs → chunk-IVZOKPTN.mjs} +15413 -13535
  27. package/dist/backend/{chunk-FZQWS6KN.mjs → chunk-NND4W5ST.mjs} +1 -1
  28. package/dist/backend/{chunk-2OM5IYSI.mjs → chunk-OATOSP4P.mjs} +14 -14
  29. package/dist/backend/{chunk-K7BBOM2C.mjs → chunk-PAX4VKN2.mjs} +2 -2
  30. package/dist/backend/{chunk-TW3CT5JS.mjs → chunk-QEVYQVND.mjs} +1 -1
  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 +15401 -13523
  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 +15401 -13523
  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 +15401 -13523
  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 +15401 -13523
  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 +14 -14
  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 +14 -14
  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 +15401 -13523
  72. package/dist/backend/index.mjs +4 -4
  73. package/dist/backend/{routeTypes-6-0oSlbI.d.mts → routeTypes-BgnbgxGz.d.mts} +1862 -163
  74. package/dist/backend/{routeTypes-NNlpTwza.d.ts → routeTypes-CY41TUL_.d.ts} +1862 -163
  75. package/dist/better-auth/{chunk-KTJ7KXKK.mjs → chunk-65UT5FYZ.mjs} +1 -1
  76. package/dist/better-auth/{chunk-4E2XIHMW.mjs → chunk-O4JXKGQB.mjs} +14 -14
  77. package/dist/better-auth/{chunk-JB7C63BT.mjs → chunk-PWIGXWBN.mjs} +15388 -13510
  78. package/dist/better-auth/index.js +6764 -4886
  79. package/dist/better-auth/index.mjs +3 -3
  80. package/dist/better-auth/types.d.mts +1 -0
  81. package/dist/better-auth/types.d.ts +1 -0
  82. package/dist/better-auth/utils/createAutumnEndpoint.js +14 -14
  83. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  84. package/dist/better-auth/utils/handleBetterAuthRoute.js +15401 -13523
  85. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  86. package/dist/better-auth/utils/index.js +6764 -4886
  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-VD6pkmpz.d.mts → customer-BE_75FdJ.d.mts} +90 -3
  97. package/dist/react/{customer-CNfSCDv_.d.ts → customer-BLdL9HLU.d.ts} +90 -3
  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-CvGXtKAO.d.mts → list-plans-op-BN1Ppvqj.d.mts} +1 -1
  127. package/dist/react/{list-plans-op-B87IUSZR.d.ts → list-plans-op-CoNYZPKn.d.ts} +1 -1
  128. package/dist/react/{params-BrFcJdeO.d.mts → params-CkhNY_jQ.d.mts} +1 -1
  129. package/dist/react/{params-BwHZca3H.d.ts → params-Cth9VJzj.d.ts} +1 -1
  130. package/dist/react/{plan-DBswUtWr.d.mts → plan-B1xvige-.d.mts} +6 -2
  131. package/dist/react/{plan-DBswUtWr.d.ts → plan-B1xvige-.d.ts} +6 -2
  132. package/dist/sdk/index.d.mts +2664 -344
  133. package/dist/sdk/index.d.ts +2664 -344
  134. package/dist/sdk/index.js +10260 -7737
  135. package/dist/sdk/index.mjs +17279 -14982
  136. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { a as ListPlansList } from '../list-plans-op-CvGXtKAO.mjs';
3
- import { t as ClientListPlansParams } from '../params-BrFcJdeO.mjs';
2
+ import { a as ListPlansList } from '../list-plans-op-BN1Ppvqj.mjs';
3
+ import { t as ClientListPlansParams } from '../params-CkhNY_jQ.mjs';
4
4
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
5
5
  import { HookParams } from './types.mjs';
6
- import '../plan-DBswUtWr.mjs';
6
+ import '../plan-B1xvige-.mjs';
7
7
 
8
8
  type UseListPlansParams = HookParams<ClientListPlansParams, ListPlansList[]>;
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { a as ListPlansList } from '../list-plans-op-B87IUSZR.js';
3
- import { t as ClientListPlansParams } from '../params-BwHZca3H.js';
2
+ import { a as ListPlansList } from '../list-plans-op-CoNYZPKn.js';
3
+ import { t as ClientListPlansParams } from '../params-Cth9VJzj.js';
4
4
  import { AutumnClientError } from '../client/AutumnClientError.js';
5
5
  import { HookParams } from './types.js';
6
- import '../plan-DBswUtWr.js';
6
+ import '../plan-B1xvige-.js';
7
7
 
8
8
  type UseListPlansParams = HookParams<ClientListPlansParams, ListPlansList[]>;
9
9
  /**
@@ -1,6 +1,6 @@
1
- import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BrFcJdeO.mjs';
1
+ import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-CkhNY_jQ.mjs';
2
2
  import { HookParams, HookResultWithMethods } from './types.mjs';
3
- import '../plan-DBswUtWr.mjs';
3
+ import '../plan-B1xvige-.mjs';
4
4
  import '@tanstack/react-query';
5
5
  import '../client/AutumnClientError.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BwHZca3H.js';
1
+ import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-Cth9VJzj.js';
2
2
  import { HookParams, HookResultWithMethods } from './types.js';
3
- import '../plan-DBswUtWr.js';
3
+ import '../plan-B1xvige-.js';
4
4
  import '@tanstack/react-query';
5
5
  import '../client/AutumnClientError.js';
6
6
 
@@ -1,4 +1,4 @@
1
- export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-BrFcJdeO.mjs';
1
+ export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-CkhNY_jQ.mjs';
2
2
  export { useAutumnClient } from './AutumnContext.mjs';
3
3
  export { AutumnProvider, AutumnProviderProps } from './AutumnProvider.mjs';
4
4
  export { AutumnClientConfig, createAutumnClient } from './client/AutumnClient.mjs';
@@ -10,9 +10,9 @@ export { UseEntityParams, UseEntityResult, useEntity } from './hooks/useEntity.m
10
10
  export { UseListEventsParams, useListEvents } from './hooks/useListEvents.mjs';
11
11
  export { UseListPlansParams, useListPlans } from './hooks/useListPlans.mjs';
12
12
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './hooks/useReferrals.mjs';
13
- import './plan-DBswUtWr.mjs';
13
+ import './plan-B1xvige-.mjs';
14
14
  import 'react';
15
- import './customer-VD6pkmpz.mjs';
16
- import './list-plans-op-CvGXtKAO.mjs';
15
+ import './customer-BE_75FdJ.mjs';
16
+ import './list-plans-op-BN1Ppvqj.mjs';
17
17
  import '@tanstack/react-query';
18
18
  import './hooks/types.mjs';
@@ -1,4 +1,4 @@
1
- export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-BwHZca3H.js';
1
+ export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-Cth9VJzj.js';
2
2
  export { useAutumnClient } from './AutumnContext.js';
3
3
  export { AutumnProvider, AutumnProviderProps } from './AutumnProvider.js';
4
4
  export { AutumnClientConfig, createAutumnClient } from './client/AutumnClient.js';
@@ -10,9 +10,9 @@ export { UseEntityParams, UseEntityResult, useEntity } from './hooks/useEntity.j
10
10
  export { UseListEventsParams, useListEvents } from './hooks/useListEvents.js';
11
11
  export { UseListPlansParams, useListPlans } from './hooks/useListPlans.js';
12
12
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './hooks/useReferrals.js';
13
- import './plan-DBswUtWr.js';
13
+ import './plan-B1xvige-.js';
14
14
  import 'react';
15
- import './customer-CNfSCDv_.js';
16
- import './list-plans-op-B87IUSZR.js';
15
+ import './customer-BLdL9HLU.js';
16
+ import './list-plans-op-CoNYZPKn.js';
17
17
  import '@tanstack/react-query';
18
18
  import './hooks/types.js';
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum } from './plan-DBswUtWr.mjs';
1
+ import { O as OpenEnum } from './plan-B1xvige-.mjs';
2
2
 
3
3
  type ListPlansAdditionalCurrency = {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum } from './plan-DBswUtWr.js';
1
+ import { O as OpenEnum } from './plan-B1xvige-.js';
2
2
 
3
3
  type ListPlansAdditionalCurrency = {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-DBswUtWr.mjs';
1
+ import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-B1xvige-.mjs';
2
2
 
3
3
  /**
4
4
  * Time range to aggregate events for. Either range or custom_range must be provided
@@ -1,4 +1,4 @@
1
- import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-DBswUtWr.js';
1
+ import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-B1xvige-.js';
2
2
 
3
3
  /**
4
4
  * Time range to aggregate events for. Either range or custom_range must be provided
@@ -225,6 +225,10 @@ type Breakdown = {
225
225
  expiresAt: number | null;
226
226
  };
227
227
  type BalanceRollover = {
228
+ /**
229
+ * Amount originally rolled over from a previous period, before any of it was consumed.
230
+ */
231
+ granted: number;
228
232
  /**
229
233
  * Amount of balance rolled over from a previous period.
230
234
  */
@@ -1252,7 +1256,7 @@ type PlanVariantDetailsBillingControls = {
1252
1256
  /**
1253
1257
  * The customization that transforms the base plan into this variant.
1254
1258
  */
1255
- type Customize = {
1259
+ type Customize1 = {
1256
1260
  /**
1257
1261
  * Override the base price of the plan. Pass null to remove the base price.
1258
1262
  */
@@ -1285,7 +1289,7 @@ type VariantDetails = {
1285
1289
  /**
1286
1290
  * The customization that transforms the base plan into this variant.
1287
1291
  */
1288
- customize?: Customize | undefined;
1292
+ customize?: Customize1 | undefined;
1289
1293
  };
1290
1294
  /**
1291
1295
  * Miscellaneous plan-level configuration flags.
@@ -225,6 +225,10 @@ type Breakdown = {
225
225
  expiresAt: number | null;
226
226
  };
227
227
  type BalanceRollover = {
228
+ /**
229
+ * Amount originally rolled over from a previous period, before any of it was consumed.
230
+ */
231
+ granted: number;
228
232
  /**
229
233
  * Amount of balance rolled over from a previous period.
230
234
  */
@@ -1252,7 +1256,7 @@ type PlanVariantDetailsBillingControls = {
1252
1256
  /**
1253
1257
  * The customization that transforms the base plan into this variant.
1254
1258
  */
1255
- type Customize = {
1259
+ type Customize1 = {
1256
1260
  /**
1257
1261
  * Override the base price of the plan. Pass null to remove the base price.
1258
1262
  */
@@ -1285,7 +1289,7 @@ type VariantDetails = {
1285
1289
  /**
1286
1290
  * The customization that transforms the base plan into this variant.
1287
1291
  */
1288
- customize?: Customize | undefined;
1292
+ customize?: Customize1 | undefined;
1289
1293
  };
1290
1294
  /**
1291
1295
  * Miscellaneous plan-level configuration flags.