autumn-js 0.0.103 → 0.0.104

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 (259) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +28 -4
  2. package/dist/libraries/backend/better-auth.d.ts +28 -4
  3. package/dist/libraries/backend/better-auth.js +76 -83
  4. package/dist/libraries/backend/better-auth.mjs +7 -7
  5. package/dist/libraries/backend/{chunk-YFWJ6E4U.mjs → chunk-2RZ2FZX2.mjs} +10 -10
  6. package/dist/libraries/backend/{chunk-33NT3WE5.mjs → chunk-3OLXYDCU.mjs} +1 -1
  7. package/dist/libraries/backend/{chunk-AKV5N4WO.mjs → chunk-5EKNB4IJ.mjs} +1 -1
  8. package/dist/libraries/backend/{chunk-CEZHD5H6.mjs → chunk-5H6HVCOP.mjs} +1 -1
  9. package/dist/libraries/backend/{chunk-J3L3OBSS.mjs → chunk-HHMIVOXX.mjs} +18 -1
  10. package/dist/libraries/backend/{chunk-6VS7TU7O.mjs → chunk-IOSEAUDJ.mjs} +57 -81
  11. package/dist/libraries/backend/{chunk-RA4AC56B.mjs → chunk-K7JGEYUX.mjs} +1 -1
  12. package/dist/libraries/backend/convex.js +73 -80
  13. package/dist/libraries/backend/convex.mjs +7 -7
  14. package/dist/libraries/backend/elysia.js +73 -80
  15. package/dist/libraries/backend/elysia.mjs +7 -7
  16. package/dist/libraries/backend/express.d.mts +1 -1
  17. package/dist/libraries/backend/express.d.ts +1 -1
  18. package/dist/libraries/backend/express.js +73 -80
  19. package/dist/libraries/backend/express.mjs +7 -7
  20. package/dist/libraries/backend/fastify.js +73 -80
  21. package/dist/libraries/backend/fastify.mjs +7 -7
  22. package/dist/libraries/backend/hono.js +73 -80
  23. package/dist/libraries/backend/hono.mjs +7 -7
  24. package/dist/libraries/backend/next.js +169 -176
  25. package/dist/libraries/backend/next.mjs +101 -101
  26. package/dist/libraries/backend/react-router.js +73 -80
  27. package/dist/libraries/backend/react-router.mjs +7 -7
  28. package/dist/libraries/backend/{referralTypes-DV8s1h8w.d.ts → referralTypes-CnYanpMd.d.ts} +199 -102
  29. package/dist/libraries/backend/{referralTypes-DcDxMGTp.d.mts → referralTypes-jA7MQ1y5.d.mts} +199 -102
  30. package/dist/libraries/backend/remix_dep.js +73 -80
  31. package/dist/libraries/backend/remix_dep.mjs +7 -7
  32. package/dist/libraries/backend/routes/backendRouter.js +73 -80
  33. package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
  34. package/dist/libraries/backend/routes/entityRoutes.js +56 -80
  35. package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
  36. package/dist/libraries/backend/routes/genRoutes.js +73 -80
  37. package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
  38. package/dist/libraries/backend/routes/productRoutes.js +56 -80
  39. package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
  40. package/dist/libraries/backend/routes/referralRoutes.js +56 -80
  41. package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
  42. package/dist/libraries/backend/supabase.js +73 -80
  43. package/dist/libraries/backend/supabase.mjs +7 -7
  44. package/dist/libraries/backend/tanstack.js +73 -80
  45. package/dist/libraries/backend/tanstack.mjs +7 -7
  46. package/dist/libraries/backend/utils/backendRes.js +56 -80
  47. package/dist/libraries/backend/utils/backendRes.mjs +1 -1
  48. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  49. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  50. package/dist/libraries/backend/utils/withAuth.js +56 -80
  51. package/dist/libraries/backend/utils/withAuth.mjs +2 -2
  52. package/dist/libraries/react/AutumnContext.d.mts +5 -4
  53. package/dist/libraries/react/AutumnContext.d.ts +5 -4
  54. package/dist/libraries/react/AutumnContext.js +63 -82
  55. package/dist/libraries/react/AutumnContext.mjs +6 -6
  56. package/dist/libraries/react/BaseAutumnProvider.d.mts +5 -4
  57. package/dist/libraries/react/BaseAutumnProvider.d.ts +5 -4
  58. package/dist/libraries/react/BaseAutumnProvider.js +96 -111
  59. package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
  60. package/dist/libraries/react/{ReactAutumnClient-C8Nt-pqu.d.mts → ReactAutumnClient-BGI56QI_.d.mts} +21 -10
  61. package/dist/libraries/react/{ReactAutumnClient-BlxQQOXE.d.ts → ReactAutumnClient-CEv9YGLM.d.ts} +21 -10
  62. package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
  63. package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
  64. package/dist/libraries/react/ReactAutumnProvider.js +96 -111
  65. package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
  66. package/dist/libraries/react/attachTypes-Cexub7bN.d.ts +58 -0
  67. package/dist/libraries/react/attachTypes-DqI7qtXD.d.mts +58 -0
  68. package/dist/libraries/react/{chunk-VUBJ6JM3.mjs → chunk-253MTZP3.mjs} +7 -2
  69. package/dist/libraries/react/{chunk-RQN4VDAE.mjs → chunk-3N6WLQH3.mjs} +3 -3
  70. package/dist/libraries/react/{chunk-DHJ36QEV.mjs → chunk-473LVTGN.mjs} +2 -2
  71. package/dist/libraries/react/{chunk-LXSKONN2.mjs → chunk-4A53GN44.mjs} +5 -5
  72. package/dist/libraries/react/{chunk-EHOBTSZ7.mjs → chunk-4BQDSIWM.mjs} +5 -8
  73. package/dist/libraries/react/{chunk-S6JUZ43Q.mjs → chunk-4VXBAIPC.mjs} +2 -2
  74. package/dist/libraries/react/{chunk-OAWFFAKA.mjs → chunk-6EZVNJHQ.mjs} +6 -6
  75. package/dist/libraries/react/{chunk-DBGTWERW.mjs → chunk-ASL5VH2W.mjs} +4 -3
  76. package/dist/libraries/react/{chunk-QBBE72EF.mjs → chunk-CBPZVSMZ.mjs} +12 -7
  77. package/dist/libraries/react/chunk-CUWUAQML.mjs +179 -0
  78. package/dist/libraries/react/chunk-DJIRJJNG.mjs +34 -0
  79. package/dist/libraries/react/{chunk-CYW4LNFZ.mjs → chunk-E5EYSQYJ.mjs} +68 -90
  80. package/dist/libraries/react/{chunk-GQIE3MFB.mjs → chunk-EBQBPZCM.mjs} +3 -3
  81. package/dist/libraries/react/{chunk-AL3VJLFU.mjs → chunk-EV5RNY5U.mjs} +1 -1
  82. package/dist/libraries/react/chunk-G6NOGGDA.mjs +695 -0
  83. package/dist/libraries/react/{chunk-OAPUYXBO.mjs → chunk-KWNH6C27.mjs} +6 -6
  84. package/dist/libraries/react/{chunk-X4R3V6O6.mjs → chunk-MNOH7Q3B.mjs} +2 -2
  85. package/dist/libraries/react/{chunk-3SGSKYJ7.mjs → chunk-P5MIFIIO.mjs} +2 -2
  86. package/dist/libraries/react/{chunk-PZJQBCVG.mjs → chunk-PIENO233.mjs} +1 -1
  87. package/dist/libraries/react/chunk-QUO2CYKM.mjs +30 -0
  88. package/dist/libraries/react/{chunk-BCMBFJ7E.mjs → chunk-RCTILKK3.mjs} +70 -37
  89. package/dist/libraries/react/{chunk-ZVQKDPUP.mjs → chunk-RPEGNKJH.mjs} +3 -3
  90. package/dist/libraries/react/{chunk-SDMBKRAI.mjs → chunk-WAFSQH6N.mjs} +37 -37
  91. package/dist/libraries/react/{chunk-CGWNDUYV.mjs → chunk-ZFIJI37N.mjs} +1 -1
  92. package/dist/libraries/react/{chunk-KYSWTOMQ.mjs → chunk-ZITEHPEQ.mjs} +30 -24
  93. package/dist/libraries/react/client/ReactAutumnClient.d.mts +5 -5
  94. package/dist/libraries/react/client/ReactAutumnClient.d.ts +5 -5
  95. package/dist/libraries/react/client/ReactAutumnClient.js +63 -82
  96. package/dist/libraries/react/client/ReactAutumnClient.mjs +5 -5
  97. package/dist/libraries/react/client/clientCompMethods.d.mts +5 -5
  98. package/dist/libraries/react/client/clientCompMethods.d.ts +5 -5
  99. package/dist/libraries/react/client/clientCusMethods.d.mts +5 -5
  100. package/dist/libraries/react/client/clientCusMethods.d.ts +5 -5
  101. package/dist/libraries/react/client/clientEntityMethods.d.mts +5 -5
  102. package/dist/libraries/react/client/clientEntityMethods.d.ts +5 -5
  103. package/dist/libraries/react/client/clientGenMethods.d.mts +9 -7
  104. package/dist/libraries/react/client/clientGenMethods.d.ts +9 -7
  105. package/dist/libraries/react/client/clientGenMethods.js +8 -2
  106. package/dist/libraries/react/client/clientGenMethods.mjs +3 -1
  107. package/dist/libraries/react/client/clientProdMethods.d.mts +5 -5
  108. package/dist/libraries/react/client/clientProdMethods.d.ts +5 -5
  109. package/dist/libraries/react/client/clientReferralMethods.d.mts +5 -5
  110. package/dist/libraries/react/client/clientReferralMethods.d.ts +5 -5
  111. package/dist/libraries/react/client/types/clientAttachTypes.d.mts +115 -0
  112. package/dist/libraries/react/client/types/clientAttachTypes.d.ts +115 -0
  113. package/dist/libraries/react/client/types/clientAttachTypes.js +68 -0
  114. package/dist/libraries/react/client/types/clientAttachTypes.mjs +42 -0
  115. package/dist/libraries/react/client/types/clientGenTypes.d.mts +10 -81
  116. package/dist/libraries/react/client/types/clientGenTypes.d.ts +10 -81
  117. package/dist/libraries/react/client/types/clientGenTypes.js +1 -24
  118. package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -22
  119. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.css +213 -4
  120. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +5 -32
  121. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +5 -32
  122. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +720 -371
  123. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +30 -33
  124. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +3 -2
  125. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +3 -2
  126. package/dist/libraries/react/components/attach-dialog/lib/attach-content.js +70 -37
  127. package/dist/libraries/react/components/attach-dialog/lib/attach-content.mjs +1 -1
  128. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
  129. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
  130. package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +43 -43
  131. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +5 -5
  132. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
  133. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
  134. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +3 -1
  135. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +3 -1
  136. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.js +12 -7
  137. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.mjs +1 -1
  138. package/dist/libraries/react/components/pricing-table/pricing-table-synced.css +213 -4
  139. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  140. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  141. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +794 -456
  142. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +29 -26
  143. package/dist/libraries/react/components/ui/accordion.d.mts +9 -0
  144. package/dist/libraries/react/components/ui/accordion.d.ts +9 -0
  145. package/dist/libraries/react/components/ui/accordion.js +2721 -0
  146. package/dist/libraries/react/components/ui/accordion.mjs +15 -0
  147. package/dist/libraries/react/components/ui/button.d.mts +1 -1
  148. package/dist/libraries/react/components/ui/button.d.ts +1 -1
  149. package/dist/libraries/react/components/ui/button.js +3 -3
  150. package/dist/libraries/react/components/ui/button.mjs +2 -2
  151. package/dist/libraries/react/components/ui/dialog.js +43 -43
  152. package/dist/libraries/react/components/ui/dialog.mjs +3 -3
  153. package/dist/libraries/react/components/ui/input.d.mts +5 -0
  154. package/dist/libraries/react/components/ui/input.d.ts +5 -0
  155. package/dist/libraries/react/components/ui/input.js +2587 -0
  156. package/dist/libraries/react/components/ui/input.mjs +9 -0
  157. package/dist/libraries/react/components/ui/popover.d.mts +9 -0
  158. package/dist/libraries/react/components/ui/popover.d.ts +9 -0
  159. package/dist/libraries/react/components/ui/popover.js +2594 -0
  160. package/dist/libraries/react/components/ui/popover.mjs +15 -0
  161. package/dist/libraries/react/components/ui/switch.js +12 -12
  162. package/dist/libraries/react/components/ui/switch.mjs +3 -3
  163. package/dist/libraries/react/{cusTypes-CHcG59KG.d.mts → cusTypes-DCeNEQLu.d.mts} +28 -10
  164. package/dist/libraries/react/{cusTypes-CHcG59KG.d.ts → cusTypes-DCeNEQLu.d.ts} +28 -10
  165. package/dist/libraries/react/{entTypes-8-4TWxee.d.ts → entTypes-BJD_Hxbp.d.ts} +1 -1
  166. package/dist/libraries/react/{entTypes-3t7AbNhm.d.mts → entTypes-CJhJFCKD.d.mts} +1 -1
  167. package/dist/libraries/react/hooks/handleAllowed.d.mts +2 -2
  168. package/dist/libraries/react/hooks/handleAllowed.d.ts +2 -2
  169. package/dist/libraries/react/hooks/useAutumn.d.mts +21 -6
  170. package/dist/libraries/react/hooks/useAutumn.d.ts +21 -6
  171. package/dist/libraries/react/hooks/useAutumn.js +94 -110
  172. package/dist/libraries/react/hooks/useAutumn.mjs +9 -9
  173. package/dist/libraries/react/hooks/useAutumnBase.d.mts +24 -9
  174. package/dist/libraries/react/hooks/useAutumnBase.d.ts +24 -9
  175. package/dist/libraries/react/hooks/useAutumnBase.js +94 -110
  176. package/dist/libraries/react/hooks/useAutumnBase.mjs +8 -8
  177. package/dist/libraries/react/hooks/useCustomer.d.mts +7 -5
  178. package/dist/libraries/react/hooks/useCustomer.d.ts +7 -5
  179. package/dist/libraries/react/hooks/useCustomer.js +96 -111
  180. package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
  181. package/dist/libraries/react/hooks/useCustomerBase.d.mts +8 -5
  182. package/dist/libraries/react/hooks/useCustomerBase.d.ts +8 -5
  183. package/dist/libraries/react/hooks/useCustomerBase.js +96 -111
  184. package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
  185. package/dist/libraries/react/hooks/useEntity.d.mts +14 -7
  186. package/dist/libraries/react/hooks/useEntity.d.ts +14 -7
  187. package/dist/libraries/react/hooks/useEntity.js +94 -110
  188. package/dist/libraries/react/hooks/useEntity.mjs +10 -10
  189. package/dist/libraries/react/hooks/useEntityBase.d.mts +16 -7
  190. package/dist/libraries/react/hooks/useEntityBase.d.ts +16 -7
  191. package/dist/libraries/react/hooks/useEntityBase.js +94 -110
  192. package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
  193. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  194. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  195. package/dist/libraries/react/hooks/usePricingTable.js +66 -88
  196. package/dist/libraries/react/hooks/usePricingTable.mjs +8 -8
  197. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
  198. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
  199. package/dist/libraries/react/hooks/usePricingTableBase.js +66 -88
  200. package/dist/libraries/react/hooks/usePricingTableBase.mjs +7 -7
  201. package/dist/libraries/react/hooks/useProductsBase.js +63 -82
  202. package/dist/libraries/react/hooks/useProductsBase.mjs +6 -6
  203. package/dist/libraries/react/index.d.mts +217 -106
  204. package/dist/libraries/react/index.d.ts +217 -106
  205. package/dist/libraries/react/index.js +801 -463
  206. package/dist/libraries/react/index.mjs +792 -454
  207. package/dist/libraries/react/{response-DnJCkvfc.d.ts → response-Dek2TEnE.d.ts} +2 -25
  208. package/dist/libraries/react/{response-B8MYd86O.d.mts → response-HZAWTgGp.d.mts} +2 -25
  209. package/dist/next/{AutumnProvider-Xl1mqxls.d.mts → AutumnProvider-CHFySjFm.d.mts} +30 -12
  210. package/dist/next/{AutumnProvider-Xl1mqxls.d.ts → AutumnProvider-CHFySjFm.d.ts} +30 -12
  211. package/dist/next/AutumnProvider.d.mts +1 -1
  212. package/dist/next/AutumnProvider.d.ts +1 -1
  213. package/dist/next/client/NextAutumnClient.d.mts +18 -7
  214. package/dist/next/client/NextAutumnClient.d.ts +18 -7
  215. package/dist/next/client/NextAutumnClient.js +13 -2
  216. package/dist/next/client/NextAutumnClient.mjs +13 -2
  217. package/dist/next/client/NextAutumnProvider.d.mts +1 -1
  218. package/dist/next/client/NextAutumnProvider.d.ts +1 -1
  219. package/dist/next/client/attachTypes-BL6x9Zbx.d.ts +58 -0
  220. package/dist/next/client/attachTypes-BPYeJ6E4.d.mts +58 -0
  221. package/dist/next/client/{clientGenTypes-Dx1TULjb.d.ts → clientAttachTypes-Dj6U8D7o.d.ts} +108 -90
  222. package/dist/next/client/{clientGenTypes-tE8HbEdV.d.mts → clientAttachTypes-fN66J754.d.mts} +108 -90
  223. package/dist/next/client/clientUtils.d.mts +2 -2
  224. package/dist/next/client/clientUtils.d.ts +2 -2
  225. package/dist/next/client/{cusTypes-nWQygxXu.d.mts → cusTypes-BoVZ2omf.d.mts} +32 -14
  226. package/dist/next/client/{cusTypes-nWQygxXu.d.ts → cusTypes-BoVZ2omf.d.ts} +32 -14
  227. package/dist/next/client/{entTypes-DDZyYuom.d.ts → entTypes-BrHkjvC9.d.ts} +1 -1
  228. package/dist/next/client/{entTypes-DusU3WqD.d.mts → entTypes-Li6ZrG0C.d.mts} +1 -1
  229. package/dist/next/client/hooks/useAutumn.d.mts +19 -5
  230. package/dist/next/client/hooks/useAutumn.d.ts +19 -5
  231. package/dist/next/client/hooks/useCustomer.d.mts +5 -4
  232. package/dist/next/client/hooks/useCustomer.d.ts +5 -4
  233. package/dist/next/client/hooks/useEntity.d.mts +14 -8
  234. package/dist/next/client/hooks/useEntity.d.ts +14 -8
  235. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  236. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  237. package/dist/next/client/types.d.mts +2 -2
  238. package/dist/next/client/types.d.ts +2 -2
  239. package/dist/next/index.d.mts +213 -107
  240. package/dist/next/index.d.ts +213 -107
  241. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  242. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  243. package/dist/next/server/componentActions.d.mts +1 -1
  244. package/dist/next/server/componentActions.d.ts +1 -1
  245. package/dist/next/server/cusActions.d.mts +173 -94
  246. package/dist/next/server/cusActions.d.ts +173 -94
  247. package/dist/next/server/{cusTypes-Tc189V9T.d.mts → cusTypes-Bh_pVAJp.d.mts} +32 -14
  248. package/dist/next/server/{cusTypes-Tc189V9T.d.ts → cusTypes-Bh_pVAJp.d.ts} +32 -14
  249. package/dist/next/server/genActions.d.mts +3 -4
  250. package/dist/next/server/genActions.d.ts +3 -4
  251. package/dist/sdk/index.d.mts +221 -135
  252. package/dist/sdk/index.d.ts +221 -135
  253. package/dist/sdk/index.js +55 -80
  254. package/dist/sdk/index.mjs +54 -81
  255. package/dist/styles/global.css +213 -4
  256. package/dist/utils/encryptUtils.js +56 -80
  257. package/dist/utils/encryptUtils.mjs +56 -80
  258. package/package.json +7 -4
  259. package/dist/libraries/react/chunk-ZEVKOP7Z.mjs +0 -548
@@ -1,30 +1,7 @@
1
- import { j as CheckFeatureResult, k as CheckProductResult } from './cusTypes-CHcG59KG.js';
1
+ import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-DCeNEQLu.js';
2
2
  import { z } from 'zod';
3
3
  import { A as AutumnError } from './error-DHbclCVh.js';
4
4
 
5
- declare const AttachResultSchema: z.ZodObject<{
6
- checkout_url: z.ZodOptional<z.ZodString>;
7
- customer_id: z.ZodString;
8
- product_ids: z.ZodArray<z.ZodString, "many">;
9
- code: z.ZodString;
10
- message: z.ZodString;
11
- customer_data: z.ZodOptional<z.ZodAny>;
12
- }, "strip", z.ZodTypeAny, {
13
- customer_id: string;
14
- code: string;
15
- message: string;
16
- product_ids: string[];
17
- customer_data?: any;
18
- checkout_url?: string | undefined;
19
- }, {
20
- customer_id: string;
21
- code: string;
22
- message: string;
23
- product_ids: string[];
24
- customer_data?: any;
25
- checkout_url?: string | undefined;
26
- }>;
27
- type AttachResult = z.infer<typeof AttachResultSchema>;
28
5
  declare const CancelResultSchema: z.ZodObject<{
29
6
  success: z.ZodBoolean;
30
7
  customer_id: z.ZodString;
@@ -78,4 +55,4 @@ type Failure<E> = {
78
55
  type Result<T, E> = Success<T> | Failure<E>;
79
56
  type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
80
57
 
81
- export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, AttachResult as a, CheckResult as b };
58
+ export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
@@ -1,30 +1,7 @@
1
- import { j as CheckFeatureResult, k as CheckProductResult } from './cusTypes-CHcG59KG.mjs';
1
+ import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-DCeNEQLu.mjs';
2
2
  import { z } from 'zod';
3
3
  import { A as AutumnError } from './error-DHbclCVh.mjs';
4
4
 
5
- declare const AttachResultSchema: z.ZodObject<{
6
- checkout_url: z.ZodOptional<z.ZodString>;
7
- customer_id: z.ZodString;
8
- product_ids: z.ZodArray<z.ZodString, "many">;
9
- code: z.ZodString;
10
- message: z.ZodString;
11
- customer_data: z.ZodOptional<z.ZodAny>;
12
- }, "strip", z.ZodTypeAny, {
13
- customer_id: string;
14
- code: string;
15
- message: string;
16
- product_ids: string[];
17
- customer_data?: any;
18
- checkout_url?: string | undefined;
19
- }, {
20
- customer_id: string;
21
- code: string;
22
- message: string;
23
- product_ids: string[];
24
- customer_data?: any;
25
- checkout_url?: string | undefined;
26
- }>;
27
- type AttachResult = z.infer<typeof AttachResultSchema>;
28
5
  declare const CancelResultSchema: z.ZodObject<{
29
6
  success: z.ZodBoolean;
30
7
  customer_id: z.ZodString;
@@ -78,4 +55,4 @@ type Failure<E> = {
78
55
  type Result<T, E> = Success<T> | Failure<E>;
79
56
  type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
80
57
 
81
- export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, AttachResult as a, CheckResult as b };
58
+ export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
@@ -89,10 +89,17 @@ declare enum AppEnv {
89
89
  Live = "live"
90
90
  }
91
91
 
92
+ interface Feature {
93
+ id: string;
94
+ name: string;
95
+ type: "boolean" | "continuous_use" | "single_use" | "credit_system";
96
+ }
92
97
  interface ProductItem {
98
+ type?: "feature" | "priced_feature" | "price";
93
99
  feature_id?: string;
94
100
  included_usage?: number | typeof Infinite;
95
101
  interval?: ProductItemIntervalType;
102
+ feature?: Feature;
96
103
  usage_model?: UsageModel;
97
104
  price?: number;
98
105
  billing_units?: number;
@@ -124,10 +131,12 @@ interface Product {
124
131
  free_trial: FreeTrial | null;
125
132
  scenario?: ProductScenario;
126
133
  base_variant_id: string | null;
127
- properties?: {
128
- is_free?: boolean;
129
- is_one_off?: boolean;
130
- interval_group?: string;
134
+ properties: {
135
+ is_free: boolean;
136
+ is_one_off: boolean;
137
+ interval_group: string;
138
+ has_trial: boolean;
139
+ has_prepaid: boolean;
131
140
  };
132
141
  display?: {
133
142
  name?: string;
@@ -204,11 +213,20 @@ interface Customer {
204
213
  features: Record<string, CustomerFeature>;
205
214
  invoices?: CustomerInvoice[];
206
215
  }
207
- interface CustomerData {
208
- name?: string;
209
- email?: string;
210
- fingerprint?: string;
211
- }
216
+ declare const CustomerDataSchema: z.ZodObject<{
217
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
218
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ name?: string | null | undefined;
222
+ email?: string | null | undefined;
223
+ fingerprint?: string | null | undefined;
224
+ }, {
225
+ name?: string | null | undefined;
226
+ email?: string | null | undefined;
227
+ fingerprint?: string | null | undefined;
228
+ }>;
229
+ type CustomerData = z.infer<typeof CustomerDataSchema>;
212
230
  declare const CreateCustomerParamsSchema: z.ZodObject<{
213
231
  id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
232
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -217,17 +235,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
217
235
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
218
236
  expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
219
237
  }, "strip", z.ZodTypeAny, {
220
- id?: string | null | undefined;
221
238
  name?: string | null | undefined;
222
239
  email?: string | null | undefined;
223
240
  fingerprint?: string | null | undefined;
241
+ id?: string | null | undefined;
224
242
  metadata?: Record<string, any> | undefined;
225
243
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
226
244
  }, {
227
- id?: string | null | undefined;
228
245
  name?: string | null | undefined;
229
246
  email?: string | null | undefined;
230
247
  fingerprint?: string | null | undefined;
248
+ id?: string | null | undefined;
231
249
  metadata?: Record<string, any> | undefined;
232
250
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
233
251
  }>;
@@ -264,4 +282,4 @@ interface AutumnProviderProps {
264
282
  }
265
283
  declare const AutumnProvider: ({ customerId, customerData, authPlugin, children, }: AutumnProviderProps) => react_jsx_runtime.JSX.Element;
266
284
 
267
- export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type ProductScenario as b, type CustomerProduct as c, type CustomerFeature as d, type CustomerInvoice as e, type CustomerData as f, type CreateCustomerParams as g, type Customer as h, type Product as i, type CustomerExpandOption as j };
285
+ export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type Product as b, type ProductScenario as c, type CustomerProduct as d, type CustomerFeature as e, type CustomerInvoice as f, type CustomerData as g, type CreateCustomerParams as h, type Customer as i, type CustomerExpandOption as j };
@@ -89,10 +89,17 @@ declare enum AppEnv {
89
89
  Live = "live"
90
90
  }
91
91
 
92
+ interface Feature {
93
+ id: string;
94
+ name: string;
95
+ type: "boolean" | "continuous_use" | "single_use" | "credit_system";
96
+ }
92
97
  interface ProductItem {
98
+ type?: "feature" | "priced_feature" | "price";
93
99
  feature_id?: string;
94
100
  included_usage?: number | typeof Infinite;
95
101
  interval?: ProductItemIntervalType;
102
+ feature?: Feature;
96
103
  usage_model?: UsageModel;
97
104
  price?: number;
98
105
  billing_units?: number;
@@ -124,10 +131,12 @@ interface Product {
124
131
  free_trial: FreeTrial | null;
125
132
  scenario?: ProductScenario;
126
133
  base_variant_id: string | null;
127
- properties?: {
128
- is_free?: boolean;
129
- is_one_off?: boolean;
130
- interval_group?: string;
134
+ properties: {
135
+ is_free: boolean;
136
+ is_one_off: boolean;
137
+ interval_group: string;
138
+ has_trial: boolean;
139
+ has_prepaid: boolean;
131
140
  };
132
141
  display?: {
133
142
  name?: string;
@@ -204,11 +213,20 @@ interface Customer {
204
213
  features: Record<string, CustomerFeature>;
205
214
  invoices?: CustomerInvoice[];
206
215
  }
207
- interface CustomerData {
208
- name?: string;
209
- email?: string;
210
- fingerprint?: string;
211
- }
216
+ declare const CustomerDataSchema: z.ZodObject<{
217
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
218
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ name?: string | null | undefined;
222
+ email?: string | null | undefined;
223
+ fingerprint?: string | null | undefined;
224
+ }, {
225
+ name?: string | null | undefined;
226
+ email?: string | null | undefined;
227
+ fingerprint?: string | null | undefined;
228
+ }>;
229
+ type CustomerData = z.infer<typeof CustomerDataSchema>;
212
230
  declare const CreateCustomerParamsSchema: z.ZodObject<{
213
231
  id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
232
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -217,17 +235,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
217
235
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
218
236
  expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
219
237
  }, "strip", z.ZodTypeAny, {
220
- id?: string | null | undefined;
221
238
  name?: string | null | undefined;
222
239
  email?: string | null | undefined;
223
240
  fingerprint?: string | null | undefined;
241
+ id?: string | null | undefined;
224
242
  metadata?: Record<string, any> | undefined;
225
243
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
226
244
  }, {
227
- id?: string | null | undefined;
228
245
  name?: string | null | undefined;
229
246
  email?: string | null | undefined;
230
247
  fingerprint?: string | null | undefined;
248
+ id?: string | null | undefined;
231
249
  metadata?: Record<string, any> | undefined;
232
250
  expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
233
251
  }>;
@@ -264,4 +282,4 @@ interface AutumnProviderProps {
264
282
  }
265
283
  declare const AutumnProvider: ({ customerId, customerData, authPlugin, children, }: AutumnProviderProps) => react_jsx_runtime.JSX.Element;
266
284
 
267
- export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type ProductScenario as b, type CustomerProduct as c, type CustomerFeature as d, type CustomerInvoice as e, type CustomerData as f, type CreateCustomerParams as g, type Customer as h, type Product as i, type CustomerExpandOption as j };
285
+ export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type Product as b, type ProductScenario as c, type CustomerProduct as d, type CustomerFeature as e, type CustomerInvoice as f, type CustomerData as g, type CreateCustomerParams as h, type Customer as i, type CustomerExpandOption as j };
@@ -1,3 +1,3 @@
1
1
  import 'react/jsx-runtime';
2
- export { A as AutumnProvider } from './AutumnProvider-Xl1mqxls.mjs';
2
+ export { A as AutumnProvider } from './AutumnProvider-CHFySjFm.mjs';
3
3
  import 'zod';
@@ -1,3 +1,3 @@
1
1
  import 'react/jsx-runtime';
2
- export { A as AutumnProvider } from './AutumnProvider-Xl1mqxls.js';
2
+ export { A as AutumnProvider } from './AutumnProvider-CHFySjFm.js';
3
3
  import 'zod';
@@ -1,8 +1,8 @@
1
- import { R as Result, a as AutumnPromise, b as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, g as AttachResult, d as CancelParams, e as CancelResult, C as CheckParams, T as TrackParams, c as TrackResult } from './clientGenTypes-tE8HbEdV.mjs';
2
- import { e as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, P as Product } from './cusTypes-nWQygxXu.mjs';
3
- import { E as Entity, D as DeleteEntityResult } from './entTypes-DusU3WqD.mjs';
1
+ import { R as Result, b as AutumnPromise, C as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, d as CancelParams, e as CancelResult, a as CheckParams, T as TrackParams, c as TrackResult } from './clientAttachTypes-fN66J754.mjs';
2
+ import { C as CheckoutResult, A as AttachResult } from './attachTypes-BPYeJ6E4.mjs';
3
+ import { P as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, b as Product } from './cusTypes-BoVZ2omf.mjs';
4
+ import { E as Entity, D as DeleteEntityResult } from './entTypes-Li6ZrG0C.mjs';
4
5
  import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.mjs';
5
- import * as react from 'react';
6
6
  import { A as AutumnError } from './error-DHbclCVh.mjs';
7
7
  import 'zod';
8
8
 
@@ -73,7 +73,7 @@ declare class AutumnClient {
73
73
  freeTrial?: boolean | undefined;
74
74
  successUrl?: string | undefined;
75
75
  forceCheckout?: boolean | undefined;
76
- dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
76
+ dialog?: any;
77
77
  entityData?: any;
78
78
  openInNewTab?: boolean | undefined;
79
79
  reward?: string | undefined;
@@ -86,6 +86,17 @@ declare class AutumnClient {
86
86
  checkout_url?: string | undefined;
87
87
  customer_data?: any;
88
88
  }>;
89
+ checkout: (params: {
90
+ productId: string;
91
+ options?: {
92
+ featureId: string;
93
+ quantity: number;
94
+ }[] | undefined;
95
+ entityId?: string | undefined;
96
+ successUrl?: string | undefined;
97
+ dialog?: any;
98
+ openInNewTab?: boolean | undefined;
99
+ }) => AutumnPromise<CheckoutResult>;
89
100
  cancel: (params: {
90
101
  productId: string;
91
102
  entityId?: string | undefined;
@@ -99,7 +110,7 @@ declare class AutumnClient {
99
110
  productId?: string | undefined;
100
111
  entityId?: string | undefined;
101
112
  featureId?: string | undefined;
102
- dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
113
+ dialog?: any;
103
114
  entityData?: any;
104
115
  requiredBalance?: number | undefined;
105
116
  sendEvent?: boolean | undefined;
@@ -113,8 +124,8 @@ declare class AutumnClient {
113
124
  eventName?: string | undefined;
114
125
  idempotencyKey?: string | undefined;
115
126
  }) => AutumnPromise<{
116
- id: string;
117
127
  code: string;
128
+ id: string;
118
129
  customer_id: string;
119
130
  feature_id?: string | undefined;
120
131
  event_name?: string | undefined;
@@ -1,8 +1,8 @@
1
- import { R as Result, a as AutumnPromise, b as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, g as AttachResult, d as CancelParams, e as CancelResult, C as CheckParams, T as TrackParams, c as TrackResult } from './clientGenTypes-Dx1TULjb.js';
2
- import { e as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, P as Product } from './cusTypes-nWQygxXu.js';
3
- import { E as Entity, D as DeleteEntityResult } from './entTypes-DDZyYuom.js';
1
+ import { R as Result, b as AutumnPromise, C as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, d as CancelParams, e as CancelResult, a as CheckParams, T as TrackParams, c as TrackResult } from './clientAttachTypes-Dj6U8D7o.js';
2
+ import { C as CheckoutResult, A as AttachResult } from './attachTypes-BL6x9Zbx.js';
3
+ import { P as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, b as Product } from './cusTypes-BoVZ2omf.js';
4
+ import { E as Entity, D as DeleteEntityResult } from './entTypes-BrHkjvC9.js';
4
5
  import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.js';
5
- import * as react from 'react';
6
6
  import { A as AutumnError } from './error-DHbclCVh.js';
7
7
  import 'zod';
8
8
 
@@ -73,7 +73,7 @@ declare class AutumnClient {
73
73
  freeTrial?: boolean | undefined;
74
74
  successUrl?: string | undefined;
75
75
  forceCheckout?: boolean | undefined;
76
- dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
76
+ dialog?: any;
77
77
  entityData?: any;
78
78
  openInNewTab?: boolean | undefined;
79
79
  reward?: string | undefined;
@@ -86,6 +86,17 @@ declare class AutumnClient {
86
86
  checkout_url?: string | undefined;
87
87
  customer_data?: any;
88
88
  }>;
89
+ checkout: (params: {
90
+ productId: string;
91
+ options?: {
92
+ featureId: string;
93
+ quantity: number;
94
+ }[] | undefined;
95
+ entityId?: string | undefined;
96
+ successUrl?: string | undefined;
97
+ dialog?: any;
98
+ openInNewTab?: boolean | undefined;
99
+ }) => AutumnPromise<CheckoutResult>;
89
100
  cancel: (params: {
90
101
  productId: string;
91
102
  entityId?: string | undefined;
@@ -99,7 +110,7 @@ declare class AutumnClient {
99
110
  productId?: string | undefined;
100
111
  entityId?: string | undefined;
101
112
  featureId?: string | undefined;
102
- dialog?: ((args_0: any, ...args: unknown[]) => react.ReactNode | JSX.Element) | undefined;
113
+ dialog?: any;
103
114
  entityData?: any;
104
115
  requiredBalance?: number | undefined;
105
116
  sendEvent?: boolean | undefined;
@@ -113,8 +124,8 @@ declare class AutumnClient {
113
124
  eventName?: string | undefined;
114
125
  idempotencyKey?: string | undefined;
115
126
  }) => AutumnPromise<{
116
- id: string;
117
127
  code: string;
128
+ id: string;
118
129
  customer_id: string;
119
130
  feature_id?: string | undefined;
120
131
  event_name?: string | undefined;
@@ -1,9 +1,20 @@
1
1
  "use client";
2
2
 
3
3
  import { AutumnClient } from "../../libraries/react/client/ReactAutumnClient";
4
- import { createCusAction, createEntityAction, deleteEntityAction, getEntityAction } from "../server/cusActions";
4
+ import {
5
+ createCusAction,
6
+ createEntityAction,
7
+ deleteEntityAction,
8
+ getEntityAction
9
+ } from "../server/cusActions";
5
10
  import { getPricingTableAction } from "../server/componentActions";
6
- import { attachAction, cancelAction, checkAction, getBillingPortalAction, trackAction } from "../server/genActions";
11
+ import {
12
+ attachAction,
13
+ cancelAction,
14
+ checkAction,
15
+ getBillingPortalAction,
16
+ trackAction
17
+ } from "../server/genActions";
7
18
  class NextAutumnClient extends AutumnClient {
8
19
  encryptedCustomerId;
9
20
  constructor({ encryptedCustomerId, customerData }) {
@@ -1,9 +1,20 @@
1
1
  "use client";
2
2
 
3
3
  import { AutumnClient } from "../../libraries/react/client/ReactAutumnClient";
4
- import { createCusAction, createEntityAction, deleteEntityAction, getEntityAction } from "../server/cusActions";
4
+ import {
5
+ createCusAction,
6
+ createEntityAction,
7
+ deleteEntityAction,
8
+ getEntityAction
9
+ } from "../server/cusActions";
5
10
  import { getPricingTableAction } from "../server/componentActions";
6
- import { attachAction, cancelAction, checkAction, getBillingPortalAction, trackAction } from "../server/genActions";
11
+ import {
12
+ attachAction,
13
+ cancelAction,
14
+ checkAction,
15
+ getBillingPortalAction,
16
+ trackAction
17
+ } from "../server/genActions";
7
18
  class NextAutumnClient extends AutumnClient {
8
19
  encryptedCustomerId;
9
20
  constructor({ encryptedCustomerId, customerData }) {
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CustomerData } from './cusTypes-nWQygxXu.mjs';
2
+ import { C as CustomerData } from './cusTypes-BoVZ2omf.mjs';
3
3
  import 'zod';
4
4
 
5
5
  declare const NextAutumnProvider: ({ encryptedCustomerId, customerData, children, }: {
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CustomerData } from './cusTypes-nWQygxXu.js';
2
+ import { C as CustomerData } from './cusTypes-BoVZ2omf.js';
3
3
  import 'zod';
4
4
 
5
5
  declare const NextAutumnProvider: ({ encryptedCustomerId, customerData, children, }: {
@@ -0,0 +1,58 @@
1
+ import { P as ProductItem, b as Product } from './cusTypes-BoVZ2omf.js';
2
+ import { z } from 'zod';
3
+
4
+ declare const AttachFeatureOptionsSchema: z.ZodObject<{
5
+ feature_id: z.ZodString;
6
+ quantity: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ quantity: number;
9
+ feature_id: string;
10
+ }, {
11
+ quantity: number;
12
+ feature_id: string;
13
+ }>;
14
+ type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
15
+ declare const AttachResultSchema: z.ZodObject<{
16
+ checkout_url: z.ZodOptional<z.ZodString>;
17
+ customer_id: z.ZodString;
18
+ product_ids: z.ZodArray<z.ZodString, "many">;
19
+ code: z.ZodString;
20
+ message: z.ZodString;
21
+ customer_data: z.ZodOptional<z.ZodAny>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ code: string;
24
+ message: string;
25
+ customer_id: string;
26
+ product_ids: string[];
27
+ checkout_url?: string | undefined;
28
+ customer_data?: any;
29
+ }, {
30
+ code: string;
31
+ message: string;
32
+ customer_id: string;
33
+ product_ids: string[];
34
+ checkout_url?: string | undefined;
35
+ customer_data?: any;
36
+ }>;
37
+ type AttachResult = z.infer<typeof AttachResultSchema>;
38
+ type CheckoutResult = {
39
+ url?: string;
40
+ customer_id: string;
41
+ has_prorations: boolean;
42
+ lines: {
43
+ description: string;
44
+ amount: number;
45
+ item: ProductItem;
46
+ }[];
47
+ total: number;
48
+ currency: string;
49
+ options: AttachFeatureOptions[];
50
+ product: Product;
51
+ current_product: Product;
52
+ next_cycle?: {
53
+ starts_at: number;
54
+ total: number;
55
+ };
56
+ };
57
+
58
+ export type { AttachResult as A, CheckoutResult as C };
@@ -0,0 +1,58 @@
1
+ import { P as ProductItem, b as Product } from './cusTypes-BoVZ2omf.mjs';
2
+ import { z } from 'zod';
3
+
4
+ declare const AttachFeatureOptionsSchema: z.ZodObject<{
5
+ feature_id: z.ZodString;
6
+ quantity: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ quantity: number;
9
+ feature_id: string;
10
+ }, {
11
+ quantity: number;
12
+ feature_id: string;
13
+ }>;
14
+ type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
15
+ declare const AttachResultSchema: z.ZodObject<{
16
+ checkout_url: z.ZodOptional<z.ZodString>;
17
+ customer_id: z.ZodString;
18
+ product_ids: z.ZodArray<z.ZodString, "many">;
19
+ code: z.ZodString;
20
+ message: z.ZodString;
21
+ customer_data: z.ZodOptional<z.ZodAny>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ code: string;
24
+ message: string;
25
+ customer_id: string;
26
+ product_ids: string[];
27
+ checkout_url?: string | undefined;
28
+ customer_data?: any;
29
+ }, {
30
+ code: string;
31
+ message: string;
32
+ customer_id: string;
33
+ product_ids: string[];
34
+ checkout_url?: string | undefined;
35
+ customer_data?: any;
36
+ }>;
37
+ type AttachResult = z.infer<typeof AttachResultSchema>;
38
+ type CheckoutResult = {
39
+ url?: string;
40
+ customer_id: string;
41
+ has_prorations: boolean;
42
+ lines: {
43
+ description: string;
44
+ amount: number;
45
+ item: ProductItem;
46
+ }[];
47
+ total: number;
48
+ currency: string;
49
+ options: AttachFeatureOptions[];
50
+ product: Product;
51
+ current_product: Product;
52
+ next_cycle?: {
53
+ starts_at: number;
54
+ total: number;
55
+ };
56
+ };
57
+
58
+ export type { AttachResult as A, CheckoutResult as C };