autumn-js 0.1.5 → 0.1.6

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 (131) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +36 -76
  2. package/dist/libraries/backend/better-auth.d.ts +36 -76
  3. package/dist/libraries/backend/better-auth.js +15 -13
  4. package/dist/libraries/backend/better-auth.mjs +16 -14
  5. package/dist/libraries/backend/express.d.mts +1 -1
  6. package/dist/libraries/backend/express.d.ts +1 -1
  7. package/dist/libraries/backend/index.d.mts +1 -1
  8. package/dist/libraries/backend/index.d.ts +1 -1
  9. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  10. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  11. package/dist/libraries/react/AutumnContext.d.mts +6 -6
  12. package/dist/libraries/react/AutumnContext.d.ts +6 -6
  13. package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
  14. package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
  15. package/dist/libraries/react/{ReactAutumnClient-DM5ZRTfX.d.ts → ReactAutumnClient-CK8k8OA5.d.ts} +17 -17
  16. package/dist/libraries/react/{ReactAutumnClient-BHjd9Tw5.d.mts → ReactAutumnClient-CjaZ_g4X.d.mts} +17 -17
  17. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
  18. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
  19. package/dist/libraries/react/{attachTypes-Bz1_JTvk.d.ts → attachTypes-BetWkt95.d.ts} +5 -5
  20. package/dist/libraries/react/{attachTypes-C9FJTCo6.d.mts → attachTypes-DbI59BLC.d.mts} +5 -5
  21. package/dist/libraries/react/{chunk-EXK6MS5M.mjs → chunk-7PFOXY3Y.mjs} +449 -451
  22. package/dist/libraries/react/{chunk-5K2M3CQZ.mjs → chunk-FEISQQNM.mjs} +1 -1
  23. package/dist/libraries/react/{chunk-BXMZYHE7.mjs → chunk-FJWZPMWU.mjs} +3 -3
  24. package/dist/libraries/react/{chunk-WT5K3J2K.mjs → chunk-I2A7PK2L.mjs} +17 -17
  25. package/dist/libraries/react/{chunk-YCDNQZT5.mjs → chunk-JGDTNJTR.mjs} +2 -2
  26. package/dist/libraries/react/{chunk-M7SUFZ42.mjs → chunk-KUS3X33V.mjs} +1 -1
  27. package/dist/libraries/react/{chunk-2TQBFCWM.mjs → chunk-OTZ65PCT.mjs} +4 -4
  28. package/dist/libraries/react/{chunk-NHDZWWMZ.mjs → chunk-YWQTQ72B.mjs} +2 -2
  29. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
  30. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
  31. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
  32. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
  33. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
  34. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
  35. package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
  36. package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
  37. package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
  38. package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
  39. package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
  40. package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
  41. package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
  42. package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
  43. package/dist/libraries/react/client/types/clientAttachTypes.d.mts +20 -20
  44. package/dist/libraries/react/client/types/clientAttachTypes.d.ts +20 -20
  45. package/dist/libraries/react/client/types/clientGenTypes.d.mts +4 -4
  46. package/dist/libraries/react/client/types/clientGenTypes.d.ts +4 -4
  47. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +2 -2
  48. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +2 -2
  49. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +15 -15
  50. package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +2 -2
  51. package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +2 -2
  52. package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.mts +1 -1
  53. package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.ts +1 -1
  54. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +15 -15
  55. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
  56. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
  57. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  58. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  59. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +15 -15
  60. package/dist/libraries/react/components/ui/accordion.mjs +3 -3
  61. package/dist/libraries/react/components/ui/button.d.mts +1 -1
  62. package/dist/libraries/react/components/ui/button.d.ts +1 -1
  63. package/dist/libraries/react/components/ui/dialog.mjs +4 -4
  64. package/dist/libraries/react/components/ui/popover.mjs +5 -5
  65. package/dist/libraries/react/components/ui/switch.mjs +3 -3
  66. package/dist/libraries/react/{cusTypes-yJ0fSxbq.d.ts → cusTypes-D5d_cu-K.d.ts} +5 -5
  67. package/dist/libraries/react/{cusTypes-DT-gAUL9.d.mts → cusTypes-DINgmPwV.d.mts} +5 -5
  68. package/dist/libraries/react/{entTypes-BPdjCunj.d.ts → entTypes-DNW_l3s0.d.ts} +1 -1
  69. package/dist/libraries/react/{entTypes-D79XPrxo.d.mts → entTypes-biskqmpT.d.mts} +1 -1
  70. package/dist/libraries/react/{genTypes-BV-Jc6Q1.d.mts → genTypes-DSvR32on.d.mts} +5 -5
  71. package/dist/libraries/react/{genTypes-DJUAkD36.d.ts → genTypes-EyxQImzh.d.ts} +5 -5
  72. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
  73. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
  74. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +7 -7
  75. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +7 -7
  76. package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
  77. package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
  78. package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
  79. package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
  80. package/dist/libraries/react/hooks/useCustomerBase.d.mts +6 -6
  81. package/dist/libraries/react/hooks/useCustomerBase.d.ts +6 -6
  82. package/dist/libraries/react/hooks/useEntity.d.mts +6 -6
  83. package/dist/libraries/react/hooks/useEntity.d.ts +6 -6
  84. package/dist/libraries/react/hooks/useEntityBase.d.mts +8 -8
  85. package/dist/libraries/react/hooks/useEntityBase.d.ts +8 -8
  86. package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
  87. package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
  88. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  89. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  90. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
  91. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
  92. package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
  93. package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
  94. package/dist/next/client/NextAutumnClient.d.mts +6 -6
  95. package/dist/next/client/NextAutumnClient.d.ts +6 -6
  96. package/dist/next/client/NextAutumnProvider.d.mts +1 -1
  97. package/dist/next/client/NextAutumnProvider.d.ts +1 -1
  98. package/dist/next/client/clientUtils.d.mts +2 -2
  99. package/dist/next/client/clientUtils.d.ts +2 -2
  100. package/dist/next/client/{entTypes-mOI7WnPZ.d.mts → entTypes-CHHBdhBK.d.mts} +1 -1
  101. package/dist/next/client/{entTypes-BAD1NMvb.d.ts → entTypes-vjIG3B1G.d.ts} +1 -1
  102. package/dist/next/client/hooks/useAutumn.d.mts +3 -3
  103. package/dist/next/client/hooks/useAutumn.d.ts +3 -3
  104. package/dist/next/client/hooks/useCustomer.d.mts +4 -4
  105. package/dist/next/client/hooks/useCustomer.d.ts +4 -4
  106. package/dist/next/client/hooks/useEntity.d.mts +3 -3
  107. package/dist/next/client/hooks/useEntity.d.ts +3 -3
  108. package/dist/next/client/types.d.mts +2 -2
  109. package/dist/next/client/types.d.ts +2 -2
  110. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  111. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  112. package/dist/next/server/componentActions.d.mts +1 -1
  113. package/dist/next/server/componentActions.d.ts +1 -1
  114. package/dist/next/server/cusActions.d.mts +15 -15
  115. package/dist/next/server/cusActions.d.ts +15 -15
  116. package/dist/next/server/genActions.d.mts +1 -1
  117. package/dist/next/server/genActions.d.ts +1 -1
  118. package/package.json +1 -1
  119. package/dist/libraries/backend/{referralTypes-Djyi4iGt.d.ts → referralTypes-B0_fYSI3.d.ts} +41 -41
  120. package/dist/libraries/backend/{referralTypes-BfrNJ62q.d.mts → referralTypes-CYvuZZeF.d.mts} +41 -41
  121. package/dist/libraries/react/{chunk-KWNH6C27.mjs → chunk-7TYAAD2T.mjs} +11 -11
  122. package/dist/libraries/react/{prodTypes-2tlu9Pyz.d.mts → prodTypes-Bmoibf-M.d.mts} +4 -4
  123. package/dist/libraries/react/{prodTypes-2tlu9Pyz.d.ts → prodTypes-Bmoibf-M.d.ts} +4 -4
  124. package/dist/next/client/{attachTypes-9VCTaz0m.d.mts → attachTypes-DZFtFEmv.d.mts} +2 -2
  125. package/dist/next/client/{attachTypes-DLxEa_Wj.d.ts → attachTypes-DxJ0LCjT.d.ts} +2 -2
  126. package/dist/next/client/{clientAttachTypes-umadXlvp.d.ts → clientAttachTypes-BXtfXB4v.d.ts} +2 -2
  127. package/dist/next/client/{clientAttachTypes-BzsPgggN.d.mts → clientAttachTypes-qsdoMt_B.d.mts} +2 -2
  128. package/dist/next/client/{cusTypes-CYojUJSJ.d.ts → cusTypes-BHYpk8bK.d.ts} +2 -2
  129. package/dist/next/client/{cusTypes-CIGvysWL.d.mts → cusTypes-Q54uLNO5.d.mts} +2 -2
  130. package/dist/next/server/{cusTypes-DgoOZMIt.d.mts → cusTypes-D38IpLCT.d.mts} +4 -4
  131. package/dist/next/server/{cusTypes-DgoOZMIt.d.ts → cusTypes-D38IpLCT.d.ts} +4 -4
@@ -1,7 +1,7 @@
1
- import { R as Result, a as AutumnPromise, C as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, Q as QueryResult, A as AttachParams, c as CancelParams, d as CancelResult, g as CheckParams, T as TrackParams, b as TrackResult } from './clientAttachTypes-umadXlvp.js';
2
- import { C as CheckoutResult, A as AttachResult } from './attachTypes-DLxEa_Wj.js';
3
- import { C as CustomerData, e as CreateCustomerParams, a as Customer, B as BillingPortalResult } from './cusTypes-CYojUJSJ.js';
4
- import { E as Entity, D as DeleteEntityResult } from './entTypes-BAD1NMvb.js';
1
+ import { R as Result, a as AutumnPromise, C as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, Q as QueryResult, A as AttachParams, c as CancelParams, d as CancelResult, g as CheckParams, T as TrackParams, b as TrackResult } from './clientAttachTypes-BXtfXB4v.js';
2
+ import { C as CheckoutResult, A as AttachResult } from './attachTypes-DxJ0LCjT.js';
3
+ import { C as CustomerData, e as CreateCustomerParams, a as Customer, B as BillingPortalResult } from './cusTypes-BHYpk8bK.js';
4
+ import { E as Entity, D as DeleteEntityResult } from './entTypes-vjIG3B1G.js';
5
5
  import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.js';
6
6
  import { A as AutumnError } from './error-DHbclCVh.js';
7
7
  import { P as ProductItem, c as ProductScenario, a as Product } from './prodTypes-CxvB1YY3.js';
@@ -80,9 +80,9 @@ declare class AutumnClient {
80
80
  reward?: string | undefined;
81
81
  checkoutSessionParams?: Record<string, any> | undefined;
82
82
  }) => AutumnPromise<{
83
+ customer_id: string;
83
84
  code: string;
84
85
  message: string;
85
- customer_id: string;
86
86
  product_ids: string[];
87
87
  checkout_url?: string | undefined;
88
88
  customer_data?: any;
@@ -128,9 +128,9 @@ declare class AutumnClient {
128
128
  eventName?: string | undefined;
129
129
  idempotencyKey?: string | undefined;
130
130
  }) => AutumnPromise<{
131
- code: string;
132
131
  id: string;
133
132
  customer_id: string;
133
+ code: string;
134
134
  feature_id?: string | undefined;
135
135
  event_name?: string | undefined;
136
136
  }>;
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CustomerData } from './cusTypes-CIGvysWL.mjs';
2
+ import { C as CustomerData } from './cusTypes-Q54uLNO5.mjs';
3
3
  import './prodTypes-CxvB1YY3.mjs';
4
4
  import 'zod';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CustomerData } from './cusTypes-CYojUJSJ.js';
2
+ import { C as CustomerData } from './cusTypes-BHYpk8bK.js';
3
3
  import './prodTypes-CxvB1YY3.js';
4
4
  import 'zod';
5
5
 
@@ -1,8 +1,8 @@
1
1
  import { AutumnClientError, PricingTableProduct } from './types.mjs';
2
- import './cusTypes-CIGvysWL.mjs';
2
+ import './cusTypes-Q54uLNO5.mjs';
3
3
  import './prodTypes-CxvB1YY3.mjs';
4
4
  import 'zod';
5
- import './entTypes-mOI7WnPZ.mjs';
5
+ import './entTypes-CHHBdhBK.mjs';
6
6
 
7
7
  declare const toClientErrorResponse: (error: any) => {
8
8
  data: null;
@@ -1,8 +1,8 @@
1
1
  import { AutumnClientError, PricingTableProduct } from './types.js';
2
- import './cusTypes-CYojUJSJ.js';
2
+ import './cusTypes-BHYpk8bK.js';
3
3
  import './prodTypes-CxvB1YY3.js';
4
4
  import 'zod';
5
- import './entTypes-BAD1NMvb.js';
5
+ import './entTypes-vjIG3B1G.js';
6
6
 
7
7
  declare const toClientErrorResponse: (error: any) => {
8
8
  data: null;
@@ -1,4 +1,4 @@
1
- import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-CIGvysWL.mjs';
1
+ import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-Q54uLNO5.mjs';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -1,4 +1,4 @@
1
- import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-CYojUJSJ.js';
1
+ import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-BHYpk8bK.js';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -1,7 +1,7 @@
1
- import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-BzsPgggN.mjs';
1
+ import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-qsdoMt_B.mjs';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
- import { C as CheckoutResult } from '../attachTypes-9VCTaz0m.mjs';
4
- import { B as BillingPortalResult } from '../cusTypes-CIGvysWL.mjs';
3
+ import { C as CheckoutResult } from '../attachTypes-DZFtFEmv.mjs';
4
+ import { B as BillingPortalResult } from '../cusTypes-Q54uLNO5.mjs';
5
5
  import '../prodTypes-CxvB1YY3.mjs';
6
6
  import 'zod';
7
7
 
@@ -1,7 +1,7 @@
1
- import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-umadXlvp.js';
1
+ import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-BXtfXB4v.js';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.js';
3
- import { C as CheckoutResult } from '../attachTypes-DLxEa_Wj.js';
4
- import { B as BillingPortalResult } from '../cusTypes-CYojUJSJ.js';
3
+ import { C as CheckoutResult } from '../attachTypes-DxJ0LCjT.js';
4
+ import { B as BillingPortalResult } from '../cusTypes-BHYpk8bK.js';
5
5
  import '../prodTypes-CxvB1YY3.js';
6
6
  import 'zod';
7
7
 
@@ -1,8 +1,8 @@
1
1
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
2
- import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-BzsPgggN.mjs';
3
- import { A as AttachResult, C as CheckoutResult } from '../attachTypes-9VCTaz0m.mjs';
4
- import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CIGvysWL.mjs';
5
- import { E as Entity } from '../entTypes-mOI7WnPZ.mjs';
2
+ import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-qsdoMt_B.mjs';
3
+ import { A as AttachResult, C as CheckoutResult } from '../attachTypes-DZFtFEmv.mjs';
4
+ import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-Q54uLNO5.mjs';
5
+ import { E as Entity } from '../entTypes-CHHBdhBK.mjs';
6
6
  import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.mjs';
7
7
  import { z } from 'zod';
8
8
  import { SWRConfiguration } from 'swr';
@@ -1,8 +1,8 @@
1
1
  import { A as AutumnError } from '../error-DHbclCVh.js';
2
- import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-umadXlvp.js';
3
- import { A as AttachResult, C as CheckoutResult } from '../attachTypes-DLxEa_Wj.js';
4
- import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CYojUJSJ.js';
5
- import { E as Entity } from '../entTypes-BAD1NMvb.js';
2
+ import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-BXtfXB4v.js';
3
+ import { A as AttachResult, C as CheckoutResult } from '../attachTypes-DxJ0LCjT.js';
4
+ import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-BHYpk8bK.js';
5
+ import { E as Entity } from '../entTypes-vjIG3B1G.js';
6
6
  import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.js';
7
7
  import { z } from 'zod';
8
8
  import { SWRConfiguration } from 'swr';
@@ -1,10 +1,10 @@
1
- import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-BzsPgggN.mjs';
1
+ import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-qsdoMt_B.mjs';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
- import { G as GetEntityParams, E as Entity } from '../entTypes-mOI7WnPZ.mjs';
3
+ import { G as GetEntityParams, E as Entity } from '../entTypes-CHHBdhBK.mjs';
4
4
  import * as swr from 'swr';
5
5
  import '../prodTypes-CxvB1YY3.mjs';
6
6
  import 'zod';
7
- import '../cusTypes-CIGvysWL.mjs';
7
+ import '../cusTypes-Q54uLNO5.mjs';
8
8
 
9
9
  declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
10
10
  entity: Entity | null;
@@ -1,10 +1,10 @@
1
- import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-umadXlvp.js';
1
+ import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-BXtfXB4v.js';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.js';
3
- import { G as GetEntityParams, E as Entity } from '../entTypes-BAD1NMvb.js';
3
+ import { G as GetEntityParams, E as Entity } from '../entTypes-vjIG3B1G.js';
4
4
  import * as swr from 'swr';
5
5
  import '../prodTypes-CxvB1YY3.js';
6
6
  import 'zod';
7
- import '../cusTypes-CYojUJSJ.js';
7
+ import '../cusTypes-BHYpk8bK.js';
8
8
 
9
9
  declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
10
10
  entity: Entity | null;
@@ -1,5 +1,5 @@
1
- import { C as CustomerData, a as Customer } from './cusTypes-CIGvysWL.mjs';
2
- import { E as Entity } from './entTypes-mOI7WnPZ.mjs';
1
+ import { C as CustomerData, a as Customer } from './cusTypes-Q54uLNO5.mjs';
2
+ import { E as Entity } from './entTypes-CHHBdhBK.mjs';
3
3
  import './prodTypes-CxvB1YY3.mjs';
4
4
  import 'zod';
5
5
 
@@ -1,5 +1,5 @@
1
- import { C as CustomerData, a as Customer } from './cusTypes-CYojUJSJ.js';
2
- import { E as Entity } from './entTypes-BAD1NMvb.js';
1
+ import { C as CustomerData, a as Customer } from './cusTypes-BHYpk8bK.js';
2
+ import { E as Entity } from './entTypes-vjIG3B1G.js';
3
3
  import './prodTypes-CxvB1YY3.js';
4
4
  import 'zod';
5
5
 
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from '../cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData } from '../cusTypes-D38IpLCT.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const withAuth: <T extends {
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from '../cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData } from '../cusTypes-D38IpLCT.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const withAuth: <T extends {
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from './cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData } from './cusTypes-D38IpLCT.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const getPricingTableAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from './cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData } from './cusTypes-D38IpLCT.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const getPricingTableAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-D38IpLCT.mjs';
2
2
  import { z } from 'zod';
3
3
  import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
4
4
 
@@ -30,18 +30,18 @@ declare const TrackParamsSchema: z.ZodObject<{
30
30
  entity_data: z.ZodOptional<z.ZodAny>;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  customer_id: string;
33
- value?: number | undefined;
34
33
  feature_id?: string | undefined;
35
34
  entity_id?: string | undefined;
35
+ value?: number | undefined;
36
36
  customer_data?: any;
37
37
  entity_data?: any;
38
38
  event_name?: string | undefined;
39
39
  idempotency_key?: string | undefined;
40
40
  }, {
41
41
  customer_id: string;
42
- value?: number | undefined;
43
42
  feature_id?: string | undefined;
44
43
  entity_id?: string | undefined;
44
+ value?: number | undefined;
45
45
  customer_data?: any;
46
46
  entity_data?: any;
47
47
  event_name?: string | undefined;
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
121
121
  feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
122
122
  range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- customer_id: string;
125
124
  feature_id: string | string[];
125
+ customer_id: string;
126
126
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
127
127
  }, {
128
- customer_id: string;
129
128
  feature_id: string | string[];
129
+ customer_id: string;
130
130
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
131
131
  }>;
132
132
  type QueryParams = z.infer<typeof QueryParamsSchema>;
@@ -186,11 +186,11 @@ declare const AttachParamsSchema: z.ZodObject<{
186
186
  reward: z.ZodOptional<z.ZodString>;
187
187
  }, "strip", z.ZodTypeAny, {
188
188
  customer_id: string;
189
+ entity_id?: string | undefined;
189
190
  options?: {
190
191
  feature_id: string;
191
192
  quantity: number;
192
193
  }[] | undefined;
193
- entity_id?: string | undefined;
194
194
  metadata?: Record<string, string> | undefined;
195
195
  product_id?: string | undefined;
196
196
  product_ids?: string[] | undefined;
@@ -207,11 +207,11 @@ declare const AttachParamsSchema: z.ZodObject<{
207
207
  reward?: string | undefined;
208
208
  }, {
209
209
  customer_id: string;
210
+ entity_id?: string | undefined;
210
211
  options?: {
211
212
  feature_id: string;
212
213
  quantity: number;
213
214
  }[] | undefined;
214
- entity_id?: string | undefined;
215
215
  metadata?: Record<string, string> | undefined;
216
216
  product_id?: string | undefined;
217
217
  product_ids?: string[] | undefined;
@@ -262,11 +262,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
262
262
  }, "strip", z.ZodTypeAny, {
263
263
  customer_id: string;
264
264
  product_id: string;
265
+ entity_id?: string | undefined;
265
266
  options?: {
266
267
  feature_id: string;
267
268
  quantity: number;
268
269
  }[] | undefined;
269
- entity_id?: string | undefined;
270
270
  success_url?: string | undefined;
271
271
  customer_data?: {
272
272
  name?: string | null | undefined;
@@ -279,11 +279,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
279
279
  }, {
280
280
  customer_id: string;
281
281
  product_id: string;
282
+ entity_id?: string | undefined;
282
283
  options?: {
283
284
  feature_id: string;
284
285
  quantity: number;
285
286
  }[] | undefined;
286
- entity_id?: string | undefined;
287
287
  success_url?: string | undefined;
288
288
  customer_data?: {
289
289
  name?: string | null | undefined;
@@ -385,18 +385,18 @@ declare class Autumn {
385
385
  static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
386
386
  checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
387
387
  static attach: (params: AttachParams) => Promise<Result<{
388
+ customer_id: string;
388
389
  code: string;
389
390
  message: string;
390
- customer_id: string;
391
391
  product_ids: string[];
392
392
  customer_data?: any;
393
393
  checkout_url?: string | undefined;
394
394
  }, AutumnError>>;
395
395
  static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
396
396
  attach(params: AttachParams): Promise<Result<{
397
+ customer_id: string;
397
398
  code: string;
398
399
  message: string;
399
- customer_id: string;
400
400
  product_ids: string[];
401
401
  customer_data?: any;
402
402
  checkout_url?: string | undefined;
@@ -416,15 +416,15 @@ declare class Autumn {
416
416
  static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
417
417
  check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
418
418
  static track: (params: TrackParams) => Promise<Result<{
419
- code: string;
420
419
  customer_id: string;
420
+ code: string;
421
421
  id: string;
422
422
  feature_id?: string | undefined;
423
423
  event_name?: string | undefined;
424
424
  }, AutumnError>>;
425
425
  track(params: TrackParams): Promise<Result<{
426
- code: string;
427
426
  customer_id: string;
427
+ code: string;
428
428
  id: string;
429
429
  feature_id?: string | undefined;
430
430
  event_name?: string | undefined;
@@ -494,11 +494,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
494
494
  code: z.ZodString;
495
495
  customer_id: z.ZodString;
496
496
  }, "strip", z.ZodTypeAny, {
497
- code: string;
498
497
  customer_id: string;
499
- }, {
500
498
  code: string;
499
+ }, {
501
500
  customer_id: string;
501
+ code: string;
502
502
  }>;
503
503
  type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
504
504
 
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-D38IpLCT.js';
2
2
  import { z } from 'zod';
3
3
  import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
4
4
 
@@ -30,18 +30,18 @@ declare const TrackParamsSchema: z.ZodObject<{
30
30
  entity_data: z.ZodOptional<z.ZodAny>;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  customer_id: string;
33
- value?: number | undefined;
34
33
  feature_id?: string | undefined;
35
34
  entity_id?: string | undefined;
35
+ value?: number | undefined;
36
36
  customer_data?: any;
37
37
  entity_data?: any;
38
38
  event_name?: string | undefined;
39
39
  idempotency_key?: string | undefined;
40
40
  }, {
41
41
  customer_id: string;
42
- value?: number | undefined;
43
42
  feature_id?: string | undefined;
44
43
  entity_id?: string | undefined;
44
+ value?: number | undefined;
45
45
  customer_data?: any;
46
46
  entity_data?: any;
47
47
  event_name?: string | undefined;
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
121
121
  feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
122
122
  range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- customer_id: string;
125
124
  feature_id: string | string[];
125
+ customer_id: string;
126
126
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
127
127
  }, {
128
- customer_id: string;
129
128
  feature_id: string | string[];
129
+ customer_id: string;
130
130
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
131
131
  }>;
132
132
  type QueryParams = z.infer<typeof QueryParamsSchema>;
@@ -186,11 +186,11 @@ declare const AttachParamsSchema: z.ZodObject<{
186
186
  reward: z.ZodOptional<z.ZodString>;
187
187
  }, "strip", z.ZodTypeAny, {
188
188
  customer_id: string;
189
+ entity_id?: string | undefined;
189
190
  options?: {
190
191
  feature_id: string;
191
192
  quantity: number;
192
193
  }[] | undefined;
193
- entity_id?: string | undefined;
194
194
  metadata?: Record<string, string> | undefined;
195
195
  product_id?: string | undefined;
196
196
  product_ids?: string[] | undefined;
@@ -207,11 +207,11 @@ declare const AttachParamsSchema: z.ZodObject<{
207
207
  reward?: string | undefined;
208
208
  }, {
209
209
  customer_id: string;
210
+ entity_id?: string | undefined;
210
211
  options?: {
211
212
  feature_id: string;
212
213
  quantity: number;
213
214
  }[] | undefined;
214
- entity_id?: string | undefined;
215
215
  metadata?: Record<string, string> | undefined;
216
216
  product_id?: string | undefined;
217
217
  product_ids?: string[] | undefined;
@@ -262,11 +262,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
262
262
  }, "strip", z.ZodTypeAny, {
263
263
  customer_id: string;
264
264
  product_id: string;
265
+ entity_id?: string | undefined;
265
266
  options?: {
266
267
  feature_id: string;
267
268
  quantity: number;
268
269
  }[] | undefined;
269
- entity_id?: string | undefined;
270
270
  success_url?: string | undefined;
271
271
  customer_data?: {
272
272
  name?: string | null | undefined;
@@ -279,11 +279,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
279
279
  }, {
280
280
  customer_id: string;
281
281
  product_id: string;
282
+ entity_id?: string | undefined;
282
283
  options?: {
283
284
  feature_id: string;
284
285
  quantity: number;
285
286
  }[] | undefined;
286
- entity_id?: string | undefined;
287
287
  success_url?: string | undefined;
288
288
  customer_data?: {
289
289
  name?: string | null | undefined;
@@ -385,18 +385,18 @@ declare class Autumn {
385
385
  static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
386
386
  checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
387
387
  static attach: (params: AttachParams) => Promise<Result<{
388
+ customer_id: string;
388
389
  code: string;
389
390
  message: string;
390
- customer_id: string;
391
391
  product_ids: string[];
392
392
  customer_data?: any;
393
393
  checkout_url?: string | undefined;
394
394
  }, AutumnError>>;
395
395
  static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
396
396
  attach(params: AttachParams): Promise<Result<{
397
+ customer_id: string;
397
398
  code: string;
398
399
  message: string;
399
- customer_id: string;
400
400
  product_ids: string[];
401
401
  customer_data?: any;
402
402
  checkout_url?: string | undefined;
@@ -416,15 +416,15 @@ declare class Autumn {
416
416
  static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
417
417
  check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
418
418
  static track: (params: TrackParams) => Promise<Result<{
419
- code: string;
420
419
  customer_id: string;
420
+ code: string;
421
421
  id: string;
422
422
  feature_id?: string | undefined;
423
423
  event_name?: string | undefined;
424
424
  }, AutumnError>>;
425
425
  track(params: TrackParams): Promise<Result<{
426
- code: string;
427
426
  customer_id: string;
427
+ code: string;
428
428
  id: string;
429
429
  feature_id?: string | undefined;
430
430
  event_name?: string | undefined;
@@ -494,11 +494,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
494
494
  code: z.ZodString;
495
495
  customer_id: z.ZodString;
496
496
  }, "strip", z.ZodTypeAny, {
497
- code: string;
498
497
  customer_id: string;
499
- }, {
500
498
  code: string;
499
+ }, {
501
500
  customer_id: string;
501
+ code: string;
502
502
  }>;
503
503
  type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
504
504
 
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, B as BillingPortalParams } from './cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData, B as BillingPortalParams } from './cusTypes-D38IpLCT.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const attachAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, B as BillingPortalParams } from './cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData, B as BillingPortalParams } from './cusTypes-D38IpLCT.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const attachAction: (args: Omit<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autumn-js",
3
3
  "description": "Autumn JS Library",
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "main": "./dist/sdk/index.js",
6
6
  "files": [
7
7
  "dist",