autumn-js 0.0.95 → 0.0.98

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 (164) hide show
  1. package/dist/compose/index.d.mts +201 -0
  2. package/dist/compose/index.d.ts +201 -0
  3. package/dist/compose/index.js +147 -0
  4. package/dist/compose/index.mjs +113 -0
  5. package/dist/libraries/backend/better-auth.d.mts +21 -20
  6. package/dist/libraries/backend/better-auth.d.ts +21 -20
  7. package/dist/libraries/backend/better-auth.js +26 -21
  8. package/dist/libraries/backend/better-auth.mjs +27 -22
  9. package/dist/libraries/backend/express.d.mts +1 -1
  10. package/dist/libraries/backend/express.d.ts +1 -1
  11. package/dist/libraries/backend/next.js +94 -94
  12. package/dist/libraries/backend/next.mjs +94 -94
  13. package/dist/libraries/backend/{referralTypes-HAk2vTns.d.ts → referralTypes-D1Q2i3mG.d.ts} +28 -27
  14. package/dist/libraries/backend/{referralTypes-Dg9pRvI7.d.mts → referralTypes-Dfg6if8j.d.mts} +28 -27
  15. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  16. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  17. package/dist/libraries/react/AutumnContext.d.mts +4 -4
  18. package/dist/libraries/react/AutumnContext.d.ts +4 -4
  19. package/dist/libraries/react/AutumnContext.mjs +7 -7
  20. package/dist/libraries/react/BaseAutumnProvider.d.mts +4 -4
  21. package/dist/libraries/react/BaseAutumnProvider.d.ts +4 -4
  22. package/dist/libraries/react/BaseAutumnProvider.mjs +12 -12
  23. package/dist/libraries/react/{ReactAutumnClient-k0qbHX8f.d.ts → ReactAutumnClient-ByV3ry6X.d.ts} +10 -10
  24. package/dist/libraries/react/{ReactAutumnClient-BuSRDMJN.d.mts → ReactAutumnClient-Ce34XSNp.d.mts} +10 -10
  25. package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
  26. package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
  27. package/dist/libraries/react/ReactAutumnProvider.mjs +13 -13
  28. package/dist/libraries/react/{chunk-27OTS3Q5.mjs → chunk-6MNYJ3YQ.mjs} +2 -2
  29. package/dist/libraries/react/{chunk-6CJ3FB74.mjs → chunk-7J5WGHDK.mjs} +2 -2
  30. package/dist/libraries/react/{chunk-DVMVIAZE.mjs → chunk-AISYLQU5.mjs} +1 -1
  31. package/dist/libraries/react/{chunk-P2O4LZFD.mjs → chunk-AL3VJLFU.mjs} +1 -1
  32. package/dist/libraries/react/{chunk-T5PIJ4HG.mjs → chunk-BJRHW2WP.mjs} +2 -2
  33. package/dist/libraries/react/{chunk-MZDRIPNS.mjs → chunk-BQUVIPG4.mjs} +2 -2
  34. package/dist/libraries/react/{chunk-5FZ7IV6P.mjs → chunk-BSF3KB4R.mjs} +46 -46
  35. package/dist/libraries/react/{chunk-CAMHARUX.mjs → chunk-FGNNWWBD.mjs} +2 -2
  36. package/dist/libraries/react/{chunk-G3FBFZLU.mjs → chunk-IJFGEGR2.mjs} +1 -1
  37. package/dist/libraries/react/{chunk-FPI3PLEL.mjs → chunk-OAPUYXBO.mjs} +6 -6
  38. package/dist/libraries/react/{chunk-CMO5LYYU.mjs → chunk-OAWFFAKA.mjs} +6 -6
  39. package/dist/libraries/react/{chunk-5G3DYUNT.mjs → chunk-RURBN53D.mjs} +1 -1
  40. package/dist/libraries/react/{chunk-LVDONEVF.mjs → chunk-SA4NOOHV.mjs} +2 -2
  41. package/dist/libraries/react/{chunk-AOJCMXVS.mjs → chunk-TKHPR5VW.mjs} +3 -3
  42. package/dist/libraries/react/{chunk-APDR7D6A.mjs → chunk-XSJQQSUT.mjs} +2 -2
  43. package/dist/libraries/react/{chunk-R4BYOLST.mjs → chunk-ZFOSCZKA.mjs} +2 -2
  44. package/dist/libraries/react/{chunk-CHXNYNH3.mjs → chunk-ZQ5HNM6O.mjs} +12 -12
  45. package/dist/libraries/react/{chunk-FEFGYFXQ.mjs → chunk-ZVQKDPUP.mjs} +3 -3
  46. package/dist/libraries/react/client/ReactAutumnClient.d.mts +4 -4
  47. package/dist/libraries/react/client/ReactAutumnClient.d.ts +4 -4
  48. package/dist/libraries/react/client/ReactAutumnClient.mjs +6 -6
  49. package/dist/libraries/react/client/clientCompMethods.d.mts +4 -4
  50. package/dist/libraries/react/client/clientCompMethods.d.ts +4 -4
  51. package/dist/libraries/react/client/clientCusMethods.d.mts +4 -4
  52. package/dist/libraries/react/client/clientCusMethods.d.ts +4 -4
  53. package/dist/libraries/react/client/clientEntityMethods.d.mts +4 -4
  54. package/dist/libraries/react/client/clientEntityMethods.d.ts +4 -4
  55. package/dist/libraries/react/client/clientGenMethods.d.mts +4 -4
  56. package/dist/libraries/react/client/clientGenMethods.d.ts +4 -4
  57. package/dist/libraries/react/client/clientProdMethods.d.mts +4 -4
  58. package/dist/libraries/react/client/clientProdMethods.d.ts +4 -4
  59. package/dist/libraries/react/client/clientReferralMethods.d.mts +4 -4
  60. package/dist/libraries/react/client/clientReferralMethods.d.ts +4 -4
  61. package/dist/libraries/react/client/types/clientGenTypes.d.mts +12 -12
  62. package/dist/libraries/react/client/types/clientGenTypes.d.ts +12 -12
  63. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
  64. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
  65. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +55 -55
  66. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +26 -26
  67. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
  68. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
  69. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
  70. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
  71. package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +50 -50
  72. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +5 -5
  73. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
  74. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
  75. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  76. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  77. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +55 -55
  78. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +26 -26
  79. package/dist/libraries/react/components/ui/button.js +3 -3
  80. package/dist/libraries/react/components/ui/button.mjs +2 -2
  81. package/dist/libraries/react/components/ui/dialog.js +49 -49
  82. package/dist/libraries/react/components/ui/dialog.mjs +3 -3
  83. package/dist/libraries/react/components/ui/switch.js +12 -12
  84. package/dist/libraries/react/components/ui/switch.mjs +3 -3
  85. package/dist/libraries/react/{cusTypes-Vw94kPR9.d.ts → cusTypes-cFcAuKk6.d.mts} +2 -1
  86. package/dist/libraries/react/{cusTypes-Vw94kPR9.d.mts → cusTypes-cFcAuKk6.d.ts} +2 -1
  87. package/dist/libraries/react/{entTypes-B7nuhHD7.d.ts → entTypes-DPu6Efi2.d.ts} +1 -1
  88. package/dist/libraries/react/{entTypes-Ho-VocKG.d.mts → entTypes-S-Yuznzg.d.mts} +1 -1
  89. package/dist/libraries/react/hooks/handleAllowed.d.mts +2 -2
  90. package/dist/libraries/react/hooks/handleAllowed.d.ts +2 -2
  91. package/dist/libraries/react/hooks/useAutumn.d.mts +2 -2
  92. package/dist/libraries/react/hooks/useAutumn.d.ts +2 -2
  93. package/dist/libraries/react/hooks/useAutumn.mjs +10 -10
  94. package/dist/libraries/react/hooks/useAutumnBase.d.mts +4 -4
  95. package/dist/libraries/react/hooks/useAutumnBase.d.ts +4 -4
  96. package/dist/libraries/react/hooks/useAutumnBase.mjs +9 -9
  97. package/dist/libraries/react/hooks/useCustomer.d.mts +4 -4
  98. package/dist/libraries/react/hooks/useCustomer.d.ts +4 -4
  99. package/dist/libraries/react/hooks/useCustomer.mjs +11 -11
  100. package/dist/libraries/react/hooks/useCustomerBase.d.mts +4 -4
  101. package/dist/libraries/react/hooks/useCustomerBase.d.ts +4 -4
  102. package/dist/libraries/react/hooks/useCustomerBase.mjs +10 -10
  103. package/dist/libraries/react/hooks/useEntity.d.mts +3 -3
  104. package/dist/libraries/react/hooks/useEntity.d.ts +3 -3
  105. package/dist/libraries/react/hooks/useEntity.mjs +11 -11
  106. package/dist/libraries/react/hooks/useEntityBase.d.mts +4 -4
  107. package/dist/libraries/react/hooks/useEntityBase.d.ts +4 -4
  108. package/dist/libraries/react/hooks/useEntityBase.mjs +10 -10
  109. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  110. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  111. package/dist/libraries/react/hooks/usePricingTable.mjs +9 -9
  112. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +4 -4
  113. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +4 -4
  114. package/dist/libraries/react/hooks/usePricingTableBase.mjs +8 -8
  115. package/dist/libraries/react/hooks/useProductsBase.mjs +7 -7
  116. package/dist/libraries/react/index.d.mts +1 -0
  117. package/dist/libraries/react/index.d.ts +1 -0
  118. package/dist/libraries/react/index.js +55 -55
  119. package/dist/libraries/react/index.mjs +55 -55
  120. package/dist/libraries/react/{response-CQf3mDB8.d.ts → response-BDOGqtuI.d.ts} +8 -8
  121. package/dist/libraries/react/{response-CWluLfIs.d.mts → response-R1MWYZiA.d.mts} +8 -8
  122. package/dist/next/{AutumnProvider-CCYZC_bN.d.mts → AutumnProvider-Xl1mqxls.d.mts} +1 -0
  123. package/dist/next/{AutumnProvider-CCYZC_bN.d.ts → AutumnProvider-Xl1mqxls.d.ts} +1 -0
  124. package/dist/next/AutumnProvider.d.mts +1 -1
  125. package/dist/next/AutumnProvider.d.ts +1 -1
  126. package/dist/next/client/NextAutumnClient.d.mts +3 -3
  127. package/dist/next/client/NextAutumnClient.d.ts +3 -3
  128. package/dist/next/client/NextAutumnProvider.d.mts +1 -1
  129. package/dist/next/client/NextAutumnProvider.d.ts +1 -1
  130. package/dist/next/client/{clientGenTypes-CxB4go6q.d.ts → clientGenTypes-B_LCNkd5.d.ts} +1 -1
  131. package/dist/next/client/{clientGenTypes-9ngy1q97.d.mts → clientGenTypes-BwevGhcx.d.mts} +1 -1
  132. package/dist/next/client/clientUtils.d.mts +2 -2
  133. package/dist/next/client/clientUtils.d.ts +2 -2
  134. package/dist/next/client/{cusTypes-D8lhXGaX.d.mts → cusTypes-Gh2wfcmj.d.mts} +1 -0
  135. package/dist/next/client/{cusTypes-D8lhXGaX.d.ts → cusTypes-Gh2wfcmj.d.ts} +1 -0
  136. package/dist/next/client/{entTypes-Dq2mbehl.d.ts → entTypes-B_w6I3y-.d.ts} +1 -1
  137. package/dist/next/client/{entTypes-B-2_9hzP.d.mts → entTypes-C_xS1VPE.d.mts} +1 -1
  138. package/dist/next/client/hooks/useAutumn.d.mts +2 -2
  139. package/dist/next/client/hooks/useAutumn.d.ts +2 -2
  140. package/dist/next/client/hooks/useCustomer.d.mts +3 -3
  141. package/dist/next/client/hooks/useCustomer.d.ts +3 -3
  142. package/dist/next/client/hooks/useEntity.d.mts +3 -3
  143. package/dist/next/client/hooks/useEntity.d.ts +3 -3
  144. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  145. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  146. package/dist/next/client/types.d.mts +2 -2
  147. package/dist/next/client/types.d.ts +2 -2
  148. package/dist/next/index.d.mts +2 -2
  149. package/dist/next/index.d.ts +2 -2
  150. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  151. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  152. package/dist/next/server/componentActions.d.mts +1 -1
  153. package/dist/next/server/componentActions.d.ts +1 -1
  154. package/dist/next/server/cusActions.d.mts +21 -21
  155. package/dist/next/server/cusActions.d.ts +21 -21
  156. package/dist/next/server/{cusTypes-Cy72qmFx.d.mts → cusTypes-B8u88Vfq.d.mts} +3 -2
  157. package/dist/next/server/{cusTypes-Cy72qmFx.d.ts → cusTypes-B8u88Vfq.d.ts} +3 -2
  158. package/dist/next/server/genActions.d.mts +1 -1
  159. package/dist/next/server/genActions.d.ts +1 -1
  160. package/dist/sdk/index.d.mts +1 -0
  161. package/dist/sdk/index.d.ts +1 -0
  162. package/package.json +19 -6
  163. package/tsup.config.ts +12 -3
  164. package/dist/libraries/react/{chunk-ALFXUHDD.mjs → chunk-QRI2TNR7.mjs} +15 -15
@@ -1,7 +1,7 @@
1
1
  import { AutumnClientError, PricingTableProduct } from './types.mjs';
2
- import './cusTypes-D8lhXGaX.mjs';
2
+ import './cusTypes-Gh2wfcmj.mjs';
3
3
  import 'zod';
4
- import './entTypes-B-2_9hzP.mjs';
4
+ import './entTypes-C_xS1VPE.mjs';
5
5
 
6
6
  declare const toClientErrorResponse: (error: any) => {
7
7
  data: null;
@@ -1,7 +1,7 @@
1
1
  import { AutumnClientError, PricingTableProduct } from './types.js';
2
- import './cusTypes-D8lhXGaX.js';
2
+ import './cusTypes-Gh2wfcmj.js';
3
3
  import 'zod';
4
- import './entTypes-Dq2mbehl.js';
4
+ import './entTypes-B_w6I3y-.js';
5
5
 
6
6
  declare const toClientErrorResponse: (error: any) => {
7
7
  data: null;
@@ -180,6 +180,7 @@ interface CustomerProduct {
180
180
  status: ProductStatus;
181
181
  started_at: number;
182
182
  canceled_at: number | null;
183
+ version: number;
183
184
  subscription_ids?: string[] | null;
184
185
  current_period_start?: number | null;
185
186
  current_period_end?: number | null;
@@ -180,6 +180,7 @@ interface CustomerProduct {
180
180
  status: ProductStatus;
181
181
  started_at: number;
182
182
  canceled_at: number | null;
183
+ version: number;
183
184
  subscription_ids?: string[] | null;
184
185
  current_period_start?: number | null;
185
186
  current_period_end?: number | null;
@@ -1,4 +1,4 @@
1
- import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-D8lhXGaX.js';
1
+ import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-Gh2wfcmj.js';
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-D8lhXGaX.mjs';
1
+ import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-Gh2wfcmj.mjs';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -1,5 +1,5 @@
1
- import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-9ngy1q97.mjs';
2
- import { B as BillingPortalResult } from '../cusTypes-D8lhXGaX.mjs';
1
+ import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-BwevGhcx.mjs';
2
+ import { B as BillingPortalResult } from '../cusTypes-Gh2wfcmj.mjs';
3
3
  import 'zod';
4
4
  import '../error-DHbclCVh.mjs';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
- import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-CxB4go6q.js';
2
- import { B as BillingPortalResult } from '../cusTypes-D8lhXGaX.js';
1
+ import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-B_LCNkd5.js';
2
+ import { B as BillingPortalResult } from '../cusTypes-Gh2wfcmj.js';
3
3
  import 'zod';
4
4
  import '../error-DHbclCVh.js';
5
5
  import 'react';
@@ -1,7 +1,7 @@
1
1
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
2
- import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-9ngy1q97.mjs';
3
- import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-D8lhXGaX.mjs';
4
- import { E as Entity } from '../entTypes-B-2_9hzP.mjs';
2
+ import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-BwevGhcx.mjs';
3
+ import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-Gh2wfcmj.mjs';
4
+ import { E as Entity } from '../entTypes-C_xS1VPE.mjs';
5
5
  import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.mjs';
6
6
  import { z } from 'zod';
7
7
  import { SWRConfiguration } from 'swr';
@@ -1,7 +1,7 @@
1
1
  import { A as AutumnError } from '../error-DHbclCVh.js';
2
- import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-CxB4go6q.js';
3
- import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-D8lhXGaX.js';
4
- import { E as Entity } from '../entTypes-Dq2mbehl.js';
2
+ import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-B_LCNkd5.js';
3
+ import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-Gh2wfcmj.js';
4
+ import { E as Entity } from '../entTypes-B_w6I3y-.js';
5
5
  import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.js';
6
6
  import { z } from 'zod';
7
7
  import { SWRConfiguration } from 'swr';
@@ -1,8 +1,8 @@
1
- import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, T as TrackParams } from '../clientGenTypes-9ngy1q97.mjs';
2
- import { G as GetEntityParams, E as Entity } from '../entTypes-B-2_9hzP.mjs';
1
+ import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, T as TrackParams } from '../clientGenTypes-BwevGhcx.mjs';
2
+ import { G as GetEntityParams, E as Entity } from '../entTypes-C_xS1VPE.mjs';
3
3
  import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.mjs';
4
4
  import * as swr from 'swr';
5
- import '../cusTypes-D8lhXGaX.mjs';
5
+ import '../cusTypes-Gh2wfcmj.mjs';
6
6
  import 'zod';
7
7
  import '../error-DHbclCVh.mjs';
8
8
  import 'react';
@@ -1,8 +1,8 @@
1
- import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, T as TrackParams } from '../clientGenTypes-CxB4go6q.js';
2
- import { G as GetEntityParams, E as Entity } from '../entTypes-Dq2mbehl.js';
1
+ import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, T as TrackParams } from '../clientGenTypes-B_LCNkd5.js';
2
+ import { G as GetEntityParams, E as Entity } from '../entTypes-B_w6I3y-.js';
3
3
  import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.js';
4
4
  import * as swr from 'swr';
5
- import '../cusTypes-D8lhXGaX.js';
5
+ import '../cusTypes-Gh2wfcmj.js';
6
6
  import 'zod';
7
7
  import '../error-DHbclCVh.js';
8
8
  import 'react';
@@ -1,6 +1,6 @@
1
1
  import * as swr from 'swr';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
- import { P as Product } from '../cusTypes-D8lhXGaX.mjs';
3
+ import { P as Product } from '../cusTypes-Gh2wfcmj.mjs';
4
4
  import 'zod';
5
5
 
6
6
  interface ProductDetails {
@@ -1,6 +1,6 @@
1
1
  import * as swr from 'swr';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.js';
3
- import { P as Product } from '../cusTypes-D8lhXGaX.js';
3
+ import { P as Product } from '../cusTypes-Gh2wfcmj.js';
4
4
  import 'zod';
5
5
 
6
6
  interface ProductDetails {
@@ -1,5 +1,5 @@
1
- import { C as CustomerData, a as Customer } from './cusTypes-D8lhXGaX.mjs';
2
- import { E as Entity } from './entTypes-B-2_9hzP.mjs';
1
+ import { C as CustomerData, a as Customer } from './cusTypes-Gh2wfcmj.mjs';
2
+ import { E as Entity } from './entTypes-C_xS1VPE.mjs';
3
3
  import 'zod';
4
4
 
5
5
  interface ProductDetails {
@@ -1,5 +1,5 @@
1
- import { C as CustomerData, a as Customer } from './cusTypes-D8lhXGaX.js';
2
- import { E as Entity } from './entTypes-Dq2mbehl.js';
1
+ import { C as CustomerData, a as Customer } from './cusTypes-Gh2wfcmj.js';
2
+ import { E as Entity } from './entTypes-B_w6I3y-.js';
3
3
  import 'zod';
4
4
 
5
5
  interface ProductDetails {
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-CCYZC_bN.mjs';
3
- export { A as AutumnProvider } from './AutumnProvider-CCYZC_bN.mjs';
2
+ import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-Xl1mqxls.mjs';
3
+ export { A as AutumnProvider } from './AutumnProvider-Xl1mqxls.mjs';
4
4
  import { z } from 'zod';
5
5
  import * as swr from 'swr';
6
6
  import { SWRConfiguration } from 'swr';
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-CCYZC_bN.js';
3
- export { A as AutumnProvider } from './AutumnProvider-CCYZC_bN.js';
2
+ import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-Xl1mqxls.js';
3
+ export { A as AutumnProvider } from './AutumnProvider-Xl1mqxls.js';
4
4
  import { z } from 'zod';
5
5
  import * as swr from 'swr';
6
6
  import { SWRConfiguration } from 'swr';
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from '../cusTypes-Cy72qmFx.mjs';
1
+ import { C as CustomerData } from '../cusTypes-B8u88Vfq.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-Cy72qmFx.js';
1
+ import { C as CustomerData } from '../cusTypes-B8u88Vfq.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-Cy72qmFx.mjs';
1
+ import { C as CustomerData } from './cusTypes-B8u88Vfq.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-Cy72qmFx.js';
1
+ import { C as CustomerData } from './cusTypes-B8u88Vfq.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, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-Cy72qmFx.mjs';
1
+ import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-B8u88Vfq.mjs';
2
2
  import { z } from 'zod';
3
3
  import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
4
4
 
@@ -27,12 +27,12 @@ declare const AttachParamsSchema: z.ZodObject<{
27
27
  reward: z.ZodOptional<z.ZodString>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  customer_id: string;
30
- entity_id?: string | undefined;
31
30
  options?: {
32
31
  feature_id: string;
33
32
  quantity: number;
34
33
  }[] | undefined;
35
34
  metadata?: Record<string, string> | undefined;
35
+ entity_id?: string | undefined;
36
36
  product_id?: string | undefined;
37
37
  product_ids?: string[] | undefined;
38
38
  free_trial?: boolean | undefined;
@@ -44,12 +44,12 @@ declare const AttachParamsSchema: z.ZodObject<{
44
44
  reward?: string | undefined;
45
45
  }, {
46
46
  customer_id: string;
47
- entity_id?: string | undefined;
48
47
  options?: {
49
48
  feature_id: string;
50
49
  quantity: number;
51
50
  }[] | undefined;
52
51
  metadata?: Record<string, string> | undefined;
52
+ entity_id?: string | undefined;
53
53
  product_id?: string | undefined;
54
54
  product_ids?: string[] | undefined;
55
55
  free_trial?: boolean | undefined;
@@ -89,18 +89,18 @@ declare const TrackParamsSchema: z.ZodObject<{
89
89
  entity_data: z.ZodOptional<z.ZodAny>;
90
90
  }, "strip", z.ZodTypeAny, {
91
91
  customer_id: string;
92
- feature_id?: string | undefined;
93
- entity_id?: string | undefined;
94
92
  value?: number | undefined;
93
+ entity_id?: string | undefined;
94
+ feature_id?: string | undefined;
95
95
  customer_data?: any;
96
96
  entity_data?: any;
97
97
  event_name?: string | undefined;
98
98
  idempotency_key?: string | undefined;
99
99
  }, {
100
100
  customer_id: string;
101
- feature_id?: string | undefined;
102
- entity_id?: string | undefined;
103
101
  value?: number | undefined;
102
+ entity_id?: string | undefined;
103
+ feature_id?: string | undefined;
104
104
  customer_data?: any;
105
105
  entity_data?: any;
106
106
  event_name?: string | undefined;
@@ -128,8 +128,8 @@ declare const CheckParamsSchema: z.ZodObject<{
128
128
  }>>;
129
129
  }, "strip", z.ZodTypeAny, {
130
130
  customer_id: string;
131
- feature_id?: string | undefined;
132
131
  entity_id?: string | undefined;
132
+ feature_id?: string | undefined;
133
133
  required_balance?: number | undefined;
134
134
  product_id?: string | undefined;
135
135
  customer_data?: any;
@@ -141,8 +141,8 @@ declare const CheckParamsSchema: z.ZodObject<{
141
141
  with_preview?: boolean | undefined;
142
142
  }, {
143
143
  customer_id: string;
144
- feature_id?: string | undefined;
145
144
  entity_id?: string | undefined;
145
+ feature_id?: string | undefined;
146
146
  required_balance?: number | undefined;
147
147
  product_id?: string | undefined;
148
148
  customer_data?: any;
@@ -240,18 +240,18 @@ declare class Autumn {
240
240
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
241
241
  };
242
242
  static attach: (params: AttachParams) => Promise<Result<{
243
- customer_id: string;
244
243
  code: string;
245
244
  message: string;
245
+ customer_id: string;
246
246
  product_ids: string[];
247
247
  customer_data?: any;
248
248
  checkout_url?: string | undefined;
249
249
  }, AutumnError>>;
250
250
  static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
251
251
  attach(params: AttachParams): Promise<Result<{
252
- customer_id: string;
253
252
  code: string;
254
253
  message: string;
254
+ customer_id: string;
255
255
  product_ids: string[];
256
256
  customer_data?: any;
257
257
  checkout_url?: string | undefined;
@@ -285,9 +285,9 @@ declare class Autumn {
285
285
  * Please use the new track() method instead.
286
286
  */
287
287
  static event: (params: TrackParams) => Promise<Result<{
288
- customer_id: string;
289
- code: string;
290
288
  id: string;
289
+ code: string;
290
+ customer_id: string;
291
291
  feature_id?: string | undefined;
292
292
  event_name?: string | undefined;
293
293
  }, AutumnError>>;
@@ -296,23 +296,23 @@ declare class Autumn {
296
296
  * Please use the new track() method instead.
297
297
  */
298
298
  event(params: TrackParams): Promise<Result<{
299
- customer_id: string;
300
- code: string;
301
299
  id: string;
300
+ code: string;
301
+ customer_id: string;
302
302
  feature_id?: string | undefined;
303
303
  event_name?: string | undefined;
304
304
  }, AutumnError>>;
305
305
  static track: (params: TrackParams) => Promise<Result<{
306
- customer_id: string;
307
- code: string;
308
306
  id: string;
307
+ code: string;
308
+ customer_id: string;
309
309
  feature_id?: string | undefined;
310
310
  event_name?: string | undefined;
311
311
  }, AutumnError>>;
312
312
  track(params: TrackParams): Promise<Result<{
313
- customer_id: string;
314
- code: string;
315
313
  id: string;
314
+ code: string;
315
+ customer_id: string;
316
316
  feature_id?: string | undefined;
317
317
  event_name?: string | undefined;
318
318
  }, AutumnError>>;
@@ -362,11 +362,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
362
362
  code: z.ZodString;
363
363
  customer_id: z.ZodString;
364
364
  }, "strip", z.ZodTypeAny, {
365
- customer_id: string;
366
365
  code: string;
367
- }, {
368
366
  customer_id: string;
367
+ }, {
369
368
  code: string;
369
+ customer_id: string;
370
370
  }>;
371
371
  type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
372
372
 
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-Cy72qmFx.js';
1
+ import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-B8u88Vfq.js';
2
2
  import { z } from 'zod';
3
3
  import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
4
4
 
@@ -27,12 +27,12 @@ declare const AttachParamsSchema: z.ZodObject<{
27
27
  reward: z.ZodOptional<z.ZodString>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  customer_id: string;
30
- entity_id?: string | undefined;
31
30
  options?: {
32
31
  feature_id: string;
33
32
  quantity: number;
34
33
  }[] | undefined;
35
34
  metadata?: Record<string, string> | undefined;
35
+ entity_id?: string | undefined;
36
36
  product_id?: string | undefined;
37
37
  product_ids?: string[] | undefined;
38
38
  free_trial?: boolean | undefined;
@@ -44,12 +44,12 @@ declare const AttachParamsSchema: z.ZodObject<{
44
44
  reward?: string | undefined;
45
45
  }, {
46
46
  customer_id: string;
47
- entity_id?: string | undefined;
48
47
  options?: {
49
48
  feature_id: string;
50
49
  quantity: number;
51
50
  }[] | undefined;
52
51
  metadata?: Record<string, string> | undefined;
52
+ entity_id?: string | undefined;
53
53
  product_id?: string | undefined;
54
54
  product_ids?: string[] | undefined;
55
55
  free_trial?: boolean | undefined;
@@ -89,18 +89,18 @@ declare const TrackParamsSchema: z.ZodObject<{
89
89
  entity_data: z.ZodOptional<z.ZodAny>;
90
90
  }, "strip", z.ZodTypeAny, {
91
91
  customer_id: string;
92
- feature_id?: string | undefined;
93
- entity_id?: string | undefined;
94
92
  value?: number | undefined;
93
+ entity_id?: string | undefined;
94
+ feature_id?: string | undefined;
95
95
  customer_data?: any;
96
96
  entity_data?: any;
97
97
  event_name?: string | undefined;
98
98
  idempotency_key?: string | undefined;
99
99
  }, {
100
100
  customer_id: string;
101
- feature_id?: string | undefined;
102
- entity_id?: string | undefined;
103
101
  value?: number | undefined;
102
+ entity_id?: string | undefined;
103
+ feature_id?: string | undefined;
104
104
  customer_data?: any;
105
105
  entity_data?: any;
106
106
  event_name?: string | undefined;
@@ -128,8 +128,8 @@ declare const CheckParamsSchema: z.ZodObject<{
128
128
  }>>;
129
129
  }, "strip", z.ZodTypeAny, {
130
130
  customer_id: string;
131
- feature_id?: string | undefined;
132
131
  entity_id?: string | undefined;
132
+ feature_id?: string | undefined;
133
133
  required_balance?: number | undefined;
134
134
  product_id?: string | undefined;
135
135
  customer_data?: any;
@@ -141,8 +141,8 @@ declare const CheckParamsSchema: z.ZodObject<{
141
141
  with_preview?: boolean | undefined;
142
142
  }, {
143
143
  customer_id: string;
144
- feature_id?: string | undefined;
145
144
  entity_id?: string | undefined;
145
+ feature_id?: string | undefined;
146
146
  required_balance?: number | undefined;
147
147
  product_id?: string | undefined;
148
148
  customer_data?: any;
@@ -240,18 +240,18 @@ declare class Autumn {
240
240
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
241
241
  };
242
242
  static attach: (params: AttachParams) => Promise<Result<{
243
- customer_id: string;
244
243
  code: string;
245
244
  message: string;
245
+ customer_id: string;
246
246
  product_ids: string[];
247
247
  customer_data?: any;
248
248
  checkout_url?: string | undefined;
249
249
  }, AutumnError>>;
250
250
  static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
251
251
  attach(params: AttachParams): Promise<Result<{
252
- customer_id: string;
253
252
  code: string;
254
253
  message: string;
254
+ customer_id: string;
255
255
  product_ids: string[];
256
256
  customer_data?: any;
257
257
  checkout_url?: string | undefined;
@@ -285,9 +285,9 @@ declare class Autumn {
285
285
  * Please use the new track() method instead.
286
286
  */
287
287
  static event: (params: TrackParams) => Promise<Result<{
288
- customer_id: string;
289
- code: string;
290
288
  id: string;
289
+ code: string;
290
+ customer_id: string;
291
291
  feature_id?: string | undefined;
292
292
  event_name?: string | undefined;
293
293
  }, AutumnError>>;
@@ -296,23 +296,23 @@ declare class Autumn {
296
296
  * Please use the new track() method instead.
297
297
  */
298
298
  event(params: TrackParams): Promise<Result<{
299
- customer_id: string;
300
- code: string;
301
299
  id: string;
300
+ code: string;
301
+ customer_id: string;
302
302
  feature_id?: string | undefined;
303
303
  event_name?: string | undefined;
304
304
  }, AutumnError>>;
305
305
  static track: (params: TrackParams) => Promise<Result<{
306
- customer_id: string;
307
- code: string;
308
306
  id: string;
307
+ code: string;
308
+ customer_id: string;
309
309
  feature_id?: string | undefined;
310
310
  event_name?: string | undefined;
311
311
  }, AutumnError>>;
312
312
  track(params: TrackParams): Promise<Result<{
313
- customer_id: string;
314
- code: string;
315
313
  id: string;
314
+ code: string;
315
+ customer_id: string;
316
316
  feature_id?: string | undefined;
317
317
  event_name?: string | undefined;
318
318
  }, AutumnError>>;
@@ -362,11 +362,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
362
362
  code: z.ZodString;
363
363
  customer_id: z.ZodString;
364
364
  }, "strip", z.ZodTypeAny, {
365
- customer_id: string;
366
365
  code: string;
367
- }, {
368
366
  customer_id: string;
367
+ }, {
369
368
  code: string;
369
+ customer_id: string;
370
370
  }>;
371
371
  type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
372
372
 
@@ -191,6 +191,7 @@ interface CustomerProduct {
191
191
  status: ProductStatus;
192
192
  started_at: number;
193
193
  canceled_at: number | null;
194
+ version: number;
194
195
  subscription_ids?: string[] | null;
195
196
  current_period_start?: number | null;
196
197
  current_period_end?: number | null;
@@ -230,15 +231,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
230
231
  expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
231
232
  }, "strip", z.ZodTypeAny, {
232
233
  id?: string | null | undefined;
233
- name?: string | null | undefined;
234
234
  email?: string | null | undefined;
235
+ name?: string | null | undefined;
235
236
  fingerprint?: string | null | undefined;
236
237
  metadata?: Record<string, any> | undefined;
237
238
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
238
239
  }, {
239
240
  id?: string | null | undefined;
240
- name?: string | null | undefined;
241
241
  email?: string | null | undefined;
242
+ name?: string | null | undefined;
242
243
  fingerprint?: string | null | undefined;
243
244
  metadata?: Record<string, any> | undefined;
244
245
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
@@ -191,6 +191,7 @@ interface CustomerProduct {
191
191
  status: ProductStatus;
192
192
  started_at: number;
193
193
  canceled_at: number | null;
194
+ version: number;
194
195
  subscription_ids?: string[] | null;
195
196
  current_period_start?: number | null;
196
197
  current_period_end?: number | null;
@@ -230,15 +231,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
230
231
  expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
231
232
  }, "strip", z.ZodTypeAny, {
232
233
  id?: string | null | undefined;
233
- name?: string | null | undefined;
234
234
  email?: string | null | undefined;
235
+ name?: string | null | undefined;
235
236
  fingerprint?: string | null | undefined;
236
237
  metadata?: Record<string, any> | undefined;
237
238
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
238
239
  }, {
239
240
  id?: string | null | undefined;
240
- name?: string | null | undefined;
241
241
  email?: string | null | undefined;
242
+ name?: string | null | undefined;
242
243
  fingerprint?: string | null | undefined;
243
244
  metadata?: Record<string, any> | undefined;
244
245
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { C as CustomerData, B as BillingPortalParams } from './cusTypes-Cy72qmFx.mjs';
2
+ import { C as CustomerData, B as BillingPortalParams } from './cusTypes-B8u88Vfq.mjs';
3
3
  import 'zod';
4
4
 
5
5
  declare const attachAction: (args: Omit<{
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { C as CustomerData, B as BillingPortalParams } from './cusTypes-Cy72qmFx.js';
2
+ import { C as CustomerData, B as BillingPortalParams } from './cusTypes-B8u88Vfq.js';
3
3
  import 'zod';
4
4
 
5
5
  declare const attachAction: (args: Omit<{
@@ -212,6 +212,7 @@ interface CustomerProduct {
212
212
  status: ProductStatus;
213
213
  started_at: number;
214
214
  canceled_at: number | null;
215
+ version: number;
215
216
  subscription_ids?: string[] | null;
216
217
  current_period_start?: number | null;
217
218
  current_period_end?: number | null;
@@ -212,6 +212,7 @@ interface CustomerProduct {
212
212
  status: ProductStatus;
213
213
  started_at: number;
214
214
  canceled_at: number | null;
215
+ version: number;
215
216
  subscription_ids?: string[] | null;
216
217
  current_period_start?: number | null;
217
218
  current_period_end?: number | null;