autumn-js 1.2.30 → 1.2.32

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 +2378 -2037
  2. package/dist/backend/adapters/express.mjs +9 -9
  3. package/dist/backend/adapters/fetch.js +2378 -2037
  4. package/dist/backend/adapters/fetch.mjs +9 -9
  5. package/dist/backend/adapters/hono.js +2378 -2037
  6. package/dist/backend/adapters/hono.mjs +9 -9
  7. package/dist/backend/adapters/index.js +2378 -2037
  8. package/dist/backend/adapters/index.mjs +12 -12
  9. package/dist/backend/adapters/next.js +2378 -2037
  10. package/dist/backend/adapters/next.mjs +9 -9
  11. package/dist/backend/{chunk-X3DVYZOC.mjs → chunk-5QIIBIZY.mjs} +7 -7
  12. package/dist/backend/{chunk-MWZDYRO7.mjs → chunk-7MPQ5TCH.mjs} +5 -5
  13. package/dist/backend/{chunk-ECIOGEDC.mjs → chunk-AYS6GLVO.mjs} +1 -1
  14. package/dist/backend/{chunk-TSMOAEQZ.mjs → chunk-MXD3NPQK.mjs} +1 -1
  15. package/dist/backend/{chunk-ILWBT65Y.mjs → chunk-NSAJNDTG.mjs} +1 -1
  16. package/dist/backend/{chunk-N72VCQNK.mjs → chunk-UYURZ75E.mjs} +1 -0
  17. package/dist/backend/{chunk-4D5WTA37.mjs → chunk-W7MG3LB3.mjs} +1 -1
  18. package/dist/backend/{chunk-6H7JNSG4.mjs → chunk-Z7WSDAEZ.mjs} +2377 -2037
  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 +2378 -2037
  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 +2378 -2037
  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 +2378 -2037
  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 +2378 -2037
  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 +1 -0
  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 +1 -0
  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 +2378 -2037
  56. package/dist/backend/index.mjs +10 -10
  57. package/dist/backend/{routeTypes-BZffsFMg.d.ts → routeTypes-ChCnBnee.d.ts} +147 -1
  58. package/dist/backend/{routeTypes-CtouWF41.d.mts → routeTypes-DmFnGvb2.d.mts} +147 -1
  59. package/dist/better-auth/{chunk-R3YUB555.mjs → chunk-56VTK4JS.mjs} +1 -1
  60. package/dist/better-auth/{chunk-NHHBDYNA.mjs → chunk-JBU3OM2O.mjs} +2378 -2038
  61. package/dist/better-auth/{chunk-UOQDNCD2.mjs → chunk-ZQA6B5RX.mjs} +1 -0
  62. package/dist/better-auth/index.js +2378 -2037
  63. package/dist/better-auth/index.mjs +3 -3
  64. package/dist/better-auth/utils/createAutumnEndpoint.js +1 -0
  65. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  66. package/dist/better-auth/utils/handleBetterAuthRoute.js +2378 -2037
  67. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  68. package/dist/better-auth/utils/index.js +2378 -2037
  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 +9 -3
  75. package/dist/react/client/IAutumnClient.d.ts +9 -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-DjiQ6w1e.d.mts → customer-B9DcViyn.d.mts} +1 -1
  79. package/dist/react/{customer-BbU458Gc.d.ts → customer-DbS31iZc.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-B-8mg8Ze.d.mts → params-B8-s4Q1n.d.ts} +1 -1
  109. package/dist/react/{params-Dqm7Np9G.d.ts → params-BquS51Ut.d.mts} +1 -1
  110. package/dist/react/{plan-2RG0aPsm.d.mts → plan-BKltGb1S.d.mts} +6 -0
  111. package/dist/react/{plan-2RG0aPsm.d.ts → plan-BKltGb1S.d.ts} +6 -0
  112. package/dist/sdk/index.d.mts +195 -2
  113. package/dist/sdk/index.d.ts +195 -2
  114. package/dist/sdk/index.js +4572 -4203
  115. package/dist/sdk/index.mjs +4560 -4203
  116. package/package.json +1 -1
  117. package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
@@ -1,14 +1,14 @@
1
1
  import "../chunk-HIWOK3G6.mjs";
2
2
  import {
3
3
  createAutumnEndpoint
4
- } from "../chunk-R3YUB555.mjs";
4
+ } from "../chunk-56VTK4JS.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "../chunk-NHHBDYNA.mjs";
7
+ } from "../chunk-JBU3OM2O.mjs";
8
8
  import {
9
9
  resolveIdentityFromScope
10
10
  } from "../chunk-J2WYVGHS.mjs";
11
- import "../chunk-UOQDNCD2.mjs";
11
+ import "../chunk-ZQA6B5RX.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-B-8mg8Ze.mjs';
4
- import './plan-2RG0aPsm.mjs';
5
- import './customer-DjiQ6w1e.mjs';
3
+ import './params-BquS51Ut.mjs';
4
+ import './plan-BKltGb1S.mjs';
5
+ import './customer-B9DcViyn.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-Dqm7Np9G.js';
4
- import './plan-2RG0aPsm.js';
5
- import './customer-BbU458Gc.js';
3
+ import './params-B8-s4Q1n.js';
4
+ import './plan-BKltGb1S.js';
5
+ import './customer-DbS31iZc.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-B-8mg8Ze.mjs';
3
- import '../plan-2RG0aPsm.mjs';
4
- import '../customer-DjiQ6w1e.mjs';
2
+ import '../params-BquS51Ut.mjs';
3
+ import '../plan-BKltGb1S.mjs';
4
+ import '../customer-B9DcViyn.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-Dqm7Np9G.js';
3
- import '../plan-2RG0aPsm.js';
4
- import '../customer-BbU458Gc.js';
2
+ import '../params-B8-s4Q1n.js';
3
+ import '../plan-BKltGb1S.js';
4
+ import '../customer-DbS31iZc.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, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r 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, s as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-B-8mg8Ze.mjs';
2
- import { C as Customer } from '../customer-DjiQ6w1e.mjs';
3
- import { O as OpenEnum } from '../plan-2RG0aPsm.mjs';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r 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, s as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BquS51Ut.mjs';
2
+ import { C as Customer } from '../customer-B9DcViyn.mjs';
3
+ import { O as OpenEnum } from '../plan-BKltGb1S.mjs';
4
4
 
5
5
  /**
6
6
  * Billing interval (e.g. 'month', 'year').
@@ -455,6 +455,12 @@ type ListPlansList = {
455
455
  * Miscellaneous plan-level configuration flags.
456
456
  */
457
457
  config: ListPlansConfig;
458
+ /**
459
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
460
+ */
461
+ metadata: {
462
+ [k: string]: any;
463
+ };
458
464
  customerEligibility?: ListPlansCustomerEligibility | undefined;
459
465
  };
460
466
  /**
@@ -1,6 +1,6 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r 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, s as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-Dqm7Np9G.js';
2
- import { C as Customer } from '../customer-BbU458Gc.js';
3
- import { O as OpenEnum } from '../plan-2RG0aPsm.js';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r 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, s as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-B8-s4Q1n.js';
2
+ import { C as Customer } from '../customer-DbS31iZc.js';
3
+ import { O as OpenEnum } from '../plan-BKltGb1S.js';
4
4
 
5
5
  /**
6
6
  * Billing interval (e.g. 'month', 'year').
@@ -455,6 +455,12 @@ type ListPlansList = {
455
455
  * Miscellaneous plan-level configuration flags.
456
456
  */
457
457
  config: ListPlansConfig;
458
+ /**
459
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
460
+ */
461
+ metadata: {
462
+ [k: string]: any;
463
+ };
458
464
  customerEligibility?: ListPlansCustomerEligibility | undefined;
459
465
  };
460
466
  /**
@@ -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-B-8mg8Ze.mjs';
5
- import '../plan-2RG0aPsm.mjs';
6
- import '../customer-DjiQ6w1e.mjs';
4
+ import '../params-BquS51Ut.mjs';
5
+ import '../plan-BKltGb1S.mjs';
6
+ import '../customer-B9DcViyn.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-Dqm7Np9G.js';
5
- import '../plan-2RG0aPsm.js';
6
- import '../customer-BbU458Gc.js';
4
+ import '../params-B8-s4Q1n.js';
5
+ import '../plan-BKltGb1S.js';
6
+ import '../customer-DbS31iZc.js';
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, P as Plan, a as Balance } from './plan-2RG0aPsm.mjs';
1
+ import { O as OpenEnum, P as Plan, a as Balance } from './plan-BKltGb1S.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-2RG0aPsm.js';
1
+ import { O as OpenEnum, P as Plan, a as Balance } from './plan-BKltGb1S.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-B-8mg8Ze.mjs';
11
- import '../plan-2RG0aPsm.mjs';
12
- import '../customer-DjiQ6w1e.mjs';
10
+ import '../params-BquS51Ut.mjs';
11
+ import '../plan-BKltGb1S.mjs';
12
+ import '../customer-B9DcViyn.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-Dqm7Np9G.js';
11
- import '../plan-2RG0aPsm.js';
12
- import '../customer-BbU458Gc.js';
10
+ import '../params-B8-s4Q1n.js';
11
+ import '../plan-BKltGb1S.js';
12
+ import '../customer-DbS31iZc.js';
@@ -1,5 +1,5 @@
1
- import { C as Customer } from '../../../customer-DjiQ6w1e.mjs';
2
- import '../../../plan-2RG0aPsm.mjs';
1
+ import { C as Customer } from '../../../customer-B9DcViyn.mjs';
2
+ import '../../../plan-BKltGb1S.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-BbU458Gc.js';
2
- import '../../../plan-2RG0aPsm.js';
1
+ import { C as Customer } from '../../../customer-DbS31iZc.js';
2
+ import '../../../plan-BKltGb1S.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-DjiQ6w1e.mjs';
2
- import '../../../plan-2RG0aPsm.mjs';
1
+ import { C as Customer } from '../../../customer-B9DcViyn.mjs';
2
+ import '../../../plan-BKltGb1S.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-BbU458Gc.js';
2
- import '../../../plan-2RG0aPsm.js';
1
+ import { C as Customer } from '../../../customer-DbS31iZc.js';
2
+ import '../../../plan-BKltGb1S.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-2RG0aPsm.mjs';
2
- import { C as Customer } from '../../../customer-DjiQ6w1e.mjs';
1
+ import { B as BalanceFeature } from '../../../plan-BKltGb1S.mjs';
2
+ import { C as Customer } from '../../../customer-B9DcViyn.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-2RG0aPsm.js';
2
- import { C as Customer } from '../../../customer-BbU458Gc.js';
1
+ import { B as BalanceFeature } from '../../../plan-BKltGb1S.js';
2
+ import { C as Customer } from '../../../customer-DbS31iZc.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-DjiQ6w1e.mjs';
2
- import '../../../plan-2RG0aPsm.mjs';
1
+ import { C as Customer } from '../../../customer-B9DcViyn.mjs';
2
+ import '../../../plan-BKltGb1S.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-BbU458Gc.js';
2
- import '../../../plan-2RG0aPsm.js';
1
+ import { C as Customer } from '../../../customer-DbS31iZc.js';
2
+ import '../../../plan-BKltGb1S.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 { n as ClientCheckParams, o as CheckResponse } from '../../params-B-8mg8Ze.mjs';
2
- import { C as Customer } from '../../customer-DjiQ6w1e.mjs';
3
- import '../../plan-2RG0aPsm.mjs';
1
+ import { n as ClientCheckParams, o as CheckResponse } from '../../params-BquS51Ut.mjs';
2
+ import { C as Customer } from '../../customer-B9DcViyn.mjs';
3
+ import '../../plan-BKltGb1S.mjs';
4
4
 
5
5
  declare const getLocalCheckResponse: ({ customer, params, }: {
6
6
  customer: Customer | null;
@@ -1,6 +1,6 @@
1
- import { n as ClientCheckParams, o as CheckResponse } from '../../params-Dqm7Np9G.js';
2
- import { C as Customer } from '../../customer-BbU458Gc.js';
3
- import '../../plan-2RG0aPsm.js';
1
+ import { n as ClientCheckParams, o as CheckResponse } from '../../params-B8-s4Q1n.js';
2
+ import { C as Customer } from '../../customer-DbS31iZc.js';
3
+ import '../../plan-BKltGb1S.js';
4
4
 
5
5
  declare const getLocalCheckResponse: ({ customer, params, }: {
6
6
  customer: Customer | null;
@@ -1,7 +1,7 @@
1
- import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-B-8mg8Ze.mjs';
2
- import { C as Customer } from '../../customer-DjiQ6w1e.mjs';
1
+ import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-BquS51Ut.mjs';
2
+ import { C as Customer } from '../../customer-B9DcViyn.mjs';
3
3
  import { IAutumnClient } from '../../client/IAutumnClient.mjs';
4
- import '../../plan-2RG0aPsm.mjs';
4
+ import '../../plan-BKltGb1S.mjs';
5
5
 
6
6
  declare const useCustomerActions: ({ client, customer, }: {
7
7
  client: IAutumnClient;
@@ -1,7 +1,7 @@
1
- import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-Dqm7Np9G.js';
2
- import { C as Customer } from '../../customer-BbU458Gc.js';
1
+ import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-B8-s4Q1n.js';
2
+ import { C as Customer } from '../../customer-DbS31iZc.js';
3
3
  import { IAutumnClient } from '../../client/IAutumnClient.js';
4
- import '../../plan-2RG0aPsm.js';
4
+ import '../../plan-BKltGb1S.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, s as AggregateEventsResponse, t as AggregateEventsList, T as Total } from '../params-B-8mg8Ze.mjs';
2
+ import { C as ClientAggregateEventsParams, s as AggregateEventsResponse, t as AggregateEventsList, T as Total } from '../params-BquS51Ut.mjs';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
4
4
  import { HookParams } from './types.mjs';
5
- import '../plan-2RG0aPsm.mjs';
5
+ import '../plan-BKltGb1S.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, s as AggregateEventsResponse, t as AggregateEventsList, T as Total } from '../params-Dqm7Np9G.js';
2
+ import { C as ClientAggregateEventsParams, s as AggregateEventsResponse, t as AggregateEventsList, T as Total } from '../params-B8-s4Q1n.js';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.js';
4
4
  import { HookParams } from './types.js';
5
- import '../plan-2RG0aPsm.js';
5
+ import '../plan-BKltGb1S.js';
6
6
 
7
7
  type UseAggregateEventsParams = HookParams<ClientAggregateEventsParams, AggregateEventsResponse>;
8
8
  declare const useAggregateEvents: (params: UseAggregateEventsParams) => {
@@ -1,7 +1,7 @@
1
- import { n as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, o as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-B-8mg8Ze.mjs';
2
- import { C as Customer } from '../customer-DjiQ6w1e.mjs';
1
+ import { n as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, o as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-BquS51Ut.mjs';
2
+ import { C as Customer } from '../customer-B9DcViyn.mjs';
3
3
  import { HookParams, HookResultWithMethods } from './types.mjs';
4
- import '../plan-2RG0aPsm.mjs';
4
+ import '../plan-BKltGb1S.mjs';
5
5
  import '@tanstack/react-query';
6
6
  import '../client/AutumnClientError.mjs';
7
7
 
@@ -1,7 +1,7 @@
1
- import { n as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, o as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-Dqm7Np9G.js';
2
- import { C as Customer } from '../customer-BbU458Gc.js';
1
+ import { n as ClientCheckParams, d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, o as CheckResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse } from '../params-B8-s4Q1n.js';
2
+ import { C as Customer } from '../customer-DbS31iZc.js';
3
3
  import { HookParams, HookResultWithMethods } from './types.js';
4
- import '../plan-2RG0aPsm.js';
4
+ import '../plan-BKltGb1S.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-B-8mg8Ze.mjs';
1
+ import { c as ClientGetEntityParams, G as GetEntityResponse } from '../params-BquS51Ut.mjs';
2
2
  import { HookParams, HookResult } from './types.mjs';
3
- import '../plan-2RG0aPsm.mjs';
3
+ import '../plan-BKltGb1S.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-Dqm7Np9G.js';
1
+ import { c as ClientGetEntityParams, G as GetEntityResponse } from '../params-B8-s4Q1n.js';
2
2
  import { HookParams, HookResult } from './types.js';
3
- import '../plan-2RG0aPsm.js';
3
+ import '../plan-BKltGb1S.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-B-8mg8Ze.mjs';
2
+ import { e as ClientListEventsParams, L as ListEventsResponse, u as ListEventsList } from '../params-BquS51Ut.mjs';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
4
4
  import { HookParams } from './types.mjs';
5
- import '../plan-2RG0aPsm.mjs';
5
+ import '../plan-BKltGb1S.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-Dqm7Np9G.js';
2
+ import { e as ClientListEventsParams, L as ListEventsResponse, u as ListEventsList } from '../params-B8-s4Q1n.js';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.js';
4
4
  import { HookParams } from './types.js';
5
- import '../plan-2RG0aPsm.js';
5
+ import '../plan-BKltGb1S.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-2RG0aPsm.mjs';
3
- import { v as ClientListPlansParams } from '../params-B-8mg8Ze.mjs';
2
+ import { P as Plan } from '../plan-BKltGb1S.mjs';
3
+ import { v as ClientListPlansParams } from '../params-BquS51Ut.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-2RG0aPsm.js';
3
- import { v as ClientListPlansParams } from '../params-Dqm7Np9G.js';
2
+ import { P as Plan } from '../plan-BKltGb1S.js';
3
+ import { v as ClientListPlansParams } from '../params-B8-s4Q1n.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-B-8mg8Ze.mjs';
1
+ import { b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BquS51Ut.mjs';
2
2
  import { HookParams, HookResultWithMethods } from './types.mjs';
3
- import '../plan-2RG0aPsm.mjs';
3
+ import '../plan-BKltGb1S.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-Dqm7Np9G.js';
1
+ import { b as ClientCreateReferralCodeParams, w as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-B8-s4Q1n.js';
2
2
  import { HookParams, HookResultWithMethods } from './types.js';
3
- import '../plan-2RG0aPsm.js';
3
+ import '../plan-BKltGb1S.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-B-8mg8Ze.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-BquS51Ut.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,8 +10,8 @@ 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-2RG0aPsm.mjs';
13
+ import './plan-BKltGb1S.mjs';
14
14
  import 'react';
15
- import './customer-DjiQ6w1e.mjs';
15
+ import './customer-B9DcViyn.mjs';
16
16
  import '@tanstack/react-query';
17
17
  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-Dqm7Np9G.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-B8-s4Q1n.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,8 +10,8 @@ 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-2RG0aPsm.js';
13
+ import './plan-BKltGb1S.js';
14
14
  import 'react';
15
- import './customer-BbU458Gc.js';
15
+ import './customer-DbS31iZc.js';
16
16
  import '@tanstack/react-query';
17
17
  import './hooks/types.js';
@@ -1,4 +1,4 @@
1
- import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-2RG0aPsm.mjs';
1
+ import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-BKltGb1S.js';
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-2RG0aPsm.js';
1
+ import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-BKltGb1S.mjs';
2
2
 
3
3
  /**
4
4
  * Time range to aggregate events for. Either range or custom_range must be provided
@@ -731,6 +731,12 @@ type Plan = {
731
731
  * Miscellaneous plan-level configuration flags.
732
732
  */
733
733
  config: PlanConfig;
734
+ /**
735
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
736
+ */
737
+ metadata: {
738
+ [k: string]: any;
739
+ };
734
740
  customerEligibility?: CustomerEligibility | undefined;
735
741
  };
736
742
 
@@ -731,6 +731,12 @@ type Plan = {
731
731
  * Miscellaneous plan-level configuration flags.
732
732
  */
733
733
  config: PlanConfig;
734
+ /**
735
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
736
+ */
737
+ metadata: {
738
+ [k: string]: any;
739
+ };
734
740
  customerEligibility?: CustomerEligibility | undefined;
735
741
  };
736
742