autumn-js 0.0.83 → 0.0.92-beta.1

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 (245) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +764 -4
  2. package/dist/libraries/backend/better-auth.d.ts +764 -4
  3. package/dist/libraries/backend/better-auth.js +341 -19184
  4. package/dist/libraries/backend/better-auth.mjs +232 -19135
  5. package/dist/libraries/backend/{chunk-XGB3TDIC.mjs → chunk-6DZX6EAA.mjs} +0 -5
  6. package/dist/libraries/backend/{chunk-J3QM5KFT.mjs → chunk-7QSJB2C5.mjs} +1 -1
  7. package/dist/libraries/backend/{chunk-UJQBHXII.mjs → chunk-FCEB2GBS.mjs} +1 -1
  8. package/dist/libraries/backend/{chunk-A46IKTLH.mjs → chunk-JPNRDMMC.mjs} +1 -1
  9. package/dist/libraries/backend/{chunk-52OTZ4SQ.mjs → chunk-NTFR7Z2G.mjs} +8 -8
  10. package/dist/libraries/backend/{chunk-DG3FZZQH.mjs → chunk-U7335VZS.mjs} +1 -1
  11. package/dist/libraries/backend/{chunk-VCEQ3QBX.mjs → chunk-V6M7KRGN.mjs} +57 -0
  12. package/dist/libraries/backend/{chunk-WDRHQJKV.mjs → chunk-VFTHGJ5N.mjs} +1 -1
  13. package/dist/libraries/backend/constants.mjs +1 -1
  14. package/dist/libraries/backend/convex.d.mts +10 -0
  15. package/dist/libraries/backend/convex.d.ts +10 -0
  16. package/dist/libraries/backend/convex.js +1045 -0
  17. package/dist/libraries/backend/convex.mjs +80 -0
  18. package/dist/libraries/backend/express.d.mts +2 -1
  19. package/dist/libraries/backend/express.d.ts +2 -1
  20. package/dist/libraries/backend/express.js +57 -0
  21. package/dist/libraries/backend/express.mjs +8 -8
  22. package/dist/libraries/backend/fastify.js +57 -0
  23. package/dist/libraries/backend/fastify.mjs +8 -8
  24. package/dist/libraries/backend/hono.js +57 -0
  25. package/dist/libraries/backend/hono.mjs +8 -8
  26. package/dist/libraries/backend/next.js +59 -2
  27. package/dist/libraries/backend/next.mjs +8 -8
  28. package/dist/libraries/backend/react-router.js +57 -0
  29. package/dist/libraries/backend/react-router.mjs +8 -8
  30. package/dist/libraries/backend/{referralTypes-BZ4WOVK5.d.ts → referralTypes-BAYl5TR1.d.ts} +101 -36
  31. package/dist/libraries/backend/{referralTypes-C6ao6j-_.d.mts → referralTypes-ecz_wESO.d.mts} +101 -36
  32. package/dist/libraries/backend/remix_dep.js +57 -0
  33. package/dist/libraries/backend/remix_dep.mjs +8 -8
  34. package/dist/libraries/backend/routes/backendRouter.js +57 -0
  35. package/dist/libraries/backend/routes/backendRouter.mjs +8 -8
  36. package/dist/libraries/backend/routes/entityRoutes.js +57 -0
  37. package/dist/libraries/backend/routes/entityRoutes.mjs +4 -4
  38. package/dist/libraries/backend/routes/genRoutes.js +57 -0
  39. package/dist/libraries/backend/routes/genRoutes.mjs +4 -4
  40. package/dist/libraries/backend/routes/productRoutes.js +57 -0
  41. package/dist/libraries/backend/routes/productRoutes.mjs +4 -4
  42. package/dist/libraries/backend/routes/referralRoutes.js +57 -0
  43. package/dist/libraries/backend/routes/referralRoutes.mjs +4 -4
  44. package/dist/libraries/backend/schemas/zod.d.mts +208 -0
  45. package/dist/libraries/backend/schemas/zod.d.ts +208 -0
  46. package/dist/libraries/backend/schemas/zod.js +100 -0
  47. package/dist/libraries/backend/schemas/zod.mjs +69 -0
  48. package/dist/libraries/backend/supabase.js +57 -0
  49. package/dist/libraries/backend/supabase.mjs +8 -8
  50. package/dist/libraries/backend/tanstack.js +57 -0
  51. package/dist/libraries/backend/tanstack.mjs +8 -8
  52. package/dist/libraries/backend/utils/backendRes.js +57 -0
  53. package/dist/libraries/backend/utils/backendRes.mjs +2 -2
  54. package/dist/libraries/backend/utils/logBackendErrors.mjs +1 -1
  55. package/dist/libraries/backend/utils/secretKeyCheck.mjs +1 -1
  56. package/dist/libraries/backend/utils/withAuth.d.mts +2 -1
  57. package/dist/libraries/backend/utils/withAuth.d.ts +2 -1
  58. package/dist/libraries/backend/utils/withAuth.js +57 -0
  59. package/dist/libraries/backend/utils/withAuth.mjs +3 -3
  60. package/dist/libraries/react/AutumnContext.d.mts +7 -6
  61. package/dist/libraries/react/AutumnContext.d.ts +7 -6
  62. package/dist/libraries/react/AutumnContext.js +59 -4
  63. package/dist/libraries/react/AutumnContext.mjs +2 -2
  64. package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -7
  65. package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -7
  66. package/dist/libraries/react/BaseAutumnProvider.js +149 -32
  67. package/dist/libraries/react/BaseAutumnProvider.mjs +7 -7
  68. package/dist/libraries/react/{ReactAutumnClient-DS-MPWXt.d.ts → ReactAutumnClient-BTNcA_3b.d.ts} +59 -11
  69. package/dist/libraries/react/{ReactAutumnClient-Cj2h9TXJ.d.mts → ReactAutumnClient-BiipnfQn.d.mts} +59 -11
  70. package/dist/libraries/react/ReactAutumnProvider.d.mts +3 -3
  71. package/dist/libraries/react/ReactAutumnProvider.d.ts +3 -3
  72. package/dist/libraries/react/ReactAutumnProvider.js +160 -46
  73. package/dist/libraries/react/ReactAutumnProvider.mjs +8 -8
  74. package/dist/libraries/react/{chunk-JFXBUWKA.mjs → chunk-3JJC2VU5.mjs} +22 -5
  75. package/dist/libraries/react/{chunk-CQMTU2M4.mjs → chunk-3WP2MI55.mjs} +25 -6
  76. package/dist/libraries/react/{chunk-6ULRUGQO.mjs → chunk-4AYEAAQU.mjs} +2 -2
  77. package/dist/libraries/react/{chunk-UO2PX7P3.mjs → chunk-67Y4DFV2.mjs} +14 -17
  78. package/dist/libraries/react/{chunk-EWMKQDQ6.mjs → chunk-6JOSRG5Z.mjs} +2 -2
  79. package/dist/libraries/react/{chunk-JOY6LN3M.mjs → chunk-CHQRTGXF.mjs} +25 -7
  80. package/dist/libraries/react/{chunk-KVGD37VB.mjs → chunk-G3XBGOHR.mjs} +4 -6
  81. package/dist/libraries/react/{chunk-S4VDT54B.mjs → chunk-GK75OJJJ.mjs} +2 -2
  82. package/dist/libraries/react/{chunk-MH2YTNJL.mjs → chunk-ITN754AD.mjs} +3 -5
  83. package/dist/libraries/react/{chunk-Z7MRLSU3.mjs → chunk-LKBUMRHE.mjs} +9 -9
  84. package/dist/libraries/react/{chunk-UDRQNZZS.mjs → chunk-QAHVMSK4.mjs} +57 -0
  85. package/dist/libraries/react/{chunk-SCT4E6YW.mjs → chunk-SJAAUTL2.mjs} +2 -2
  86. package/dist/libraries/react/{chunk-L55GLFAX.mjs → chunk-TBKIB6DH.mjs} +2 -2
  87. package/dist/libraries/react/{chunk-GEIECHWI.mjs → chunk-TINC2IR4.mjs} +24 -14
  88. package/dist/libraries/react/{chunk-OWFX3JFF.mjs → chunk-WVKYZYFT.mjs} +14 -0
  89. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -5
  90. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -5
  91. package/dist/libraries/react/client/ReactAutumnClient.js +57 -0
  92. package/dist/libraries/react/client/ReactAutumnClient.mjs +1 -1
  93. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -5
  94. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -5
  95. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -5
  96. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -5
  97. package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -5
  98. package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -5
  99. package/dist/libraries/react/client/clientGenMethods.d.mts +6 -5
  100. package/dist/libraries/react/client/clientGenMethods.d.ts +6 -5
  101. package/dist/libraries/react/client/clientProdMethods.d.mts +6 -5
  102. package/dist/libraries/react/client/clientProdMethods.d.ts +6 -5
  103. package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -4
  104. package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -4
  105. package/dist/libraries/react/client/types/clientGenTypes.d.mts +136 -41
  106. package/dist/libraries/react/client/types/clientGenTypes.d.ts +136 -41
  107. package/dist/libraries/react/client/types/clientGenTypes.js +62 -0
  108. package/dist/libraries/react/client/types/clientGenTypes.mjs +52 -0
  109. package/dist/libraries/react/client/types/clientReferralTypes.d.mts +17 -5
  110. package/dist/libraries/react/client/types/clientReferralTypes.d.ts +17 -5
  111. package/dist/libraries/react/client/types/clientReferralTypes.js +20 -0
  112. package/dist/libraries/react/client/types/clientReferralTypes.mjs +13 -0
  113. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -1
  114. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -1
  115. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +164 -29
  116. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +17 -17
  117. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -1
  118. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -1
  119. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +2 -1
  120. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +2 -1
  121. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +2 -1
  122. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +2 -1
  123. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +2 -1
  124. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +2 -1
  125. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +163 -30
  126. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +17 -17
  127. package/dist/libraries/react/components/ui/button.d.mts +1 -1
  128. package/dist/libraries/react/components/ui/button.d.ts +1 -1
  129. package/dist/libraries/react/{cusTypes-CO4FwQ_s.d.ts → cusTypes-Bf1qr9iE.d.mts} +29 -9
  130. package/dist/libraries/react/{cusTypes-CO4FwQ_s.d.mts → cusTypes-Bf1qr9iE.d.ts} +29 -9
  131. package/dist/libraries/react/{entTypes-DPTZOorv.d.mts → entTypes-CscyyE1A.d.mts} +1 -1
  132. package/dist/libraries/react/{entTypes-UxZ5bRqE.d.ts → entTypes-O8YXxhrA.d.ts} +1 -1
  133. package/dist/libraries/react/hooks/handleAllowed.d.mts +4 -3
  134. package/dist/libraries/react/hooks/handleAllowed.d.ts +4 -3
  135. package/dist/libraries/react/hooks/handleAllowed.js +22 -5
  136. package/dist/libraries/react/hooks/handleAllowed.mjs +1 -1
  137. package/dist/libraries/react/hooks/useAutumn.d.mts +6 -5
  138. package/dist/libraries/react/hooks/useAutumn.d.ts +6 -5
  139. package/dist/libraries/react/hooks/useAutumn.js +105 -13
  140. package/dist/libraries/react/hooks/useAutumn.mjs +5 -5
  141. package/dist/libraries/react/hooks/useAutumnBase.d.mts +9 -8
  142. package/dist/libraries/react/hooks/useAutumnBase.d.ts +9 -8
  143. package/dist/libraries/react/hooks/useAutumnBase.js +105 -13
  144. package/dist/libraries/react/hooks/useAutumnBase.mjs +4 -4
  145. package/dist/libraries/react/hooks/useCustomer.d.mts +7 -5
  146. package/dist/libraries/react/hooks/useCustomer.d.ts +7 -5
  147. package/dist/libraries/react/hooks/useCustomer.js +148 -29
  148. package/dist/libraries/react/hooks/useCustomer.mjs +7 -7
  149. package/dist/libraries/react/hooks/useCustomerBase.d.mts +8 -4
  150. package/dist/libraries/react/hooks/useCustomerBase.d.ts +8 -4
  151. package/dist/libraries/react/hooks/useCustomerBase.js +148 -29
  152. package/dist/libraries/react/hooks/useCustomerBase.mjs +6 -6
  153. package/dist/libraries/react/hooks/useEntity.d.mts +7 -5
  154. package/dist/libraries/react/hooks/useEntity.d.ts +7 -5
  155. package/dist/libraries/react/hooks/useEntity.js +127 -18
  156. package/dist/libraries/react/hooks/useEntity.mjs +7 -7
  157. package/dist/libraries/react/hooks/useEntityBase.d.mts +7 -7
  158. package/dist/libraries/react/hooks/useEntityBase.d.ts +7 -7
  159. package/dist/libraries/react/hooks/useEntityBase.js +127 -18
  160. package/dist/libraries/react/hooks/useEntityBase.mjs +6 -6
  161. package/dist/libraries/react/hooks/usePricingTable.d.mts +2 -1
  162. package/dist/libraries/react/hooks/usePricingTable.d.ts +2 -1
  163. package/dist/libraries/react/hooks/usePricingTable.js +82 -9
  164. package/dist/libraries/react/hooks/usePricingTable.mjs +4 -4
  165. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +7 -6
  166. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +7 -6
  167. package/dist/libraries/react/hooks/usePricingTableBase.js +82 -9
  168. package/dist/libraries/react/hooks/usePricingTableBase.mjs +3 -3
  169. package/dist/libraries/react/hooks/useProductsBase.js +59 -4
  170. package/dist/libraries/react/hooks/useProductsBase.mjs +2 -2
  171. package/dist/libraries/react/index.d.mts +611 -0
  172. package/dist/libraries/react/index.d.ts +168 -57
  173. package/dist/libraries/react/index.js +175 -72
  174. package/dist/libraries/react/index.mjs +175 -72
  175. package/dist/libraries/react/{response-Z4Yeokd8.d.ts → response-BHqAAnND.d.ts} +21 -5
  176. package/dist/libraries/react/{response-CxtkXvb4.d.mts → response-CDZ_R5pb.d.mts} +21 -5
  177. package/dist/libraries/react/utils/inject-styles.js +14 -0
  178. package/dist/libraries/react/utils/inject-styles.mjs +1 -1
  179. package/dist/next/{AutumnProvider-DPcEuE_Q.d.ts → AutumnProvider-DtLqoQp6.d.mts} +28 -9
  180. package/dist/next/{AutumnProvider-DPcEuE_Q.d.mts → AutumnProvider-DtLqoQp6.d.ts} +28 -9
  181. package/dist/next/AutumnProvider.d.mts +2 -1
  182. package/dist/next/AutumnProvider.d.ts +2 -1
  183. package/dist/next/client/NextAutumnClient.d.mts +60 -10
  184. package/dist/next/client/NextAutumnClient.d.ts +60 -10
  185. package/dist/next/client/NextAutumnProvider.d.mts +2 -1
  186. package/dist/next/client/NextAutumnProvider.d.ts +2 -1
  187. package/dist/next/client/clientEntTypes-BFkleT6a.d.mts +22 -0
  188. package/dist/next/client/clientEntTypes-BFkleT6a.d.ts +22 -0
  189. package/dist/next/client/clientGenTypes-B28imYzT.d.mts +195 -0
  190. package/dist/next/client/clientGenTypes-D46edNj5.d.ts +195 -0
  191. package/dist/next/client/clientUtils.d.mts +3 -2
  192. package/dist/next/client/clientUtils.d.ts +3 -2
  193. package/dist/next/client/{cusTypes-CJI8rdlY.d.mts → cusTypes-CGXuXu_Y.d.mts} +29 -9
  194. package/dist/next/client/{cusTypes-CJI8rdlY.d.ts → cusTypes-CGXuXu_Y.d.ts} +29 -9
  195. package/dist/next/client/{entTypes-okM0aeOM.d.mts → entTypes-CJx3GLTt.d.mts} +1 -1
  196. package/dist/next/client/{entTypes-CqHWTcCX.d.ts → entTypes-qYfQsZ9u.d.ts} +1 -1
  197. package/dist/next/client/hooks/useAutumn.d.mts +6 -4
  198. package/dist/next/client/hooks/useAutumn.d.ts +6 -4
  199. package/dist/next/client/hooks/useCustomer.d.mts +26 -4
  200. package/dist/next/client/hooks/useCustomer.d.ts +26 -4
  201. package/dist/next/client/hooks/useCustomer.js +3 -1
  202. package/dist/next/client/hooks/useCustomer.mjs +3 -1
  203. package/dist/next/client/hooks/useEntity.d.mts +7 -5
  204. package/dist/next/client/hooks/useEntity.d.ts +7 -5
  205. package/dist/next/client/hooks/usePricingTable.d.mts +2 -1
  206. package/dist/next/client/hooks/usePricingTable.d.ts +2 -1
  207. package/dist/next/client/types.d.mts +3 -2
  208. package/dist/next/client/types.d.ts +3 -2
  209. package/dist/next/index.d.mts +221 -65
  210. package/dist/next/index.d.ts +221 -65
  211. package/dist/next/server/auth/withNextAuth.d.mts +2 -1
  212. package/dist/next/server/auth/withNextAuth.d.ts +2 -1
  213. package/dist/next/server/componentActions.d.mts +2 -1
  214. package/dist/next/server/componentActions.d.ts +2 -1
  215. package/dist/next/server/cusActions.d.mts +93 -38
  216. package/dist/next/server/cusActions.d.ts +93 -38
  217. package/dist/next/server/{cusTypes-DuSwXVmp.d.mts → cusTypes-H4mqijcm.d.mts} +28 -8
  218. package/dist/next/server/{cusTypes-DuSwXVmp.d.ts → cusTypes-H4mqijcm.d.ts} +28 -8
  219. package/dist/next/server/genActions.d.mts +44 -49
  220. package/dist/next/server/genActions.d.ts +44 -49
  221. package/dist/sdk/index.d.mts +123 -29
  222. package/dist/sdk/index.d.ts +123 -29
  223. package/dist/sdk/index.js +60 -9
  224. package/dist/sdk/index.mjs +57 -10
  225. package/dist/styles/global.css +42 -4
  226. package/dist/utils/encryptUtils.js +57 -0
  227. package/dist/utils/encryptUtils.mjs +57 -0
  228. package/package.json +33 -4
  229. package/tsup.config.ts +1 -22
  230. package/components.json +0 -21
  231. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.css +0 -1271
  232. package/dist/libraries/react/components/pricing-table/pricing-table-synced.css +0 -1271
  233. package/dist/next/client/clientGenTypes-CAv4hwb4.d.ts +0 -108
  234. package/dist/next/client/clientGenTypes-Dlpw9wy_.d.mts +0 -108
  235. package/dist/next/client/clientReferralTypes-C9JiOk2s.d.mts +0 -20
  236. package/dist/next/client/clientReferralTypes-C9JiOk2s.d.ts +0 -20
  237. package/dist/next/server/clientEntTypes-BOVTwIKv.d.mts +0 -14
  238. package/dist/next/server/clientEntTypes-BOVTwIKv.d.ts +0 -14
  239. package/postcss.config.js +0 -25
  240. package/publish.sh +0 -18
  241. package/scripts/css-transform-plugin.js +0 -28
  242. package/scripts/post-build.js +0 -91
  243. package/scripts/sync-registry.ts +0 -190
  244. package/tailwind.config.ts +0 -96
  245. package/tsup.dev.config.ts +0 -199
@@ -0,0 +1,195 @@
1
+ import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-CGXuXu_Y.js';
2
+ import { z } from 'zod';
3
+ import { A as AutumnError } from './error-DHbclCVh.js';
4
+ import * as react from 'react';
5
+
6
+ interface CancelResult {
7
+ success: boolean;
8
+ customer_id: string;
9
+ product_id: string;
10
+ }
11
+ declare const AttachResultSchema: z.ZodObject<{
12
+ checkout_url: z.ZodOptional<z.ZodString>;
13
+ customer_id: z.ZodString;
14
+ product_ids: z.ZodArray<z.ZodString, "many">;
15
+ code: z.ZodString;
16
+ message: z.ZodString;
17
+ customer_data: z.ZodOptional<z.ZodAny>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ code: string;
20
+ message: string;
21
+ customer_id: string;
22
+ product_ids: string[];
23
+ checkout_url?: string | undefined;
24
+ customer_data?: any;
25
+ }, {
26
+ code: string;
27
+ message: string;
28
+ customer_id: string;
29
+ product_ids: string[];
30
+ checkout_url?: string | undefined;
31
+ customer_data?: any;
32
+ }>;
33
+ type AttachResult = z.infer<typeof AttachResultSchema>;
34
+ interface TrackResult {
35
+ id: string;
36
+ code: string;
37
+ customer_id: string;
38
+ feature_id?: string;
39
+ event_name?: string;
40
+ }
41
+ type CheckResult = CheckFeatureResult & CheckProductResult;
42
+ interface SetupPaymentResult {
43
+ customer_id: string;
44
+ url: string;
45
+ }
46
+
47
+ type Success<T> = {
48
+ data: T;
49
+ error: null;
50
+ statusCode?: number;
51
+ };
52
+ type Failure<E> = {
53
+ data: null;
54
+ error: E;
55
+ statusCode?: number;
56
+ };
57
+ type Result<T, E> = Success<T> | Failure<E>;
58
+ type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
59
+
60
+ declare const AttachParamsSchema: z.ZodObject<{
61
+ productId: z.ZodOptional<z.ZodString>;
62
+ entityId: z.ZodOptional<z.ZodString>;
63
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
64
+ featureId: z.ZodString;
65
+ quantity: z.ZodNumber;
66
+ }, "strip", z.ZodTypeAny, {
67
+ featureId: string;
68
+ quantity: number;
69
+ }, {
70
+ featureId: string;
71
+ quantity: number;
72
+ }>, "many">>;
73
+ productIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
74
+ freeTrial: z.ZodOptional<z.ZodBoolean>;
75
+ successUrl: z.ZodOptional<z.ZodString>;
76
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
77
+ forceCheckout: z.ZodOptional<z.ZodBoolean>;
78
+ dialog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodUnion<[z.ZodType<JSX.Element, z.ZodTypeDef, JSX.Element>, z.ZodType<react.ReactNode, z.ZodTypeDef, react.ReactNode>]>>>;
79
+ entityData: z.ZodOptional<z.ZodAny>;
80
+ openInNewTab: z.ZodOptional<z.ZodBoolean>;
81
+ reward: z.ZodOptional<z.ZodString>;
82
+ checkoutSessionParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ options?: {
85
+ featureId: string;
86
+ quantity: number;
87
+ }[] | undefined;
88
+ metadata?: Record<string, string> | undefined;
89
+ productId?: string | undefined;
90
+ entityId?: string | undefined;
91
+ productIds?: string[] | undefined;
92
+ freeTrial?: boolean | undefined;
93
+ successUrl?: string | undefined;
94
+ forceCheckout?: boolean | undefined;
95
+ dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
96
+ entityData?: any;
97
+ openInNewTab?: boolean | undefined;
98
+ reward?: string | undefined;
99
+ checkoutSessionParams?: Record<string, any> | undefined;
100
+ }, {
101
+ options?: {
102
+ featureId: string;
103
+ quantity: number;
104
+ }[] | undefined;
105
+ metadata?: Record<string, string> | undefined;
106
+ productId?: string | undefined;
107
+ entityId?: string | undefined;
108
+ productIds?: string[] | undefined;
109
+ freeTrial?: boolean | undefined;
110
+ successUrl?: string | undefined;
111
+ forceCheckout?: boolean | undefined;
112
+ dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
113
+ entityData?: any;
114
+ openInNewTab?: boolean | undefined;
115
+ reward?: string | undefined;
116
+ checkoutSessionParams?: Record<string, any> | undefined;
117
+ }>;
118
+ type AttachParams = z.infer<typeof AttachParamsSchema>;
119
+ declare const CancelParamsSchema: z.ZodObject<{
120
+ productId: z.ZodString;
121
+ entityId: z.ZodOptional<z.ZodString>;
122
+ cancelImmediately: z.ZodOptional<z.ZodBoolean>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ productId: string;
125
+ entityId?: string | undefined;
126
+ cancelImmediately?: boolean | undefined;
127
+ }, {
128
+ productId: string;
129
+ entityId?: string | undefined;
130
+ cancelImmediately?: boolean | undefined;
131
+ }>;
132
+ type CancelParams = z.infer<typeof CancelParamsSchema>;
133
+ declare const CheckParamsSchema: z.ZodObject<{
134
+ featureId: z.ZodOptional<z.ZodString>;
135
+ productId: z.ZodOptional<z.ZodString>;
136
+ entityId: z.ZodOptional<z.ZodString>;
137
+ requiredBalance: z.ZodOptional<z.ZodNumber>;
138
+ sendEvent: z.ZodOptional<z.ZodBoolean>;
139
+ withPreview: z.ZodOptional<z.ZodBoolean>;
140
+ dialog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodUnion<[z.ZodType<JSX.Element, z.ZodTypeDef, JSX.Element>, z.ZodType<react.ReactNode, z.ZodTypeDef, react.ReactNode>]>>>;
141
+ entityData: z.ZodOptional<z.ZodAny>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ productId?: string | undefined;
144
+ entityId?: string | undefined;
145
+ featureId?: string | undefined;
146
+ dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
147
+ entityData?: any;
148
+ requiredBalance?: number | undefined;
149
+ sendEvent?: boolean | undefined;
150
+ withPreview?: boolean | undefined;
151
+ }, {
152
+ productId?: string | undefined;
153
+ entityId?: string | undefined;
154
+ featureId?: string | undefined;
155
+ dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
156
+ entityData?: any;
157
+ requiredBalance?: number | undefined;
158
+ sendEvent?: boolean | undefined;
159
+ withPreview?: boolean | undefined;
160
+ }>;
161
+ type CheckParams = z.infer<typeof CheckParamsSchema>;
162
+ declare const TrackParamsSchema: z.ZodObject<{
163
+ featureId: z.ZodOptional<z.ZodString>;
164
+ eventName: z.ZodOptional<z.ZodString>;
165
+ entityId: z.ZodOptional<z.ZodString>;
166
+ value: z.ZodOptional<z.ZodNumber>;
167
+ idempotencyKey: z.ZodOptional<z.ZodString>;
168
+ entityData: z.ZodOptional<z.ZodAny>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ value?: number | undefined;
171
+ entityId?: string | undefined;
172
+ featureId?: string | undefined;
173
+ entityData?: any;
174
+ eventName?: string | undefined;
175
+ idempotencyKey?: string | undefined;
176
+ }, {
177
+ value?: number | undefined;
178
+ entityId?: string | undefined;
179
+ featureId?: string | undefined;
180
+ entityData?: any;
181
+ eventName?: string | undefined;
182
+ idempotencyKey?: string | undefined;
183
+ }>;
184
+ type TrackParams = z.infer<typeof TrackParamsSchema>;
185
+ interface OpenBillingPortalParams {
186
+ returnUrl?: string;
187
+ openInNewTab?: boolean;
188
+ }
189
+ interface SetupPaymentParams {
190
+ successUrl?: string;
191
+ checkoutSessionParams?: Record<string, any>;
192
+ openInNewTab?: boolean;
193
+ }
194
+
195
+ export type { AttachParams as A, CheckParams as C, OpenBillingPortalParams as O, Result as R, SetupPaymentParams as S, TrackParams as T, AutumnPromise as a, CheckResult as b, TrackResult as c, CancelParams as d, CancelResult as e, SetupPaymentResult as f, AttachResult as g };
@@ -1,6 +1,7 @@
1
1
  import { AutumnClientError, PricingTableProduct } from './types.mjs';
2
- import './cusTypes-CJI8rdlY.mjs';
3
- import './entTypes-okM0aeOM.mjs';
2
+ import './cusTypes-CGXuXu_Y.mjs';
3
+ import 'zod';
4
+ import './entTypes-CJx3GLTt.mjs';
4
5
 
5
6
  declare const toClientErrorResponse: (error: any) => {
6
7
  data: null;
@@ -1,6 +1,7 @@
1
1
  import { AutumnClientError, PricingTableProduct } from './types.js';
2
- import './cusTypes-CJI8rdlY.js';
3
- import './entTypes-CqHWTcCX.js';
2
+ import './cusTypes-CGXuXu_Y.js';
3
+ import 'zod';
4
+ import './entTypes-qYfQsZ9u.js';
4
5
 
5
6
  declare const toClientErrorResponse: (error: any) => {
6
7
  data: null;
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  declare const Infinite = "inf";
2
4
  declare enum FreeTrialDuration {
3
5
  Day = "day"
@@ -28,6 +30,7 @@ interface CheckFeatureResult extends CoreCustomerFeature {
28
30
  entity_id?: string;
29
31
  required_balance: number;
30
32
  code: string;
33
+ usage_limit?: number;
31
34
  preview?: CheckFeaturePreview;
32
35
  }
33
36
  interface CheckFeaturePreview {
@@ -152,6 +155,7 @@ interface CoreCustomerFeature {
152
155
  included_usage?: number;
153
156
  next_reset_at?: number | null;
154
157
  overage_allowed?: boolean;
158
+ usage_limit?: number;
155
159
  breakdown?: {
156
160
  interval: ProductItemInterval;
157
161
  balance?: number;
@@ -203,14 +207,29 @@ interface CustomerData {
203
207
  email?: string;
204
208
  fingerprint?: string;
205
209
  }
206
- interface CreateCustomerParams {
207
- id?: string | null;
208
- email?: string | null;
209
- name?: string | null;
210
- fingerprint?: string | null;
211
- metadata?: Record<string, any>;
212
- expand?: CustomerExpandOption[];
213
- }
210
+ declare const CreateCustomerParamsSchema: z.ZodObject<{
211
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
216
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ id?: string | null | undefined;
219
+ email?: string | null | undefined;
220
+ name?: string | null | undefined;
221
+ fingerprint?: string | null | undefined;
222
+ metadata?: Record<string, any> | undefined;
223
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
224
+ }, {
225
+ id?: string | null | undefined;
226
+ email?: string | null | undefined;
227
+ name?: string | null | undefined;
228
+ fingerprint?: string | null | undefined;
229
+ metadata?: Record<string, any> | undefined;
230
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
231
+ }>;
232
+ type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
214
233
  interface BillingPortalResult {
215
234
  customer_id: string;
216
235
  url: string;
@@ -222,6 +241,7 @@ interface CustomerInvoice {
222
241
  total: number;
223
242
  currency: string;
224
243
  created_at: number;
244
+ hosted_invoice_url: string;
225
245
  }
226
246
 
227
- export type { BillingPortalResult as B, CustomerData as C, Product as P, Customer as a, CustomerExpandOption as b, CustomerProduct as c, CustomerFeature as d, CustomerInvoice as e, ProductItem as f, ProductScenario as g, CreateCustomerParams as h, CheckFeatureResult as i, CheckProductResult as j };
247
+ export type { BillingPortalResult as B, CustomerData as C, Product as P, Customer as a, CustomerProduct as b, CustomerFeature as c, CustomerInvoice as d, ProductItem as e, ProductScenario as f, CreateCustomerParams as g, CustomerExpandOption as h, CheckFeatureResult as i, CheckProductResult as j };
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  declare const Infinite = "inf";
2
4
  declare enum FreeTrialDuration {
3
5
  Day = "day"
@@ -28,6 +30,7 @@ interface CheckFeatureResult extends CoreCustomerFeature {
28
30
  entity_id?: string;
29
31
  required_balance: number;
30
32
  code: string;
33
+ usage_limit?: number;
31
34
  preview?: CheckFeaturePreview;
32
35
  }
33
36
  interface CheckFeaturePreview {
@@ -152,6 +155,7 @@ interface CoreCustomerFeature {
152
155
  included_usage?: number;
153
156
  next_reset_at?: number | null;
154
157
  overage_allowed?: boolean;
158
+ usage_limit?: number;
155
159
  breakdown?: {
156
160
  interval: ProductItemInterval;
157
161
  balance?: number;
@@ -203,14 +207,29 @@ interface CustomerData {
203
207
  email?: string;
204
208
  fingerprint?: string;
205
209
  }
206
- interface CreateCustomerParams {
207
- id?: string | null;
208
- email?: string | null;
209
- name?: string | null;
210
- fingerprint?: string | null;
211
- metadata?: Record<string, any>;
212
- expand?: CustomerExpandOption[];
213
- }
210
+ declare const CreateCustomerParamsSchema: z.ZodObject<{
211
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
216
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ id?: string | null | undefined;
219
+ email?: string | null | undefined;
220
+ name?: string | null | undefined;
221
+ fingerprint?: string | null | undefined;
222
+ metadata?: Record<string, any> | undefined;
223
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
224
+ }, {
225
+ id?: string | null | undefined;
226
+ email?: string | null | undefined;
227
+ name?: string | null | undefined;
228
+ fingerprint?: string | null | undefined;
229
+ metadata?: Record<string, any> | undefined;
230
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
231
+ }>;
232
+ type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
214
233
  interface BillingPortalResult {
215
234
  customer_id: string;
216
235
  url: string;
@@ -222,6 +241,7 @@ interface CustomerInvoice {
222
241
  total: number;
223
242
  currency: string;
224
243
  created_at: number;
244
+ hosted_invoice_url: string;
225
245
  }
226
246
 
227
- export type { BillingPortalResult as B, CustomerData as C, Product as P, Customer as a, CustomerExpandOption as b, CustomerProduct as c, CustomerFeature as d, CustomerInvoice as e, ProductItem as f, ProductScenario as g, CreateCustomerParams as h, CheckFeatureResult as i, CheckProductResult as j };
247
+ export type { BillingPortalResult as B, CustomerData as C, Product as P, Customer as a, CustomerProduct as b, CustomerFeature as c, CustomerInvoice as d, ProductItem as e, ProductScenario as f, CreateCustomerParams as g, CustomerExpandOption as h, CheckFeatureResult as i, CheckProductResult as j };
@@ -1,4 +1,4 @@
1
- import { c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice } from './cusTypes-CJI8rdlY.mjs';
1
+ import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-CGXuXu_Y.mjs';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -1,4 +1,4 @@
1
- import { c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice } from './cusTypes-CJI8rdlY.js';
1
+ import { b as CustomerProduct, c as CustomerFeature, d as CustomerInvoice } from './cusTypes-CGXuXu_Y.js';
2
2
 
3
3
  type EntityExpandOption = "invoices";
4
4
 
@@ -1,9 +1,11 @@
1
- import { A as AttachParams, R as Result, a as AttachResult, C as CheckResult, b as CheckParams, c as AutumnPromise, T as TrackParams, d as TrackResult, e as CancelParams, f as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, g as SetupPaymentResult } from '../clientGenTypes-Dlpw9wy_.mjs';
2
- import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
- import { B as BillingPortalResult } from '../cusTypes-CJI8rdlY.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-B28imYzT.mjs';
2
+ import { B as BillingPortalResult } from '../cusTypes-CGXuXu_Y.mjs';
3
+ import 'zod';
4
+ import '../error-DHbclCVh.mjs';
5
+ import 'react';
4
6
 
5
7
  declare const useAutumn: () => {
6
- attach: (params: AttachParams) => Promise<Result<AttachResult | CheckResult, AutumnError>>;
8
+ attach: (params: AttachParams) => Promise<any>;
7
9
  check: (params: CheckParams) => AutumnPromise<CheckResult>;
8
10
  track: (params: TrackParams) => AutumnPromise<TrackResult>;
9
11
  cancel: (params: CancelParams) => AutumnPromise<CancelResult>;
@@ -1,9 +1,11 @@
1
- import { A as AttachParams, R as Result, a as AttachResult, C as CheckResult, b as CheckParams, c as AutumnPromise, T as TrackParams, d as TrackResult, e as CancelParams, f as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, g as SetupPaymentResult } from '../clientGenTypes-CAv4hwb4.js';
2
- import { A as AutumnError } from '../error-DHbclCVh.js';
3
- import { B as BillingPortalResult } from '../cusTypes-CJI8rdlY.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-D46edNj5.js';
2
+ import { B as BillingPortalResult } from '../cusTypes-CGXuXu_Y.js';
3
+ import 'zod';
4
+ import '../error-DHbclCVh.js';
5
+ import 'react';
4
6
 
5
7
  declare const useAutumn: () => {
6
- attach: (params: AttachParams) => Promise<Result<AttachResult | CheckResult, AutumnError>>;
8
+ attach: (params: AttachParams) => Promise<any>;
7
9
  check: (params: CheckParams) => AutumnPromise<CheckResult>;
8
10
  track: (params: TrackParams) => AutumnPromise<TrackResult>;
9
11
  cancel: (params: CancelParams) => AutumnPromise<CancelResult>;
@@ -1,9 +1,29 @@
1
1
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
2
- import { A as AttachParams, c as AutumnPromise, a as AttachResult, b as CheckParams, C as CheckResult, T as TrackParams, d as TrackResult, e as CancelParams, f as CancelResult, S as SetupPaymentParams, g as SetupPaymentResult, O as OpenBillingPortalParams, h as CreateEntityParams } from '../clientGenTypes-Dlpw9wy_.mjs';
3
- import { b as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CJI8rdlY.mjs';
4
- import { E as Entity } from '../entTypes-okM0aeOM.mjs';
5
- import { C as CreateReferralCodeParams, a as CreateReferralCodeResult, R as RedeemReferralCodeParams, b as RedeemReferralCodeResult } from '../clientReferralTypes-C9JiOk2s.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-B28imYzT.mjs';
3
+ import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CGXuXu_Y.mjs';
4
+ import { E as Entity } from '../entTypes-CJx3GLTt.mjs';
5
+ import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.mjs';
6
+ import { z } from 'zod';
7
+ import { SWRConfiguration } from 'swr';
6
8
  import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.mjs';
9
+ import 'react';
10
+
11
+ declare const CreateReferralCodeParamsSchema: z.ZodObject<{
12
+ programId: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ programId: string;
15
+ }, {
16
+ programId: string;
17
+ }>;
18
+ type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
19
+ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
20
+ code: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ code: string;
23
+ }, {
24
+ code: string;
25
+ }>;
26
+ type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
7
27
 
8
28
  interface UseCustomerResult {
9
29
  customer: Customer | null;
@@ -24,6 +44,8 @@ interface UseCustomerResult {
24
44
  interface UseCustomerParams {
25
45
  errorOnNotFound?: boolean;
26
46
  expand?: CustomerExpandOption[];
47
+ swrConfig?: SWRConfiguration;
48
+ authClient?: any;
27
49
  }
28
50
 
29
51
  declare const useCustomer: (params?: UseCustomerParams) => UseCustomerResult;
@@ -1,9 +1,29 @@
1
1
  import { A as AutumnError } from '../error-DHbclCVh.js';
2
- import { A as AttachParams, c as AutumnPromise, a as AttachResult, b as CheckParams, C as CheckResult, T as TrackParams, d as TrackResult, e as CancelParams, f as CancelResult, S as SetupPaymentParams, g as SetupPaymentResult, O as OpenBillingPortalParams, h as CreateEntityParams } from '../clientGenTypes-CAv4hwb4.js';
3
- import { b as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CJI8rdlY.js';
4
- import { E as Entity } from '../entTypes-CqHWTcCX.js';
5
- import { C as CreateReferralCodeParams, a as CreateReferralCodeResult, R as RedeemReferralCodeParams, b as RedeemReferralCodeResult } from '../clientReferralTypes-C9JiOk2s.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-D46edNj5.js';
3
+ import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CGXuXu_Y.js';
4
+ import { E as Entity } from '../entTypes-qYfQsZ9u.js';
5
+ import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.js';
6
+ import { z } from 'zod';
7
+ import { SWRConfiguration } from 'swr';
6
8
  import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.js';
9
+ import 'react';
10
+
11
+ declare const CreateReferralCodeParamsSchema: z.ZodObject<{
12
+ programId: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ programId: string;
15
+ }, {
16
+ programId: string;
17
+ }>;
18
+ type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
19
+ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
20
+ code: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ code: string;
23
+ }, {
24
+ code: string;
25
+ }>;
26
+ type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
7
27
 
8
28
  interface UseCustomerResult {
9
29
  customer: Customer | null;
@@ -24,6 +44,8 @@ interface UseCustomerResult {
24
44
  interface UseCustomerParams {
25
45
  errorOnNotFound?: boolean;
26
46
  expand?: CustomerExpandOption[];
47
+ swrConfig?: SWRConfiguration;
48
+ authClient?: any;
27
49
  }
28
50
 
29
51
  declare const useCustomer: (params?: UseCustomerParams) => UseCustomerResult;
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
 
3
3
  import { AutumnContext } from "../../../libraries/react/AutumnContext";
4
- import { useCustomerBase } from "../../../libraries/react/hooks/useCustomerBase";
4
+ import {
5
+ useCustomerBase
6
+ } from "../../../libraries/react/hooks/useCustomerBase";
5
7
  const useCustomer = (params) => {
6
8
  return useCustomerBase({
7
9
  params,
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
 
3
3
  import { AutumnContext } from "../../../libraries/react/AutumnContext";
4
- import { useCustomerBase } from "../../../libraries/react/hooks/useCustomerBase";
4
+ import {
5
+ useCustomerBase
6
+ } from "../../../libraries/react/hooks/useCustomerBase";
5
7
  const useCustomer = (params) => {
6
8
  return useCustomerBase({
7
9
  params,
@@ -1,9 +1,11 @@
1
- import { b as CheckParams, c as AutumnPromise, C as CheckResult, A as AttachParams, R as Result, a as AttachResult, e as CancelParams, f as CancelResult, T as TrackParams, d as TrackResult } from '../clientGenTypes-Dlpw9wy_.mjs';
2
- import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
- import { G as GetEntityParams, E as Entity } from '../entTypes-okM0aeOM.mjs';
1
+ import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, e as CancelResult, T as TrackParams, c as TrackResult } from '../clientGenTypes-B28imYzT.mjs';
2
+ import { G as GetEntityParams, E as Entity } from '../entTypes-CJx3GLTt.mjs';
4
3
  import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.mjs';
5
4
  import * as swr from 'swr';
6
- import '../cusTypes-CJI8rdlY.mjs';
5
+ import '../cusTypes-CGXuXu_Y.mjs';
6
+ import 'zod';
7
+ import '../error-DHbclCVh.mjs';
8
+ import 'react';
7
9
 
8
10
  declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
9
11
  entity: Entity | null;
@@ -12,7 +14,7 @@ declare const useEntity: (entityId: string | null, params?: GetEntityParams) =>
12
14
  refetch: swr.KeyedMutator<Entity | null>;
13
15
  allowed: (params: AllowedParams) => boolean;
14
16
  check: (params: CheckParams) => AutumnPromise<CheckResult>;
15
- attach: (params: AttachParams) => Promise<Result<AttachResult | CheckResult, AutumnError>>;
17
+ attach: (params: AttachParams) => Promise<any>;
16
18
  cancel: (params: CancelParams) => AutumnPromise<CancelResult>;
17
19
  track: (params: TrackParams) => AutumnPromise<TrackResult>;
18
20
  };
@@ -1,9 +1,11 @@
1
- import { b as CheckParams, c as AutumnPromise, C as CheckResult, A as AttachParams, R as Result, a as AttachResult, e as CancelParams, f as CancelResult, T as TrackParams, d as TrackResult } from '../clientGenTypes-CAv4hwb4.js';
2
- import { A as AutumnError } from '../error-DHbclCVh.js';
3
- import { G as GetEntityParams, E as Entity } from '../entTypes-CqHWTcCX.js';
1
+ import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, e as CancelResult, T as TrackParams, c as TrackResult } from '../clientGenTypes-D46edNj5.js';
2
+ import { G as GetEntityParams, E as Entity } from '../entTypes-qYfQsZ9u.js';
4
3
  import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.js';
5
4
  import * as swr from 'swr';
6
- import '../cusTypes-CJI8rdlY.js';
5
+ import '../cusTypes-CGXuXu_Y.js';
6
+ import 'zod';
7
+ import '../error-DHbclCVh.js';
8
+ import 'react';
7
9
 
8
10
  declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
9
11
  entity: Entity | null;
@@ -12,7 +14,7 @@ declare const useEntity: (entityId: string | null, params?: GetEntityParams) =>
12
14
  refetch: swr.KeyedMutator<Entity | null>;
13
15
  allowed: (params: AllowedParams) => boolean;
14
16
  check: (params: CheckParams) => AutumnPromise<CheckResult>;
15
- attach: (params: AttachParams) => Promise<Result<AttachResult | CheckResult, AutumnError>>;
17
+ attach: (params: AttachParams) => Promise<any>;
16
18
  cancel: (params: CancelParams) => AutumnPromise<CancelResult>;
17
19
  track: (params: TrackParams) => AutumnPromise<TrackResult>;
18
20
  };
@@ -1,6 +1,7 @@
1
1
  import * as swr from 'swr';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
- import { P as Product } from '../cusTypes-CJI8rdlY.mjs';
3
+ import { P as Product } from '../cusTypes-CGXuXu_Y.mjs';
4
+ import 'zod';
4
5
 
5
6
  interface ProductDetails {
6
7
  id?: string;
@@ -1,6 +1,7 @@
1
1
  import * as swr from 'swr';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.js';
3
- import { P as Product } from '../cusTypes-CJI8rdlY.js';
3
+ import { P as Product } from '../cusTypes-CGXuXu_Y.js';
4
+ import 'zod';
4
5
 
5
6
  interface ProductDetails {
6
7
  id?: string;
@@ -1,5 +1,6 @@
1
- import { C as CustomerData, a as Customer } from './cusTypes-CJI8rdlY.mjs';
2
- import { E as Entity } from './entTypes-okM0aeOM.mjs';
1
+ import { C as CustomerData, a as Customer } from './cusTypes-CGXuXu_Y.mjs';
2
+ import { E as Entity } from './entTypes-CJx3GLTt.mjs';
3
+ import 'zod';
3
4
 
4
5
  interface ProductDetails {
5
6
  id: string;
@@ -1,5 +1,6 @@
1
- import { C as CustomerData, a as Customer } from './cusTypes-CJI8rdlY.js';
2
- import { E as Entity } from './entTypes-CqHWTcCX.js';
1
+ import { C as CustomerData, a as Customer } from './cusTypes-CGXuXu_Y.js';
2
+ import { E as Entity } from './entTypes-qYfQsZ9u.js';
3
+ import 'zod';
3
4
 
4
5
  interface ProductDetails {
5
6
  id: string;