alepha 0.14.2 → 0.14.4

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 (405) hide show
  1. package/README.md +1 -1
  2. package/dist/api/audits/index.browser.js +5 -5
  3. package/dist/api/audits/index.browser.js.map +1 -1
  4. package/dist/api/audits/index.d.ts +706 -785
  5. package/dist/api/audits/index.d.ts.map +1 -1
  6. package/dist/api/audits/index.js +13 -13
  7. package/dist/api/audits/index.js.map +1 -1
  8. package/dist/api/files/index.browser.js +5 -5
  9. package/dist/api/files/index.browser.js.map +1 -1
  10. package/dist/api/files/index.d.ts +58 -137
  11. package/dist/api/files/index.d.ts.map +1 -1
  12. package/dist/api/files/index.js +71 -71
  13. package/dist/api/files/index.js.map +1 -1
  14. package/dist/api/jobs/index.browser.js +5 -5
  15. package/dist/api/jobs/index.browser.js.map +1 -1
  16. package/dist/api/jobs/index.d.ts +29 -108
  17. package/dist/api/jobs/index.d.ts.map +1 -1
  18. package/dist/api/jobs/index.js +10 -10
  19. package/dist/api/jobs/index.js.map +1 -1
  20. package/dist/api/notifications/index.browser.js +10 -10
  21. package/dist/api/notifications/index.browser.js.map +1 -1
  22. package/dist/api/notifications/index.d.ts +504 -171
  23. package/dist/api/notifications/index.d.ts.map +1 -1
  24. package/dist/api/notifications/index.js +12 -12
  25. package/dist/api/notifications/index.js.map +1 -1
  26. package/dist/api/parameters/index.browser.js +163 -10
  27. package/dist/api/parameters/index.browser.js.map +1 -1
  28. package/dist/api/parameters/index.d.ts +277 -351
  29. package/dist/api/parameters/index.d.ts.map +1 -1
  30. package/dist/api/parameters/index.js +196 -91
  31. package/dist/api/parameters/index.js.map +1 -1
  32. package/dist/api/users/index.browser.js +19 -19
  33. package/dist/api/users/index.browser.js.map +1 -1
  34. package/dist/api/users/index.d.ts +787 -852
  35. package/dist/api/users/index.d.ts.map +1 -1
  36. package/dist/api/users/index.js +827 -596
  37. package/dist/api/users/index.js.map +1 -1
  38. package/dist/api/verifications/index.browser.js +6 -6
  39. package/dist/api/verifications/index.browser.js.map +1 -1
  40. package/dist/api/verifications/index.d.ts +128 -128
  41. package/dist/api/verifications/index.d.ts.map +1 -1
  42. package/dist/api/verifications/index.js +6 -6
  43. package/dist/api/verifications/index.js.map +1 -1
  44. package/dist/bin/index.d.ts +1 -2
  45. package/dist/bin/index.js +0 -1
  46. package/dist/bin/index.js.map +1 -1
  47. package/dist/cli/index.d.ts +252 -131
  48. package/dist/cli/index.d.ts.map +1 -1
  49. package/dist/cli/index.js +595 -395
  50. package/dist/cli/index.js.map +1 -1
  51. package/dist/command/index.d.ts +46 -11
  52. package/dist/command/index.d.ts.map +1 -1
  53. package/dist/command/index.js +99 -19
  54. package/dist/command/index.js.map +1 -1
  55. package/dist/core/index.browser.js +40 -22
  56. package/dist/core/index.browser.js.map +1 -1
  57. package/dist/core/index.d.ts +45 -1
  58. package/dist/core/index.d.ts.map +1 -1
  59. package/dist/core/index.js +40 -22
  60. package/dist/core/index.js.map +1 -1
  61. package/dist/core/index.native.js +40 -22
  62. package/dist/core/index.native.js.map +1 -1
  63. package/dist/fake/index.js +195 -168
  64. package/dist/fake/index.js.map +1 -1
  65. package/dist/file/index.d.ts +8 -0
  66. package/dist/file/index.d.ts.map +1 -1
  67. package/dist/file/index.js +3 -0
  68. package/dist/file/index.js.map +1 -1
  69. package/dist/logger/index.d.ts +1 -1
  70. package/dist/logger/index.d.ts.map +1 -1
  71. package/dist/logger/index.js +12 -2
  72. package/dist/logger/index.js.map +1 -1
  73. package/dist/mcp/index.js +1 -1
  74. package/dist/mcp/index.js.map +1 -1
  75. package/dist/orm/index.d.ts +59 -195
  76. package/dist/orm/index.d.ts.map +1 -1
  77. package/dist/orm/index.js +201 -430
  78. package/dist/orm/index.js.map +1 -1
  79. package/dist/security/index.d.ts +1 -1
  80. package/dist/security/index.d.ts.map +1 -1
  81. package/dist/security/index.js +1 -1
  82. package/dist/security/index.js.map +1 -1
  83. package/dist/server/auth/index.d.ts +171 -155
  84. package/dist/server/auth/index.d.ts.map +1 -1
  85. package/dist/server/auth/index.js +0 -1
  86. package/dist/server/auth/index.js.map +1 -1
  87. package/dist/server/cache/index.d.ts +12 -0
  88. package/dist/server/cache/index.d.ts.map +1 -1
  89. package/dist/server/cache/index.js +55 -2
  90. package/dist/server/cache/index.js.map +1 -1
  91. package/dist/server/compress/index.d.ts +6 -0
  92. package/dist/server/compress/index.d.ts.map +1 -1
  93. package/dist/server/compress/index.js +38 -1
  94. package/dist/server/compress/index.js.map +1 -1
  95. package/dist/server/core/index.browser.js +2 -2
  96. package/dist/server/core/index.browser.js.map +1 -1
  97. package/dist/server/core/index.d.ts +10 -10
  98. package/dist/server/core/index.d.ts.map +1 -1
  99. package/dist/server/core/index.js +7 -4
  100. package/dist/server/core/index.js.map +1 -1
  101. package/dist/server/links/index.browser.js +22 -6
  102. package/dist/server/links/index.browser.js.map +1 -1
  103. package/dist/server/links/index.d.ts +46 -44
  104. package/dist/server/links/index.d.ts.map +1 -1
  105. package/dist/server/links/index.js +24 -41
  106. package/dist/server/links/index.js.map +1 -1
  107. package/dist/server/static/index.d.ts.map +1 -1
  108. package/dist/server/static/index.js +4 -0
  109. package/dist/server/static/index.js.map +1 -1
  110. package/dist/server/swagger/index.d.ts +2 -1
  111. package/dist/server/swagger/index.d.ts.map +1 -1
  112. package/dist/server/swagger/index.js +9 -5
  113. package/dist/server/swagger/index.js.map +1 -1
  114. package/dist/vite/index.d.ts +101 -106
  115. package/dist/vite/index.d.ts.map +1 -1
  116. package/dist/vite/index.js +574 -503
  117. package/dist/vite/index.js.map +1 -1
  118. package/dist/websocket/index.d.ts +7 -7
  119. package/package.json +7 -7
  120. package/src/api/audits/controllers/{AuditController.ts → AdminAuditController.ts} +5 -6
  121. package/src/api/audits/entities/audits.ts +5 -5
  122. package/src/api/audits/index.browser.ts +1 -1
  123. package/src/api/audits/index.ts +3 -3
  124. package/src/api/audits/primitives/$audit.spec.ts +276 -0
  125. package/src/api/audits/services/AuditService.spec.ts +495 -0
  126. package/src/api/files/__tests__/$bucket.spec.ts +91 -0
  127. package/src/api/files/controllers/AdminFileStatsController.spec.ts +166 -0
  128. package/src/api/files/controllers/{StorageStatsController.ts → AdminFileStatsController.ts} +2 -2
  129. package/src/api/files/controllers/FileController.spec.ts +558 -0
  130. package/src/api/files/controllers/FileController.ts +4 -5
  131. package/src/api/files/entities/files.ts +5 -5
  132. package/src/api/files/index.browser.ts +1 -1
  133. package/src/api/files/index.ts +4 -4
  134. package/src/api/files/jobs/FileJobs.spec.ts +52 -0
  135. package/src/api/files/services/FileService.spec.ts +109 -0
  136. package/src/api/jobs/__tests__/JobController.spec.ts +343 -0
  137. package/src/api/jobs/controllers/{JobController.ts → AdminJobController.ts} +2 -2
  138. package/src/api/jobs/entities/jobExecutions.ts +5 -5
  139. package/src/api/jobs/index.ts +3 -3
  140. package/src/api/jobs/primitives/$job.spec.ts +476 -0
  141. package/src/api/notifications/controllers/{NotificationController.ts → AdminNotificationController.ts} +4 -5
  142. package/src/api/notifications/entities/notifications.ts +5 -5
  143. package/src/api/notifications/index.browser.ts +1 -1
  144. package/src/api/notifications/index.ts +4 -4
  145. package/src/api/parameters/controllers/{ConfigController.ts → AdminConfigController.ts} +46 -107
  146. package/src/api/parameters/entities/parameters.ts +7 -17
  147. package/src/api/parameters/index.ts +3 -3
  148. package/src/api/parameters/primitives/$config.spec.ts +356 -0
  149. package/src/api/parameters/schemas/activateConfigBodySchema.ts +12 -0
  150. package/src/api/parameters/schemas/checkScheduledResponseSchema.ts +8 -0
  151. package/src/api/parameters/schemas/configCurrentResponseSchema.ts +13 -0
  152. package/src/api/parameters/schemas/configHistoryResponseSchema.ts +9 -0
  153. package/src/api/parameters/schemas/configNameParamSchema.ts +10 -0
  154. package/src/api/parameters/schemas/configNamesResponseSchema.ts +8 -0
  155. package/src/api/parameters/schemas/configTreeNodeSchema.ts +13 -0
  156. package/src/api/parameters/schemas/configVersionParamSchema.ts +9 -0
  157. package/src/api/parameters/schemas/configVersionResponseSchema.ts +9 -0
  158. package/src/api/parameters/schemas/configsByStatusResponseSchema.ts +9 -0
  159. package/src/api/parameters/schemas/createConfigVersionBodySchema.ts +24 -0
  160. package/src/api/parameters/schemas/index.ts +15 -0
  161. package/src/api/parameters/schemas/parameterResponseSchema.ts +26 -0
  162. package/src/api/parameters/schemas/parameterStatusSchema.ts +13 -0
  163. package/src/api/parameters/schemas/rollbackConfigBodySchema.ts +15 -0
  164. package/src/api/parameters/schemas/statusParamSchema.ts +9 -0
  165. package/src/api/users/__tests__/EmailVerification.spec.ts +369 -0
  166. package/src/api/users/__tests__/PasswordReset.spec.ts +550 -0
  167. package/src/api/users/controllers/AdminIdentityController.spec.ts +365 -0
  168. package/src/api/users/controllers/{IdentityController.ts → AdminIdentityController.ts} +3 -4
  169. package/src/api/users/controllers/AdminSessionController.spec.ts +274 -0
  170. package/src/api/users/controllers/{SessionController.ts → AdminSessionController.ts} +3 -4
  171. package/src/api/users/controllers/AdminUserController.spec.ts +372 -0
  172. package/src/api/users/controllers/AdminUserController.ts +116 -0
  173. package/src/api/users/controllers/UserController.ts +4 -107
  174. package/src/api/users/controllers/UserRealmController.ts +3 -0
  175. package/src/api/users/entities/identities.ts +6 -6
  176. package/src/api/users/entities/sessions.ts +6 -6
  177. package/src/api/users/entities/users.ts +9 -9
  178. package/src/api/users/index.ts +9 -6
  179. package/src/api/users/primitives/$userRealm.ts +13 -8
  180. package/src/api/users/services/CredentialService.spec.ts +509 -0
  181. package/src/api/users/services/CredentialService.ts +46 -0
  182. package/src/api/users/services/IdentityService.ts +15 -0
  183. package/src/api/users/services/RegistrationService.spec.ts +630 -0
  184. package/src/api/users/services/RegistrationService.ts +18 -0
  185. package/src/api/users/services/SessionService.spec.ts +301 -0
  186. package/src/api/users/services/SessionService.ts +110 -1
  187. package/src/api/users/services/UserService.ts +67 -2
  188. package/src/api/verifications/__tests__/CodeVerification.spec.ts +318 -0
  189. package/src/api/verifications/__tests__/LinkVerification.spec.ts +279 -0
  190. package/src/api/verifications/entities/verifications.ts +6 -6
  191. package/src/api/verifications/jobs/VerificationJobs.spec.ts +50 -0
  192. package/src/batch/__tests__/startup-buffering.spec.ts +458 -0
  193. package/src/batch/primitives/$batch.spec.ts +766 -0
  194. package/src/batch/providers/BatchProvider.spec.ts +786 -0
  195. package/src/bin/index.ts +0 -1
  196. package/src/bucket/__tests__/shared.ts +194 -0
  197. package/src/bucket/primitives/$bucket.spec.ts +104 -0
  198. package/src/bucket/providers/FileStorageProvider.spec.ts +13 -0
  199. package/src/bucket/providers/LocalFileStorageProvider.spec.ts +77 -0
  200. package/src/bucket/providers/MemoryFileStorageProvider.spec.ts +82 -0
  201. package/src/cache/core/__tests__/shared.ts +377 -0
  202. package/src/cache/core/primitives/$cache.spec.ts +111 -0
  203. package/src/cache/redis/__tests__/cache-redis.spec.ts +70 -0
  204. package/src/cli/apps/AlephaCli.ts +25 -6
  205. package/src/cli/atoms/buildOptions.ts +88 -0
  206. package/src/cli/commands/build.ts +32 -69
  207. package/src/cli/commands/db.ts +0 -4
  208. package/src/cli/commands/dev.ts +34 -10
  209. package/src/cli/commands/gen/changelog.spec.ts +315 -0
  210. package/src/cli/commands/{changelog.ts → gen/changelog.ts} +9 -9
  211. package/src/cli/commands/gen/env.ts +53 -0
  212. package/src/cli/commands/gen/openapi.ts +71 -0
  213. package/src/cli/commands/gen/resource.ts +15 -0
  214. package/src/cli/commands/gen.ts +24 -0
  215. package/src/cli/commands/init.ts +2 -1
  216. package/src/cli/commands/root.ts +12 -3
  217. package/src/cli/commands/test.ts +0 -1
  218. package/src/cli/commands/typecheck.ts +5 -0
  219. package/src/cli/commands/verify.ts +1 -1
  220. package/src/cli/defineConfig.ts +49 -7
  221. package/src/cli/index.ts +2 -2
  222. package/src/cli/services/AlephaCliUtils.ts +105 -55
  223. package/src/cli/services/GitMessageParser.ts +1 -1
  224. package/src/command/helpers/Asker.spec.ts +127 -0
  225. package/src/command/helpers/Runner.spec.ts +126 -0
  226. package/src/command/helpers/Runner.ts +1 -1
  227. package/src/command/primitives/$command.spec.ts +1588 -0
  228. package/src/command/primitives/$command.ts +0 -6
  229. package/src/command/providers/CliProvider.ts +75 -27
  230. package/src/core/Alepha.ts +87 -0
  231. package/src/core/__tests__/Alepha-emit.spec.ts +22 -0
  232. package/src/core/__tests__/Alepha-graph.spec.ts +93 -0
  233. package/src/core/__tests__/Alepha-has.spec.ts +41 -0
  234. package/src/core/__tests__/Alepha-inject.spec.ts +93 -0
  235. package/src/core/__tests__/Alepha-register.spec.ts +81 -0
  236. package/src/core/__tests__/Alepha-start.spec.ts +176 -0
  237. package/src/core/__tests__/Alepha-with.spec.ts +14 -0
  238. package/src/core/__tests__/TypeBox-usecases.spec.ts +35 -0
  239. package/src/core/__tests__/TypeBoxLocale.spec.ts +15 -0
  240. package/src/core/__tests__/descriptor.spec.ts +34 -0
  241. package/src/core/__tests__/fixtures/A.ts +5 -0
  242. package/src/core/__tests__/pagination.spec.ts +77 -0
  243. package/src/core/helpers/jsonSchemaToTypeBox.ts +2 -2
  244. package/src/core/primitives/$atom.spec.ts +43 -0
  245. package/src/core/primitives/$hook.spec.ts +130 -0
  246. package/src/core/primitives/$inject.spec.ts +175 -0
  247. package/src/core/primitives/$module.spec.ts +115 -0
  248. package/src/core/providers/CodecManager.spec.ts +740 -0
  249. package/src/core/providers/EventManager.spec.ts +762 -0
  250. package/src/core/providers/EventManager.ts +4 -0
  251. package/src/core/providers/StateManager.spec.ts +365 -0
  252. package/src/core/providers/TypeProvider.spec.ts +1607 -0
  253. package/src/core/providers/TypeProvider.ts +20 -26
  254. package/src/datetime/primitives/$interval.spec.ts +103 -0
  255. package/src/datetime/providers/DateTimeProvider.spec.ts +86 -0
  256. package/src/email/primitives/$email.spec.ts +175 -0
  257. package/src/email/providers/LocalEmailProvider.spec.ts +341 -0
  258. package/src/fake/__tests__/keyName.example.ts +40 -0
  259. package/src/fake/__tests__/keyName.spec.ts +152 -0
  260. package/src/fake/__tests__/module.example.ts +32 -0
  261. package/src/fake/providers/FakeProvider.spec.ts +438 -0
  262. package/src/file/providers/FileSystemProvider.ts +8 -0
  263. package/src/file/providers/NodeFileSystemProvider.spec.ts +418 -0
  264. package/src/file/providers/NodeFileSystemProvider.ts +5 -0
  265. package/src/file/services/FileDetector.spec.ts +591 -0
  266. package/src/lock/core/__tests__/shared.ts +190 -0
  267. package/src/lock/core/providers/MemoryLockProvider.spec.ts +25 -0
  268. package/src/lock/redis/providers/RedisLockProvider.spec.ts +25 -0
  269. package/src/logger/__tests__/SimpleFormatterProvider.spec.ts +109 -0
  270. package/src/logger/index.ts +15 -3
  271. package/src/logger/primitives/$logger.spec.ts +108 -0
  272. package/src/logger/services/Logger.spec.ts +295 -0
  273. package/src/mcp/__tests__/errors.spec.ts +175 -0
  274. package/src/mcp/__tests__/integration.spec.ts +450 -0
  275. package/src/mcp/helpers/jsonrpc.spec.ts +380 -0
  276. package/src/mcp/primitives/$prompt.spec.ts +468 -0
  277. package/src/mcp/primitives/$resource.spec.ts +390 -0
  278. package/src/mcp/primitives/$tool.spec.ts +406 -0
  279. package/src/mcp/providers/McpServerProvider.spec.ts +797 -0
  280. package/src/mcp/transports/StdioMcpTransport.ts +1 -1
  281. package/src/orm/__tests__/$repository-crud.spec.ts +276 -0
  282. package/src/orm/__tests__/$repository-hooks.spec.ts +325 -0
  283. package/src/orm/__tests__/$repository-orderBy.spec.ts +128 -0
  284. package/src/orm/__tests__/$repository-pagination-sort.spec.ts +149 -0
  285. package/src/orm/__tests__/$repository-save.spec.ts +37 -0
  286. package/src/orm/__tests__/ModelBuilder-integration.spec.ts +490 -0
  287. package/src/orm/__tests__/ModelBuilder-types.spec.ts +186 -0
  288. package/src/orm/__tests__/PostgresProvider.spec.ts +46 -0
  289. package/src/orm/__tests__/delete-returning.spec.ts +256 -0
  290. package/src/orm/__tests__/deletedAt.spec.ts +80 -0
  291. package/src/orm/__tests__/enums.spec.ts +315 -0
  292. package/src/orm/__tests__/execute.spec.ts +72 -0
  293. package/src/orm/__tests__/fixtures/bigEntitySchema.ts +65 -0
  294. package/src/orm/__tests__/fixtures/userEntitySchema.ts +27 -0
  295. package/src/orm/__tests__/joins.spec.ts +1114 -0
  296. package/src/orm/__tests__/page.spec.ts +287 -0
  297. package/src/orm/__tests__/primaryKey.spec.ts +87 -0
  298. package/src/orm/__tests__/query-date-encoding.spec.ts +402 -0
  299. package/src/orm/__tests__/ref-auto-onDelete.spec.ts +156 -0
  300. package/src/orm/__tests__/references.spec.ts +102 -0
  301. package/src/orm/__tests__/security.spec.ts +710 -0
  302. package/src/orm/__tests__/sqlite.spec.ts +111 -0
  303. package/src/orm/__tests__/string-operators.spec.ts +429 -0
  304. package/src/orm/__tests__/timestamps.spec.ts +388 -0
  305. package/src/orm/__tests__/validation.spec.ts +183 -0
  306. package/src/orm/__tests__/version.spec.ts +64 -0
  307. package/src/orm/helpers/parseQueryString.spec.ts +196 -0
  308. package/src/orm/index.ts +2 -8
  309. package/src/orm/primitives/$repository.spec.ts +137 -0
  310. package/src/orm/primitives/$sequence.spec.ts +29 -0
  311. package/src/orm/primitives/$transaction.spec.ts +82 -0
  312. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -3
  313. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  314. package/src/orm/providers/drivers/CloudflareD1Provider.ts +1 -1
  315. package/src/orm/providers/drivers/DatabaseProvider.ts +1 -1
  316. package/src/orm/providers/drivers/NodePostgresProvider.ts +3 -3
  317. package/src/orm/providers/drivers/NodeSqliteProvider.ts +1 -1
  318. package/src/orm/providers/drivers/PglitePostgresProvider.ts +2 -2
  319. package/src/orm/services/ModelBuilder.spec.ts +575 -0
  320. package/src/orm/services/Repository.spec.ts +137 -0
  321. package/src/queue/core/__tests__/shared.ts +143 -0
  322. package/src/queue/core/providers/MemoryQueueProvider.spec.ts +23 -0
  323. package/src/queue/core/providers/WorkerProvider.spec.ts +394 -0
  324. package/src/queue/redis/providers/RedisQueueProvider.spec.ts +23 -0
  325. package/src/redis/__tests__/redis.spec.ts +58 -0
  326. package/src/retry/primitives/$retry.spec.ts +234 -0
  327. package/src/retry/providers/RetryProvider.spec.ts +438 -0
  328. package/src/router/__tests__/match.spec.ts +252 -0
  329. package/src/router/providers/RouterProvider.spec.ts +197 -0
  330. package/src/scheduler/__tests__/$scheduler-cron.spec.ts +25 -0
  331. package/src/scheduler/__tests__/$scheduler-interval.spec.ts +25 -0
  332. package/src/scheduler/__tests__/shared.ts +77 -0
  333. package/src/security/__tests__/bug-1-wildcard-after-start.spec.ts +229 -0
  334. package/src/security/__tests__/bug-2-password-validation.spec.ts +245 -0
  335. package/src/security/__tests__/bug-3-regex-vulnerability.spec.ts +407 -0
  336. package/src/security/__tests__/bug-4-oauth2-validation.spec.ts +439 -0
  337. package/src/security/__tests__/multi-layer-permissions.spec.ts +522 -0
  338. package/src/security/primitives/$permission.spec.ts +30 -0
  339. package/src/security/primitives/$permission.ts +2 -2
  340. package/src/security/primitives/$realm.spec.ts +101 -0
  341. package/src/security/primitives/$role.spec.ts +52 -0
  342. package/src/security/primitives/$serviceAccount.spec.ts +61 -0
  343. package/src/security/providers/SecurityProvider.spec.ts +350 -0
  344. package/src/server/auth/providers/ServerAuthProvider.ts +0 -2
  345. package/src/server/cache/providers/ServerCacheProvider.spec.ts +1125 -0
  346. package/src/server/cache/providers/ServerCacheProvider.ts +94 -9
  347. package/src/server/compress/providers/ServerCompressProvider.spec.ts +31 -0
  348. package/src/server/compress/providers/ServerCompressProvider.ts +63 -2
  349. package/src/server/cookies/providers/ServerCookiesProvider.spec.ts +253 -0
  350. package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +334 -0
  351. package/src/server/core/__tests__/ServerRouterProvider-requestId.spec.ts +129 -0
  352. package/src/server/core/helpers/ServerReply.ts +2 -2
  353. package/src/server/core/primitives/$action.spec.ts +191 -0
  354. package/src/server/core/primitives/$route.spec.ts +65 -0
  355. package/src/server/core/providers/ServerBodyParserProvider.spec.ts +93 -0
  356. package/src/server/core/providers/ServerLoggerProvider.spec.ts +100 -0
  357. package/src/server/core/providers/ServerProvider.ts +14 -2
  358. package/src/server/core/services/HttpClient.spec.ts +123 -0
  359. package/src/server/core/services/UserAgentParser.spec.ts +111 -0
  360. package/src/server/cors/providers/ServerCorsProvider.spec.ts +481 -0
  361. package/src/server/health/providers/ServerHealthProvider.spec.ts +22 -0
  362. package/src/server/helmet/providers/ServerHelmetProvider.spec.ts +105 -0
  363. package/src/server/links/__tests__/$action.spec.ts +238 -0
  364. package/src/server/links/__tests__/fixtures/CrudApp.ts +122 -0
  365. package/src/server/links/__tests__/requestId.spec.ts +120 -0
  366. package/src/server/links/primitives/$remote.spec.ts +228 -0
  367. package/src/server/links/providers/LinkProvider.spec.ts +54 -0
  368. package/src/server/links/providers/LinkProvider.ts +49 -3
  369. package/src/server/links/providers/ServerLinksProvider.ts +1 -53
  370. package/src/server/links/schemas/apiLinksResponseSchema.ts +7 -0
  371. package/src/server/metrics/providers/ServerMetricsProvider.spec.ts +25 -0
  372. package/src/server/multipart/providers/ServerMultipartProvider.spec.ts +528 -0
  373. package/src/server/proxy/primitives/$proxy.spec.ts +87 -0
  374. package/src/server/rate-limit/__tests__/ActionRateLimit.spec.ts +211 -0
  375. package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +344 -0
  376. package/src/server/security/__tests__/BasicAuth.spec.ts +684 -0
  377. package/src/server/security/__tests__/ServerSecurityProvider-realm.spec.ts +388 -0
  378. package/src/server/security/providers/ServerSecurityProvider.spec.ts +123 -0
  379. package/src/server/static/primitives/$serve.spec.ts +193 -0
  380. package/src/server/static/providers/ServerStaticProvider.ts +10 -0
  381. package/src/server/swagger/__tests__/ui.spec.ts +52 -0
  382. package/src/server/swagger/primitives/$swagger.spec.ts +193 -0
  383. package/src/server/swagger/providers/ServerSwaggerProvider.ts +19 -12
  384. package/src/sms/primitives/$sms.spec.ts +165 -0
  385. package/src/sms/providers/LocalSmsProvider.spec.ts +224 -0
  386. package/src/sms/providers/MemorySmsProvider.spec.ts +193 -0
  387. package/src/thread/primitives/$thread.spec.ts +186 -0
  388. package/src/topic/core/__tests__/shared.ts +144 -0
  389. package/src/topic/core/providers/MemoryTopicProvider.spec.ts +23 -0
  390. package/src/topic/redis/providers/RedisTopicProvider.spec.ts +23 -0
  391. package/src/vite/helpers/importViteReact.ts +13 -0
  392. package/src/vite/index.ts +1 -21
  393. package/src/vite/plugins/viteAlephaDev.ts +32 -5
  394. package/src/vite/plugins/viteAlephaSsrPreload.ts +222 -0
  395. package/src/vite/tasks/buildClient.ts +11 -0
  396. package/src/vite/tasks/buildServer.ts +47 -3
  397. package/src/vite/tasks/devServer.ts +69 -0
  398. package/src/vite/tasks/index.ts +2 -1
  399. package/src/vite/tasks/runAlepha.ts +7 -1
  400. package/src/websocket/__tests__/$websocket-new.spec.ts +195 -0
  401. package/src/websocket/primitives/$channel.spec.ts +30 -0
  402. package/src/cli/assets/viteConfigTs.ts +0 -14
  403. package/src/cli/commands/run.ts +0 -24
  404. package/src/vite/plugins/viteAlepha.ts +0 -37
  405. package/src/vite/plugins/viteAlephaBuild.ts +0 -281
@@ -2,22 +2,19 @@ import * as alepha1 from "alepha";
2
2
  import { Alepha, AlephaError, Page, PageQuery, Primitive, Static, StaticEncode, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
3
3
  import * as alepha_api_notifications0 from "alepha/api/notifications";
4
4
  import { VerificationController } from "alepha/api/verifications";
5
- import * as alepha_orm179 from "alepha/orm";
5
+ import * as alepha_server0 from "alepha/server";
6
+ import * as alepha_orm0 from "alepha/orm";
6
7
  import { Page as Page$1, Repository } from "alepha/orm";
7
- import * as alepha_server14 from "alepha/server";
8
- import * as alepha_logger0 from "alepha/logger";
8
+ import { AuditService } from "alepha/api/audits";
9
+ import * as alepha_logger5 from "alepha/logger";
9
10
  import * as alepha_bucket0 from "alepha/bucket";
11
+ import * as alepha_server_links2 from "alepha/server/links";
10
12
  import * as alepha_cache0 from "alepha/cache";
11
13
  import { DateTime, DateTimeProvider } from "alepha/datetime";
12
14
  import { CryptoProvider, RealmPrimitive, RealmPrimitiveOptions, UserAccount } from "alepha/security";
13
- import * as alepha_server_links0 from "alepha/server/links";
14
15
  import { OAuth2Profile, ServerAuthProvider, WithLinkFn, WithLoginFn } from "alepha/server/auth";
15
16
  import { FileSystemProvider } from "alepha/file";
16
17
  import { FileController } from "alepha/api/files";
17
- import "bun";
18
- import "bun:sqlite";
19
- import "drizzle-orm/bun-sql";
20
- import "drizzle-orm/bun-sqlite";
21
18
  import "drizzle-orm/d1";
22
19
  import * as drizzle_orm0 from "drizzle-orm";
23
20
  import { BuildExtraConfigColumns, SQL, SQLWrapper } from "drizzle-orm";
@@ -26,8 +23,8 @@ import { LockConfig, LockStrength, PgColumn, PgColumnBuilderBase, PgDatabase, Pg
26
23
  import { PgTransactionConfig } from "drizzle-orm/pg-core/session";
27
24
  import * as DrizzleKit from "drizzle-kit/api";
28
25
  import "alepha/retry";
29
- import "alepha/lock";
30
26
  import "drizzle-orm/sqlite-core";
27
+ import "alepha/lock";
31
28
  import "drizzle-orm/postgres-js";
32
29
  import "postgres";
33
30
 
@@ -58,485 +55,91 @@ declare const realmAuthSettingsAtom: alepha1.Atom<alepha1.TObject<{
58
55
  }>, "alepha.api.users.realmAuthSettings">;
59
56
  type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
60
57
  //#endregion
61
- //#region ../../src/api/users/entities/identities.d.ts
62
- declare const identities: alepha_orm179.EntityPrimitive<alepha1.TObject<{
63
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
64
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
65
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
66
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
67
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
68
- password: alepha1.TOptional<alepha1.TString>;
69
- provider: alepha1.TString;
70
- providerUserId: alepha1.TOptional<alepha1.TString>;
71
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
72
- }>>;
73
- type IdentityEntity = Static<typeof identities.schema>;
74
- //#endregion
75
- //#region ../../src/api/users/entities/sessions.d.ts
76
- declare const sessions: alepha_orm179.EntityPrimitive<alepha1.TObject<{
77
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
78
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
79
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
80
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
81
- refreshToken: alepha1.TString;
82
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
83
- expiresAt: alepha1.TString;
84
- ip: alepha1.TOptional<alepha1.TString>;
85
- userAgent: alepha1.TOptional<alepha1.TObject<{
86
- os: alepha1.TString;
87
- browser: alepha1.TString;
88
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
89
- }>>;
90
- }>>;
91
- type SessionEntity = Static<typeof sessions.schema>;
92
- //#endregion
93
- //#region ../../src/api/users/entities/users.d.ts
94
- declare const DEFAULT_USER_REALM_NAME = "default";
95
- declare const users: alepha_orm179.EntityPrimitive<alepha1.TObject<{
96
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
97
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
98
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
99
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
100
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
101
- username: alepha1.TOptional<alepha1.TString>;
102
- email: alepha1.TOptional<alepha1.TString>;
103
- phoneNumber: alepha1.TOptional<alepha1.TString>;
104
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
105
- firstName: alepha1.TOptional<alepha1.TString>;
106
- lastName: alepha1.TOptional<alepha1.TString>;
107
- picture: alepha1.TOptional<alepha1.TString>;
108
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
109
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
110
- }>>;
111
- type UserEntity = Static<typeof users.schema>;
112
- //#endregion
113
- //#region ../../src/api/users/primitives/$userRealm.d.ts
114
- type UserRealmPrimitive = RealmPrimitive & WithLinkFn & WithLoginFn;
58
+ //#region ../../src/orm/schemas/insertSchema.d.ts
115
59
  /**
116
- * Already configured realm for user management.
117
- *
118
- * Realm contains two roles: `admin` and `user`.
119
- *
120
- * - `admin`: Has full access to all resources and permissions.
121
- * - `user`: Has access to their own resources and permissions, but cannot access admin-level resources.
122
- *
123
- * Realm uses session management for handling user sessions.
60
+ * Transforms a TObject schema for insert operations.
61
+ * All default properties at the root level are made optional.
124
62
  *
125
- * Environment Variables:
126
- * - `APP_SECRET`: Secret key for signing tokens (if not provided in options).
63
+ * @example
64
+ * Before: { name: string; age: number(default=0); }
65
+ * After: { name: string; age?: number; }
127
66
  */
128
- declare const $userRealm: (options?: UserRealmOptions) => UserRealmPrimitive;
129
- interface UserRealmOptions {
130
- /**
131
- * Secret key for signing tokens.
132
- *
133
- * If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
134
- */
135
- secret?: string;
136
- /**
137
- * Realm configuration options.
138
- *
139
- * It's already pre-configured for user management with admin and user roles.
140
- */
141
- realm?: Partial<RealmPrimitiveOptions>;
142
- /**
143
- * Override entities.
144
- */
145
- entities?: {
146
- users?: Repository<typeof users.schema>;
147
- identities?: Repository<typeof identities.schema>;
148
- sessions?: Repository<typeof sessions.schema>;
149
- };
150
- settings?: Partial<RealmAuthSettings>;
151
- identities?: {
152
- credentials?: true;
153
- google?: true;
154
- github?: true;
155
- };
156
- modules?: {
157
- files?: boolean;
158
- audits?: boolean;
159
- jobs?: boolean;
160
- };
161
- }
162
- //#endregion
163
- //#region ../../src/api/users/providers/UserRealmProvider.d.ts
164
- interface UserRealmRepositories {
165
- identities: Repository<typeof identities.schema>;
166
- sessions: Repository<typeof sessions.schema>;
167
- users: Repository<typeof users.schema>;
168
- }
169
- interface UserRealm {
170
- name: string;
171
- repositories: UserRealmRepositories;
172
- settings: RealmAuthSettings;
173
- }
174
- declare class UserRealmProvider {
175
- protected readonly alepha: Alepha;
176
- protected readonly defaultIdentities: Repository<alepha1.TObject<{
177
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
178
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
179
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
180
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
181
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
182
- password: alepha1.TOptional<alepha1.TString>;
183
- provider: alepha1.TString;
184
- providerUserId: alepha1.TOptional<alepha1.TString>;
185
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
186
- }>>;
187
- protected readonly defaultSessions: Repository<alepha1.TObject<{
188
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
189
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
190
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
191
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
192
- refreshToken: alepha1.TString;
193
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
194
- expiresAt: alepha1.TString;
195
- ip: alepha1.TOptional<alepha1.TString>;
196
- userAgent: alepha1.TOptional<alepha1.TObject<{
197
- os: alepha1.TString;
198
- browser: alepha1.TString;
199
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
200
- }>>;
201
- }>>;
202
- protected readonly defaultUsers: Repository<alepha1.TObject<{
203
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
204
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
205
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
206
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
207
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
208
- username: alepha1.TOptional<alepha1.TString>;
209
- email: alepha1.TOptional<alepha1.TString>;
210
- phoneNumber: alepha1.TOptional<alepha1.TString>;
211
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
212
- firstName: alepha1.TOptional<alepha1.TString>;
213
- lastName: alepha1.TOptional<alepha1.TString>;
214
- picture: alepha1.TOptional<alepha1.TString>;
215
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
216
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
217
- }>>;
218
- protected realms: Map<string, UserRealm>;
219
- avatars: alepha_bucket0.BucketPrimitive;
220
- protected readonly onConfigure: alepha1.HookPrimitive<"configure">;
221
- register(userRealmName: string, userRealmOptions?: UserRealmOptions): UserRealm;
222
- /**
223
- * Gets a registered realm by name, auto-creating default if needed.
224
- */
225
- getRealm(userRealmName?: string): UserRealm;
226
- identityRepository(userRealmName?: string): Repository<typeof identities.schema>;
227
- sessionRepository(userRealmName?: string): Repository<typeof sessions.schema>;
228
- userRepository(userRealmName?: string): Repository<typeof users.schema>;
229
- }
67
+ type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends {
68
+ [PG_DEFAULT]: any;
69
+ } | {
70
+ "~optional": true;
71
+ } ? TOptional<T["properties"][K]> : T["properties"][K] }>;
230
72
  //#endregion
231
- //#region ../../src/api/users/schemas/identityQuerySchema.d.ts
232
- declare const identityQuerySchema: alepha1.TObject<{
233
- page: alepha1.TOptional<alepha1.TInteger>;
234
- size: alepha1.TOptional<alepha1.TInteger>;
235
- sort: alepha1.TOptional<alepha1.TString>;
236
- userId: alepha1.TOptional<alepha1.TString>;
237
- provider: alepha1.TOptional<alepha1.TString>;
238
- }>;
239
- type IdentityQuery = Static<typeof identityQuerySchema>;
73
+ //#region ../../src/orm/schemas/updateSchema.d.ts
74
+ /**
75
+ * Transforms a TObject schema for update operations.
76
+ * All optional properties at the root level are made nullable (i.e., `T | null`).
77
+ * This allows an API endpoint to explicitly accept `null` to clear an optional field in the database.
78
+ *
79
+ * @example
80
+ * Before: { name?: string; age: number; }
81
+ * After: { name?: string | null; age: number; }
82
+ */
83
+ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
240
84
  //#endregion
241
- //#region ../../src/api/users/services/IdentityService.d.ts
242
- declare class IdentityService {
243
- protected readonly log: alepha_logger0.Logger;
244
- protected readonly userRealmProvider: UserRealmProvider;
245
- identities(userRealmName?: string): alepha_orm179.Repository<alepha1.TObject<{
246
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
247
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
248
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
249
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
250
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
251
- password: alepha1.TOptional<alepha1.TString>;
252
- provider: alepha1.TString;
253
- providerUserId: alepha1.TOptional<alepha1.TString>;
254
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
255
- }>>;
85
+ //#region ../../src/orm/primitives/$entity.d.ts
86
+ interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
256
87
  /**
257
- * Find identities with pagination and filtering.
88
+ * The database table name that will be created for this entity.
89
+ * If not provided, name will be inferred from the $repository variable name.
258
90
  */
259
- findIdentities(q?: IdentityQuery, userRealmName?: string): Promise<Page$1<IdentityEntity>>;
91
+ name: string;
260
92
  /**
261
- * Get an identity by ID.
93
+ * TypeBox schema defining the table structure and column types.
262
94
  */
263
- getIdentityById(id: string, userRealmName?: string): Promise<IdentityEntity>;
95
+ schema: T;
264
96
  /**
265
- * Delete an identity by ID.
97
+ * Database indexes to create for query optimization.
266
98
  */
267
- deleteIdentity(id: string, userRealmName?: string): Promise<void>;
268
- }
269
- //#endregion
270
- //#region ../../src/api/users/controllers/IdentityController.d.ts
271
- declare class IdentityController {
272
- protected readonly url = "/identities";
273
- protected readonly group = "identities";
274
- protected readonly identityService: IdentityService;
99
+ indexes?: (Keys | {
100
+ /**
101
+ * Single column to index.
102
+ */
103
+ column: Keys;
104
+ /**
105
+ * Whether this should be a unique index (enforces uniqueness constraint).
106
+ */
107
+ unique?: boolean;
108
+ /**
109
+ * Custom name for the index. If not provided, generates name automatically.
110
+ */
111
+ name?: string;
112
+ } | {
113
+ /**
114
+ * Multiple columns for composite index (order matters for query optimization).
115
+ */
116
+ columns: Keys[];
117
+ /**
118
+ * Whether this should be a unique index (enforces uniqueness constraint).
119
+ */
120
+ unique?: boolean;
121
+ /**
122
+ * Custom name for the index. If not provided, generates name automatically.
123
+ */
124
+ name?: string;
125
+ })[];
275
126
  /**
276
- * Find identities with pagination and filtering.
127
+ * Foreign key constraints to maintain referential integrity.
277
128
  */
278
- readonly findIdentities: alepha_server14.ActionPrimitiveFn<{
279
- query: alepha1.TObject<{
280
- page: alepha1.TOptional<alepha1.TInteger>;
281
- size: alepha1.TOptional<alepha1.TInteger>;
282
- sort: alepha1.TOptional<alepha1.TString>;
283
- userId: alepha1.TOptional<alepha1.TString>;
284
- provider: alepha1.TOptional<alepha1.TString>;
285
- userRealmName: alepha1.TOptional<alepha1.TString>;
286
- }>;
287
- response: alepha1.TPage<alepha1.TObject<{
288
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
289
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
290
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
291
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
292
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
293
- provider: alepha1.TString;
294
- providerUserId: alepha1.TOptional<alepha1.TString>;
295
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
296
- }>>;
297
- }>;
298
- /**
299
- * Get an identity by ID.
300
- */
301
- readonly getIdentity: alepha_server14.ActionPrimitiveFn<{
302
- params: alepha1.TObject<{
303
- id: alepha1.TString;
304
- }>;
305
- query: alepha1.TObject<{
306
- userRealmName: alepha1.TOptional<alepha1.TString>;
307
- }>;
308
- response: alepha1.TObject<{
309
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
310
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
311
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
312
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
313
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
314
- provider: alepha1.TString;
315
- providerUserId: alepha1.TOptional<alepha1.TString>;
316
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
317
- }>;
318
- }>;
319
- /**
320
- * Delete an identity.
321
- */
322
- readonly deleteIdentity: alepha_server14.ActionPrimitiveFn<{
323
- params: alepha1.TObject<{
324
- id: alepha1.TString;
325
- }>;
326
- query: alepha1.TObject<{
327
- userRealmName: alepha1.TOptional<alepha1.TString>;
328
- }>;
329
- response: alepha1.TObject<{
330
- ok: alepha1.TBoolean;
331
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
332
- count: alepha1.TOptional<alepha1.TNumber>;
333
- }>;
334
- }>;
335
- }
336
- //#endregion
337
- //#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
338
- declare const sessionQuerySchema: alepha1.TObject<{
339
- page: alepha1.TOptional<alepha1.TInteger>;
340
- size: alepha1.TOptional<alepha1.TInteger>;
341
- sort: alepha1.TOptional<alepha1.TString>;
342
- userId: alepha1.TOptional<alepha1.TString>;
343
- }>;
344
- type SessionQuery = Static<typeof sessionQuerySchema>;
345
- //#endregion
346
- //#region ../../src/api/users/services/SessionCrudService.d.ts
347
- declare class SessionCrudService {
348
- protected readonly log: alepha_logger0.Logger;
349
- protected readonly userRealmProvider: UserRealmProvider;
350
- sessions(userRealmName?: string): alepha_orm179.Repository<alepha1.TObject<{
351
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
352
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
353
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
354
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
355
- refreshToken: alepha1.TString;
356
- userId: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_REF>;
357
- expiresAt: alepha1.TString;
358
- ip: alepha1.TOptional<alepha1.TString>;
359
- userAgent: alepha1.TOptional<alepha1.TObject<{
360
- os: alepha1.TString;
361
- browser: alepha1.TString;
362
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
363
- }>>;
364
- }>>;
365
- /**
366
- * Find sessions with pagination and filtering.
367
- */
368
- findSessions(q?: SessionQuery, userRealmName?: string): Promise<Page$1<SessionEntity>>;
369
- /**
370
- * Get a session by ID.
371
- */
372
- getSessionById(id: string, userRealmName?: string): Promise<SessionEntity>;
373
- /**
374
- * Delete a session by ID.
375
- */
376
- deleteSession(id: string, userRealmName?: string): Promise<void>;
377
- }
378
- //#endregion
379
- //#region ../../src/api/users/controllers/SessionController.d.ts
380
- declare class SessionController {
381
- protected readonly url = "/sessions";
382
- protected readonly group = "sessions";
383
- protected readonly sessionService: SessionCrudService;
384
- /**
385
- * Find sessions with pagination and filtering.
386
- */
387
- readonly findSessions: alepha_server14.ActionPrimitiveFn<{
388
- query: alepha1.TObject<{
389
- page: alepha1.TOptional<alepha1.TInteger>;
390
- size: alepha1.TOptional<alepha1.TInteger>;
391
- sort: alepha1.TOptional<alepha1.TString>;
392
- userId: alepha1.TOptional<alepha1.TString>;
393
- userRealmName: alepha1.TOptional<alepha1.TString>;
394
- }>;
395
- response: alepha1.TPage<alepha1.TObject<{
396
- id: alepha1.TString;
397
- version: alepha1.TNumber;
398
- createdAt: alepha1.TString;
399
- updatedAt: alepha1.TString;
400
- refreshToken: alepha1.TString;
401
- userId: alepha1.TString;
402
- expiresAt: alepha1.TString;
403
- ip: alepha1.TOptional<alepha1.TString>;
404
- userAgent: alepha1.TOptional<alepha1.TObject<{
405
- os: alepha1.TString;
406
- browser: alepha1.TString;
407
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
408
- }>>;
409
- }>>;
410
- }>;
411
- /**
412
- * Get a session by ID.
413
- */
414
- readonly getSession: alepha_server14.ActionPrimitiveFn<{
415
- params: alepha1.TObject<{
416
- id: alepha1.TString;
417
- }>;
418
- query: alepha1.TObject<{
419
- userRealmName: alepha1.TOptional<alepha1.TString>;
420
- }>;
421
- response: alepha1.TObject<{
422
- id: alepha1.TString;
423
- version: alepha1.TNumber;
424
- createdAt: alepha1.TString;
425
- updatedAt: alepha1.TString;
426
- refreshToken: alepha1.TString;
427
- userId: alepha1.TString;
428
- expiresAt: alepha1.TString;
429
- ip: alepha1.TOptional<alepha1.TString>;
430
- userAgent: alepha1.TOptional<alepha1.TObject<{
431
- os: alepha1.TString;
432
- browser: alepha1.TString;
433
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
434
- }>>;
435
- }>;
436
- }>;
437
- /**
438
- * Delete a session.
439
- */
440
- readonly deleteSession: alepha_server14.ActionPrimitiveFn<{
441
- params: alepha1.TObject<{
442
- id: alepha1.TString;
443
- }>;
444
- query: alepha1.TObject<{
445
- userRealmName: alepha1.TOptional<alepha1.TString>;
446
- }>;
447
- response: alepha1.TObject<{
448
- ok: alepha1.TBoolean;
449
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
450
- count: alepha1.TOptional<alepha1.TNumber>;
451
- }>;
452
- }>;
453
- }
454
- //#endregion
455
- //#region ../../src/orm/schemas/insertSchema.d.ts
456
- /**
457
- * Transforms a TObject schema for insert operations.
458
- * All default properties at the root level are made optional.
459
- *
460
- * @example
461
- * Before: { name: string; age: number(default=0); }
462
- * After: { name: string; age?: number; }
463
- */
464
- type TObjectInsert<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends {
465
- [PG_DEFAULT]: any;
466
- } | {
467
- "~optional": true;
468
- } ? TOptional<T["properties"][K]> : T["properties"][K] }>;
469
- //#endregion
470
- //#region ../../src/orm/schemas/updateSchema.d.ts
471
- /**
472
- * Transforms a TObject schema for update operations.
473
- * All optional properties at the root level are made nullable (i.e., `T | null`).
474
- * This allows an API endpoint to explicitly accept `null` to clear an optional field in the database.
475
- *
476
- * @example
477
- * Before: { name?: string; age: number; }
478
- * After: { name?: string | null; age: number; }
479
- */
480
- type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]: T["properties"][K] extends TOptional<infer U> ? TOptional<TUnion<[U, TNull]>> : T["properties"][K] }>;
481
- //#endregion
482
- //#region ../../src/orm/primitives/$entity.d.ts
483
- interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
484
- /**
485
- * The database table name that will be created for this entity.
486
- * If not provided, name will be inferred from the $repository variable name.
487
- */
488
- name: string;
489
- /**
490
- * TypeBox schema defining the table structure and column types.
491
- */
492
- schema: T;
493
- /**
494
- * Database indexes to create for query optimization.
495
- */
496
- indexes?: (Keys | {
497
- /**
498
- * Single column to index.
499
- */
500
- column: Keys;
501
- /**
502
- * Whether this should be a unique index (enforces uniqueness constraint).
503
- */
504
- unique?: boolean;
505
- /**
506
- * Custom name for the index. If not provided, generates name automatically.
507
- */
508
- name?: string;
509
- } | {
510
- /**
511
- * Multiple columns for composite index (order matters for query optimization).
512
- */
513
- columns: Keys[];
514
- /**
515
- * Whether this should be a unique index (enforces uniqueness constraint).
516
- */
517
- unique?: boolean;
518
- /**
519
- * Custom name for the index. If not provided, generates name automatically.
520
- */
521
- name?: string;
522
- })[];
523
- /**
524
- * Foreign key constraints to maintain referential integrity.
525
- */
526
- foreignKeys?: Array<{
527
- /**
528
- * Optional name for the foreign key constraint.
529
- */
530
- name?: string;
531
- /**
532
- * Local columns that reference the foreign table.
533
- */
534
- columns: Array<keyof Static<T>>;
535
- /**
536
- * Referenced columns in the foreign table.
537
- * Must be EntityColumn references from other entities.
538
- */
539
- foreignColumns: Array<() => EntityColumn<any>>;
129
+ foreignKeys?: Array<{
130
+ /**
131
+ * Optional name for the foreign key constraint.
132
+ */
133
+ name?: string;
134
+ /**
135
+ * Local columns that reference the foreign table.
136
+ */
137
+ columns: Array<keyof Static<T>>;
138
+ /**
139
+ * Referenced columns in the foreign table.
140
+ * Must be EntityColumn references from other entities.
141
+ */
142
+ foreignColumns: Array<() => EntityColumn<any>>;
540
143
  }>;
541
144
  /**
542
145
  * Additional table constraints for data validation.
@@ -1303,7 +906,7 @@ declare abstract class ModelBuilder {
1303
906
  //#endregion
1304
907
  //#region ../../src/orm/providers/DrizzleKitProvider.d.ts
1305
908
  declare class DrizzleKitProvider {
1306
- protected readonly log: alepha_logger0.Logger;
909
+ protected readonly log: alepha_logger5.Logger;
1307
910
  protected readonly alepha: Alepha;
1308
911
  /**
1309
912
  * Synchronize database with current schema definitions.
@@ -1351,7 +954,7 @@ type DevMigrations = Static<typeof devMigrationsSchema>;
1351
954
  type SQLLike = SQLWrapper | string;
1352
955
  declare abstract class DatabaseProvider {
1353
956
  protected readonly alepha: Alepha;
1354
- protected readonly log: alepha_logger0.Logger;
957
+ protected readonly log: alepha_logger5.Logger;
1355
958
  protected abstract readonly builder: ModelBuilder;
1356
959
  protected abstract readonly kit: DrizzleKitProvider;
1357
960
  abstract readonly db: PgDatabase<any>;
@@ -1374,7 +977,7 @@ declare abstract class DatabaseProvider {
1374
977
  /**
1375
978
  * Base migration orchestration - handles environment logic
1376
979
  */
1377
- protected migrateDatabase(): Promise<void>;
980
+ migrate(): Promise<void>;
1378
981
  /**
1379
982
  * Production: run migrations from folder
1380
983
  */
@@ -1776,81 +1379,6 @@ interface StatementOptions {
1776
1379
  now?: DateTime | string;
1777
1380
  }
1778
1381
  //#endregion
1779
- //#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
1780
- declare module "alepha" {
1781
- interface Env extends Partial<Static<typeof envSchema$1>> {}
1782
- }
1783
- declare const envSchema$1: alepha1.TObject<{
1784
- /**
1785
- * Main configuration for database connection.
1786
- * Accept a string in the format of a Postgres connection URL.
1787
- * Example: postgres://user:password@localhost:5432/database
1788
- * or
1789
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
1790
- */
1791
- DATABASE_URL: alepha1.TOptional<alepha1.TString>;
1792
- /**
1793
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
1794
- */
1795
- POSTGRES_SCHEMA: alepha1.TOptional<alepha1.TString>;
1796
- }>;
1797
- /**
1798
- * Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
1799
- *
1800
- * This provider uses Bun's built-in SQL class for PostgreSQL connections,
1801
- * which provides excellent performance on the Bun runtime.
1802
- *
1803
- * @example
1804
- * ```ts
1805
- * // Set DATABASE_URL environment variable
1806
- * // DATABASE_URL=postgres://user:password@localhost:5432/database
1807
- *
1808
- * // Or configure programmatically
1809
- * alepha.with({
1810
- * provide: DatabaseProvider,
1811
- * use: BunPostgresProvider,
1812
- * });
1813
- * ```
1814
- */
1815
- //#endregion
1816
- //#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
1817
- /**
1818
- * Configuration options for the Bun SQLite database provider.
1819
- */
1820
- declare const bunSqliteOptions: alepha1.Atom<alepha1.TObject<{
1821
- path: alepha1.TOptional<alepha1.TString>;
1822
- }>, "alepha.postgres.bun-sqlite.options">;
1823
- type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
1824
- declare module "alepha" {
1825
- interface State {
1826
- [bunSqliteOptions.key]: BunSqliteProviderOptions;
1827
- }
1828
- }
1829
- /**
1830
- * Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
1831
- *
1832
- * This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
1833
- * which provides excellent performance on the Bun runtime.
1834
- *
1835
- * @example
1836
- * ```ts
1837
- * // Set DATABASE_URL environment variable
1838
- * // DATABASE_URL=sqlite://./my-database.db
1839
- *
1840
- * // Or configure programmatically
1841
- * alepha.with({
1842
- * provide: DatabaseProvider,
1843
- * use: BunSqliteProvider,
1844
- * });
1845
- *
1846
- * // Or use options atom
1847
- * alepha.store.mut(bunSqliteOptions, (old) => ({
1848
- * ...old,
1849
- * path: ":memory:",
1850
- * }));
1851
- * ```
1852
- */
1853
- //#endregion
1854
1382
  //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
1855
1383
  declare module "alepha" {
1856
1384
  interface Env extends Partial<Static<typeof envSchema>> {}
@@ -1960,16 +1488,411 @@ declare module "alepha" {
1960
1488
  }
1961
1489
  }
1962
1490
  //#endregion
1963
- //#region ../../src/api/users/notifications/UserNotifications.d.ts
1964
- declare class UserNotifications {
1965
- readonly passwordReset: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1966
- email: alepha1.TString;
1967
- code: alepha1.TString;
1968
- expiresInMinutes: alepha1.TNumber;
1969
- }>>;
1970
- readonly emailVerification: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1971
- email: alepha1.TString;
1972
- code: alepha1.TString;
1491
+ //#region ../../src/api/users/entities/identities.d.ts
1492
+ declare const identities: alepha_orm0.EntityPrimitive<alepha1.TObject<{
1493
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1494
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1495
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1496
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1497
+ userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1498
+ password: alepha1.TOptional<alepha1.TString>;
1499
+ provider: alepha1.TString;
1500
+ providerUserId: alepha1.TOptional<alepha1.TString>;
1501
+ providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1502
+ }>>;
1503
+ type IdentityEntity = Static<typeof identities.schema>;
1504
+ //#endregion
1505
+ //#region ../../src/api/users/entities/sessions.d.ts
1506
+ declare const sessions: alepha_orm0.EntityPrimitive<alepha1.TObject<{
1507
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1508
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1509
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1510
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1511
+ refreshToken: alepha1.TString;
1512
+ userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1513
+ expiresAt: alepha1.TString;
1514
+ ip: alepha1.TOptional<alepha1.TString>;
1515
+ userAgent: alepha1.TOptional<alepha1.TObject<{
1516
+ os: alepha1.TString;
1517
+ browser: alepha1.TString;
1518
+ device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1519
+ }>>;
1520
+ }>>;
1521
+ type SessionEntity = Static<typeof sessions.schema>;
1522
+ //#endregion
1523
+ //#region ../../src/api/users/entities/users.d.ts
1524
+ declare const DEFAULT_USER_REALM_NAME = "default";
1525
+ declare const users: alepha_orm0.EntityPrimitive<alepha1.TObject<{
1526
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1527
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1528
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1529
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1530
+ realm: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_DEFAULT>;
1531
+ username: alepha1.TOptional<alepha1.TString>;
1532
+ email: alepha1.TOptional<alepha1.TString>;
1533
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
1534
+ roles: alepha_orm0.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm0.PG_DEFAULT>;
1535
+ firstName: alepha1.TOptional<alepha1.TString>;
1536
+ lastName: alepha1.TOptional<alepha1.TString>;
1537
+ picture: alepha1.TOptional<alepha1.TString>;
1538
+ enabled: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1539
+ emailVerified: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1540
+ }>>;
1541
+ type UserEntity = Static<typeof users.schema>;
1542
+ //#endregion
1543
+ //#region ../../src/api/users/primitives/$userRealm.d.ts
1544
+ type UserRealmPrimitive = RealmPrimitive & WithLinkFn & WithLoginFn;
1545
+ /**
1546
+ * Already configured realm for user management.
1547
+ *
1548
+ * Realm contains two roles: `admin` and `user`.
1549
+ *
1550
+ * - `admin`: Has full access to all resources and permissions.
1551
+ * - `user`: Has access to their own resources and permissions, but cannot access admin-level resources.
1552
+ *
1553
+ * Realm uses session management for handling user sessions.
1554
+ *
1555
+ * Environment Variables:
1556
+ * - `APP_SECRET`: Secret key for signing tokens (if not provided in options).
1557
+ */
1558
+ declare const $userRealm: (options?: UserRealmOptions) => UserRealmPrimitive;
1559
+ interface UserRealmOptions {
1560
+ /**
1561
+ * Secret key for signing tokens.
1562
+ *
1563
+ * If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
1564
+ */
1565
+ secret?: string;
1566
+ /**
1567
+ * Realm configuration options.
1568
+ *
1569
+ * It's already pre-configured for user management with admin and user roles.
1570
+ */
1571
+ realm?: Partial<RealmPrimitiveOptions>;
1572
+ /**
1573
+ * Override entities.
1574
+ */
1575
+ entities?: {
1576
+ users?: Repository<typeof users.schema>;
1577
+ identities?: Repository<typeof identities.schema>;
1578
+ sessions?: Repository<typeof sessions.schema>;
1579
+ };
1580
+ settings?: Partial<RealmAuthSettings>;
1581
+ identities?: {
1582
+ credentials?: true;
1583
+ google?: true;
1584
+ github?: true;
1585
+ };
1586
+ modules?: {
1587
+ files?: boolean;
1588
+ audits?: boolean;
1589
+ jobs?: boolean;
1590
+ };
1591
+ }
1592
+ //#endregion
1593
+ //#region ../../src/api/users/providers/UserRealmProvider.d.ts
1594
+ interface UserRealmRepositories {
1595
+ identities: Repository<typeof identities.schema>;
1596
+ sessions: Repository<typeof sessions.schema>;
1597
+ users: Repository<typeof users.schema>;
1598
+ }
1599
+ interface UserRealm {
1600
+ name: string;
1601
+ repositories: UserRealmRepositories;
1602
+ settings: RealmAuthSettings;
1603
+ }
1604
+ declare class UserRealmProvider {
1605
+ protected readonly alepha: Alepha;
1606
+ protected readonly defaultIdentities: Repository<alepha1.TObject<{
1607
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1608
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1609
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1610
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1611
+ userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1612
+ password: alepha1.TOptional<alepha1.TString>;
1613
+ provider: alepha1.TString;
1614
+ providerUserId: alepha1.TOptional<alepha1.TString>;
1615
+ providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1616
+ }>>;
1617
+ protected readonly defaultSessions: Repository<alepha1.TObject<{
1618
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1619
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1620
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1621
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1622
+ refreshToken: alepha1.TString;
1623
+ userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1624
+ expiresAt: alepha1.TString;
1625
+ ip: alepha1.TOptional<alepha1.TString>;
1626
+ userAgent: alepha1.TOptional<alepha1.TObject<{
1627
+ os: alepha1.TString;
1628
+ browser: alepha1.TString;
1629
+ device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1630
+ }>>;
1631
+ }>>;
1632
+ protected readonly defaultUsers: Repository<alepha1.TObject<{
1633
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1634
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1635
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1636
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1637
+ realm: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_DEFAULT>;
1638
+ username: alepha1.TOptional<alepha1.TString>;
1639
+ email: alepha1.TOptional<alepha1.TString>;
1640
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
1641
+ roles: alepha_orm0.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm0.PG_DEFAULT>;
1642
+ firstName: alepha1.TOptional<alepha1.TString>;
1643
+ lastName: alepha1.TOptional<alepha1.TString>;
1644
+ picture: alepha1.TOptional<alepha1.TString>;
1645
+ enabled: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1646
+ emailVerified: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1647
+ }>>;
1648
+ protected realms: Map<string, UserRealm>;
1649
+ avatars: alepha_bucket0.BucketPrimitive;
1650
+ protected readonly onConfigure: alepha1.HookPrimitive<"configure">;
1651
+ register(userRealmName: string, userRealmOptions?: UserRealmOptions): UserRealm;
1652
+ /**
1653
+ * Gets a registered realm by name, auto-creating default if needed.
1654
+ */
1655
+ getRealm(userRealmName?: string): UserRealm;
1656
+ identityRepository(userRealmName?: string): Repository<typeof identities.schema>;
1657
+ sessionRepository(userRealmName?: string): Repository<typeof sessions.schema>;
1658
+ userRepository(userRealmName?: string): Repository<typeof users.schema>;
1659
+ }
1660
+ //#endregion
1661
+ //#region ../../src/api/users/schemas/identityQuerySchema.d.ts
1662
+ declare const identityQuerySchema: alepha1.TObject<{
1663
+ page: alepha1.TOptional<alepha1.TInteger>;
1664
+ size: alepha1.TOptional<alepha1.TInteger>;
1665
+ sort: alepha1.TOptional<alepha1.TString>;
1666
+ userId: alepha1.TOptional<alepha1.TString>;
1667
+ provider: alepha1.TOptional<alepha1.TString>;
1668
+ }>;
1669
+ type IdentityQuery = Static<typeof identityQuerySchema>;
1670
+ //#endregion
1671
+ //#region ../../src/api/users/services/IdentityService.d.ts
1672
+ declare class IdentityService {
1673
+ protected readonly log: alepha_logger5.Logger;
1674
+ protected readonly userRealmProvider: UserRealmProvider;
1675
+ protected readonly auditService: AuditService;
1676
+ identities(userRealmName?: string): alepha_orm0.Repository<alepha1.TObject<{
1677
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1678
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1679
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1680
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1681
+ userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1682
+ password: alepha1.TOptional<alepha1.TString>;
1683
+ provider: alepha1.TString;
1684
+ providerUserId: alepha1.TOptional<alepha1.TString>;
1685
+ providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1686
+ }>>;
1687
+ /**
1688
+ * Find identities with pagination and filtering.
1689
+ */
1690
+ findIdentities(q?: IdentityQuery, userRealmName?: string): Promise<Page$1<IdentityEntity>>;
1691
+ /**
1692
+ * Get an identity by ID.
1693
+ */
1694
+ getIdentityById(id: string, userRealmName?: string): Promise<IdentityEntity>;
1695
+ /**
1696
+ * Delete an identity by ID.
1697
+ */
1698
+ deleteIdentity(id: string, userRealmName?: string): Promise<void>;
1699
+ }
1700
+ //#endregion
1701
+ //#region ../../src/api/users/controllers/AdminIdentityController.d.ts
1702
+ declare class AdminIdentityController {
1703
+ protected readonly url = "/identities";
1704
+ protected readonly group = "admin:identities";
1705
+ protected readonly identityService: IdentityService;
1706
+ /**
1707
+ * Find identities with pagination and filtering.
1708
+ */
1709
+ readonly findIdentities: alepha_server0.ActionPrimitiveFn<{
1710
+ query: alepha1.TObject<{
1711
+ page: alepha1.TOptional<alepha1.TInteger>;
1712
+ size: alepha1.TOptional<alepha1.TInteger>;
1713
+ sort: alepha1.TOptional<alepha1.TString>;
1714
+ userId: alepha1.TOptional<alepha1.TString>;
1715
+ provider: alepha1.TOptional<alepha1.TString>;
1716
+ userRealmName: alepha1.TOptional<alepha1.TString>;
1717
+ }>;
1718
+ response: alepha1.TPage<alepha1.TObject<{
1719
+ userId: PgAttr<alepha1.TString, typeof PG_REF>;
1720
+ provider: alepha1.TString;
1721
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1722
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1723
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1724
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1725
+ providerUserId: alepha1.TOptional<alepha1.TString>;
1726
+ providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1727
+ }>>;
1728
+ }>;
1729
+ /**
1730
+ * Get an identity by ID.
1731
+ */
1732
+ readonly getIdentity: alepha_server0.ActionPrimitiveFn<{
1733
+ params: alepha1.TObject<{
1734
+ id: alepha1.TString;
1735
+ }>;
1736
+ query: alepha1.TObject<{
1737
+ userRealmName: alepha1.TOptional<alepha1.TString>;
1738
+ }>;
1739
+ response: alepha1.TObject<{
1740
+ userId: PgAttr<alepha1.TString, typeof PG_REF>;
1741
+ provider: alepha1.TString;
1742
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1743
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1744
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1745
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1746
+ providerUserId: alepha1.TOptional<alepha1.TString>;
1747
+ providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1748
+ }>;
1749
+ }>;
1750
+ /**
1751
+ * Delete an identity.
1752
+ */
1753
+ readonly deleteIdentity: alepha_server0.ActionPrimitiveFn<{
1754
+ params: alepha1.TObject<{
1755
+ id: alepha1.TString;
1756
+ }>;
1757
+ query: alepha1.TObject<{
1758
+ userRealmName: alepha1.TOptional<alepha1.TString>;
1759
+ }>;
1760
+ response: alepha1.TObject<{
1761
+ ok: alepha1.TBoolean;
1762
+ id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
1763
+ count: alepha1.TOptional<alepha1.TNumber>;
1764
+ }>;
1765
+ }>;
1766
+ }
1767
+ //#endregion
1768
+ //#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
1769
+ declare const sessionQuerySchema: alepha1.TObject<{
1770
+ page: alepha1.TOptional<alepha1.TInteger>;
1771
+ size: alepha1.TOptional<alepha1.TInteger>;
1772
+ sort: alepha1.TOptional<alepha1.TString>;
1773
+ userId: alepha1.TOptional<alepha1.TString>;
1774
+ }>;
1775
+ type SessionQuery = Static<typeof sessionQuerySchema>;
1776
+ //#endregion
1777
+ //#region ../../src/api/users/services/SessionCrudService.d.ts
1778
+ declare class SessionCrudService {
1779
+ protected readonly log: alepha_logger5.Logger;
1780
+ protected readonly userRealmProvider: UserRealmProvider;
1781
+ sessions(userRealmName?: string): alepha_orm0.Repository<alepha1.TObject<{
1782
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1783
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1784
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1785
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1786
+ refreshToken: alepha1.TString;
1787
+ userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1788
+ expiresAt: alepha1.TString;
1789
+ ip: alepha1.TOptional<alepha1.TString>;
1790
+ userAgent: alepha1.TOptional<alepha1.TObject<{
1791
+ os: alepha1.TString;
1792
+ browser: alepha1.TString;
1793
+ device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1794
+ }>>;
1795
+ }>>;
1796
+ /**
1797
+ * Find sessions with pagination and filtering.
1798
+ */
1799
+ findSessions(q?: SessionQuery, userRealmName?: string): Promise<Page$1<SessionEntity>>;
1800
+ /**
1801
+ * Get a session by ID.
1802
+ */
1803
+ getSessionById(id: string, userRealmName?: string): Promise<SessionEntity>;
1804
+ /**
1805
+ * Delete a session by ID.
1806
+ */
1807
+ deleteSession(id: string, userRealmName?: string): Promise<void>;
1808
+ }
1809
+ //#endregion
1810
+ //#region ../../src/api/users/controllers/AdminSessionController.d.ts
1811
+ declare class AdminSessionController {
1812
+ protected readonly url = "/sessions";
1813
+ protected readonly group = "admin:sessions";
1814
+ protected readonly sessionService: SessionCrudService;
1815
+ /**
1816
+ * Find sessions with pagination and filtering.
1817
+ */
1818
+ readonly findSessions: alepha_server0.ActionPrimitiveFn<{
1819
+ query: alepha1.TObject<{
1820
+ page: alepha1.TOptional<alepha1.TInteger>;
1821
+ size: alepha1.TOptional<alepha1.TInteger>;
1822
+ sort: alepha1.TOptional<alepha1.TString>;
1823
+ userId: alepha1.TOptional<alepha1.TString>;
1824
+ userRealmName: alepha1.TOptional<alepha1.TString>;
1825
+ }>;
1826
+ response: alepha1.TPage<alepha1.TObject<{
1827
+ id: alepha1.TString;
1828
+ version: alepha1.TNumber;
1829
+ createdAt: alepha1.TString;
1830
+ updatedAt: alepha1.TString;
1831
+ refreshToken: alepha1.TString;
1832
+ userId: alepha1.TString;
1833
+ expiresAt: alepha1.TString;
1834
+ ip: alepha1.TOptional<alepha1.TString>;
1835
+ userAgent: alepha1.TOptional<alepha1.TObject<{
1836
+ os: alepha1.TString;
1837
+ browser: alepha1.TString;
1838
+ device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1839
+ }>>;
1840
+ }>>;
1841
+ }>;
1842
+ /**
1843
+ * Get a session by ID.
1844
+ */
1845
+ readonly getSession: alepha_server0.ActionPrimitiveFn<{
1846
+ params: alepha1.TObject<{
1847
+ id: alepha1.TString;
1848
+ }>;
1849
+ query: alepha1.TObject<{
1850
+ userRealmName: alepha1.TOptional<alepha1.TString>;
1851
+ }>;
1852
+ response: alepha1.TObject<{
1853
+ id: alepha1.TString;
1854
+ version: alepha1.TNumber;
1855
+ createdAt: alepha1.TString;
1856
+ updatedAt: alepha1.TString;
1857
+ refreshToken: alepha1.TString;
1858
+ userId: alepha1.TString;
1859
+ expiresAt: alepha1.TString;
1860
+ ip: alepha1.TOptional<alepha1.TString>;
1861
+ userAgent: alepha1.TOptional<alepha1.TObject<{
1862
+ os: alepha1.TString;
1863
+ browser: alepha1.TString;
1864
+ device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1865
+ }>>;
1866
+ }>;
1867
+ }>;
1868
+ /**
1869
+ * Delete a session.
1870
+ */
1871
+ readonly deleteSession: alepha_server0.ActionPrimitiveFn<{
1872
+ params: alepha1.TObject<{
1873
+ id: alepha1.TString;
1874
+ }>;
1875
+ query: alepha1.TObject<{
1876
+ userRealmName: alepha1.TOptional<alepha1.TString>;
1877
+ }>;
1878
+ response: alepha1.TObject<{
1879
+ ok: alepha1.TBoolean;
1880
+ id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
1881
+ count: alepha1.TOptional<alepha1.TNumber>;
1882
+ }>;
1883
+ }>;
1884
+ }
1885
+ //#endregion
1886
+ //#region ../../src/api/users/notifications/UserNotifications.d.ts
1887
+ declare class UserNotifications {
1888
+ readonly passwordReset: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1889
+ email: alepha1.TString;
1890
+ code: alepha1.TString;
1891
+ expiresInMinutes: alepha1.TNumber;
1892
+ }>>;
1893
+ readonly emailVerification: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1894
+ email: alepha1.TString;
1895
+ code: alepha1.TString;
1973
1896
  expiresInMinutes: alepha1.TNumber;
1974
1897
  }>>;
1975
1898
  readonly phoneVerification: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
@@ -1989,6 +1912,270 @@ declare class UserNotifications {
1989
1912
  }>>;
1990
1913
  }
1991
1914
  //#endregion
1915
+ //#region ../../src/api/users/schemas/createUserSchema.d.ts
1916
+ declare const createUserSchema: alepha1.TObject<{
1917
+ id: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
1918
+ version: alepha1.TOptional<PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
1919
+ email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1920
+ createdAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
1921
+ updatedAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
1922
+ username: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1923
+ phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1924
+ roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
1925
+ firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1926
+ lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1927
+ picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1928
+ enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1929
+ emailVerified: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1930
+ }>;
1931
+ type CreateUser = Static<typeof createUserSchema>;
1932
+ //#endregion
1933
+ //#region ../../src/api/users/schemas/updateUserSchema.d.ts
1934
+ declare const updateUserSchema: alepha1.TObject<{
1935
+ email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1936
+ realm: alepha1.TOptional<PgAttr<alepha1.TString, typeof PG_DEFAULT>>;
1937
+ phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1938
+ roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
1939
+ firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1940
+ lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1941
+ picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1942
+ enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1943
+ }>;
1944
+ type UpdateUser = Static<typeof updateUserSchema>;
1945
+ //#endregion
1946
+ //#region ../../src/api/users/schemas/userQuerySchema.d.ts
1947
+ declare const userQuerySchema: alepha1.TObject<{
1948
+ page: alepha1.TOptional<alepha1.TInteger>;
1949
+ size: alepha1.TOptional<alepha1.TInteger>;
1950
+ sort: alepha1.TOptional<alepha1.TString>;
1951
+ email: alepha1.TOptional<alepha1.TString>;
1952
+ enabled: alepha1.TOptional<alepha1.TBoolean>;
1953
+ emailVerified: alepha1.TOptional<alepha1.TBoolean>;
1954
+ roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
1955
+ query: alepha1.TOptional<alepha1.TString>;
1956
+ }>;
1957
+ type UserQuery = Static<typeof userQuerySchema>;
1958
+ //#endregion
1959
+ //#region ../../src/api/users/services/UserService.d.ts
1960
+ declare class UserService {
1961
+ protected readonly log: alepha_logger5.Logger;
1962
+ protected readonly verificationController: alepha_server_links2.HttpVirtualClient<VerificationController>;
1963
+ protected readonly userNotifications: UserNotifications;
1964
+ protected readonly userRealmProvider: UserRealmProvider;
1965
+ protected readonly auditService: AuditService;
1966
+ users(userRealmName?: string): alepha_orm0.Repository<alepha1.TObject<{
1967
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1968
+ version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1969
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1970
+ updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1971
+ realm: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_DEFAULT>;
1972
+ username: alepha1.TOptional<alepha1.TString>;
1973
+ email: alepha1.TOptional<alepha1.TString>;
1974
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
1975
+ roles: alepha_orm0.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm0.PG_DEFAULT>;
1976
+ firstName: alepha1.TOptional<alepha1.TString>;
1977
+ lastName: alepha1.TOptional<alepha1.TString>;
1978
+ picture: alepha1.TOptional<alepha1.TString>;
1979
+ enabled: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1980
+ emailVerified: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1981
+ }>>;
1982
+ /**
1983
+ * Request email verification for a user.
1984
+ * @param email - The email address to verify.
1985
+ * @param userRealmName - Optional realm name.
1986
+ * @param method - The verification method: "code" (default) or "link".
1987
+ * @param verifyUrl - Base URL for verification link (required when method is "link").
1988
+ */
1989
+ requestEmailVerification(email: string, userRealmName?: string, method?: "code" | "link", verifyUrl?: string): Promise<boolean>;
1990
+ /**
1991
+ * Verify a user's email using a valid verification token.
1992
+ * Supports both code (6-digit) and link (UUID) verification tokens.
1993
+ */
1994
+ verifyEmail(email: string, token: string, userRealmName?: string): Promise<void>;
1995
+ /**
1996
+ * Check if an email is verified.
1997
+ */
1998
+ isEmailVerified(email: string, userRealmName?: string): Promise<boolean>;
1999
+ /**
2000
+ * Find users with pagination and filtering.
2001
+ */
2002
+ findUsers(q?: UserQuery, userRealmName?: string): Promise<Page$1<UserEntity>>;
2003
+ /**
2004
+ * Get a user by ID.
2005
+ */
2006
+ getUserById(id: string, userRealmName?: string): Promise<UserEntity>;
2007
+ /**
2008
+ * Create a new user.
2009
+ */
2010
+ createUser(data: CreateUser, userRealmName?: string): Promise<UserEntity>;
2011
+ /**
2012
+ * Update an existing user.
2013
+ */
2014
+ updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
2015
+ /**
2016
+ * Delete a user by ID.
2017
+ */
2018
+ deleteUser(id: string, userRealmName?: string): Promise<void>;
2019
+ }
2020
+ //#endregion
2021
+ //#region ../../src/api/users/controllers/AdminUserController.d.ts
2022
+ declare class AdminUserController {
2023
+ protected readonly url = "/users";
2024
+ protected readonly group = "admin:users";
2025
+ protected readonly userService: UserService;
2026
+ /**
2027
+ * Find users with pagination and filtering.
2028
+ */
2029
+ readonly findUsers: alepha_server0.ActionPrimitiveFn<{
2030
+ query: alepha1.TObject<{
2031
+ page: alepha1.TOptional<alepha1.TInteger>;
2032
+ size: alepha1.TOptional<alepha1.TInteger>;
2033
+ sort: alepha1.TOptional<alepha1.TString>;
2034
+ email: alepha1.TOptional<alepha1.TString>;
2035
+ enabled: alepha1.TOptional<alepha1.TBoolean>;
2036
+ emailVerified: alepha1.TOptional<alepha1.TBoolean>;
2037
+ roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2038
+ query: alepha1.TOptional<alepha1.TString>;
2039
+ userRealmName: alepha1.TOptional<alepha1.TString>;
2040
+ }>;
2041
+ response: alepha1.TPage<alepha1.TObject<{
2042
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2043
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2044
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2045
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2046
+ realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2047
+ username: alepha1.TOptional<alepha1.TString>;
2048
+ email: alepha1.TOptional<alepha1.TString>;
2049
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
2050
+ roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2051
+ firstName: alepha1.TOptional<alepha1.TString>;
2052
+ lastName: alepha1.TOptional<alepha1.TString>;
2053
+ picture: alepha1.TOptional<alepha1.TString>;
2054
+ enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2055
+ emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2056
+ }>>;
2057
+ }>;
2058
+ /**
2059
+ * Get a user by ID.
2060
+ */
2061
+ readonly getUser: alepha_server0.ActionPrimitiveFn<{
2062
+ params: alepha1.TObject<{
2063
+ id: alepha1.TString;
2064
+ }>;
2065
+ query: alepha1.TObject<{
2066
+ userRealmName: alepha1.TOptional<alepha1.TString>;
2067
+ }>;
2068
+ response: alepha1.TObject<{
2069
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2070
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2071
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2072
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2073
+ realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2074
+ username: alepha1.TOptional<alepha1.TString>;
2075
+ email: alepha1.TOptional<alepha1.TString>;
2076
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
2077
+ roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2078
+ firstName: alepha1.TOptional<alepha1.TString>;
2079
+ lastName: alepha1.TOptional<alepha1.TString>;
2080
+ picture: alepha1.TOptional<alepha1.TString>;
2081
+ enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2082
+ emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2083
+ }>;
2084
+ }>;
2085
+ /**
2086
+ * Create a new user.
2087
+ */
2088
+ readonly createUser: alepha_server0.ActionPrimitiveFn<{
2089
+ query: alepha1.TObject<{
2090
+ userRealmName: alepha1.TOptional<alepha1.TString>;
2091
+ }>;
2092
+ body: alepha1.TObject<{
2093
+ id: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2094
+ version: alepha1.TOptional<PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2095
+ email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2096
+ createdAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2097
+ updatedAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2098
+ username: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2099
+ phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2100
+ roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2101
+ firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2102
+ lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2103
+ picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2104
+ enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2105
+ emailVerified: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2106
+ }>;
2107
+ response: alepha1.TObject<{
2108
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2109
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2110
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2111
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2112
+ realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2113
+ username: alepha1.TOptional<alepha1.TString>;
2114
+ email: alepha1.TOptional<alepha1.TString>;
2115
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
2116
+ roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2117
+ firstName: alepha1.TOptional<alepha1.TString>;
2118
+ lastName: alepha1.TOptional<alepha1.TString>;
2119
+ picture: alepha1.TOptional<alepha1.TString>;
2120
+ enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2121
+ emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2122
+ }>;
2123
+ }>;
2124
+ /**
2125
+ * Update a user.
2126
+ */
2127
+ readonly updateUser: alepha_server0.ActionPrimitiveFn<{
2128
+ params: alepha1.TObject<{
2129
+ id: alepha1.TString;
2130
+ }>;
2131
+ query: alepha1.TObject<{
2132
+ userRealmName: alepha1.TOptional<alepha1.TString>;
2133
+ }>;
2134
+ body: alepha1.TObject<{
2135
+ email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2136
+ realm: alepha1.TOptional<PgAttr<alepha1.TString, typeof PG_DEFAULT>>;
2137
+ phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2138
+ roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2139
+ firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2140
+ lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2141
+ picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2142
+ enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2143
+ }>;
2144
+ response: alepha1.TObject<{
2145
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2146
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2147
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2148
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2149
+ realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2150
+ username: alepha1.TOptional<alepha1.TString>;
2151
+ email: alepha1.TOptional<alepha1.TString>;
2152
+ phoneNumber: alepha1.TOptional<alepha1.TString>;
2153
+ roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2154
+ firstName: alepha1.TOptional<alepha1.TString>;
2155
+ lastName: alepha1.TOptional<alepha1.TString>;
2156
+ picture: alepha1.TOptional<alepha1.TString>;
2157
+ enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2158
+ emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2159
+ }>;
2160
+ }>;
2161
+ /**
2162
+ * Delete a user.
2163
+ */
2164
+ readonly deleteUser: alepha_server0.ActionPrimitiveFn<{
2165
+ params: alepha1.TObject<{
2166
+ id: alepha1.TString;
2167
+ }>;
2168
+ query: alepha1.TObject<{
2169
+ userRealmName: alepha1.TOptional<alepha1.TString>;
2170
+ }>;
2171
+ response: alepha1.TObject<{
2172
+ ok: alepha1.TBoolean;
2173
+ id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
2174
+ count: alepha1.TOptional<alepha1.TNumber>;
2175
+ }>;
2176
+ }>;
2177
+ }
2178
+ //#endregion
1992
2179
  //#region ../../src/api/users/schemas/completePasswordResetRequestSchema.d.ts
1993
2180
  /**
1994
2181
  * Request schema for completing a password reset.
@@ -2028,12 +2215,13 @@ interface PasswordResetIntent {
2028
2215
  expiresAt: string;
2029
2216
  }
2030
2217
  declare class CredentialService {
2031
- protected readonly log: alepha_logger0.Logger;
2218
+ protected readonly log: alepha_logger5.Logger;
2032
2219
  protected readonly cryptoProvider: CryptoProvider;
2033
2220
  protected readonly dateTimeProvider: DateTimeProvider;
2034
- protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2221
+ protected readonly verificationController: alepha_server_links2.HttpVirtualClient<VerificationController>;
2035
2222
  protected readonly userNotifications: UserNotifications;
2036
2223
  protected readonly userRealmProvider: UserRealmProvider;
2224
+ protected readonly auditService: AuditService;
2037
2225
  protected readonly intentCache: alepha_cache0.CachePrimitiveFn<PasswordResetIntent, any[]>;
2038
2226
  users(userRealmName?: string): Repository$1<alepha1.TObject<{
2039
2227
  id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
@@ -2169,12 +2357,13 @@ interface RegistrationIntent {
2169
2357
  expiresAt: string;
2170
2358
  }
2171
2359
  declare class RegistrationService {
2172
- protected readonly log: alepha_logger0.Logger;
2360
+ protected readonly log: alepha_logger5.Logger;
2173
2361
  protected readonly dateTimeProvider: DateTimeProvider;
2174
2362
  protected readonly cryptoProvider: CryptoProvider;
2175
- protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2363
+ protected readonly verificationController: alepha_server_links2.HttpVirtualClient<VerificationController>;
2176
2364
  protected readonly userNotifications: UserNotifications;
2177
2365
  protected readonly userRealmProvider: UserRealmProvider;
2366
+ protected readonly auditService: AuditService;
2178
2367
  protected readonly intentCache: alepha_cache0.CachePrimitiveFn<RegistrationIntent, any[]>;
2179
2368
  /**
2180
2369
  * Phase 1: Create a registration intent.
@@ -2212,111 +2401,6 @@ declare class RegistrationService {
2212
2401
  protected verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
2213
2402
  }
2214
2403
  //#endregion
2215
- //#region ../../src/api/users/schemas/createUserSchema.d.ts
2216
- declare const createUserSchema: alepha1.TObject<{
2217
- username: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2218
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2219
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2220
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2221
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2222
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2223
- enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2224
- emailVerified: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2225
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2226
- id: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2227
- version: alepha1.TOptional<PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2228
- createdAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2229
- updatedAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2230
- }>;
2231
- type CreateUser = Static<typeof createUserSchema>;
2232
- //#endregion
2233
- //#region ../../src/api/users/schemas/updateUserSchema.d.ts
2234
- declare const updateUserSchema: alepha1.TObject<{
2235
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2236
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2237
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2238
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2239
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2240
- enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2241
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2242
- realm: alepha1.TOptional<PgAttr<alepha1.TString, typeof PG_DEFAULT>>;
2243
- }>;
2244
- type UpdateUser = Static<typeof updateUserSchema>;
2245
- //#endregion
2246
- //#region ../../src/api/users/schemas/userQuerySchema.d.ts
2247
- declare const userQuerySchema: alepha1.TObject<{
2248
- page: alepha1.TOptional<alepha1.TInteger>;
2249
- size: alepha1.TOptional<alepha1.TInteger>;
2250
- sort: alepha1.TOptional<alepha1.TString>;
2251
- email: alepha1.TOptional<alepha1.TString>;
2252
- enabled: alepha1.TOptional<alepha1.TBoolean>;
2253
- emailVerified: alepha1.TOptional<alepha1.TBoolean>;
2254
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2255
- query: alepha1.TOptional<alepha1.TString>;
2256
- }>;
2257
- type UserQuery = Static<typeof userQuerySchema>;
2258
- //#endregion
2259
- //#region ../../src/api/users/services/UserService.d.ts
2260
- declare class UserService {
2261
- protected readonly log: alepha_logger0.Logger;
2262
- protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2263
- protected readonly userNotifications: UserNotifications;
2264
- protected readonly userRealmProvider: UserRealmProvider;
2265
- users(userRealmName?: string): alepha_orm179.Repository<alepha1.TObject<{
2266
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
2267
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
2268
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2269
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2270
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
2271
- username: alepha1.TOptional<alepha1.TString>;
2272
- email: alepha1.TOptional<alepha1.TString>;
2273
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2274
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2275
- firstName: alepha1.TOptional<alepha1.TString>;
2276
- lastName: alepha1.TOptional<alepha1.TString>;
2277
- picture: alepha1.TOptional<alepha1.TString>;
2278
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2279
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2280
- }>>;
2281
- /**
2282
- * Request email verification for a user.
2283
- * @param email - The email address to verify.
2284
- * @param userRealmName - Optional realm name.
2285
- * @param method - The verification method: "code" (default) or "link".
2286
- * @param verifyUrl - Base URL for verification link (required when method is "link").
2287
- */
2288
- requestEmailVerification(email: string, userRealmName?: string, method?: "code" | "link", verifyUrl?: string): Promise<boolean>;
2289
- /**
2290
- * Verify a user's email using a valid verification token.
2291
- * Supports both code (6-digit) and link (UUID) verification tokens.
2292
- */
2293
- verifyEmail(email: string, token: string, userRealmName?: string): Promise<void>;
2294
- /**
2295
- * Check if an email is verified.
2296
- */
2297
- isEmailVerified(email: string, userRealmName?: string): Promise<boolean>;
2298
- /**
2299
- * Find users with pagination and filtering.
2300
- */
2301
- findUsers(q?: UserQuery, userRealmName?: string): Promise<Page$1<UserEntity>>;
2302
- /**
2303
- * Get a user by ID.
2304
- */
2305
- getUserById(id: string, userRealmName?: string): Promise<UserEntity>;
2306
- /**
2307
- * Create a new user.
2308
- */
2309
- createUser(data: CreateUser, userRealmName?: string): Promise<UserEntity>;
2310
- /**
2311
- * Update an existing user.
2312
- */
2313
- updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
2314
- /**
2315
- * Delete a user by ID.
2316
- */
2317
- deleteUser(id: string, userRealmName?: string): Promise<void>;
2318
- }
2319
- //#endregion
2320
2404
  //#region ../../src/api/users/controllers/UserController.d.ts
2321
2405
  declare class UserController {
2322
2406
  protected readonly url = "/users";
@@ -2328,7 +2412,7 @@ declare class UserController {
2328
2412
  * Phase 1: Create a registration intent.
2329
2413
  * Validates data, creates verification sessions, and stores intent in cache.
2330
2414
  */
2331
- readonly createRegistrationIntent: alepha_server14.ActionPrimitiveFn<{
2415
+ readonly createRegistrationIntent: alepha_server0.ActionPrimitiveFn<{
2332
2416
  body: alepha1.TObject<{
2333
2417
  password: alepha1.TString;
2334
2418
  username: alepha1.TOptional<alepha1.TString>;
@@ -2349,109 +2433,11 @@ declare class UserController {
2349
2433
  expiresAt: alepha1.TString;
2350
2434
  }>;
2351
2435
  }>;
2352
- /**
2353
- * Find users with pagination and filtering.
2354
- */
2355
- readonly findUsers: alepha_server14.ActionPrimitiveFn<{
2356
- query: alepha1.TObject<{
2357
- page: alepha1.TOptional<alepha1.TInteger>;
2358
- size: alepha1.TOptional<alepha1.TInteger>;
2359
- sort: alepha1.TOptional<alepha1.TString>;
2360
- email: alepha1.TOptional<alepha1.TString>;
2361
- enabled: alepha1.TOptional<alepha1.TBoolean>;
2362
- emailVerified: alepha1.TOptional<alepha1.TBoolean>;
2363
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2364
- query: alepha1.TOptional<alepha1.TString>;
2365
- userRealmName: alepha1.TOptional<alepha1.TString>;
2366
- }>;
2367
- response: alepha1.TPage<alepha1.TObject<{
2368
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
2369
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
2370
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2371
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2372
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
2373
- username: alepha1.TOptional<alepha1.TString>;
2374
- email: alepha1.TOptional<alepha1.TString>;
2375
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2376
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2377
- firstName: alepha1.TOptional<alepha1.TString>;
2378
- lastName: alepha1.TOptional<alepha1.TString>;
2379
- picture: alepha1.TOptional<alepha1.TString>;
2380
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2381
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2382
- }>>;
2383
- }>;
2384
- /**
2385
- * Get a user by ID.
2386
- */
2387
- readonly getUser: alepha_server14.ActionPrimitiveFn<{
2388
- params: alepha1.TObject<{
2389
- id: alepha1.TString;
2390
- }>;
2391
- query: alepha1.TObject<{
2392
- userRealmName: alepha1.TOptional<alepha1.TString>;
2393
- }>;
2394
- response: alepha1.TObject<{
2395
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
2396
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
2397
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2398
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2399
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
2400
- username: alepha1.TOptional<alepha1.TString>;
2401
- email: alepha1.TOptional<alepha1.TString>;
2402
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2403
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2404
- firstName: alepha1.TOptional<alepha1.TString>;
2405
- lastName: alepha1.TOptional<alepha1.TString>;
2406
- picture: alepha1.TOptional<alepha1.TString>;
2407
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2408
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2409
- }>;
2410
- }>;
2411
- /**
2412
- * Create a new user.
2413
- */
2414
- readonly createUser: alepha_server14.ActionPrimitiveFn<{
2415
- query: alepha1.TObject<{
2416
- userRealmName: alepha1.TOptional<alepha1.TString>;
2417
- }>;
2418
- body: alepha1.TObject<{
2419
- username: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2420
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2421
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2422
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2423
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2424
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2425
- enabled: alepha1.TOptional<alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>>;
2426
- emailVerified: alepha1.TOptional<alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>>;
2427
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2428
- id: alepha1.TOptional<alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>>;
2429
- version: alepha1.TOptional<alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>>;
2430
- createdAt: alepha1.TOptional<alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>>;
2431
- updatedAt: alepha1.TOptional<alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>>;
2432
- }>;
2433
- response: alepha1.TObject<{
2434
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
2435
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
2436
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2437
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2438
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
2439
- username: alepha1.TOptional<alepha1.TString>;
2440
- email: alepha1.TOptional<alepha1.TString>;
2441
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2442
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2443
- firstName: alepha1.TOptional<alepha1.TString>;
2444
- lastName: alepha1.TOptional<alepha1.TString>;
2445
- picture: alepha1.TOptional<alepha1.TString>;
2446
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2447
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2448
- }>;
2449
- }>;
2450
2436
  /**
2451
2437
  * Phase 2: Complete registration using an intent.
2452
2438
  * Validates verification codes and creates the user.
2453
2439
  */
2454
- readonly createUserFromIntent: alepha_server14.ActionPrimitiveFn<{
2440
+ readonly createUserFromIntent: alepha_server0.ActionPrimitiveFn<{
2455
2441
  body: alepha1.TObject<{
2456
2442
  intentId: alepha1.TString;
2457
2443
  emailCode: alepha1.TOptional<alepha1.TString>;
@@ -2459,80 +2445,27 @@ declare class UserController {
2459
2445
  captchaToken: alepha1.TOptional<alepha1.TString>;
2460
2446
  }>;
2461
2447
  response: alepha1.TObject<{
2462
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
2463
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
2464
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2465
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2466
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
2467
- username: alepha1.TOptional<alepha1.TString>;
2468
- email: alepha1.TOptional<alepha1.TString>;
2469
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2470
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2471
- firstName: alepha1.TOptional<alepha1.TString>;
2472
- lastName: alepha1.TOptional<alepha1.TString>;
2473
- picture: alepha1.TOptional<alepha1.TString>;
2474
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2475
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2476
- }>;
2477
- }>;
2478
- /**
2479
- * Update a user.
2480
- */
2481
- readonly updateUser: alepha_server14.ActionPrimitiveFn<{
2482
- params: alepha1.TObject<{
2483
- id: alepha1.TString;
2484
- }>;
2485
- query: alepha1.TObject<{
2486
- userRealmName: alepha1.TOptional<alepha1.TString>;
2487
- }>;
2488
- body: alepha1.TObject<{
2489
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2490
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2491
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2492
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2493
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2494
- enabled: alepha1.TOptional<alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>>;
2495
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2496
- realm: alepha1.TOptional<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>>;
2497
- }>;
2498
- response: alepha1.TObject<{
2499
- id: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_PRIMARY_KEY>, typeof alepha_orm179.PG_DEFAULT>;
2500
- version: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TInteger, typeof alepha_orm179.PG_VERSION>, typeof alepha_orm179.PG_DEFAULT>;
2501
- createdAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_CREATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2502
- updatedAt: alepha_orm179.PgAttr<alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_UPDATED_AT>, typeof alepha_orm179.PG_DEFAULT>;
2503
- realm: alepha_orm179.PgAttr<alepha1.TString, typeof alepha_orm179.PG_DEFAULT>;
2448
+ id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2449
+ version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2450
+ createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2451
+ updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2452
+ realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2504
2453
  username: alepha1.TOptional<alepha1.TString>;
2505
2454
  email: alepha1.TOptional<alepha1.TString>;
2506
2455
  phoneNumber: alepha1.TOptional<alepha1.TString>;
2507
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2456
+ roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2508
2457
  firstName: alepha1.TOptional<alepha1.TString>;
2509
2458
  lastName: alepha1.TOptional<alepha1.TString>;
2510
2459
  picture: alepha1.TOptional<alepha1.TString>;
2511
- enabled: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2512
- emailVerified: alepha_orm179.PgAttr<alepha1.TBoolean, typeof alepha_orm179.PG_DEFAULT>;
2513
- }>;
2514
- }>;
2515
- /**
2516
- * Delete a user.
2517
- */
2518
- readonly deleteUser: alepha_server14.ActionPrimitiveFn<{
2519
- params: alepha1.TObject<{
2520
- id: alepha1.TString;
2521
- }>;
2522
- query: alepha1.TObject<{
2523
- userRealmName: alepha1.TOptional<alepha1.TString>;
2524
- }>;
2525
- response: alepha1.TObject<{
2526
- ok: alepha1.TBoolean;
2527
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
2528
- count: alepha1.TOptional<alepha1.TNumber>;
2460
+ enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2461
+ emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2529
2462
  }>;
2530
2463
  }>;
2531
2464
  /**
2532
2465
  * Phase 1: Create a password reset intent.
2533
2466
  * Validates email, sends verification code, and stores intent in cache.
2534
2467
  */
2535
- readonly createPasswordResetIntent: alepha_server14.ActionPrimitiveFn<{
2468
+ readonly createPasswordResetIntent: alepha_server0.ActionPrimitiveFn<{
2536
2469
  query: alepha1.TObject<{
2537
2470
  userRealmName: alepha1.TOptional<alepha1.TString>;
2538
2471
  }>;
@@ -2548,7 +2481,7 @@ declare class UserController {
2548
2481
  * Phase 2: Complete password reset using an intent.
2549
2482
  * Validates verification code, updates password, and invalidates sessions.
2550
2483
  */
2551
- readonly completePasswordReset: alepha_server14.ActionPrimitiveFn<{
2484
+ readonly completePasswordReset: alepha_server0.ActionPrimitiveFn<{
2552
2485
  body: alepha1.TObject<{
2553
2486
  intentId: alepha1.TString;
2554
2487
  code: alepha1.TString;
@@ -2563,7 +2496,7 @@ declare class UserController {
2563
2496
  /**
2564
2497
  * @deprecated Use createPasswordResetIntent instead
2565
2498
  */
2566
- requestPasswordReset: alepha_server14.ActionPrimitiveFn<{
2499
+ requestPasswordReset: alepha_server0.ActionPrimitiveFn<{
2567
2500
  query: alepha1.TObject<{
2568
2501
  userRealmName: alepha1.TOptional<alepha1.TString>;
2569
2502
  }>;
@@ -2578,7 +2511,7 @@ declare class UserController {
2578
2511
  /**
2579
2512
  * @deprecated Use completePasswordReset instead
2580
2513
  */
2581
- validateResetToken: alepha_server14.ActionPrimitiveFn<{
2514
+ validateResetToken: alepha_server0.ActionPrimitiveFn<{
2582
2515
  query: alepha1.TObject<{
2583
2516
  email: alepha1.TString;
2584
2517
  token: alepha1.TString;
@@ -2592,7 +2525,7 @@ declare class UserController {
2592
2525
  /**
2593
2526
  * @deprecated Use completePasswordReset instead
2594
2527
  */
2595
- resetPassword: alepha_server14.ActionPrimitiveFn<{
2528
+ resetPassword: alepha_server0.ActionPrimitiveFn<{
2596
2529
  query: alepha1.TObject<{
2597
2530
  userRealmName: alepha1.TOptional<alepha1.TString>;
2598
2531
  }>;
@@ -2612,7 +2545,7 @@ declare class UserController {
2612
2545
  * @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
2613
2546
  * @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
2614
2547
  */
2615
- requestEmailVerification: alepha_server14.ActionPrimitiveFn<{
2548
+ requestEmailVerification: alepha_server0.ActionPrimitiveFn<{
2616
2549
  query: alepha1.TObject<{
2617
2550
  userRealmName: alepha1.TOptional<alepha1.TString>;
2618
2551
  method: alepha1.TOptional<alepha1.TUnsafe<"link" | "code">>;
@@ -2630,7 +2563,7 @@ declare class UserController {
2630
2563
  * Verify email with a valid token.
2631
2564
  * Updates the user's emailVerified status.
2632
2565
  */
2633
- verifyEmail: alepha_server14.ActionPrimitiveFn<{
2566
+ verifyEmail: alepha_server0.ActionPrimitiveFn<{
2634
2567
  query: alepha1.TObject<{
2635
2568
  userRealmName: alepha1.TOptional<alepha1.TString>;
2636
2569
  }>;
@@ -2646,7 +2579,7 @@ declare class UserController {
2646
2579
  /**
2647
2580
  * Check if an email is verified.
2648
2581
  */
2649
- checkEmailVerification: alepha_server14.ActionPrimitiveFn<{
2582
+ checkEmailVerification: alepha_server0.ActionPrimitiveFn<{
2650
2583
  query: alepha1.TObject<{
2651
2584
  email: alepha1.TString;
2652
2585
  userRealmName: alepha1.TOptional<alepha1.TString>;
@@ -2664,13 +2597,14 @@ declare class UserController {
2664
2597
  */
2665
2598
  declare class UserRealmController {
2666
2599
  protected readonly url = "/realms";
2600
+ protected readonly group = "realms";
2667
2601
  protected readonly userRealmProvider: UserRealmProvider;
2668
2602
  protected readonly serverAuthProvider: ServerAuthProvider;
2669
2603
  /**
2670
2604
  * Get realm configuration settings.
2671
2605
  * This endpoint is not exposed in the API documentation.
2672
2606
  */
2673
- readonly getRealmConfig: alepha_server14.ActionPrimitiveFn<{
2607
+ readonly getRealmConfig: alepha_server0.ActionPrimitiveFn<{
2674
2608
  query: alepha1.TObject<{
2675
2609
  userRealmName: alepha1.TOptional<alepha1.TString>;
2676
2610
  }>;
@@ -2706,7 +2640,7 @@ declare class UserRealmController {
2706
2640
  }>>;
2707
2641
  }>;
2708
2642
  }>;
2709
- readonly checkUsernameAvailability: alepha_server14.ActionPrimitiveFn<{
2643
+ readonly checkUsernameAvailability: alepha_server0.ActionPrimitiveFn<{
2710
2644
  query: alepha1.TObject<{
2711
2645
  userRealmName: alepha1.TOptional<alepha1.TString>;
2712
2646
  }>;
@@ -2721,12 +2655,12 @@ declare class UserRealmController {
2721
2655
  //#endregion
2722
2656
  //#region ../../src/api/users/schemas/identityResourceSchema.d.ts
2723
2657
  declare const identityResourceSchema: alepha1.TObject<{
2658
+ userId: PgAttr<alepha1.TString, typeof PG_REF>;
2659
+ provider: alepha1.TString;
2724
2660
  id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2725
2661
  version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2726
2662
  createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2727
2663
  updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2728
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2729
- provider: alepha1.TString;
2730
2664
  providerUserId: alepha1.TOptional<alepha1.TString>;
2731
2665
  providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2732
2666
  }>;
@@ -2839,9 +2773,10 @@ declare class SessionService {
2839
2773
  protected readonly fsp: FileSystemProvider;
2840
2774
  protected readonly dateTimeProvider: DateTimeProvider;
2841
2775
  protected readonly cryptoProvider: CryptoProvider;
2842
- protected readonly log: alepha_logger0.Logger;
2776
+ protected readonly log: alepha_logger5.Logger;
2843
2777
  protected readonly userRealmProvider: UserRealmProvider;
2844
- protected readonly fileController: alepha_server_links0.HttpVirtualClient<FileController>;
2778
+ protected readonly fileController: alepha_server_links2.HttpVirtualClient<FileController>;
2779
+ protected readonly auditService: AuditService;
2845
2780
  users(userRealmName?: string): Repository$1<alepha1.TObject<{
2846
2781
  id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2847
2782
  version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
@@ -2934,20 +2869,20 @@ declare class SessionService {
2934
2869
  }>;
2935
2870
  deleteSession(refreshToken: string, userRealmName?: string): Promise<void>;
2936
2871
  link(provider: string, profile: OAuth2Profile, userRealmName?: string): Promise<{
2937
- username?: string | undefined;
2938
2872
  email?: string | undefined;
2873
+ username?: string | undefined;
2939
2874
  phoneNumber?: string | undefined;
2940
2875
  firstName?: string | undefined;
2941
2876
  lastName?: string | undefined;
2942
2877
  picture?: string | undefined;
2943
- enabled: boolean;
2944
- emailVerified: boolean;
2945
- roles: string[];
2946
2878
  id: string;
2947
2879
  version: number;
2948
2880
  createdAt: string;
2949
2881
  updatedAt: string;
2950
2882
  realm: string;
2883
+ roles: string[];
2884
+ enabled: boolean;
2885
+ emailVerified: boolean;
2951
2886
  } | {
2952
2887
  sub: string;
2953
2888
  email?: string;
@@ -2991,5 +2926,5 @@ declare class SessionService {
2991
2926
  */
2992
2927
  declare const AlephaApiUsers: alepha1.Service<alepha1.Module>;
2993
2928
  //#endregion
2994
- export { $userRealm, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, IdentityController, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, RealmAuthSettings, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionController, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserController, UserEntity, UserQuery, UserRealm, UserRealmConfig, UserRealmController, UserRealmOptions, UserRealmPrimitive, UserRealmProvider, UserRealmRepositories, UserResource, UserService, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userRealmConfigSchema, userResourceSchema, users };
2929
+ export { $userRealm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, RealmAuthSettings, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserController, UserEntity, UserQuery, UserRealm, UserRealmConfig, UserRealmController, UserRealmOptions, UserRealmPrimitive, UserRealmProvider, UserRealmRepositories, UserResource, UserService, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userRealmConfigSchema, userResourceSchema, users };
2995
2930
  //# sourceMappingURL=index.d.ts.map