autumn-js 0.0.108 → 0.0.110

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 (268) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +18 -18
  2. package/dist/libraries/backend/better-auth.d.ts +18 -18
  3. package/dist/libraries/backend/better-auth.js +206 -103
  4. package/dist/libraries/backend/better-auth.mjs +7 -7
  5. package/dist/libraries/backend/{chunk-IOSEAUDJ.mjs → chunk-26E2Z26Q.mjs} +170 -102
  6. package/dist/libraries/backend/{chunk-5EKNB4IJ.mjs → chunk-BV3SY6BB.mjs} +1 -1
  7. package/dist/libraries/backend/{chunk-HHMIVOXX.mjs → chunk-CLW3UTC5.mjs} +36 -1
  8. package/dist/libraries/backend/{chunk-2RZ2FZX2.mjs → chunk-DMHG3POG.mjs} +6 -6
  9. package/dist/libraries/backend/{chunk-5H6HVCOP.mjs → chunk-TWERY4S2.mjs} +1 -1
  10. package/dist/libraries/backend/{chunk-3OLXYDCU.mjs → chunk-XEHT6LRT.mjs} +1 -1
  11. package/dist/libraries/backend/{chunk-K7JGEYUX.mjs → chunk-YTCNYNTM.mjs} +1 -1
  12. package/dist/libraries/backend/convex.js +203 -100
  13. package/dist/libraries/backend/convex.mjs +7 -7
  14. package/dist/libraries/backend/elysia.js +209 -106
  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 +203 -100
  19. package/dist/libraries/backend/express.mjs +7 -7
  20. package/dist/libraries/backend/fastify.js +203 -100
  21. package/dist/libraries/backend/fastify.mjs +7 -7
  22. package/dist/libraries/backend/hono.js +203 -100
  23. package/dist/libraries/backend/hono.mjs +7 -7
  24. package/dist/libraries/backend/next.js +205 -102
  25. package/dist/libraries/backend/next.mjs +7 -7
  26. package/dist/libraries/backend/react-router.js +203 -100
  27. package/dist/libraries/backend/react-router.mjs +7 -7
  28. package/dist/libraries/backend/{referralTypes-CL2y5hbv.d.mts → referralTypes-CpEs5id9.d.mts} +219 -60
  29. package/dist/libraries/backend/{referralTypes-BpOamxCs.d.ts → referralTypes-PV0SFnx_.d.ts} +219 -60
  30. package/dist/libraries/backend/remix_dep.js +203 -100
  31. package/dist/libraries/backend/remix_dep.mjs +7 -7
  32. package/dist/libraries/backend/routes/backendRouter.js +203 -100
  33. package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
  34. package/dist/libraries/backend/routes/entityRoutes.js +167 -99
  35. package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
  36. package/dist/libraries/backend/routes/genRoutes.js +202 -99
  37. package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
  38. package/dist/libraries/backend/routes/productRoutes.js +167 -99
  39. package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
  40. package/dist/libraries/backend/routes/referralRoutes.js +167 -99
  41. package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
  42. package/dist/libraries/backend/supabase.js +203 -100
  43. package/dist/libraries/backend/supabase.mjs +7 -7
  44. package/dist/libraries/backend/tanstack.js +203 -100
  45. package/dist/libraries/backend/tanstack.mjs +7 -7
  46. package/dist/libraries/backend/utils/backendRes.js +167 -99
  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 +167 -99
  51. package/dist/libraries/backend/utils/withAuth.mjs +2 -2
  52. package/dist/libraries/react/AutumnContext.d.mts +7 -5
  53. package/dist/libraries/react/AutumnContext.d.ts +7 -5
  54. package/dist/libraries/react/AutumnContext.js +175 -100
  55. package/dist/libraries/react/AutumnContext.mjs +4 -3
  56. package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -5
  57. package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -5
  58. package/dist/libraries/react/BaseAutumnProvider.js +327 -203
  59. package/dist/libraries/react/BaseAutumnProvider.mjs +10 -9
  60. package/dist/libraries/react/{ReactAutumnClient-BjRiaYDN.d.mts → ReactAutumnClient-C4CPCKrp.d.mts} +12 -7
  61. package/dist/libraries/react/{ReactAutumnClient-O2XzkzGM.d.ts → ReactAutumnClient-Cf3-brZx.d.ts} +12 -7
  62. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -1
  63. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -1
  64. package/dist/libraries/react/ReactAutumnProvider.js +327 -203
  65. package/dist/libraries/react/ReactAutumnProvider.mjs +11 -10
  66. package/dist/{next/client/attachTypes-DZlF8AAj.d.mts → libraries/react/attachTypes-BKzcsvuA.d.ts} +7 -7
  67. package/dist/libraries/react/{attachTypes-1Dbkyo_d.d.ts → attachTypes-C1BZ4HNs.d.mts} +3 -3
  68. package/dist/libraries/react/{chunk-7DINVACK.mjs → chunk-2FMO4MDR.mjs} +2 -2
  69. package/dist/libraries/react/chunk-2H7G6M6Z.mjs +44 -0
  70. package/dist/libraries/react/{chunk-6RNG47NV.mjs → chunk-3GZZXL6J.mjs} +21 -11
  71. package/dist/libraries/react/chunk-3LLAOCW3.mjs +136 -0
  72. package/dist/libraries/react/{chunk-253MTZP3.mjs → chunk-BCLKTVUX.mjs} +7 -1
  73. package/dist/libraries/react/{chunk-KJLHVBV4.mjs → chunk-CQD37NSX.mjs} +16 -58
  74. package/dist/libraries/react/{chunk-2PVRCDDK.mjs → chunk-D3GL2QV3.mjs} +240 -381
  75. package/dist/libraries/react/{chunk-4CHWEUKX.mjs → chunk-FE5GYL7P.mjs} +2 -2
  76. package/dist/libraries/react/{chunk-MY2ODATB.mjs → chunk-HBCCTYA6.mjs} +6 -0
  77. package/dist/libraries/react/{chunk-XXGKLOAK.mjs → chunk-K7IJMDIV.mjs} +17 -3
  78. package/dist/libraries/react/{chunk-OEIUKLFH.mjs → chunk-MIITU3Q2.mjs} +37 -22
  79. package/dist/libraries/react/chunk-MS4UEBVX.mjs +223 -0
  80. package/dist/libraries/react/{chunk-OTYSAMRH.mjs → chunk-OXPO56ZD.mjs} +9 -4
  81. package/dist/libraries/react/chunk-PDCSW5VX.mjs +46 -0
  82. package/dist/libraries/react/{chunk-4QPHNIQ7.mjs → chunk-RFSQBGLO.mjs} +1 -1
  83. package/dist/libraries/react/{chunk-3XJ7NFT2.mjs → chunk-RMR7LP6D.mjs} +57 -23
  84. package/dist/libraries/react/{chunk-DRAIZ3UZ.mjs → chunk-T4Z5BKOW.mjs} +3 -3
  85. package/dist/libraries/react/{chunk-OM3ROIZO.mjs → chunk-TL2F3PPG.mjs} +2 -10
  86. package/dist/libraries/react/{chunk-LXD6AEZW.mjs → chunk-V2XCEJ4T.mjs} +3 -2
  87. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -5
  88. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -5
  89. package/dist/libraries/react/client/ReactAutumnClient.js +173 -99
  90. package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -2
  91. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -5
  92. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -5
  93. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -5
  94. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -5
  95. package/dist/libraries/react/client/clientEntityMethods.d.mts +7 -6
  96. package/dist/libraries/react/client/clientEntityMethods.d.ts +7 -6
  97. package/dist/libraries/react/client/clientGenMethods.d.mts +9 -7
  98. package/dist/libraries/react/client/clientGenMethods.d.ts +9 -7
  99. package/dist/libraries/react/client/clientGenMethods.js +7 -0
  100. package/dist/libraries/react/client/clientGenMethods.mjs +3 -1
  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 +7 -6
  104. package/dist/libraries/react/client/clientReferralMethods.d.ts +7 -6
  105. package/dist/libraries/react/client/types/clientGenTypes.d.mts +12 -1
  106. package/dist/libraries/react/client/types/clientGenTypes.d.ts +12 -1
  107. package/dist/libraries/react/client/types/clientGenTypes.js +687 -25
  108. package/dist/libraries/react/client/types/clientGenTypes.mjs +8 -0
  109. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -2
  110. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -2
  111. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +354 -238
  112. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +26 -25
  113. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -2
  114. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -2
  115. package/dist/libraries/react/components/check-dialog/check-dialog-synced.css +1539 -0
  116. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +2 -3
  117. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +2 -3
  118. package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +1489 -16
  119. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +36 -4
  120. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +2 -2
  121. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +2 -2
  122. package/dist/libraries/react/components/check-dialog/lib/check-content.js +6 -0
  123. package/dist/libraries/react/components/check-dialog/lib/check-content.mjs +1 -1
  124. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
  125. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
  126. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  127. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  128. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +519 -399
  129. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +26 -25
  130. package/dist/libraries/react/components/ui/dialog.mjs +2 -2
  131. package/dist/libraries/react/cusTypes-DG6zrQYk.d.ts +179 -0
  132. package/dist/libraries/react/cusTypes-DmFGAdnp.d.mts +179 -0
  133. package/dist/libraries/react/entTypes-BbmxlLGb.d.mts +31 -0
  134. package/dist/libraries/react/entTypes-DG9rJhum.d.ts +31 -0
  135. package/dist/libraries/react/{response-C7P_oYqV.d.ts → genTypes-CHD2Kdqf.d.ts} +12 -19
  136. package/dist/libraries/react/{response-dnzFyX91.d.mts → genTypes-CHerQ_Ka.d.mts} +12 -19
  137. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +31 -0
  138. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +31 -0
  139. package/dist/libraries/react/hooks/helpers/handleCheck.js +813 -0
  140. package/dist/libraries/react/hooks/helpers/handleCheck.mjs +11 -0
  141. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +41 -0
  142. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +41 -0
  143. package/dist/libraries/react/hooks/helpers/useAutumnBase.js +1024 -0
  144. package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +10 -0
  145. package/dist/libraries/react/hooks/{useDialog.js → helpers/useDialog.js} +1 -1
  146. package/dist/libraries/react/hooks/{useDialog.mjs → helpers/useDialog.mjs} +1 -1
  147. package/dist/libraries/react/hooks/useAnalytics.d.mts +19 -0
  148. package/dist/libraries/react/hooks/useAnalytics.d.ts +19 -0
  149. package/dist/libraries/react/hooks/{useAutumnBase.js → useAnalytics.js} +192 -465
  150. package/dist/libraries/react/hooks/{useAutumnBase.mjs → useAnalytics.mjs} +7 -7
  151. package/dist/libraries/react/hooks/useCustomer.d.mts +8 -6
  152. package/dist/libraries/react/hooks/useCustomer.d.ts +8 -6
  153. package/dist/libraries/react/hooks/useCustomer.js +309 -199
  154. package/dist/libraries/react/hooks/useCustomer.mjs +9 -8
  155. package/dist/libraries/react/hooks/useCustomerBase.d.mts +11 -9
  156. package/dist/libraries/react/hooks/useCustomerBase.d.ts +11 -9
  157. package/dist/libraries/react/hooks/useCustomerBase.js +309 -199
  158. package/dist/libraries/react/hooks/useCustomerBase.mjs +8 -7
  159. package/dist/libraries/react/hooks/useEntity.d.mts +10 -11
  160. package/dist/libraries/react/hooks/useEntity.d.ts +10 -11
  161. package/dist/libraries/react/hooks/useEntity.js +291 -189
  162. package/dist/libraries/react/hooks/useEntity.mjs +9 -8
  163. package/dist/libraries/react/hooks/useEntityBase.d.mts +12 -13
  164. package/dist/libraries/react/hooks/useEntityBase.d.ts +12 -13
  165. package/dist/libraries/react/hooks/useEntityBase.js +331 -229
  166. package/dist/libraries/react/hooks/useEntityBase.mjs +8 -7
  167. package/dist/libraries/react/hooks/usePaywall.d.mts +13 -0
  168. package/dist/libraries/react/hooks/usePaywall.d.ts +13 -0
  169. package/dist/libraries/react/hooks/{useAutumn.js → usePaywall.js} +202 -479
  170. package/dist/libraries/react/hooks/{useAutumn.mjs → usePaywall.mjs} +7 -8
  171. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  172. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  173. package/dist/libraries/react/hooks/usePricingTable.js +367 -293
  174. package/dist/libraries/react/hooks/usePricingTable.mjs +6 -5
  175. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +8 -9
  176. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +8 -9
  177. package/dist/libraries/react/hooks/usePricingTableBase.js +167 -467
  178. package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -12
  179. package/dist/libraries/react/hooks/useProductsBase.d.mts +18 -1
  180. package/dist/libraries/react/hooks/useProductsBase.d.ts +18 -1
  181. package/dist/libraries/react/hooks/useProductsBase.js +11 -947
  182. package/dist/libraries/react/hooks/useProductsBase.mjs +10 -19
  183. package/dist/libraries/react/index.d.mts +213 -53
  184. package/dist/libraries/react/index.d.ts +213 -53
  185. package/dist/libraries/react/index.js +628 -419
  186. package/dist/libraries/react/index.mjs +606 -399
  187. package/dist/libraries/react/prodTypes-Mrr6azoz.d.mts +236 -0
  188. package/dist/libraries/react/prodTypes-Mrr6azoz.d.ts +236 -0
  189. package/dist/next/{AutumnProvider-BKgOhoik.d.mts → AutumnProvider-BGyIGvAS.d.mts} +167 -31
  190. package/dist/next/{AutumnProvider-BKgOhoik.d.ts → AutumnProvider-BGyIGvAS.d.ts} +167 -31
  191. package/dist/next/AutumnProvider.d.mts +1 -1
  192. package/dist/next/AutumnProvider.d.ts +1 -1
  193. package/dist/next/client/NextAutumnClient.d.mts +9 -4
  194. package/dist/next/client/NextAutumnClient.d.ts +9 -4
  195. package/dist/next/client/NextAutumnProvider.d.mts +2 -1
  196. package/dist/next/client/NextAutumnProvider.d.ts +2 -1
  197. package/dist/{libraries/react/attachTypes-DoFoPh8g.d.mts → next/client/attachTypes-DJ4Lz7dN.d.ts} +5 -5
  198. package/dist/next/client/{attachTypes-CJ7OSUSn.d.ts → attachTypes-Hja4wFD-.d.mts} +1 -1
  199. package/dist/next/client/{clientAttachTypes-D84PT2G0.d.mts → clientAttachTypes-Dde-B-ga.d.mts} +9 -2
  200. package/dist/next/client/{clientAttachTypes-D0_L-cnv.d.ts → clientAttachTypes-SPRZ0-u3.d.ts} +9 -2
  201. package/dist/next/client/clientUtils.d.mts +3 -2
  202. package/dist/next/client/clientUtils.d.ts +3 -2
  203. package/dist/next/client/cusTypes-CGQNbPsC.d.ts +179 -0
  204. package/dist/next/client/cusTypes-CkonzuMA.d.mts +179 -0
  205. package/dist/next/client/{entTypes-C-7Uoct9.d.ts → entTypes-BYx5xBXO.d.ts} +1 -1
  206. package/dist/next/client/{entTypes-CXGgMuHO.d.mts → entTypes-DzTUirPM.d.mts} +1 -1
  207. package/dist/next/client/hooks/useAutumn.d.mts +6 -6
  208. package/dist/next/client/hooks/useAutumn.d.ts +6 -6
  209. package/dist/next/client/hooks/useAutumn.js +10 -3
  210. package/dist/next/client/hooks/useAutumn.mjs +10 -3
  211. package/dist/next/client/hooks/useCustomer.d.mts +13 -7
  212. package/dist/next/client/hooks/useCustomer.d.ts +13 -7
  213. package/dist/next/client/hooks/useEntity.d.mts +7 -8
  214. package/dist/next/client/hooks/useEntity.d.ts +7 -8
  215. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  216. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  217. package/dist/next/client/hooks/usePricingTable.js +6 -2
  218. package/dist/next/client/hooks/usePricingTable.mjs +6 -2
  219. package/dist/next/client/prodTypes-CCk7TL_t.d.mts +227 -0
  220. package/dist/next/client/prodTypes-CCk7TL_t.d.ts +227 -0
  221. package/dist/next/client/types.d.mts +3 -2
  222. package/dist/next/client/types.d.ts +3 -2
  223. package/dist/next/index.d.mts +34 -24
  224. package/dist/next/index.d.ts +34 -24
  225. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  226. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  227. package/dist/next/server/componentActions.d.mts +1 -1
  228. package/dist/next/server/componentActions.d.ts +1 -1
  229. package/dist/next/server/cusActions.d.mts +36 -13
  230. package/dist/next/server/cusActions.d.ts +36 -13
  231. package/dist/next/server/{cusTypes-_GDUnrai.d.mts → cusTypes-d13IMtrx.d.mts} +169 -33
  232. package/dist/next/server/{cusTypes-_GDUnrai.d.ts → cusTypes-d13IMtrx.d.ts} +169 -33
  233. package/dist/next/server/genActions.d.mts +1 -1
  234. package/dist/next/server/genActions.d.ts +1 -1
  235. package/dist/sdk/index.d.mts +193 -24
  236. package/dist/sdk/index.d.ts +193 -24
  237. package/dist/sdk/index.js +111 -56
  238. package/dist/sdk/index.mjs +108 -57
  239. package/dist/utils/encryptUtils.js +167 -99
  240. package/dist/utils/encryptUtils.mjs +167 -99
  241. package/package.json +3 -2
  242. package/tsup.config.ts +1 -11
  243. package/dist/compose/index.d.mts +0 -175
  244. package/dist/compose/index.d.ts +0 -175
  245. package/dist/compose/index.js +0 -78
  246. package/dist/compose/index.mjs +0 -47
  247. package/dist/libraries/react/chunk-3JJC2VU5.mjs +0 -67
  248. package/dist/libraries/react/chunk-KDD5RMQ3.mjs +0 -17
  249. package/dist/libraries/react/chunk-PC6V4RE7.mjs +0 -49
  250. package/dist/libraries/react/cusTypes-COIU0NG3.d.mts +0 -266
  251. package/dist/libraries/react/cusTypes-COIU0NG3.d.ts +0 -266
  252. package/dist/libraries/react/entTypes-BVPtpycG.d.mts +0 -17
  253. package/dist/libraries/react/entTypes-Ck3_WfOz.d.ts +0 -17
  254. package/dist/libraries/react/hooks/handleAllowed.d.mts +0 -15
  255. package/dist/libraries/react/hooks/handleAllowed.d.ts +0 -15
  256. package/dist/libraries/react/hooks/handleAllowed.js +0 -90
  257. package/dist/libraries/react/hooks/handleAllowed.mjs +0 -8
  258. package/dist/libraries/react/hooks/useAutumn.d.mts +0 -35
  259. package/dist/libraries/react/hooks/useAutumn.d.ts +0 -35
  260. package/dist/libraries/react/hooks/useAutumnBase.d.mts +0 -40
  261. package/dist/libraries/react/hooks/useAutumnBase.d.ts +0 -40
  262. package/dist/next/client/cusTypes-DT2ujoSl.d.mts +0 -266
  263. package/dist/next/client/cusTypes-DT2ujoSl.d.ts +0 -266
  264. package/dist/next/client/handleAllowed-B8TBAzfI.d.mts +0 -7
  265. package/dist/next/client/handleAllowed-B8TBAzfI.d.ts +0 -7
  266. package/dist/libraries/react/{chunk-JPLUWGH4.mjs → chunk-W5N4PVQU.mjs} +3 -3
  267. /package/dist/libraries/react/hooks/{useDialog.d.mts → helpers/useDialog.d.mts} +0 -0
  268. /package/dist/libraries/react/hooks/{useDialog.d.ts → helpers/useDialog.d.ts} +0 -0
@@ -9,36 +9,37 @@ import {
9
9
  PricingTableContainer,
10
10
  RecommendedBadge,
11
11
  usePricingTableContext
12
- } from "../../chunk-3XJ7NFT2.mjs";
13
- import "../../chunk-O6TAJHK3.mjs";
14
- import "../../chunk-URQMBRFZ.mjs";
15
- import "../../chunk-GUM4HIGI.mjs";
12
+ } from "../../chunk-RMR7LP6D.mjs";
13
+ import "../../chunk-HBCCTYA6.mjs";
16
14
  import "../../chunk-UM3ZQPMU.mjs";
17
15
  import "../../chunk-6EZVNJHQ.mjs";
18
- import "../../chunk-WVKYZYFT.mjs";
19
- import "../../chunk-PC6V4RE7.mjs";
20
- import "../../chunk-MY2ODATB.mjs";
16
+ import "../../chunk-O6TAJHK3.mjs";
17
+ import "../../chunk-URQMBRFZ.mjs";
18
+ import "../../chunk-JGRLRPKG.mjs";
21
19
  import "../../chunk-EV5RNY5U.mjs";
22
- import "../../chunk-JPLUWGH4.mjs";
20
+ import "../../chunk-W5N4PVQU.mjs";
23
21
  import "../../chunk-KWNH6C27.mjs";
24
- import "../../chunk-RPEGNKJH.mjs";
25
- import "../../chunk-JGRLRPKG.mjs";
26
22
  import "../../chunk-QJPZFEVW.mjs";
27
- import "../../chunk-7DINVACK.mjs";
28
- import "../../chunk-6RNG47NV.mjs";
29
- import "../../chunk-OTYSAMRH.mjs";
23
+ import "../../chunk-RPEGNKJH.mjs";
24
+ import "../../chunk-GUM4HIGI.mjs";
30
25
  import "../../chunk-4J6OC4ZQ.mjs";
31
- import "../../chunk-KDD5RMQ3.mjs";
32
- import "../../chunk-4CHWEUKX.mjs";
33
- import "../../chunk-DRAIZ3UZ.mjs";
34
- import "../../chunk-XXGKLOAK.mjs";
35
- import "../../chunk-4QPHNIQ7.mjs";
36
- import "../../chunk-OEIUKLFH.mjs";
37
- import "../../chunk-3JJC2VU5.mjs";
38
- import "../../chunk-KJLHVBV4.mjs";
39
- import "../../chunk-OM3ROIZO.mjs";
40
- import "../../chunk-LXD6AEZW.mjs";
41
- import "../../chunk-2PVRCDDK.mjs";
26
+ import "../../chunk-2H7G6M6Z.mjs";
27
+ import "../../chunk-OXPO56ZD.mjs";
28
+ import "../../chunk-WVKYZYFT.mjs";
29
+ import "../../chunk-PDCSW5VX.mjs";
30
+ import "../../chunk-FE5GYL7P.mjs";
31
+ import "../../chunk-2FMO4MDR.mjs";
32
+ import "../../chunk-3GZZXL6J.mjs";
33
+ import "../../chunk-T4Z5BKOW.mjs";
34
+ import "../../chunk-K7IJMDIV.mjs";
35
+ import "../../chunk-RFSQBGLO.mjs";
36
+ import "../../chunk-MIITU3Q2.mjs";
37
+ import "../../chunk-3LLAOCW3.mjs";
38
+ import "../../chunk-CQD37NSX.mjs";
39
+ import "../../chunk-TL2F3PPG.mjs";
40
+ import "../../chunk-V2XCEJ4T.mjs";
41
+ import "../../chunk-MS4UEBVX.mjs";
42
+ import "../../chunk-D3GL2QV3.mjs";
42
43
  import "../../chunk-V575SGOW.mjs";
43
44
  import "../../chunk-ZV4RPZTM.mjs";
44
45
  import "../../chunk-JVCOY7ZL.mjs";
@@ -46,7 +47,7 @@ import "../../chunk-CIBQ4BJU.mjs";
46
47
  import "../../chunk-VTGR7VVK.mjs";
47
48
  import "../../chunk-WFFVOEUG.mjs";
48
49
  import "../../chunk-ZF2HUCN6.mjs";
49
- import "../../chunk-253MTZP3.mjs";
50
+ import "../../chunk-BCLKTVUX.mjs";
50
51
  import "../../chunk-KQT5G3HT.mjs";
51
52
  export {
52
53
  AnnualSwitch,
@@ -12,10 +12,10 @@ import {
12
12
  DialogPortal,
13
13
  DialogTitle,
14
14
  DialogTrigger
15
- } from "../../chunk-JPLUWGH4.mjs";
15
+ } from "../../chunk-W5N4PVQU.mjs";
16
16
  import "../../chunk-KWNH6C27.mjs";
17
- import "../../chunk-RPEGNKJH.mjs";
18
17
  import "../../chunk-QJPZFEVW.mjs";
18
+ import "../../chunk-RPEGNKJH.mjs";
19
19
  import "../../chunk-4J6OC4ZQ.mjs";
20
20
  export {
21
21
  Dialog,
@@ -0,0 +1,179 @@
1
+ import { A as AppEnv, c as ProductItem, d as ProductItemInterval } from './prodTypes-Mrr6azoz.js';
2
+ import { z } from 'zod';
3
+
4
+ declare enum ProductStatus {
5
+ Active = "active",
6
+ Expired = "expired",
7
+ Trialing = "trialing",
8
+ Scheduled = "scheduled",
9
+ PastDue = "past_due"
10
+ }
11
+ type CustomerExpandOption = "invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method";
12
+
13
+ declare const CoreCusFeatureSchema: z.ZodObject<{
14
+ unlimited: z.ZodOptional<z.ZodBoolean>;
15
+ interval: z.ZodOptional<z.ZodNativeEnum<typeof ProductItemInterval>>;
16
+ balance: z.ZodOptional<z.ZodNumber>;
17
+ usage: z.ZodOptional<z.ZodNumber>;
18
+ included_usage: z.ZodOptional<z.ZodNumber>;
19
+ next_reset_at: z.ZodOptional<z.ZodNumber>;
20
+ overage_allowed: z.ZodOptional<z.ZodBoolean>;
21
+ usage_limit: z.ZodOptional<z.ZodNumber>;
22
+ breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ interval: z.ZodNativeEnum<typeof ProductItemInterval>;
24
+ balance: z.ZodOptional<z.ZodNumber>;
25
+ usage: z.ZodOptional<z.ZodNumber>;
26
+ included_usage: z.ZodOptional<z.ZodNumber>;
27
+ next_reset_at: z.ZodOptional<z.ZodNumber>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ interval: ProductItemInterval;
30
+ balance?: number | undefined;
31
+ usage?: number | undefined;
32
+ included_usage?: number | undefined;
33
+ next_reset_at?: number | undefined;
34
+ }, {
35
+ interval: ProductItemInterval;
36
+ balance?: number | undefined;
37
+ usage?: number | undefined;
38
+ included_usage?: number | undefined;
39
+ next_reset_at?: number | undefined;
40
+ }>, "many">>;
41
+ credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
+ feature_id: z.ZodString;
43
+ credit_amount: z.ZodNumber;
44
+ }, "strip", z.ZodTypeAny, {
45
+ feature_id: string;
46
+ credit_amount: number;
47
+ }, {
48
+ feature_id: string;
49
+ credit_amount: number;
50
+ }>, "many">>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ usage_limit?: number | undefined;
53
+ unlimited?: boolean | undefined;
54
+ interval?: ProductItemInterval | undefined;
55
+ balance?: number | undefined;
56
+ usage?: number | undefined;
57
+ included_usage?: number | undefined;
58
+ next_reset_at?: number | undefined;
59
+ overage_allowed?: boolean | undefined;
60
+ breakdown?: {
61
+ interval: ProductItemInterval;
62
+ balance?: number | undefined;
63
+ usage?: number | undefined;
64
+ included_usage?: number | undefined;
65
+ next_reset_at?: number | undefined;
66
+ }[] | undefined;
67
+ credit_schema?: {
68
+ feature_id: string;
69
+ credit_amount: number;
70
+ }[] | undefined;
71
+ }, {
72
+ usage_limit?: number | undefined;
73
+ unlimited?: boolean | undefined;
74
+ interval?: ProductItemInterval | undefined;
75
+ balance?: number | undefined;
76
+ usage?: number | undefined;
77
+ included_usage?: number | undefined;
78
+ next_reset_at?: number | undefined;
79
+ overage_allowed?: boolean | undefined;
80
+ breakdown?: {
81
+ interval: ProductItemInterval;
82
+ balance?: number | undefined;
83
+ usage?: number | undefined;
84
+ included_usage?: number | undefined;
85
+ next_reset_at?: number | undefined;
86
+ }[] | undefined;
87
+ credit_schema?: {
88
+ feature_id: string;
89
+ credit_amount: number;
90
+ }[] | undefined;
91
+ }>;
92
+ type CoreCustomerFeature = z.infer<typeof CoreCusFeatureSchema>;
93
+ interface CustomerFeature extends CoreCustomerFeature {
94
+ id: string;
95
+ name: string;
96
+ type: "static" | "single_use" | "continuous_use";
97
+ }
98
+ interface CustomerProduct {
99
+ id: string;
100
+ name: string | null;
101
+ group: string | null;
102
+ status: ProductStatus;
103
+ started_at: number;
104
+ canceled_at: number | null;
105
+ version: number;
106
+ subscription_ids?: string[] | null;
107
+ current_period_start?: number | null;
108
+ current_period_end?: number | null;
109
+ trial_ends_at?: number;
110
+ entity_id?: string;
111
+ is_add_on: boolean;
112
+ is_default: boolean;
113
+ items: ProductItem[];
114
+ }
115
+ interface Customer {
116
+ id: string | null;
117
+ created_at: number;
118
+ name: string | null;
119
+ email: string | null;
120
+ fingerprint: string | null;
121
+ stripe_id: string | null;
122
+ env: AppEnv;
123
+ metadata: Record<string, any>;
124
+ products: CustomerProduct[];
125
+ features: Record<string, CustomerFeature>;
126
+ invoices?: CustomerInvoice[];
127
+ }
128
+ declare const CustomerDataSchema: z.ZodObject<{
129
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ name?: string | null | undefined;
134
+ email?: string | null | undefined;
135
+ fingerprint?: string | null | undefined;
136
+ }, {
137
+ name?: string | null | undefined;
138
+ email?: string | null | undefined;
139
+ fingerprint?: string | null | undefined;
140
+ }>;
141
+ type CustomerData = z.infer<typeof CustomerDataSchema>;
142
+ declare const CreateCustomerParamsSchema: z.ZodObject<{
143
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
148
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ name?: string | null | undefined;
151
+ id?: string | null | undefined;
152
+ email?: string | null | undefined;
153
+ fingerprint?: string | null | undefined;
154
+ metadata?: Record<string, any> | undefined;
155
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
156
+ }, {
157
+ name?: string | null | undefined;
158
+ id?: string | null | undefined;
159
+ email?: string | null | undefined;
160
+ fingerprint?: string | null | undefined;
161
+ metadata?: Record<string, any> | undefined;
162
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
163
+ }>;
164
+ type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
165
+ interface BillingPortalResult {
166
+ customer_id: string;
167
+ url: string;
168
+ }
169
+ interface CustomerInvoice {
170
+ product_ids: string[];
171
+ stripe_id: string;
172
+ status: string;
173
+ total: number;
174
+ currency: string;
175
+ created_at: number;
176
+ hosted_invoice_url: string;
177
+ }
178
+
179
+ export type { BillingPortalResult as B, CustomerData as C, CreateCustomerParams as a, Customer as b, CustomerExpandOption as c, CustomerProduct as d, CustomerFeature as e, CustomerInvoice as f };
@@ -0,0 +1,179 @@
1
+ import { A as AppEnv, c as ProductItem, d as ProductItemInterval } from './prodTypes-Mrr6azoz.mjs';
2
+ import { z } from 'zod';
3
+
4
+ declare enum ProductStatus {
5
+ Active = "active",
6
+ Expired = "expired",
7
+ Trialing = "trialing",
8
+ Scheduled = "scheduled",
9
+ PastDue = "past_due"
10
+ }
11
+ type CustomerExpandOption = "invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method";
12
+
13
+ declare const CoreCusFeatureSchema: z.ZodObject<{
14
+ unlimited: z.ZodOptional<z.ZodBoolean>;
15
+ interval: z.ZodOptional<z.ZodNativeEnum<typeof ProductItemInterval>>;
16
+ balance: z.ZodOptional<z.ZodNumber>;
17
+ usage: z.ZodOptional<z.ZodNumber>;
18
+ included_usage: z.ZodOptional<z.ZodNumber>;
19
+ next_reset_at: z.ZodOptional<z.ZodNumber>;
20
+ overage_allowed: z.ZodOptional<z.ZodBoolean>;
21
+ usage_limit: z.ZodOptional<z.ZodNumber>;
22
+ breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ interval: z.ZodNativeEnum<typeof ProductItemInterval>;
24
+ balance: z.ZodOptional<z.ZodNumber>;
25
+ usage: z.ZodOptional<z.ZodNumber>;
26
+ included_usage: z.ZodOptional<z.ZodNumber>;
27
+ next_reset_at: z.ZodOptional<z.ZodNumber>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ interval: ProductItemInterval;
30
+ balance?: number | undefined;
31
+ usage?: number | undefined;
32
+ included_usage?: number | undefined;
33
+ next_reset_at?: number | undefined;
34
+ }, {
35
+ interval: ProductItemInterval;
36
+ balance?: number | undefined;
37
+ usage?: number | undefined;
38
+ included_usage?: number | undefined;
39
+ next_reset_at?: number | undefined;
40
+ }>, "many">>;
41
+ credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
+ feature_id: z.ZodString;
43
+ credit_amount: z.ZodNumber;
44
+ }, "strip", z.ZodTypeAny, {
45
+ feature_id: string;
46
+ credit_amount: number;
47
+ }, {
48
+ feature_id: string;
49
+ credit_amount: number;
50
+ }>, "many">>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ usage_limit?: number | undefined;
53
+ unlimited?: boolean | undefined;
54
+ interval?: ProductItemInterval | undefined;
55
+ balance?: number | undefined;
56
+ usage?: number | undefined;
57
+ included_usage?: number | undefined;
58
+ next_reset_at?: number | undefined;
59
+ overage_allowed?: boolean | undefined;
60
+ breakdown?: {
61
+ interval: ProductItemInterval;
62
+ balance?: number | undefined;
63
+ usage?: number | undefined;
64
+ included_usage?: number | undefined;
65
+ next_reset_at?: number | undefined;
66
+ }[] | undefined;
67
+ credit_schema?: {
68
+ feature_id: string;
69
+ credit_amount: number;
70
+ }[] | undefined;
71
+ }, {
72
+ usage_limit?: number | undefined;
73
+ unlimited?: boolean | undefined;
74
+ interval?: ProductItemInterval | undefined;
75
+ balance?: number | undefined;
76
+ usage?: number | undefined;
77
+ included_usage?: number | undefined;
78
+ next_reset_at?: number | undefined;
79
+ overage_allowed?: boolean | undefined;
80
+ breakdown?: {
81
+ interval: ProductItemInterval;
82
+ balance?: number | undefined;
83
+ usage?: number | undefined;
84
+ included_usage?: number | undefined;
85
+ next_reset_at?: number | undefined;
86
+ }[] | undefined;
87
+ credit_schema?: {
88
+ feature_id: string;
89
+ credit_amount: number;
90
+ }[] | undefined;
91
+ }>;
92
+ type CoreCustomerFeature = z.infer<typeof CoreCusFeatureSchema>;
93
+ interface CustomerFeature extends CoreCustomerFeature {
94
+ id: string;
95
+ name: string;
96
+ type: "static" | "single_use" | "continuous_use";
97
+ }
98
+ interface CustomerProduct {
99
+ id: string;
100
+ name: string | null;
101
+ group: string | null;
102
+ status: ProductStatus;
103
+ started_at: number;
104
+ canceled_at: number | null;
105
+ version: number;
106
+ subscription_ids?: string[] | null;
107
+ current_period_start?: number | null;
108
+ current_period_end?: number | null;
109
+ trial_ends_at?: number;
110
+ entity_id?: string;
111
+ is_add_on: boolean;
112
+ is_default: boolean;
113
+ items: ProductItem[];
114
+ }
115
+ interface Customer {
116
+ id: string | null;
117
+ created_at: number;
118
+ name: string | null;
119
+ email: string | null;
120
+ fingerprint: string | null;
121
+ stripe_id: string | null;
122
+ env: AppEnv;
123
+ metadata: Record<string, any>;
124
+ products: CustomerProduct[];
125
+ features: Record<string, CustomerFeature>;
126
+ invoices?: CustomerInvoice[];
127
+ }
128
+ declare const CustomerDataSchema: z.ZodObject<{
129
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ name?: string | null | undefined;
134
+ email?: string | null | undefined;
135
+ fingerprint?: string | null | undefined;
136
+ }, {
137
+ name?: string | null | undefined;
138
+ email?: string | null | undefined;
139
+ fingerprint?: string | null | undefined;
140
+ }>;
141
+ type CustomerData = z.infer<typeof CustomerDataSchema>;
142
+ declare const CreateCustomerParamsSchema: z.ZodObject<{
143
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
144
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
148
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ name?: string | null | undefined;
151
+ id?: string | null | undefined;
152
+ email?: string | null | undefined;
153
+ fingerprint?: string | null | undefined;
154
+ metadata?: Record<string, any> | undefined;
155
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
156
+ }, {
157
+ name?: string | null | undefined;
158
+ id?: string | null | undefined;
159
+ email?: string | null | undefined;
160
+ fingerprint?: string | null | undefined;
161
+ metadata?: Record<string, any> | undefined;
162
+ expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
163
+ }>;
164
+ type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
165
+ interface BillingPortalResult {
166
+ customer_id: string;
167
+ url: string;
168
+ }
169
+ interface CustomerInvoice {
170
+ product_ids: string[];
171
+ stripe_id: string;
172
+ status: string;
173
+ total: number;
174
+ currency: string;
175
+ created_at: number;
176
+ hosted_invoice_url: string;
177
+ }
178
+
179
+ export type { BillingPortalResult as B, CustomerData as C, CreateCustomerParams as a, Customer as b, CustomerExpandOption as c, CustomerProduct as d, CustomerFeature as e, CustomerInvoice as f };
@@ -0,0 +1,31 @@
1
+ import { A as AutumnError } from './error-DHbclCVh.mjs';
2
+ import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-DmFGAdnp.mjs';
3
+
4
+ type Success<T> = {
5
+ data: T;
6
+ error: null;
7
+ statusCode?: number;
8
+ };
9
+ type Failure<E> = {
10
+ data: null;
11
+ error: E;
12
+ statusCode?: number;
13
+ };
14
+ type Result<T, E> = Success<T> | Failure<E>;
15
+ type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
16
+
17
+ interface DeleteEntityResult {
18
+ success: boolean;
19
+ }
20
+ interface Entity {
21
+ id: string;
22
+ name: string;
23
+ customer_id: string;
24
+ created_at: number;
25
+ env: string;
26
+ products: CustomerProduct[];
27
+ features: Record<string, CustomerFeature>;
28
+ invoices?: CustomerInvoice[];
29
+ }
30
+
31
+ export type { AutumnPromise as A, DeleteEntityResult as D, Entity as E, Result as R };
@@ -0,0 +1,31 @@
1
+ import { A as AutumnError } from './error-DHbclCVh.js';
2
+ import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-DG6zrQYk.js';
3
+
4
+ type Success<T> = {
5
+ data: T;
6
+ error: null;
7
+ statusCode?: number;
8
+ };
9
+ type Failure<E> = {
10
+ data: null;
11
+ error: E;
12
+ statusCode?: number;
13
+ };
14
+ type Result<T, E> = Success<T> | Failure<E>;
15
+ type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
16
+
17
+ interface DeleteEntityResult {
18
+ success: boolean;
19
+ }
20
+ interface Entity {
21
+ id: string;
22
+ name: string;
23
+ customer_id: string;
24
+ created_at: number;
25
+ env: string;
26
+ products: CustomerProduct[];
27
+ features: Record<string, CustomerFeature>;
28
+ invoices?: CustomerInvoice[];
29
+ }
30
+
31
+ export type { AutumnPromise as A, DeleteEntityResult as D, Entity as E, Result as R };
@@ -1,6 +1,5 @@
1
- import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-COIU0NG3.js';
1
+ import { a as CheckFeatureResult, b as CheckProductResult } from './prodTypes-Mrr6azoz.js';
2
2
  import { z } from 'zod';
3
- import { A as AutumnError } from './error-DHbclCVh.js';
4
3
 
5
4
  declare const CancelResultSchema: z.ZodObject<{
6
5
  success: z.ZodBoolean;
@@ -23,15 +22,15 @@ declare const TrackResultSchema: z.ZodObject<{
23
22
  feature_id: z.ZodOptional<z.ZodString>;
24
23
  event_name: z.ZodOptional<z.ZodString>;
25
24
  }, "strip", z.ZodTypeAny, {
26
- id: string;
27
- code: string;
28
25
  customer_id: string;
26
+ code: string;
27
+ id: string;
29
28
  feature_id?: string | undefined;
30
29
  event_name?: string | undefined;
31
30
  }, {
32
- id: string;
33
- code: string;
34
31
  customer_id: string;
32
+ code: string;
33
+ id: string;
35
34
  feature_id?: string | undefined;
36
35
  event_name?: string | undefined;
37
36
  }>;
@@ -41,18 +40,12 @@ interface SetupPaymentResult {
41
40
  customer_id: string;
42
41
  url: string;
43
42
  }
44
-
45
- type Success<T> = {
46
- data: T;
47
- error: null;
48
- statusCode?: number;
49
- };
50
- type Failure<E> = {
51
- data: null;
52
- error: E;
53
- statusCode?: number;
43
+ type QueryResult = {
44
+ list: Array<{
45
+ period: string;
46
+ } & {
47
+ [key: string]: number;
48
+ }>;
54
49
  };
55
- type Result<T, E> = Success<T> | Failure<E>;
56
- type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
57
50
 
58
- export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
51
+ export type { CancelResult as C, QueryResult as Q, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
@@ -1,6 +1,5 @@
1
- import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-COIU0NG3.mjs';
1
+ import { a as CheckFeatureResult, b as CheckProductResult } from './prodTypes-Mrr6azoz.mjs';
2
2
  import { z } from 'zod';
3
- import { A as AutumnError } from './error-DHbclCVh.mjs';
4
3
 
5
4
  declare const CancelResultSchema: z.ZodObject<{
6
5
  success: z.ZodBoolean;
@@ -23,15 +22,15 @@ declare const TrackResultSchema: z.ZodObject<{
23
22
  feature_id: z.ZodOptional<z.ZodString>;
24
23
  event_name: z.ZodOptional<z.ZodString>;
25
24
  }, "strip", z.ZodTypeAny, {
26
- id: string;
27
- code: string;
28
25
  customer_id: string;
26
+ code: string;
27
+ id: string;
29
28
  feature_id?: string | undefined;
30
29
  event_name?: string | undefined;
31
30
  }, {
32
- id: string;
33
- code: string;
34
31
  customer_id: string;
32
+ code: string;
33
+ id: string;
35
34
  feature_id?: string | undefined;
36
35
  event_name?: string | undefined;
37
36
  }>;
@@ -41,18 +40,12 @@ interface SetupPaymentResult {
41
40
  customer_id: string;
42
41
  url: string;
43
42
  }
44
-
45
- type Success<T> = {
46
- data: T;
47
- error: null;
48
- statusCode?: number;
49
- };
50
- type Failure<E> = {
51
- data: null;
52
- error: E;
53
- statusCode?: number;
43
+ type QueryResult = {
44
+ list: Array<{
45
+ period: string;
46
+ } & {
47
+ [key: string]: number;
48
+ }>;
54
49
  };
55
- type Result<T, E> = Success<T> | Failure<E>;
56
- type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
57
50
 
58
- export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
51
+ export type { CancelResult as C, QueryResult as Q, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
@@ -0,0 +1,31 @@
1
+ import { AutumnContextParams } from '../../AutumnContext.mjs';
2
+ import { CheckParams } from '../../client/types/clientGenTypes.mjs';
3
+ import { a as CheckResult } from '../../genTypes-CHerQ_Ka.mjs';
4
+ import { b as Customer } from '../../cusTypes-DmFGAdnp.mjs';
5
+ import { E as Entity } from '../../entTypes-BbmxlLGb.mjs';
6
+ import 'react';
7
+ import '../../ReactAutumnClient-C4CPCKrp.mjs';
8
+ import '../../client/types/clientEntTypes.mjs';
9
+ import '../../error-DHbclCVh.mjs';
10
+ import '../../attachTypes-C1BZ4HNs.mjs';
11
+ import '../../prodTypes-Mrr6azoz.mjs';
12
+ import 'zod';
13
+
14
+ interface AllowedParams {
15
+ featureId?: string;
16
+ productId?: string;
17
+ requiredBalance?: number;
18
+ }
19
+ declare const openDialog: ({ result, params, context, }: {
20
+ result: CheckResult;
21
+ params: CheckParams;
22
+ context: AutumnContextParams;
23
+ }) => void;
24
+ declare const handleCheck: ({ customer, isEntity, params, context, }: {
25
+ customer: Customer | Entity | null;
26
+ isEntity?: boolean;
27
+ params: CheckParams;
28
+ context?: AutumnContextParams;
29
+ }) => CheckResult;
30
+
31
+ export { type AllowedParams, handleCheck, openDialog };
@@ -0,0 +1,31 @@
1
+ import { AutumnContextParams } from '../../AutumnContext.js';
2
+ import { CheckParams } from '../../client/types/clientGenTypes.js';
3
+ import { a as CheckResult } from '../../genTypes-CHD2Kdqf.js';
4
+ import { b as Customer } from '../../cusTypes-DG6zrQYk.js';
5
+ import { E as Entity } from '../../entTypes-DG9rJhum.js';
6
+ import 'react';
7
+ import '../../ReactAutumnClient-Cf3-brZx.js';
8
+ import '../../client/types/clientEntTypes.js';
9
+ import '../../error-DHbclCVh.js';
10
+ import '../../attachTypes-BKzcsvuA.js';
11
+ import '../../prodTypes-Mrr6azoz.js';
12
+ import 'zod';
13
+
14
+ interface AllowedParams {
15
+ featureId?: string;
16
+ productId?: string;
17
+ requiredBalance?: number;
18
+ }
19
+ declare const openDialog: ({ result, params, context, }: {
20
+ result: CheckResult;
21
+ params: CheckParams;
22
+ context: AutumnContextParams;
23
+ }) => void;
24
+ declare const handleCheck: ({ customer, isEntity, params, context, }: {
25
+ customer: Customer | Entity | null;
26
+ isEntity?: boolean;
27
+ params: CheckParams;
28
+ context?: AutumnContextParams;
29
+ }) => CheckResult;
30
+
31
+ export { type AllowedParams, handleCheck, openDialog };