alepha 0.21.2 → 0.22.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 (463) hide show
  1. package/README.md +0 -1
  2. package/dist/api/audits/index.browser.js.map +1 -1
  3. package/dist/api/audits/index.d.ts +393 -403
  4. package/dist/api/audits/index.d.ts.map +1 -1
  5. package/dist/api/audits/index.js +25 -56
  6. package/dist/api/audits/index.js.map +1 -1
  7. package/dist/api/files/index.browser.js +31 -1
  8. package/dist/api/files/index.browser.js.map +1 -1
  9. package/dist/api/files/index.d.ts +313 -208
  10. package/dist/api/files/index.d.ts.map +1 -1
  11. package/dist/api/files/index.js +152 -42
  12. package/dist/api/files/index.js.map +1 -1
  13. package/dist/api/jobs/index.browser.js +2 -2
  14. package/dist/api/jobs/index.browser.js.map +1 -1
  15. package/dist/api/jobs/index.d.ts +289 -292
  16. package/dist/api/jobs/index.d.ts.map +1 -1
  17. package/dist/api/jobs/index.js +39 -33
  18. package/dist/api/jobs/index.js.map +1 -1
  19. package/dist/api/keys/index.d.ts +211 -216
  20. package/dist/api/keys/index.d.ts.map +1 -1
  21. package/dist/api/keys/index.js.map +1 -1
  22. package/dist/api/notifications/index.browser.js.map +1 -1
  23. package/dist/api/notifications/index.d.ts +188 -195
  24. package/dist/api/notifications/index.d.ts.map +1 -1
  25. package/dist/api/notifications/index.js.map +1 -1
  26. package/dist/api/oauth/index.d.ts +71 -76
  27. package/dist/api/oauth/index.d.ts.map +1 -1
  28. package/dist/api/oauth/index.js.map +1 -1
  29. package/dist/api/organizations/index.browser.js.map +1 -1
  30. package/dist/api/organizations/index.d.ts +104 -109
  31. package/dist/api/organizations/index.d.ts.map +1 -1
  32. package/dist/api/organizations/index.js.map +1 -1
  33. package/dist/api/parameters/index.browser.js +43 -16
  34. package/dist/api/parameters/index.browser.js.map +1 -1
  35. package/dist/api/parameters/index.d.ts +488 -344
  36. package/dist/api/parameters/index.d.ts.map +1 -1
  37. package/dist/api/parameters/index.js +175 -35
  38. package/dist/api/parameters/index.js.map +1 -1
  39. package/dist/api/payments/index.d.ts +396 -402
  40. package/dist/api/payments/index.d.ts.map +1 -1
  41. package/dist/api/payments/index.js.map +1 -1
  42. package/dist/api/subscriptions/index.d.ts +644 -652
  43. package/dist/api/subscriptions/index.d.ts.map +1 -1
  44. package/dist/api/subscriptions/index.js +1 -1
  45. package/dist/api/subscriptions/index.js.map +1 -1
  46. package/dist/api/users/index.browser.js +7 -0
  47. package/dist/api/users/index.browser.js.map +1 -1
  48. package/dist/api/users/index.d.ts +1073 -1006
  49. package/dist/api/users/index.d.ts.map +1 -1
  50. package/dist/api/users/index.js +283 -61
  51. package/dist/api/users/index.js.map +1 -1
  52. package/dist/api/verifications/index.browser.js.map +1 -1
  53. package/dist/api/verifications/index.d.ts +134 -140
  54. package/dist/api/verifications/index.d.ts.map +1 -1
  55. package/dist/api/verifications/index.js.map +1 -1
  56. package/dist/background/index.d.ts +95 -0
  57. package/dist/background/index.d.ts.map +1 -0
  58. package/dist/background/index.js +121 -0
  59. package/dist/background/index.js.map +1 -0
  60. package/dist/background/index.workerd.js +110 -0
  61. package/dist/background/index.workerd.js.map +1 -0
  62. package/dist/batch/index.d.ts +5 -7
  63. package/dist/batch/index.d.ts.map +1 -1
  64. package/dist/batch/index.js.map +1 -1
  65. package/dist/bin/index.js.map +1 -1
  66. package/dist/bucket/index.d.ts +76 -54
  67. package/dist/bucket/index.d.ts.map +1 -1
  68. package/dist/bucket/index.js +58 -11
  69. package/dist/bucket/index.js.map +1 -1
  70. package/dist/bucket/index.workerd.js +200 -5
  71. package/dist/bucket/index.workerd.js.map +1 -1
  72. package/dist/cache/core/index.d.ts +7 -10
  73. package/dist/cache/core/index.d.ts.map +1 -1
  74. package/dist/cache/core/index.js.map +1 -1
  75. package/dist/cache/core/index.workerd.js.map +1 -1
  76. package/dist/cache/database/index.d.ts +22 -26
  77. package/dist/cache/database/index.d.ts.map +1 -1
  78. package/dist/cache/database/index.js.map +1 -1
  79. package/dist/cache/redis/index.d.ts +4 -7
  80. package/dist/cache/redis/index.d.ts.map +1 -1
  81. package/dist/cache/redis/index.js.map +1 -1
  82. package/dist/captcha/index.d.ts +3 -6
  83. package/dist/captcha/index.d.ts.map +1 -1
  84. package/dist/captcha/index.js.map +1 -1
  85. package/dist/cli/config/index.d.ts.map +1 -1
  86. package/dist/cli/config/index.js.map +1 -1
  87. package/dist/cli/core/index.d.ts +417 -214
  88. package/dist/cli/core/index.d.ts.map +1 -1
  89. package/dist/cli/core/index.js +325 -563
  90. package/dist/cli/core/index.js.map +1 -1
  91. package/dist/cli/devtools/index.d.ts +3 -5
  92. package/dist/cli/devtools/index.d.ts.map +1 -1
  93. package/dist/cli/devtools/index.js.map +1 -1
  94. package/dist/cli/i18n/index.d.ts +8 -12
  95. package/dist/cli/i18n/index.d.ts.map +1 -1
  96. package/dist/cli/i18n/index.js.map +1 -1
  97. package/dist/cli/platform/index.d.ts +126 -1342
  98. package/dist/cli/platform/index.d.ts.map +1 -1
  99. package/dist/cli/platform/index.js +136 -2374
  100. package/dist/cli/platform/index.js.map +1 -1
  101. package/dist/cli/platform-lib/index.d.ts +1446 -0
  102. package/dist/cli/platform-lib/index.d.ts.map +1 -0
  103. package/dist/cli/platform-lib/index.js +2597 -0
  104. package/dist/cli/platform-lib/index.js.map +1 -0
  105. package/dist/cli/vendor/index.d.ts +17 -21
  106. package/dist/cli/vendor/index.d.ts.map +1 -1
  107. package/dist/cli/vendor/index.js.map +1 -1
  108. package/dist/command/index.d.ts +21 -20
  109. package/dist/command/index.d.ts.map +1 -1
  110. package/dist/command/index.js +39 -10
  111. package/dist/command/index.js.map +1 -1
  112. package/dist/{containers → container}/core/index.d.ts +13 -15
  113. package/dist/container/core/index.d.ts.map +1 -0
  114. package/dist/{containers → container}/core/index.js +23 -14
  115. package/dist/container/core/index.js.map +1 -0
  116. package/dist/{containers → container}/core/index.workerd.js +37 -22
  117. package/dist/container/core/index.workerd.js.map +1 -0
  118. package/dist/core/index.browser.js +27 -1
  119. package/dist/core/index.browser.js.map +1 -1
  120. package/dist/core/index.d.ts +48 -24
  121. package/dist/core/index.d.ts.map +1 -1
  122. package/dist/core/index.js +27 -1
  123. package/dist/core/index.js.map +1 -1
  124. package/dist/core/index.native.js +27 -1
  125. package/dist/core/index.native.js.map +1 -1
  126. package/dist/core/index.workerd.js +27 -1
  127. package/dist/core/index.workerd.js.map +1 -1
  128. package/dist/crypto/index.browser.js.map +1 -1
  129. package/dist/crypto/index.d.ts +5 -8
  130. package/dist/crypto/index.d.ts.map +1 -1
  131. package/dist/crypto/index.js.map +1 -1
  132. package/dist/datetime/index.d.ts +3 -4
  133. package/dist/datetime/index.d.ts.map +1 -1
  134. package/dist/datetime/index.js.map +1 -1
  135. package/dist/email/brevo/index.d.ts +2 -4
  136. package/dist/email/brevo/index.d.ts.map +1 -1
  137. package/dist/email/brevo/index.js.map +1 -1
  138. package/dist/email/cloudflare/index.d.ts +20 -7
  139. package/dist/email/cloudflare/index.d.ts.map +1 -1
  140. package/dist/email/cloudflare/index.js +46 -9
  141. package/dist/email/cloudflare/index.js.map +1 -1
  142. package/dist/email/core/index.d.ts +6 -9
  143. package/dist/email/core/index.d.ts.map +1 -1
  144. package/dist/email/core/index.js.map +1 -1
  145. package/dist/email/core/index.workerd.js.map +1 -1
  146. package/dist/email/smtp/index.d.ts +10 -13
  147. package/dist/email/smtp/index.d.ts.map +1 -1
  148. package/dist/email/smtp/index.js +107 -32
  149. package/dist/email/smtp/index.js.map +1 -1
  150. package/dist/fake/index.d.ts +1 -2
  151. package/dist/fake/index.d.ts.map +1 -1
  152. package/dist/fake/index.js.map +1 -1
  153. package/dist/lock/core/index.d.ts +9 -14
  154. package/dist/lock/core/index.d.ts.map +1 -1
  155. package/dist/lock/core/index.js.map +1 -1
  156. package/dist/lock/redis/index.d.ts +2 -4
  157. package/dist/lock/redis/index.d.ts.map +1 -1
  158. package/dist/lock/redis/index.js.map +1 -1
  159. package/dist/logger/index.d.ts +105 -76
  160. package/dist/logger/index.d.ts.map +1 -1
  161. package/dist/logger/index.js +196 -174
  162. package/dist/logger/index.js.map +1 -1
  163. package/dist/mcp/index.d.ts +16 -20
  164. package/dist/mcp/index.d.ts.map +1 -1
  165. package/dist/mcp/index.js.map +1 -1
  166. package/dist/orm/core/index.browser.js.map +1 -1
  167. package/dist/orm/core/index.bun.js +19 -1
  168. package/dist/orm/core/index.bun.js.map +1 -1
  169. package/dist/orm/core/index.d.ts +76 -62
  170. package/dist/orm/core/index.d.ts.map +1 -1
  171. package/dist/orm/core/index.js +20 -2
  172. package/dist/orm/core/index.js.map +1 -1
  173. package/dist/orm/postgres/index.bun.js.map +1 -1
  174. package/dist/orm/postgres/index.d.ts +28 -20
  175. package/dist/orm/postgres/index.d.ts.map +1 -1
  176. package/dist/orm/postgres/index.js.map +1 -1
  177. package/dist/queue/core/index.d.ts +12 -15
  178. package/dist/queue/core/index.d.ts.map +1 -1
  179. package/dist/queue/core/index.js.map +1 -1
  180. package/dist/queue/core/index.workerd.js.map +1 -1
  181. package/dist/queue/redis/index.d.ts +3 -5
  182. package/dist/queue/redis/index.d.ts.map +1 -1
  183. package/dist/queue/redis/index.js.map +1 -1
  184. package/dist/react/auth/index.browser.js +9 -2
  185. package/dist/react/auth/index.browser.js.map +1 -1
  186. package/dist/react/auth/index.d.ts +14 -9
  187. package/dist/react/auth/index.d.ts.map +1 -1
  188. package/dist/react/auth/index.js +9 -2
  189. package/dist/react/auth/index.js.map +1 -1
  190. package/dist/react/core/index.d.ts +7 -8
  191. package/dist/react/core/index.d.ts.map +1 -1
  192. package/dist/react/core/index.js +6 -3
  193. package/dist/react/core/index.js.map +1 -1
  194. package/dist/react/form/index.d.ts +2 -4
  195. package/dist/react/form/index.d.ts.map +1 -1
  196. package/dist/react/form/index.js.map +1 -1
  197. package/dist/react/head/index.browser.js.map +1 -1
  198. package/dist/react/head/index.d.ts +2 -4
  199. package/dist/react/head/index.d.ts.map +1 -1
  200. package/dist/react/head/index.js.map +1 -1
  201. package/dist/react/i18n/index.d.ts +47 -11
  202. package/dist/react/i18n/index.d.ts.map +1 -1
  203. package/dist/react/i18n/index.js +33 -1
  204. package/dist/react/i18n/index.js.map +1 -1
  205. package/dist/react/intro/index.d.ts +1 -2
  206. package/dist/react/intro/index.d.ts.map +1 -1
  207. package/dist/react/intro/index.js +2 -2
  208. package/dist/react/intro/index.js.map +1 -1
  209. package/dist/react/router/index.browser.js +65 -19
  210. package/dist/react/router/index.browser.js.map +1 -1
  211. package/dist/react/router/index.d.ts +327 -222
  212. package/dist/react/router/index.d.ts.map +1 -1
  213. package/dist/react/router/index.js +65 -29
  214. package/dist/react/router/index.js.map +1 -1
  215. package/dist/react/testing/index.d.ts +1 -2
  216. package/dist/react/testing/index.d.ts.map +1 -1
  217. package/dist/react/testing/index.js +16 -17
  218. package/dist/react/testing/index.js.map +1 -1
  219. package/dist/react/ui/index.d.ts +20 -25
  220. package/dist/react/ui/index.d.ts.map +1 -1
  221. package/dist/react/ui/index.js.map +1 -1
  222. package/dist/redis/index.bun.js.map +1 -1
  223. package/dist/redis/index.d.ts +17 -19
  224. package/dist/redis/index.d.ts.map +1 -1
  225. package/dist/redis/index.js.map +1 -1
  226. package/dist/retry/index.d.ts +2 -4
  227. package/dist/retry/index.d.ts.map +1 -1
  228. package/dist/retry/index.js.map +1 -1
  229. package/dist/router/index.d.ts.map +1 -1
  230. package/dist/router/index.js.map +1 -1
  231. package/dist/scheduler/index.d.ts +10 -13
  232. package/dist/scheduler/index.d.ts.map +1 -1
  233. package/dist/scheduler/index.js.map +1 -1
  234. package/dist/scheduler/index.workerd.js.map +1 -1
  235. package/dist/security/index.browser.js.map +1 -1
  236. package/dist/security/index.d.ts +45 -48
  237. package/dist/security/index.d.ts.map +1 -1
  238. package/dist/security/index.js.map +1 -1
  239. package/dist/server/auth/index.browser.js.map +1 -1
  240. package/dist/server/auth/index.d.ts +167 -172
  241. package/dist/server/auth/index.d.ts.map +1 -1
  242. package/dist/server/auth/index.js +4 -8
  243. package/dist/server/auth/index.js.map +1 -1
  244. package/dist/server/cookies/index.browser.js.map +1 -1
  245. package/dist/server/cookies/index.d.ts +5 -7
  246. package/dist/server/cookies/index.d.ts.map +1 -1
  247. package/dist/server/cookies/index.js.map +1 -1
  248. package/dist/server/core/index.browser.js.map +1 -1
  249. package/dist/server/core/index.d.ts +88 -73
  250. package/dist/server/core/index.d.ts.map +1 -1
  251. package/dist/server/core/index.js +19 -0
  252. package/dist/server/core/index.js.map +1 -1
  253. package/dist/server/cors/index.d.ts +11 -14
  254. package/dist/server/cors/index.d.ts.map +1 -1
  255. package/dist/server/cors/index.js.map +1 -1
  256. package/dist/server/etag/index.d.ts +6 -9
  257. package/dist/server/etag/index.d.ts.map +1 -1
  258. package/dist/server/etag/index.js.map +1 -1
  259. package/dist/server/health/index.d.ts +18 -21
  260. package/dist/server/health/index.d.ts.map +1 -1
  261. package/dist/server/health/index.js.map +1 -1
  262. package/dist/server/links/index.browser.js +2 -0
  263. package/dist/server/links/index.browser.js.map +1 -1
  264. package/dist/server/links/index.d.ts +63 -67
  265. package/dist/server/links/index.d.ts.map +1 -1
  266. package/dist/server/links/index.js +2 -0
  267. package/dist/server/links/index.js.map +1 -1
  268. package/dist/server/metrics/index.d.ts +5 -7
  269. package/dist/server/metrics/index.d.ts.map +1 -1
  270. package/dist/server/metrics/index.js.map +1 -1
  271. package/dist/server/proxy/index.d.ts +3 -5
  272. package/dist/server/proxy/index.d.ts.map +1 -1
  273. package/dist/server/proxy/index.js.map +1 -1
  274. package/dist/server/rate-limit/index.d.ts +10 -13
  275. package/dist/server/rate-limit/index.d.ts.map +1 -1
  276. package/dist/server/rate-limit/index.js.map +1 -1
  277. package/dist/server/static/index.d.ts +3 -5
  278. package/dist/server/static/index.d.ts.map +1 -1
  279. package/dist/server/static/index.js.map +1 -1
  280. package/dist/server/swagger/index.d.ts +5 -8
  281. package/dist/server/swagger/index.d.ts.map +1 -1
  282. package/dist/server/swagger/index.js.map +1 -1
  283. package/dist/sms/index.d.ts +3 -5
  284. package/dist/sms/index.d.ts.map +1 -1
  285. package/dist/sms/index.js.map +1 -1
  286. package/dist/system/index.browser.js.map +1 -1
  287. package/dist/system/index.d.ts +2 -4
  288. package/dist/system/index.d.ts.map +1 -1
  289. package/dist/system/index.js.map +1 -1
  290. package/dist/system/index.workerd.js.map +1 -1
  291. package/dist/topic/core/index.d.ts +4 -6
  292. package/dist/topic/core/index.d.ts.map +1 -1
  293. package/dist/topic/core/index.js.map +1 -1
  294. package/dist/topic/redis/index.d.ts +5 -8
  295. package/dist/topic/redis/index.d.ts.map +1 -1
  296. package/dist/topic/redis/index.js.map +1 -1
  297. package/package.json +45 -22
  298. package/src/api/audits/__tests__/AuditService.spec.ts +18 -110
  299. package/src/api/audits/controllers/AdminAuditController.ts +14 -0
  300. package/src/api/audits/services/AuditService.ts +21 -88
  301. package/src/api/files/__tests__/FileService.spec.ts +207 -2
  302. package/src/api/files/index.ts +3 -0
  303. package/src/api/files/schemas/fileCreatorSummarySchema.ts +22 -0
  304. package/src/api/files/schemas/fileResourceSchema.ts +10 -1
  305. package/src/api/files/services/FileService.ts +170 -72
  306. package/src/api/jobs/__tests__/$job.spec.ts +24 -1
  307. package/src/api/jobs/index.ts +4 -3
  308. package/src/api/jobs/primitives/$job.ts +7 -3
  309. package/src/api/jobs/providers/DirectJobDispatcher.ts +17 -36
  310. package/src/api/jobs/providers/JobProvider.ts +53 -24
  311. package/src/api/jobs/schemas/jobConfigAtom.ts +1 -1
  312. package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +4 -1
  313. package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +3 -1
  314. package/src/api/parameters/__tests__/$parameter.spec.ts +19 -2
  315. package/src/api/parameters/audits/ParameterAudits.ts +17 -0
  316. package/src/api/parameters/controllers/AdminParameterController.ts +95 -19
  317. package/src/api/parameters/index.ts +3 -0
  318. package/src/api/parameters/schemas/activateParameterBodySchema.ts +3 -3
  319. package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +3 -2
  320. package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +25 -0
  321. package/src/api/parameters/schemas/parameterResponseSchema.ts +5 -0
  322. package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +4 -2
  323. package/src/api/parameters/services/ParameterProvider.ts +69 -6
  324. package/src/api/subscriptions/jobs/SubscriptionJobs.ts +1 -1
  325. package/src/api/users/__tests__/AdminSessionController.spec.ts +37 -0
  326. package/src/api/users/audits/SessionAudits.ts +33 -0
  327. package/src/api/users/audits/UserAudits.ts +19 -43
  328. package/src/api/users/controllers/AdminUserController.ts +66 -1
  329. package/src/api/users/entities/sessions.ts +6 -0
  330. package/src/api/users/entities/users.ts +2 -0
  331. package/src/api/users/index.ts +9 -1
  332. package/src/api/users/primitives/$realm.ts +3 -0
  333. package/src/api/users/schemas/sessionResourceSchema.ts +16 -0
  334. package/src/api/users/schemas/updateUserSchema.ts +1 -8
  335. package/src/api/users/schemas/userQuerySchema.ts +7 -0
  336. package/src/api/users/services/CredentialService.ts +15 -6
  337. package/src/api/users/services/IdentityService.ts +2 -1
  338. package/src/api/users/services/RegistrationService.ts +2 -1
  339. package/src/api/users/services/SessionCrudService.ts +19 -2
  340. package/src/api/users/services/SessionService.ts +39 -19
  341. package/src/api/users/services/UserService.ts +106 -8
  342. package/src/background/__tests__/BackgroundTaskProvider.spec.ts +96 -0
  343. package/src/background/index.ts +37 -0
  344. package/src/background/index.workerd.ts +28 -0
  345. package/src/background/providers/BackgroundTaskProvider.ts +70 -0
  346. package/src/background/providers/WorkerdBackgroundTaskProvider.ts +43 -0
  347. package/src/bucket/__tests__/$bucket.spec.ts +18 -0
  348. package/src/bucket/__tests__/LocalFileStorageProvider.spec.ts +5 -0
  349. package/src/bucket/__tests__/MemoryFileStorageProvider.spec.ts +5 -0
  350. package/src/bucket/__tests__/NodeS3BucketProvider.spec.ts +23 -4
  351. package/src/bucket/__tests__/shared.ts +30 -0
  352. package/src/bucket/index.ts +5 -5
  353. package/src/bucket/index.workerd.ts +11 -4
  354. package/src/bucket/primitives/$bucket.ts +27 -0
  355. package/src/bucket/providers/FileStorageProvider.ts +13 -0
  356. package/src/bucket/providers/LocalFileStorageProvider.ts +17 -1
  357. package/src/bucket/providers/MemoryFileStorageProvider.ts +7 -0
  358. package/src/bucket/providers/{CloudflareR2Provider.ts → R2FileStorageProvider.ts} +10 -1
  359. package/src/bucket/providers/{NodeS3BucketProvider.ts → S3FileStorageProvider.ts} +27 -5
  360. package/src/cli/core/__tests__/BuildDockerTask.spec.ts +25 -1
  361. package/src/cli/core/__tests__/init.spec.ts +0 -219
  362. package/src/cli/core/commands/__tests__/BuildCommand.spec.ts +43 -0
  363. package/src/cli/core/commands/build.ts +108 -30
  364. package/src/cli/core/commands/init.ts +0 -12
  365. package/src/cli/core/commands/pack.ts +133 -0
  366. package/src/cli/core/index.ts +3 -0
  367. package/src/cli/core/providers/ViteDevServerProvider.ts +40 -16
  368. package/src/cli/core/services/PackageManagerUtils.ts +0 -16
  369. package/src/cli/core/services/ProjectScaffolder.ts +29 -291
  370. package/src/cli/core/tasks/BuildCloudflareTask.ts +353 -47
  371. package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
  372. package/src/cli/core/tasks/BuildTask.ts +34 -0
  373. package/src/cli/core/templates/apiIndexTs.ts +1 -22
  374. package/src/cli/core/templates/mainCss.ts +0 -1
  375. package/src/cli/core/templates/webAppRouterTs.ts +0 -99
  376. package/src/cli/core/templates/webIndexTs.ts +1 -22
  377. package/src/cli/platform/__tests__/SecretsCommand.spec.ts +5 -3
  378. package/src/cli/platform/commands/SecretsCommand.ts +8 -6
  379. package/src/cli/platform/commands/platform.ts +192 -46
  380. package/src/cli/platform/index.ts +12 -52
  381. package/src/cli/{platform → platform-lib}/__tests__/CloudflareAdapter.spec.ts +426 -169
  382. package/src/cli/{platform → platform-lib}/__tests__/NamingService.spec.ts +91 -4
  383. package/src/cli/{platform → platform-lib}/__tests__/VercelAdapter.spec.ts +56 -85
  384. package/src/cli/{platform → platform-lib}/adapters/CloudflareAdapter.ts +402 -165
  385. package/src/cli/{platform → platform-lib}/adapters/PlatformAdapter.ts +62 -35
  386. package/src/cli/{platform → platform-lib}/adapters/VercelAdapter.ts +6 -10
  387. package/src/cli/{platform → platform-lib}/atoms/platformOptions.ts +34 -1
  388. package/src/cli/platform-lib/index.ts +67 -0
  389. package/src/cli/platform-lib/services/NamingService.ts +136 -0
  390. package/src/cli/{platform → platform-lib}/services/PlatformInspector.ts +60 -13
  391. package/src/cli/{platform → platform-lib}/services/PlatformOrchestrator.ts +54 -43
  392. package/src/cli/{platform → platform-lib}/services/WranglerApi.ts +4 -2
  393. package/src/command/__tests__/Runner.spec.ts +20 -0
  394. package/src/command/helpers/EnvUtils.ts +19 -3
  395. package/src/command/helpers/Runner.ts +12 -2
  396. package/src/command/providers/CliProvider.ts +34 -1
  397. package/src/{containers → container}/core/__tests__/$container.spec.ts +5 -5
  398. package/src/{containers → container}/core/index.ts +4 -4
  399. package/src/{containers → container}/core/index.workerd.ts +19 -3
  400. package/src/{containers → container}/core/primitives/$container.ts +1 -1
  401. package/src/{containers → container}/core/providers/CloudflareContainerProvider.ts +17 -19
  402. package/src/{containers → container}/core/providers/ContainerProvider.ts +16 -2
  403. package/src/{containers → container}/core/providers/MockContainerProvider.ts +1 -1
  404. package/src/core/Alepha.ts +49 -1
  405. package/src/core/__tests__/$env.spec.ts +42 -0
  406. package/src/core/__tests__/dump.spec.ts +47 -0
  407. package/src/email/cloudflare/__tests__/CloudflareEmailProvider.spec.ts +42 -10
  408. package/src/email/cloudflare/index.ts +14 -5
  409. package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +54 -9
  410. package/src/logger/__tests__/Logger.spec.ts +55 -0
  411. package/src/logger/index.ts +13 -0
  412. package/src/logger/services/Logger.ts +31 -1
  413. package/src/orm/__tests__/orm-showcase-tests.ts +27 -0
  414. package/src/orm/__tests__/orm-showcase.spec.ts +12 -0
  415. package/src/orm/core/interfaces/PgQuery.ts +4 -1
  416. package/src/orm/core/services/Repository.ts +27 -11
  417. package/src/react/auth/hooks/useAuth.ts +10 -5
  418. package/src/react/core/__tests__/useQuery.browser.spec.tsx +25 -0
  419. package/src/react/core/hooks/useAction.ts +14 -3
  420. package/src/react/core/hooks/useQuery.ts +24 -4
  421. package/src/react/i18n/components/Translate.tsx +47 -0
  422. package/src/react/i18n/index.ts +2 -0
  423. package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
  424. package/src/react/router/__tests__/$page.spec.tsx +3 -2
  425. package/src/react/router/__tests__/page-can.spec.ts +18 -13
  426. package/src/react/router/hooks/useQueryParams.ts +114 -14
  427. package/src/react/router/primitives/$page.ts +85 -4
  428. package/src/react/router/providers/ReactBrowserRouterProvider.ts +3 -7
  429. package/src/react/router/providers/ReactServerProvider.ts +4 -13
  430. package/src/react/ui/services/SchemaControl.ts +3 -4
  431. package/src/server/core/providers/ServerMultipartProvider.ts +19 -0
  432. package/src/server/links/providers/LinkProvider.ts +10 -0
  433. package/dist/containers/core/index.d.ts.map +0 -1
  434. package/dist/containers/core/index.js.map +0 -1
  435. package/dist/containers/core/index.workerd.js.map +0 -1
  436. package/src/cli/core/templates/componentsJsonTs.ts +0 -39
  437. package/src/cli/core/templates/saasAdminLayoutTsx.ts +0 -77
  438. package/src/cli/core/templates/saasAdminPagesTsx.ts +0 -26
  439. package/src/cli/core/templates/saasAuthLayoutTsx.ts +0 -22
  440. package/src/cli/core/templates/saasAuthPagesTsx.ts +0 -62
  441. package/src/cli/core/templates/saasRealmProviderTs.ts +0 -52
  442. package/src/cli/platform/services/NamingService.ts +0 -54
  443. /package/dist/orm/core/{chunk-o8xxKEmq.js → chunk-B4FMCO8f.js} +0 -0
  444. /package/dist/react/testing/{chunk-6Ep1yQYe.js → chunk-BpyX8vjI.js} +0 -0
  445. /package/src/cli/{platform → platform-lib}/__tests__/GitHubSecretStore.spec.ts +0 -0
  446. /package/src/cli/{platform → platform-lib}/__tests__/PlatformCacheProvider.spec.ts +0 -0
  447. /package/src/cli/{platform → platform-lib}/__tests__/PlatformInspector.spec.ts +0 -0
  448. /package/src/cli/{platform → platform-lib}/__tests__/PlatformOrchestrator.spec.ts +0 -0
  449. /package/src/cli/{platform → platform-lib}/__tests__/SecretFilterService.spec.ts +0 -0
  450. /package/src/cli/{platform → platform-lib}/__tests__/detectResources.spec.ts +0 -0
  451. /package/src/cli/{platform → platform-lib}/providers/GitHubSecretStore.ts +0 -0
  452. /package/src/cli/{platform → platform-lib}/providers/MemorySecretStore.ts +0 -0
  453. /package/src/cli/{platform → platform-lib}/providers/PlatformCacheProvider.ts +0 -0
  454. /package/src/cli/{platform → platform-lib}/providers/SecretStoreProvider.ts +0 -0
  455. /package/src/cli/{platform → platform-lib}/schemas/cloudflare.ts +0 -0
  456. /package/src/cli/{platform → platform-lib}/schemas/platform.ts +0 -0
  457. /package/src/cli/{platform → platform-lib}/schemas/vercel.ts +0 -0
  458. /package/src/cli/{platform → platform-lib}/services/CloudflareApi.ts +0 -0
  459. /package/src/cli/{platform → platform-lib}/services/SecretFilterService.ts +0 -0
  460. /package/src/cli/{platform → platform-lib}/services/VercelApi.ts +0 -0
  461. /package/src/cli/{platform → platform-lib}/services/VercelCli.ts +0 -0
  462. /package/src/{containers → container}/core/interfaces/ContainerOptions.ts +0 -0
  463. /package/src/{containers → container}/core/providers/NodeContainerProvider.ts +0 -0
@@ -1,27 +1,14 @@
1
- import * as _$alepha from "alepha";
2
1
  import { Alepha, AlephaError, Page, PageQuery, Primitive, SchemaValidator, Static, StaticEncode, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
3
- import { AuditService, CreateAudit } from "alepha/api/audits";
4
- import * as _$alepha_bucket0 from "alepha/bucket";
5
- import { CryptoProvider, IssuerPrimitive, IssuerPrimitiveOptions, UserAccount } from "alepha/security";
6
- import * as _$alepha_server0 from "alepha/server";
7
- import * as _$alepha_orm0 from "alepha/orm";
2
+ import { CryptoProvider, IssuerPrimitive, IssuerPrimitiveOptions, SecurityProvider, UserAccount } from "alepha/security";
8
3
  import { Page as Page$1, Repository } from "alepha/orm";
9
- import * as _$alepha_logger0 from "alepha/logger";
10
- import * as _$alepha_server_links0 from "alepha/server/links";
11
- import * as _$alepha_api_notifications0 from "alepha/api/notifications";
12
4
  import { CaptchaProvider } from "alepha/captcha";
13
5
  import { OAuth2Profile, ServerAuthProvider, WithLinkFn, WithLoginFn } from "alepha/server/auth";
14
6
  import { VerificationController, VerificationService } from "alepha/api/verifications";
15
- import * as _$alepha_cache0 from "alepha/cache";
16
7
  import { CacheProvider } from "alepha/cache";
17
8
  import { DateTime, DateTimeProvider } from "alepha/datetime";
18
- import * as _$alepha_api_jobs0 from "alepha/api/jobs";
19
9
  import { FileSystemProvider } from "alepha/system";
20
10
  import { ParameterPrimitive } from "alepha/api/parameters";
21
- import * as _$typebox from "typebox";
22
- import * as _$drizzle_orm0 from "drizzle-orm";
23
11
  import { BuildExtraConfigColumns, SQL, SQLWrapper } from "drizzle-orm";
24
- import * as _$drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
25
12
  import { LockConfig, LockStrength, PgColumn, PgColumnBuilderBase, PgDatabase, PgInsertValue, PgSelectBase, PgSequenceOptions, PgTableExtraConfigValue, PgTableWithColumns, PgTransaction, UpdateDeleteAction } from "drizzle-orm/pg-core";
26
13
  import { PgTransactionConfig } from "drizzle-orm/pg-core/session";
27
14
  import { CryptoProvider as CryptoProvider$1 } from "alepha/crypto";
@@ -48,128 +35,72 @@ type FieldRequirement = "none" | "optional" | "required";
48
35
  * collision behavior.
49
36
  */
50
37
  type UsernameFieldRequirement = FieldRequirement | "email";
51
- declare const realmAuthSettingsAtom: _$alepha.Atom<_$typebox.TObject<{
52
- displayName: _$typebox.TOptional<_$typebox.TString>;
53
- description: _$typebox.TOptional<_$typebox.TString>;
54
- logoUrl: _$typebox.TOptional<_$typebox.TString>;
55
- registrationAllowed: _$typebox.TBoolean;
56
- email: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
57
- username: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">, _$typebox.TLiteral<"email">]>;
58
- usernameRegExp: _$typebox.TString;
59
- usernameBlocklist: _$typebox.TArray<_$typebox.TString>;
60
- phoneNumber: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
61
- verifyEmailRequired: _$typebox.TBoolean;
62
- verifyPhoneRequired: _$typebox.TBoolean;
63
- firstNameLastName: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
64
- resetPasswordAllowed: _$typebox.TBoolean;
65
- captchaRequired: _$typebox.TBoolean;
66
- adminEmails: _$typebox.TArray<_$typebox.TString>;
67
- adminUsernames: _$typebox.TArray<_$typebox.TString>;
68
- defaultRoles: _$typebox.TArray<_$typebox.TString>;
69
- verifyEmailUrl: _$typebox.TOptional<_$typebox.TString>;
70
- passwordPolicy: _$typebox.TObject<{
71
- minLength: _$typebox.TInteger;
72
- requireUppercase: _$typebox.TBoolean;
73
- requireLowercase: _$typebox.TBoolean;
74
- requireNumbers: _$typebox.TBoolean;
75
- requireSpecialCharacters: _$typebox.TBoolean;
38
+ declare const realmAuthSettingsAtom: import("alepha").Atom<import("typebox").TObject<{
39
+ displayName: import("typebox").TOptional<import("typebox").TString>;
40
+ description: import("typebox").TOptional<import("typebox").TString>;
41
+ logoUrl: import("typebox").TOptional<import("typebox").TString>;
42
+ registrationAllowed: import("typebox").TBoolean;
43
+ email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
44
+ username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
45
+ usernameRegExp: import("typebox").TString;
46
+ usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
47
+ phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
48
+ verifyEmailRequired: import("typebox").TBoolean;
49
+ verifyPhoneRequired: import("typebox").TBoolean;
50
+ firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
51
+ resetPasswordAllowed: import("typebox").TBoolean;
52
+ captchaRequired: import("typebox").TBoolean;
53
+ adminEmails: import("typebox").TArray<import("typebox").TString>;
54
+ adminUsernames: import("typebox").TArray<import("typebox").TString>;
55
+ defaultRoles: import("typebox").TArray<import("typebox").TString>;
56
+ verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
57
+ passwordPolicy: import("typebox").TObject<{
58
+ minLength: import("typebox").TInteger;
59
+ requireUppercase: import("typebox").TBoolean;
60
+ requireLowercase: import("typebox").TBoolean;
61
+ requireNumbers: import("typebox").TBoolean;
62
+ requireSpecialCharacters: import("typebox").TBoolean;
76
63
  }>;
77
- loginRateLimit: _$typebox.TObject<{
78
- ipMaxAttempts: _$typebox.TInteger;
79
- accountMaxAttempts: _$typebox.TInteger;
80
- windowMs: _$typebox.TInteger;
64
+ loginRateLimit: import("typebox").TObject<{
65
+ ipMaxAttempts: import("typebox").TInteger;
66
+ accountMaxAttempts: import("typebox").TInteger;
67
+ windowMs: import("typebox").TInteger;
81
68
  }>;
82
- registrationIpMaxAttempts: _$typebox.TInteger;
83
- refreshToken: _$typebox.TObject<{
84
- expirationIdle: _$typebox.TOptional<_$typebox.TInteger>;
69
+ registrationIpMaxAttempts: import("typebox").TInteger;
70
+ refreshToken: import("typebox").TObject<{
71
+ expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
85
72
  }>;
86
73
  }>, "alepha.api.users.realmAuthSettings">;
87
74
  type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
88
75
  //#endregion
89
- //#region ../../src/api/users/audits/UserAudits.d.ts
90
- type AuditContext = Omit<CreateAudit, "type" | "action">;
76
+ //#region ../../src/api/users/audits/SessionAudits.d.ts
91
77
  /**
92
- * User-specific audit wrapper service.
78
+ * Authentication & session-security audit events.
93
79
  *
94
- * This service wraps the core AuditService to provide user-related audit logging.
80
+ * Holds two audit types:
81
+ * - `auth` — login / logout / token refresh / MFA.
82
+ * - `security` — rate limiting, session invalidation, and related guards.
95
83
  *
96
- * Declared as a module variant not auto-injected. It is instantiated
97
- * lazily the first time something calls `alepha.inject(UserAudits)`.
84
+ * Failed events are logged with `success: false`; severity (`warning`) is
85
+ * derived centrally in `AuditService.create`. Register as a module variant
86
+ * and log via the exposed primitives:
87
+ * `sessionAudits(realm)?.auth.log("login", { success: false, … })`.
88
+ */
89
+ declare class SessionAudits {
90
+ readonly auth: import("alepha/api/audits").AuditPrimitive;
91
+ readonly security: import("alepha/api/audits").AuditPrimitive;
92
+ }
93
+ //#endregion
94
+ //#region ../../src/api/users/audits/UserAudits.d.ts
95
+ /**
96
+ * User-management audit events.
97
+ *
98
+ * Holds the `user` audit type. Mirrors the `$notification`/`$job` holder
99
+ * pattern (see {@link UserNotifications}) — register as a module variant and
100
+ * log via the exposed primitive: `userAudits(realm)?.user.log("create", …)`.
98
101
  */
99
102
  declare class UserAudits {
100
- protected readonly auditService: AuditService;
101
- /**
102
- * Record a user-related audit event.
103
- */
104
- recordUser(action: "create" | "update" | "delete" | "role_change" | "enable" | "disable", context: AuditContext): Promise<{
105
- description?: string | undefined;
106
- userId?: string | undefined;
107
- userRealm?: string | undefined;
108
- userEmail?: string | undefined;
109
- resourceType?: string | undefined;
110
- resourceId?: string | undefined;
111
- metadata?: Record<string, any> | undefined;
112
- ipAddress?: string | undefined;
113
- userAgent?: string | undefined;
114
- sessionId?: string | undefined;
115
- requestId?: string | undefined;
116
- errorMessage?: string | undefined;
117
- type: string;
118
- action: string;
119
- severity: "info" | "warning" | "critical";
120
- success: boolean;
121
- id: string;
122
- createdAt: string;
123
- organizationId: string;
124
- }>;
125
- /**
126
- * Record an authentication-related audit event.
127
- */
128
- recordAuth(action: "login" | "logout" | "login_failed" | "token_refresh", context: AuditContext): Promise<{
129
- description?: string | undefined;
130
- userId?: string | undefined;
131
- userRealm?: string | undefined;
132
- userEmail?: string | undefined;
133
- resourceType?: string | undefined;
134
- resourceId?: string | undefined;
135
- metadata?: Record<string, any> | undefined;
136
- ipAddress?: string | undefined;
137
- userAgent?: string | undefined;
138
- sessionId?: string | undefined;
139
- requestId?: string | undefined;
140
- errorMessage?: string | undefined;
141
- type: string;
142
- action: string;
143
- severity: "info" | "warning" | "critical";
144
- success: boolean;
145
- id: string;
146
- createdAt: string;
147
- organizationId: string;
148
- }>;
149
- /**
150
- * Record a generic audit event.
151
- */
152
- record(category: string, action: string, context: AuditContext): Promise<{
153
- description?: string | undefined;
154
- userId?: string | undefined;
155
- userRealm?: string | undefined;
156
- userEmail?: string | undefined;
157
- resourceType?: string | undefined;
158
- resourceId?: string | undefined;
159
- metadata?: Record<string, any> | undefined;
160
- ipAddress?: string | undefined;
161
- userAgent?: string | undefined;
162
- sessionId?: string | undefined;
163
- requestId?: string | undefined;
164
- errorMessage?: string | undefined;
165
- type: string;
166
- action: string;
167
- severity: "info" | "warning" | "critical";
168
- success: boolean;
169
- id: string;
170
- createdAt: string;
171
- organizationId: string;
172
- }>;
103
+ readonly user: import("alepha/api/audits").AuditPrimitive;
173
104
  }
174
105
  //#endregion
175
106
  //#region ../../src/api/users/buckets/UserBuckets.d.ts
@@ -186,7 +117,7 @@ declare class UserBuckets {
186
117
  /**
187
118
  * Bucket for user avatar storage.
188
119
  */
189
- readonly avatars: _$alepha_bucket0.BucketPrimitive;
120
+ readonly avatars: import("alepha/bucket").BucketPrimitive;
190
121
  }
191
122
  //#endregion
192
123
  //#region ../../src/orm/core/schemas/insertSchema.d.ts
@@ -944,7 +875,7 @@ type PgRelation<Base extends TObject> = {
944
875
  schema: TObject;
945
876
  name: string;
946
877
  };
947
- on: SQLWrapper | [keyof Static<Base>, {
878
+ on: SQLWrapper | readonly [keyof Static<Base>, {
948
879
  name: string;
949
880
  }];
950
881
  with?: PgRelationMap<TObject>;
@@ -1154,13 +1085,13 @@ declare class DbCacheProvider {
1154
1085
  * the engine behind that call.
1155
1086
  */
1156
1087
  declare class SequenceProvider {
1157
- protected readonly repository: Repository$1<_$typebox.TObject<{
1158
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1159
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1160
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1161
- name: _$typebox.TString;
1162
- scope: _$typebox.TString;
1163
- value: _$typebox.TInteger;
1088
+ protected readonly repository: Repository$1<import("typebox").TObject<{
1089
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1090
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1091
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1092
+ name: import("typebox").TString;
1093
+ scope: import("typebox").TString;
1094
+ value: import("typebox").TInteger;
1164
1095
  }>>;
1165
1096
  protected readonly crypto: CryptoProvider$1;
1166
1097
  /**
@@ -1298,7 +1229,7 @@ declare abstract class ModelBuilder {
1298
1229
  //#endregion
1299
1230
  //#region ../../src/orm/core/providers/DrizzleKitProvider.d.ts
1300
1231
  declare class DrizzleKitProvider {
1301
- protected readonly log: _$alepha_logger0.Logger;
1232
+ protected readonly log: import("alepha/logger").Logger;
1302
1233
  protected readonly dateTime: DateTimeProvider;
1303
1234
  protected readonly alepha: Alepha;
1304
1235
  /**
@@ -1390,7 +1321,7 @@ type SQLLike = SQLWrapper | string;
1390
1321
  declare abstract class DatabaseProvider {
1391
1322
  protected readonly alepha: Alepha;
1392
1323
  protected readonly dateTime: DateTimeProvider;
1393
- protected readonly log: _$alepha_logger0.Logger;
1324
+ protected readonly log: import("alepha/logger").Logger;
1394
1325
  protected abstract readonly builder: ModelBuilder;
1395
1326
  protected readonly kit: DrizzleKitProvider;
1396
1327
  abstract readonly db: PgDatabase<any>;
@@ -1547,7 +1478,7 @@ declare class QueryManager {
1547
1478
  createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
1548
1479
  column: string;
1549
1480
  direction: "asc" | "desc";
1550
- }>): _$alepha.Page<T>;
1481
+ }>): import("alepha").Page<T>;
1551
1482
  }
1552
1483
  interface PgJoin {
1553
1484
  table: string;
@@ -1582,7 +1513,7 @@ declare class PgRelationManager {
1582
1513
  declare abstract class Repository$1<T extends TObject> {
1583
1514
  readonly entity: EntityPrimitive<T>;
1584
1515
  readonly provider: DatabaseProvider;
1585
- protected readonly log: _$alepha_logger0.Logger;
1516
+ protected readonly log: import("alepha/logger").Logger;
1586
1517
  protected readonly relationManager: PgRelationManager;
1587
1518
  protected readonly queryManager: QueryManager;
1588
1519
  protected readonly dateTimeProvider: DateTimeProvider;
@@ -1656,15 +1587,15 @@ declare abstract class Repository$1<T extends TObject> {
1656
1587
  /**
1657
1588
  * Start a SELECT query on the table.
1658
1589
  */
1659
- protected rawSelect(opts?: StatementOptions): _$drizzle_orm_pg_core0.PgSelectBase<string, Record<string, PgColumn<_$drizzle_orm0.ColumnBaseConfig<_$drizzle_orm0.ColumnDataType, string>, {}, {}>>, "single", Record<string, "not-null">, false, never, {
1590
+ protected rawSelect(opts?: StatementOptions): import("drizzle-orm/pg-core").PgSelectBase<string, Record<string, PgColumn<import("drizzle-orm").ColumnBaseConfig<import("drizzle-orm").ColumnDataType, string>, {}, {}>>, "single", Record<string, "not-null">, false, never, {
1660
1591
  [x: string]: unknown;
1661
1592
  }[], {
1662
- [x: string]: PgColumn<_$drizzle_orm0.ColumnBaseConfig<_$drizzle_orm0.ColumnDataType, string>, {}, {}>;
1593
+ [x: string]: PgColumn<import("drizzle-orm").ColumnBaseConfig<import("drizzle-orm").ColumnDataType, string>, {}, {}>;
1663
1594
  }>;
1664
1595
  /**
1665
1596
  * Start a SELECT DISTINCT query on the table.
1666
1597
  */
1667
- protected rawSelectDistinct(opts?: StatementOptions, columns?: (keyof Static<T>)[]): _$drizzle_orm_pg_core0.PgSelectBase<string, Record<string, any>, "partial", Record<string, "not-null">, false, never, {
1598
+ protected rawSelectDistinct(opts?: StatementOptions, columns?: (keyof Static<T>)[]): import("drizzle-orm/pg-core").PgSelectBase<string, Record<string, any>, "partial", Record<string, "not-null">, false, never, {
1668
1599
  [x: string]: any;
1669
1600
  }[], {
1670
1601
  [x: string]: any;
@@ -1672,15 +1603,15 @@ declare abstract class Repository$1<T extends TObject> {
1672
1603
  /**
1673
1604
  * Start an INSERT query on the table.
1674
1605
  */
1675
- protected rawInsert(opts?: StatementOptions): _$drizzle_orm_pg_core0.PgInsertBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any, false>;
1606
+ protected rawInsert(opts?: StatementOptions): import("drizzle-orm/pg-core").PgInsertBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any, false>;
1676
1607
  /**
1677
1608
  * Start an UPDATE query on the table.
1678
1609
  */
1679
- protected rawUpdate(opts?: StatementOptions): _$drizzle_orm_pg_core0.PgUpdateBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any>;
1610
+ protected rawUpdate(opts?: StatementOptions): import("drizzle-orm/pg-core").PgUpdateBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any>;
1680
1611
  /**
1681
1612
  * Start a DELETE query on the table.
1682
1613
  */
1683
- protected rawDelete(opts?: StatementOptions): _$drizzle_orm_pg_core0.PgDeleteBase<PgTableWithColumns<SchemaToTableConfig<T>>, any, undefined, undefined, false, never>;
1614
+ protected rawDelete(opts?: StatementOptions): import("drizzle-orm/pg-core").PgDeleteBase<PgTableWithColumns<SchemaToTableConfig<T>>, any, undefined, undefined, false, never>;
1684
1615
  /**
1685
1616
  * Create a Drizzle `select` query based on a JSON query object.
1686
1617
  *
@@ -1709,12 +1640,30 @@ declare abstract class Repository$1<T extends TObject> {
1709
1640
  }): Promise<Page<PgStatic<T, R>>>;
1710
1641
  /**
1711
1642
  * Find an entity by ID. Returns `undefined` if not found.
1643
+ *
1644
+ * Pass `with` to eager-load relations on the result — same `with` map
1645
+ * shape as `findOne` / `paginate`. Without `with`, returns the plain
1646
+ * row.
1647
+ *
1648
+ * @example
1649
+ * ```ts
1650
+ * const session = await sessions.findById(id, {
1651
+ * with: { user: { join: users, on: ["userId", users.cols.id] as const } },
1652
+ * });
1653
+ * session?.user?.email;
1654
+ * ```
1712
1655
  */
1713
- findById(id: string | number, opts?: StatementOptions): Promise<Static<T> | undefined>;
1656
+ findById<R extends PgRelationMap<T>>(id: string | number, opts?: StatementOptions & {
1657
+ with?: R;
1658
+ }): Promise<PgStatic<T, R> | undefined>;
1714
1659
  /**
1715
1660
  * Find an entity by ID. Throws `DbEntityNotFoundError` if not found.
1661
+ *
1662
+ * Pass `with` to eager-load relations — see {@link findById}.
1716
1663
  */
1717
- getById(id: string | number, opts?: StatementOptions): Promise<Static<T>>;
1664
+ getById<R extends PgRelationMap<T>>(id: string | number, opts?: StatementOptions & {
1665
+ with?: R;
1666
+ }): Promise<PgStatic<T, R>>;
1718
1667
  /**
1719
1668
  * Helper to create a type-safe query object.
1720
1669
  */
@@ -1915,7 +1864,7 @@ declare abstract class Repository$1<T extends TObject> {
1915
1864
  */
1916
1865
  protected getPrimaryKey(schema: TObject): {
1917
1866
  key: string;
1918
- col: PgColumn<_$drizzle_orm0.ColumnBaseConfig<_$drizzle_orm0.ColumnDataType, string>, {}, {}>;
1867
+ col: PgColumn<import("drizzle-orm").ColumnBaseConfig<import("drizzle-orm").ColumnDataType, string>, {}, {}>;
1919
1868
  type: TSchema;
1920
1869
  };
1921
1870
  }
@@ -1984,8 +1933,8 @@ type WithSQL<T> = { [P in keyof T]?: T[P] | SQL };
1984
1933
  * - `d1://BINDING_NAME` — Cloudflare D1
1985
1934
  * - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
1986
1935
  */
1987
- declare const databaseEnvSchema: _$typebox.TObject<{
1988
- DATABASE_URL: _$typebox.TOptional<_$typebox.TString>;
1936
+ declare const databaseEnvSchema: import("typebox").TObject<{
1937
+ DATABASE_URL: import("typebox").TOptional<import("typebox").TString>;
1989
1938
  /**
1990
1939
  * Enable or disable push-based schema synchronization (drizzle-kit push).
1991
1940
  *
@@ -1993,34 +1942,34 @@ declare const databaseEnvSchema: _$typebox.TObject<{
1993
1942
  * Set to `false` in development to skip automatic schema sync
1994
1943
  * (e.g. when managing migrations manually).
1995
1944
  */
1996
- DATABASE_SYNC: _$typebox.TOptional<_$typebox.TBoolean>;
1945
+ DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
1997
1946
  }>;
1998
1947
  declare module "alepha" {
1999
1948
  interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
2000
1949
  } //# sourceMappingURL=databaseEnvSchema.d.ts.map
2001
1950
  //#endregion
2002
1951
  //#region ../../src/api/users/entities/identities.d.ts
2003
- declare const identities: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
2004
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2005
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2006
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2007
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2008
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
2009
- password: _$typebox.TOptional<_$typebox.TString>;
2010
- provider: _$typebox.TString;
2011
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
2012
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
1952
+ declare const identities: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
1953
+ 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>;
1954
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
1955
+ 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>;
1956
+ 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>;
1957
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
1958
+ password: import("typebox").TOptional<import("typebox").TString>;
1959
+ provider: import("typebox").TString;
1960
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
1961
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
2013
1962
  }>>;
2014
1963
  type IdentityEntity = Static<typeof identities.schema>;
2015
1964
  //#endregion
2016
1965
  //#region ../../src/api/users/entities/sessions.d.ts
2017
- declare const sessions: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
2018
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2019
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2020
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2021
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2022
- refreshToken: _$typebox.TString;
2023
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
1966
+ declare const sessions: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
1967
+ 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>;
1968
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
1969
+ 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>;
1970
+ 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>;
1971
+ refreshToken: import("typebox").TString;
1972
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
2024
1973
  /**
2025
1974
  * OAuth client this session was minted for, when it was created via the
2026
1975
  * OAuth 2.1 authorization flow — the `client_id` of an `oauth_clients`
@@ -2028,41 +1977,48 @@ declare const sessions: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
2028
1977
  * key: `sessions` is a core entity and must not depend on the optional
2029
1978
  * OAuth module's table; the join to `oauth_clients` is done at query time.
2030
1979
  */
2031
- clientId: _$typebox.TOptional<_$typebox.TString>;
2032
- expiresAt: _$typebox.TString;
1980
+ clientId: import("typebox").TOptional<import("typebox").TString>;
1981
+ expiresAt: import("typebox").TString;
2033
1982
  /**
2034
1983
  * Last time the session was used to refresh an access token.
2035
1984
  * Used by realm `refreshToken.expirationIdle` to invalidate idle sessions.
2036
1985
  * `null` on existing rows pre-migration — falls back to `createdAt`.
2037
1986
  */
2038
- lastUsedAt: _$typebox.TOptional<_$typebox.TString>;
2039
- ip: _$typebox.TOptional<_$typebox.TString>;
2040
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
2041
- os: _$typebox.TString;
2042
- browser: _$typebox.TString;
2043
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1987
+ lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
1988
+ ip: import("typebox").TOptional<import("typebox").TString>;
1989
+ /**
1990
+ * ISO 3166-1 alpha-2 country code derived from the request geo headers
1991
+ * (`cf-ipcountry` on Cloudflare, CDN equivalents elsewhere) at login time.
1992
+ * `null` on pre-migration rows and where geo isn't available.
1993
+ */
1994
+ country: import("typebox").TOptional<import("typebox").TString>;
1995
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
1996
+ os: import("typebox").TString;
1997
+ browser: import("typebox").TString;
1998
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2044
1999
  }>>;
2045
2000
  }>>;
2046
2001
  type SessionEntity = Static<typeof sessions.schema>;
2047
2002
  //#endregion
2048
2003
  //#region ../../src/api/users/entities/users.d.ts
2049
2004
  declare const DEFAULT_USER_REALM_NAME = "default";
2050
- declare const users: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
2051
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2052
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2053
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2054
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2055
- realm: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
2056
- username: _$typebox.TOptional<_$typebox.TString>;
2057
- email: _$typebox.TOptional<_$typebox.TString>;
2058
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2059
- roles: _$alepha_orm0.PgAttr<_$typebox.TArray<_$typebox.TString>, typeof _$alepha_orm0.PG_DEFAULT>;
2060
- firstName: _$typebox.TOptional<_$typebox.TString>;
2061
- lastName: _$typebox.TOptional<_$typebox.TString>;
2062
- picture: _$typebox.TOptional<_$typebox.TString>;
2063
- enabled: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
2064
- emailVerified: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
2065
- organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
2005
+ declare const users: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
2006
+ 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>;
2007
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2008
+ 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>;
2009
+ 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>;
2010
+ realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
2011
+ username: import("typebox").TOptional<import("typebox").TString>;
2012
+ email: import("typebox").TOptional<import("typebox").TString>;
2013
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2014
+ roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
2015
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2016
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2017
+ picture: import("typebox").TOptional<import("typebox").TString>;
2018
+ enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
2019
+ emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
2020
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2021
+ organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
2066
2022
  }>>;
2067
2023
  type UserEntity = Static<typeof users.schema>;
2068
2024
  //#endregion
@@ -2200,50 +2156,52 @@ interface Realm {
2200
2156
  }
2201
2157
  declare class RealmProvider {
2202
2158
  protected readonly alepha: Alepha;
2203
- protected readonly defaultIdentities: Repository<_$typebox.TObject<{
2204
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2205
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2206
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2207
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2208
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
2209
- password: _$typebox.TOptional<_$typebox.TString>;
2210
- provider: _$typebox.TString;
2211
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
2212
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
2159
+ protected readonly defaultIdentities: Repository<import("typebox").TObject<{
2160
+ 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>;
2161
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2162
+ 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>;
2163
+ 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>;
2164
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
2165
+ password: import("typebox").TOptional<import("typebox").TString>;
2166
+ provider: import("typebox").TString;
2167
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
2168
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
2213
2169
  }>>;
2214
- protected readonly defaultSessions: Repository<_$typebox.TObject<{
2215
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2216
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2217
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2218
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2219
- refreshToken: _$typebox.TString;
2220
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
2221
- clientId: _$typebox.TOptional<_$typebox.TString>;
2222
- expiresAt: _$typebox.TString;
2223
- lastUsedAt: _$typebox.TOptional<_$typebox.TString>;
2224
- ip: _$typebox.TOptional<_$typebox.TString>;
2225
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
2226
- os: _$typebox.TString;
2227
- browser: _$typebox.TString;
2228
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2170
+ protected readonly defaultSessions: Repository<import("typebox").TObject<{
2171
+ 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>;
2172
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2173
+ 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>;
2174
+ 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>;
2175
+ refreshToken: import("typebox").TString;
2176
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
2177
+ clientId: import("typebox").TOptional<import("typebox").TString>;
2178
+ expiresAt: import("typebox").TString;
2179
+ lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
2180
+ ip: import("typebox").TOptional<import("typebox").TString>;
2181
+ country: import("typebox").TOptional<import("typebox").TString>;
2182
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
2183
+ os: import("typebox").TString;
2184
+ browser: import("typebox").TString;
2185
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2229
2186
  }>>;
2230
2187
  }>>;
2231
- protected readonly defaultUsers: Repository<_$typebox.TObject<{
2232
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2233
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2234
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2235
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2236
- realm: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
2237
- username: _$typebox.TOptional<_$typebox.TString>;
2238
- email: _$typebox.TOptional<_$typebox.TString>;
2239
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2240
- roles: _$alepha_orm0.PgAttr<_$typebox.TArray<_$typebox.TString>, typeof _$alepha_orm0.PG_DEFAULT>;
2241
- firstName: _$typebox.TOptional<_$typebox.TString>;
2242
- lastName: _$typebox.TOptional<_$typebox.TString>;
2243
- picture: _$typebox.TOptional<_$typebox.TString>;
2244
- enabled: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
2245
- emailVerified: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
2246
- organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
2188
+ protected readonly defaultUsers: Repository<import("typebox").TObject<{
2189
+ 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>;
2190
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2191
+ 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>;
2192
+ 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>;
2193
+ realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
2194
+ username: import("typebox").TOptional<import("typebox").TString>;
2195
+ email: import("typebox").TOptional<import("typebox").TString>;
2196
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2197
+ roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
2198
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2199
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2200
+ picture: import("typebox").TOptional<import("typebox").TString>;
2201
+ enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
2202
+ emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
2203
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2204
+ organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
2247
2205
  }>>;
2248
2206
  protected realms: Map<string, Realm>;
2249
2207
  register(realmName: string, realmOptions?: RealmOptions): Realm;
@@ -2257,31 +2215,31 @@ declare class RealmProvider {
2257
2215
  }
2258
2216
  //#endregion
2259
2217
  //#region ../../src/api/users/schemas/identityQuerySchema.d.ts
2260
- declare const identityQuerySchema: _$typebox.TObject<{
2261
- page: _$typebox.TOptional<_$typebox.TInteger>;
2262
- size: _$typebox.TOptional<_$typebox.TInteger>;
2263
- sort: _$typebox.TOptional<_$typebox.TString>;
2264
- userId: _$typebox.TOptional<_$typebox.TString>;
2265
- provider: _$typebox.TOptional<_$typebox.TString>;
2218
+ declare const identityQuerySchema: import("typebox").TObject<{
2219
+ page: import("typebox").TOptional<import("typebox").TInteger>;
2220
+ size: import("typebox").TOptional<import("typebox").TInteger>;
2221
+ sort: import("typebox").TOptional<import("typebox").TString>;
2222
+ userId: import("typebox").TOptional<import("typebox").TString>;
2223
+ provider: import("typebox").TOptional<import("typebox").TString>;
2266
2224
  }>;
2267
2225
  type IdentityQuery = Static<typeof identityQuerySchema>;
2268
2226
  //#endregion
2269
2227
  //#region ../../src/api/users/services/IdentityService.d.ts
2270
2228
  declare class IdentityService {
2271
2229
  protected readonly alepha: Alepha;
2272
- protected readonly log: _$alepha_logger0.Logger;
2230
+ protected readonly log: import("alepha/logger").Logger;
2273
2231
  protected readonly realmProvider: RealmProvider;
2274
2232
  protected userAudits(realmName?: string): UserAudits | undefined;
2275
- identities(userRealmName?: string): _$alepha_orm0.Repository<_$typebox.TObject<{
2276
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2277
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2278
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2279
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2280
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
2281
- password: _$typebox.TOptional<_$typebox.TString>;
2282
- provider: _$typebox.TString;
2283
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
2284
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
2233
+ identities(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
2234
+ 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>;
2235
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2236
+ 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>;
2237
+ 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>;
2238
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
2239
+ password: import("typebox").TOptional<import("typebox").TString>;
2240
+ provider: import("typebox").TString;
2241
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
2242
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
2285
2243
  }>>;
2286
2244
  /**
2287
2245
  * Find identities with pagination and filtering.
@@ -2305,93 +2263,94 @@ declare class AdminIdentityController {
2305
2263
  /**
2306
2264
  * Find identities with pagination and filtering.
2307
2265
  */
2308
- readonly findIdentities: _$alepha_server0.ActionPrimitiveFn<{
2309
- query: _$typebox.TObject<{
2310
- page: _$typebox.TOptional<_$typebox.TInteger>;
2311
- size: _$typebox.TOptional<_$typebox.TInteger>;
2312
- sort: _$typebox.TOptional<_$typebox.TString>;
2313
- userId: _$typebox.TOptional<_$typebox.TString>;
2314
- provider: _$typebox.TOptional<_$typebox.TString>;
2315
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2316
- }>;
2317
- response: _$alepha.TPage<_$typebox.TObject<{
2318
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
2319
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2320
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2321
- provider: _$typebox.TString;
2322
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2323
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2324
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
2325
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
2266
+ readonly findIdentities: import("alepha/server").ActionPrimitiveFn<{
2267
+ query: import("typebox").TObject<{
2268
+ page: import("typebox").TOptional<import("typebox").TInteger>;
2269
+ size: import("typebox").TOptional<import("typebox").TInteger>;
2270
+ sort: import("typebox").TOptional<import("typebox").TString>;
2271
+ userId: import("typebox").TOptional<import("typebox").TString>;
2272
+ provider: import("typebox").TOptional<import("typebox").TString>;
2273
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2274
+ }>;
2275
+ response: import("alepha").TPage<import("typebox").TObject<{
2276
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2277
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2278
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2279
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2280
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
2281
+ provider: import("typebox").TString;
2282
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
2283
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
2326
2284
  }>>;
2327
2285
  }>;
2328
2286
  /**
2329
2287
  * Get an identity by ID.
2330
2288
  */
2331
- readonly getIdentity: _$alepha_server0.ActionPrimitiveFn<{
2332
- params: _$typebox.TObject<{
2333
- id: _$typebox.TString;
2289
+ readonly getIdentity: import("alepha/server").ActionPrimitiveFn<{
2290
+ params: import("typebox").TObject<{
2291
+ id: import("typebox").TString;
2334
2292
  }>;
2335
- query: _$typebox.TObject<{
2336
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2293
+ query: import("typebox").TObject<{
2294
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2337
2295
  }>;
2338
- response: _$typebox.TObject<{
2339
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
2340
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2341
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2342
- provider: _$typebox.TString;
2343
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2344
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2345
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
2346
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
2296
+ response: import("typebox").TObject<{
2297
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2298
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2299
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2300
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2301
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
2302
+ provider: import("typebox").TString;
2303
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
2304
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
2347
2305
  }>;
2348
2306
  }>;
2349
2307
  /**
2350
2308
  * Delete an identity.
2351
2309
  */
2352
- readonly deleteIdentity: _$alepha_server0.ActionPrimitiveFn<{
2353
- params: _$typebox.TObject<{
2354
- id: _$typebox.TString;
2310
+ readonly deleteIdentity: import("alepha/server").ActionPrimitiveFn<{
2311
+ params: import("typebox").TObject<{
2312
+ id: import("typebox").TString;
2355
2313
  }>;
2356
- query: _$typebox.TObject<{
2357
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2314
+ query: import("typebox").TObject<{
2315
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2358
2316
  }>;
2359
- response: _$typebox.TObject<{
2360
- ok: _$typebox.TBoolean;
2361
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
2362
- count: _$typebox.TOptional<_$typebox.TNumber>;
2317
+ response: import("typebox").TObject<{
2318
+ ok: import("typebox").TBoolean;
2319
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
2320
+ count: import("typebox").TOptional<import("typebox").TNumber>;
2363
2321
  }>;
2364
2322
  }>;
2365
2323
  }
2366
2324
  //#endregion
2367
2325
  //#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
2368
- declare const sessionQuerySchema: _$typebox.TObject<{
2369
- page: _$typebox.TOptional<_$typebox.TInteger>;
2370
- size: _$typebox.TOptional<_$typebox.TInteger>;
2371
- sort: _$typebox.TOptional<_$typebox.TString>;
2372
- userId: _$typebox.TOptional<_$typebox.TString>;
2326
+ declare const sessionQuerySchema: import("typebox").TObject<{
2327
+ page: import("typebox").TOptional<import("typebox").TInteger>;
2328
+ size: import("typebox").TOptional<import("typebox").TInteger>;
2329
+ sort: import("typebox").TOptional<import("typebox").TString>;
2330
+ userId: import("typebox").TOptional<import("typebox").TString>;
2373
2331
  }>;
2374
2332
  type SessionQuery = Static<typeof sessionQuerySchema>;
2375
2333
  //#endregion
2376
2334
  //#region ../../src/api/users/services/SessionCrudService.d.ts
2377
2335
  declare class SessionCrudService {
2378
- protected readonly log: _$alepha_logger0.Logger;
2336
+ protected readonly log: import("alepha/logger").Logger;
2379
2337
  protected readonly realmProvider: RealmProvider;
2380
- sessions(userRealmName?: string): _$alepha_orm0.Repository<_$typebox.TObject<{
2381
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2382
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2383
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2384
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2385
- refreshToken: _$typebox.TString;
2386
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
2387
- clientId: _$typebox.TOptional<_$typebox.TString>;
2388
- expiresAt: _$typebox.TString;
2389
- lastUsedAt: _$typebox.TOptional<_$typebox.TString>;
2390
- ip: _$typebox.TOptional<_$typebox.TString>;
2391
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
2392
- os: _$typebox.TString;
2393
- browser: _$typebox.TString;
2394
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2338
+ sessions(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
2339
+ 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>;
2340
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2341
+ 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>;
2342
+ 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>;
2343
+ refreshToken: import("typebox").TString;
2344
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
2345
+ clientId: import("typebox").TOptional<import("typebox").TString>;
2346
+ expiresAt: import("typebox").TString;
2347
+ lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
2348
+ ip: import("typebox").TOptional<import("typebox").TString>;
2349
+ country: import("typebox").TOptional<import("typebox").TString>;
2350
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
2351
+ os: import("typebox").TString;
2352
+ browser: import("typebox").TString;
2353
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2395
2354
  }>>;
2396
2355
  }>>;
2397
2356
  /**
@@ -2420,190 +2379,213 @@ declare class AdminSessionController {
2420
2379
  /**
2421
2380
  * Find sessions with pagination and filtering.
2422
2381
  */
2423
- readonly findSessions: _$alepha_server0.ActionPrimitiveFn<{
2424
- query: _$typebox.TObject<{
2425
- page: _$typebox.TOptional<_$typebox.TInteger>;
2426
- size: _$typebox.TOptional<_$typebox.TInteger>;
2427
- sort: _$typebox.TOptional<_$typebox.TString>;
2428
- userId: _$typebox.TOptional<_$typebox.TString>;
2429
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2430
- }>;
2431
- response: _$alepha.TPage<_$typebox.TObject<{
2432
- id: _$typebox.TString;
2433
- version: _$typebox.TNumber;
2434
- createdAt: _$typebox.TString;
2435
- updatedAt: _$typebox.TString;
2436
- refreshToken: _$typebox.TString;
2437
- userId: _$typebox.TString;
2438
- expiresAt: _$typebox.TString;
2439
- ip: _$typebox.TOptional<_$typebox.TString>;
2440
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
2441
- os: _$typebox.TString;
2442
- browser: _$typebox.TString;
2443
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2382
+ readonly findSessions: import("alepha/server").ActionPrimitiveFn<{
2383
+ query: import("typebox").TObject<{
2384
+ page: import("typebox").TOptional<import("typebox").TInteger>;
2385
+ size: import("typebox").TOptional<import("typebox").TInteger>;
2386
+ sort: import("typebox").TOptional<import("typebox").TString>;
2387
+ userId: import("typebox").TOptional<import("typebox").TString>;
2388
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2389
+ }>;
2390
+ response: import("alepha").TPage<import("typebox").TObject<{
2391
+ id: import("typebox").TString;
2392
+ version: import("typebox").TNumber;
2393
+ createdAt: import("typebox").TString;
2394
+ updatedAt: import("typebox").TString;
2395
+ refreshToken: import("typebox").TString;
2396
+ userId: import("typebox").TString;
2397
+ expiresAt: import("typebox").TString;
2398
+ ip: import("typebox").TOptional<import("typebox").TString>;
2399
+ country: import("typebox").TOptional<import("typebox").TString>;
2400
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
2401
+ os: import("typebox").TString;
2402
+ browser: import("typebox").TString;
2403
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2404
+ }>>;
2405
+ user: import("typebox").TOptional<import("typebox").TObject<{
2406
+ id: import("typebox").TString;
2407
+ email: import("typebox").TOptional<import("typebox").TString>;
2408
+ username: import("typebox").TOptional<import("typebox").TString>;
2409
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2410
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2444
2411
  }>>;
2445
2412
  }>>;
2446
2413
  }>;
2447
2414
  /**
2448
2415
  * Get a session by ID.
2449
2416
  */
2450
- readonly getSession: _$alepha_server0.ActionPrimitiveFn<{
2451
- params: _$typebox.TObject<{
2452
- id: _$typebox.TString;
2453
- }>;
2454
- query: _$typebox.TObject<{
2455
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2456
- }>;
2457
- response: _$typebox.TObject<{
2458
- id: _$typebox.TString;
2459
- version: _$typebox.TNumber;
2460
- createdAt: _$typebox.TString;
2461
- updatedAt: _$typebox.TString;
2462
- refreshToken: _$typebox.TString;
2463
- userId: _$typebox.TString;
2464
- expiresAt: _$typebox.TString;
2465
- ip: _$typebox.TOptional<_$typebox.TString>;
2466
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
2467
- os: _$typebox.TString;
2468
- browser: _$typebox.TString;
2469
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2417
+ readonly getSession: import("alepha/server").ActionPrimitiveFn<{
2418
+ params: import("typebox").TObject<{
2419
+ id: import("typebox").TString;
2420
+ }>;
2421
+ query: import("typebox").TObject<{
2422
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2423
+ }>;
2424
+ response: import("typebox").TObject<{
2425
+ id: import("typebox").TString;
2426
+ version: import("typebox").TNumber;
2427
+ createdAt: import("typebox").TString;
2428
+ updatedAt: import("typebox").TString;
2429
+ refreshToken: import("typebox").TString;
2430
+ userId: import("typebox").TString;
2431
+ expiresAt: import("typebox").TString;
2432
+ ip: import("typebox").TOptional<import("typebox").TString>;
2433
+ country: import("typebox").TOptional<import("typebox").TString>;
2434
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
2435
+ os: import("typebox").TString;
2436
+ browser: import("typebox").TString;
2437
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2438
+ }>>;
2439
+ user: import("typebox").TOptional<import("typebox").TObject<{
2440
+ id: import("typebox").TString;
2441
+ email: import("typebox").TOptional<import("typebox").TString>;
2442
+ username: import("typebox").TOptional<import("typebox").TString>;
2443
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2444
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2470
2445
  }>>;
2471
2446
  }>;
2472
2447
  }>;
2473
2448
  /**
2474
2449
  * Delete a session.
2475
2450
  */
2476
- readonly deleteSession: _$alepha_server0.ActionPrimitiveFn<{
2477
- params: _$typebox.TObject<{
2478
- id: _$typebox.TString;
2451
+ readonly deleteSession: import("alepha/server").ActionPrimitiveFn<{
2452
+ params: import("typebox").TObject<{
2453
+ id: import("typebox").TString;
2479
2454
  }>;
2480
- query: _$typebox.TObject<{
2481
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2455
+ query: import("typebox").TObject<{
2456
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2482
2457
  }>;
2483
- response: _$typebox.TObject<{
2484
- ok: _$typebox.TBoolean;
2485
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
2486
- count: _$typebox.TOptional<_$typebox.TNumber>;
2458
+ response: import("typebox").TObject<{
2459
+ ok: import("typebox").TBoolean;
2460
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
2461
+ count: import("typebox").TOptional<import("typebox").TNumber>;
2487
2462
  }>;
2488
2463
  }>;
2489
2464
  /**
2490
2465
  * Delete many sessions in one repository call.
2491
2466
  */
2492
- readonly deleteSessions: _$alepha_server0.ActionPrimitiveFn<{
2493
- query: _$typebox.TObject<{
2494
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2467
+ readonly deleteSessions: import("alepha/server").ActionPrimitiveFn<{
2468
+ query: import("typebox").TObject<{
2469
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2495
2470
  }>;
2496
- body: _$typebox.TObject<{
2497
- ids: _$typebox.TArray<_$typebox.TString>;
2471
+ body: import("typebox").TObject<{
2472
+ ids: import("typebox").TArray<import("typebox").TString>;
2498
2473
  }>;
2499
- response: _$typebox.TObject<{
2500
- deleted: _$typebox.TArray<_$typebox.TString>;
2474
+ response: import("typebox").TObject<{
2475
+ deleted: import("typebox").TArray<import("typebox").TString>;
2501
2476
  }>;
2502
2477
  }>;
2503
2478
  }
2504
2479
  //#endregion
2505
2480
  //#region ../../src/api/users/notifications/UserNotifications.d.ts
2506
2481
  declare class UserNotifications {
2507
- readonly passwordReset: _$alepha_api_notifications0.NotificationPrimitive<_$typebox.TObject<{
2508
- email: _$typebox.TString;
2509
- code: _$typebox.TString;
2510
- expiresInMinutes: _$typebox.TNumber;
2482
+ readonly passwordReset: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
2483
+ email: import("typebox").TString;
2484
+ code: import("typebox").TString;
2485
+ expiresInMinutes: import("typebox").TNumber;
2511
2486
  }>>;
2512
- readonly emailVerification: _$alepha_api_notifications0.NotificationPrimitive<_$typebox.TObject<{
2513
- email: _$typebox.TString;
2514
- code: _$typebox.TString;
2515
- expiresInMinutes: _$typebox.TNumber;
2487
+ readonly emailVerification: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
2488
+ email: import("typebox").TString;
2489
+ code: import("typebox").TString;
2490
+ expiresInMinutes: import("typebox").TNumber;
2516
2491
  }>>;
2517
- readonly phoneVerification: _$alepha_api_notifications0.NotificationPrimitive<_$typebox.TObject<{
2518
- phoneNumber: _$typebox.TString;
2519
- code: _$typebox.TString;
2520
- expiresInMinutes: _$typebox.TNumber;
2492
+ readonly phoneVerification: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
2493
+ phoneNumber: import("typebox").TString;
2494
+ code: import("typebox").TString;
2495
+ expiresInMinutes: import("typebox").TNumber;
2521
2496
  }>>;
2522
- readonly passwordResetLink: _$alepha_api_notifications0.NotificationPrimitive<_$typebox.TObject<{
2523
- email: _$typebox.TString;
2524
- resetUrl: _$typebox.TString;
2525
- expiresInMinutes: _$typebox.TNumber;
2497
+ readonly passwordResetLink: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
2498
+ email: import("typebox").TString;
2499
+ resetUrl: import("typebox").TString;
2500
+ expiresInMinutes: import("typebox").TNumber;
2526
2501
  }>>;
2527
- readonly accountLockout: _$alepha_api_notifications0.NotificationPrimitive<_$typebox.TObject<{
2528
- email: _$typebox.TString;
2529
- lockoutMinutes: _$typebox.TNumber;
2502
+ readonly accountLockout: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
2503
+ email: import("typebox").TString;
2504
+ lockoutMinutes: import("typebox").TNumber;
2530
2505
  }>>;
2531
- readonly emailVerificationLink: _$alepha_api_notifications0.NotificationPrimitive<_$typebox.TObject<{
2532
- email: _$typebox.TString;
2533
- verifyUrl: _$typebox.TString;
2534
- expiresInMinutes: _$typebox.TNumber;
2506
+ readonly emailVerificationLink: import("alepha/api/notifications").NotificationPrimitive<import("typebox").TObject<{
2507
+ email: import("typebox").TString;
2508
+ verifyUrl: import("typebox").TString;
2509
+ expiresInMinutes: import("typebox").TNumber;
2535
2510
  }>>;
2536
2511
  }
2537
2512
  //#endregion
2538
2513
  //#region ../../src/api/users/schemas/createUserSchema.d.ts
2539
- declare const createUserSchema: _$typebox.TObject<{
2540
- email: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2541
- id: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2542
- createdAt: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2543
- organizationId: _$typebox.TOptional<PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>>;
2544
- phoneNumber: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2545
- version: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2546
- updatedAt: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2547
- username: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2548
- roles: _$typebox.TOptional<PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>>;
2549
- firstName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2550
- lastName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2551
- picture: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2552
- enabled: _$typebox.TOptional<PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>>;
2553
- emailVerified: _$typebox.TOptional<PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>>;
2514
+ declare const createUserSchema: import("typebox").TObject<{
2515
+ email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2516
+ username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2517
+ phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2518
+ enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2519
+ id: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2520
+ version: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2521
+ createdAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2522
+ updatedAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2523
+ roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
2524
+ firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2525
+ lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2526
+ picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2527
+ emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2528
+ lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2529
+ organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
2554
2530
  }>;
2555
2531
  type CreateUser = Static<typeof createUserSchema>;
2556
2532
  //#endregion
2557
2533
  //#region ../../src/api/users/schemas/updateUserSchema.d.ts
2558
- declare const updateUserSchema: _$typebox.TObject<{
2559
- email: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2560
- organizationId: _$typebox.TOptional<PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>>;
2561
- phoneNumber: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2562
- realm: _$typebox.TOptional<PgAttr<_$typebox.TString, typeof PG_DEFAULT>>;
2563
- roles: _$typebox.TOptional<PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>>;
2564
- firstName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2565
- lastName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2566
- picture: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2567
- enabled: _$typebox.TOptional<PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>>;
2534
+ declare const updateUserSchema: import("typebox").TObject<{
2535
+ email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2536
+ username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2537
+ phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2538
+ enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2539
+ realm: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_DEFAULT>>;
2540
+ roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
2541
+ firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2542
+ lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2543
+ picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2544
+ emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2545
+ lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2546
+ organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
2568
2547
  }>;
2569
2548
  type UpdateUser = Static<typeof updateUserSchema>;
2570
2549
  //#endregion
2571
2550
  //#region ../../src/api/users/schemas/userQuerySchema.d.ts
2572
- declare const userQuerySchema: _$typebox.TObject<{
2573
- page: _$typebox.TOptional<_$typebox.TInteger>;
2574
- size: _$typebox.TOptional<_$typebox.TInteger>;
2575
- sort: _$typebox.TOptional<_$typebox.TString>;
2576
- email: _$typebox.TOptional<_$typebox.TString>;
2577
- enabled: _$typebox.TOptional<_$typebox.TBoolean>;
2578
- emailVerified: _$typebox.TOptional<_$typebox.TBoolean>;
2579
- roles: _$typebox.TOptional<_$typebox.TArray<_$typebox.TString>>;
2551
+ declare const userQuerySchema: import("typebox").TObject<{
2552
+ page: import("typebox").TOptional<import("typebox").TInteger>;
2553
+ size: import("typebox").TOptional<import("typebox").TInteger>;
2554
+ sort: import("typebox").TOptional<import("typebox").TString>;
2555
+ search: import("typebox").TOptional<import("typebox").TString>;
2556
+ email: import("typebox").TOptional<import("typebox").TString>;
2557
+ enabled: import("typebox").TOptional<import("typebox").TBoolean>;
2558
+ emailVerified: import("typebox").TOptional<import("typebox").TBoolean>;
2559
+ roles: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
2580
2560
  }>;
2581
2561
  type UserQuery = Static<typeof userQuerySchema>;
2582
2562
  //#endregion
2583
2563
  //#region ../../src/api/users/services/UserService.d.ts
2584
2564
  declare class UserService {
2585
2565
  protected readonly alepha: Alepha;
2586
- protected readonly log: _$alepha_logger0.Logger;
2587
- protected readonly verificationController: _$alepha_server_links0.HttpVirtualClient<VerificationController>;
2566
+ protected readonly log: import("alepha/logger").Logger;
2567
+ protected readonly verificationController: import("alepha/server/links").HttpVirtualClient<VerificationController>;
2588
2568
  protected readonly realmProvider: RealmProvider;
2569
+ protected readonly cryptoProvider: CryptoProvider;
2589
2570
  protected userAudits(realmName?: string): UserAudits | undefined;
2590
2571
  protected userNotifications(realmName?: string): UserNotifications | undefined;
2591
- users(userRealmName?: string): _$alepha_orm0.Repository<_$typebox.TObject<{
2592
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
2593
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
2594
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2595
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
2596
- realm: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_DEFAULT>;
2597
- username: _$typebox.TOptional<_$typebox.TString>;
2598
- email: _$typebox.TOptional<_$typebox.TString>;
2599
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2600
- roles: _$alepha_orm0.PgAttr<_$typebox.TArray<_$typebox.TString>, typeof _$alepha_orm0.PG_DEFAULT>;
2601
- firstName: _$typebox.TOptional<_$typebox.TString>;
2602
- lastName: _$typebox.TOptional<_$typebox.TString>;
2603
- picture: _$typebox.TOptional<_$typebox.TString>;
2604
- enabled: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
2605
- emailVerified: _$alepha_orm0.PgAttr<_$typebox.TBoolean, typeof _$alepha_orm0.PG_DEFAULT>;
2606
- organizationId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_ORGANIZATION>;
2572
+ users(userRealmName?: string): import("alepha/orm").Repository<import("typebox").TObject<{
2573
+ 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>;
2574
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
2575
+ 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>;
2576
+ 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>;
2577
+ realm: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_DEFAULT>;
2578
+ username: import("typebox").TOptional<import("typebox").TString>;
2579
+ email: import("typebox").TOptional<import("typebox").TString>;
2580
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2581
+ roles: import("alepha/orm").PgAttr<import("typebox").TArray<import("typebox").TString>, typeof import("alepha/orm").PG_DEFAULT>;
2582
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2583
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2584
+ picture: import("typebox").TOptional<import("typebox").TString>;
2585
+ enabled: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
2586
+ emailVerified: import("alepha/orm").PgAttr<import("typebox").TBoolean, typeof import("alepha/orm").PG_DEFAULT>;
2587
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2588
+ organizationId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_ORGANIZATION>;
2607
2589
  }>>;
2608
2590
  /**
2609
2591
  * Request email verification for a user.
@@ -2638,6 +2620,13 @@ declare class UserService {
2638
2620
  * Update an existing user.
2639
2621
  */
2640
2622
  updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
2623
+ /**
2624
+ * Set (or reset) a user's password. Upserts a "credentials" identity
2625
+ * with the new hash. Used by admin password-set flows; does NOT
2626
+ * verify any old password or token — the caller is responsible for
2627
+ * authorization.
2628
+ */
2629
+ setPassword(id: string, newPassword: string, userRealmName?: string): Promise<void>;
2641
2630
  /**
2642
2631
  * Delete a user by ID.
2643
2632
  */
@@ -2649,160 +2638,205 @@ declare class AdminUserController {
2649
2638
  protected readonly url = "/users";
2650
2639
  protected readonly group = "admin:users";
2651
2640
  protected readonly userService: UserService;
2641
+ protected readonly securityProvider: SecurityProvider;
2642
+ /**
2643
+ * List roles available in a realm. Used by the admin UI to render the
2644
+ * role picker and grey out defaults (which cannot be removed).
2645
+ */
2646
+ readonly findRoles: import("alepha/server").ActionPrimitiveFn<{
2647
+ query: import("typebox").TObject<{
2648
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2649
+ }>;
2650
+ response: import("typebox").TArray<import("typebox").TObject<{
2651
+ name: import("typebox").TString;
2652
+ default: import("typebox").TOptional<import("typebox").TBoolean>;
2653
+ description: import("typebox").TOptional<import("typebox").TString>;
2654
+ }>>;
2655
+ }>;
2652
2656
  /**
2653
2657
  * Find users with pagination and filtering.
2654
2658
  */
2655
- readonly findUsers: _$alepha_server0.ActionPrimitiveFn<{
2656
- query: _$typebox.TObject<{
2657
- page: _$typebox.TOptional<_$typebox.TInteger>;
2658
- size: _$typebox.TOptional<_$typebox.TInteger>;
2659
- sort: _$typebox.TOptional<_$typebox.TString>;
2660
- email: _$typebox.TOptional<_$typebox.TString>;
2661
- enabled: _$typebox.TOptional<_$typebox.TBoolean>;
2662
- emailVerified: _$typebox.TOptional<_$typebox.TBoolean>;
2663
- roles: _$typebox.TOptional<_$typebox.TArray<_$typebox.TString>>;
2664
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2665
- }>;
2666
- response: _$alepha.TPage<_$typebox.TObject<{
2667
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2668
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2669
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2670
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2671
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
2672
- username: _$typebox.TOptional<_$typebox.TString>;
2673
- email: _$typebox.TOptional<_$typebox.TString>;
2674
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2675
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
2676
- firstName: _$typebox.TOptional<_$typebox.TString>;
2677
- lastName: _$typebox.TOptional<_$typebox.TString>;
2678
- picture: _$typebox.TOptional<_$typebox.TString>;
2679
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2680
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2681
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
2659
+ readonly findUsers: import("alepha/server").ActionPrimitiveFn<{
2660
+ query: import("typebox").TObject<{
2661
+ page: import("typebox").TOptional<import("typebox").TInteger>;
2662
+ size: import("typebox").TOptional<import("typebox").TInteger>;
2663
+ sort: import("typebox").TOptional<import("typebox").TString>;
2664
+ search: import("typebox").TOptional<import("typebox").TString>;
2665
+ email: import("typebox").TOptional<import("typebox").TString>;
2666
+ enabled: import("typebox").TOptional<import("typebox").TBoolean>;
2667
+ emailVerified: import("typebox").TOptional<import("typebox").TBoolean>;
2668
+ roles: import("typebox").TOptional<import("typebox").TArray<import("typebox").TString>>;
2669
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2670
+ }>;
2671
+ response: import("alepha").TPage<import("typebox").TObject<{
2672
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2673
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2674
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2675
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2676
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
2677
+ username: import("typebox").TOptional<import("typebox").TString>;
2678
+ email: import("typebox").TOptional<import("typebox").TString>;
2679
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2680
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
2681
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2682
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2683
+ picture: import("typebox").TOptional<import("typebox").TString>;
2684
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2685
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2686
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2687
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
2682
2688
  }>>;
2683
2689
  }>;
2684
2690
  /**
2685
2691
  * Get a user by ID.
2686
2692
  */
2687
- readonly getUser: _$alepha_server0.ActionPrimitiveFn<{
2688
- params: _$typebox.TObject<{
2689
- id: _$typebox.TString;
2690
- }>;
2691
- query: _$typebox.TObject<{
2692
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2693
- }>;
2694
- response: _$typebox.TObject<{
2695
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2696
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2697
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2698
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2699
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
2700
- username: _$typebox.TOptional<_$typebox.TString>;
2701
- email: _$typebox.TOptional<_$typebox.TString>;
2702
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2703
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
2704
- firstName: _$typebox.TOptional<_$typebox.TString>;
2705
- lastName: _$typebox.TOptional<_$typebox.TString>;
2706
- picture: _$typebox.TOptional<_$typebox.TString>;
2707
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2708
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2709
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
2693
+ readonly getUser: import("alepha/server").ActionPrimitiveFn<{
2694
+ params: import("typebox").TObject<{
2695
+ id: import("typebox").TString;
2696
+ }>;
2697
+ query: import("typebox").TObject<{
2698
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2699
+ }>;
2700
+ response: import("typebox").TObject<{
2701
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2702
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2703
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2704
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2705
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
2706
+ username: import("typebox").TOptional<import("typebox").TString>;
2707
+ email: import("typebox").TOptional<import("typebox").TString>;
2708
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2709
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
2710
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2711
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2712
+ picture: import("typebox").TOptional<import("typebox").TString>;
2713
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2714
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2715
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2716
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
2710
2717
  }>;
2711
2718
  }>;
2712
2719
  /**
2713
2720
  * Create a new user.
2714
2721
  */
2715
- readonly createUser: _$alepha_server0.ActionPrimitiveFn<{
2716
- query: _$typebox.TObject<{
2717
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2718
- }>;
2719
- body: _$typebox.TObject<{
2720
- email: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2721
- id: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2722
- createdAt: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2723
- organizationId: _$typebox.TOptional<PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>>;
2724
- phoneNumber: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2725
- version: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2726
- updatedAt: _$typebox.TOptional<PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2727
- username: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2728
- roles: _$typebox.TOptional<PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>>;
2729
- firstName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2730
- lastName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2731
- picture: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2732
- enabled: _$typebox.TOptional<PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>>;
2733
- emailVerified: _$typebox.TOptional<PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>>;
2734
- }>;
2735
- response: _$typebox.TObject<{
2736
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2737
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2738
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2739
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2740
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
2741
- username: _$typebox.TOptional<_$typebox.TString>;
2742
- email: _$typebox.TOptional<_$typebox.TString>;
2743
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2744
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
2745
- firstName: _$typebox.TOptional<_$typebox.TString>;
2746
- lastName: _$typebox.TOptional<_$typebox.TString>;
2747
- picture: _$typebox.TOptional<_$typebox.TString>;
2748
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2749
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2750
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
2722
+ readonly createUser: import("alepha/server").ActionPrimitiveFn<{
2723
+ query: import("typebox").TObject<{
2724
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2725
+ }>;
2726
+ body: import("typebox").TObject<{
2727
+ email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2728
+ username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2729
+ phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2730
+ enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2731
+ id: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2732
+ version: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2733
+ createdAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2734
+ updatedAt: import("typebox").TOptional<PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2735
+ roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
2736
+ firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2737
+ lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2738
+ picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2739
+ emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2740
+ lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2741
+ organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
2742
+ }>;
2743
+ response: import("typebox").TObject<{
2744
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2745
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2746
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2747
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2748
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
2749
+ username: import("typebox").TOptional<import("typebox").TString>;
2750
+ email: import("typebox").TOptional<import("typebox").TString>;
2751
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2752
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
2753
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2754
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2755
+ picture: import("typebox").TOptional<import("typebox").TString>;
2756
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2757
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2758
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2759
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
2751
2760
  }>;
2752
2761
  }>;
2753
2762
  /**
2754
2763
  * Update a user.
2755
2764
  */
2756
- readonly updateUser: _$alepha_server0.ActionPrimitiveFn<{
2757
- params: _$typebox.TObject<{
2758
- id: _$typebox.TString;
2759
- }>;
2760
- query: _$typebox.TObject<{
2761
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2762
- }>;
2763
- body: _$typebox.TObject<{
2764
- email: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2765
- organizationId: _$typebox.TOptional<PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>>;
2766
- phoneNumber: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2767
- realm: _$typebox.TOptional<PgAttr<_$typebox.TString, typeof PG_DEFAULT>>;
2768
- roles: _$typebox.TOptional<PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>>;
2769
- firstName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2770
- lastName: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2771
- picture: _$typebox.TOptional<_$typebox.TOptional<_$typebox.TString>>;
2772
- enabled: _$typebox.TOptional<PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>>;
2773
- }>;
2774
- response: _$typebox.TObject<{
2775
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2776
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2777
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2778
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2779
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
2780
- username: _$typebox.TOptional<_$typebox.TString>;
2781
- email: _$typebox.TOptional<_$typebox.TString>;
2782
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2783
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
2784
- firstName: _$typebox.TOptional<_$typebox.TString>;
2785
- lastName: _$typebox.TOptional<_$typebox.TString>;
2786
- picture: _$typebox.TOptional<_$typebox.TString>;
2787
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2788
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2789
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
2765
+ readonly updateUser: import("alepha/server").ActionPrimitiveFn<{
2766
+ params: import("typebox").TObject<{
2767
+ id: import("typebox").TString;
2768
+ }>;
2769
+ query: import("typebox").TObject<{
2770
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2771
+ }>;
2772
+ body: import("typebox").TObject<{
2773
+ email: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2774
+ username: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2775
+ phoneNumber: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2776
+ enabled: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2777
+ realm: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_DEFAULT>>;
2778
+ roles: import("typebox").TOptional<PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>>;
2779
+ firstName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2780
+ lastName: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2781
+ picture: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2782
+ emailVerified: import("typebox").TOptional<PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>>;
2783
+ lastLoginAt: import("typebox").TOptional<import("typebox").TOptional<import("typebox").TString>>;
2784
+ organizationId: import("typebox").TOptional<PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>>;
2785
+ }>;
2786
+ response: import("typebox").TObject<{
2787
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2788
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2789
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2790
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2791
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
2792
+ username: import("typebox").TOptional<import("typebox").TString>;
2793
+ email: import("typebox").TOptional<import("typebox").TString>;
2794
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2795
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
2796
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2797
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2798
+ picture: import("typebox").TOptional<import("typebox").TString>;
2799
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2800
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
2801
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
2802
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
2803
+ }>;
2804
+ }>;
2805
+ /**
2806
+ * Set (or reset) a user's password. Admin-only flow — does NOT
2807
+ * require knowing the previous password. Hash is stored as a
2808
+ * "credentials" identity for the user (upsert).
2809
+ */
2810
+ readonly setUserPassword: import("alepha/server").ActionPrimitiveFn<{
2811
+ params: import("typebox").TObject<{
2812
+ id: import("typebox").TString;
2813
+ }>;
2814
+ query: import("typebox").TObject<{
2815
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2816
+ }>;
2817
+ body: import("typebox").TObject<{
2818
+ password: import("typebox").TString;
2819
+ }>;
2820
+ response: import("typebox").TObject<{
2821
+ ok: import("typebox").TBoolean;
2822
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
2823
+ count: import("typebox").TOptional<import("typebox").TNumber>;
2790
2824
  }>;
2791
2825
  }>;
2792
2826
  /**
2793
2827
  * Delete a user.
2794
2828
  */
2795
- readonly deleteUser: _$alepha_server0.ActionPrimitiveFn<{
2796
- params: _$typebox.TObject<{
2797
- id: _$typebox.TString;
2829
+ readonly deleteUser: import("alepha/server").ActionPrimitiveFn<{
2830
+ params: import("typebox").TObject<{
2831
+ id: import("typebox").TString;
2798
2832
  }>;
2799
- query: _$typebox.TObject<{
2800
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2833
+ query: import("typebox").TObject<{
2834
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2801
2835
  }>;
2802
- response: _$typebox.TObject<{
2803
- ok: _$typebox.TBoolean;
2804
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
2805
- count: _$typebox.TOptional<_$typebox.TNumber>;
2836
+ response: import("typebox").TObject<{
2837
+ ok: import("typebox").TBoolean;
2838
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
2839
+ count: import("typebox").TOptional<import("typebox").TNumber>;
2806
2840
  }>;
2807
2841
  }>;
2808
2842
  /**
@@ -2810,15 +2844,15 @@ declare class AdminUserController {
2810
2844
  * cascades and side-effects run as if called one-by-one. Errors on a single
2811
2845
  * id surface with that id in the response.
2812
2846
  */
2813
- readonly deleteUsers: _$alepha_server0.ActionPrimitiveFn<{
2814
- query: _$typebox.TObject<{
2815
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
2847
+ readonly deleteUsers: import("alepha/server").ActionPrimitiveFn<{
2848
+ query: import("typebox").TObject<{
2849
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
2816
2850
  }>;
2817
- body: _$typebox.TObject<{
2818
- ids: _$typebox.TArray<_$typebox.TString>;
2851
+ body: import("typebox").TObject<{
2852
+ ids: import("typebox").TArray<import("typebox").TString>;
2819
2853
  }>;
2820
- response: _$typebox.TObject<{
2821
- deleted: _$typebox.TArray<_$typebox.TString>;
2854
+ response: import("typebox").TObject<{
2855
+ deleted: import("typebox").TArray<import("typebox").TString>;
2822
2856
  }>;
2823
2857
  }>;
2824
2858
  }
@@ -2838,64 +2872,64 @@ declare class RealmController {
2838
2872
  * Get realm configuration settings.
2839
2873
  * This endpoint is not exposed in the API documentation.
2840
2874
  */
2841
- readonly getRealmConfig: _$alepha_server0.ActionPrimitiveFn<{
2842
- query: _$typebox.TObject<{
2843
- realmName: _$typebox.TOptional<_$typebox.TString>;
2844
- }>;
2845
- response: _$typebox.TObject<{
2846
- settings: _$typebox.TObject<{
2847
- displayName: _$typebox.TOptional<_$typebox.TString>;
2848
- description: _$typebox.TOptional<_$typebox.TString>;
2849
- logoUrl: _$typebox.TOptional<_$typebox.TString>;
2850
- registrationAllowed: _$typebox.TBoolean;
2851
- email: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
2852
- username: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">, _$typebox.TLiteral<"email">]>;
2853
- usernameRegExp: _$typebox.TString;
2854
- usernameBlocklist: _$typebox.TArray<_$typebox.TString>;
2855
- phoneNumber: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
2856
- verifyEmailRequired: _$typebox.TBoolean;
2857
- verifyPhoneRequired: _$typebox.TBoolean;
2858
- firstNameLastName: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
2859
- resetPasswordAllowed: _$typebox.TBoolean;
2860
- captchaRequired: _$typebox.TBoolean;
2861
- adminEmails: _$typebox.TArray<_$typebox.TString>;
2862
- adminUsernames: _$typebox.TArray<_$typebox.TString>;
2863
- defaultRoles: _$typebox.TArray<_$typebox.TString>;
2864
- verifyEmailUrl: _$typebox.TOptional<_$typebox.TString>;
2865
- passwordPolicy: _$typebox.TObject<{
2866
- minLength: _$typebox.TInteger;
2867
- requireUppercase: _$typebox.TBoolean;
2868
- requireLowercase: _$typebox.TBoolean;
2869
- requireNumbers: _$typebox.TBoolean;
2870
- requireSpecialCharacters: _$typebox.TBoolean;
2875
+ readonly getRealmConfig: import("alepha/server").ActionPrimitiveFn<{
2876
+ query: import("typebox").TObject<{
2877
+ realmName: import("typebox").TOptional<import("typebox").TString>;
2878
+ }>;
2879
+ response: import("typebox").TObject<{
2880
+ settings: import("typebox").TObject<{
2881
+ displayName: import("typebox").TOptional<import("typebox").TString>;
2882
+ description: import("typebox").TOptional<import("typebox").TString>;
2883
+ logoUrl: import("typebox").TOptional<import("typebox").TString>;
2884
+ registrationAllowed: import("typebox").TBoolean;
2885
+ email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
2886
+ username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
2887
+ usernameRegExp: import("typebox").TString;
2888
+ usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
2889
+ phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
2890
+ verifyEmailRequired: import("typebox").TBoolean;
2891
+ verifyPhoneRequired: import("typebox").TBoolean;
2892
+ firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
2893
+ resetPasswordAllowed: import("typebox").TBoolean;
2894
+ captchaRequired: import("typebox").TBoolean;
2895
+ adminEmails: import("typebox").TArray<import("typebox").TString>;
2896
+ adminUsernames: import("typebox").TArray<import("typebox").TString>;
2897
+ defaultRoles: import("typebox").TArray<import("typebox").TString>;
2898
+ verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
2899
+ passwordPolicy: import("typebox").TObject<{
2900
+ minLength: import("typebox").TInteger;
2901
+ requireUppercase: import("typebox").TBoolean;
2902
+ requireLowercase: import("typebox").TBoolean;
2903
+ requireNumbers: import("typebox").TBoolean;
2904
+ requireSpecialCharacters: import("typebox").TBoolean;
2871
2905
  }>;
2872
- loginRateLimit: _$typebox.TObject<{
2873
- ipMaxAttempts: _$typebox.TInteger;
2874
- accountMaxAttempts: _$typebox.TInteger;
2875
- windowMs: _$typebox.TInteger;
2906
+ loginRateLimit: import("typebox").TObject<{
2907
+ ipMaxAttempts: import("typebox").TInteger;
2908
+ accountMaxAttempts: import("typebox").TInteger;
2909
+ windowMs: import("typebox").TInteger;
2876
2910
  }>;
2877
- registrationIpMaxAttempts: _$typebox.TInteger;
2878
- refreshToken: _$typebox.TObject<{
2879
- expirationIdle: _$typebox.TOptional<_$typebox.TInteger>;
2911
+ registrationIpMaxAttempts: import("typebox").TInteger;
2912
+ refreshToken: import("typebox").TObject<{
2913
+ expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
2880
2914
  }>;
2881
2915
  }>;
2882
- realmName: _$typebox.TString;
2883
- authenticationMethods: _$typebox.TArray<_$typebox.TObject<{
2884
- name: _$typebox.TString;
2885
- type: _$typebox.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2916
+ realmName: import("typebox").TString;
2917
+ authenticationMethods: import("typebox").TArray<import("typebox").TObject<{
2918
+ name: import("typebox").TString;
2919
+ type: import("typebox").TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2886
2920
  }>>;
2887
- captchaSiteKey: _$typebox.TOptional<_$typebox.TString>;
2921
+ captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
2888
2922
  }>;
2889
2923
  }>;
2890
- readonly checkUsernameAvailability: _$alepha_server0.ActionPrimitiveFn<{
2891
- query: _$typebox.TObject<{
2892
- realmName: _$typebox.TOptional<_$typebox.TString>;
2924
+ readonly checkUsernameAvailability: import("alepha/server").ActionPrimitiveFn<{
2925
+ query: import("typebox").TObject<{
2926
+ realmName: import("typebox").TOptional<import("typebox").TString>;
2893
2927
  }>;
2894
- body: _$typebox.TObject<{
2895
- username: _$typebox.TString;
2928
+ body: import("typebox").TObject<{
2929
+ username: import("typebox").TString;
2896
2930
  }>;
2897
- response: _$typebox.TObject<{
2898
- available: _$typebox.TBoolean;
2931
+ response: import("typebox").TObject<{
2932
+ available: import("typebox").TBoolean;
2899
2933
  }>;
2900
2934
  }>;
2901
2935
  }
@@ -2907,10 +2941,10 @@ declare class RealmController {
2907
2941
  * Requires the intent ID from Phase 1, the verification code,
2908
2942
  * and the new password.
2909
2943
  */
2910
- declare const completePasswordResetRequestSchema: _$typebox.TObject<{
2911
- intentId: _$typebox.TString;
2912
- code: _$typebox.TString;
2913
- newPassword: _$typebox.TString;
2944
+ declare const completePasswordResetRequestSchema: import("typebox").TObject<{
2945
+ intentId: import("typebox").TString;
2946
+ code: import("typebox").TString;
2947
+ newPassword: import("typebox").TString;
2914
2948
  }>;
2915
2949
  type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
2916
2950
  //#endregion
@@ -2921,9 +2955,9 @@ type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSc
2921
2955
  * Contains the intent ID needed for Phase 2 completion,
2922
2956
  * along with expiration time.
2923
2957
  */
2924
- declare const passwordResetIntentResponseSchema: _$typebox.TObject<{
2925
- intentId: _$typebox.TString;
2926
- expiresAt: _$typebox.TString;
2958
+ declare const passwordResetIntentResponseSchema: import("typebox").TObject<{
2959
+ intentId: import("typebox").TString;
2960
+ expiresAt: import("typebox").TString;
2927
2961
  }>;
2928
2962
  type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
2929
2963
  //#endregion
@@ -2940,58 +2974,61 @@ interface PasswordResetIntent {
2940
2974
  }
2941
2975
  declare class CredentialService {
2942
2976
  protected readonly alepha: Alepha;
2943
- protected readonly log: _$alepha_logger0.Logger;
2977
+ protected readonly log: import("alepha/logger").Logger;
2944
2978
  protected readonly cryptoProvider: CryptoProvider;
2945
2979
  protected readonly dateTimeProvider: DateTimeProvider;
2946
2980
  protected readonly verificationService: VerificationService;
2947
2981
  protected readonly realmProvider: RealmProvider;
2948
2982
  protected userAudits(realmName?: string): UserAudits | undefined;
2983
+ protected sessionAudits(realmName?: string): SessionAudits | undefined;
2949
2984
  protected userNotifications(realmName?: string): UserNotifications | undefined;
2950
- protected readonly intentCache: _$alepha_cache0.CacheMiddlewareFn<PasswordResetIntent>;
2951
- users(userRealmName?: string): Repository$1<_$typebox.TObject<{
2952
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2953
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2954
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2955
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2956
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
2957
- username: _$typebox.TOptional<_$typebox.TString>;
2958
- email: _$typebox.TOptional<_$typebox.TString>;
2959
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
2960
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
2961
- firstName: _$typebox.TOptional<_$typebox.TString>;
2962
- lastName: _$typebox.TOptional<_$typebox.TString>;
2963
- picture: _$typebox.TOptional<_$typebox.TString>;
2964
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2965
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
2966
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
2985
+ protected readonly intentCache: import("alepha/cache").CacheMiddlewareFn<PasswordResetIntent>;
2986
+ users(userRealmName?: string): Repository$1<import("typebox").TObject<{
2987
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2988
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2989
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2990
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2991
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
2992
+ username: import("typebox").TOptional<import("typebox").TString>;
2993
+ email: import("typebox").TOptional<import("typebox").TString>;
2994
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
2995
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
2996
+ firstName: import("typebox").TOptional<import("typebox").TString>;
2997
+ lastName: import("typebox").TOptional<import("typebox").TString>;
2998
+ picture: import("typebox").TOptional<import("typebox").TString>;
2999
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3000
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3001
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
3002
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
2967
3003
  }>>;
2968
- sessions(userRealmName?: string): Repository$1<_$typebox.TObject<{
2969
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2970
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2971
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2972
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2973
- refreshToken: _$typebox.TString;
2974
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
2975
- clientId: _$typebox.TOptional<_$typebox.TString>;
2976
- expiresAt: _$typebox.TString;
2977
- lastUsedAt: _$typebox.TOptional<_$typebox.TString>;
2978
- ip: _$typebox.TOptional<_$typebox.TString>;
2979
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
2980
- os: _$typebox.TString;
2981
- browser: _$typebox.TString;
2982
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3004
+ sessions(userRealmName?: string): Repository$1<import("typebox").TObject<{
3005
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3006
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3007
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3008
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3009
+ refreshToken: import("typebox").TString;
3010
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
3011
+ clientId: import("typebox").TOptional<import("typebox").TString>;
3012
+ expiresAt: import("typebox").TString;
3013
+ lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
3014
+ ip: import("typebox").TOptional<import("typebox").TString>;
3015
+ country: import("typebox").TOptional<import("typebox").TString>;
3016
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
3017
+ os: import("typebox").TString;
3018
+ browser: import("typebox").TString;
3019
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2983
3020
  }>>;
2984
3021
  }>>;
2985
- identities(userRealmName?: string): Repository$1<_$typebox.TObject<{
2986
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2987
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2988
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2989
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2990
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
2991
- password: _$typebox.TOptional<_$typebox.TString>;
2992
- provider: _$typebox.TString;
2993
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
2994
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
3022
+ identities(userRealmName?: string): Repository$1<import("typebox").TObject<{
3023
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3024
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3025
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3026
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3027
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
3028
+ password: import("typebox").TOptional<import("typebox").TString>;
3029
+ provider: import("typebox").TString;
3030
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
3031
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
2995
3032
  }>>;
2996
3033
  /**
2997
3034
  * Validate a password against the realm's password policy.
@@ -3032,11 +3069,11 @@ declare class CredentialService {
3032
3069
  }
3033
3070
  //#endregion
3034
3071
  //#region ../../src/api/users/schemas/completeRegistrationRequestSchema.d.ts
3035
- declare const completeRegistrationRequestSchema: _$typebox.TObject<{
3036
- intentId: _$typebox.TString;
3037
- emailCode: _$typebox.TOptional<_$typebox.TString>;
3038
- phoneCode: _$typebox.TOptional<_$typebox.TString>;
3039
- captchaToken: _$typebox.TOptional<_$typebox.TString>;
3072
+ declare const completeRegistrationRequestSchema: import("typebox").TObject<{
3073
+ intentId: import("typebox").TString;
3074
+ emailCode: import("typebox").TOptional<import("typebox").TString>;
3075
+ phoneCode: import("typebox").TOptional<import("typebox").TString>;
3076
+ captchaToken: import("typebox").TOptional<import("typebox").TString>;
3040
3077
  }>;
3041
3078
  type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSchema>;
3042
3079
  //#endregion
@@ -3045,26 +3082,26 @@ type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSche
3045
3082
  * Schema for user registration request body.
3046
3083
  * Password is always required, other fields depend on realm settings.
3047
3084
  */
3048
- declare const registerRequestSchema: _$typebox.TObject<{
3049
- password: _$typebox.TString;
3050
- username: _$typebox.TOptional<_$typebox.TString>;
3051
- email: _$typebox.TOptional<_$typebox.TString>;
3052
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3053
- firstName: _$typebox.TOptional<_$typebox.TString>;
3054
- lastName: _$typebox.TOptional<_$typebox.TString>;
3055
- picture: _$typebox.TOptional<_$typebox.TString>;
3056
- captchaToken: _$typebox.TOptional<_$typebox.TString>;
3085
+ declare const registerRequestSchema: import("typebox").TObject<{
3086
+ password: import("typebox").TString;
3087
+ username: import("typebox").TOptional<import("typebox").TString>;
3088
+ email: import("typebox").TOptional<import("typebox").TString>;
3089
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3090
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3091
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3092
+ picture: import("typebox").TOptional<import("typebox").TString>;
3093
+ captchaToken: import("typebox").TOptional<import("typebox").TString>;
3057
3094
  }>;
3058
3095
  type RegisterRequest = Static<typeof registerRequestSchema>;
3059
3096
  //#endregion
3060
3097
  //#region ../../src/api/users/schemas/registrationIntentResponseSchema.d.ts
3061
- declare const registrationIntentResponseSchema: _$typebox.TObject<{
3062
- intentId: _$typebox.TString;
3063
- expectCaptcha: _$typebox.TBoolean;
3064
- captchaSiteKey: _$typebox.TOptional<_$typebox.TString>;
3065
- expectEmailVerification: _$typebox.TBoolean;
3066
- expectPhoneVerification: _$typebox.TBoolean;
3067
- expiresAt: _$typebox.TString;
3098
+ declare const registrationIntentResponseSchema: import("typebox").TObject<{
3099
+ intentId: import("typebox").TString;
3100
+ expectCaptcha: import("typebox").TBoolean;
3101
+ captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
3102
+ expectEmailVerification: import("typebox").TBoolean;
3103
+ expectPhoneVerification: import("typebox").TBoolean;
3104
+ expiresAt: import("typebox").TString;
3068
3105
  }>;
3069
3106
  type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema>;
3070
3107
  //#endregion
@@ -3094,7 +3131,7 @@ type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema
3094
3131
  */
3095
3132
  declare class UsernameSlugger {
3096
3133
  protected readonly realmProvider: RealmProvider;
3097
- protected readonly log: _$alepha_logger0.Logger;
3134
+ protected readonly log: import("alepha/logger").Logger;
3098
3135
  /**
3099
3136
  * Floor for derived usernames. Shorter slugs are padded with random
3100
3137
  * alphanumerics. Matches the lower bound of the default `usernameRegExp`.
@@ -3182,16 +3219,16 @@ interface RegistrationIntent {
3182
3219
  }
3183
3220
  declare class RegistrationService {
3184
3221
  protected readonly alepha: Alepha;
3185
- protected readonly log: _$alepha_logger0.Logger;
3222
+ protected readonly log: import("alepha/logger").Logger;
3186
3223
  protected readonly dateTimeProvider: DateTimeProvider;
3187
3224
  protected readonly cryptoProvider: CryptoProvider;
3188
- protected readonly verificationController: _$alepha_server_links0.HttpVirtualClient<VerificationController>;
3225
+ protected readonly verificationController: import("alepha/server/links").HttpVirtualClient<VerificationController>;
3189
3226
  protected readonly realmProvider: RealmProvider;
3190
3227
  protected readonly credentialService: CredentialService;
3191
3228
  protected readonly captchaProvider: CaptchaProvider;
3192
3229
  protected readonly usernameSlugger: UsernameSlugger;
3193
- protected readonly intentCache: _$alepha_cache0.CacheMiddlewareFn<RegistrationIntent>;
3194
- protected readonly rateLimitCache: _$alepha_cache0.CacheMiddlewareFn<number>;
3230
+ protected readonly intentCache: import("alepha/cache").CacheMiddlewareFn<RegistrationIntent>;
3231
+ protected readonly rateLimitCache: import("alepha/cache").CacheMiddlewareFn<number>;
3195
3232
  protected userAudits(realmName?: string): UserAudits | undefined;
3196
3233
  protected userNotifications(realmName?: string): UserNotifications;
3197
3234
  /**
@@ -3241,134 +3278,135 @@ declare class UserController {
3241
3278
  * Phase 1: Create a registration intent.
3242
3279
  * Validates data, creates verification sessions, and stores intent in cache.
3243
3280
  */
3244
- readonly createRegistrationIntent: _$alepha_server0.ActionPrimitiveFn<{
3245
- body: _$typebox.TObject<{
3246
- password: _$typebox.TString;
3247
- username: _$typebox.TOptional<_$typebox.TString>;
3248
- email: _$typebox.TOptional<_$typebox.TString>;
3249
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3250
- firstName: _$typebox.TOptional<_$typebox.TString>;
3251
- lastName: _$typebox.TOptional<_$typebox.TString>;
3252
- picture: _$typebox.TOptional<_$typebox.TString>;
3253
- captchaToken: _$typebox.TOptional<_$typebox.TString>;
3254
- }>;
3255
- query: _$typebox.TObject<{
3256
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3257
- }>;
3258
- response: _$typebox.TObject<{
3259
- intentId: _$typebox.TString;
3260
- expectCaptcha: _$typebox.TBoolean;
3261
- captchaSiteKey: _$typebox.TOptional<_$typebox.TString>;
3262
- expectEmailVerification: _$typebox.TBoolean;
3263
- expectPhoneVerification: _$typebox.TBoolean;
3264
- expiresAt: _$typebox.TString;
3281
+ readonly createRegistrationIntent: import("alepha/server").ActionPrimitiveFn<{
3282
+ body: import("typebox").TObject<{
3283
+ password: import("typebox").TString;
3284
+ username: import("typebox").TOptional<import("typebox").TString>;
3285
+ email: import("typebox").TOptional<import("typebox").TString>;
3286
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3287
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3288
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3289
+ picture: import("typebox").TOptional<import("typebox").TString>;
3290
+ captchaToken: import("typebox").TOptional<import("typebox").TString>;
3291
+ }>;
3292
+ query: import("typebox").TObject<{
3293
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3294
+ }>;
3295
+ response: import("typebox").TObject<{
3296
+ intentId: import("typebox").TString;
3297
+ expectCaptcha: import("typebox").TBoolean;
3298
+ captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
3299
+ expectEmailVerification: import("typebox").TBoolean;
3300
+ expectPhoneVerification: import("typebox").TBoolean;
3301
+ expiresAt: import("typebox").TString;
3265
3302
  }>;
3266
3303
  }>;
3267
3304
  /**
3268
3305
  * Phase 2: Complete registration using an intent.
3269
3306
  * Validates verification codes and creates the user.
3270
3307
  */
3271
- readonly createUserFromIntent: _$alepha_server0.ActionPrimitiveFn<{
3272
- body: _$typebox.TObject<{
3273
- intentId: _$typebox.TString;
3274
- emailCode: _$typebox.TOptional<_$typebox.TString>;
3275
- phoneCode: _$typebox.TOptional<_$typebox.TString>;
3276
- captchaToken: _$typebox.TOptional<_$typebox.TString>;
3277
- }>;
3278
- response: _$typebox.TObject<{
3279
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3280
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3281
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3282
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3283
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
3284
- username: _$typebox.TOptional<_$typebox.TString>;
3285
- email: _$typebox.TOptional<_$typebox.TString>;
3286
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3287
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
3288
- firstName: _$typebox.TOptional<_$typebox.TString>;
3289
- lastName: _$typebox.TOptional<_$typebox.TString>;
3290
- picture: _$typebox.TOptional<_$typebox.TString>;
3291
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3292
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3293
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
3308
+ readonly createUserFromIntent: import("alepha/server").ActionPrimitiveFn<{
3309
+ body: import("typebox").TObject<{
3310
+ intentId: import("typebox").TString;
3311
+ emailCode: import("typebox").TOptional<import("typebox").TString>;
3312
+ phoneCode: import("typebox").TOptional<import("typebox").TString>;
3313
+ captchaToken: import("typebox").TOptional<import("typebox").TString>;
3314
+ }>;
3315
+ response: import("typebox").TObject<{
3316
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3317
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3318
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3319
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3320
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
3321
+ username: import("typebox").TOptional<import("typebox").TString>;
3322
+ email: import("typebox").TOptional<import("typebox").TString>;
3323
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3324
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
3325
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3326
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3327
+ picture: import("typebox").TOptional<import("typebox").TString>;
3328
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3329
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3330
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
3331
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
3294
3332
  }>;
3295
3333
  }>;
3296
3334
  /**
3297
3335
  * Phase 1: Create a password reset intent.
3298
3336
  * Validates email, sends verification code, and stores intent in cache.
3299
3337
  */
3300
- readonly createPasswordResetIntent: _$alepha_server0.ActionPrimitiveFn<{
3301
- query: _$typebox.TObject<{
3302
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3338
+ readonly createPasswordResetIntent: import("alepha/server").ActionPrimitiveFn<{
3339
+ query: import("typebox").TObject<{
3340
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3303
3341
  }>;
3304
- body: _$typebox.TObject<{
3305
- email: _$typebox.TString;
3342
+ body: import("typebox").TObject<{
3343
+ email: import("typebox").TString;
3306
3344
  }>;
3307
- response: _$typebox.TObject<{
3308
- intentId: _$typebox.TString;
3309
- expiresAt: _$typebox.TString;
3345
+ response: import("typebox").TObject<{
3346
+ intentId: import("typebox").TString;
3347
+ expiresAt: import("typebox").TString;
3310
3348
  }>;
3311
3349
  }>;
3312
3350
  /**
3313
3351
  * Phase 2: Complete password reset using an intent.
3314
3352
  * Validates verification code, updates password, and invalidates sessions.
3315
3353
  */
3316
- readonly completePasswordReset: _$alepha_server0.ActionPrimitiveFn<{
3317
- body: _$typebox.TObject<{
3318
- intentId: _$typebox.TString;
3319
- code: _$typebox.TString;
3320
- newPassword: _$typebox.TString;
3354
+ readonly completePasswordReset: import("alepha/server").ActionPrimitiveFn<{
3355
+ body: import("typebox").TObject<{
3356
+ intentId: import("typebox").TString;
3357
+ code: import("typebox").TString;
3358
+ newPassword: import("typebox").TString;
3321
3359
  }>;
3322
- response: _$typebox.TObject<{
3323
- ok: _$typebox.TBoolean;
3324
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
3325
- count: _$typebox.TOptional<_$typebox.TNumber>;
3360
+ response: import("typebox").TObject<{
3361
+ ok: import("typebox").TBoolean;
3362
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
3363
+ count: import("typebox").TOptional<import("typebox").TNumber>;
3326
3364
  }>;
3327
3365
  }>;
3328
3366
  /**
3329
3367
  * @deprecated Use createPasswordResetIntent instead
3330
3368
  */
3331
- requestPasswordReset: _$alepha_server0.ActionPrimitiveFn<{
3332
- query: _$typebox.TObject<{
3333
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3369
+ requestPasswordReset: import("alepha/server").ActionPrimitiveFn<{
3370
+ query: import("typebox").TObject<{
3371
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3334
3372
  }>;
3335
- body: _$typebox.TObject<{
3336
- email: _$typebox.TString;
3373
+ body: import("typebox").TObject<{
3374
+ email: import("typebox").TString;
3337
3375
  }>;
3338
- response: _$typebox.TObject<{
3339
- success: _$typebox.TBoolean;
3340
- message: _$typebox.TString;
3376
+ response: import("typebox").TObject<{
3377
+ success: import("typebox").TBoolean;
3378
+ message: import("typebox").TString;
3341
3379
  }>;
3342
3380
  }>;
3343
3381
  /**
3344
3382
  * @deprecated Use completePasswordReset instead
3345
3383
  */
3346
- validateResetToken: _$alepha_server0.ActionPrimitiveFn<{
3347
- query: _$typebox.TObject<{
3348
- email: _$typebox.TString;
3349
- token: _$typebox.TString;
3350
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3384
+ validateResetToken: import("alepha/server").ActionPrimitiveFn<{
3385
+ query: import("typebox").TObject<{
3386
+ email: import("typebox").TString;
3387
+ token: import("typebox").TString;
3388
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3351
3389
  }>;
3352
- response: _$typebox.TObject<{
3353
- valid: _$typebox.TBoolean;
3354
- email: _$typebox.TOptional<_$typebox.TString>;
3390
+ response: import("typebox").TObject<{
3391
+ valid: import("typebox").TBoolean;
3392
+ email: import("typebox").TOptional<import("typebox").TString>;
3355
3393
  }>;
3356
3394
  }>;
3357
3395
  /**
3358
3396
  * @deprecated Use completePasswordReset instead
3359
3397
  */
3360
- resetPassword: _$alepha_server0.ActionPrimitiveFn<{
3361
- query: _$typebox.TObject<{
3362
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3398
+ resetPassword: import("alepha/server").ActionPrimitiveFn<{
3399
+ query: import("typebox").TObject<{
3400
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3363
3401
  }>;
3364
- body: _$typebox.TObject<{
3365
- email: _$typebox.TString;
3366
- token: _$typebox.TString;
3367
- newPassword: _$typebox.TString;
3402
+ body: import("typebox").TObject<{
3403
+ email: import("typebox").TString;
3404
+ token: import("typebox").TString;
3405
+ newPassword: import("typebox").TString;
3368
3406
  }>;
3369
- response: _$typebox.TObject<{
3370
- success: _$typebox.TBoolean;
3371
- message: _$typebox.TString;
3407
+ response: import("typebox").TObject<{
3408
+ success: import("typebox").TBoolean;
3409
+ message: import("typebox").TString;
3372
3410
  }>;
3373
3411
  }>;
3374
3412
  /**
@@ -3377,46 +3415,46 @@ declare class UserController {
3377
3415
  * @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
3378
3416
  * @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
3379
3417
  */
3380
- requestEmailVerification: _$alepha_server0.ActionPrimitiveFn<{
3381
- query: _$typebox.TObject<{
3382
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3383
- method: _$typebox.TOptional<_$typebox.TUnsafe<"link" | "code">>;
3418
+ requestEmailVerification: import("alepha/server").ActionPrimitiveFn<{
3419
+ query: import("typebox").TObject<{
3420
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3421
+ method: import("typebox").TOptional<import("typebox").TUnsafe<"link" | "code">>;
3384
3422
  }>;
3385
- body: _$typebox.TObject<{
3386
- email: _$typebox.TString;
3423
+ body: import("typebox").TObject<{
3424
+ email: import("typebox").TString;
3387
3425
  }>;
3388
- response: _$typebox.TObject<{
3389
- success: _$typebox.TBoolean;
3390
- message: _$typebox.TString;
3426
+ response: import("typebox").TObject<{
3427
+ success: import("typebox").TBoolean;
3428
+ message: import("typebox").TString;
3391
3429
  }>;
3392
3430
  }>;
3393
3431
  /**
3394
3432
  * Verify email with a valid token.
3395
3433
  * Updates the user's emailVerified status.
3396
3434
  */
3397
- verifyEmail: _$alepha_server0.ActionPrimitiveFn<{
3398
- query: _$typebox.TObject<{
3399
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3435
+ verifyEmail: import("alepha/server").ActionPrimitiveFn<{
3436
+ query: import("typebox").TObject<{
3437
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3400
3438
  }>;
3401
- body: _$typebox.TObject<{
3402
- email: _$typebox.TString;
3403
- token: _$typebox.TString;
3439
+ body: import("typebox").TObject<{
3440
+ email: import("typebox").TString;
3441
+ token: import("typebox").TString;
3404
3442
  }>;
3405
- response: _$typebox.TObject<{
3406
- success: _$typebox.TBoolean;
3407
- message: _$typebox.TString;
3443
+ response: import("typebox").TObject<{
3444
+ success: import("typebox").TBoolean;
3445
+ message: import("typebox").TString;
3408
3446
  }>;
3409
3447
  }>;
3410
3448
  /**
3411
3449
  * Check if an email is verified.
3412
3450
  */
3413
- checkEmailVerification: _$alepha_server0.ActionPrimitiveFn<{
3414
- query: _$typebox.TObject<{
3415
- email: _$typebox.TString;
3416
- userRealmName: _$typebox.TOptional<_$typebox.TString>;
3451
+ checkEmailVerification: import("alepha/server").ActionPrimitiveFn<{
3452
+ query: import("typebox").TObject<{
3453
+ email: import("typebox").TString;
3454
+ userRealmName: import("typebox").TOptional<import("typebox").TString>;
3417
3455
  }>;
3418
- response: _$typebox.TObject<{
3419
- verified: _$typebox.TBoolean;
3456
+ response: import("typebox").TObject<{
3457
+ verified: import("typebox").TBoolean;
3420
3458
  }>;
3421
3459
  }>;
3422
3460
  }
@@ -3434,23 +3472,24 @@ declare class UserController {
3434
3472
  * lazily the first time something calls `alepha.inject(UserJobs)`.
3435
3473
  */
3436
3474
  declare class UserJobs {
3437
- protected readonly log: _$alepha_logger0.Logger;
3475
+ protected readonly log: import("alepha/logger").Logger;
3438
3476
  protected readonly dateTimeProvider: DateTimeProvider;
3439
- protected readonly sessionRepository: _$alepha_orm0.Repository<_$typebox.TObject<{
3440
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
3441
- version: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_VERSION>, typeof _$alepha_orm0.PG_DEFAULT>;
3442
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
3443
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
3444
- refreshToken: _$typebox.TString;
3445
- userId: _$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_REF>;
3446
- clientId: _$typebox.TOptional<_$typebox.TString>;
3447
- expiresAt: _$typebox.TString;
3448
- lastUsedAt: _$typebox.TOptional<_$typebox.TString>;
3449
- ip: _$typebox.TOptional<_$typebox.TString>;
3450
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
3451
- os: _$typebox.TString;
3452
- browser: _$typebox.TString;
3453
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3477
+ protected readonly sessionRepository: import("alepha/orm").Repository<import("typebox").TObject<{
3478
+ 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>;
3479
+ version: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_VERSION>, typeof import("alepha/orm").PG_DEFAULT>;
3480
+ 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>;
3481
+ 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>;
3482
+ refreshToken: import("typebox").TString;
3483
+ userId: import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_REF>;
3484
+ clientId: import("typebox").TOptional<import("typebox").TString>;
3485
+ expiresAt: import("typebox").TString;
3486
+ lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
3487
+ ip: import("typebox").TOptional<import("typebox").TString>;
3488
+ country: import("typebox").TOptional<import("typebox").TString>;
3489
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
3490
+ os: import("typebox").TString;
3491
+ browser: import("typebox").TString;
3492
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3454
3493
  }>>;
3455
3494
  }>>;
3456
3495
  protected readonly realmProvider: RealmProvider;
@@ -3466,134 +3505,156 @@ declare class UserJobs {
3466
3505
  * The idle sweep is best-effort cleanup — runtime enforcement happens in
3467
3506
  * `SessionService.refreshSession()`.
3468
3507
  */
3469
- readonly purgeExpiredSessions: _$alepha_api_jobs0.JobPrimitive<_$typebox.TSchema>;
3508
+ readonly purgeExpiredSessions: import("alepha/api/jobs").JobPrimitive<import("typebox").TSchema>;
3470
3509
  }
3471
3510
  //#endregion
3472
3511
  //#region ../../src/api/users/schemas/identityResourceSchema.d.ts
3473
- declare const identityResourceSchema: _$typebox.TObject<{
3474
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
3475
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3476
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3477
- provider: _$typebox.TString;
3478
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3479
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3480
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
3481
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
3512
+ declare const identityResourceSchema: import("typebox").TObject<{
3513
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3514
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3515
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3516
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3517
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
3518
+ provider: import("typebox").TString;
3519
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
3520
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
3482
3521
  }>;
3483
3522
  type IdentityResource = Static<typeof identityResourceSchema>;
3484
3523
  //#endregion
3485
3524
  //#region ../../src/api/users/schemas/loginSchema.d.ts
3486
- declare const loginSchema: _$typebox.TObject<{
3487
- username: _$typebox.TString;
3488
- password: _$typebox.TString;
3525
+ declare const loginSchema: import("typebox").TObject<{
3526
+ username: import("typebox").TString;
3527
+ password: import("typebox").TString;
3489
3528
  }>;
3490
3529
  type LoginInput = Static<typeof loginSchema>;
3491
3530
  //#endregion
3492
3531
  //#region ../../src/api/users/schemas/realmConfigSchema.d.ts
3493
- declare const realmConfigSchema: _$typebox.TObject<{
3494
- settings: _$typebox.TObject<{
3495
- displayName: _$typebox.TOptional<_$typebox.TString>;
3496
- description: _$typebox.TOptional<_$typebox.TString>;
3497
- logoUrl: _$typebox.TOptional<_$typebox.TString>;
3498
- registrationAllowed: _$typebox.TBoolean;
3499
- email: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
3500
- username: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">, _$typebox.TLiteral<"email">]>;
3501
- usernameRegExp: _$typebox.TString;
3502
- usernameBlocklist: _$typebox.TArray<_$typebox.TString>;
3503
- phoneNumber: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
3504
- verifyEmailRequired: _$typebox.TBoolean;
3505
- verifyPhoneRequired: _$typebox.TBoolean;
3506
- firstNameLastName: _$typebox.TUnion<[_$typebox.TLiteral<"none">, _$typebox.TLiteral<"optional">, _$typebox.TLiteral<"required">]>;
3507
- resetPasswordAllowed: _$typebox.TBoolean;
3508
- captchaRequired: _$typebox.TBoolean;
3509
- adminEmails: _$typebox.TArray<_$typebox.TString>;
3510
- adminUsernames: _$typebox.TArray<_$typebox.TString>;
3511
- defaultRoles: _$typebox.TArray<_$typebox.TString>;
3512
- verifyEmailUrl: _$typebox.TOptional<_$typebox.TString>;
3513
- passwordPolicy: _$typebox.TObject<{
3514
- minLength: _$typebox.TInteger;
3515
- requireUppercase: _$typebox.TBoolean;
3516
- requireLowercase: _$typebox.TBoolean;
3517
- requireNumbers: _$typebox.TBoolean;
3518
- requireSpecialCharacters: _$typebox.TBoolean;
3519
- }>;
3520
- loginRateLimit: _$typebox.TObject<{
3521
- ipMaxAttempts: _$typebox.TInteger;
3522
- accountMaxAttempts: _$typebox.TInteger;
3523
- windowMs: _$typebox.TInteger;
3524
- }>;
3525
- registrationIpMaxAttempts: _$typebox.TInteger;
3526
- refreshToken: _$typebox.TObject<{
3527
- expirationIdle: _$typebox.TOptional<_$typebox.TInteger>;
3532
+ declare const realmConfigSchema: import("typebox").TObject<{
3533
+ settings: import("typebox").TObject<{
3534
+ displayName: import("typebox").TOptional<import("typebox").TString>;
3535
+ description: import("typebox").TOptional<import("typebox").TString>;
3536
+ logoUrl: import("typebox").TOptional<import("typebox").TString>;
3537
+ registrationAllowed: import("typebox").TBoolean;
3538
+ email: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
3539
+ username: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">, import("typebox").TLiteral<"email">]>;
3540
+ usernameRegExp: import("typebox").TString;
3541
+ usernameBlocklist: import("typebox").TArray<import("typebox").TString>;
3542
+ phoneNumber: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
3543
+ verifyEmailRequired: import("typebox").TBoolean;
3544
+ verifyPhoneRequired: import("typebox").TBoolean;
3545
+ firstNameLastName: import("typebox").TUnion<[import("typebox").TLiteral<"none">, import("typebox").TLiteral<"optional">, import("typebox").TLiteral<"required">]>;
3546
+ resetPasswordAllowed: import("typebox").TBoolean;
3547
+ captchaRequired: import("typebox").TBoolean;
3548
+ adminEmails: import("typebox").TArray<import("typebox").TString>;
3549
+ adminUsernames: import("typebox").TArray<import("typebox").TString>;
3550
+ defaultRoles: import("typebox").TArray<import("typebox").TString>;
3551
+ verifyEmailUrl: import("typebox").TOptional<import("typebox").TString>;
3552
+ passwordPolicy: import("typebox").TObject<{
3553
+ minLength: import("typebox").TInteger;
3554
+ requireUppercase: import("typebox").TBoolean;
3555
+ requireLowercase: import("typebox").TBoolean;
3556
+ requireNumbers: import("typebox").TBoolean;
3557
+ requireSpecialCharacters: import("typebox").TBoolean;
3558
+ }>;
3559
+ loginRateLimit: import("typebox").TObject<{
3560
+ ipMaxAttempts: import("typebox").TInteger;
3561
+ accountMaxAttempts: import("typebox").TInteger;
3562
+ windowMs: import("typebox").TInteger;
3563
+ }>;
3564
+ registrationIpMaxAttempts: import("typebox").TInteger;
3565
+ refreshToken: import("typebox").TObject<{
3566
+ expirationIdle: import("typebox").TOptional<import("typebox").TInteger>;
3528
3567
  }>;
3529
3568
  }>;
3530
- realmName: _$typebox.TString;
3531
- authenticationMethods: _$typebox.TArray<_$typebox.TObject<{
3532
- name: _$typebox.TString;
3533
- type: _$typebox.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
3569
+ realmName: import("typebox").TString;
3570
+ authenticationMethods: import("typebox").TArray<import("typebox").TObject<{
3571
+ name: import("typebox").TString;
3572
+ type: import("typebox").TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
3534
3573
  }>>;
3535
- captchaSiteKey: _$typebox.TOptional<_$typebox.TString>;
3574
+ captchaSiteKey: import("typebox").TOptional<import("typebox").TString>;
3536
3575
  }>;
3537
3576
  type RealmConfig = Static<typeof realmConfigSchema>;
3538
3577
  //#endregion
3539
3578
  //#region ../../src/api/users/schemas/registerSchema.d.ts
3540
- declare const registerSchema: _$typebox.TObject<{
3541
- username: _$typebox.TString;
3542
- email: _$typebox.TString;
3543
- password: _$typebox.TString;
3544
- confirmPassword: _$typebox.TString;
3545
- firstName: _$typebox.TOptional<_$typebox.TString>;
3546
- lastName: _$typebox.TOptional<_$typebox.TString>;
3579
+ declare const registerSchema: import("typebox").TObject<{
3580
+ username: import("typebox").TString;
3581
+ email: import("typebox").TString;
3582
+ password: import("typebox").TString;
3583
+ confirmPassword: import("typebox").TString;
3584
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3585
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3547
3586
  }>;
3548
3587
  type RegisterInput = Static<typeof registerSchema>;
3549
3588
  //#endregion
3550
3589
  //#region ../../src/api/users/schemas/resetPasswordSchema.d.ts
3551
- declare const resetPasswordRequestSchema: _$typebox.TObject<{
3552
- email: _$typebox.TString;
3590
+ declare const resetPasswordRequestSchema: import("typebox").TObject<{
3591
+ email: import("typebox").TString;
3553
3592
  }>;
3554
- declare const resetPasswordSchema: _$typebox.TObject<{
3555
- token: _$typebox.TString;
3556
- password: _$typebox.TString;
3557
- confirmPassword: _$typebox.TString;
3593
+ declare const resetPasswordSchema: import("typebox").TObject<{
3594
+ token: import("typebox").TString;
3595
+ password: import("typebox").TString;
3596
+ confirmPassword: import("typebox").TString;
3558
3597
  }>;
3559
3598
  type ResetPasswordRequest = Static<typeof resetPasswordRequestSchema>;
3560
3599
  type ResetPasswordInput = Static<typeof resetPasswordSchema>;
3561
3600
  //#endregion
3562
3601
  //#region ../../src/api/users/schemas/sessionResourceSchema.d.ts
3563
- declare const sessionResourceSchema: _$typebox.TObject<{
3564
- id: _$typebox.TString;
3565
- version: _$typebox.TNumber;
3566
- createdAt: _$typebox.TString;
3567
- updatedAt: _$typebox.TString;
3568
- refreshToken: _$typebox.TString;
3569
- userId: _$typebox.TString;
3570
- expiresAt: _$typebox.TString;
3571
- ip: _$typebox.TOptional<_$typebox.TString>;
3572
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
3573
- os: _$typebox.TString;
3574
- browser: _$typebox.TString;
3575
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3602
+ /**
3603
+ * Slim view of the session's owner — embedded by the admin listing so the
3604
+ * UI can render a human-readable identifier instead of just a UUID. Comes
3605
+ * back via a left join, so it's optional (a session whose user was deleted
3606
+ * still returns; `user` is undefined).
3607
+ */
3608
+ declare const sessionUserSummarySchema: import("typebox").TObject<{
3609
+ id: import("typebox").TString;
3610
+ email: import("typebox").TOptional<import("typebox").TString>;
3611
+ username: import("typebox").TOptional<import("typebox").TString>;
3612
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3613
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3614
+ }>;
3615
+ declare const sessionResourceSchema: import("typebox").TObject<{
3616
+ id: import("typebox").TString;
3617
+ version: import("typebox").TNumber;
3618
+ createdAt: import("typebox").TString;
3619
+ updatedAt: import("typebox").TString;
3620
+ refreshToken: import("typebox").TString;
3621
+ userId: import("typebox").TString;
3622
+ expiresAt: import("typebox").TString;
3623
+ ip: import("typebox").TOptional<import("typebox").TString>;
3624
+ country: import("typebox").TOptional<import("typebox").TString>;
3625
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
3626
+ os: import("typebox").TString;
3627
+ browser: import("typebox").TString;
3628
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3629
+ }>>;
3630
+ user: import("typebox").TOptional<import("typebox").TObject<{
3631
+ id: import("typebox").TString;
3632
+ email: import("typebox").TOptional<import("typebox").TString>;
3633
+ username: import("typebox").TOptional<import("typebox").TString>;
3634
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3635
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3576
3636
  }>>;
3577
3637
  }>;
3578
3638
  type SessionResource = Static<typeof sessionResourceSchema>;
3579
3639
  //#endregion
3580
3640
  //#region ../../src/api/users/schemas/userResourceSchema.d.ts
3581
- declare const userResourceSchema: _$typebox.TObject<{
3582
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3583
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3584
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3585
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3586
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
3587
- username: _$typebox.TOptional<_$typebox.TString>;
3588
- email: _$typebox.TOptional<_$typebox.TString>;
3589
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3590
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
3591
- firstName: _$typebox.TOptional<_$typebox.TString>;
3592
- lastName: _$typebox.TOptional<_$typebox.TString>;
3593
- picture: _$typebox.TOptional<_$typebox.TString>;
3594
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3595
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3596
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
3641
+ declare const userResourceSchema: import("typebox").TObject<{
3642
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3643
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3644
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3645
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3646
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
3647
+ username: import("typebox").TOptional<import("typebox").TString>;
3648
+ email: import("typebox").TOptional<import("typebox").TString>;
3649
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3650
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
3651
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3652
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3653
+ picture: import("typebox").TOptional<import("typebox").TString>;
3654
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3655
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3656
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
3657
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
3597
3658
  }>;
3598
3659
  type UserResource = Static<typeof userResourceSchema>;
3599
3660
  //#endregion
@@ -3603,57 +3664,60 @@ declare class SessionService {
3603
3664
  protected readonly fsp: FileSystemProvider;
3604
3665
  protected readonly dateTimeProvider: DateTimeProvider;
3605
3666
  protected readonly cryptoProvider: CryptoProvider;
3606
- protected readonly log: _$alepha_logger0.Logger;
3667
+ protected readonly log: import("alepha/logger").Logger;
3607
3668
  protected readonly realmProvider: RealmProvider;
3608
- protected readonly fileController: _$alepha_server_links0.HttpVirtualClient<FileController>;
3669
+ protected readonly fileController: import("alepha/server/links").HttpVirtualClient<FileController>;
3609
3670
  protected readonly cacheProvider: CacheProvider;
3610
3671
  protected readonly usernameSlugger: UsernameSlugger;
3611
3672
  protected userAudits(realmName?: string): UserAudits | undefined;
3673
+ protected sessionAudits(realmName?: string): SessionAudits | undefined;
3612
3674
  protected userNotifications(realmName?: string): UserNotifications | undefined;
3613
- users(userRealmName?: string): Repository$1<_$typebox.TObject<{
3614
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3615
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3616
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3617
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3618
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
3619
- username: _$typebox.TOptional<_$typebox.TString>;
3620
- email: _$typebox.TOptional<_$typebox.TString>;
3621
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3622
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
3623
- firstName: _$typebox.TOptional<_$typebox.TString>;
3624
- lastName: _$typebox.TOptional<_$typebox.TString>;
3625
- picture: _$typebox.TOptional<_$typebox.TString>;
3626
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3627
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3628
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
3675
+ users(userRealmName?: string): Repository$1<import("typebox").TObject<{
3676
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3677
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3678
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3679
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3680
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
3681
+ username: import("typebox").TOptional<import("typebox").TString>;
3682
+ email: import("typebox").TOptional<import("typebox").TString>;
3683
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3684
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
3685
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3686
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3687
+ picture: import("typebox").TOptional<import("typebox").TString>;
3688
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3689
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3690
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
3691
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
3629
3692
  }>>;
3630
- sessions(userRealmName?: string): Repository$1<_$typebox.TObject<{
3631
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3632
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3633
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3634
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3635
- refreshToken: _$typebox.TString;
3636
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
3637
- clientId: _$typebox.TOptional<_$typebox.TString>;
3638
- expiresAt: _$typebox.TString;
3639
- lastUsedAt: _$typebox.TOptional<_$typebox.TString>;
3640
- ip: _$typebox.TOptional<_$typebox.TString>;
3641
- userAgent: _$typebox.TOptional<_$typebox.TObject<{
3642
- os: _$typebox.TString;
3643
- browser: _$typebox.TString;
3644
- device: _$typebox.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3693
+ sessions(userRealmName?: string): Repository$1<import("typebox").TObject<{
3694
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3695
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3696
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3697
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3698
+ refreshToken: import("typebox").TString;
3699
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
3700
+ clientId: import("typebox").TOptional<import("typebox").TString>;
3701
+ expiresAt: import("typebox").TString;
3702
+ lastUsedAt: import("typebox").TOptional<import("typebox").TString>;
3703
+ ip: import("typebox").TOptional<import("typebox").TString>;
3704
+ country: import("typebox").TOptional<import("typebox").TString>;
3705
+ userAgent: import("typebox").TOptional<import("typebox").TObject<{
3706
+ os: import("typebox").TString;
3707
+ browser: import("typebox").TString;
3708
+ device: import("typebox").TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
3645
3709
  }>>;
3646
3710
  }>>;
3647
- identities(userRealmName?: string): Repository$1<_$typebox.TObject<{
3648
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3649
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3650
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3651
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3652
- userId: PgAttr<_$typebox.TString, typeof PG_REF>;
3653
- password: _$typebox.TOptional<_$typebox.TString>;
3654
- provider: _$typebox.TString;
3655
- providerUserId: _$typebox.TOptional<_$typebox.TString>;
3656
- providerData: _$typebox.TOptional<_$typebox.TRecord<string, _$typebox.TAny>>;
3711
+ identities(userRealmName?: string): Repository$1<import("typebox").TObject<{
3712
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3713
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3714
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3715
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3716
+ userId: PgAttr<import("typebox").TString, typeof PG_REF>;
3717
+ password: import("typebox").TOptional<import("typebox").TString>;
3718
+ provider: import("typebox").TString;
3719
+ providerUserId: import("typebox").TOptional<import("typebox").TString>;
3720
+ providerData: import("typebox").TOptional<import("typebox").TRecord<string, import("typebox").TAny>>;
3657
3721
  }>>;
3658
3722
  /**
3659
3723
  * Check if user should be auto-promoted to admin based on adminEmails/adminUsernames settings.
@@ -3702,38 +3766,40 @@ declare class SessionService {
3702
3766
  sessionId: string;
3703
3767
  }>;
3704
3768
  refreshSession(refreshToken: string, userRealmName?: string): Promise<{
3705
- user: PgStatic<_$typebox.TObject<{
3706
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3707
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3708
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3709
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3710
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
3711
- username: _$typebox.TOptional<_$typebox.TString>;
3712
- email: _$typebox.TOptional<_$typebox.TString>;
3713
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3714
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
3715
- firstName: _$typebox.TOptional<_$typebox.TString>;
3716
- lastName: _$typebox.TOptional<_$typebox.TString>;
3717
- picture: _$typebox.TOptional<_$typebox.TString>;
3718
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3719
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3720
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
3721
- }>, PgRelationMap<_$typebox.TObject<{
3722
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3723
- version: PgAttr<PgAttr<_$typebox.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3724
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3725
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3726
- realm: PgAttr<_$typebox.TString, typeof PG_DEFAULT>;
3727
- username: _$typebox.TOptional<_$typebox.TString>;
3728
- email: _$typebox.TOptional<_$typebox.TString>;
3729
- phoneNumber: _$typebox.TOptional<_$typebox.TString>;
3730
- roles: PgAttr<_$typebox.TArray<_$typebox.TString>, typeof PG_DEFAULT>;
3731
- firstName: _$typebox.TOptional<_$typebox.TString>;
3732
- lastName: _$typebox.TOptional<_$typebox.TString>;
3733
- picture: _$typebox.TOptional<_$typebox.TString>;
3734
- enabled: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3735
- emailVerified: PgAttr<_$typebox.TBoolean, typeof PG_DEFAULT>;
3736
- organizationId: PgAttr<_$typebox.TString, typeof PG_ORGANIZATION>;
3769
+ user: PgStatic<import("typebox").TObject<{
3770
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3771
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3772
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3773
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3774
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
3775
+ username: import("typebox").TOptional<import("typebox").TString>;
3776
+ email: import("typebox").TOptional<import("typebox").TString>;
3777
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3778
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
3779
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3780
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3781
+ picture: import("typebox").TOptional<import("typebox").TString>;
3782
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3783
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3784
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
3785
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
3786
+ }>, PgRelationMap<import("typebox").TObject<{
3787
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
3788
+ version: PgAttr<PgAttr<import("typebox").TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
3789
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
3790
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
3791
+ realm: PgAttr<import("typebox").TString, typeof PG_DEFAULT>;
3792
+ username: import("typebox").TOptional<import("typebox").TString>;
3793
+ email: import("typebox").TOptional<import("typebox").TString>;
3794
+ phoneNumber: import("typebox").TOptional<import("typebox").TString>;
3795
+ roles: PgAttr<import("typebox").TArray<import("typebox").TString>, typeof PG_DEFAULT>;
3796
+ firstName: import("typebox").TOptional<import("typebox").TString>;
3797
+ lastName: import("typebox").TOptional<import("typebox").TString>;
3798
+ picture: import("typebox").TOptional<import("typebox").TString>;
3799
+ enabled: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3800
+ emailVerified: PgAttr<import("typebox").TBoolean, typeof PG_DEFAULT>;
3801
+ lastLoginAt: import("typebox").TOptional<import("typebox").TString>;
3802
+ organizationId: PgAttr<import("typebox").TString, typeof PG_ORGANIZATION>;
3737
3803
  }>>>;
3738
3804
  expiresIn: number;
3739
3805
  sessionId: string;
@@ -3741,20 +3807,21 @@ declare class SessionService {
3741
3807
  deleteSession(refreshToken: string, userRealmName?: string): Promise<void>;
3742
3808
  link(provider: string, profile: OAuth2Profile, userRealmName?: string): Promise<{
3743
3809
  email?: string | undefined;
3744
- phoneNumber?: string | undefined;
3745
3810
  username?: string | undefined;
3811
+ phoneNumber?: string | undefined;
3746
3812
  firstName?: string | undefined;
3747
3813
  lastName?: string | undefined;
3748
3814
  picture?: string | undefined;
3815
+ lastLoginAt?: string | undefined;
3816
+ enabled: boolean;
3749
3817
  id: string;
3750
- createdAt: string;
3751
- organizationId: string;
3752
3818
  version: number;
3819
+ createdAt: string;
3753
3820
  updatedAt: string;
3754
3821
  realm: string;
3755
3822
  roles: string[];
3756
- enabled: boolean;
3757
3823
  emailVerified: boolean;
3824
+ organizationId: string;
3758
3825
  } | {
3759
3826
  sub: string;
3760
3827
  email?: string;
@@ -3803,7 +3870,7 @@ declare class SessionService {
3803
3870
  *
3804
3871
  * @module alepha.api.users
3805
3872
  */
3806
- declare const AlephaApiUsers: _$alepha.Service<_$alepha.Module>;
3873
+ declare const AlephaApiUsers: import("alepha").Service<import("alepha").Module>;
3807
3874
  //#endregion
3808
- export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, FieldRequirement, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmFeatures, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserAudits, UserBuckets, UserController, UserEntity, UserJobs, UserNotifications, UserQuery, UserResource, UserService, UsernameFieldRequirement, UsernameSlugger, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
3875
+ export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, FieldRequirement, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmFeatures, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionAudits, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserAudits, UserBuckets, UserController, UserEntity, UserJobs, UserNotifications, UserQuery, UserResource, UserService, UsernameFieldRequirement, UsernameSlugger, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessionUserSummarySchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
3809
3876
  //# sourceMappingURL=index.d.ts.map