autumn-js 1.2.21 → 1.2.23

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 (117) hide show
  1. package/dist/backend/adapters/express.js +181 -46
  2. package/dist/backend/adapters/express.mjs +9 -9
  3. package/dist/backend/adapters/fetch.js +181 -46
  4. package/dist/backend/adapters/fetch.mjs +9 -9
  5. package/dist/backend/adapters/hono.js +181 -46
  6. package/dist/backend/adapters/hono.mjs +9 -9
  7. package/dist/backend/adapters/index.js +181 -46
  8. package/dist/backend/adapters/index.mjs +12 -12
  9. package/dist/backend/adapters/next.js +181 -46
  10. package/dist/backend/adapters/next.mjs +9 -9
  11. package/dist/backend/{chunk-K2JSUNJX.mjs → chunk-7TQNAVUG.mjs} +1 -1
  12. package/dist/backend/{chunk-TGR2RWLO.mjs → chunk-K2ODGGAT.mjs} +1 -1
  13. package/dist/backend/{chunk-73KXFYFC.mjs → chunk-RKIVVLR3.mjs} +5 -5
  14. package/dist/backend/{chunk-GKYVE5XN.mjs → chunk-T4ZAR3BE.mjs} +143 -31
  15. package/dist/backend/{chunk-5JNYI5HM.mjs → chunk-UFAAJ5IV.mjs} +1 -1
  16. package/dist/backend/{chunk-NSHGFU5H.mjs → chunk-VHEQZSCT.mjs} +38 -15
  17. package/dist/backend/{chunk-H6KJYTJY.mjs → chunk-W5UYBM7S.mjs} +7 -7
  18. package/dist/backend/{chunk-NNIHXZQM.mjs → chunk-ZE23DYSY.mjs} +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  21. package/dist/backend/core/handlers/coreHandler.js +181 -46
  22. package/dist/backend/core/handlers/coreHandler.mjs +7 -7
  23. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  25. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  26. package/dist/backend/core/handlers/handleRouteByName.js +181 -46
  27. package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
  28. package/dist/backend/core/handlers/index.d.mts +1 -1
  29. package/dist/backend/core/handlers/index.d.ts +1 -1
  30. package/dist/backend/core/handlers/index.js +181 -46
  31. package/dist/backend/core/handlers/index.mjs +10 -10
  32. package/dist/backend/core/index.d.mts +1 -1
  33. package/dist/backend/core/index.d.ts +1 -1
  34. package/dist/backend/core/index.js +181 -46
  35. package/dist/backend/core/index.mjs +10 -10
  36. package/dist/backend/core/routes/index.d.mts +1 -1
  37. package/dist/backend/core/routes/index.d.ts +1 -1
  38. package/dist/backend/core/routes/index.js +38 -15
  39. package/dist/backend/core/routes/index.mjs +2 -2
  40. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  41. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  44. package/dist/backend/core/routes/routeConfigs.js +38 -15
  45. package/dist/backend/core/routes/routeConfigs.mjs +2 -2
  46. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  47. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  48. package/dist/backend/core/types/index.d.mts +1 -1
  49. package/dist/backend/core/types/index.d.ts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  51. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  52. package/dist/backend/core/utils/index.mjs +3 -3
  53. package/dist/backend/index.d.mts +2 -2
  54. package/dist/backend/index.d.ts +2 -2
  55. package/dist/backend/index.js +181 -46
  56. package/dist/backend/index.mjs +10 -10
  57. package/dist/backend/{routeTypes-DZFxBYSb.d.mts → routeTypes-BBNqffnK.d.mts} +200 -2
  58. package/dist/backend/{routeTypes-B-Bkse9m.d.ts → routeTypes-D5CxGaFb.d.ts} +200 -2
  59. package/dist/better-auth/{chunk-X6KOCWP3.mjs → chunk-3NU5LQBR.mjs} +38 -15
  60. package/dist/better-auth/{chunk-R35KMMJZ.mjs → chunk-GPZQFANN.mjs} +1 -1
  61. package/dist/better-auth/{chunk-4OLXYKUC.mjs → chunk-VMKPVSFP.mjs} +144 -32
  62. package/dist/better-auth/index.js +181 -46
  63. package/dist/better-auth/index.mjs +3 -3
  64. package/dist/better-auth/utils/createAutumnEndpoint.js +38 -15
  65. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  66. package/dist/better-auth/utils/handleBetterAuthRoute.js +181 -46
  67. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  68. package/dist/better-auth/utils/index.js +181 -46
  69. package/dist/better-auth/utils/index.mjs +3 -3
  70. package/dist/react/AutumnContext.d.mts +3 -3
  71. package/dist/react/AutumnContext.d.ts +3 -3
  72. package/dist/react/client/AutumnClient.d.mts +3 -3
  73. package/dist/react/client/AutumnClient.d.ts +3 -3
  74. package/dist/react/client/IAutumnClient.d.mts +12 -3
  75. package/dist/react/client/IAutumnClient.d.ts +12 -3
  76. package/dist/react/client/index.d.mts +3 -3
  77. package/dist/react/client/index.d.ts +3 -3
  78. package/dist/react/{customer-DjlCjlmM.d.mts → customer-BTYGVzNm.d.mts} +1 -1
  79. package/dist/react/{customer-CzMuZp8W.d.ts → customer-zogPdrbc.d.ts} +1 -1
  80. package/dist/react/hooks/index.d.mts +3 -3
  81. package/dist/react/hooks/index.d.ts +3 -3
  82. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  83. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  84. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  85. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  86. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  87. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  88. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  89. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  90. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  91. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  92. package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
  93. package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
  94. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  95. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  96. package/dist/react/hooks/useCustomer.d.mts +3 -3
  97. package/dist/react/hooks/useCustomer.d.ts +3 -3
  98. package/dist/react/hooks/useEntity.d.mts +2 -2
  99. package/dist/react/hooks/useEntity.d.ts +2 -2
  100. package/dist/react/hooks/useListEvents.d.mts +2 -2
  101. package/dist/react/hooks/useListEvents.d.ts +2 -2
  102. package/dist/react/hooks/useListPlans.d.mts +2 -2
  103. package/dist/react/hooks/useListPlans.d.ts +2 -2
  104. package/dist/react/hooks/useReferrals.d.mts +2 -2
  105. package/dist/react/hooks/useReferrals.d.ts +2 -2
  106. package/dist/react/index.d.mts +3 -3
  107. package/dist/react/index.d.ts +3 -3
  108. package/dist/react/{params-BUQLwLrI.d.mts → params-BWA6FFXs.d.ts} +125 -2
  109. package/dist/react/{params-dYykqsvL.d.ts → params-Es9pSv7h.d.mts} +125 -2
  110. package/dist/react/{plan-DSTBzzTY.d.mts → plan-DYHM9lBi.d.mts} +9 -0
  111. package/dist/react/{plan-DSTBzzTY.d.ts → plan-DYHM9lBi.d.ts} +9 -0
  112. package/dist/sdk/index.d.mts +244 -5
  113. package/dist/sdk/index.d.ts +244 -5
  114. package/dist/sdk/index.js +175 -31
  115. package/dist/sdk/index.mjs +144 -32
  116. package/package.json +1 -1
  117. package/dist/backend/{chunk-S5HPMJ4U.mjs → chunk-55C2WWXQ.mjs} +3 -3
@@ -1,14 +1,14 @@
1
1
  import "../chunk-HIWOK3G6.mjs";
2
2
  import {
3
3
  createAutumnEndpoint
4
- } from "../chunk-R35KMMJZ.mjs";
4
+ } from "../chunk-GPZQFANN.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "../chunk-4OLXYKUC.mjs";
7
+ } from "../chunk-VMKPVSFP.mjs";
8
8
  import {
9
9
  resolveIdentityFromScope
10
10
  } from "../chunk-J2WYVGHS.mjs";
11
- import "../chunk-X6KOCWP3.mjs";
11
+ import "../chunk-3NU5LQBR.mjs";
12
12
  import {
13
13
  getActiveOrganization
14
14
  } from "../chunk-BT3EAYVW.mjs";
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { IAutumnClient } from './client/IAutumnClient.mjs';
3
- import './params-BUQLwLrI.mjs';
4
- import './plan-DSTBzzTY.mjs';
5
- import './customer-DjlCjlmM.mjs';
3
+ import './params-Es9pSv7h.mjs';
4
+ import './plan-DYHM9lBi.mjs';
5
+ import './customer-BTYGVzNm.mjs';
6
6
 
7
7
  type AutumnContextValue = {
8
8
  client: IAutumnClient;
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { IAutumnClient } from './client/IAutumnClient.js';
3
- import './params-dYykqsvL.js';
4
- import './plan-DSTBzzTY.js';
5
- import './customer-CzMuZp8W.js';
3
+ import './params-BWA6FFXs.js';
4
+ import './plan-DYHM9lBi.js';
5
+ import './customer-zogPdrbc.js';
6
6
 
7
7
  type AutumnContextValue = {
8
8
  client: IAutumnClient;
@@ -1,7 +1,7 @@
1
1
  import { IAutumnClient } from './IAutumnClient.mjs';
2
- import '../params-BUQLwLrI.mjs';
3
- import '../plan-DSTBzzTY.mjs';
4
- import '../customer-DjlCjlmM.mjs';
2
+ import '../params-Es9pSv7h.mjs';
3
+ import '../plan-DYHM9lBi.mjs';
4
+ import '../customer-BTYGVzNm.mjs';
5
5
 
6
6
  /** Configuration for Autumn client */
7
7
  type AutumnClientConfig = {
@@ -1,7 +1,7 @@
1
1
  import { IAutumnClient } from './IAutumnClient.js';
2
- import '../params-dYykqsvL.js';
3
- import '../plan-DSTBzzTY.js';
4
- import '../customer-CzMuZp8W.js';
2
+ import '../params-BWA6FFXs.js';
3
+ import '../plan-DYHM9lBi.js';
4
+ import '../customer-zogPdrbc.js';
5
5
 
6
6
  /** Configuration for Autumn client */
7
7
  type AutumnClientConfig = {
@@ -1,6 +1,6 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, v as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, A as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BUQLwLrI.mjs';
2
- import { C as Customer } from '../customer-DjlCjlmM.mjs';
3
- import { O as OpenEnum } from '../plan-DSTBzzTY.mjs';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, v as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, A as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-Es9pSv7h.mjs';
2
+ import { C as Customer } from '../customer-BTYGVzNm.mjs';
3
+ import { O as OpenEnum } from '../plan-DYHM9lBi.mjs';
4
4
 
5
5
  /**
6
6
  * Billing interval (e.g. 'month', 'year').
@@ -292,6 +292,11 @@ declare const ListPlansDurationType: {
292
292
  * Unit of time for the trial duration ('day', 'month', 'year').
293
293
  */
294
294
  type ListPlansDurationType = OpenEnum<typeof ListPlansDurationType>;
295
+ declare const ListPlansOnEnd: {
296
+ readonly Bill: "bill";
297
+ readonly Revert: "revert";
298
+ };
299
+ type ListPlansOnEnd = OpenEnum<typeof ListPlansOnEnd>;
295
300
  /**
296
301
  * Free trial configuration. If set, new customers can try this plan before being charged.
297
302
  */
@@ -308,6 +313,10 @@ type ListPlansFreeTrial = {
308
313
  * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
309
314
  */
310
315
  cardRequired: boolean;
316
+ /**
317
+ * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
318
+ */
319
+ onEnd?: ListPlansOnEnd | null | undefined;
311
320
  };
312
321
  /**
313
322
  * Environment this plan belongs to ('sandbox' or 'live').
@@ -1,6 +1,6 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, v as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, A as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-dYykqsvL.js';
2
- import { C as Customer } from '../customer-CzMuZp8W.js';
3
- import { O as OpenEnum } from '../plan-DSTBzzTY.js';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, v as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, A as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BWA6FFXs.js';
2
+ import { C as Customer } from '../customer-zogPdrbc.js';
3
+ import { O as OpenEnum } from '../plan-DYHM9lBi.js';
4
4
 
5
5
  /**
6
6
  * Billing interval (e.g. 'month', 'year').
@@ -292,6 +292,11 @@ declare const ListPlansDurationType: {
292
292
  * Unit of time for the trial duration ('day', 'month', 'year').
293
293
  */
294
294
  type ListPlansDurationType = OpenEnum<typeof ListPlansDurationType>;
295
+ declare const ListPlansOnEnd: {
296
+ readonly Bill: "bill";
297
+ readonly Revert: "revert";
298
+ };
299
+ type ListPlansOnEnd = OpenEnum<typeof ListPlansOnEnd>;
295
300
  /**
296
301
  * Free trial configuration. If set, new customers can try this plan before being charged.
297
302
  */
@@ -308,6 +313,10 @@ type ListPlansFreeTrial = {
308
313
  * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
309
314
  */
310
315
  cardRequired: boolean;
316
+ /**
317
+ * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
318
+ */
319
+ onEnd?: ListPlansOnEnd | null | undefined;
311
320
  };
312
321
  /**
313
322
  * Environment this plan belongs to ('sandbox' or 'live').
@@ -1,6 +1,6 @@
1
1
  export { AutumnClientConfig, createAutumnClient } from './AutumnClient.mjs';
2
2
  export { AutumnClientError } from './AutumnClientError.mjs';
3
3
  export { IAutumnClient } from './IAutumnClient.mjs';
4
- import '../params-BUQLwLrI.mjs';
5
- import '../plan-DSTBzzTY.mjs';
6
- import '../customer-DjlCjlmM.mjs';
4
+ import '../params-Es9pSv7h.mjs';
5
+ import '../plan-DYHM9lBi.mjs';
6
+ import '../customer-BTYGVzNm.mjs';
@@ -1,6 +1,6 @@
1
1
  export { AutumnClientConfig, createAutumnClient } from './AutumnClient.js';
2
2
  export { AutumnClientError } from './AutumnClientError.js';
3
3
  export { IAutumnClient } from './IAutumnClient.js';
4
- import '../params-dYykqsvL.js';
5
- import '../plan-DSTBzzTY.js';
6
- import '../customer-CzMuZp8W.js';
4
+ import '../params-BWA6FFXs.js';
5
+ import '../plan-DYHM9lBi.js';
6
+ import '../customer-zogPdrbc.js';
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, P as Plan, a as Balance } from './plan-DSTBzzTY.mjs';
1
+ import { O as OpenEnum, P as Plan, a as Balance } from './plan-DYHM9lBi.mjs';
2
2
 
3
3
  /**
4
4
  * The environment this customer was created in.
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, P as Plan, a as Balance } from './plan-DSTBzzTY.js';
1
+ import { O as OpenEnum, P as Plan, a as Balance } from './plan-DYHM9lBi.js';
2
2
 
3
3
  /**
4
4
  * The environment this customer was created in.
@@ -7,6 +7,6 @@ export { UseListPlansParams, useListPlans } from './useListPlans.mjs';
7
7
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './useReferrals.mjs';
8
8
  import '@tanstack/react-query';
9
9
  import '../client/AutumnClientError.mjs';
10
- import '../params-BUQLwLrI.mjs';
11
- import '../plan-DSTBzzTY.mjs';
12
- import '../customer-DjlCjlmM.mjs';
10
+ import '../params-Es9pSv7h.mjs';
11
+ import '../plan-DYHM9lBi.mjs';
12
+ import '../customer-BTYGVzNm.mjs';
@@ -7,6 +7,6 @@ export { UseListPlansParams, useListPlans } from './useListPlans.js';
7
7
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './useReferrals.js';
8
8
  import '@tanstack/react-query';
9
9
  import '../client/AutumnClientError.js';
10
- import '../params-dYykqsvL.js';
11
- import '../plan-DSTBzzTY.js';
12
- import '../customer-CzMuZp8W.js';
10
+ import '../params-BWA6FFXs.js';
11
+ import '../plan-DYHM9lBi.js';
12
+ import '../customer-zogPdrbc.js';
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-DjlCjlmM.mjs';
2
- import '../../../plan-DSTBzzTY.mjs';
1
+ import { C as Customer } from '../../../customer-BTYGVzNm.mjs';
2
+ import '../../../plan-DYHM9lBi.mjs';
3
3
 
4
4
  type CustomerBalance = Customer["balances"][string];
5
5
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-CzMuZp8W.js';
2
- import '../../../plan-DSTBzzTY.js';
1
+ import { C as Customer } from '../../../customer-zogPdrbc.js';
2
+ import '../../../plan-DYHM9lBi.js';
3
3
 
4
4
  type CustomerBalance = Customer["balances"][string];
5
5
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-DjlCjlmM.mjs';
2
- import '../../../plan-DSTBzzTY.mjs';
1
+ import { C as Customer } from '../../../customer-BTYGVzNm.mjs';
2
+ import '../../../plan-DYHM9lBi.mjs';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const customerToFeatures: ({ customer, }: {
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-CzMuZp8W.js';
2
- import '../../../plan-DSTBzzTY.js';
1
+ import { C as Customer } from '../../../customer-zogPdrbc.js';
2
+ import '../../../plan-DYHM9lBi.js';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const customerToFeatures: ({ customer, }: {
@@ -1,5 +1,5 @@
1
- import { B as BalanceFeature } from '../../../plan-DSTBzzTY.mjs';
2
- import { C as Customer } from '../../../customer-DjlCjlmM.mjs';
1
+ import { B as BalanceFeature } from '../../../plan-DYHM9lBi.mjs';
2
+ import { C as Customer } from '../../../customer-BTYGVzNm.mjs';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const findCreditSystemsByFeature: ({ featureId, features, }: {
@@ -1,5 +1,5 @@
1
- import { B as BalanceFeature } from '../../../plan-DSTBzzTY.js';
2
- import { C as Customer } from '../../../customer-CzMuZp8W.js';
1
+ import { B as BalanceFeature } from '../../../plan-DYHM9lBi.js';
2
+ import { C as Customer } from '../../../customer-zogPdrbc.js';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const findCreditSystemsByFeature: ({ featureId, features, }: {
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-DjlCjlmM.mjs';
2
- import '../../../plan-DSTBzzTY.mjs';
1
+ import { C as Customer } from '../../../customer-BTYGVzNm.mjs';
2
+ import '../../../plan-DYHM9lBi.mjs';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const getCreditCost: ({ featureId, creditSystem, amount, }: {
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-CzMuZp8W.js';
2
- import '../../../plan-DSTBzzTY.js';
1
+ import { C as Customer } from '../../../customer-zogPdrbc.js';
2
+ import '../../../plan-DYHM9lBi.js';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const getCreditCost: ({ featureId, creditSystem, amount, }: {
@@ -1,6 +1,6 @@
1
- import { o as ClientCheckParams, s as CheckResponse } from '../../params-BUQLwLrI.mjs';
2
- import { C as Customer } from '../../customer-DjlCjlmM.mjs';
3
- import '../../plan-DSTBzzTY.mjs';
1
+ import { o as ClientCheckParams, s as CheckResponse } from '../../params-Es9pSv7h.mjs';
2
+ import { C as Customer } from '../../customer-BTYGVzNm.mjs';
3
+ import '../../plan-DYHM9lBi.mjs';
4
4
 
5
5
  declare const getLocalCheckResponse: ({ customer, params, }: {
6
6
  customer: Customer | null;
@@ -1,6 +1,6 @@
1
- import { o as ClientCheckParams, s as CheckResponse } from '../../params-dYykqsvL.js';
2
- import { C as Customer } from '../../customer-CzMuZp8W.js';
3
- import '../../plan-DSTBzzTY.js';
1
+ import { o as ClientCheckParams, s as CheckResponse } from '../../params-BWA6FFXs.js';
2
+ import { C as Customer } from '../../customer-zogPdrbc.js';
3
+ import '../../plan-DYHM9lBi.js';
4
4
 
5
5
  declare const getLocalCheckResponse: ({ customer, params, }: {
6
6
  customer: Customer | null;
@@ -1,7 +1,7 @@
1
- import { a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, o as ClientCheckParams, s as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-BUQLwLrI.mjs';
2
- import { C as Customer } from '../../customer-DjlCjlmM.mjs';
1
+ import { a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, o as ClientCheckParams, s as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-Es9pSv7h.mjs';
2
+ import { C as Customer } from '../../customer-BTYGVzNm.mjs';
3
3
  import { IAutumnClient } from '../../client/IAutumnClient.mjs';
4
- import '../../plan-DSTBzzTY.mjs';
4
+ import '../../plan-DYHM9lBi.mjs';
5
5
 
6
6
  declare const useCustomerActions: ({ client, customer, }: {
7
7
  client: IAutumnClient;
@@ -1,7 +1,7 @@
1
- import { a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, o as ClientCheckParams, s as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-dYykqsvL.js';
2
- import { C as Customer } from '../../customer-CzMuZp8W.js';
1
+ import { a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, o as ClientCheckParams, s as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-BWA6FFXs.js';
2
+ import { C as Customer } from '../../customer-zogPdrbc.js';
3
3
  import { IAutumnClient } from '../../client/IAutumnClient.js';
4
- import '../../plan-DSTBzzTY.js';
4
+ import '../../plan-DYHM9lBi.js';
5
5
 
6
6
  declare const useCustomerActions: ({ client, customer, }: {
7
7
  client: IAutumnClient;
@@ -1,8 +1,8 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { C as ClientAggregateEventsParams, A as AggregateEventsResponse, n as AggregateEventsList, T as Total } from '../params-BUQLwLrI.mjs';
2
+ import { C as ClientAggregateEventsParams, A as AggregateEventsResponse, n as AggregateEventsList, T as Total } from '../params-Es9pSv7h.mjs';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
4
4
  import { HookParams } from './types.mjs';
5
- import '../plan-DSTBzzTY.mjs';
5
+ import '../plan-DYHM9lBi.mjs';
6
6
 
7
7
  type UseAggregateEventsParams = HookParams<ClientAggregateEventsParams, AggregateEventsResponse>;
8
8
  declare const useAggregateEvents: (params: UseAggregateEventsParams) => {
@@ -1,8 +1,8 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { C as ClientAggregateEventsParams, A as AggregateEventsResponse, n as AggregateEventsList, T as Total } from '../params-dYykqsvL.js';
2
+ import { C as ClientAggregateEventsParams, A as AggregateEventsResponse, n as AggregateEventsList, T as Total } from '../params-BWA6FFXs.js';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.js';
4
4
  import { HookParams } from './types.js';
5
- import '../plan-DSTBzzTY.js';
5
+ import '../plan-DYHM9lBi.js';
6
6
 
7
7
  type UseAggregateEventsParams = HookParams<ClientAggregateEventsParams, AggregateEventsResponse>;
8
8
  declare const useAggregateEvents: (params: UseAggregateEventsParams) => {
@@ -1,7 +1,7 @@
1
- import { o as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, s as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-BUQLwLrI.mjs';
2
- import { C as Customer } from '../customer-DjlCjlmM.mjs';
1
+ import { o as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, s as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-Es9pSv7h.mjs';
2
+ import { C as Customer } from '../customer-BTYGVzNm.mjs';
3
3
  import { HookParams, HookResultWithMethods } from './types.mjs';
4
- import '../plan-DSTBzzTY.mjs';
4
+ import '../plan-DYHM9lBi.mjs';
5
5
  import '@tanstack/react-query';
6
6
  import '../client/AutumnClientError.mjs';
7
7
 
@@ -1,7 +1,7 @@
1
- import { o as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, s as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-dYykqsvL.js';
2
- import { C as Customer } from '../customer-CzMuZp8W.js';
1
+ import { o as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, p as AttachResponse, h as ClientPreviewAttachParams, q as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, r as PreviewUpdateResponse, s as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, t as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-BWA6FFXs.js';
2
+ import { C as Customer } from '../customer-zogPdrbc.js';
3
3
  import { HookParams, HookResultWithMethods } from './types.js';
4
- import '../plan-DSTBzzTY.js';
4
+ import '../plan-DYHM9lBi.js';
5
5
  import '@tanstack/react-query';
6
6
  import '../client/AutumnClientError.js';
7
7
 
@@ -1,6 +1,6 @@
1
- import { c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BUQLwLrI.mjs';
1
+ import { c as ClientGetEntityParams, G as GetEntityResponse } from '../params-Es9pSv7h.mjs';
2
2
  import { HookParams, HookResult } from './types.mjs';
3
- import '../plan-DSTBzzTY.mjs';
3
+ import '../plan-DYHM9lBi.mjs';
4
4
  import '@tanstack/react-query';
5
5
  import '../client/AutumnClientError.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { c as ClientGetEntityParams, G as GetEntityResponse } from '../params-dYykqsvL.js';
1
+ import { c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BWA6FFXs.js';
2
2
  import { HookParams, HookResult } from './types.js';
3
- import '../plan-DSTBzzTY.js';
3
+ import '../plan-DYHM9lBi.js';
4
4
  import '@tanstack/react-query';
5
5
  import '../client/AutumnClientError.js';
6
6
 
@@ -1,8 +1,8 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { e as ClientListEventsParams, L as ListEventsResponse, u as ListEventsList } from '../params-BUQLwLrI.mjs';
2
+ import { e as ClientListEventsParams, L as ListEventsResponse, u as ListEventsList } from '../params-Es9pSv7h.mjs';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
4
4
  import { HookParams } from './types.mjs';
5
- import '../plan-DSTBzzTY.mjs';
5
+ import '../plan-DYHM9lBi.mjs';
6
6
 
7
7
  type UseListEventsParams = HookParams<ClientListEventsParams, ListEventsResponse>;
8
8
  declare const useListEvents: (params?: UseListEventsParams) => {
@@ -1,8 +1,8 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { e as ClientListEventsParams, L as ListEventsResponse, u as ListEventsList } from '../params-dYykqsvL.js';
2
+ import { e as ClientListEventsParams, L as ListEventsResponse, u as ListEventsList } from '../params-BWA6FFXs.js';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.js';
4
4
  import { HookParams } from './types.js';
5
- import '../plan-DSTBzzTY.js';
5
+ import '../plan-DYHM9lBi.js';
6
6
 
7
7
  type UseListEventsParams = HookParams<ClientListEventsParams, ListEventsResponse>;
8
8
  declare const useListEvents: (params?: UseListEventsParams) => {
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { P as Plan } from '../plan-DSTBzzTY.mjs';
3
- import { v as ClientListPlansParams } from '../params-BUQLwLrI.mjs';
2
+ import { P as Plan } from '../plan-DYHM9lBi.mjs';
3
+ import { v as ClientListPlansParams } from '../params-Es9pSv7h.mjs';
4
4
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
5
5
  import { HookParams } from './types.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { P as Plan } from '../plan-DSTBzzTY.js';
3
- import { v as ClientListPlansParams } from '../params-dYykqsvL.js';
2
+ import { P as Plan } from '../plan-DYHM9lBi.js';
3
+ import { v as ClientListPlansParams } from '../params-BWA6FFXs.js';
4
4
  import { AutumnClientError } from '../client/AutumnClientError.js';
5
5
  import { HookParams } from './types.js';
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BUQLwLrI.mjs';
1
+ import { b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-Es9pSv7h.mjs';
2
2
  import { HookParams, HookResultWithMethods } from './types.mjs';
3
- import '../plan-DSTBzzTY.mjs';
3
+ import '../plan-DYHM9lBi.mjs';
4
4
  import '@tanstack/react-query';
5
5
  import '../client/AutumnClientError.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-dYykqsvL.js';
1
+ import { b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BWA6FFXs.js';
2
2
  import { HookParams, HookResultWithMethods } from './types.js';
3
- import '../plan-DSTBzzTY.js';
3
+ import '../plan-DYHM9lBi.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-BUQLwLrI.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-Es9pSv7h.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-DSTBzzTY.mjs';
13
+ import './plan-DYHM9lBi.mjs';
14
14
  import 'react';
15
15
  import 'react/jsx-runtime';
16
- import './customer-DjlCjlmM.mjs';
16
+ import './customer-BTYGVzNm.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-dYykqsvL.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-BWA6FFXs.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-DSTBzzTY.js';
13
+ import './plan-DYHM9lBi.js';
14
14
  import 'react';
15
15
  import 'react/jsx-runtime';
16
- import './customer-CzMuZp8W.js';
16
+ import './customer-zogPdrbc.js';
17
17
  import '@tanstack/react-query';
18
18
  import './hooks/types.js';