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
@@ -3,20 +3,20 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-52OTZ4SQ.mjs";
7
- import "./chunk-DG3FZZQH.mjs";
8
- import "./chunk-UJQBHXII.mjs";
9
- import "./chunk-A46IKTLH.mjs";
10
- import "./chunk-WDRHQJKV.mjs";
11
- import "./chunk-J3QM5KFT.mjs";
6
+ } from "./chunk-NTFR7Z2G.mjs";
7
+ import "./chunk-VFTHGJ5N.mjs";
8
+ import "./chunk-U7335VZS.mjs";
9
+ import "./chunk-FCEB2GBS.mjs";
10
+ import "./chunk-JPNRDMMC.mjs";
11
+ import "./chunk-7QSJB2C5.mjs";
12
12
  import {
13
13
  Autumn
14
- } from "./chunk-VCEQ3QBX.mjs";
14
+ } from "./chunk-V6M7KRGN.mjs";
15
15
  import "./chunk-45WVZY23.mjs";
16
16
  import {
17
17
  autumnApiUrl
18
18
  } from "./chunk-KSG3E4Q2.mjs";
19
- import "./chunk-XGB3TDIC.mjs";
19
+ import "./chunk-6DZX6EAA.mjs";
20
20
 
21
21
  // src/libraries/backend/react-router.ts
22
22
  import { findRoute } from "rou3";
@@ -1,3 +1,4 @@
1
+ import { z } from 'zod';
1
2
  import { R as Result, A as AutumnError } from './response-CV6KGWH5.js';
2
3
 
3
4
  declare const Infinite = "inf";
@@ -30,6 +31,7 @@ interface CheckFeatureResult extends CoreCustomerFeature {
30
31
  entity_id?: string;
31
32
  required_balance: number;
32
33
  code: string;
34
+ usage_limit?: number;
33
35
  preview?: CheckFeaturePreview;
34
36
  }
35
37
  interface CheckFeaturePreview {
@@ -165,6 +167,7 @@ interface CoreCustomerFeature {
165
167
  included_usage?: number;
166
168
  next_reset_at?: number | null;
167
169
  overage_allowed?: boolean;
170
+ usage_limit?: number;
168
171
  breakdown?: {
169
172
  interval: ProductItemInterval;
170
173
  balance?: number;
@@ -219,14 +222,29 @@ interface CustomerData {
219
222
  interface GetCustomerParams {
220
223
  expand?: CustomerExpandOption[];
221
224
  }
222
- interface CreateCustomerParams {
223
- id?: string | null;
224
- email?: string | null;
225
- name?: string | null;
226
- fingerprint?: string | null;
227
- metadata?: Record<string, any>;
228
- expand?: CustomerExpandOption[];
229
- }
225
+ declare const CreateCustomerParamsSchema: z.ZodObject<{
226
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
228
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
231
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ metadata?: Record<string, any> | undefined;
234
+ id?: string | null | undefined;
235
+ name?: string | null | undefined;
236
+ email?: string | null | undefined;
237
+ fingerprint?: string | null | undefined;
238
+ expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
239
+ }, {
240
+ metadata?: Record<string, any> | undefined;
241
+ id?: string | null | undefined;
242
+ name?: string | null | undefined;
243
+ email?: string | null | undefined;
244
+ fingerprint?: string | null | undefined;
245
+ expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
246
+ }>;
247
+ type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
230
248
  interface UpdateCustomerParams {
231
249
  id?: string | null;
232
250
  name?: string | null;
@@ -243,6 +261,7 @@ interface CustomerInvoice {
243
261
  total: number;
244
262
  currency: string;
245
263
  created_at: number;
264
+ hosted_invoice_url: string;
246
265
  }
247
266
 
248
267
  type EntityExpandOption = "invoices";
@@ -277,25 +296,65 @@ interface EntityData {
277
296
  feature_id: string;
278
297
  }
279
298
 
280
- interface AttachFeatureOptions {
281
- feature_id: string;
282
- quantity: number;
283
- }
284
- interface AttachParams {
299
+ declare const AttachParamsSchema: z.ZodObject<{
300
+ customer_id: z.ZodString;
301
+ product_id: z.ZodOptional<z.ZodString>;
302
+ entity_id: z.ZodOptional<z.ZodString>;
303
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
+ feature_id: z.ZodString;
305
+ quantity: z.ZodNumber;
306
+ }, "strip", z.ZodTypeAny, {
307
+ quantity: number;
308
+ feature_id: string;
309
+ }, {
310
+ quantity: number;
311
+ feature_id: string;
312
+ }>, "many">>;
313
+ product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
314
+ free_trial: z.ZodOptional<z.ZodBoolean>;
315
+ success_url: z.ZodOptional<z.ZodString>;
316
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
317
+ force_checkout: z.ZodOptional<z.ZodBoolean>;
318
+ customer_data: z.ZodOptional<z.ZodAny>;
319
+ entity_data: z.ZodOptional<z.ZodAny>;
320
+ checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
321
+ reward: z.ZodOptional<z.ZodString>;
322
+ }, "strip", z.ZodTypeAny, {
285
323
  customer_id: string;
286
- product_id?: string;
287
- entity_id?: string;
288
- options?: AttachFeatureOptions[];
289
- product_ids?: string[];
290
- free_trial?: boolean;
291
- success_url?: string;
292
- metadata?: Record<string, string>;
293
- force_checkout?: boolean;
294
- customer_data?: CustomerData;
295
- entity_data?: EntityData;
296
- checkout_session_params?: Record<string, any>;
297
- reward?: string;
298
- }
324
+ metadata?: Record<string, string> | undefined;
325
+ options?: {
326
+ quantity: number;
327
+ feature_id: string;
328
+ }[] | undefined;
329
+ reward?: string | undefined;
330
+ entity_id?: string | undefined;
331
+ product_id?: string | undefined;
332
+ product_ids?: string[] | undefined;
333
+ free_trial?: boolean | undefined;
334
+ success_url?: string | undefined;
335
+ force_checkout?: boolean | undefined;
336
+ customer_data?: any;
337
+ entity_data?: any;
338
+ checkout_session_params?: Record<string, any> | undefined;
339
+ }, {
340
+ customer_id: string;
341
+ metadata?: Record<string, string> | undefined;
342
+ options?: {
343
+ quantity: number;
344
+ feature_id: string;
345
+ }[] | undefined;
346
+ reward?: string | undefined;
347
+ entity_id?: string | undefined;
348
+ product_id?: string | undefined;
349
+ product_ids?: string[] | undefined;
350
+ free_trial?: boolean | undefined;
351
+ success_url?: string | undefined;
352
+ force_checkout?: boolean | undefined;
353
+ customer_data?: any;
354
+ entity_data?: any;
355
+ checkout_session_params?: Record<string, any> | undefined;
356
+ }>;
357
+ type AttachParams = z.infer<typeof AttachParamsSchema>;
299
358
  interface CancelParams {
300
359
  customer_id: string;
301
360
  product_id: string;
@@ -307,14 +366,6 @@ interface CancelResult {
307
366
  customer_id: string;
308
367
  product_id: string;
309
368
  }
310
- interface AttachResult {
311
- checkout_url?: string;
312
- customer_id: string;
313
- product_ids: string[];
314
- code: string;
315
- message: string;
316
- customer_data?: CustomerData;
317
- }
318
369
  interface TrackParams {
319
370
  customer_id: string;
320
371
  value?: number;
@@ -428,9 +479,23 @@ declare class Autumn {
428
479
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
429
480
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
430
481
  };
431
- static attach: (params: AttachParams) => Promise<Result<AttachResult, AutumnError>>;
482
+ static attach: (params: AttachParams) => Promise<Result<{
483
+ message: string;
484
+ code: string;
485
+ customer_id: string;
486
+ product_ids: string[];
487
+ customer_data?: any;
488
+ checkout_url?: string | undefined;
489
+ }, AutumnError>>;
432
490
  static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
433
- attach(params: AttachParams): Promise<Result<AttachResult, AutumnError>>;
491
+ attach(params: AttachParams): Promise<Result<{
492
+ message: string;
493
+ code: string;
494
+ customer_id: string;
495
+ product_ids: string[];
496
+ customer_data?: any;
497
+ checkout_url?: string | undefined;
498
+ }, AutumnError>>;
434
499
  static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
435
500
  setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
436
501
  static cancel: (params: CancelParams) => Promise<Result<CancelResult, AutumnError>>;
@@ -1,3 +1,4 @@
1
+ import { z } from 'zod';
1
2
  import { R as Result, A as AutumnError } from './response-CV6KGWH5.mjs';
2
3
 
3
4
  declare const Infinite = "inf";
@@ -30,6 +31,7 @@ interface CheckFeatureResult extends CoreCustomerFeature {
30
31
  entity_id?: string;
31
32
  required_balance: number;
32
33
  code: string;
34
+ usage_limit?: number;
33
35
  preview?: CheckFeaturePreview;
34
36
  }
35
37
  interface CheckFeaturePreview {
@@ -165,6 +167,7 @@ interface CoreCustomerFeature {
165
167
  included_usage?: number;
166
168
  next_reset_at?: number | null;
167
169
  overage_allowed?: boolean;
170
+ usage_limit?: number;
168
171
  breakdown?: {
169
172
  interval: ProductItemInterval;
170
173
  balance?: number;
@@ -219,14 +222,29 @@ interface CustomerData {
219
222
  interface GetCustomerParams {
220
223
  expand?: CustomerExpandOption[];
221
224
  }
222
- interface CreateCustomerParams {
223
- id?: string | null;
224
- email?: string | null;
225
- name?: string | null;
226
- fingerprint?: string | null;
227
- metadata?: Record<string, any>;
228
- expand?: CustomerExpandOption[];
229
- }
225
+ declare const CreateCustomerParamsSchema: z.ZodObject<{
226
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
228
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
230
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
231
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ metadata?: Record<string, any> | undefined;
234
+ id?: string | null | undefined;
235
+ name?: string | null | undefined;
236
+ email?: string | null | undefined;
237
+ fingerprint?: string | null | undefined;
238
+ expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
239
+ }, {
240
+ metadata?: Record<string, any> | undefined;
241
+ id?: string | null | undefined;
242
+ name?: string | null | undefined;
243
+ email?: string | null | undefined;
244
+ fingerprint?: string | null | undefined;
245
+ expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
246
+ }>;
247
+ type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
230
248
  interface UpdateCustomerParams {
231
249
  id?: string | null;
232
250
  name?: string | null;
@@ -243,6 +261,7 @@ interface CustomerInvoice {
243
261
  total: number;
244
262
  currency: string;
245
263
  created_at: number;
264
+ hosted_invoice_url: string;
246
265
  }
247
266
 
248
267
  type EntityExpandOption = "invoices";
@@ -277,25 +296,65 @@ interface EntityData {
277
296
  feature_id: string;
278
297
  }
279
298
 
280
- interface AttachFeatureOptions {
281
- feature_id: string;
282
- quantity: number;
283
- }
284
- interface AttachParams {
299
+ declare const AttachParamsSchema: z.ZodObject<{
300
+ customer_id: z.ZodString;
301
+ product_id: z.ZodOptional<z.ZodString>;
302
+ entity_id: z.ZodOptional<z.ZodString>;
303
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
+ feature_id: z.ZodString;
305
+ quantity: z.ZodNumber;
306
+ }, "strip", z.ZodTypeAny, {
307
+ quantity: number;
308
+ feature_id: string;
309
+ }, {
310
+ quantity: number;
311
+ feature_id: string;
312
+ }>, "many">>;
313
+ product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
314
+ free_trial: z.ZodOptional<z.ZodBoolean>;
315
+ success_url: z.ZodOptional<z.ZodString>;
316
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
317
+ force_checkout: z.ZodOptional<z.ZodBoolean>;
318
+ customer_data: z.ZodOptional<z.ZodAny>;
319
+ entity_data: z.ZodOptional<z.ZodAny>;
320
+ checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
321
+ reward: z.ZodOptional<z.ZodString>;
322
+ }, "strip", z.ZodTypeAny, {
285
323
  customer_id: string;
286
- product_id?: string;
287
- entity_id?: string;
288
- options?: AttachFeatureOptions[];
289
- product_ids?: string[];
290
- free_trial?: boolean;
291
- success_url?: string;
292
- metadata?: Record<string, string>;
293
- force_checkout?: boolean;
294
- customer_data?: CustomerData;
295
- entity_data?: EntityData;
296
- checkout_session_params?: Record<string, any>;
297
- reward?: string;
298
- }
324
+ metadata?: Record<string, string> | undefined;
325
+ options?: {
326
+ quantity: number;
327
+ feature_id: string;
328
+ }[] | undefined;
329
+ reward?: string | undefined;
330
+ entity_id?: string | undefined;
331
+ product_id?: string | undefined;
332
+ product_ids?: string[] | undefined;
333
+ free_trial?: boolean | undefined;
334
+ success_url?: string | undefined;
335
+ force_checkout?: boolean | undefined;
336
+ customer_data?: any;
337
+ entity_data?: any;
338
+ checkout_session_params?: Record<string, any> | undefined;
339
+ }, {
340
+ customer_id: string;
341
+ metadata?: Record<string, string> | undefined;
342
+ options?: {
343
+ quantity: number;
344
+ feature_id: string;
345
+ }[] | undefined;
346
+ reward?: string | undefined;
347
+ entity_id?: string | undefined;
348
+ product_id?: string | undefined;
349
+ product_ids?: string[] | undefined;
350
+ free_trial?: boolean | undefined;
351
+ success_url?: string | undefined;
352
+ force_checkout?: boolean | undefined;
353
+ customer_data?: any;
354
+ entity_data?: any;
355
+ checkout_session_params?: Record<string, any> | undefined;
356
+ }>;
357
+ type AttachParams = z.infer<typeof AttachParamsSchema>;
299
358
  interface CancelParams {
300
359
  customer_id: string;
301
360
  product_id: string;
@@ -307,14 +366,6 @@ interface CancelResult {
307
366
  customer_id: string;
308
367
  product_id: string;
309
368
  }
310
- interface AttachResult {
311
- checkout_url?: string;
312
- customer_id: string;
313
- product_ids: string[];
314
- code: string;
315
- message: string;
316
- customer_data?: CustomerData;
317
- }
318
369
  interface TrackParams {
319
370
  customer_id: string;
320
371
  value?: number;
@@ -428,9 +479,23 @@ declare class Autumn {
428
479
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
429
480
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
430
481
  };
431
- static attach: (params: AttachParams) => Promise<Result<AttachResult, AutumnError>>;
482
+ static attach: (params: AttachParams) => Promise<Result<{
483
+ message: string;
484
+ code: string;
485
+ customer_id: string;
486
+ product_ids: string[];
487
+ customer_data?: any;
488
+ checkout_url?: string | undefined;
489
+ }, AutumnError>>;
432
490
  static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
433
- attach(params: AttachParams): Promise<Result<AttachResult, AutumnError>>;
491
+ attach(params: AttachParams): Promise<Result<{
492
+ message: string;
493
+ code: string;
494
+ customer_id: string;
495
+ product_ids: string[];
496
+ customer_data?: any;
497
+ checkout_url?: string | undefined;
498
+ }, AutumnError>>;
434
499
  static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
435
500
  setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
436
501
  static cancel: (params: CancelParams) => Promise<Result<CancelResult, AutumnError>>;
@@ -512,6 +512,63 @@ var Autumn = class {
512
512
  }
513
513
  };
514
514
 
515
+ // src/sdk/general/genTypes.ts
516
+ var import_zod = require("zod");
517
+ var AttachParamsSchema = import_zod.z.object({
518
+ customer_id: import_zod.z.string(),
519
+ product_id: import_zod.z.string().optional(),
520
+ entity_id: import_zod.z.string().optional(),
521
+ options: import_zod.z.array(import_zod.z.object({
522
+ feature_id: import_zod.z.string(),
523
+ quantity: import_zod.z.number()
524
+ })).optional(),
525
+ product_ids: import_zod.z.array(import_zod.z.string()).optional(),
526
+ // If set, will attach multiple products to the customer (cannot be used with product_id)
527
+ free_trial: import_zod.z.boolean().optional(),
528
+ // Default is true -- if set to false, will bypass product free trial
529
+ success_url: import_zod.z.string().optional(),
530
+ // Passed to Stripe
531
+ metadata: import_zod.z.record(import_zod.z.string()).optional(),
532
+ // Passed to Stripe
533
+ force_checkout: import_zod.z.boolean().optional(),
534
+ // Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
535
+ customer_data: import_zod.z.any().optional(),
536
+ entity_data: import_zod.z.any().optional(),
537
+ checkout_session_params: import_zod.z.record(import_zod.z.any()).optional(),
538
+ // Passed to Stripe
539
+ reward: import_zod.z.string().optional()
540
+ });
541
+ var AttachResultSchema = import_zod.z.object({
542
+ checkout_url: import_zod.z.string().optional(),
543
+ customer_id: import_zod.z.string(),
544
+ product_ids: import_zod.z.array(import_zod.z.string()),
545
+ code: import_zod.z.string(),
546
+ message: import_zod.z.string(),
547
+ customer_data: import_zod.z.any().optional()
548
+ });
549
+
550
+ // src/sdk/customers/cusEnums.ts
551
+ var import_zod2 = require("zod");
552
+ var CustomerExpandEnum = import_zod2.z.enum([
553
+ "invoices",
554
+ "rewards",
555
+ "trials_used",
556
+ "entities",
557
+ "referrals",
558
+ "payment_method"
559
+ ]);
560
+
561
+ // src/sdk/customers/cusTypes.ts
562
+ var import_zod3 = require("zod");
563
+ var CreateCustomerParamsSchema = import_zod3.z.object({
564
+ id: import_zod3.z.string().nullish(),
565
+ email: import_zod3.z.string().nullish(),
566
+ name: import_zod3.z.string().nullish(),
567
+ fingerprint: import_zod3.z.string().nullish(),
568
+ metadata: import_zod3.z.record(import_zod3.z.any()).optional(),
569
+ expand: import_zod3.z.array(CustomerExpandEnum).optional()
570
+ });
571
+
515
572
  // src/sdk/components/componentMethods.ts
516
573
  var fetchPricingTable = async ({
517
574
  instance,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-52OTZ4SQ.mjs";
4
- import "./chunk-DG3FZZQH.mjs";
5
- import "./chunk-UJQBHXII.mjs";
6
- import "./chunk-A46IKTLH.mjs";
7
- import "./chunk-WDRHQJKV.mjs";
8
- import "./chunk-J3QM5KFT.mjs";
3
+ } from "./chunk-NTFR7Z2G.mjs";
4
+ import "./chunk-VFTHGJ5N.mjs";
5
+ import "./chunk-U7335VZS.mjs";
6
+ import "./chunk-FCEB2GBS.mjs";
7
+ import "./chunk-JPNRDMMC.mjs";
8
+ import "./chunk-7QSJB2C5.mjs";
9
9
  import {
10
10
  Autumn
11
- } from "./chunk-VCEQ3QBX.mjs";
11
+ } from "./chunk-V6M7KRGN.mjs";
12
12
  import "./chunk-45WVZY23.mjs";
13
13
  import {
14
14
  autumnApiUrl
15
15
  } from "./chunk-KSG3E4Q2.mjs";
16
- import "./chunk-XGB3TDIC.mjs";
16
+ import "./chunk-6DZX6EAA.mjs";
17
17
 
18
18
  // src/libraries/backend/remix_dep.ts
19
19
  import { findRoute } from "rou3";
@@ -512,6 +512,63 @@ var Autumn = class {
512
512
  }
513
513
  };
514
514
 
515
+ // src/sdk/general/genTypes.ts
516
+ var import_zod = require("zod");
517
+ var AttachParamsSchema = import_zod.z.object({
518
+ customer_id: import_zod.z.string(),
519
+ product_id: import_zod.z.string().optional(),
520
+ entity_id: import_zod.z.string().optional(),
521
+ options: import_zod.z.array(import_zod.z.object({
522
+ feature_id: import_zod.z.string(),
523
+ quantity: import_zod.z.number()
524
+ })).optional(),
525
+ product_ids: import_zod.z.array(import_zod.z.string()).optional(),
526
+ // If set, will attach multiple products to the customer (cannot be used with product_id)
527
+ free_trial: import_zod.z.boolean().optional(),
528
+ // Default is true -- if set to false, will bypass product free trial
529
+ success_url: import_zod.z.string().optional(),
530
+ // Passed to Stripe
531
+ metadata: import_zod.z.record(import_zod.z.string()).optional(),
532
+ // Passed to Stripe
533
+ force_checkout: import_zod.z.boolean().optional(),
534
+ // Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
535
+ customer_data: import_zod.z.any().optional(),
536
+ entity_data: import_zod.z.any().optional(),
537
+ checkout_session_params: import_zod.z.record(import_zod.z.any()).optional(),
538
+ // Passed to Stripe
539
+ reward: import_zod.z.string().optional()
540
+ });
541
+ var AttachResultSchema = import_zod.z.object({
542
+ checkout_url: import_zod.z.string().optional(),
543
+ customer_id: import_zod.z.string(),
544
+ product_ids: import_zod.z.array(import_zod.z.string()),
545
+ code: import_zod.z.string(),
546
+ message: import_zod.z.string(),
547
+ customer_data: import_zod.z.any().optional()
548
+ });
549
+
550
+ // src/sdk/customers/cusEnums.ts
551
+ var import_zod2 = require("zod");
552
+ var CustomerExpandEnum = import_zod2.z.enum([
553
+ "invoices",
554
+ "rewards",
555
+ "trials_used",
556
+ "entities",
557
+ "referrals",
558
+ "payment_method"
559
+ ]);
560
+
561
+ // src/sdk/customers/cusTypes.ts
562
+ var import_zod3 = require("zod");
563
+ var CreateCustomerParamsSchema = import_zod3.z.object({
564
+ id: import_zod3.z.string().nullish(),
565
+ email: import_zod3.z.string().nullish(),
566
+ name: import_zod3.z.string().nullish(),
567
+ fingerprint: import_zod3.z.string().nullish(),
568
+ metadata: import_zod3.z.record(import_zod3.z.any()).optional(),
569
+ expand: import_zod3.z.array(CustomerExpandEnum).optional()
570
+ });
571
+
515
572
  // src/sdk/components/componentMethods.ts
516
573
  var fetchPricingTable = async ({
517
574
  instance,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "../chunk-52OTZ4SQ.mjs";
4
- import "../chunk-DG3FZZQH.mjs";
5
- import "../chunk-UJQBHXII.mjs";
6
- import "../chunk-A46IKTLH.mjs";
7
- import "../chunk-WDRHQJKV.mjs";
8
- import "../chunk-J3QM5KFT.mjs";
9
- import "../chunk-VCEQ3QBX.mjs";
3
+ } from "../chunk-NTFR7Z2G.mjs";
4
+ import "../chunk-VFTHGJ5N.mjs";
5
+ import "../chunk-U7335VZS.mjs";
6
+ import "../chunk-FCEB2GBS.mjs";
7
+ import "../chunk-JPNRDMMC.mjs";
8
+ import "../chunk-7QSJB2C5.mjs";
9
+ import "../chunk-V6M7KRGN.mjs";
10
10
  import "../chunk-45WVZY23.mjs";
11
11
  import "../chunk-KSG3E4Q2.mjs";
12
- import "../chunk-XGB3TDIC.mjs";
12
+ import "../chunk-6DZX6EAA.mjs";
13
13
  export {
14
14
  createRouterWithOptions
15
15
  };
@@ -512,6 +512,63 @@ var Autumn = class {
512
512
  }
513
513
  };
514
514
 
515
+ // src/sdk/general/genTypes.ts
516
+ var import_zod = require("zod");
517
+ var AttachParamsSchema = import_zod.z.object({
518
+ customer_id: import_zod.z.string(),
519
+ product_id: import_zod.z.string().optional(),
520
+ entity_id: import_zod.z.string().optional(),
521
+ options: import_zod.z.array(import_zod.z.object({
522
+ feature_id: import_zod.z.string(),
523
+ quantity: import_zod.z.number()
524
+ })).optional(),
525
+ product_ids: import_zod.z.array(import_zod.z.string()).optional(),
526
+ // If set, will attach multiple products to the customer (cannot be used with product_id)
527
+ free_trial: import_zod.z.boolean().optional(),
528
+ // Default is true -- if set to false, will bypass product free trial
529
+ success_url: import_zod.z.string().optional(),
530
+ // Passed to Stripe
531
+ metadata: import_zod.z.record(import_zod.z.string()).optional(),
532
+ // Passed to Stripe
533
+ force_checkout: import_zod.z.boolean().optional(),
534
+ // Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
535
+ customer_data: import_zod.z.any().optional(),
536
+ entity_data: import_zod.z.any().optional(),
537
+ checkout_session_params: import_zod.z.record(import_zod.z.any()).optional(),
538
+ // Passed to Stripe
539
+ reward: import_zod.z.string().optional()
540
+ });
541
+ var AttachResultSchema = import_zod.z.object({
542
+ checkout_url: import_zod.z.string().optional(),
543
+ customer_id: import_zod.z.string(),
544
+ product_ids: import_zod.z.array(import_zod.z.string()),
545
+ code: import_zod.z.string(),
546
+ message: import_zod.z.string(),
547
+ customer_data: import_zod.z.any().optional()
548
+ });
549
+
550
+ // src/sdk/customers/cusEnums.ts
551
+ var import_zod2 = require("zod");
552
+ var CustomerExpandEnum = import_zod2.z.enum([
553
+ "invoices",
554
+ "rewards",
555
+ "trials_used",
556
+ "entities",
557
+ "referrals",
558
+ "payment_method"
559
+ ]);
560
+
561
+ // src/sdk/customers/cusTypes.ts
562
+ var import_zod3 = require("zod");
563
+ var CreateCustomerParamsSchema = import_zod3.z.object({
564
+ id: import_zod3.z.string().nullish(),
565
+ email: import_zod3.z.string().nullish(),
566
+ name: import_zod3.z.string().nullish(),
567
+ fingerprint: import_zod3.z.string().nullish(),
568
+ metadata: import_zod3.z.record(import_zod3.z.any()).optional(),
569
+ expand: import_zod3.z.array(CustomerExpandEnum).optional()
570
+ });
571
+
515
572
  // src/libraries/backend/utils/backendRes.ts
516
573
  var toBackendRes = ({ res }) => {
517
574
  let statusCode = res.statusCode ? res.statusCode : res.error ? 500 : 200;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addEntityRoutes
3
- } from "../chunk-DG3FZZQH.mjs";
4
- import "../chunk-J3QM5KFT.mjs";
5
- import "../chunk-VCEQ3QBX.mjs";
3
+ } from "../chunk-U7335VZS.mjs";
4
+ import "../chunk-7QSJB2C5.mjs";
5
+ import "../chunk-V6M7KRGN.mjs";
6
6
  import "../chunk-45WVZY23.mjs";
7
7
  import "../chunk-KSG3E4Q2.mjs";
8
- import "../chunk-XGB3TDIC.mjs";
8
+ import "../chunk-6DZX6EAA.mjs";
9
9
  export {
10
10
  addEntityRoutes
11
11
  };