alepha 0.22.0 → 0.24.0

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 (869) hide show
  1. package/assets/swagger-ui/swagger-ui-bundle.js +1 -1
  2. package/assets/swagger-ui/swagger-ui-standalone-preset.js +1 -1
  3. package/dist/api/audits/index.browser.js +49 -52
  4. package/dist/api/audits/index.browser.js.map +1 -1
  5. package/dist/api/audits/index.d.ts +629 -565
  6. package/dist/api/audits/index.d.ts.map +1 -1
  7. package/dist/api/audits/index.js +206 -98
  8. package/dist/api/audits/index.js.map +1 -1
  9. package/dist/api/files/index.browser.js +44 -44
  10. package/dist/api/files/index.browser.js.map +1 -1
  11. package/dist/api/files/index.d.ts +292 -293
  12. package/dist/api/files/index.d.ts.map +1 -1
  13. package/dist/api/files/index.js +61 -64
  14. package/dist/api/files/index.js.map +1 -1
  15. package/dist/api/jobs/index.browser.js +61 -59
  16. package/dist/api/jobs/index.browser.js.map +1 -1
  17. package/dist/api/jobs/index.d.ts +546 -347
  18. package/dist/api/jobs/index.d.ts.map +1 -1
  19. package/dist/api/jobs/index.js +165 -86
  20. package/dist/api/jobs/index.js.map +1 -1
  21. package/dist/api/keys/index.d.ts +242 -230
  22. package/dist/api/keys/index.d.ts.map +1 -1
  23. package/dist/api/keys/index.js +63 -66
  24. package/dist/api/keys/index.js.map +1 -1
  25. package/dist/api/notifications/index.browser.js +40 -38
  26. package/dist/api/notifications/index.browser.js.map +1 -1
  27. package/dist/api/notifications/index.d.ts +339 -209
  28. package/dist/api/notifications/index.d.ts.map +1 -1
  29. package/dist/api/notifications/index.js +108 -60
  30. package/dist/api/notifications/index.js.map +1 -1
  31. package/dist/api/oauth/index.d.ts +190 -78
  32. package/dist/api/oauth/index.d.ts.map +1 -1
  33. package/dist/api/oauth/index.js +290 -68
  34. package/dist/api/oauth/index.js.map +1 -1
  35. package/dist/api/organizations/index.browser.js +14 -14
  36. package/dist/api/organizations/index.browser.js.map +1 -1
  37. package/dist/api/organizations/index.d.ts +158 -134
  38. package/dist/api/organizations/index.d.ts.map +1 -1
  39. package/dist/api/organizations/index.js +18 -18
  40. package/dist/api/organizations/index.js.map +1 -1
  41. package/dist/api/parameters/index.browser.js +74 -53
  42. package/dist/api/parameters/index.browser.js.map +1 -1
  43. package/dist/api/parameters/index.d.ts +607 -513
  44. package/dist/api/parameters/index.d.ts.map +1 -1
  45. package/dist/api/parameters/index.js +205 -127
  46. package/dist/api/parameters/index.js.map +1 -1
  47. package/dist/api/payments/index.d.ts +652 -449
  48. package/dist/api/payments/index.d.ts.map +1 -1
  49. package/dist/api/payments/index.js +159 -93
  50. package/dist/api/payments/index.js.map +1 -1
  51. package/dist/api/subscriptions/index.d.ts +1032 -762
  52. package/dist/api/subscriptions/index.d.ts.map +1 -1
  53. package/dist/api/subscriptions/index.js +166 -185
  54. package/dist/api/subscriptions/index.js.map +1 -1
  55. package/dist/api/users/index.browser.js +48 -71
  56. package/dist/api/users/index.browser.js.map +1 -1
  57. package/dist/api/users/index.d.ts +1297 -1109
  58. package/dist/api/users/index.d.ts.map +1 -1
  59. package/dist/api/users/index.js +454 -369
  60. package/dist/api/users/index.js.map +1 -1
  61. package/dist/api/verifications/index.browser.js +17 -17
  62. package/dist/api/verifications/index.browser.js.map +1 -1
  63. package/dist/api/verifications/index.d.ts +169 -157
  64. package/dist/api/verifications/index.d.ts.map +1 -1
  65. package/dist/api/verifications/index.js +47 -95
  66. package/dist/api/verifications/index.js.map +1 -1
  67. package/dist/background/index.d.ts +0 -1
  68. package/dist/background/index.d.ts.map +1 -1
  69. package/dist/background/index.js.map +1 -1
  70. package/dist/background/index.workerd.js.map +1 -1
  71. package/dist/batch/index.d.ts +0 -1
  72. package/dist/batch/index.d.ts.map +1 -1
  73. package/dist/batch/index.js.map +1 -1
  74. package/dist/bin/index.js +1 -1
  75. package/dist/bin/index.js.map +1 -1
  76. package/dist/bucket/index.d.ts +27 -32
  77. package/dist/bucket/index.d.ts.map +1 -1
  78. package/dist/bucket/index.js +56 -26
  79. package/dist/bucket/index.js.map +1 -1
  80. package/dist/bucket/index.workerd.js +52 -24
  81. package/dist/bucket/index.workerd.js.map +1 -1
  82. package/dist/cache/core/index.d.ts +4 -6
  83. package/dist/cache/core/index.d.ts.map +1 -1
  84. package/dist/cache/core/index.js +4 -10
  85. package/dist/cache/core/index.js.map +1 -1
  86. package/dist/cache/core/index.workerd.js +4 -10
  87. package/dist/cache/core/index.workerd.js.map +1 -1
  88. package/dist/cache/database/index.d.ts +22 -23
  89. package/dist/cache/database/index.d.ts.map +1 -1
  90. package/dist/cache/database/index.js +11 -20
  91. package/dist/cache/database/index.js.map +1 -1
  92. package/dist/cache/redis/index.d.ts +3 -4
  93. package/dist/cache/redis/index.d.ts.map +1 -1
  94. package/dist/cache/redis/index.js +2 -2
  95. package/dist/cache/redis/index.js.map +1 -1
  96. package/dist/captcha/index.d.ts.map +1 -1
  97. package/dist/captcha/index.js +4 -4
  98. package/dist/captcha/index.js.map +1 -1
  99. package/dist/cli/config/index.d.ts +0 -1
  100. package/dist/cli/config/index.d.ts.map +1 -1
  101. package/dist/cli/core/index.d.ts +244 -475
  102. package/dist/cli/core/index.d.ts.map +1 -1
  103. package/dist/cli/core/index.js +308 -383
  104. package/dist/cli/core/index.js.map +1 -1
  105. package/dist/cli/devtools/index.d.ts +3 -9
  106. package/dist/cli/devtools/index.d.ts.map +1 -1
  107. package/dist/cli/devtools/index.js +3 -3
  108. package/dist/cli/devtools/index.js.map +1 -1
  109. package/dist/cli/i18n/index.d.ts +20 -39
  110. package/dist/cli/i18n/index.d.ts.map +1 -1
  111. package/dist/cli/i18n/index.js +51 -17
  112. package/dist/cli/i18n/index.js.map +1 -1
  113. package/dist/cli/platform/index.d.ts +89 -82
  114. package/dist/cli/platform/index.d.ts.map +1 -1
  115. package/dist/cli/platform/index.js +27 -33
  116. package/dist/cli/platform/index.js.map +1 -1
  117. package/dist/cli/platform-lib/index.d.ts +383 -410
  118. package/dist/cli/platform-lib/index.d.ts.map +1 -1
  119. package/dist/cli/platform-lib/index.js +300 -258
  120. package/dist/cli/platform-lib/index.js.map +1 -1
  121. package/dist/cli/vendor/index.d.ts +17 -41
  122. package/dist/cli/vendor/index.d.ts.map +1 -1
  123. package/dist/cli/vendor/index.js +10 -13
  124. package/dist/cli/vendor/index.js.map +1 -1
  125. package/dist/command/index.d.ts +82 -194
  126. package/dist/command/index.d.ts.map +1 -1
  127. package/dist/command/index.js +160 -563
  128. package/dist/command/index.js.map +1 -1
  129. package/dist/core/index.browser.js +845 -859
  130. package/dist/core/index.browser.js.map +1 -1
  131. package/dist/core/index.d.ts +787 -527
  132. package/dist/core/index.d.ts.map +1 -1
  133. package/dist/core/index.js +845 -859
  134. package/dist/core/index.js.map +1 -1
  135. package/dist/core/index.native.js +845 -859
  136. package/dist/core/index.native.js.map +1 -1
  137. package/dist/core/index.workerd.js +845 -859
  138. package/dist/core/index.workerd.js.map +1 -1
  139. package/dist/crypto/index.browser.js +1 -1
  140. package/dist/crypto/index.browser.js.map +1 -1
  141. package/dist/crypto/index.d.ts +3 -4
  142. package/dist/crypto/index.d.ts.map +1 -1
  143. package/dist/crypto/index.js +6 -3
  144. package/dist/crypto/index.js.map +1 -1
  145. package/dist/datetime/index.d.ts +12 -2
  146. package/dist/datetime/index.d.ts.map +1 -1
  147. package/dist/datetime/index.js +6 -1
  148. package/dist/datetime/index.js.map +1 -1
  149. package/dist/email/brevo/index.d.ts +0 -1
  150. package/dist/email/brevo/index.d.ts.map +1 -1
  151. package/dist/email/brevo/index.js +4 -4
  152. package/dist/email/brevo/index.js.map +1 -1
  153. package/dist/email/cloudflare/index.d.ts +0 -1
  154. package/dist/email/cloudflare/index.d.ts.map +1 -1
  155. package/dist/email/cloudflare/index.js +2 -2
  156. package/dist/email/cloudflare/index.js.map +1 -1
  157. package/dist/email/core/index.d.ts +15 -7
  158. package/dist/email/core/index.d.ts.map +1 -1
  159. package/dist/email/core/index.js +14 -5
  160. package/dist/email/core/index.js.map +1 -1
  161. package/dist/email/core/index.workerd.js +5 -1
  162. package/dist/email/core/index.workerd.js.map +1 -1
  163. package/dist/email/smtp/index.d.ts +8 -9
  164. package/dist/email/smtp/index.d.ts.map +1 -1
  165. package/dist/email/smtp/index.js +702 -479
  166. package/dist/email/smtp/index.js.map +1 -1
  167. package/dist/fake/index.d.ts +1580 -1238
  168. package/dist/fake/index.d.ts.map +1 -1
  169. package/dist/fake/index.js +11728 -32131
  170. package/dist/fake/index.js.map +1 -1
  171. package/dist/lock/core/index.d.ts +13 -9
  172. package/dist/lock/core/index.d.ts.map +1 -1
  173. package/dist/lock/core/index.js +5 -5
  174. package/dist/lock/core/index.js.map +1 -1
  175. package/dist/lock/redis/index.d.ts +0 -1
  176. package/dist/lock/redis/index.d.ts.map +1 -1
  177. package/dist/lock/redis/index.js.map +1 -1
  178. package/dist/logger/index.d.ts +81 -69
  179. package/dist/logger/index.d.ts.map +1 -1
  180. package/dist/logger/index.js +123 -56
  181. package/dist/logger/index.js.map +1 -1
  182. package/dist/mcp/index.d.ts +36 -90
  183. package/dist/mcp/index.d.ts.map +1 -1
  184. package/dist/mcp/index.js +65 -70
  185. package/dist/mcp/index.js.map +1 -1
  186. package/dist/orm/core/index.browser.js +54 -40
  187. package/dist/orm/core/index.browser.js.map +1 -1
  188. package/dist/orm/core/index.bun.js +140 -106
  189. package/dist/orm/core/index.bun.js.map +1 -1
  190. package/dist/orm/core/index.d.ts +145 -150
  191. package/dist/orm/core/index.d.ts.map +1 -1
  192. package/dist/orm/core/index.js +144 -109
  193. package/dist/orm/core/index.js.map +1 -1
  194. package/dist/orm/postgres/index.bun.js +64 -54
  195. package/dist/orm/postgres/index.bun.js.map +1 -1
  196. package/dist/orm/postgres/index.d.ts +36 -76
  197. package/dist/orm/postgres/index.d.ts.map +1 -1
  198. package/dist/orm/postgres/index.js +67 -57
  199. package/dist/orm/postgres/index.js.map +1 -1
  200. package/dist/queue/core/index.d.ts +62 -75
  201. package/dist/queue/core/index.d.ts.map +1 -1
  202. package/dist/queue/core/index.js +48 -71
  203. package/dist/queue/core/index.js.map +1 -1
  204. package/dist/queue/core/index.workerd.js +48 -71
  205. package/dist/queue/core/index.workerd.js.map +1 -1
  206. package/dist/queue/redis/index.d.ts +3 -4
  207. package/dist/queue/redis/index.d.ts.map +1 -1
  208. package/dist/queue/redis/index.js +2 -2
  209. package/dist/queue/redis/index.js.map +1 -1
  210. package/dist/react/auth/index.browser.js.map +1 -1
  211. package/dist/react/auth/index.d.ts +7 -4
  212. package/dist/react/auth/index.d.ts.map +1 -1
  213. package/dist/react/auth/index.js.map +1 -1
  214. package/dist/react/core/index.d.ts +87 -5
  215. package/dist/react/core/index.d.ts.map +1 -1
  216. package/dist/react/core/index.js +170 -23
  217. package/dist/react/core/index.js.map +1 -1
  218. package/dist/react/form/index.d.ts +4 -6
  219. package/dist/react/form/index.d.ts.map +1 -1
  220. package/dist/react/form/index.js +107 -71
  221. package/dist/react/form/index.js.map +1 -1
  222. package/dist/react/head/index.browser.js.map +1 -1
  223. package/dist/react/head/index.d.ts +0 -1
  224. package/dist/react/head/index.d.ts.map +1 -1
  225. package/dist/react/head/index.js.map +1 -1
  226. package/dist/react/i18n/index.d.ts +47 -5
  227. package/dist/react/i18n/index.d.ts.map +1 -1
  228. package/dist/react/i18n/index.js +116 -12
  229. package/dist/react/i18n/index.js.map +1 -1
  230. package/dist/react/intro/index.d.ts +1 -4
  231. package/dist/react/intro/index.d.ts.map +1 -1
  232. package/dist/react/intro/index.js.map +1 -1
  233. package/dist/react/router/index.browser.js +188 -29
  234. package/dist/react/router/index.browser.js.map +1 -1
  235. package/dist/react/router/index.d.ts +480 -372
  236. package/dist/react/router/index.d.ts.map +1 -1
  237. package/dist/react/router/index.js +261 -47
  238. package/dist/react/router/index.js.map +1 -1
  239. package/dist/react/sitemap/index.browser.js +35 -0
  240. package/dist/react/sitemap/index.browser.js.map +1 -0
  241. package/dist/react/sitemap/index.d.ts +91 -0
  242. package/dist/react/sitemap/index.d.ts.map +1 -0
  243. package/dist/react/sitemap/index.js +131 -0
  244. package/dist/react/sitemap/index.js.map +1 -0
  245. package/dist/react/testing/index.d.ts +4 -5
  246. package/dist/react/testing/index.d.ts.map +1 -1
  247. package/dist/react/testing/index.js +41 -15
  248. package/dist/react/testing/index.js.map +1 -1
  249. package/dist/react/testing/{chunk-BpyX8vjI.js → rolldown-runtime-Bl3dcgcQ.js} +1 -1
  250. package/dist/react/ui/index.d.ts +35 -34
  251. package/dist/react/ui/index.d.ts.map +1 -1
  252. package/dist/react/ui/index.js +12 -17
  253. package/dist/react/ui/index.js.map +1 -1
  254. package/dist/redis/index.bun.js +5 -5
  255. package/dist/redis/index.bun.js.map +1 -1
  256. package/dist/redis/index.d.ts +6 -7
  257. package/dist/redis/index.d.ts.map +1 -1
  258. package/dist/redis/index.js +6 -6
  259. package/dist/redis/index.js.map +1 -1
  260. package/dist/retry/index.d.ts +0 -1
  261. package/dist/retry/index.d.ts.map +1 -1
  262. package/dist/retry/index.js.map +1 -1
  263. package/dist/router/index.d.ts.map +1 -1
  264. package/dist/router/index.js.map +1 -1
  265. package/dist/scheduler/index.d.ts +4 -12
  266. package/dist/scheduler/index.d.ts.map +1 -1
  267. package/dist/scheduler/index.js +9 -4
  268. package/dist/scheduler/index.js.map +1 -1
  269. package/dist/scheduler/index.workerd.js +9 -4
  270. package/dist/scheduler/index.workerd.js.map +1 -1
  271. package/dist/security/index.browser.js +30 -28
  272. package/dist/security/index.browser.js.map +1 -1
  273. package/dist/security/index.d.ts +113 -44
  274. package/dist/security/index.d.ts.map +1 -1
  275. package/dist/security/index.js +452 -37
  276. package/dist/security/index.js.map +1 -1
  277. package/dist/server/auth/index.browser.js +19 -19
  278. package/dist/server/auth/index.browser.js.map +1 -1
  279. package/dist/server/auth/index.d.ts +215 -187
  280. package/dist/server/auth/index.d.ts.map +1 -1
  281. package/dist/server/auth/index.js +1145 -86
  282. package/dist/server/auth/index.js.map +1 -1
  283. package/dist/server/cookies/index.browser.js +103 -5
  284. package/dist/server/cookies/index.browser.js.map +1 -1
  285. package/dist/server/cookies/index.d.ts +86 -4
  286. package/dist/server/cookies/index.d.ts.map +1 -1
  287. package/dist/server/cookies/index.js +121 -8
  288. package/dist/server/cookies/index.js.map +1 -1
  289. package/dist/server/core/index.browser.js +22 -27
  290. package/dist/server/core/index.browser.js.map +1 -1
  291. package/dist/server/core/index.d.ts +134 -85
  292. package/dist/server/core/index.d.ts.map +1 -1
  293. package/dist/server/core/index.js +130 -118
  294. package/dist/server/core/index.js.map +1 -1
  295. package/dist/server/cors/index.d.ts +9 -10
  296. package/dist/server/cors/index.d.ts.map +1 -1
  297. package/dist/server/cors/index.js +14 -26
  298. package/dist/server/cors/index.js.map +1 -1
  299. package/dist/server/etag/index.d.ts +2 -3
  300. package/dist/server/etag/index.d.ts.map +1 -1
  301. package/dist/server/etag/index.js.map +1 -1
  302. package/dist/server/health/index.d.ts +18 -19
  303. package/dist/server/health/index.d.ts.map +1 -1
  304. package/dist/server/health/index.js +6 -6
  305. package/dist/server/health/index.js.map +1 -1
  306. package/dist/server/links/index.browser.js +15 -18
  307. package/dist/server/links/index.browser.js.map +1 -1
  308. package/dist/server/links/index.d.ts +66 -67
  309. package/dist/server/links/index.d.ts.map +1 -1
  310. package/dist/server/links/index.js +29 -32
  311. package/dist/server/links/index.js.map +1 -1
  312. package/dist/server/metrics/index.d.ts +0 -1
  313. package/dist/server/metrics/index.d.ts.map +1 -1
  314. package/dist/server/metrics/index.js +10 -3
  315. package/dist/server/metrics/index.js.map +1 -1
  316. package/dist/server/proxy/index.d.ts +0 -1
  317. package/dist/server/proxy/index.d.ts.map +1 -1
  318. package/dist/server/proxy/index.js.map +1 -1
  319. package/dist/server/rate-limit/index.d.ts +8 -9
  320. package/dist/server/rate-limit/index.d.ts.map +1 -1
  321. package/dist/server/rate-limit/index.js +6 -12
  322. package/dist/server/rate-limit/index.js.map +1 -1
  323. package/dist/server/static/index.d.ts +0 -1
  324. package/dist/server/static/index.d.ts.map +1 -1
  325. package/dist/server/static/index.js.map +1 -1
  326. package/dist/server/swagger/index.d.ts +4 -4
  327. package/dist/server/swagger/index.d.ts.map +1 -1
  328. package/dist/server/swagger/index.js +37 -25
  329. package/dist/server/swagger/index.js.map +1 -1
  330. package/dist/sms/index.d.ts +0 -1
  331. package/dist/sms/index.d.ts.map +1 -1
  332. package/dist/sms/index.js.map +1 -1
  333. package/dist/system/index.browser.js.map +1 -1
  334. package/dist/system/index.d.ts +0 -1
  335. package/dist/system/index.d.ts.map +1 -1
  336. package/dist/system/index.js +2 -1
  337. package/dist/system/index.js.map +1 -1
  338. package/dist/system/index.workerd.js.map +1 -1
  339. package/dist/topic/core/index.d.ts +19 -20
  340. package/dist/topic/core/index.d.ts.map +1 -1
  341. package/dist/topic/core/index.js +8 -8
  342. package/dist/topic/core/index.js.map +1 -1
  343. package/dist/topic/redis/index.d.ts +3 -4
  344. package/dist/topic/redis/index.d.ts.map +1 -1
  345. package/dist/topic/redis/index.js +2 -2
  346. package/dist/topic/redis/index.js.map +1 -1
  347. package/package.json +36 -36
  348. package/src/api/audits/__tests__/AuditJobs.spec.ts +83 -0
  349. package/src/api/audits/__tests__/AuditService.spec.ts +139 -1
  350. package/src/api/audits/controllers/AdminAuditController.ts +41 -41
  351. package/src/api/audits/entities/audits.ts +22 -22
  352. package/src/api/audits/index.ts +6 -1
  353. package/src/api/audits/jobs/AuditJobs.ts +29 -0
  354. package/src/api/audits/parameters/AuditParameters.ts +51 -0
  355. package/src/api/audits/primitives/$audit.ts +24 -0
  356. package/src/api/audits/schemas/auditQuerySchema.ts +13 -13
  357. package/src/api/audits/schemas/createAuditSchema.ts +18 -18
  358. package/src/api/audits/services/AuditService.ts +79 -7
  359. package/src/api/files/__tests__/FileController.spec.ts +5 -5
  360. package/src/api/files/__tests__/FileJobs.spec.ts +6 -0
  361. package/src/api/files/controllers/FileController.ts +25 -25
  362. package/src/api/files/entities/files.ts +15 -15
  363. package/src/api/files/schemas/fileCreatorSummarySchema.ts +7 -7
  364. package/src/api/files/schemas/fileQuerySchema.ts +9 -9
  365. package/src/api/files/schemas/fileResourceSchema.ts +7 -9
  366. package/src/api/files/schemas/storageStatsSchema.ts +13 -13
  367. package/src/api/jobs/__tests__/$job-hardening.spec.ts +289 -0
  368. package/src/api/jobs/__tests__/$job.spec.ts +18 -18
  369. package/src/api/jobs/controllers/AdminJobController.ts +8 -8
  370. package/src/api/jobs/entities/jobExecutionEntity.ts +29 -19
  371. package/src/api/jobs/providers/JobProvider.ts +128 -12
  372. package/src/api/jobs/providers/JobQueueProvider.ts +2 -2
  373. package/src/api/jobs/schemas/jobConfigAtom.ts +22 -22
  374. package/src/api/jobs/schemas/jobExecutionQuerySchema.ts +6 -6
  375. package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +11 -15
  376. package/src/api/jobs/schemas/jobRegistrationSchema.ts +20 -19
  377. package/src/api/jobs/schemas/triggerJobSchema.ts +3 -3
  378. package/src/api/jobs/services/JobService.ts +6 -6
  379. package/src/api/keys/__tests__/ApiKeyService.spec.ts +2 -2
  380. package/src/api/keys/controllers/AdminApiKeyController.ts +10 -10
  381. package/src/api/keys/entities/apiKeyEntity.ts +15 -15
  382. package/src/api/keys/schemas/adminApiKeyQuerySchema.ts +4 -4
  383. package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +15 -15
  384. package/src/api/keys/schemas/createApiKeyBodySchema.ts +5 -5
  385. package/src/api/keys/schemas/createApiKeyResponseSchema.ts +9 -9
  386. package/src/api/keys/schemas/listApiKeyResponseSchema.ts +13 -13
  387. package/src/api/keys/schemas/revokeApiKeyParamsSchema.ts +3 -3
  388. package/src/api/keys/schemas/revokeApiKeyResponseSchema.ts +3 -3
  389. package/src/api/notifications/__tests__/AlephaApiNotifications.spec.ts +2 -2
  390. package/src/api/notifications/controllers/AdminNotificationController.ts +38 -14
  391. package/src/api/notifications/jobs/NotificationJobs.ts +7 -6
  392. package/src/api/notifications/primitives/$notification.ts +43 -4
  393. package/src/api/notifications/schemas/notificationContactPreferencesSchema.ts +4 -4
  394. package/src/api/notifications/schemas/notificationContactSchema.ts +7 -7
  395. package/src/api/notifications/schemas/notificationDetailResourceSchema.ts +9 -11
  396. package/src/api/notifications/schemas/notificationPayloadSchema.ts +11 -9
  397. package/src/api/notifications/schemas/notificationQuerySchema.ts +6 -6
  398. package/src/api/notifications/schemas/notificationResourceSchema.ts +14 -14
  399. package/src/api/notifications/services/NotificationSenderService.ts +38 -2
  400. package/src/api/oauth/__tests__/OAuthClientService.spec.ts +42 -0
  401. package/src/api/oauth/__tests__/OAuthController.spec.ts +128 -0
  402. package/src/api/oauth/controllers/OAuthController.ts +132 -12
  403. package/src/api/oauth/entities/oauthClientEntity.ts +29 -12
  404. package/src/api/oauth/helpers/oauthMetadata.ts +1 -0
  405. package/src/api/oauth/helpers/oidcMetadata.ts +19 -0
  406. package/src/api/oauth/index.ts +1 -0
  407. package/src/api/oauth/schemas/authorizeDecisionBodySchema.ts +12 -11
  408. package/src/api/oauth/schemas/authorizeQuerySchema.ts +12 -10
  409. package/src/api/oauth/schemas/registerClientBodySchema.ts +10 -11
  410. package/src/api/oauth/schemas/tokenRequestBodySchema.ts +9 -8
  411. package/src/api/oauth/services/OAuthClientService.ts +228 -15
  412. package/src/api/organizations/controllers/AdminOrganizationController.ts +8 -8
  413. package/src/api/organizations/entities/organizations.ts +6 -6
  414. package/src/api/organizations/schemas/createOrganizationSchema.ts +5 -5
  415. package/src/api/organizations/schemas/organizationQuerySchema.ts +4 -4
  416. package/src/api/organizations/schemas/updateOrganizationSchema.ts +1 -2
  417. package/src/api/parameters/__tests__/$parameter.spec.ts +229 -50
  418. package/src/api/parameters/controllers/AdminParameterController.ts +9 -12
  419. package/src/api/parameters/entities/parameters.ts +29 -16
  420. package/src/api/parameters/primitives/$parameter.ts +3 -3
  421. package/src/api/parameters/schemas/activateParameterBodySchema.ts +4 -4
  422. package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +15 -15
  423. package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +7 -7
  424. package/src/api/parameters/schemas/parameterCurrentResponseSchema.ts +7 -7
  425. package/src/api/parameters/schemas/parameterHistoryResponseSchema.ts +3 -3
  426. package/src/api/parameters/schemas/parameterNameParamSchema.ts +2 -3
  427. package/src/api/parameters/schemas/parameterNamesResponseSchema.ts +3 -3
  428. package/src/api/parameters/schemas/parameterResponseSchema.ts +3 -3
  429. package/src/api/parameters/schemas/parameterStatusSchema.ts +2 -2
  430. package/src/api/parameters/schemas/parameterTreeNodeSchema.ts +6 -6
  431. package/src/api/parameters/schemas/parameterVersionParamSchema.ts +5 -6
  432. package/src/api/parameters/schemas/parameterVersionResponseSchema.ts +3 -3
  433. package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +6 -9
  434. package/src/api/parameters/services/ParameterProvider.ts +152 -65
  435. package/src/api/payments/controllers/AdminPaymentController.ts +7 -7
  436. package/src/api/payments/controllers/MockCheckoutController.ts +79 -28
  437. package/src/api/payments/controllers/PaymentController.ts +4 -4
  438. package/src/api/payments/entities/paymentIntents.ts +11 -11
  439. package/src/api/payments/entities/paymentMethods.ts +11 -11
  440. package/src/api/payments/entities/refunds.ts +9 -9
  441. package/src/api/payments/providers/PaymentProvider.ts +18 -0
  442. package/src/api/payments/schemas/intentSchemas.ts +25 -25
  443. package/src/api/payments/schemas/paymentMethodSchemas.ts +3 -3
  444. package/src/api/payments/services/PaymentService.ts +60 -3
  445. package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +14 -0
  446. package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +11 -11
  447. package/src/api/subscriptions/controllers/SubscriptionController.ts +5 -4
  448. package/src/api/subscriptions/entities/subscriptionEvents.ts +15 -15
  449. package/src/api/subscriptions/entities/subscriptions.ts +22 -22
  450. package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +22 -22
  451. package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +4 -4
  452. package/src/api/subscriptions/schemas/changePlanSchema.ts +5 -5
  453. package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +14 -7
  454. package/src/api/subscriptions/schemas/entitlementsSchema.ts +10 -10
  455. package/src/api/subscriptions/schemas/mrrSchema.ts +9 -9
  456. package/src/api/subscriptions/schemas/planDefinitionSchema.ts +21 -21
  457. package/src/api/subscriptions/schemas/planResourceSchema.ts +19 -19
  458. package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +8 -8
  459. package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +7 -7
  460. package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +17 -17
  461. package/src/api/subscriptions/services/SubscriptionConfig.ts +2 -2
  462. package/src/api/users/__tests__/ApiKeys-integration.spec.ts +11 -11
  463. package/src/api/users/atoms/realmAuthSettingsAtom.ts +111 -119
  464. package/src/api/users/controllers/AdminIdentityController.ts +29 -19
  465. package/src/api/users/controllers/AdminSessionController.ts +37 -27
  466. package/src/api/users/controllers/AdminUserController.ts +75 -53
  467. package/src/api/users/controllers/MySessionController.ts +125 -0
  468. package/src/api/users/controllers/RealmController.ts +9 -9
  469. package/src/api/users/controllers/UserController.ts +55 -55
  470. package/src/api/users/entities/identities.ts +8 -8
  471. package/src/api/users/entities/sessions.ts +17 -17
  472. package/src/api/users/entities/users.ts +17 -17
  473. package/src/api/users/index.ts +3 -0
  474. package/src/api/users/notifications/UserNotifications.ts +76 -24
  475. package/src/api/users/primitives/$realm.ts +12 -0
  476. package/src/api/users/schemas/completePasswordResetRequestSchema.ts +8 -12
  477. package/src/api/users/schemas/completeRegistrationRequestSchema.ts +17 -20
  478. package/src/api/users/schemas/createUserSchema.ts +2 -2
  479. package/src/api/users/schemas/identityQuerySchema.ts +4 -4
  480. package/src/api/users/schemas/identityResourceSchema.ts +3 -2
  481. package/src/api/users/schemas/loginSchema.ts +4 -4
  482. package/src/api/users/schemas/passwordResetIntentResponseSchema.ts +6 -8
  483. package/src/api/users/schemas/realmConfigSchema.ts +10 -10
  484. package/src/api/users/schemas/registerQuerySchema.ts +6 -6
  485. package/src/api/users/schemas/registerRequestSchema.ts +21 -43
  486. package/src/api/users/schemas/registerResponseSchema.ts +2 -2
  487. package/src/api/users/schemas/registerSchema.ts +13 -31
  488. package/src/api/users/schemas/registrationIntentResponseSchema.ts +19 -23
  489. package/src/api/users/schemas/resetPasswordSchema.ts +10 -17
  490. package/src/api/users/schemas/sessionQuerySchema.ts +3 -3
  491. package/src/api/users/schemas/sessionResourceSchema.ts +25 -25
  492. package/src/api/users/schemas/updateUserSchema.ts +3 -4
  493. package/src/api/users/schemas/userQuerySchema.ts +7 -7
  494. package/src/api/users/services/RegistrationService.ts +25 -11
  495. package/src/api/users/services/UserService.ts +12 -6
  496. package/src/api/verifications/__tests__/CodeVerification.spec.ts +63 -101
  497. package/src/api/verifications/__tests__/LinkVerification.spec.ts +23 -92
  498. package/src/api/verifications/controllers/VerificationController.ts +13 -27
  499. package/src/api/verifications/entities/verifications.ts +13 -14
  500. package/src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts +17 -14
  501. package/src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts +9 -10
  502. package/src/api/verifications/schemas/verificationSettingsSchema.ts +65 -66
  503. package/src/api/verifications/schemas/verificationTypeEnumSchema.ts +2 -2
  504. package/src/api/verifications/services/VerificationService.ts +12 -0
  505. package/src/background/__tests__/BackgroundTaskProvider.spec.ts +36 -0
  506. package/src/batch/__tests__/$batch.spec.ts +22 -22
  507. package/src/batch/__tests__/startup-buffering.spec.ts +9 -9
  508. package/src/bin/index.ts +1 -1
  509. package/src/bucket/__tests__/TenantScopedBucket.spec.ts +60 -0
  510. package/src/bucket/providers/LocalFileStorageProvider.ts +14 -6
  511. package/src/bucket/providers/MemoryFileStorageProvider.ts +18 -7
  512. package/src/bucket/providers/R2FileStorageProvider.ts +14 -6
  513. package/src/bucket/providers/S3FileStorageProvider.ts +31 -15
  514. package/src/cache/core/primitives/$cache.ts +7 -10
  515. package/src/cache/database/entities/cacheEntries.ts +16 -27
  516. package/src/cache/database/providers/DatabaseCacheProvider.ts +15 -13
  517. package/src/cache/redis/providers/RedisCacheProvider.ts +6 -6
  518. package/src/captcha/providers/TurnstileCaptchaProvider.ts +4 -4
  519. package/src/cli/core/__tests__/BuildCloudflareTask.spec.ts +178 -0
  520. package/src/cli/core/__tests__/BuildDockerTask.spec.ts +0 -2
  521. package/src/cli/core/__tests__/DbCommand.spec.ts +108 -0
  522. package/src/cli/core/atoms/appEntryOptions.ts +5 -5
  523. package/src/cli/core/atoms/buildOptions.ts +76 -88
  524. package/src/cli/core/atoms/changelogOptions.ts +3 -3
  525. package/src/cli/core/atoms/devOptions.ts +3 -3
  526. package/src/cli/core/commands/build.ts +36 -49
  527. package/src/cli/core/commands/db.ts +171 -83
  528. package/src/cli/core/commands/dev.ts +8 -8
  529. package/src/cli/core/commands/gen/changelog.ts +12 -14
  530. package/src/cli/core/commands/gen/env.ts +6 -6
  531. package/src/cli/core/commands/gen/openapi.ts +6 -6
  532. package/src/cli/core/commands/init.ts +28 -33
  533. package/src/cli/core/commands/pack.ts +10 -10
  534. package/src/cli/core/commands/root.ts +7 -8
  535. package/src/cli/core/commands/test.ts +17 -20
  536. package/src/cli/core/index.ts +0 -3
  537. package/src/cli/core/tasks/BuildCloudflareTask.ts +138 -245
  538. package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
  539. package/src/cli/core/templates/apiHelloResponseSchemaTs.ts +4 -4
  540. package/src/cli/devtools/atoms/devtoolsOptions.ts +6 -6
  541. package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
  542. package/src/cli/i18n/atoms/i18nOptions.ts +8 -8
  543. package/src/cli/i18n/services/I18nCheckService.ts +65 -11
  544. package/src/cli/platform/commands/SecretsCommand.ts +24 -25
  545. package/src/cli/platform/commands/platform.ts +40 -46
  546. package/src/cli/platform/index.ts +1 -1
  547. package/src/cli/platform-lib/__tests__/CloudflareAdapter.spec.ts +0 -4
  548. package/src/cli/platform-lib/__tests__/PlatformInspector.spec.ts +10 -3
  549. package/src/cli/platform-lib/__tests__/VercelAdapter.spec.ts +0 -2
  550. package/src/cli/platform-lib/adapters/CloudflareAdapter.ts +141 -50
  551. package/src/cli/platform-lib/adapters/VercelAdapter.ts +6 -11
  552. package/src/cli/platform-lib/atoms/platformOptions.ts +46 -25
  553. package/src/cli/platform-lib/schemas/cloudflare.ts +87 -87
  554. package/src/cli/platform-lib/schemas/platform.ts +51 -51
  555. package/src/cli/platform-lib/schemas/vercel.ts +28 -28
  556. package/src/cli/platform-lib/services/CloudflareApi.ts +5 -5
  557. package/src/cli/platform-lib/services/VercelApi.ts +4 -4
  558. package/src/cli/platform-lib/services/VercelCli.ts +6 -15
  559. package/src/cli/platform-lib/services/WranglerApi.ts +6 -15
  560. package/src/cli/vendor/atoms/vendorOptions.ts +9 -9
  561. package/src/cli/vendor/commands/VendorCommand.ts +11 -12
  562. package/src/command/__tests__/$command.spec.ts +82 -83
  563. package/src/command/__tests__/Asker.spec.ts +6 -13
  564. package/src/command/__tests__/CliProvider.spec.ts +136 -149
  565. package/src/command/__tests__/Runner.spec.ts +86 -110
  566. package/src/command/helpers/Asker.ts +23 -58
  567. package/src/command/helpers/Runner.ts +34 -110
  568. package/src/command/index.ts +4 -9
  569. package/src/command/primitives/$command.ts +10 -10
  570. package/src/command/providers/CliProvider.ts +183 -161
  571. package/src/core/Alepha.ts +62 -13
  572. package/src/core/__tests__/$atom.spec.ts +52 -3
  573. package/src/core/__tests__/$computed.spec.ts +129 -0
  574. package/src/core/__tests__/$env.spec.ts +13 -13
  575. package/src/core/__tests__/$inject.spec.ts +4 -4
  576. package/src/core/__tests__/$module.spec.ts +1 -1
  577. package/src/core/__tests__/Alepha-graph.spec.ts +1 -1
  578. package/src/core/__tests__/Alepha-parseEnv.spec.ts +32 -32
  579. package/src/core/__tests__/Alepha-start.spec.ts +3 -3
  580. package/src/core/__tests__/CodecManager.spec.ts +113 -94
  581. package/src/core/__tests__/KeylessJsonSchemaCodec.spec.ts +138 -138
  582. package/src/core/__tests__/SchemaValidator.spec.ts +43 -44
  583. package/src/core/__tests__/StateManager.persist.browser.spec.ts +87 -0
  584. package/src/core/__tests__/StateManager.spec.ts +423 -0
  585. package/src/core/__tests__/TypeBox-usecases.spec.ts +8 -8
  586. package/src/core/__tests__/TypeProvider.spec.ts +314 -309
  587. package/src/core/__tests__/dump.spec.ts +6 -6
  588. package/src/core/__tests__/pagination.spec.ts +4 -4
  589. package/src/core/__tests__/scoped-after-start.spec.ts +43 -0
  590. package/src/core/errors/TypeBoxError.ts +10 -4
  591. package/src/core/helpers/FileLike.ts +5 -5
  592. package/src/core/helpers/coerceStrings.ts +70 -0
  593. package/src/core/helpers/jsonSchemaToZod.ts +112 -0
  594. package/src/core/index.shared.ts +4 -1
  595. package/src/core/primitives/$atom.ts +95 -27
  596. package/src/core/primitives/$computed.ts +148 -0
  597. package/src/core/primitives/$env.ts +5 -5
  598. package/src/core/primitives/$state.ts +1 -1
  599. package/src/core/providers/AlsProvider.ts +26 -0
  600. package/src/core/providers/CodecManager.ts +1 -2
  601. package/src/core/providers/JsonSchemaCodec.ts +1 -2
  602. package/src/core/providers/KeylessJsonSchemaCodec.ts +82 -57
  603. package/src/core/providers/SchemaValidator.ts +48 -158
  604. package/src/core/providers/StateManager.ts +383 -9
  605. package/src/core/providers/TypeProvider.ts +80 -734
  606. package/src/core/providers/ZodProvider.ts +380 -0
  607. package/src/core/providers/zodAugment.ts +69 -0
  608. package/src/core/schemas/pageQuerySchema.ts +19 -21
  609. package/src/core/schemas/pageSchema.ts +47 -57
  610. package/src/crypto/__tests__/SecretProvider.spec.ts +31 -0
  611. package/src/crypto/providers/SecretProvider.ts +16 -10
  612. package/src/datetime/primitives/$throttle.ts +6 -1
  613. package/src/email/brevo/providers/BrevoEmailProvider.ts +4 -4
  614. package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +6 -6
  615. package/src/email/core/index.ts +7 -2
  616. package/src/email/core/primitives/$email.ts +5 -1
  617. package/src/email/core/providers/LocalEmailProvider.ts +5 -5
  618. package/src/email/smtp/providers/NodemailerEmailProvider.ts +41 -52
  619. package/src/fake/__tests__/FakeProvider.spec.ts +110 -110
  620. package/src/fake/__tests__/keyName.example.ts +21 -21
  621. package/src/fake/__tests__/keyName.spec.ts +41 -41
  622. package/src/fake/__tests__/module.example.ts +8 -8
  623. package/src/fake/providers/FakeProvider.ts +122 -121
  624. package/src/lock/core/__tests__/lock-mutual-exclusion.spec.ts +44 -0
  625. package/src/lock/core/index.ts +1 -0
  626. package/src/lock/core/primitives/$lock.ts +13 -6
  627. package/src/logger/__tests__/CliFormatterProvider.spec.ts +76 -0
  628. package/src/logger/__tests__/Logger.spec.ts +49 -0
  629. package/src/logger/index.ts +25 -18
  630. package/src/logger/providers/CliFormatterProvider.ts +75 -0
  631. package/src/logger/schemas/logEntrySchema.ts +10 -10
  632. package/src/logger/services/Logger.ts +18 -0
  633. package/src/mcp/__tests__/$prompt.spec.ts +21 -23
  634. package/src/mcp/__tests__/$tool.spec.ts +22 -22
  635. package/src/mcp/__tests__/McpServerProvider.spec.ts +82 -11
  636. package/src/mcp/__tests__/StreamableHttpMcpTransport.spec.ts +2 -2
  637. package/src/mcp/__tests__/integration.spec.ts +33 -33
  638. package/src/mcp/primitives/$prompt.ts +11 -9
  639. package/src/mcp/primitives/$tool.ts +27 -86
  640. package/src/mcp/providers/McpServerProvider.ts +55 -0
  641. package/src/mcp/transports/StreamableHttpMcpTransport.ts +7 -7
  642. package/src/orm/__tests__/$repository-tests.ts +133 -27
  643. package/src/orm/__tests__/$repository.spec.ts +23 -0
  644. package/src/orm/__tests__/$transactional-tests.ts +4 -4
  645. package/src/orm/__tests__/ModelBuilder-tests.ts +28 -28
  646. package/src/orm/__tests__/ModelBuilder.spec.ts +124 -106
  647. package/src/orm/__tests__/QueryManager.spec.ts +5 -5
  648. package/src/orm/__tests__/delete-returning-tests.ts +11 -11
  649. package/src/orm/__tests__/deletedAt-tests.ts +3 -3
  650. package/src/orm/__tests__/enums.spec.ts +29 -25
  651. package/src/orm/__tests__/execute-tests.ts +8 -8
  652. package/src/orm/__tests__/fixtures/bigEntitySchema.ts +48 -48
  653. package/src/orm/__tests__/fixtures/userEntitySchema.ts +6 -6
  654. package/src/orm/__tests__/joins-tests.ts +30 -30
  655. package/src/orm/__tests__/organization-tests.ts +105 -3
  656. package/src/orm/__tests__/organization.spec.ts +46 -0
  657. package/src/orm/__tests__/orm-errors.spec.ts +10 -10
  658. package/src/orm/__tests__/orm-next-tests.ts +29 -29
  659. package/src/orm/__tests__/orm-showcase-tests.ts +9 -9
  660. package/src/orm/__tests__/primaryKey.spec.ts +4 -4
  661. package/src/orm/__tests__/query-date-encoding-tests.ts +17 -17
  662. package/src/orm/__tests__/ref-auto-onDelete.spec.ts +14 -14
  663. package/src/orm/__tests__/references.spec.ts +7 -7
  664. package/src/orm/__tests__/security.spec.ts +17 -17
  665. package/src/orm/__tests__/string-operators-tests.ts +5 -5
  666. package/src/orm/__tests__/timestamps-tests.ts +14 -14
  667. package/src/orm/__tests__/validation-tests.ts +5 -5
  668. package/src/orm/core/__tests__/BunSqliteProvider.bun.spec.ts +8 -8
  669. package/src/orm/core/constants/PG_SYMBOLS.ts +13 -1
  670. package/src/orm/core/entities/alephaSequences.ts +8 -8
  671. package/src/orm/core/helpers/pgAttr.ts +4 -4
  672. package/src/orm/core/primitives/$entity.ts +10 -6
  673. package/src/orm/core/providers/DatabaseTypeProvider.ts +46 -53
  674. package/src/orm/core/providers/drivers/BunSqliteProvider.ts +8 -8
  675. package/src/orm/core/providers/drivers/CloudflareD1Provider.ts +3 -5
  676. package/src/orm/core/providers/drivers/NodeSqliteProvider.ts +8 -8
  677. package/src/orm/core/schemas/databaseEnvSchema.ts +4 -4
  678. package/src/orm/core/schemas/insertSchema.ts +14 -18
  679. package/src/orm/core/schemas/legacyIdSchema.ts +2 -2
  680. package/src/orm/core/schemas/updateSchema.ts +10 -16
  681. package/src/orm/core/services/PgRelationManager.ts +2 -2
  682. package/src/orm/core/services/QueryManager.ts +13 -2
  683. package/src/orm/core/services/Repository.ts +88 -33
  684. package/src/orm/core/services/SqliteModelBuilder.ts +38 -45
  685. package/src/orm/postgres/__tests__/BunPostgresProvider.bun.spec.ts +4 -4
  686. package/src/orm/postgres/providers/CloudflareHyperdriveProvider.ts +4 -6
  687. package/src/orm/postgres/schemas/postgresEnvSchema.ts +6 -6
  688. package/src/orm/postgres/services/PostgresModelBuilder.ts +127 -114
  689. package/src/queue/core/__tests__/$consumer.spec.ts +4 -4
  690. package/src/queue/core/__tests__/WorkerProvider.spec.ts +4 -4
  691. package/src/queue/core/__tests__/shared.ts +6 -6
  692. package/src/queue/core/primitives/$consumer.ts +5 -5
  693. package/src/queue/core/primitives/$queue.ts +44 -61
  694. package/src/queue/core/providers/CloudflareQueueProvider.ts +6 -0
  695. package/src/queue/core/providers/WorkerProvider.ts +17 -14
  696. package/src/queue/redis/providers/RedisQueueProvider.ts +3 -3
  697. package/src/react/core/__tests__/ErrorBoundary.browser.spec.tsx +92 -0
  698. package/src/react/core/__tests__/Router.spec.tsx +4 -4
  699. package/src/react/core/__tests__/useComputed.browser.spec.tsx +192 -0
  700. package/src/react/core/__tests__/useQuery.browser.spec.tsx +48 -0
  701. package/src/react/core/__tests__/useSelector.browser.spec.tsx +105 -0
  702. package/src/react/core/__tests__/useStore.browser.spec.tsx +113 -0
  703. package/src/react/core/components/ErrorBoundary.tsx +42 -0
  704. package/src/react/core/hooks/useAction.ts +56 -19
  705. package/src/react/core/hooks/useComputed.ts +91 -0
  706. package/src/react/core/hooks/useSelector.ts +67 -0
  707. package/src/react/core/hooks/useStore.ts +36 -17
  708. package/src/react/core/index.ts +3 -0
  709. package/src/react/core/utils/shallowEqual.ts +36 -0
  710. package/src/react/form/__tests__/FormModel-submit-loading.spec.ts +71 -0
  711. package/src/react/form/__tests__/form-submitting-reactive.browser.spec.tsx +96 -0
  712. package/src/react/form/__tests__/useForm.browser.spec.tsx +54 -54
  713. package/src/react/form/errors/FormValidationError.ts +0 -2
  714. package/src/react/form/hooks/useForm.ts +19 -4
  715. package/src/react/form/hooks/useFormQuerySync.ts +0 -0
  716. package/src/react/form/services/FormModel.ts +124 -86
  717. package/src/react/form/services/parseField.ts +66 -27
  718. package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
  719. package/src/react/i18n/__tests__/Localize.spec.tsx +1 -1
  720. package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
  721. package/src/react/i18n/providers/I18nProvider.ts +173 -14
  722. package/src/react/router/__tests__/$page.browser.spec.tsx +19 -19
  723. package/src/react/router/__tests__/$page.spec.tsx +21 -21
  724. package/src/react/router/__tests__/ReactBrowserProvider.browser.spec.ts +87 -1
  725. package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
  726. package/src/react/router/atoms/ssrManifestAtom.ts +16 -16
  727. package/src/react/router/components/NestedView.tsx +11 -3
  728. package/src/react/router/hooks/useQueryParams.ts +1 -1
  729. package/src/react/router/index.browser.ts +4 -0
  730. package/src/react/router/index.shared.ts +1 -0
  731. package/src/react/router/index.ts +9 -0
  732. package/src/react/router/primitives/$page.ts +2 -2
  733. package/src/react/router/providers/ReactBrowserProvider.ts +64 -13
  734. package/src/react/router/providers/ReactBrowserRouterProvider.ts +15 -1
  735. package/src/react/router/providers/ReactPageProvider.ts +38 -13
  736. package/src/react/router/providers/ReactServerProvider.ts +105 -16
  737. package/src/react/router/providers/RootComponentsProvider.ts +13 -0
  738. package/src/react/router/providers/RouterLocaleProvider.ts +125 -0
  739. package/src/react/router/providers/__tests__/RootComponentsProvider.spec.ts +15 -0
  740. package/src/react/router/providers/__tests__/rootComponents.ssr.browser.spec.tsx +67 -0
  741. package/src/react/sitemap/__tests__/$sitemap.spec.ts +131 -0
  742. package/src/react/sitemap/index.browser.ts +21 -0
  743. package/src/react/sitemap/index.ts +25 -0
  744. package/src/react/sitemap/primitives/$sitemap.browser.ts +26 -0
  745. package/src/react/sitemap/primitives/$sitemap.ts +196 -0
  746. package/src/react/ui/atoms/uiAtom.ts +6 -6
  747. package/src/react/ui/atoms/uiThemeListAtom.ts +7 -7
  748. package/src/react/ui/hooks/useColorMode.ts +11 -4
  749. package/src/react/ui/services/SchemaControl.ts +4 -4
  750. package/src/redis/providers/BunRedisProvider.ts +19 -11
  751. package/src/redis/providers/NodeRedisProvider.ts +3 -3
  752. package/src/scheduler/primitives/$scheduler.ts +21 -8
  753. package/src/security/__tests__/assertRealmScope.spec.ts +29 -0
  754. package/src/security/atoms/currentTenantAtom.ts +6 -6
  755. package/src/security/atoms/currentUserAtom.ts +2 -2
  756. package/src/security/primitives/$issuer.ts +24 -2
  757. package/src/security/providers/JwtProvider.ts +100 -0
  758. package/src/security/providers/SecurityProvider.ts +43 -2
  759. package/src/security/schemas/permissionSchema.ts +19 -19
  760. package/src/security/schemas/roleSchema.ts +22 -28
  761. package/src/security/schemas/userAccountInfoSchema.ts +47 -37
  762. package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -0
  763. package/src/server/auth/__tests__/federationRedirectReplay.spec.ts +44 -0
  764. package/src/server/auth/helpers/appleClientSecret.ts +24 -0
  765. package/src/server/auth/helpers/jtiReplayGuard.ts +41 -0
  766. package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
  767. package/src/server/auth/index.ts +1 -0
  768. package/src/server/auth/primitives/$auth.ts +6 -6
  769. package/src/server/auth/primitives/$authApple.ts +10 -10
  770. package/src/server/auth/primitives/$authFacebook.ts +10 -10
  771. package/src/server/auth/primitives/$authFranceConnect.ts +10 -10
  772. package/src/server/auth/primitives/$authGithub.ts +10 -10
  773. package/src/server/auth/primitives/$authGoogle.ts +10 -10
  774. package/src/server/auth/primitives/$authMicrosoft.ts +14 -14
  775. package/src/server/auth/providers/ServerAuthProvider.ts +67 -52
  776. package/src/server/auth/schemas/authenticationProviderSchema.ts +9 -12
  777. package/src/server/auth/schemas/tokenResponseSchema.ts +2 -2
  778. package/src/server/auth/schemas/tokensSchema.ts +16 -16
  779. package/src/server/auth/schemas/userinfoResponseSchema.ts +3 -3
  780. package/src/server/cookies/__tests__/AtomCookieBinding.spec.ts +80 -0
  781. package/src/server/cookies/__tests__/AtomCookiePersistence.browser.spec.ts +169 -0
  782. package/src/server/cookies/__tests__/AtomCookiePersistence.spec.ts +294 -0
  783. package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +82 -12
  784. package/src/server/cookies/index.browser.ts +4 -1
  785. package/src/server/cookies/index.ts +8 -1
  786. package/src/server/cookies/primitives/$cookie.browser.ts +1 -1
  787. package/src/server/cookies/primitives/$cookie.ts +16 -0
  788. package/src/server/cookies/providers/AtomCookiePersistence.browser.ts +133 -0
  789. package/src/server/cookies/providers/AtomCookiePersistence.ts +148 -0
  790. package/src/server/cookies/providers/ServerCookiesProvider.ts +32 -4
  791. package/src/server/cookies/services/CookieParser.ts +6 -1
  792. package/src/server/core/__tests__/$action.spec.ts +13 -13
  793. package/src/server/core/__tests__/$middleware.spec.ts +10 -10
  794. package/src/server/core/__tests__/$route.spec.ts +9 -9
  795. package/src/server/core/__tests__/$sse.spec.ts +26 -26
  796. package/src/server/core/__tests__/BunHttpServerProvider.bun.spec.ts +6 -6
  797. package/src/server/core/__tests__/HttpClient.spec.ts +2 -2
  798. package/src/server/core/__tests__/NodeHttpServerProvider.spec.ts +15 -3
  799. package/src/server/core/__tests__/ServerBodyParserProvider.spec.ts +14 -14
  800. package/src/server/core/__tests__/ServerMultipartProvider.spec.ts +33 -33
  801. package/src/server/core/__tests__/ServerRouterProvider-errorHandler.spec.ts +5 -1
  802. package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +25 -25
  803. package/src/server/core/__tests__/ServerRouterProvider-serializationError.spec.ts +9 -5
  804. package/src/server/core/__tests__/ServerRouterProvider-validationError.spec.ts +56 -24
  805. package/src/server/core/errors/ValidationError.ts +6 -3
  806. package/src/server/core/helpers/isMultipart.ts +2 -1
  807. package/src/server/core/index.ts +5 -2
  808. package/src/server/core/interfaces/ServerRequest.ts +14 -14
  809. package/src/server/core/primitives/$action.ts +26 -36
  810. package/src/server/core/primitives/$route.ts +27 -0
  811. package/src/server/core/primitives/$sse.ts +3 -3
  812. package/src/server/core/providers/BunHttpServerProvider.ts +8 -9
  813. package/src/server/core/providers/NodeHttpServerProvider.ts +8 -9
  814. package/src/server/core/providers/ServerBodyParserProvider.ts +20 -12
  815. package/src/server/core/providers/ServerCompressProvider.ts +9 -10
  816. package/src/server/core/providers/ServerHelmetProvider.ts +26 -27
  817. package/src/server/core/providers/ServerMultipartProvider.ts +19 -19
  818. package/src/server/core/providers/ServerRouterProvider.ts +44 -15
  819. package/src/server/core/schemas/errorSchema.ts +20 -25
  820. package/src/server/core/schemas/okSchema.ts +9 -14
  821. package/src/server/core/services/HttpClient.ts +13 -1
  822. package/src/server/core/services/ServerRequestParser.ts +6 -6
  823. package/src/server/cors/providers/ServerCorsProvider.ts +26 -28
  824. package/src/server/health/schemas/healthSchema.ts +6 -6
  825. package/src/server/links/__tests__/$remote.spec.ts +3 -3
  826. package/src/server/links/__tests__/BatchEndpoint.spec.ts +9 -9
  827. package/src/server/links/__tests__/LinkProvider.spec.ts +9 -9
  828. package/src/server/links/__tests__/ServerLinksProvider.spec.ts +23 -23
  829. package/src/server/links/__tests__/fixtures/CrudApp.ts +21 -21
  830. package/src/server/links/atoms/apiLinksAtom.ts +2 -2
  831. package/src/server/links/atoms/linkOptionsAtom.ts +6 -6
  832. package/src/server/links/primitives/$remote.ts +3 -3
  833. package/src/server/links/providers/LinkProvider.ts +3 -3
  834. package/src/server/links/providers/ServerLinksProvider.ts +20 -20
  835. package/src/server/links/schemas/apiLinksResponseSchema.ts +23 -23
  836. package/src/server/proxy/__tests__/$proxy.spec.ts +9 -9
  837. package/src/server/proxy/providers/ServerProxyProvider.ts +5 -0
  838. package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +18 -20
  839. package/src/server/swagger/__tests__/$swagger.spec.ts +91 -94
  840. package/src/server/swagger/__tests__/ui.spec.ts +3 -3
  841. package/src/server/swagger/providers/ServerSwaggerProvider.ts +66 -43
  842. package/src/system/__tests__/NodeShellProvider.spec.ts +46 -0
  843. package/src/system/providers/NodeShellProvider.ts +4 -1
  844. package/src/topic/core/__tests__/$subscriber.spec.ts +4 -4
  845. package/src/topic/core/__tests__/shared.ts +8 -8
  846. package/src/topic/core/primitives/$subscriber.ts +5 -5
  847. package/src/topic/core/primitives/$topic.ts +14 -14
  848. package/src/topic/redis/providers/RedisTopicProvider.ts +3 -3
  849. package/dist/container/core/index.d.ts +0 -236
  850. package/dist/container/core/index.d.ts.map +0 -1
  851. package/dist/container/core/index.js +0 -231
  852. package/dist/container/core/index.js.map +0 -1
  853. package/dist/container/core/index.workerd.js +0 -192
  854. package/dist/container/core/index.workerd.js.map +0 -1
  855. package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
  856. package/src/command/helpers/PrettyAsker.ts +0 -256
  857. package/src/command/helpers/PrettyPrint.ts +0 -332
  858. package/src/container/core/__tests__/$container.spec.ts +0 -83
  859. package/src/container/core/index.ts +0 -50
  860. package/src/container/core/index.workerd.ts +0 -53
  861. package/src/container/core/interfaces/ContainerOptions.ts +0 -69
  862. package/src/container/core/primitives/$container.ts +0 -100
  863. package/src/container/core/providers/CloudflareContainerProvider.ts +0 -70
  864. package/src/container/core/providers/ContainerProvider.ts +0 -92
  865. package/src/container/core/providers/MockContainerProvider.ts +0 -62
  866. package/src/container/core/providers/NodeContainerProvider.ts +0 -53
  867. package/src/core/__tests__/jsonSchemaToTypeBox.spec.ts +0 -771
  868. package/src/core/helpers/jsonSchemaToTypeBox.ts +0 -359
  869. /package/dist/orm/core/{chunk-B4FMCO8f.js → rolldown-runtime-B4FMCO8f.js} +0 -0
@@ -4,6 +4,11 @@ import { DateTimeProvider } from "alepha/datetime";
4
4
  import { CryptoProvider } from "alepha/crypto";
5
5
  import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
6
6
  import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
7
+ import "drizzle-orm/pg-core/foreign-keys";
8
+ import "drizzle-orm/pg-core/session";
9
+ import "drizzle-kit/api";
10
+ import "drizzle-orm/d1";
11
+ import "drizzle-orm/sqlite-core";
7
12
  //#region ../../src/orm/core/schemas/insertSchema.d.ts
8
13
  /**
9
14
  * Transforms a TObject schema for insert operations.
@@ -14,15 +19,13 @@ import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, Update
14
19
  * Before: { name: string; age: number(default=0); fullName: generated }
15
20
  * After: { name: string; age?: number; }
16
21
  */
17
- type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"] as T["properties"][K] extends {
22
+ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["shape"] as T["shape"][K] extends {
18
23
  [PG_GENERATED]: any;
19
- } ? never : K]: T["properties"][K] extends {
24
+ } ? never : K]: T["shape"][K] extends {
20
25
  [PG_DEFAULT]: any;
21
26
  } | {
22
27
  [PG_ORGANIZATION]: any;
23
- } | {
24
- "~optional": true;
25
- } ? TOptional<T["properties"][K]> : T["properties"][K] }>;
28
+ } ? TOptional<Extract<T["shape"][K], TSchema>> : T["shape"][K]; }>;
26
29
  //#endregion
27
30
  //#region ../../src/orm/core/schemas/updateSchema.d.ts
28
31
  /**
@@ -34,9 +37,9 @@ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"] as
34
37
  * Before: { name?: string; age: number; fullName: generated }
35
38
  * After: { name?: string | null; age: number; }
36
39
  */
37
- type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"] as T["properties"][K] extends {
40
+ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["shape"] as T["shape"][K] extends {
38
41
  [PG_GENERATED]: any;
39
- } ? never : K]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
42
+ } ? never : K]: T["shape"][K] extends TOptional<infer U extends TSchema> ? TOptional<TUnion<[U, TNull]>> : T["shape"][K]; }>;
40
43
  //#endregion
41
44
  //#region ../../src/orm/core/primitives/$entity.d.ts
42
45
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
@@ -196,18 +199,20 @@ declare class EntityPrimitive<T extends TObject = TObject> {
196
199
  get cols(): EntityColumns<T>;
197
200
  get name(): string;
198
201
  get schema(): T;
202
+ protected _insertSchema?: TObjectInsert<T>;
199
203
  get insertSchema(): TObjectInsert<T>;
204
+ protected _updateSchema?: TObjectUpdate<T>;
200
205
  get updateSchema(): TObjectUpdate<T>;
201
206
  }
202
207
  /**
203
208
  * Convert a schema to columns.
204
209
  */
205
- type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase };
210
+ type FromSchema<T extends TObject> = { [key in keyof T["properties"]]: PgColumnBuilderBase; };
206
211
  type EntityColumn<T extends TObject> = {
207
212
  name: string;
208
213
  entity: EntityPrimitive<T>;
209
214
  };
210
- type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T> };
215
+ type EntityColumns<T extends TObject> = { [key in keyof T["properties"]]: EntityColumn<T>; };
211
216
  //#endregion
212
217
  //#region ../../src/orm/core/constants/PG_SYMBOLS.d.ts
213
218
  declare const PG_DEFAULT: unique symbol;
@@ -236,13 +241,24 @@ type PgSymbols = {
236
241
  [PG_REF]: PgRefOptions;
237
242
  [PG_ENUM]: PgEnumOptions;
238
243
  [PG_GENERATED]: PgGeneratedOptions;
239
- [PG_ORGANIZATION]: {};
244
+ [PG_ORGANIZATION]: PgOrganizationOptions;
240
245
  /**
241
246
  * @deprecated Use `PG_IDENTITY` instead.
242
247
  */
243
248
  [PG_SERIAL]: {};
244
249
  };
245
250
  type PgSymbolKeys = keyof PgSymbols;
251
+ interface PgOrganizationOptions {
252
+ /**
253
+ * Fail-closed tenant scoping. When `true`, the repository (a) refuses any
254
+ * read/write with no resolved tenant instead of falling through to an
255
+ * unfiltered "see/write everything" query, and (b) drops the
256
+ * `OR organizationId IS NULL` "global row" escape — a scoped tenant never
257
+ * sees NULL/global rows. Use for security-sensitive tables. Defaults to
258
+ * `false` (the historic fail-open semantics).
259
+ */
260
+ strict?: boolean;
261
+ }
246
262
  type PgIdentityOptions = {
247
263
  mode: "always" | "byDefault";
248
264
  } & PgSequenceOptions & {
@@ -279,7 +295,7 @@ interface PgRefOptions {
279
295
  /**
280
296
  * Type representation.
281
297
  */
282
- type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
298
+ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K]; };
283
299
  //#endregion
284
300
  //#region ../../src/orm/core/schemas/databaseEnvSchema.d.ts
285
301
  /**
@@ -295,53 +311,62 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
295
311
  * - `d1://BINDING_NAME` — Cloudflare D1
296
312
  * - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
297
313
  */
298
- declare const databaseEnvSchema: import("typebox").TObject<{
299
- DATABASE_URL: import("typebox").TOptional<import("typebox").TString>;
300
- /**
301
- * Enable or disable push-based schema synchronization (drizzle-kit push).
302
- *
303
- * Defaults to `true` in development and test, `false` in production.
304
- * Set to `false` in development to skip automatic schema sync
305
- * (e.g. when managing migrations manually).
306
- */
307
- DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
308
- }>;
314
+ declare const databaseEnvSchema: import("zod").ZodObject<{
315
+ DATABASE_URL: import("zod").ZodOptional<import("zod").ZodString>;
316
+ DATABASE_SYNC: import("zod").ZodOptional<import("zod").ZodBoolean>;
317
+ }, import("zod/v4/core").$strip>;
309
318
  declare module "alepha" {
310
319
  interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
311
- } //# sourceMappingURL=databaseEnvSchema.d.ts.map
320
+ }
312
321
  //#endregion
313
322
  //#region ../../src/api/payments/entities/paymentIntents.d.ts
314
- declare const paymentIntents: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
315
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
316
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
317
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
318
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
319
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
320
- amount: import("typebox").TInteger;
321
- currency: import("typebox").TString;
322
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
323
- providerRef: import("typebox").TOptional<import("typebox").TString>;
324
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
325
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
326
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
327
- userId: import("typebox").TOptional<import("typebox").TString>;
328
- }>>;
323
+ declare const paymentIntents: import("alepha/orm").EntityPrimitive<import("zod").ZodObject<{
324
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
325
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
326
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
327
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
328
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
329
+ amount: import("zod").ZodInt;
330
+ currency: import("zod").ZodString;
331
+ status: import("zod").ZodEnum<{
332
+ authorized: "authorized";
333
+ cancelled: "cancelled";
334
+ captured: "captured";
335
+ created: "created";
336
+ expired: "expired";
337
+ failed: "failed";
338
+ partially_refunded: "partially_refunded";
339
+ processing: "processing";
340
+ refunded: "refunded";
341
+ voided: "voided";
342
+ }>;
343
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
344
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
345
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
346
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
347
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
348
+ }, import("zod/v4/core").$strip>>;
329
349
  type PaymentIntentEntity = Static<typeof paymentIntents.schema>;
330
350
  //#endregion
331
351
  //#region ../../src/api/payments/entities/refunds.d.ts
332
- declare const refunds: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
333
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
334
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
335
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
336
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
337
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
338
- intentId: import("typebox").TString;
339
- amount: import("typebox").TInteger;
340
- currency: import("typebox").TString;
341
- status: import("typebox").TUnsafe<"processing" | "failed" | "pending" | "completed">;
342
- reason: import("typebox").TOptional<import("typebox").TString>;
343
- providerRef: import("typebox").TOptional<import("typebox").TString>;
344
- }>>;
352
+ declare const refunds: import("alepha/orm").EntityPrimitive<import("zod").ZodObject<{
353
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
354
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
355
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
356
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
357
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
358
+ intentId: import("zod").ZodString;
359
+ amount: import("zod").ZodInt;
360
+ currency: import("zod").ZodString;
361
+ status: import("zod").ZodEnum<{
362
+ completed: "completed";
363
+ failed: "failed";
364
+ pending: "pending";
365
+ processing: "processing";
366
+ }>;
367
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
368
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
369
+ }, import("zod/v4/core").$strip>>;
345
370
  type RefundEntity = Static<typeof refunds.schema>;
346
371
  //#endregion
347
372
  //#region ../../src/api/payments/providers/PaymentProvider.d.ts
@@ -354,7 +379,22 @@ interface RefundResult {
354
379
  }
355
380
  interface WebhookEvent {
356
381
  providerRef: string;
382
+ /**
383
+ * Secondary reference to try when `providerRef` matches no stored intent.
384
+ * Checkout-session events carry BOTH a session id and a PaymentIntent id,
385
+ * while the stored intent ref is whichever existed at session-creation
386
+ * time (the PI when eager, the session id when the PSP creates the PI
387
+ * lazily — e.g. Stripe Checkout on connected accounts).
388
+ */
389
+ providerRefAlt?: string;
357
390
  status: string;
391
+ /**
392
+ * PSP account that emitted the event, when delivered by a
393
+ * connected-accounts endpoint (Stripe: `acct_…` on `connect: true`
394
+ * endpoints). Lets multi-tenant consumers route the event to the right
395
+ * tenant before resolving the intent.
396
+ */
397
+ account?: string;
358
398
  raw: unknown;
359
399
  }
360
400
  interface CreatePaymentMethodResult {
@@ -375,6 +415,8 @@ declare abstract class PaymentProvider {
375
415
  authorize?: boolean;
376
416
  stripeAccount?: string;
377
417
  applicationFeeAmount?: number;
418
+ /** Pre-fill the payer's email on the hosted checkout page. */
419
+ customerEmail?: string;
378
420
  }): Promise<CreateSessionResult>;
379
421
  /**
380
422
  * Capture a previously authorized payment.
@@ -388,7 +430,9 @@ declare abstract class PaymentProvider {
388
430
  /**
389
431
  * Refund a captured payment (partial or full).
390
432
  */
391
- abstract refundPayment(providerRef: string, amount: number): Promise<RefundResult>;
433
+ abstract refundPayment(providerRef: string, amount: number, options?: {
434
+ stripeAccount?: string;
435
+ }): Promise<RefundResult>;
392
436
  /**
393
437
  * Parse and verify the authenticity of an incoming PSP webhook request.
394
438
  *
@@ -432,40 +476,56 @@ declare class PaymentService {
432
476
  protected readonly log: import("alepha/logger").Logger;
433
477
  protected readonly dateTime: DateTimeProvider;
434
478
  protected readonly provider: PaymentProvider;
435
- protected readonly intentRepo: import("alepha/orm").Repository<import("typebox").TObject<{
436
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
437
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
438
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
439
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
440
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
441
- amount: import("typebox").TInteger;
442
- currency: import("typebox").TString;
443
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
444
- providerRef: import("typebox").TOptional<import("typebox").TString>;
445
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
446
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
447
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
448
- userId: import("typebox").TOptional<import("typebox").TString>;
449
- }>>;
450
- protected readonly refundRepo: import("alepha/orm").Repository<import("typebox").TObject<{
451
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
452
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
453
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
454
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
455
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
456
- intentId: import("typebox").TString;
457
- amount: import("typebox").TInteger;
458
- currency: import("typebox").TString;
459
- status: import("typebox").TUnsafe<"processing" | "failed" | "pending" | "completed">;
460
- reason: import("typebox").TOptional<import("typebox").TString>;
461
- providerRef: import("typebox").TOptional<import("typebox").TString>;
462
- }>>;
479
+ protected readonly intentRepo: import("alepha/orm").Repository<import("zod").ZodObject<{
480
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
481
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
482
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
483
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
484
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
485
+ amount: import("zod").ZodInt;
486
+ currency: import("zod").ZodString;
487
+ status: import("zod").ZodEnum<{
488
+ authorized: "authorized";
489
+ cancelled: "cancelled";
490
+ captured: "captured";
491
+ created: "created";
492
+ expired: "expired";
493
+ failed: "failed";
494
+ partially_refunded: "partially_refunded";
495
+ processing: "processing";
496
+ refunded: "refunded";
497
+ voided: "voided";
498
+ }>;
499
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
500
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
501
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
502
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
503
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
504
+ }, import("zod/v4/core").$strip>>;
505
+ protected readonly refundRepo: import("alepha/orm").Repository<import("zod").ZodObject<{
506
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
507
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
508
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
509
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
510
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
511
+ intentId: import("zod").ZodString;
512
+ amount: import("zod").ZodInt;
513
+ currency: import("zod").ZodString;
514
+ status: import("zod").ZodEnum<{
515
+ completed: "completed";
516
+ failed: "failed";
517
+ pending: "pending";
518
+ processing: "processing";
519
+ }>;
520
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
521
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
522
+ }, import("zod/v4/core").$strip>>;
463
523
  /**
464
524
  * Expires stale payment intents that have been in "processing" status
465
525
  * for more than 30 minutes. Runs every 5 minutes — shares the CF wrangler
466
526
  * trigger with the jobs sweep so no extra binding is consumed.
467
527
  */
468
- protected readonly expireStaleIntents: import("alepha/api/jobs").JobPrimitive<import("typebox").TSchema>;
528
+ protected readonly expireStaleIntents: import("alepha/api/jobs").JobPrimitive<import("alepha").ZType>;
469
529
  /**
470
530
  * Create a new payment intent in "created" status.
471
531
  */
@@ -480,6 +540,13 @@ declare class PaymentService {
480
540
  createSession(intentId: string, returnUrl: string, authorize?: boolean, userId?: string, options?: {
481
541
  stripeAccount?: string;
482
542
  applicationFeeAmount?: number;
543
+ /**
544
+ * Pre-fills the payer's email on the PSP checkout page. Useful when
545
+ * the session runs on a sub-account (Stripe connected account) where
546
+ * no customer object exists — without it the hosted checkout makes
547
+ * the payer retype an address the platform already knows.
548
+ */
549
+ customerEmail?: string;
483
550
  }): Promise<{
484
551
  url: string;
485
552
  intentId: string;
@@ -488,6 +555,13 @@ declare class PaymentService {
488
555
  * Handle an incoming webhook from the payment provider.
489
556
  */
490
557
  handleWebhook(request: Request): Promise<void>;
558
+ /**
559
+ * Resolve an already-parsed webhook event to its stored intent and apply
560
+ * it. Split from `handleWebhook` so callers that parse with a DIFFERENT
561
+ * verification path (e.g. a connected-accounts endpoint that must first
562
+ * route the event to a tenant) can reuse the matching + transition logic.
563
+ */
564
+ handleParsedWebhook(event: WebhookEvent): Promise<void>;
491
565
  /**
492
566
  * Process a webhook event by updating the intent status and emitting
493
567
  * the corresponding payment event.
@@ -510,7 +584,14 @@ declare class PaymentService {
510
584
  /**
511
585
  * Refund a captured payment (partial or full).
512
586
  */
513
- refund(intentId: string, amount: number, reason?: string): Promise<RefundEntity>;
587
+ refund(intentId: string, amount: number, reason?: string, options?: {
588
+ /**
589
+ * PSP sub-account holding the charge (Stripe connected account) —
590
+ * required to refund payments that were created with the same option,
591
+ * e.g. direct charges on a club's connected account.
592
+ */
593
+ stripeAccount?: string;
594
+ }): Promise<RefundEntity>;
514
595
  /**
515
596
  * Record a cash or offline payment directly as captured,
516
597
  * bypassing the checkout flow.
@@ -533,35 +614,57 @@ declare class PaymentService {
533
614
  sort?: string;
534
615
  size?: number;
535
616
  page?: number;
536
- }): Promise<import("alepha").Page<import("alepha/orm").PgStatic<import("typebox").TObject<{
537
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
538
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
539
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
540
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
541
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
542
- amount: import("typebox").TInteger;
543
- currency: import("typebox").TString;
544
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
545
- providerRef: import("typebox").TOptional<import("typebox").TString>;
546
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
547
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
548
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
549
- userId: import("typebox").TOptional<import("typebox").TString>;
550
- }>, import("alepha/orm").PgRelationMap<import("typebox").TObject<{
551
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
552
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
553
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
554
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
555
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
556
- amount: import("typebox").TInteger;
557
- currency: import("typebox").TString;
558
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
559
- providerRef: import("typebox").TOptional<import("typebox").TString>;
560
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
561
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
562
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
563
- userId: import("typebox").TOptional<import("typebox").TString>;
564
- }>>>>>;
617
+ }): Promise<import("alepha").Page<import("alepha/orm").PgStatic<import("zod").ZodObject<{
618
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
619
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
620
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
621
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
622
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
623
+ amount: import("zod").ZodInt;
624
+ currency: import("zod").ZodString;
625
+ status: import("zod").ZodEnum<{
626
+ authorized: "authorized";
627
+ cancelled: "cancelled";
628
+ captured: "captured";
629
+ created: "created";
630
+ expired: "expired";
631
+ failed: "failed";
632
+ partially_refunded: "partially_refunded";
633
+ processing: "processing";
634
+ refunded: "refunded";
635
+ voided: "voided";
636
+ }>;
637
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
638
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
639
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
640
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
641
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
642
+ }, import("zod/v4/core").$strip>, import("alepha/orm").PgRelationMap<import("zod").ZodObject<{
643
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
644
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
645
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
646
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
647
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
648
+ amount: import("zod").ZodInt;
649
+ currency: import("zod").ZodString;
650
+ status: import("zod").ZodEnum<{
651
+ authorized: "authorized";
652
+ cancelled: "cancelled";
653
+ captured: "captured";
654
+ created: "created";
655
+ expired: "expired";
656
+ failed: "failed";
657
+ partially_refunded: "partially_refunded";
658
+ processing: "processing";
659
+ refunded: "refunded";
660
+ voided: "voided";
661
+ }>;
662
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
663
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
664
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
665
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
666
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
667
+ }, import("zod/v4/core").$strip>>>>>;
565
668
  protected assertStatus(intent: PaymentIntentEntity, expected: PaymentIntentEntity["status"], operation: string): void;
566
669
  }
567
670
  //#endregion
@@ -574,183 +677,267 @@ declare class AdminPaymentController {
574
677
  * List payment intents with pagination and filtering.
575
678
  */
576
679
  readonly listIntents: import("alepha/server").ActionPrimitiveFn<{
577
- query: import("typebox").TObject<{
578
- page: import("typebox").TOptional<import("typebox").TInteger>;
579
- size: import("typebox").TOptional<import("typebox").TInteger>;
580
- sort: import("typebox").TOptional<import("typebox").TString>;
581
- status: import("typebox").TOptional<import("typebox").TString>;
582
- userId: import("typebox").TOptional<import("typebox").TString>;
583
- }>;
584
- response: import("alepha").TPage<import("typebox").TObject<{
585
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
586
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
587
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
588
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
589
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
590
- amount: import("typebox").TInteger;
591
- currency: import("typebox").TString;
592
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
593
- providerRef: import("typebox").TOptional<import("typebox").TString>;
594
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
595
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
596
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
597
- userId: import("typebox").TOptional<import("typebox").TString>;
598
- }>>;
680
+ query: import("zod").ZodObject<{
681
+ page: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
682
+ size: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
683
+ sort: import("zod").ZodOptional<import("zod").ZodString>;
684
+ status: import("zod").ZodOptional<import("zod").ZodString>;
685
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
686
+ }, import("zod/v4/core").$strip>;
687
+ response: import("zod").ZodObject<{
688
+ content: import("zod").ZodArray<import("zod").ZodObject<{
689
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
690
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
691
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
692
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
693
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
694
+ amount: import("zod").ZodInt;
695
+ currency: import("zod").ZodString;
696
+ status: import("zod").ZodEnum<{
697
+ authorized: "authorized";
698
+ cancelled: "cancelled";
699
+ captured: "captured";
700
+ created: "created";
701
+ expired: "expired";
702
+ failed: "failed";
703
+ partially_refunded: "partially_refunded";
704
+ processing: "processing";
705
+ refunded: "refunded";
706
+ voided: "voided";
707
+ }>;
708
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
709
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
710
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
711
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
712
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
713
+ }, import("zod/v4/core").$strip>>;
714
+ page: import("zod").ZodObject<{
715
+ number: import("zod").ZodInt;
716
+ size: import("zod").ZodInt;
717
+ offset: import("zod").ZodInt;
718
+ numberOfElements: import("zod").ZodInt;
719
+ totalElements: import("zod").ZodOptional<import("zod").ZodInt>;
720
+ totalPages: import("zod").ZodOptional<import("zod").ZodInt>;
721
+ isEmpty: import("zod").ZodBoolean;
722
+ isFirst: import("zod").ZodBoolean;
723
+ isLast: import("zod").ZodBoolean;
724
+ }, import("zod/v4/core").$strip>;
725
+ }, import("zod/v4/core").$strip>;
599
726
  }>;
600
727
  /**
601
728
  * Get a payment intent by ID.
602
729
  */
603
730
  readonly getIntent: import("alepha/server").ActionPrimitiveFn<{
604
- params: import("typebox").TObject<{
605
- id: import("typebox").TString;
606
- }>;
607
- response: import("typebox").TObject<{
608
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
609
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
610
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
611
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
612
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
613
- amount: import("typebox").TInteger;
614
- currency: import("typebox").TString;
615
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
616
- providerRef: import("typebox").TOptional<import("typebox").TString>;
617
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
618
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
619
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
620
- userId: import("typebox").TOptional<import("typebox").TString>;
621
- }>;
731
+ params: import("zod").ZodObject<{
732
+ id: import("zod").ZodString;
733
+ }, import("zod/v4/core").$strip>;
734
+ response: import("zod").ZodObject<{
735
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
736
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
737
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
738
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
739
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
740
+ amount: import("zod").ZodInt;
741
+ currency: import("zod").ZodString;
742
+ status: import("zod").ZodEnum<{
743
+ authorized: "authorized";
744
+ cancelled: "cancelled";
745
+ captured: "captured";
746
+ created: "created";
747
+ expired: "expired";
748
+ failed: "failed";
749
+ partially_refunded: "partially_refunded";
750
+ processing: "processing";
751
+ refunded: "refunded";
752
+ voided: "voided";
753
+ }>;
754
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
755
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
756
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
757
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
758
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
759
+ }, import("zod/v4/core").$strip>;
622
760
  }>;
623
761
  /**
624
762
  * Capture an authorized intent.
625
763
  */
626
764
  readonly captureIntent: import("alepha/server").ActionPrimitiveFn<{
627
- params: import("typebox").TObject<{
628
- id: import("typebox").TString;
629
- }>;
630
- body: import("typebox").TObject<{
631
- amount: import("typebox").TOptional<import("typebox").TInteger>;
632
- }>;
633
- response: import("typebox").TObject<{
634
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
635
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
636
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
637
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
638
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
639
- amount: import("typebox").TInteger;
640
- currency: import("typebox").TString;
641
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
642
- providerRef: import("typebox").TOptional<import("typebox").TString>;
643
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
644
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
645
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
646
- userId: import("typebox").TOptional<import("typebox").TString>;
647
- }>;
765
+ params: import("zod").ZodObject<{
766
+ id: import("zod").ZodString;
767
+ }, import("zod/v4/core").$strip>;
768
+ body: import("zod").ZodObject<{
769
+ amount: import("zod").ZodOptional<import("zod").ZodInt>;
770
+ }, import("zod/v4/core").$strip>;
771
+ response: import("zod").ZodObject<{
772
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
773
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
774
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
775
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
776
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
777
+ amount: import("zod").ZodInt;
778
+ currency: import("zod").ZodString;
779
+ status: import("zod").ZodEnum<{
780
+ authorized: "authorized";
781
+ cancelled: "cancelled";
782
+ captured: "captured";
783
+ created: "created";
784
+ expired: "expired";
785
+ failed: "failed";
786
+ partially_refunded: "partially_refunded";
787
+ processing: "processing";
788
+ refunded: "refunded";
789
+ voided: "voided";
790
+ }>;
791
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
792
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
793
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
794
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
795
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
796
+ }, import("zod/v4/core").$strip>;
648
797
  }>;
649
798
  /**
650
799
  * Void an authorized intent.
651
800
  */
652
801
  readonly voidIntent: import("alepha/server").ActionPrimitiveFn<{
653
- params: import("typebox").TObject<{
654
- id: import("typebox").TString;
655
- }>;
656
- response: import("typebox").TObject<{
657
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
658
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
659
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
660
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
661
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
662
- amount: import("typebox").TInteger;
663
- currency: import("typebox").TString;
664
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
665
- providerRef: import("typebox").TOptional<import("typebox").TString>;
666
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
667
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
668
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
669
- userId: import("typebox").TOptional<import("typebox").TString>;
670
- }>;
802
+ params: import("zod").ZodObject<{
803
+ id: import("zod").ZodString;
804
+ }, import("zod/v4/core").$strip>;
805
+ response: import("zod").ZodObject<{
806
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
807
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
808
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
809
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
810
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
811
+ amount: import("zod").ZodInt;
812
+ currency: import("zod").ZodString;
813
+ status: import("zod").ZodEnum<{
814
+ authorized: "authorized";
815
+ cancelled: "cancelled";
816
+ captured: "captured";
817
+ created: "created";
818
+ expired: "expired";
819
+ failed: "failed";
820
+ partially_refunded: "partially_refunded";
821
+ processing: "processing";
822
+ refunded: "refunded";
823
+ voided: "voided";
824
+ }>;
825
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
826
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
827
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
828
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
829
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
830
+ }, import("zod/v4/core").$strip>;
671
831
  }>;
672
832
  /**
673
833
  * Refund a captured intent.
674
834
  */
675
835
  readonly refundIntent: import("alepha/server").ActionPrimitiveFn<{
676
- params: import("typebox").TObject<{
677
- id: import("typebox").TString;
678
- }>;
679
- body: import("typebox").TObject<{
680
- amount: import("typebox").TInteger;
681
- reason: import("typebox").TOptional<import("typebox").TString>;
682
- }>;
683
- response: import("typebox").TObject<{
684
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
685
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
686
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
687
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
688
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
689
- intentId: import("typebox").TString;
690
- amount: import("typebox").TInteger;
691
- currency: import("typebox").TString;
692
- status: import("typebox").TUnsafe<"processing" | "failed" | "pending" | "completed">;
693
- reason: import("typebox").TOptional<import("typebox").TString>;
694
- providerRef: import("typebox").TOptional<import("typebox").TString>;
695
- }>;
836
+ params: import("zod").ZodObject<{
837
+ id: import("zod").ZodString;
838
+ }, import("zod/v4/core").$strip>;
839
+ body: import("zod").ZodObject<{
840
+ amount: import("zod").ZodInt;
841
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
842
+ }, import("zod/v4/core").$strip>;
843
+ response: import("zod").ZodObject<{
844
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
845
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
846
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
847
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
848
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
849
+ intentId: import("zod").ZodString;
850
+ amount: import("zod").ZodInt;
851
+ currency: import("zod").ZodString;
852
+ status: import("zod").ZodEnum<{
853
+ completed: "completed";
854
+ failed: "failed";
855
+ pending: "pending";
856
+ processing: "processing";
857
+ }>;
858
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
859
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
860
+ }, import("zod/v4/core").$strip>;
696
861
  }>;
697
862
  /**
698
863
  * Cancel a created intent.
699
864
  */
700
865
  readonly cancelIntent: import("alepha/server").ActionPrimitiveFn<{
701
- params: import("typebox").TObject<{
702
- id: import("typebox").TString;
703
- }>;
704
- response: import("typebox").TObject<{
705
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
706
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
707
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
708
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
709
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
710
- amount: import("typebox").TInteger;
711
- currency: import("typebox").TString;
712
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
713
- providerRef: import("typebox").TOptional<import("typebox").TString>;
714
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
715
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
716
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
717
- userId: import("typebox").TOptional<import("typebox").TString>;
718
- }>;
866
+ params: import("zod").ZodObject<{
867
+ id: import("zod").ZodString;
868
+ }, import("zod/v4/core").$strip>;
869
+ response: import("zod").ZodObject<{
870
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
871
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
872
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
873
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
874
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
875
+ amount: import("zod").ZodInt;
876
+ currency: import("zod").ZodString;
877
+ status: import("zod").ZodEnum<{
878
+ authorized: "authorized";
879
+ cancelled: "cancelled";
880
+ captured: "captured";
881
+ created: "created";
882
+ expired: "expired";
883
+ failed: "failed";
884
+ partially_refunded: "partially_refunded";
885
+ processing: "processing";
886
+ refunded: "refunded";
887
+ voided: "voided";
888
+ }>;
889
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
890
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
891
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
892
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
893
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
894
+ }, import("zod/v4/core").$strip>;
719
895
  }>;
720
896
  /**
721
897
  * Record a cash payment.
722
898
  */
723
899
  readonly recordCash: import("alepha/server").ActionPrimitiveFn<{
724
- body: import("typebox").TObject<{
725
- amount: import("typebox").TInteger;
726
- currency: import("typebox").TString;
727
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
728
- }>;
729
- response: import("typebox").TObject<{
730
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
731
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
732
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
733
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
734
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
735
- amount: import("typebox").TInteger;
736
- currency: import("typebox").TString;
737
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
738
- providerRef: import("typebox").TOptional<import("typebox").TString>;
739
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
740
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
741
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
742
- userId: import("typebox").TOptional<import("typebox").TString>;
743
- }>;
900
+ body: import("zod").ZodObject<{
901
+ amount: import("zod").ZodInt;
902
+ currency: import("zod").ZodString;
903
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
904
+ }, import("zod/v4/core").$strip>;
905
+ response: import("zod").ZodObject<{
906
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
907
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
908
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
909
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
910
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
911
+ amount: import("zod").ZodInt;
912
+ currency: import("zod").ZodString;
913
+ status: import("zod").ZodEnum<{
914
+ authorized: "authorized";
915
+ cancelled: "cancelled";
916
+ captured: "captured";
917
+ created: "created";
918
+ expired: "expired";
919
+ failed: "failed";
920
+ partially_refunded: "partially_refunded";
921
+ processing: "processing";
922
+ refunded: "refunded";
923
+ voided: "voided";
924
+ }>;
925
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
926
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
927
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
928
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
929
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
930
+ }, import("zod/v4/core").$strip>;
744
931
  }>;
745
932
  /**
746
933
  * PSP webhook endpoint (not under /admin, no auth — verified by provider).
747
934
  */
748
935
  readonly webhook: import("alepha/server").ActionPrimitiveFn<{
749
- response: import("typebox").TObject<{
750
- ok: import("typebox").TBoolean;
751
- id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
752
- count: import("typebox").TOptional<import("typebox").TNumber>;
753
- }>;
936
+ response: import("zod").ZodObject<{
937
+ ok: import("zod").ZodBoolean;
938
+ id: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
939
+ count: import("zod").ZodOptional<import("zod").ZodNumber>;
940
+ }, import("zod/v4/core").$strip>;
754
941
  }>;
755
942
  }
756
943
  //#endregion
@@ -762,68 +949,68 @@ declare class MockCheckoutController {
762
949
  protected isMemoryProvider(): boolean;
763
950
  protected forbidden(reply: ServerReply): string;
764
951
  readonly mockCheckoutPage: import("alepha/server").RoutePrimitive<{
765
- params: import("typebox").TObject<{
766
- id: import("typebox").TString;
767
- }>;
768
- query: import("typebox").TObject<{
769
- returnUrl: import("typebox").TOptional<import("typebox").TString>;
770
- }>;
952
+ params: import("zod").ZodObject<{
953
+ id: import("zod").ZodString;
954
+ }, import("zod/v4/core").$strip>;
955
+ query: import("zod").ZodObject<{
956
+ returnUrl: import("zod").ZodOptional<import("zod").ZodString>;
957
+ }, import("zod/v4/core").$strip>;
771
958
  }>;
772
959
  readonly mockCheckoutConfirm: import("alepha/server").RoutePrimitive<{
773
- params: import("typebox").TObject<{
774
- id: import("typebox").TString;
775
- }>;
776
- body: import("typebox").TObject<{
777
- returnUrl: import("typebox").TOptional<import("typebox").TString>;
778
- }>;
960
+ params: import("zod").ZodObject<{
961
+ id: import("zod").ZodString;
962
+ }, import("zod/v4/core").$strip>;
963
+ body: import("zod").ZodObject<{
964
+ returnUrl: import("zod").ZodOptional<import("zod").ZodString>;
965
+ }, import("zod/v4/core").$strip>;
779
966
  }>;
780
967
  readonly mockCheckoutCancel: import("alepha/server").RoutePrimitive<{
781
- params: import("typebox").TObject<{
782
- id: import("typebox").TString;
783
- }>;
784
- body: import("typebox").TObject<{
785
- returnUrl: import("typebox").TOptional<import("typebox").TString>;
786
- }>;
968
+ params: import("zod").ZodObject<{
969
+ id: import("zod").ZodString;
970
+ }, import("zod/v4/core").$strip>;
971
+ body: import("zod").ZodObject<{
972
+ returnUrl: import("zod").ZodOptional<import("zod").ZodString>;
973
+ }, import("zod/v4/core").$strip>;
787
974
  }>;
788
975
  }
789
976
  //#endregion
790
977
  //#region ../../src/api/payments/entities/paymentMethods.d.ts
791
- declare const paymentMethods: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
792
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
793
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
794
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
795
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
796
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
797
- userId: import("typebox").TString;
798
- type: import("typebox").TString;
799
- brand: import("typebox").TOptional<import("typebox").TString>;
800
- last4: import("typebox").TOptional<import("typebox").TString>;
801
- expMonth: import("typebox").TOptional<import("typebox").TInteger>;
802
- expYear: import("typebox").TOptional<import("typebox").TInteger>;
803
- isDefault: import("typebox").TBoolean;
804
- providerRef: import("typebox").TString;
805
- }>>;
978
+ declare const paymentMethods: import("alepha/orm").EntityPrimitive<import("zod").ZodObject<{
979
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
980
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
981
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
982
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
983
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
984
+ userId: import("zod").ZodString;
985
+ type: import("zod").ZodString;
986
+ brand: import("zod").ZodOptional<import("zod").ZodString>;
987
+ last4: import("zod").ZodOptional<import("zod").ZodString>;
988
+ expMonth: import("zod").ZodOptional<import("zod").ZodInt>;
989
+ expYear: import("zod").ZodOptional<import("zod").ZodInt>;
990
+ isDefault: import("zod").ZodBoolean;
991
+ providerRef: import("zod").ZodString;
992
+ }, import("zod/v4/core").$strip>>;
806
993
  type PaymentMethodEntity = Static<typeof paymentMethods.schema>;
807
994
  //#endregion
808
995
  //#region ../../src/api/payments/services/PaymentMethodService.d.ts
809
996
  declare class PaymentMethodService {
810
997
  protected readonly log: import("alepha/logger").Logger;
811
998
  protected readonly provider: PaymentProvider;
812
- protected readonly methodRepo: import("alepha/orm").Repository<import("typebox").TObject<{
813
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
814
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
815
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
816
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
817
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
818
- userId: import("typebox").TString;
819
- type: import("typebox").TString;
820
- brand: import("typebox").TOptional<import("typebox").TString>;
821
- last4: import("typebox").TOptional<import("typebox").TString>;
822
- expMonth: import("typebox").TOptional<import("typebox").TInteger>;
823
- expYear: import("typebox").TOptional<import("typebox").TInteger>;
824
- isDefault: import("typebox").TBoolean;
825
- providerRef: import("typebox").TString;
826
- }>>;
999
+ protected readonly methodRepo: import("alepha/orm").Repository<import("zod").ZodObject<{
1000
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
1001
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
1002
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
1003
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
1004
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
1005
+ userId: import("zod").ZodString;
1006
+ type: import("zod").ZodString;
1007
+ brand: import("zod").ZodOptional<import("zod").ZodString>;
1008
+ last4: import("zod").ZodOptional<import("zod").ZodString>;
1009
+ expMonth: import("zod").ZodOptional<import("zod").ZodInt>;
1010
+ expYear: import("zod").ZodOptional<import("zod").ZodInt>;
1011
+ isDefault: import("zod").ZodBoolean;
1012
+ providerRef: import("zod").ZodString;
1013
+ }, import("zod/v4/core").$strip>>;
827
1014
  addPaymentMethod(userId: string, organizationId: string, token: string): Promise<PaymentMethodEntity>;
828
1015
  listPaymentMethods(userId: string): Promise<PaymentMethodEntity[]>;
829
1016
  removePaymentMethod(methodId: string, userId: string): Promise<void>;
@@ -840,94 +1027,94 @@ declare class PaymentController {
840
1027
  * List the current user's saved payment methods.
841
1028
  */
842
1029
  readonly listPaymentMethods: import("alepha/server").ActionPrimitiveFn<{
843
- response: import("typebox").TArray<import("typebox").TObject<{
844
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
845
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
846
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
847
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
848
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
849
- userId: import("typebox").TString;
850
- type: import("typebox").TString;
851
- brand: import("typebox").TOptional<import("typebox").TString>;
852
- last4: import("typebox").TOptional<import("typebox").TString>;
853
- expMonth: import("typebox").TOptional<import("typebox").TInteger>;
854
- expYear: import("typebox").TOptional<import("typebox").TInteger>;
855
- isDefault: import("typebox").TBoolean;
856
- providerRef: import("typebox").TString;
857
- }>>;
1030
+ response: import("zod").ZodArray<import("zod").ZodObject<{
1031
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1032
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
1033
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1034
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1035
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
1036
+ userId: import("zod").ZodString;
1037
+ type: import("zod").ZodString;
1038
+ brand: import("zod").ZodOptional<import("zod").ZodString>;
1039
+ last4: import("zod").ZodOptional<import("zod").ZodString>;
1040
+ expMonth: import("zod").ZodOptional<import("zod").ZodInt>;
1041
+ expYear: import("zod").ZodOptional<import("zod").ZodInt>;
1042
+ isDefault: import("zod").ZodBoolean;
1043
+ providerRef: import("zod").ZodString;
1044
+ }, import("zod/v4/core").$strip>>;
858
1045
  }>;
859
1046
  /**
860
1047
  * Add a new payment method.
861
1048
  */
862
1049
  readonly addPaymentMethod: import("alepha/server").ActionPrimitiveFn<{
863
- body: import("typebox").TObject<{
864
- token: import("typebox").TString;
865
- }>;
866
- response: import("typebox").TObject<{
867
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
868
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
869
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
870
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
871
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
872
- userId: import("typebox").TString;
873
- type: import("typebox").TString;
874
- brand: import("typebox").TOptional<import("typebox").TString>;
875
- last4: import("typebox").TOptional<import("typebox").TString>;
876
- expMonth: import("typebox").TOptional<import("typebox").TInteger>;
877
- expYear: import("typebox").TOptional<import("typebox").TInteger>;
878
- isDefault: import("typebox").TBoolean;
879
- providerRef: import("typebox").TString;
880
- }>;
1050
+ body: import("zod").ZodObject<{
1051
+ token: import("zod").ZodString;
1052
+ }, import("zod/v4/core").$strip>;
1053
+ response: import("zod").ZodObject<{
1054
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1055
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
1056
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1057
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1058
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
1059
+ userId: import("zod").ZodString;
1060
+ type: import("zod").ZodString;
1061
+ brand: import("zod").ZodOptional<import("zod").ZodString>;
1062
+ last4: import("zod").ZodOptional<import("zod").ZodString>;
1063
+ expMonth: import("zod").ZodOptional<import("zod").ZodInt>;
1064
+ expYear: import("zod").ZodOptional<import("zod").ZodInt>;
1065
+ isDefault: import("zod").ZodBoolean;
1066
+ providerRef: import("zod").ZodString;
1067
+ }, import("zod/v4/core").$strip>;
881
1068
  }>;
882
1069
  /**
883
1070
  * Remove a payment method.
884
1071
  */
885
1072
  readonly removePaymentMethod: import("alepha/server").ActionPrimitiveFn<{
886
- params: import("typebox").TObject<{
887
- id: import("typebox").TString;
888
- }>;
889
- response: import("typebox").TObject<{
890
- ok: import("typebox").TBoolean;
891
- id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
892
- count: import("typebox").TOptional<import("typebox").TNumber>;
893
- }>;
1073
+ params: import("zod").ZodObject<{
1074
+ id: import("zod").ZodString;
1075
+ }, import("zod/v4/core").$strip>;
1076
+ response: import("zod").ZodObject<{
1077
+ ok: import("zod").ZodBoolean;
1078
+ id: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
1079
+ count: import("zod").ZodOptional<import("zod").ZodNumber>;
1080
+ }, import("zod/v4/core").$strip>;
894
1081
  }>;
895
1082
  /**
896
1083
  * Set a payment method as default.
897
1084
  */
898
1085
  readonly setDefaultPaymentMethod: import("alepha/server").ActionPrimitiveFn<{
899
- params: import("typebox").TObject<{
900
- id: import("typebox").TString;
901
- }>;
902
- response: import("typebox").TObject<{
903
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
904
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
905
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
906
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
907
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
908
- userId: import("typebox").TString;
909
- type: import("typebox").TString;
910
- brand: import("typebox").TOptional<import("typebox").TString>;
911
- last4: import("typebox").TOptional<import("typebox").TString>;
912
- expMonth: import("typebox").TOptional<import("typebox").TInteger>;
913
- expYear: import("typebox").TOptional<import("typebox").TInteger>;
914
- isDefault: import("typebox").TBoolean;
915
- providerRef: import("typebox").TString;
916
- }>;
1086
+ params: import("zod").ZodObject<{
1087
+ id: import("zod").ZodString;
1088
+ }, import("zod/v4/core").$strip>;
1089
+ response: import("zod").ZodObject<{
1090
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1091
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
1092
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1093
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1094
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
1095
+ userId: import("zod").ZodString;
1096
+ type: import("zod").ZodString;
1097
+ brand: import("zod").ZodOptional<import("zod").ZodString>;
1098
+ last4: import("zod").ZodOptional<import("zod").ZodString>;
1099
+ expMonth: import("zod").ZodOptional<import("zod").ZodInt>;
1100
+ expYear: import("zod").ZodOptional<import("zod").ZodInt>;
1101
+ isDefault: import("zod").ZodBoolean;
1102
+ providerRef: import("zod").ZodString;
1103
+ }, import("zod/v4/core").$strip>;
917
1104
  }>;
918
1105
  /**
919
1106
  * Create a checkout session.
920
1107
  */
921
1108
  readonly createCheckout: import("alepha/server").ActionPrimitiveFn<{
922
- body: import("typebox").TObject<{
923
- intentId: import("typebox").TString;
924
- returnUrl: import("typebox").TString;
925
- authorize: import("typebox").TOptional<import("typebox").TBoolean>;
926
- }>;
927
- response: import("typebox").TObject<{
928
- url: import("typebox").TString;
929
- intentId: import("typebox").TString;
930
- }>;
1109
+ body: import("zod").ZodObject<{
1110
+ intentId: import("zod").ZodString;
1111
+ returnUrl: import("zod").ZodString;
1112
+ authorize: import("zod").ZodOptional<import("zod").ZodBoolean>;
1113
+ }, import("zod/v4/core").$strip>;
1114
+ response: import("zod").ZodObject<{
1115
+ url: import("zod").ZodString;
1116
+ intentId: import("zod").ZodString;
1117
+ }, import("zod/v4/core").$strip>;
931
1118
  }>;
932
1119
  }
933
1120
  //#endregion
@@ -974,100 +1161,116 @@ declare class MemoryPaymentProvider implements PaymentProvider {
974
1161
  }
975
1162
  //#endregion
976
1163
  //#region ../../src/api/payments/schemas/intentSchemas.d.ts
977
- declare const createIntentSchema: import("typebox").TObject<{
978
- amount: import("typebox").TInteger;
979
- currency: import("typebox").TString;
980
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
981
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
982
- }>;
1164
+ declare const createIntentSchema: import("zod").ZodObject<{
1165
+ amount: import("zod").ZodInt;
1166
+ currency: import("zod").ZodString;
1167
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1168
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
1169
+ }, import("zod/v4/core").$strip>;
983
1170
  type CreateIntent = Static<typeof createIntentSchema>;
984
- declare const createCheckoutSchema: import("typebox").TObject<{
985
- intentId: import("typebox").TString;
986
- returnUrl: import("typebox").TString;
987
- authorize: import("typebox").TOptional<import("typebox").TBoolean>;
988
- }>;
1171
+ declare const createCheckoutSchema: import("zod").ZodObject<{
1172
+ intentId: import("zod").ZodString;
1173
+ returnUrl: import("zod").ZodString;
1174
+ authorize: import("zod").ZodOptional<import("zod").ZodBoolean>;
1175
+ }, import("zod/v4/core").$strip>;
989
1176
  type CreateCheckout = Static<typeof createCheckoutSchema>;
990
- declare const checkoutResponseSchema: import("typebox").TObject<{
991
- url: import("typebox").TString;
992
- intentId: import("typebox").TString;
993
- }>;
1177
+ declare const checkoutResponseSchema: import("zod").ZodObject<{
1178
+ url: import("zod").ZodString;
1179
+ intentId: import("zod").ZodString;
1180
+ }, import("zod/v4/core").$strip>;
994
1181
  type CheckoutResponse = Static<typeof checkoutResponseSchema>;
995
- declare const captureIntentSchema: import("typebox").TObject<{
996
- amount: import("typebox").TOptional<import("typebox").TInteger>;
997
- }>;
1182
+ declare const captureIntentSchema: import("zod").ZodObject<{
1183
+ amount: import("zod").ZodOptional<import("zod").ZodInt>;
1184
+ }, import("zod/v4/core").$strip>;
998
1185
  type CaptureIntent = Static<typeof captureIntentSchema>;
999
- declare const refundIntentSchema: import("typebox").TObject<{
1000
- amount: import("typebox").TInteger;
1001
- reason: import("typebox").TOptional<import("typebox").TString>;
1002
- }>;
1186
+ declare const refundIntentSchema: import("zod").ZodObject<{
1187
+ amount: import("zod").ZodInt;
1188
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
1189
+ }, import("zod/v4/core").$strip>;
1003
1190
  type RefundIntent = Static<typeof refundIntentSchema>;
1004
- declare const recordCashSchema: import("typebox").TObject<{
1005
- amount: import("typebox").TInteger;
1006
- currency: import("typebox").TString;
1007
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
1008
- }>;
1191
+ declare const recordCashSchema: import("zod").ZodObject<{
1192
+ amount: import("zod").ZodInt;
1193
+ currency: import("zod").ZodString;
1194
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1195
+ }, import("zod/v4/core").$strip>;
1009
1196
  type RecordCash = Static<typeof recordCashSchema>;
1010
- declare const intentQuerySchema: import("typebox").TObject<{
1011
- page: import("typebox").TOptional<import("typebox").TInteger>;
1012
- size: import("typebox").TOptional<import("typebox").TInteger>;
1013
- sort: import("typebox").TOptional<import("typebox").TString>;
1014
- status: import("typebox").TOptional<import("typebox").TString>;
1015
- userId: import("typebox").TOptional<import("typebox").TString>;
1016
- }>;
1197
+ declare const intentQuerySchema: import("zod").ZodObject<{
1198
+ page: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
1199
+ size: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodInt>>;
1200
+ sort: import("zod").ZodOptional<import("zod").ZodString>;
1201
+ status: import("zod").ZodOptional<import("zod").ZodString>;
1202
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1203
+ }, import("zod/v4/core").$strip>;
1017
1204
  type IntentQuery = Static<typeof intentQuerySchema>;
1018
- declare const intentResourceSchema: import("typebox").TObject<{
1019
- id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
1020
- version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
1021
- createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
1022
- updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
1023
- organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
1024
- amount: import("typebox").TInteger;
1025
- currency: import("typebox").TString;
1026
- status: import("typebox").TUnsafe<"created" | "processing" | "authorized" | "captured" | "partially_refunded" | "voided" | "failed" | "cancelled" | "refunded" | "expired">;
1027
- providerRef: import("typebox").TOptional<import("typebox").TString>;
1028
- providerRaw: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
1029
- metadata: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
1030
- paymentMethodId: import("typebox").TOptional<import("typebox").TString>;
1031
- userId: import("typebox").TOptional<import("typebox").TString>;
1032
- }>;
1205
+ declare const intentResourceSchema: import("zod").ZodObject<{
1206
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
1207
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodInt, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
1208
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
1209
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("zod").ZodString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
1210
+ organizationId: import("alepha/orm").PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof import("alepha/orm").PG_ORGANIZATION>;
1211
+ amount: import("zod").ZodInt;
1212
+ currency: import("zod").ZodString;
1213
+ status: import("zod").ZodEnum<{
1214
+ authorized: "authorized";
1215
+ cancelled: "cancelled";
1216
+ captured: "captured";
1217
+ created: "created";
1218
+ expired: "expired";
1219
+ failed: "failed";
1220
+ partially_refunded: "partially_refunded";
1221
+ processing: "processing";
1222
+ refunded: "refunded";
1223
+ voided: "voided";
1224
+ }>;
1225
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
1226
+ providerRaw: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1227
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1228
+ paymentMethodId: import("zod").ZodOptional<import("zod").ZodString>;
1229
+ userId: import("zod").ZodOptional<import("zod").ZodString>;
1230
+ }, import("zod/v4/core").$strip>;
1033
1231
  type IntentResource = Static<typeof intentResourceSchema>;
1034
1232
  //#endregion
1035
1233
  //#region ../../src/api/payments/schemas/paymentMethodSchemas.d.ts
1036
- declare const addPaymentMethodSchema: import("typebox").TObject<{
1037
- token: import("typebox").TString;
1038
- }>;
1234
+ declare const addPaymentMethodSchema: import("zod").ZodObject<{
1235
+ token: import("zod").ZodString;
1236
+ }, import("zod/v4/core").$strip>;
1039
1237
  type AddPaymentMethod = Static<typeof addPaymentMethodSchema>;
1040
- declare const paymentMethodResourceSchema: import("typebox").TObject<{
1041
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1042
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1043
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1044
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1045
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
1046
- userId: import("typebox").TString;
1047
- type: import("typebox").TString;
1048
- brand: import("typebox").TOptional<import("typebox").TString>;
1049
- last4: import("typebox").TOptional<import("typebox").TString>;
1050
- expMonth: import("typebox").TOptional<import("typebox").TInteger>;
1051
- expYear: import("typebox").TOptional<import("typebox").TInteger>;
1052
- isDefault: import("typebox").TBoolean;
1053
- providerRef: import("typebox").TString;
1054
- }>;
1238
+ declare const paymentMethodResourceSchema: import("zod").ZodObject<{
1239
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1240
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
1241
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1242
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1243
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
1244
+ userId: import("zod").ZodString;
1245
+ type: import("zod").ZodString;
1246
+ brand: import("zod").ZodOptional<import("zod").ZodString>;
1247
+ last4: import("zod").ZodOptional<import("zod").ZodString>;
1248
+ expMonth: import("zod").ZodOptional<import("zod").ZodInt>;
1249
+ expYear: import("zod").ZodOptional<import("zod").ZodInt>;
1250
+ isDefault: import("zod").ZodBoolean;
1251
+ providerRef: import("zod").ZodString;
1252
+ }, import("zod/v4/core").$strip>;
1055
1253
  type PaymentMethodResource = Static<typeof paymentMethodResourceSchema>;
1056
1254
  //#endregion
1057
1255
  //#region ../../src/api/payments/schemas/refundSchemas.d.ts
1058
- declare const refundResourceSchema: import("typebox").TObject<{
1059
- id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1060
- version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1061
- createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1062
- updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1063
- organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
1064
- intentId: import("typebox").TString;
1065
- amount: import("typebox").TInteger;
1066
- currency: import("typebox").TString;
1067
- status: import("typebox").TUnsafe<"processing" | "failed" | "pending" | "completed">;
1068
- reason: import("typebox").TOptional<import("typebox").TString>;
1069
- providerRef: import("typebox").TOptional<import("typebox").TString>;
1070
- }>;
1256
+ declare const refundResourceSchema: import("zod").ZodObject<{
1257
+ id: PgAttr<PgAttr<import("zod").ZodString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1258
+ version: PgAttr<PgAttr<import("zod").ZodInt, typeof PG_VERSION>, typeof PG_DEFAULT>;
1259
+ createdAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1260
+ updatedAt: PgAttr<PgAttr<import("zod").ZodString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1261
+ organizationId: PgAttr<import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodString, typeof PG_ORGANIZATION>;
1262
+ intentId: import("zod").ZodString;
1263
+ amount: import("zod").ZodInt;
1264
+ currency: import("zod").ZodString;
1265
+ status: import("zod").ZodEnum<{
1266
+ completed: "completed";
1267
+ failed: "failed";
1268
+ pending: "pending";
1269
+ processing: "processing";
1270
+ }>;
1271
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
1272
+ providerRef: import("zod").ZodOptional<import("zod").ZodString>;
1273
+ }, import("zod/v4/core").$strip>;
1071
1274
  type RefundResource = Static<typeof refundResourceSchema>;
1072
1275
  //#endregion
1073
1276
  //#region ../../src/api/payments/index.d.ts