alepha 0.14.2 → 0.14.3

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 (361) hide show
  1. package/dist/api/audits/index.browser.js +5 -5
  2. package/dist/api/audits/index.browser.js.map +1 -1
  3. package/dist/api/audits/index.d.ts +784 -784
  4. package/dist/api/audits/index.d.ts.map +1 -1
  5. package/dist/api/audits/index.js +13 -13
  6. package/dist/api/audits/index.js.map +1 -1
  7. package/dist/api/files/index.browser.js +5 -5
  8. package/dist/api/files/index.browser.js.map +1 -1
  9. package/dist/api/files/index.d.ts +57 -57
  10. package/dist/api/files/index.d.ts.map +1 -1
  11. package/dist/api/files/index.js +71 -71
  12. package/dist/api/files/index.js.map +1 -1
  13. package/dist/api/jobs/index.browser.js +5 -5
  14. package/dist/api/jobs/index.browser.js.map +1 -1
  15. package/dist/api/jobs/index.d.ts +165 -165
  16. package/dist/api/jobs/index.d.ts.map +1 -1
  17. package/dist/api/jobs/index.js +10 -10
  18. package/dist/api/jobs/index.js.map +1 -1
  19. package/dist/api/notifications/index.browser.js +10 -10
  20. package/dist/api/notifications/index.browser.js.map +1 -1
  21. package/dist/api/notifications/index.d.ts +583 -171
  22. package/dist/api/notifications/index.d.ts.map +1 -1
  23. package/dist/api/notifications/index.js +12 -12
  24. package/dist/api/notifications/index.js.map +1 -1
  25. package/dist/api/parameters/index.browser.js +163 -10
  26. package/dist/api/parameters/index.browser.js.map +1 -1
  27. package/dist/api/parameters/index.d.ts +281 -276
  28. package/dist/api/parameters/index.d.ts.map +1 -1
  29. package/dist/api/parameters/index.js +196 -91
  30. package/dist/api/parameters/index.js.map +1 -1
  31. package/dist/api/users/index.browser.js +19 -19
  32. package/dist/api/users/index.browser.js.map +1 -1
  33. package/dist/api/users/index.d.ts +1137 -1123
  34. package/dist/api/users/index.d.ts.map +1 -1
  35. package/dist/api/users/index.js +827 -596
  36. package/dist/api/users/index.js.map +1 -1
  37. package/dist/api/verifications/index.browser.js +6 -6
  38. package/dist/api/verifications/index.browser.js.map +1 -1
  39. package/dist/api/verifications/index.d.ts +13 -13
  40. package/dist/api/verifications/index.d.ts.map +1 -1
  41. package/dist/api/verifications/index.js +6 -6
  42. package/dist/api/verifications/index.js.map +1 -1
  43. package/dist/bin/index.d.ts +1 -2
  44. package/dist/bin/index.js +0 -1
  45. package/dist/bin/index.js.map +1 -1
  46. package/dist/cli/index.d.ts +137 -112
  47. package/dist/cli/index.d.ts.map +1 -1
  48. package/dist/cli/index.js +371 -259
  49. package/dist/cli/index.js.map +1 -1
  50. package/dist/command/index.d.ts +45 -5
  51. package/dist/command/index.d.ts.map +1 -1
  52. package/dist/command/index.js +97 -17
  53. package/dist/command/index.js.map +1 -1
  54. package/dist/core/index.browser.js +14 -18
  55. package/dist/core/index.browser.js.map +1 -1
  56. package/dist/core/index.d.ts +29 -0
  57. package/dist/core/index.d.ts.map +1 -1
  58. package/dist/core/index.js +14 -18
  59. package/dist/core/index.js.map +1 -1
  60. package/dist/core/index.native.js +14 -18
  61. package/dist/core/index.native.js.map +1 -1
  62. package/dist/fake/index.js +195 -168
  63. package/dist/fake/index.js.map +1 -1
  64. package/dist/file/index.d.ts +8 -0
  65. package/dist/file/index.d.ts.map +1 -1
  66. package/dist/file/index.js +3 -0
  67. package/dist/file/index.js.map +1 -1
  68. package/dist/mcp/index.d.ts.map +1 -1
  69. package/dist/orm/index.d.ts +32 -32
  70. package/dist/orm/index.d.ts.map +1 -1
  71. package/dist/orm/index.js +12 -12
  72. package/dist/orm/index.js.map +1 -1
  73. package/dist/security/index.d.ts +1 -1
  74. package/dist/security/index.d.ts.map +1 -1
  75. package/dist/security/index.js +1 -1
  76. package/dist/security/index.js.map +1 -1
  77. package/dist/server/auth/index.d.ts +171 -155
  78. package/dist/server/auth/index.d.ts.map +1 -1
  79. package/dist/server/auth/index.js +0 -1
  80. package/dist/server/auth/index.js.map +1 -1
  81. package/dist/server/compress/index.d.ts.map +1 -1
  82. package/dist/server/compress/index.js +2 -0
  83. package/dist/server/compress/index.js.map +1 -1
  84. package/dist/server/core/index.d.ts.map +1 -1
  85. package/dist/server/core/index.js +1 -1
  86. package/dist/server/core/index.js.map +1 -1
  87. package/dist/server/links/index.browser.js +22 -6
  88. package/dist/server/links/index.browser.js.map +1 -1
  89. package/dist/server/links/index.d.ts +46 -44
  90. package/dist/server/links/index.d.ts.map +1 -1
  91. package/dist/server/links/index.js +24 -41
  92. package/dist/server/links/index.js.map +1 -1
  93. package/dist/server/security/index.d.ts +9 -9
  94. package/dist/server/swagger/index.d.ts +2 -1
  95. package/dist/server/swagger/index.d.ts.map +1 -1
  96. package/dist/server/swagger/index.js +8 -3
  97. package/dist/server/swagger/index.js.map +1 -1
  98. package/dist/vite/index.d.ts.map +1 -1
  99. package/dist/vite/index.js +12 -4
  100. package/dist/vite/index.js.map +1 -1
  101. package/dist/websocket/index.d.ts +7 -7
  102. package/package.json +7 -7
  103. package/src/api/audits/controllers/{AuditController.ts → AdminAuditController.ts} +5 -6
  104. package/src/api/audits/entities/audits.ts +5 -5
  105. package/src/api/audits/index.browser.ts +1 -1
  106. package/src/api/audits/index.ts +3 -3
  107. package/src/api/audits/primitives/$audit.spec.ts +276 -0
  108. package/src/api/audits/services/AuditService.spec.ts +495 -0
  109. package/src/api/files/__tests__/$bucket.spec.ts +91 -0
  110. package/src/api/files/controllers/AdminFileStatsController.spec.ts +166 -0
  111. package/src/api/files/controllers/{StorageStatsController.ts → AdminFileStatsController.ts} +2 -2
  112. package/src/api/files/controllers/FileController.spec.ts +558 -0
  113. package/src/api/files/controllers/FileController.ts +4 -5
  114. package/src/api/files/entities/files.ts +5 -5
  115. package/src/api/files/index.browser.ts +1 -1
  116. package/src/api/files/index.ts +4 -4
  117. package/src/api/files/jobs/FileJobs.spec.ts +52 -0
  118. package/src/api/files/services/FileService.spec.ts +109 -0
  119. package/src/api/jobs/__tests__/JobController.spec.ts +343 -0
  120. package/src/api/jobs/controllers/{JobController.ts → AdminJobController.ts} +2 -2
  121. package/src/api/jobs/entities/jobExecutions.ts +5 -5
  122. package/src/api/jobs/index.ts +3 -3
  123. package/src/api/jobs/primitives/$job.spec.ts +476 -0
  124. package/src/api/notifications/controllers/{NotificationController.ts → AdminNotificationController.ts} +4 -5
  125. package/src/api/notifications/entities/notifications.ts +5 -5
  126. package/src/api/notifications/index.browser.ts +1 -1
  127. package/src/api/notifications/index.ts +4 -4
  128. package/src/api/parameters/controllers/{ConfigController.ts → AdminConfigController.ts} +46 -107
  129. package/src/api/parameters/entities/parameters.ts +7 -17
  130. package/src/api/parameters/index.ts +3 -3
  131. package/src/api/parameters/primitives/$config.spec.ts +356 -0
  132. package/src/api/parameters/schemas/activateConfigBodySchema.ts +12 -0
  133. package/src/api/parameters/schemas/checkScheduledResponseSchema.ts +8 -0
  134. package/src/api/parameters/schemas/configCurrentResponseSchema.ts +13 -0
  135. package/src/api/parameters/schemas/configHistoryResponseSchema.ts +9 -0
  136. package/src/api/parameters/schemas/configNameParamSchema.ts +10 -0
  137. package/src/api/parameters/schemas/configNamesResponseSchema.ts +8 -0
  138. package/src/api/parameters/schemas/configTreeNodeSchema.ts +13 -0
  139. package/src/api/parameters/schemas/configVersionParamSchema.ts +9 -0
  140. package/src/api/parameters/schemas/configVersionResponseSchema.ts +9 -0
  141. package/src/api/parameters/schemas/configsByStatusResponseSchema.ts +9 -0
  142. package/src/api/parameters/schemas/createConfigVersionBodySchema.ts +24 -0
  143. package/src/api/parameters/schemas/index.ts +15 -0
  144. package/src/api/parameters/schemas/parameterResponseSchema.ts +26 -0
  145. package/src/api/parameters/schemas/parameterStatusSchema.ts +13 -0
  146. package/src/api/parameters/schemas/rollbackConfigBodySchema.ts +15 -0
  147. package/src/api/parameters/schemas/statusParamSchema.ts +9 -0
  148. package/src/api/users/__tests__/EmailVerification.spec.ts +369 -0
  149. package/src/api/users/__tests__/PasswordReset.spec.ts +550 -0
  150. package/src/api/users/controllers/AdminIdentityController.spec.ts +365 -0
  151. package/src/api/users/controllers/{IdentityController.ts → AdminIdentityController.ts} +3 -4
  152. package/src/api/users/controllers/AdminSessionController.spec.ts +274 -0
  153. package/src/api/users/controllers/{SessionController.ts → AdminSessionController.ts} +3 -4
  154. package/src/api/users/controllers/AdminUserController.spec.ts +372 -0
  155. package/src/api/users/controllers/AdminUserController.ts +116 -0
  156. package/src/api/users/controllers/UserController.ts +4 -107
  157. package/src/api/users/controllers/UserRealmController.ts +3 -0
  158. package/src/api/users/entities/identities.ts +6 -6
  159. package/src/api/users/entities/sessions.ts +6 -6
  160. package/src/api/users/entities/users.ts +9 -9
  161. package/src/api/users/index.ts +9 -6
  162. package/src/api/users/primitives/$userRealm.ts +13 -8
  163. package/src/api/users/services/CredentialService.spec.ts +509 -0
  164. package/src/api/users/services/CredentialService.ts +46 -0
  165. package/src/api/users/services/IdentityService.ts +15 -0
  166. package/src/api/users/services/RegistrationService.spec.ts +630 -0
  167. package/src/api/users/services/RegistrationService.ts +18 -0
  168. package/src/api/users/services/SessionService.spec.ts +301 -0
  169. package/src/api/users/services/SessionService.ts +110 -1
  170. package/src/api/users/services/UserService.ts +67 -2
  171. package/src/api/verifications/__tests__/CodeVerification.spec.ts +318 -0
  172. package/src/api/verifications/__tests__/LinkVerification.spec.ts +279 -0
  173. package/src/api/verifications/entities/verifications.ts +6 -6
  174. package/src/api/verifications/jobs/VerificationJobs.spec.ts +50 -0
  175. package/src/batch/__tests__/startup-buffering.spec.ts +458 -0
  176. package/src/batch/primitives/$batch.spec.ts +766 -0
  177. package/src/batch/providers/BatchProvider.spec.ts +786 -0
  178. package/src/bin/index.ts +0 -1
  179. package/src/bucket/__tests__/shared.ts +194 -0
  180. package/src/bucket/primitives/$bucket.spec.ts +104 -0
  181. package/src/bucket/providers/FileStorageProvider.spec.ts +13 -0
  182. package/src/bucket/providers/LocalFileStorageProvider.spec.ts +77 -0
  183. package/src/bucket/providers/MemoryFileStorageProvider.spec.ts +82 -0
  184. package/src/cache/core/__tests__/shared.ts +377 -0
  185. package/src/cache/core/primitives/$cache.spec.ts +111 -0
  186. package/src/cache/redis/__tests__/cache-redis.spec.ts +70 -0
  187. package/src/cli/apps/AlephaCli.ts +25 -4
  188. package/src/cli/commands/dev.ts +19 -7
  189. package/src/cli/commands/gen/changelog.spec.ts +315 -0
  190. package/src/cli/commands/{changelog.ts → gen/changelog.ts} +9 -9
  191. package/src/cli/commands/gen/openapi.ts +71 -0
  192. package/src/cli/commands/gen.ts +18 -0
  193. package/src/cli/commands/init.ts +2 -0
  194. package/src/cli/commands/root.ts +12 -3
  195. package/src/cli/commands/typecheck.ts +5 -0
  196. package/src/cli/index.ts +2 -1
  197. package/src/cli/services/AlephaCliUtils.ts +71 -32
  198. package/src/cli/services/GitMessageParser.ts +1 -1
  199. package/src/command/helpers/Asker.spec.ts +127 -0
  200. package/src/command/helpers/Runner.spec.ts +126 -0
  201. package/src/command/primitives/$command.spec.ts +1588 -0
  202. package/src/command/providers/CliProvider.ts +74 -24
  203. package/src/core/Alepha.ts +45 -0
  204. package/src/core/__tests__/Alepha-emit.spec.ts +22 -0
  205. package/src/core/__tests__/Alepha-graph.spec.ts +93 -0
  206. package/src/core/__tests__/Alepha-has.spec.ts +41 -0
  207. package/src/core/__tests__/Alepha-inject.spec.ts +93 -0
  208. package/src/core/__tests__/Alepha-register.spec.ts +81 -0
  209. package/src/core/__tests__/Alepha-start.spec.ts +176 -0
  210. package/src/core/__tests__/Alepha-with.spec.ts +14 -0
  211. package/src/core/__tests__/TypeBox-usecases.spec.ts +35 -0
  212. package/src/core/__tests__/TypeBoxLocale.spec.ts +15 -0
  213. package/src/core/__tests__/descriptor.spec.ts +34 -0
  214. package/src/core/__tests__/fixtures/A.ts +5 -0
  215. package/src/core/__tests__/pagination.spec.ts +77 -0
  216. package/src/core/helpers/jsonSchemaToTypeBox.ts +2 -2
  217. package/src/core/primitives/$atom.spec.ts +43 -0
  218. package/src/core/primitives/$hook.spec.ts +130 -0
  219. package/src/core/primitives/$inject.spec.ts +175 -0
  220. package/src/core/primitives/$module.spec.ts +115 -0
  221. package/src/core/providers/CodecManager.spec.ts +740 -0
  222. package/src/core/providers/EventManager.spec.ts +762 -0
  223. package/src/core/providers/EventManager.ts +4 -0
  224. package/src/core/providers/StateManager.spec.ts +365 -0
  225. package/src/core/providers/TypeProvider.spec.ts +1607 -0
  226. package/src/core/providers/TypeProvider.ts +20 -26
  227. package/src/datetime/primitives/$interval.spec.ts +103 -0
  228. package/src/datetime/providers/DateTimeProvider.spec.ts +86 -0
  229. package/src/email/primitives/$email.spec.ts +175 -0
  230. package/src/email/providers/LocalEmailProvider.spec.ts +341 -0
  231. package/src/fake/__tests__/keyName.example.ts +40 -0
  232. package/src/fake/__tests__/keyName.spec.ts +152 -0
  233. package/src/fake/__tests__/module.example.ts +32 -0
  234. package/src/fake/providers/FakeProvider.spec.ts +438 -0
  235. package/src/file/providers/FileSystemProvider.ts +8 -0
  236. package/src/file/providers/NodeFileSystemProvider.spec.ts +418 -0
  237. package/src/file/providers/NodeFileSystemProvider.ts +5 -0
  238. package/src/file/services/FileDetector.spec.ts +591 -0
  239. package/src/lock/core/__tests__/shared.ts +190 -0
  240. package/src/lock/core/providers/MemoryLockProvider.spec.ts +25 -0
  241. package/src/lock/redis/providers/RedisLockProvider.spec.ts +25 -0
  242. package/src/logger/__tests__/SimpleFormatterProvider.spec.ts +109 -0
  243. package/src/logger/primitives/$logger.spec.ts +108 -0
  244. package/src/logger/services/Logger.spec.ts +295 -0
  245. package/src/mcp/__tests__/errors.spec.ts +175 -0
  246. package/src/mcp/__tests__/integration.spec.ts +450 -0
  247. package/src/mcp/helpers/jsonrpc.spec.ts +380 -0
  248. package/src/mcp/primitives/$prompt.spec.ts +468 -0
  249. package/src/mcp/primitives/$resource.spec.ts +390 -0
  250. package/src/mcp/primitives/$tool.spec.ts +406 -0
  251. package/src/mcp/providers/McpServerProvider.spec.ts +797 -0
  252. package/src/orm/__tests__/$repository-crud.spec.ts +276 -0
  253. package/src/orm/__tests__/$repository-hooks.spec.ts +325 -0
  254. package/src/orm/__tests__/$repository-orderBy.spec.ts +128 -0
  255. package/src/orm/__tests__/$repository-pagination-sort.spec.ts +149 -0
  256. package/src/orm/__tests__/$repository-save.spec.ts +37 -0
  257. package/src/orm/__tests__/ModelBuilder-integration.spec.ts +490 -0
  258. package/src/orm/__tests__/ModelBuilder-types.spec.ts +186 -0
  259. package/src/orm/__tests__/PostgresProvider.spec.ts +46 -0
  260. package/src/orm/__tests__/delete-returning.spec.ts +256 -0
  261. package/src/orm/__tests__/deletedAt.spec.ts +80 -0
  262. package/src/orm/__tests__/enums.spec.ts +315 -0
  263. package/src/orm/__tests__/execute.spec.ts +72 -0
  264. package/src/orm/__tests__/fixtures/bigEntitySchema.ts +65 -0
  265. package/src/orm/__tests__/fixtures/userEntitySchema.ts +27 -0
  266. package/src/orm/__tests__/joins.spec.ts +1114 -0
  267. package/src/orm/__tests__/page.spec.ts +287 -0
  268. package/src/orm/__tests__/primaryKey.spec.ts +87 -0
  269. package/src/orm/__tests__/query-date-encoding.spec.ts +402 -0
  270. package/src/orm/__tests__/ref-auto-onDelete.spec.ts +156 -0
  271. package/src/orm/__tests__/references.spec.ts +102 -0
  272. package/src/orm/__tests__/security.spec.ts +710 -0
  273. package/src/orm/__tests__/sqlite.spec.ts +111 -0
  274. package/src/orm/__tests__/string-operators.spec.ts +429 -0
  275. package/src/orm/__tests__/timestamps.spec.ts +388 -0
  276. package/src/orm/__tests__/validation.spec.ts +183 -0
  277. package/src/orm/__tests__/version.spec.ts +64 -0
  278. package/src/orm/helpers/parseQueryString.spec.ts +196 -0
  279. package/src/orm/primitives/$repository.spec.ts +137 -0
  280. package/src/orm/primitives/$sequence.spec.ts +29 -0
  281. package/src/orm/primitives/$transaction.spec.ts +82 -0
  282. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -3
  283. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  284. package/src/orm/providers/drivers/CloudflareD1Provider.ts +1 -1
  285. package/src/orm/providers/drivers/DatabaseProvider.ts +1 -1
  286. package/src/orm/providers/drivers/NodePostgresProvider.ts +3 -3
  287. package/src/orm/providers/drivers/NodeSqliteProvider.ts +1 -1
  288. package/src/orm/providers/drivers/PglitePostgresProvider.ts +2 -2
  289. package/src/orm/services/ModelBuilder.spec.ts +575 -0
  290. package/src/orm/services/Repository.spec.ts +137 -0
  291. package/src/queue/core/__tests__/shared.ts +143 -0
  292. package/src/queue/core/providers/MemoryQueueProvider.spec.ts +23 -0
  293. package/src/queue/core/providers/WorkerProvider.spec.ts +378 -0
  294. package/src/queue/redis/providers/RedisQueueProvider.spec.ts +23 -0
  295. package/src/redis/__tests__/redis.spec.ts +58 -0
  296. package/src/retry/primitives/$retry.spec.ts +234 -0
  297. package/src/retry/providers/RetryProvider.spec.ts +438 -0
  298. package/src/router/__tests__/match.spec.ts +252 -0
  299. package/src/router/providers/RouterProvider.spec.ts +197 -0
  300. package/src/scheduler/__tests__/$scheduler-cron.spec.ts +25 -0
  301. package/src/scheduler/__tests__/$scheduler-interval.spec.ts +25 -0
  302. package/src/scheduler/__tests__/shared.ts +77 -0
  303. package/src/security/__tests__/bug-1-wildcard-after-start.spec.ts +229 -0
  304. package/src/security/__tests__/bug-2-password-validation.spec.ts +245 -0
  305. package/src/security/__tests__/bug-3-regex-vulnerability.spec.ts +407 -0
  306. package/src/security/__tests__/bug-4-oauth2-validation.spec.ts +439 -0
  307. package/src/security/__tests__/multi-layer-permissions.spec.ts +522 -0
  308. package/src/security/primitives/$permission.spec.ts +30 -0
  309. package/src/security/primitives/$permission.ts +2 -2
  310. package/src/security/primitives/$realm.spec.ts +101 -0
  311. package/src/security/primitives/$role.spec.ts +52 -0
  312. package/src/security/primitives/$serviceAccount.spec.ts +61 -0
  313. package/src/security/providers/SecurityProvider.spec.ts +350 -0
  314. package/src/server/auth/providers/ServerAuthProvider.ts +0 -2
  315. package/src/server/cache/providers/ServerCacheProvider.spec.ts +942 -0
  316. package/src/server/compress/providers/ServerCompressProvider.spec.ts +31 -0
  317. package/src/server/compress/providers/ServerCompressProvider.ts +2 -0
  318. package/src/server/cookies/providers/ServerCookiesProvider.spec.ts +253 -0
  319. package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +334 -0
  320. package/src/server/core/__tests__/ServerRouterProvider-requestId.spec.ts +129 -0
  321. package/src/server/core/primitives/$action.spec.ts +191 -0
  322. package/src/server/core/primitives/$route.spec.ts +65 -0
  323. package/src/server/core/providers/ServerBodyParserProvider.spec.ts +93 -0
  324. package/src/server/core/providers/ServerLoggerProvider.spec.ts +100 -0
  325. package/src/server/core/providers/ServerProvider.ts +3 -1
  326. package/src/server/core/services/HttpClient.spec.ts +123 -0
  327. package/src/server/core/services/UserAgentParser.spec.ts +111 -0
  328. package/src/server/cors/providers/ServerCorsProvider.spec.ts +481 -0
  329. package/src/server/health/providers/ServerHealthProvider.spec.ts +22 -0
  330. package/src/server/helmet/providers/ServerHelmetProvider.spec.ts +105 -0
  331. package/src/server/links/__tests__/$action.spec.ts +238 -0
  332. package/src/server/links/__tests__/fixtures/CrudApp.ts +122 -0
  333. package/src/server/links/__tests__/requestId.spec.ts +120 -0
  334. package/src/server/links/primitives/$remote.spec.ts +228 -0
  335. package/src/server/links/providers/LinkProvider.spec.ts +54 -0
  336. package/src/server/links/providers/LinkProvider.ts +49 -3
  337. package/src/server/links/providers/ServerLinksProvider.ts +1 -53
  338. package/src/server/links/schemas/apiLinksResponseSchema.ts +7 -0
  339. package/src/server/metrics/providers/ServerMetricsProvider.spec.ts +25 -0
  340. package/src/server/multipart/providers/ServerMultipartProvider.spec.ts +528 -0
  341. package/src/server/proxy/primitives/$proxy.spec.ts +87 -0
  342. package/src/server/rate-limit/__tests__/ActionRateLimit.spec.ts +211 -0
  343. package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +344 -0
  344. package/src/server/security/__tests__/BasicAuth.spec.ts +684 -0
  345. package/src/server/security/__tests__/ServerSecurityProvider-realm.spec.ts +388 -0
  346. package/src/server/security/providers/ServerSecurityProvider.spec.ts +123 -0
  347. package/src/server/static/primitives/$serve.spec.ts +193 -0
  348. package/src/server/swagger/__tests__/ui.spec.ts +52 -0
  349. package/src/server/swagger/primitives/$swagger.spec.ts +193 -0
  350. package/src/server/swagger/providers/ServerSwaggerProvider.ts +18 -8
  351. package/src/sms/primitives/$sms.spec.ts +165 -0
  352. package/src/sms/providers/LocalSmsProvider.spec.ts +224 -0
  353. package/src/sms/providers/MemorySmsProvider.spec.ts +193 -0
  354. package/src/thread/primitives/$thread.spec.ts +186 -0
  355. package/src/topic/core/__tests__/shared.ts +144 -0
  356. package/src/topic/core/providers/MemoryTopicProvider.spec.ts +23 -0
  357. package/src/topic/redis/providers/RedisTopicProvider.spec.ts +23 -0
  358. package/src/vite/plugins/viteAlephaDev.ts +16 -4
  359. package/src/vite/tasks/runAlepha.ts +7 -1
  360. package/src/websocket/__tests__/$websocket-new.spec.ts +195 -0
  361. package/src/websocket/primitives/$channel.spec.ts +30 -0
@@ -1,16 +1,17 @@
1
- import * as alepha1 from "alepha";
1
+ import * as alepha23 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_orm24 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_links0 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";
@@ -32,426 +33,32 @@ import "drizzle-orm/postgres-js";
32
33
  import "postgres";
33
34
 
34
35
  //#region ../../src/api/users/atoms/realmAuthSettingsAtom.d.ts
35
- declare const realmAuthSettingsAtom: alepha1.Atom<alepha1.TObject<{
36
- displayName: alepha1.TOptional<alepha1.TString>;
37
- description: alepha1.TOptional<alepha1.TString>;
38
- logoUrl: alepha1.TOptional<alepha1.TString>;
39
- registrationAllowed: alepha1.TBoolean;
40
- emailEnabled: alepha1.TBoolean;
41
- emailRequired: alepha1.TBoolean;
42
- usernameEnabled: alepha1.TBoolean;
43
- usernameRequired: alepha1.TBoolean;
44
- phoneEnabled: alepha1.TBoolean;
45
- phoneRequired: alepha1.TBoolean;
46
- verifyEmailRequired: alepha1.TBoolean;
47
- verifyPhoneRequired: alepha1.TBoolean;
48
- firstNameLastNameEnabled: alepha1.TBoolean;
49
- firstNameLastNameRequired: alepha1.TBoolean;
50
- resetPasswordAllowed: alepha1.TBoolean;
51
- passwordPolicy: alepha1.TObject<{
52
- minLength: alepha1.TInteger;
53
- requireUppercase: alepha1.TBoolean;
54
- requireLowercase: alepha1.TBoolean;
55
- requireNumbers: alepha1.TBoolean;
56
- requireSpecialCharacters: alepha1.TBoolean;
36
+ declare const realmAuthSettingsAtom: alepha23.Atom<alepha23.TObject<{
37
+ displayName: alepha23.TOptional<alepha23.TString>;
38
+ description: alepha23.TOptional<alepha23.TString>;
39
+ logoUrl: alepha23.TOptional<alepha23.TString>;
40
+ registrationAllowed: alepha23.TBoolean;
41
+ emailEnabled: alepha23.TBoolean;
42
+ emailRequired: alepha23.TBoolean;
43
+ usernameEnabled: alepha23.TBoolean;
44
+ usernameRequired: alepha23.TBoolean;
45
+ phoneEnabled: alepha23.TBoolean;
46
+ phoneRequired: alepha23.TBoolean;
47
+ verifyEmailRequired: alepha23.TBoolean;
48
+ verifyPhoneRequired: alepha23.TBoolean;
49
+ firstNameLastNameEnabled: alepha23.TBoolean;
50
+ firstNameLastNameRequired: alepha23.TBoolean;
51
+ resetPasswordAllowed: alepha23.TBoolean;
52
+ passwordPolicy: alepha23.TObject<{
53
+ minLength: alepha23.TInteger;
54
+ requireUppercase: alepha23.TBoolean;
55
+ requireLowercase: alepha23.TBoolean;
56
+ requireNumbers: alepha23.TBoolean;
57
+ requireSpecialCharacters: alepha23.TBoolean;
57
58
  }>;
58
59
  }>, "alepha.api.users.realmAuthSettings">;
59
60
  type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
60
61
  //#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;
115
- /**
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.
124
- *
125
- * Environment Variables:
126
- * - `APP_SECRET`: Secret key for signing tokens (if not provided in options).
127
- */
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
- }
230
- //#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>;
240
- //#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
- }>>;
256
- /**
257
- * Find identities with pagination and filtering.
258
- */
259
- findIdentities(q?: IdentityQuery, userRealmName?: string): Promise<Page$1<IdentityEntity>>;
260
- /**
261
- * Get an identity by ID.
262
- */
263
- getIdentityById(id: string, userRealmName?: string): Promise<IdentityEntity>;
264
- /**
265
- * Delete an identity by ID.
266
- */
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;
275
- /**
276
- * Find identities with pagination and filtering.
277
- */
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
62
  //#region ../../src/orm/schemas/insertSchema.d.ts
456
63
  /**
457
64
  * Transforms a TObject schema for insert operations.
@@ -1303,7 +910,7 @@ declare abstract class ModelBuilder {
1303
910
  //#endregion
1304
911
  //#region ../../src/orm/providers/DrizzleKitProvider.d.ts
1305
912
  declare class DrizzleKitProvider {
1306
- protected readonly log: alepha_logger0.Logger;
913
+ protected readonly log: alepha_logger5.Logger;
1307
914
  protected readonly alepha: Alepha;
1308
915
  /**
1309
916
  * Synchronize database with current schema definitions.
@@ -1339,11 +946,11 @@ declare class DrizzleKitProvider {
1339
946
  */
1340
947
  importDrizzleKit(): typeof DrizzleKit;
1341
948
  }
1342
- declare const devMigrationsSchema: alepha1.TObject<{
1343
- id: alepha1.TNumber;
1344
- name: alepha1.TString;
1345
- snapshot: alepha1.TString;
1346
- created_at: alepha1.TString;
949
+ declare const devMigrationsSchema: alepha23.TObject<{
950
+ id: alepha23.TNumber;
951
+ name: alepha23.TString;
952
+ snapshot: alepha23.TString;
953
+ created_at: alepha23.TString;
1347
954
  }>;
1348
955
  type DevMigrations = Static<typeof devMigrationsSchema>;
1349
956
  //#endregion
@@ -1351,7 +958,7 @@ type DevMigrations = Static<typeof devMigrationsSchema>;
1351
958
  type SQLLike = SQLWrapper | string;
1352
959
  declare abstract class DatabaseProvider {
1353
960
  protected readonly alepha: Alepha;
1354
- protected readonly log: alepha_logger0.Logger;
961
+ protected readonly log: alepha_logger5.Logger;
1355
962
  protected abstract readonly builder: ModelBuilder;
1356
963
  protected abstract readonly kit: DrizzleKitProvider;
1357
964
  abstract readonly db: PgDatabase<any>;
@@ -1374,7 +981,7 @@ declare abstract class DatabaseProvider {
1374
981
  /**
1375
982
  * Base migration orchestration - handles environment logic
1376
983
  */
1377
- protected migrateDatabase(): Promise<void>;
984
+ migrate(): Promise<void>;
1378
985
  /**
1379
986
  * Production: run migrations from folder
1380
987
  */
@@ -1468,7 +1075,7 @@ declare class QueryManager {
1468
1075
  createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
1469
1076
  column: string;
1470
1077
  direction: "asc" | "desc";
1471
- }>): alepha1.Page<T>;
1078
+ }>): alepha23.Page<T>;
1472
1079
  }
1473
1080
  interface PgJoin {
1474
1081
  table: string;
@@ -1780,7 +1387,7 @@ interface StatementOptions {
1780
1387
  declare module "alepha" {
1781
1388
  interface Env extends Partial<Static<typeof envSchema$1>> {}
1782
1389
  }
1783
- declare const envSchema$1: alepha1.TObject<{
1390
+ declare const envSchema$1: alepha23.TObject<{
1784
1391
  /**
1785
1392
  * Main configuration for database connection.
1786
1393
  * Accept a string in the format of a Postgres connection URL.
@@ -1788,11 +1395,11 @@ declare const envSchema$1: alepha1.TObject<{
1788
1395
  * or
1789
1396
  * Example: postgres://user:password@localhost:5432/database?sslmode=require
1790
1397
  */
1791
- DATABASE_URL: alepha1.TOptional<alepha1.TString>;
1398
+ DATABASE_URL: alepha23.TOptional<alepha23.TString>;
1792
1399
  /**
1793
1400
  * In addition to the DATABASE_URL, you can specify the postgres schema name.
1794
1401
  */
1795
- POSTGRES_SCHEMA: alepha1.TOptional<alepha1.TString>;
1402
+ POSTGRES_SCHEMA: alepha23.TOptional<alepha23.TString>;
1796
1403
  }>;
1797
1404
  /**
1798
1405
  * Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
@@ -1817,8 +1424,8 @@ declare const envSchema$1: alepha1.TObject<{
1817
1424
  /**
1818
1425
  * Configuration options for the Bun SQLite database provider.
1819
1426
  */
1820
- declare const bunSqliteOptions: alepha1.Atom<alepha1.TObject<{
1821
- path: alepha1.TOptional<alepha1.TString>;
1427
+ declare const bunSqliteOptions: alepha23.Atom<alepha23.TObject<{
1428
+ path: alepha23.TOptional<alepha23.TString>;
1822
1429
  }>, "alepha.postgres.bun-sqlite.options">;
1823
1430
  type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
1824
1431
  declare module "alepha" {
@@ -1855,7 +1462,7 @@ declare module "alepha" {
1855
1462
  declare module "alepha" {
1856
1463
  interface Env extends Partial<Static<typeof envSchema>> {}
1857
1464
  }
1858
- declare const envSchema: alepha1.TObject<{
1465
+ declare const envSchema: alepha23.TObject<{
1859
1466
  /**
1860
1467
  * Main configuration for database connection.
1861
1468
  * Accept a string in the format of a Postgres connection URL.
@@ -1863,21 +1470,21 @@ declare const envSchema: alepha1.TObject<{
1863
1470
  * or
1864
1471
  * Example: postgres://user:password@localhost:5432/database?sslmode=require
1865
1472
  */
1866
- DATABASE_URL: alepha1.TOptional<alepha1.TString>;
1473
+ DATABASE_URL: alepha23.TOptional<alepha23.TString>;
1867
1474
  /**
1868
1475
  * In addition to the DATABASE_URL, you can specify the postgres schema name.
1869
1476
  *
1870
1477
  * It will monkey patch drizzle tables.
1871
1478
  */
1872
- POSTGRES_SCHEMA: alepha1.TOptional<alepha1.TString>;
1479
+ POSTGRES_SCHEMA: alepha23.TOptional<alepha23.TString>;
1873
1480
  }>;
1874
1481
  //#endregion
1875
1482
  //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
1876
1483
  /**
1877
1484
  * Configuration options for the Node.js SQLite database provider.
1878
1485
  */
1879
- declare const nodeSqliteOptions: alepha1.Atom<alepha1.TObject<{
1880
- path: alepha1.TOptional<alepha1.TString>;
1486
+ declare const nodeSqliteOptions: alepha23.Atom<alepha23.TObject<{
1487
+ path: alepha23.TOptional<alepha23.TString>;
1881
1488
  }>, "alepha.postgres.node-sqlite.options">;
1882
1489
  type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
1883
1490
  declare module "alepha" {
@@ -1960,122 +1567,782 @@ declare module "alepha" {
1960
1567
  }
1961
1568
  }
1962
1569
  //#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;
1973
- expiresInMinutes: alepha1.TNumber;
1974
- }>>;
1975
- readonly phoneVerification: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1976
- phoneNumber: alepha1.TString;
1977
- code: alepha1.TString;
1978
- expiresInMinutes: alepha1.TNumber;
1979
- }>>;
1980
- readonly passwordResetLink: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1981
- email: alepha1.TString;
1982
- resetUrl: alepha1.TString;
1983
- expiresInMinutes: alepha1.TNumber;
1984
- }>>;
1985
- readonly emailVerificationLink: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1986
- email: alepha1.TString;
1987
- verifyUrl: alepha1.TString;
1988
- expiresInMinutes: alepha1.TNumber;
1570
+ //#region ../../src/api/users/entities/identities.d.ts
1571
+ declare const identities: alepha_orm24.EntityPrimitive<alepha23.TObject<{
1572
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1573
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1574
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1575
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1576
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1577
+ password: alepha23.TOptional<alepha23.TString>;
1578
+ provider: alepha23.TString;
1579
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1580
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1581
+ }>>;
1582
+ type IdentityEntity = Static<typeof identities.schema>;
1583
+ //#endregion
1584
+ //#region ../../src/api/users/entities/sessions.d.ts
1585
+ declare const sessions: alepha_orm24.EntityPrimitive<alepha23.TObject<{
1586
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1587
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1588
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1589
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1590
+ refreshToken: alepha23.TString;
1591
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1592
+ expiresAt: alepha23.TString;
1593
+ ip: alepha23.TOptional<alepha23.TString>;
1594
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1595
+ os: alepha23.TString;
1596
+ browser: alepha23.TString;
1597
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1989
1598
  }>>;
1990
- }
1599
+ }>>;
1600
+ type SessionEntity = Static<typeof sessions.schema>;
1991
1601
  //#endregion
1992
- //#region ../../src/api/users/schemas/completePasswordResetRequestSchema.d.ts
1993
- /**
1994
- * Request schema for completing a password reset.
1995
- *
1996
- * Requires the intent ID from Phase 1, the verification code,
1997
- * and the new password.
1998
- */
1999
- declare const completePasswordResetRequestSchema: alepha1.TObject<{
2000
- intentId: alepha1.TString;
2001
- code: alepha1.TString;
2002
- newPassword: alepha1.TString;
2003
- }>;
2004
- type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
1602
+ //#region ../../src/api/users/entities/users.d.ts
1603
+ declare const DEFAULT_USER_REALM_NAME = "default";
1604
+ declare const users: alepha_orm24.EntityPrimitive<alepha23.TObject<{
1605
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1606
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1607
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1608
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1609
+ realm: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_DEFAULT>;
1610
+ username: alepha23.TOptional<alepha23.TString>;
1611
+ email: alepha23.TOptional<alepha23.TString>;
1612
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1613
+ roles: alepha_orm24.PgAttr<alepha23.TArray<alepha23.TString>, typeof alepha_orm24.PG_DEFAULT>;
1614
+ firstName: alepha23.TOptional<alepha23.TString>;
1615
+ lastName: alepha23.TOptional<alepha23.TString>;
1616
+ picture: alepha23.TOptional<alepha23.TString>;
1617
+ enabled: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1618
+ emailVerified: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1619
+ }>>;
1620
+ type UserEntity = Static<typeof users.schema>;
2005
1621
  //#endregion
2006
- //#region ../../src/api/users/schemas/passwordResetIntentResponseSchema.d.ts
1622
+ //#region ../../src/api/users/primitives/$userRealm.d.ts
1623
+ type UserRealmPrimitive = RealmPrimitive & WithLinkFn & WithLoginFn;
2007
1624
  /**
2008
- * Response schema for password reset intent creation.
1625
+ * Already configured realm for user management.
2009
1626
  *
2010
- * Contains the intent ID needed for Phase 2 completion,
2011
- * along with expiration time.
2012
- */
2013
- declare const passwordResetIntentResponseSchema: alepha1.TObject<{
2014
- intentId: alepha1.TString;
2015
- expiresAt: alepha1.TString;
2016
- }>;
2017
- type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
2018
- //#endregion
2019
- //#region ../../src/api/users/services/CredentialService.d.ts
2020
- /**
2021
- * Intent stored in cache during the password reset flow.
1627
+ * Realm contains two roles: `admin` and `user`.
1628
+ *
1629
+ * - `admin`: Has full access to all resources and permissions.
1630
+ * - `user`: Has access to their own resources and permissions, but cannot access admin-level resources.
1631
+ *
1632
+ * Realm uses session management for handling user sessions.
1633
+ *
1634
+ * Environment Variables:
1635
+ * - `APP_SECRET`: Secret key for signing tokens (if not provided in options).
2022
1636
  */
2023
- interface PasswordResetIntent {
2024
- email: string;
2025
- userId: string;
2026
- identityId: string;
2027
- realmName?: string;
2028
- expiresAt: string;
2029
- }
2030
- declare class CredentialService {
2031
- protected readonly log: alepha_logger0.Logger;
2032
- protected readonly cryptoProvider: CryptoProvider;
2033
- protected readonly dateTimeProvider: DateTimeProvider;
2034
- protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2035
- protected readonly userNotifications: UserNotifications;
2036
- protected readonly userRealmProvider: UserRealmProvider;
2037
- protected readonly intentCache: alepha_cache0.CachePrimitiveFn<PasswordResetIntent, any[]>;
2038
- users(userRealmName?: string): Repository$1<alepha1.TObject<{
2039
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2040
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2041
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2042
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2043
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2044
- username: alepha1.TOptional<alepha1.TString>;
2045
- email: alepha1.TOptional<alepha1.TString>;
2046
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2047
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2048
- firstName: alepha1.TOptional<alepha1.TString>;
2049
- lastName: alepha1.TOptional<alepha1.TString>;
2050
- picture: alepha1.TOptional<alepha1.TString>;
2051
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2052
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2053
- }>>;
2054
- sessions(userRealmName?: string): Repository$1<alepha1.TObject<{
2055
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2056
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2057
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2058
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2059
- refreshToken: alepha1.TString;
2060
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2061
- expiresAt: alepha1.TString;
2062
- ip: alepha1.TOptional<alepha1.TString>;
2063
- userAgent: alepha1.TOptional<alepha1.TObject<{
2064
- os: alepha1.TString;
2065
- browser: alepha1.TString;
2066
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2067
- }>>;
1637
+ declare const $userRealm: (options?: UserRealmOptions) => UserRealmPrimitive;
1638
+ interface UserRealmOptions {
1639
+ /**
1640
+ * Secret key for signing tokens.
1641
+ *
1642
+ * If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
1643
+ */
1644
+ secret?: string;
1645
+ /**
1646
+ * Realm configuration options.
1647
+ *
1648
+ * It's already pre-configured for user management with admin and user roles.
1649
+ */
1650
+ realm?: Partial<RealmPrimitiveOptions>;
1651
+ /**
1652
+ * Override entities.
1653
+ */
1654
+ entities?: {
1655
+ users?: Repository<typeof users.schema>;
1656
+ identities?: Repository<typeof identities.schema>;
1657
+ sessions?: Repository<typeof sessions.schema>;
1658
+ };
1659
+ settings?: Partial<RealmAuthSettings>;
1660
+ identities?: {
1661
+ credentials?: true;
1662
+ google?: true;
1663
+ github?: true;
1664
+ };
1665
+ modules?: {
1666
+ files?: boolean;
1667
+ audits?: boolean;
1668
+ jobs?: boolean;
1669
+ };
1670
+ }
1671
+ //#endregion
1672
+ //#region ../../src/api/users/providers/UserRealmProvider.d.ts
1673
+ interface UserRealmRepositories {
1674
+ identities: Repository<typeof identities.schema>;
1675
+ sessions: Repository<typeof sessions.schema>;
1676
+ users: Repository<typeof users.schema>;
1677
+ }
1678
+ interface UserRealm {
1679
+ name: string;
1680
+ repositories: UserRealmRepositories;
1681
+ settings: RealmAuthSettings;
1682
+ }
1683
+ declare class UserRealmProvider {
1684
+ protected readonly alepha: Alepha;
1685
+ protected readonly defaultIdentities: Repository<alepha23.TObject<{
1686
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1687
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1688
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1689
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1690
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1691
+ password: alepha23.TOptional<alepha23.TString>;
1692
+ provider: alepha23.TString;
1693
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1694
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1695
+ }>>;
1696
+ protected readonly defaultSessions: Repository<alepha23.TObject<{
1697
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1698
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1699
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1700
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1701
+ refreshToken: alepha23.TString;
1702
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1703
+ expiresAt: alepha23.TString;
1704
+ ip: alepha23.TOptional<alepha23.TString>;
1705
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1706
+ os: alepha23.TString;
1707
+ browser: alepha23.TString;
1708
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1709
+ }>>;
1710
+ }>>;
1711
+ protected readonly defaultUsers: Repository<alepha23.TObject<{
1712
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1713
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1714
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1715
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1716
+ realm: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_DEFAULT>;
1717
+ username: alepha23.TOptional<alepha23.TString>;
1718
+ email: alepha23.TOptional<alepha23.TString>;
1719
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1720
+ roles: alepha_orm24.PgAttr<alepha23.TArray<alepha23.TString>, typeof alepha_orm24.PG_DEFAULT>;
1721
+ firstName: alepha23.TOptional<alepha23.TString>;
1722
+ lastName: alepha23.TOptional<alepha23.TString>;
1723
+ picture: alepha23.TOptional<alepha23.TString>;
1724
+ enabled: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1725
+ emailVerified: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1726
+ }>>;
1727
+ protected realms: Map<string, UserRealm>;
1728
+ avatars: alepha_bucket0.BucketPrimitive;
1729
+ protected readonly onConfigure: alepha23.HookPrimitive<"configure">;
1730
+ register(userRealmName: string, userRealmOptions?: UserRealmOptions): UserRealm;
1731
+ /**
1732
+ * Gets a registered realm by name, auto-creating default if needed.
1733
+ */
1734
+ getRealm(userRealmName?: string): UserRealm;
1735
+ identityRepository(userRealmName?: string): Repository<typeof identities.schema>;
1736
+ sessionRepository(userRealmName?: string): Repository<typeof sessions.schema>;
1737
+ userRepository(userRealmName?: string): Repository<typeof users.schema>;
1738
+ }
1739
+ //#endregion
1740
+ //#region ../../src/api/users/schemas/identityQuerySchema.d.ts
1741
+ declare const identityQuerySchema: alepha23.TObject<{
1742
+ page: alepha23.TOptional<alepha23.TInteger>;
1743
+ size: alepha23.TOptional<alepha23.TInteger>;
1744
+ sort: alepha23.TOptional<alepha23.TString>;
1745
+ userId: alepha23.TOptional<alepha23.TString>;
1746
+ provider: alepha23.TOptional<alepha23.TString>;
1747
+ }>;
1748
+ type IdentityQuery = Static<typeof identityQuerySchema>;
1749
+ //#endregion
1750
+ //#region ../../src/api/users/services/IdentityService.d.ts
1751
+ declare class IdentityService {
1752
+ protected readonly log: alepha_logger5.Logger;
1753
+ protected readonly userRealmProvider: UserRealmProvider;
1754
+ protected readonly auditService: AuditService;
1755
+ identities(userRealmName?: string): alepha_orm24.Repository<alepha23.TObject<{
1756
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1757
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1758
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1759
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1760
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1761
+ password: alepha23.TOptional<alepha23.TString>;
1762
+ provider: alepha23.TString;
1763
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1764
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1765
+ }>>;
1766
+ /**
1767
+ * Find identities with pagination and filtering.
1768
+ */
1769
+ findIdentities(q?: IdentityQuery, userRealmName?: string): Promise<Page$1<IdentityEntity>>;
1770
+ /**
1771
+ * Get an identity by ID.
1772
+ */
1773
+ getIdentityById(id: string, userRealmName?: string): Promise<IdentityEntity>;
1774
+ /**
1775
+ * Delete an identity by ID.
1776
+ */
1777
+ deleteIdentity(id: string, userRealmName?: string): Promise<void>;
1778
+ }
1779
+ //#endregion
1780
+ //#region ../../src/api/users/controllers/AdminIdentityController.d.ts
1781
+ declare class AdminIdentityController {
1782
+ protected readonly url = "/identities";
1783
+ protected readonly group = "admin:identities";
1784
+ protected readonly identityService: IdentityService;
1785
+ /**
1786
+ * Find identities with pagination and filtering.
1787
+ */
1788
+ readonly findIdentities: alepha_server0.ActionPrimitiveFn<{
1789
+ query: alepha23.TObject<{
1790
+ page: alepha23.TOptional<alepha23.TInteger>;
1791
+ size: alepha23.TOptional<alepha23.TInteger>;
1792
+ sort: alepha23.TOptional<alepha23.TString>;
1793
+ userId: alepha23.TOptional<alepha23.TString>;
1794
+ provider: alepha23.TOptional<alepha23.TString>;
1795
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1796
+ }>;
1797
+ response: alepha23.TPage<alepha23.TObject<{
1798
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1799
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1800
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1801
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1802
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
1803
+ provider: alepha23.TString;
1804
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1805
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1806
+ }>>;
1807
+ }>;
1808
+ /**
1809
+ * Get an identity by ID.
1810
+ */
1811
+ readonly getIdentity: alepha_server0.ActionPrimitiveFn<{
1812
+ params: alepha23.TObject<{
1813
+ id: alepha23.TString;
1814
+ }>;
1815
+ query: alepha23.TObject<{
1816
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1817
+ }>;
1818
+ response: alepha23.TObject<{
1819
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1820
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1821
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1822
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1823
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
1824
+ provider: alepha23.TString;
1825
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1826
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1827
+ }>;
1828
+ }>;
1829
+ /**
1830
+ * Delete an identity.
1831
+ */
1832
+ readonly deleteIdentity: alepha_server0.ActionPrimitiveFn<{
1833
+ params: alepha23.TObject<{
1834
+ id: alepha23.TString;
1835
+ }>;
1836
+ query: alepha23.TObject<{
1837
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1838
+ }>;
1839
+ response: alepha23.TObject<{
1840
+ ok: alepha23.TBoolean;
1841
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
1842
+ count: alepha23.TOptional<alepha23.TNumber>;
1843
+ }>;
1844
+ }>;
1845
+ }
1846
+ //#endregion
1847
+ //#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
1848
+ declare const sessionQuerySchema: alepha23.TObject<{
1849
+ page: alepha23.TOptional<alepha23.TInteger>;
1850
+ size: alepha23.TOptional<alepha23.TInteger>;
1851
+ sort: alepha23.TOptional<alepha23.TString>;
1852
+ userId: alepha23.TOptional<alepha23.TString>;
1853
+ }>;
1854
+ type SessionQuery = Static<typeof sessionQuerySchema>;
1855
+ //#endregion
1856
+ //#region ../../src/api/users/services/SessionCrudService.d.ts
1857
+ declare class SessionCrudService {
1858
+ protected readonly log: alepha_logger5.Logger;
1859
+ protected readonly userRealmProvider: UserRealmProvider;
1860
+ sessions(userRealmName?: string): alepha_orm24.Repository<alepha23.TObject<{
1861
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1862
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1863
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1864
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1865
+ refreshToken: alepha23.TString;
1866
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1867
+ expiresAt: alepha23.TString;
1868
+ ip: alepha23.TOptional<alepha23.TString>;
1869
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1870
+ os: alepha23.TString;
1871
+ browser: alepha23.TString;
1872
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1873
+ }>>;
1874
+ }>>;
1875
+ /**
1876
+ * Find sessions with pagination and filtering.
1877
+ */
1878
+ findSessions(q?: SessionQuery, userRealmName?: string): Promise<Page$1<SessionEntity>>;
1879
+ /**
1880
+ * Get a session by ID.
1881
+ */
1882
+ getSessionById(id: string, userRealmName?: string): Promise<SessionEntity>;
1883
+ /**
1884
+ * Delete a session by ID.
1885
+ */
1886
+ deleteSession(id: string, userRealmName?: string): Promise<void>;
1887
+ }
1888
+ //#endregion
1889
+ //#region ../../src/api/users/controllers/AdminSessionController.d.ts
1890
+ declare class AdminSessionController {
1891
+ protected readonly url = "/sessions";
1892
+ protected readonly group = "admin:sessions";
1893
+ protected readonly sessionService: SessionCrudService;
1894
+ /**
1895
+ * Find sessions with pagination and filtering.
1896
+ */
1897
+ readonly findSessions: alepha_server0.ActionPrimitiveFn<{
1898
+ query: alepha23.TObject<{
1899
+ page: alepha23.TOptional<alepha23.TInteger>;
1900
+ size: alepha23.TOptional<alepha23.TInteger>;
1901
+ sort: alepha23.TOptional<alepha23.TString>;
1902
+ userId: alepha23.TOptional<alepha23.TString>;
1903
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1904
+ }>;
1905
+ response: alepha23.TPage<alepha23.TObject<{
1906
+ id: alepha23.TString;
1907
+ version: alepha23.TNumber;
1908
+ createdAt: alepha23.TString;
1909
+ updatedAt: alepha23.TString;
1910
+ refreshToken: alepha23.TString;
1911
+ userId: alepha23.TString;
1912
+ expiresAt: alepha23.TString;
1913
+ ip: alepha23.TOptional<alepha23.TString>;
1914
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1915
+ os: alepha23.TString;
1916
+ browser: alepha23.TString;
1917
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1918
+ }>>;
1919
+ }>>;
1920
+ }>;
1921
+ /**
1922
+ * Get a session by ID.
1923
+ */
1924
+ readonly getSession: alepha_server0.ActionPrimitiveFn<{
1925
+ params: alepha23.TObject<{
1926
+ id: alepha23.TString;
1927
+ }>;
1928
+ query: alepha23.TObject<{
1929
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1930
+ }>;
1931
+ response: alepha23.TObject<{
1932
+ id: alepha23.TString;
1933
+ version: alepha23.TNumber;
1934
+ createdAt: alepha23.TString;
1935
+ updatedAt: alepha23.TString;
1936
+ refreshToken: alepha23.TString;
1937
+ userId: alepha23.TString;
1938
+ expiresAt: alepha23.TString;
1939
+ ip: alepha23.TOptional<alepha23.TString>;
1940
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1941
+ os: alepha23.TString;
1942
+ browser: alepha23.TString;
1943
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1944
+ }>>;
1945
+ }>;
1946
+ }>;
1947
+ /**
1948
+ * Delete a session.
1949
+ */
1950
+ readonly deleteSession: alepha_server0.ActionPrimitiveFn<{
1951
+ params: alepha23.TObject<{
1952
+ id: alepha23.TString;
1953
+ }>;
1954
+ query: alepha23.TObject<{
1955
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1956
+ }>;
1957
+ response: alepha23.TObject<{
1958
+ ok: alepha23.TBoolean;
1959
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
1960
+ count: alepha23.TOptional<alepha23.TNumber>;
1961
+ }>;
1962
+ }>;
1963
+ }
1964
+ //#endregion
1965
+ //#region ../../src/api/users/notifications/UserNotifications.d.ts
1966
+ declare class UserNotifications {
1967
+ readonly passwordReset: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1968
+ email: alepha23.TString;
1969
+ code: alepha23.TString;
1970
+ expiresInMinutes: alepha23.TNumber;
1971
+ }>>;
1972
+ readonly emailVerification: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1973
+ email: alepha23.TString;
1974
+ code: alepha23.TString;
1975
+ expiresInMinutes: alepha23.TNumber;
1976
+ }>>;
1977
+ readonly phoneVerification: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1978
+ phoneNumber: alepha23.TString;
1979
+ code: alepha23.TString;
1980
+ expiresInMinutes: alepha23.TNumber;
1981
+ }>>;
1982
+ readonly passwordResetLink: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1983
+ email: alepha23.TString;
1984
+ resetUrl: alepha23.TString;
1985
+ expiresInMinutes: alepha23.TNumber;
1986
+ }>>;
1987
+ readonly emailVerificationLink: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1988
+ email: alepha23.TString;
1989
+ verifyUrl: alepha23.TString;
1990
+ expiresInMinutes: alepha23.TNumber;
1991
+ }>>;
1992
+ }
1993
+ //#endregion
1994
+ //#region ../../src/api/users/schemas/createUserSchema.d.ts
1995
+ declare const createUserSchema: alepha23.TObject<{
1996
+ id: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
1997
+ version: alepha23.TOptional<PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
1998
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1999
+ createdAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2000
+ updatedAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2001
+ username: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2002
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2003
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2004
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2005
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2006
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2007
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2008
+ emailVerified: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2009
+ }>;
2010
+ type CreateUser = Static<typeof createUserSchema>;
2011
+ //#endregion
2012
+ //#region ../../src/api/users/schemas/updateUserSchema.d.ts
2013
+ declare const updateUserSchema: alepha23.TObject<{
2014
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2015
+ realm: alepha23.TOptional<PgAttr<alepha23.TString, typeof PG_DEFAULT>>;
2016
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2017
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2018
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2019
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2020
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2021
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2022
+ }>;
2023
+ type UpdateUser = Static<typeof updateUserSchema>;
2024
+ //#endregion
2025
+ //#region ../../src/api/users/schemas/userQuerySchema.d.ts
2026
+ declare const userQuerySchema: alepha23.TObject<{
2027
+ page: alepha23.TOptional<alepha23.TInteger>;
2028
+ size: alepha23.TOptional<alepha23.TInteger>;
2029
+ sort: alepha23.TOptional<alepha23.TString>;
2030
+ email: alepha23.TOptional<alepha23.TString>;
2031
+ enabled: alepha23.TOptional<alepha23.TBoolean>;
2032
+ emailVerified: alepha23.TOptional<alepha23.TBoolean>;
2033
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2034
+ query: alepha23.TOptional<alepha23.TString>;
2035
+ }>;
2036
+ type UserQuery = Static<typeof userQuerySchema>;
2037
+ //#endregion
2038
+ //#region ../../src/api/users/services/UserService.d.ts
2039
+ declare class UserService {
2040
+ protected readonly log: alepha_logger5.Logger;
2041
+ protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2042
+ protected readonly userNotifications: UserNotifications;
2043
+ protected readonly userRealmProvider: UserRealmProvider;
2044
+ protected readonly auditService: AuditService;
2045
+ users(userRealmName?: string): alepha_orm24.Repository<alepha23.TObject<{
2046
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
2047
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
2048
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
2049
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
2050
+ realm: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_DEFAULT>;
2051
+ username: alepha23.TOptional<alepha23.TString>;
2052
+ email: alepha23.TOptional<alepha23.TString>;
2053
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2054
+ roles: alepha_orm24.PgAttr<alepha23.TArray<alepha23.TString>, typeof alepha_orm24.PG_DEFAULT>;
2055
+ firstName: alepha23.TOptional<alepha23.TString>;
2056
+ lastName: alepha23.TOptional<alepha23.TString>;
2057
+ picture: alepha23.TOptional<alepha23.TString>;
2058
+ enabled: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
2059
+ emailVerified: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
2060
+ }>>;
2061
+ /**
2062
+ * Request email verification for a user.
2063
+ * @param email - The email address to verify.
2064
+ * @param userRealmName - Optional realm name.
2065
+ * @param method - The verification method: "code" (default) or "link".
2066
+ * @param verifyUrl - Base URL for verification link (required when method is "link").
2067
+ */
2068
+ requestEmailVerification(email: string, userRealmName?: string, method?: "code" | "link", verifyUrl?: string): Promise<boolean>;
2069
+ /**
2070
+ * Verify a user's email using a valid verification token.
2071
+ * Supports both code (6-digit) and link (UUID) verification tokens.
2072
+ */
2073
+ verifyEmail(email: string, token: string, userRealmName?: string): Promise<void>;
2074
+ /**
2075
+ * Check if an email is verified.
2076
+ */
2077
+ isEmailVerified(email: string, userRealmName?: string): Promise<boolean>;
2078
+ /**
2079
+ * Find users with pagination and filtering.
2080
+ */
2081
+ findUsers(q?: UserQuery, userRealmName?: string): Promise<Page$1<UserEntity>>;
2082
+ /**
2083
+ * Get a user by ID.
2084
+ */
2085
+ getUserById(id: string, userRealmName?: string): Promise<UserEntity>;
2086
+ /**
2087
+ * Create a new user.
2088
+ */
2089
+ createUser(data: CreateUser, userRealmName?: string): Promise<UserEntity>;
2090
+ /**
2091
+ * Update an existing user.
2092
+ */
2093
+ updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
2094
+ /**
2095
+ * Delete a user by ID.
2096
+ */
2097
+ deleteUser(id: string, userRealmName?: string): Promise<void>;
2098
+ }
2099
+ //#endregion
2100
+ //#region ../../src/api/users/controllers/AdminUserController.d.ts
2101
+ declare class AdminUserController {
2102
+ protected readonly url = "/users";
2103
+ protected readonly group = "admin:users";
2104
+ protected readonly userService: UserService;
2105
+ /**
2106
+ * Find users with pagination and filtering.
2107
+ */
2108
+ readonly findUsers: alepha_server0.ActionPrimitiveFn<{
2109
+ query: alepha23.TObject<{
2110
+ page: alepha23.TOptional<alepha23.TInteger>;
2111
+ size: alepha23.TOptional<alepha23.TInteger>;
2112
+ sort: alepha23.TOptional<alepha23.TString>;
2113
+ email: alepha23.TOptional<alepha23.TString>;
2114
+ enabled: alepha23.TOptional<alepha23.TBoolean>;
2115
+ emailVerified: alepha23.TOptional<alepha23.TBoolean>;
2116
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2117
+ query: alepha23.TOptional<alepha23.TString>;
2118
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2119
+ }>;
2120
+ response: alepha23.TPage<alepha23.TObject<{
2121
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2122
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2123
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2124
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2125
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2126
+ username: alepha23.TOptional<alepha23.TString>;
2127
+ email: alepha23.TOptional<alepha23.TString>;
2128
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2129
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2130
+ firstName: alepha23.TOptional<alepha23.TString>;
2131
+ lastName: alepha23.TOptional<alepha23.TString>;
2132
+ picture: alepha23.TOptional<alepha23.TString>;
2133
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2134
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2135
+ }>>;
2136
+ }>;
2137
+ /**
2138
+ * Get a user by ID.
2139
+ */
2140
+ readonly getUser: alepha_server0.ActionPrimitiveFn<{
2141
+ params: alepha23.TObject<{
2142
+ id: alepha23.TString;
2143
+ }>;
2144
+ query: alepha23.TObject<{
2145
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2146
+ }>;
2147
+ response: alepha23.TObject<{
2148
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2149
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2150
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2151
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2152
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2153
+ username: alepha23.TOptional<alepha23.TString>;
2154
+ email: alepha23.TOptional<alepha23.TString>;
2155
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2156
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2157
+ firstName: alepha23.TOptional<alepha23.TString>;
2158
+ lastName: alepha23.TOptional<alepha23.TString>;
2159
+ picture: alepha23.TOptional<alepha23.TString>;
2160
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2161
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2162
+ }>;
2163
+ }>;
2164
+ /**
2165
+ * Create a new user.
2166
+ */
2167
+ readonly createUser: alepha_server0.ActionPrimitiveFn<{
2168
+ query: alepha23.TObject<{
2169
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2170
+ }>;
2171
+ body: alepha23.TObject<{
2172
+ id: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2173
+ version: alepha23.TOptional<PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2174
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2175
+ createdAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2176
+ updatedAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2177
+ username: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2178
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2179
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2180
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2181
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2182
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2183
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2184
+ emailVerified: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2185
+ }>;
2186
+ response: alepha23.TObject<{
2187
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2188
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2189
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2190
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2191
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2192
+ username: alepha23.TOptional<alepha23.TString>;
2193
+ email: alepha23.TOptional<alepha23.TString>;
2194
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2195
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2196
+ firstName: alepha23.TOptional<alepha23.TString>;
2197
+ lastName: alepha23.TOptional<alepha23.TString>;
2198
+ picture: alepha23.TOptional<alepha23.TString>;
2199
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2200
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2201
+ }>;
2202
+ }>;
2203
+ /**
2204
+ * Update a user.
2205
+ */
2206
+ readonly updateUser: alepha_server0.ActionPrimitiveFn<{
2207
+ params: alepha23.TObject<{
2208
+ id: alepha23.TString;
2209
+ }>;
2210
+ query: alepha23.TObject<{
2211
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2212
+ }>;
2213
+ body: alepha23.TObject<{
2214
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2215
+ realm: alepha23.TOptional<PgAttr<alepha23.TString, typeof PG_DEFAULT>>;
2216
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2217
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2218
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2219
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2220
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2221
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2222
+ }>;
2223
+ response: alepha23.TObject<{
2224
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2225
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2226
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2227
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2228
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2229
+ username: alepha23.TOptional<alepha23.TString>;
2230
+ email: alepha23.TOptional<alepha23.TString>;
2231
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2232
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2233
+ firstName: alepha23.TOptional<alepha23.TString>;
2234
+ lastName: alepha23.TOptional<alepha23.TString>;
2235
+ picture: alepha23.TOptional<alepha23.TString>;
2236
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2237
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2238
+ }>;
2239
+ }>;
2240
+ /**
2241
+ * Delete a user.
2242
+ */
2243
+ readonly deleteUser: alepha_server0.ActionPrimitiveFn<{
2244
+ params: alepha23.TObject<{
2245
+ id: alepha23.TString;
2246
+ }>;
2247
+ query: alepha23.TObject<{
2248
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2249
+ }>;
2250
+ response: alepha23.TObject<{
2251
+ ok: alepha23.TBoolean;
2252
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
2253
+ count: alepha23.TOptional<alepha23.TNumber>;
2254
+ }>;
2255
+ }>;
2256
+ }
2257
+ //#endregion
2258
+ //#region ../../src/api/users/schemas/completePasswordResetRequestSchema.d.ts
2259
+ /**
2260
+ * Request schema for completing a password reset.
2261
+ *
2262
+ * Requires the intent ID from Phase 1, the verification code,
2263
+ * and the new password.
2264
+ */
2265
+ declare const completePasswordResetRequestSchema: alepha23.TObject<{
2266
+ intentId: alepha23.TString;
2267
+ code: alepha23.TString;
2268
+ newPassword: alepha23.TString;
2269
+ }>;
2270
+ type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
2271
+ //#endregion
2272
+ //#region ../../src/api/users/schemas/passwordResetIntentResponseSchema.d.ts
2273
+ /**
2274
+ * Response schema for password reset intent creation.
2275
+ *
2276
+ * Contains the intent ID needed for Phase 2 completion,
2277
+ * along with expiration time.
2278
+ */
2279
+ declare const passwordResetIntentResponseSchema: alepha23.TObject<{
2280
+ intentId: alepha23.TString;
2281
+ expiresAt: alepha23.TString;
2282
+ }>;
2283
+ type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
2284
+ //#endregion
2285
+ //#region ../../src/api/users/services/CredentialService.d.ts
2286
+ /**
2287
+ * Intent stored in cache during the password reset flow.
2288
+ */
2289
+ interface PasswordResetIntent {
2290
+ email: string;
2291
+ userId: string;
2292
+ identityId: string;
2293
+ realmName?: string;
2294
+ expiresAt: string;
2295
+ }
2296
+ declare class CredentialService {
2297
+ protected readonly log: alepha_logger5.Logger;
2298
+ protected readonly cryptoProvider: CryptoProvider;
2299
+ protected readonly dateTimeProvider: DateTimeProvider;
2300
+ protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2301
+ protected readonly userNotifications: UserNotifications;
2302
+ protected readonly userRealmProvider: UserRealmProvider;
2303
+ protected readonly auditService: AuditService;
2304
+ protected readonly intentCache: alepha_cache0.CachePrimitiveFn<PasswordResetIntent, any[]>;
2305
+ users(userRealmName?: string): Repository$1<alepha23.TObject<{
2306
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2307
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2308
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2309
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2310
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2311
+ username: alepha23.TOptional<alepha23.TString>;
2312
+ email: alepha23.TOptional<alepha23.TString>;
2313
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2314
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2315
+ firstName: alepha23.TOptional<alepha23.TString>;
2316
+ lastName: alepha23.TOptional<alepha23.TString>;
2317
+ picture: alepha23.TOptional<alepha23.TString>;
2318
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2319
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2320
+ }>>;
2321
+ sessions(userRealmName?: string): Repository$1<alepha23.TObject<{
2322
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2323
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2324
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2325
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2326
+ refreshToken: alepha23.TString;
2327
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2328
+ expiresAt: alepha23.TString;
2329
+ ip: alepha23.TOptional<alepha23.TString>;
2330
+ userAgent: alepha23.TOptional<alepha23.TObject<{
2331
+ os: alepha23.TString;
2332
+ browser: alepha23.TString;
2333
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2334
+ }>>;
2068
2335
  }>>;
2069
- identities(userRealmName?: string): Repository$1<alepha1.TObject<{
2070
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2071
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2072
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2073
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2074
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2075
- password: alepha1.TOptional<alepha1.TString>;
2076
- provider: alepha1.TString;
2077
- providerUserId: alepha1.TOptional<alepha1.TString>;
2078
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2336
+ identities(userRealmName?: string): Repository$1<alepha23.TObject<{
2337
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2338
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2339
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2340
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2341
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2342
+ password: alepha23.TOptional<alepha23.TString>;
2343
+ provider: alepha23.TString;
2344
+ providerUserId: alepha23.TOptional<alepha23.TString>;
2345
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
2079
2346
  }>>;
2080
2347
  /**
2081
2348
  * Phase 1: Create a password reset intent.
@@ -2112,11 +2379,11 @@ declare class CredentialService {
2112
2379
  }
2113
2380
  //#endregion
2114
2381
  //#region ../../src/api/users/schemas/completeRegistrationRequestSchema.d.ts
2115
- declare const completeRegistrationRequestSchema: alepha1.TObject<{
2116
- intentId: alepha1.TString;
2117
- emailCode: alepha1.TOptional<alepha1.TString>;
2118
- phoneCode: alepha1.TOptional<alepha1.TString>;
2119
- captchaToken: alepha1.TOptional<alepha1.TString>;
2382
+ declare const completeRegistrationRequestSchema: alepha23.TObject<{
2383
+ intentId: alepha23.TString;
2384
+ emailCode: alepha23.TOptional<alepha23.TString>;
2385
+ phoneCode: alepha23.TOptional<alepha23.TString>;
2386
+ captchaToken: alepha23.TOptional<alepha23.TString>;
2120
2387
  }>;
2121
2388
  type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSchema>;
2122
2389
  //#endregion
@@ -2125,24 +2392,24 @@ type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSche
2125
2392
  * Schema for user registration request body.
2126
2393
  * Password is always required, other fields depend on realm settings.
2127
2394
  */
2128
- declare const registerRequestSchema: alepha1.TObject<{
2129
- password: alepha1.TString;
2130
- username: alepha1.TOptional<alepha1.TString>;
2131
- email: alepha1.TOptional<alepha1.TString>;
2132
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2133
- firstName: alepha1.TOptional<alepha1.TString>;
2134
- lastName: alepha1.TOptional<alepha1.TString>;
2135
- picture: alepha1.TOptional<alepha1.TString>;
2395
+ declare const registerRequestSchema: alepha23.TObject<{
2396
+ password: alepha23.TString;
2397
+ username: alepha23.TOptional<alepha23.TString>;
2398
+ email: alepha23.TOptional<alepha23.TString>;
2399
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2400
+ firstName: alepha23.TOptional<alepha23.TString>;
2401
+ lastName: alepha23.TOptional<alepha23.TString>;
2402
+ picture: alepha23.TOptional<alepha23.TString>;
2136
2403
  }>;
2137
2404
  type RegisterRequest = Static<typeof registerRequestSchema>;
2138
2405
  //#endregion
2139
2406
  //#region ../../src/api/users/schemas/registrationIntentResponseSchema.d.ts
2140
- declare const registrationIntentResponseSchema: alepha1.TObject<{
2141
- intentId: alepha1.TString;
2142
- expectCaptcha: alepha1.TBoolean;
2143
- expectEmailVerification: alepha1.TBoolean;
2144
- expectPhoneVerification: alepha1.TBoolean;
2145
- expiresAt: alepha1.TString;
2407
+ declare const registrationIntentResponseSchema: alepha23.TObject<{
2408
+ intentId: alepha23.TString;
2409
+ expectCaptcha: alepha23.TBoolean;
2410
+ expectEmailVerification: alepha23.TBoolean;
2411
+ expectPhoneVerification: alepha23.TBoolean;
2412
+ expiresAt: alepha23.TString;
2146
2413
  }>;
2147
2414
  type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema>;
2148
2415
  //#endregion
@@ -2169,12 +2436,13 @@ interface RegistrationIntent {
2169
2436
  expiresAt: string;
2170
2437
  }
2171
2438
  declare class RegistrationService {
2172
- protected readonly log: alepha_logger0.Logger;
2439
+ protected readonly log: alepha_logger5.Logger;
2173
2440
  protected readonly dateTimeProvider: DateTimeProvider;
2174
2441
  protected readonly cryptoProvider: CryptoProvider;
2175
2442
  protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2176
2443
  protected readonly userNotifications: UserNotifications;
2177
2444
  protected readonly userRealmProvider: UserRealmProvider;
2445
+ protected readonly auditService: AuditService;
2178
2446
  protected readonly intentCache: alepha_cache0.CachePrimitiveFn<RegistrationIntent, any[]>;
2179
2447
  /**
2180
2448
  * Phase 1: Create a registration intent.
@@ -2212,111 +2480,6 @@ declare class RegistrationService {
2212
2480
  protected verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
2213
2481
  }
2214
2482
  //#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
2483
  //#region ../../src/api/users/controllers/UserController.d.ts
2321
2484
  declare class UserController {
2322
2485
  protected readonly url = "/users";
@@ -2328,282 +2491,131 @@ declare class UserController {
2328
2491
  * Phase 1: Create a registration intent.
2329
2492
  * Validates data, creates verification sessions, and stores intent in cache.
2330
2493
  */
2331
- readonly createRegistrationIntent: alepha_server14.ActionPrimitiveFn<{
2332
- body: alepha1.TObject<{
2333
- password: alepha1.TString;
2334
- username: alepha1.TOptional<alepha1.TString>;
2335
- email: alepha1.TOptional<alepha1.TString>;
2336
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2337
- firstName: alepha1.TOptional<alepha1.TString>;
2338
- lastName: alepha1.TOptional<alepha1.TString>;
2339
- picture: alepha1.TOptional<alepha1.TString>;
2340
- }>;
2341
- query: alepha1.TObject<{
2342
- userRealmName: alepha1.TOptional<alepha1.TString>;
2343
- }>;
2344
- response: alepha1.TObject<{
2345
- intentId: alepha1.TString;
2346
- expectCaptcha: alepha1.TBoolean;
2347
- expectEmailVerification: alepha1.TBoolean;
2348
- expectPhoneVerification: alepha1.TBoolean;
2349
- expiresAt: alepha1.TString;
2350
- }>;
2351
- }>;
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>;
2494
+ readonly createRegistrationIntent: alepha_server0.ActionPrimitiveFn<{
2495
+ body: alepha23.TObject<{
2496
+ password: alepha23.TString;
2497
+ username: alepha23.TOptional<alepha23.TString>;
2498
+ email: alepha23.TOptional<alepha23.TString>;
2499
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2500
+ firstName: alepha23.TOptional<alepha23.TString>;
2501
+ lastName: alepha23.TOptional<alepha23.TString>;
2502
+ picture: alepha23.TOptional<alepha23.TString>;
2417
2503
  }>;
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>>;
2504
+ query: alepha23.TObject<{
2505
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2432
2506
  }>;
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>;
2507
+ response: alepha23.TObject<{
2508
+ intentId: alepha23.TString;
2509
+ expectCaptcha: alepha23.TBoolean;
2510
+ expectEmailVerification: alepha23.TBoolean;
2511
+ expectPhoneVerification: alepha23.TBoolean;
2512
+ expiresAt: alepha23.TString;
2448
2513
  }>;
2449
2514
  }>;
2450
2515
  /**
2451
2516
  * Phase 2: Complete registration using an intent.
2452
2517
  * Validates verification codes and creates the user.
2453
2518
  */
2454
- readonly createUserFromIntent: alepha_server14.ActionPrimitiveFn<{
2455
- body: alepha1.TObject<{
2456
- intentId: alepha1.TString;
2457
- emailCode: alepha1.TOptional<alepha1.TString>;
2458
- phoneCode: alepha1.TOptional<alepha1.TString>;
2459
- captchaToken: alepha1.TOptional<alepha1.TString>;
2519
+ readonly createUserFromIntent: alepha_server0.ActionPrimitiveFn<{
2520
+ body: alepha23.TObject<{
2521
+ intentId: alepha23.TString;
2522
+ emailCode: alepha23.TOptional<alepha23.TString>;
2523
+ phoneCode: alepha23.TOptional<alepha23.TString>;
2524
+ captchaToken: alepha23.TOptional<alepha23.TString>;
2460
2525
  }>;
2461
- 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>;
2504
- username: alepha1.TOptional<alepha1.TString>;
2505
- email: alepha1.TOptional<alepha1.TString>;
2506
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2507
- roles: alepha_orm179.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm179.PG_DEFAULT>;
2508
- firstName: alepha1.TOptional<alepha1.TString>;
2509
- lastName: alepha1.TOptional<alepha1.TString>;
2510
- 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>;
2526
+ response: alepha23.TObject<{
2527
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2528
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2529
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2530
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2531
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2532
+ username: alepha23.TOptional<alepha23.TString>;
2533
+ email: alepha23.TOptional<alepha23.TString>;
2534
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2535
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2536
+ firstName: alepha23.TOptional<alepha23.TString>;
2537
+ lastName: alepha23.TOptional<alepha23.TString>;
2538
+ picture: alepha23.TOptional<alepha23.TString>;
2539
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2540
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2529
2541
  }>;
2530
2542
  }>;
2531
2543
  /**
2532
2544
  * Phase 1: Create a password reset intent.
2533
2545
  * Validates email, sends verification code, and stores intent in cache.
2534
2546
  */
2535
- readonly createPasswordResetIntent: alepha_server14.ActionPrimitiveFn<{
2536
- query: alepha1.TObject<{
2537
- userRealmName: alepha1.TOptional<alepha1.TString>;
2547
+ readonly createPasswordResetIntent: alepha_server0.ActionPrimitiveFn<{
2548
+ query: alepha23.TObject<{
2549
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2538
2550
  }>;
2539
- body: alepha1.TObject<{
2540
- email: alepha1.TString;
2551
+ body: alepha23.TObject<{
2552
+ email: alepha23.TString;
2541
2553
  }>;
2542
- response: alepha1.TObject<{
2543
- intentId: alepha1.TString;
2544
- expiresAt: alepha1.TString;
2554
+ response: alepha23.TObject<{
2555
+ intentId: alepha23.TString;
2556
+ expiresAt: alepha23.TString;
2545
2557
  }>;
2546
2558
  }>;
2547
2559
  /**
2548
2560
  * Phase 2: Complete password reset using an intent.
2549
2561
  * Validates verification code, updates password, and invalidates sessions.
2550
2562
  */
2551
- readonly completePasswordReset: alepha_server14.ActionPrimitiveFn<{
2552
- body: alepha1.TObject<{
2553
- intentId: alepha1.TString;
2554
- code: alepha1.TString;
2555
- newPassword: alepha1.TString;
2563
+ readonly completePasswordReset: alepha_server0.ActionPrimitiveFn<{
2564
+ body: alepha23.TObject<{
2565
+ intentId: alepha23.TString;
2566
+ code: alepha23.TString;
2567
+ newPassword: alepha23.TString;
2556
2568
  }>;
2557
- response: alepha1.TObject<{
2558
- ok: alepha1.TBoolean;
2559
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
2560
- count: alepha1.TOptional<alepha1.TNumber>;
2569
+ response: alepha23.TObject<{
2570
+ ok: alepha23.TBoolean;
2571
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
2572
+ count: alepha23.TOptional<alepha23.TNumber>;
2561
2573
  }>;
2562
2574
  }>;
2563
2575
  /**
2564
2576
  * @deprecated Use createPasswordResetIntent instead
2565
2577
  */
2566
- requestPasswordReset: alepha_server14.ActionPrimitiveFn<{
2567
- query: alepha1.TObject<{
2568
- userRealmName: alepha1.TOptional<alepha1.TString>;
2578
+ requestPasswordReset: alepha_server0.ActionPrimitiveFn<{
2579
+ query: alepha23.TObject<{
2580
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2569
2581
  }>;
2570
- body: alepha1.TObject<{
2571
- email: alepha1.TString;
2582
+ body: alepha23.TObject<{
2583
+ email: alepha23.TString;
2572
2584
  }>;
2573
- response: alepha1.TObject<{
2574
- success: alepha1.TBoolean;
2575
- message: alepha1.TString;
2585
+ response: alepha23.TObject<{
2586
+ success: alepha23.TBoolean;
2587
+ message: alepha23.TString;
2576
2588
  }>;
2577
2589
  }>;
2578
2590
  /**
2579
2591
  * @deprecated Use completePasswordReset instead
2580
2592
  */
2581
- validateResetToken: alepha_server14.ActionPrimitiveFn<{
2582
- query: alepha1.TObject<{
2583
- email: alepha1.TString;
2584
- token: alepha1.TString;
2585
- userRealmName: alepha1.TOptional<alepha1.TString>;
2593
+ validateResetToken: alepha_server0.ActionPrimitiveFn<{
2594
+ query: alepha23.TObject<{
2595
+ email: alepha23.TString;
2596
+ token: alepha23.TString;
2597
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2586
2598
  }>;
2587
- response: alepha1.TObject<{
2588
- valid: alepha1.TBoolean;
2589
- email: alepha1.TOptional<alepha1.TString>;
2599
+ response: alepha23.TObject<{
2600
+ valid: alepha23.TBoolean;
2601
+ email: alepha23.TOptional<alepha23.TString>;
2590
2602
  }>;
2591
2603
  }>;
2592
2604
  /**
2593
2605
  * @deprecated Use completePasswordReset instead
2594
2606
  */
2595
- resetPassword: alepha_server14.ActionPrimitiveFn<{
2596
- query: alepha1.TObject<{
2597
- userRealmName: alepha1.TOptional<alepha1.TString>;
2607
+ resetPassword: alepha_server0.ActionPrimitiveFn<{
2608
+ query: alepha23.TObject<{
2609
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2598
2610
  }>;
2599
- body: alepha1.TObject<{
2600
- email: alepha1.TString;
2601
- token: alepha1.TString;
2602
- newPassword: alepha1.TString;
2611
+ body: alepha23.TObject<{
2612
+ email: alepha23.TString;
2613
+ token: alepha23.TString;
2614
+ newPassword: alepha23.TString;
2603
2615
  }>;
2604
- response: alepha1.TObject<{
2605
- success: alepha1.TBoolean;
2606
- message: alepha1.TString;
2616
+ response: alepha23.TObject<{
2617
+ success: alepha23.TBoolean;
2618
+ message: alepha23.TString;
2607
2619
  }>;
2608
2620
  }>;
2609
2621
  /**
@@ -2612,47 +2624,47 @@ declare class UserController {
2612
2624
  * @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
2613
2625
  * @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
2614
2626
  */
2615
- requestEmailVerification: alepha_server14.ActionPrimitiveFn<{
2616
- query: alepha1.TObject<{
2617
- userRealmName: alepha1.TOptional<alepha1.TString>;
2618
- method: alepha1.TOptional<alepha1.TUnsafe<"link" | "code">>;
2619
- verifyUrl: alepha1.TOptional<alepha1.TString>;
2627
+ requestEmailVerification: alepha_server0.ActionPrimitiveFn<{
2628
+ query: alepha23.TObject<{
2629
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2630
+ method: alepha23.TOptional<alepha23.TUnsafe<"link" | "code">>;
2631
+ verifyUrl: alepha23.TOptional<alepha23.TString>;
2620
2632
  }>;
2621
- body: alepha1.TObject<{
2622
- email: alepha1.TString;
2633
+ body: alepha23.TObject<{
2634
+ email: alepha23.TString;
2623
2635
  }>;
2624
- response: alepha1.TObject<{
2625
- success: alepha1.TBoolean;
2626
- message: alepha1.TString;
2636
+ response: alepha23.TObject<{
2637
+ success: alepha23.TBoolean;
2638
+ message: alepha23.TString;
2627
2639
  }>;
2628
2640
  }>;
2629
2641
  /**
2630
2642
  * Verify email with a valid token.
2631
2643
  * Updates the user's emailVerified status.
2632
2644
  */
2633
- verifyEmail: alepha_server14.ActionPrimitiveFn<{
2634
- query: alepha1.TObject<{
2635
- userRealmName: alepha1.TOptional<alepha1.TString>;
2645
+ verifyEmail: alepha_server0.ActionPrimitiveFn<{
2646
+ query: alepha23.TObject<{
2647
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2636
2648
  }>;
2637
- body: alepha1.TObject<{
2638
- email: alepha1.TString;
2639
- token: alepha1.TString;
2649
+ body: alepha23.TObject<{
2650
+ email: alepha23.TString;
2651
+ token: alepha23.TString;
2640
2652
  }>;
2641
- response: alepha1.TObject<{
2642
- success: alepha1.TBoolean;
2643
- message: alepha1.TString;
2653
+ response: alepha23.TObject<{
2654
+ success: alepha23.TBoolean;
2655
+ message: alepha23.TString;
2644
2656
  }>;
2645
2657
  }>;
2646
2658
  /**
2647
2659
  * Check if an email is verified.
2648
2660
  */
2649
- checkEmailVerification: alepha_server14.ActionPrimitiveFn<{
2650
- query: alepha1.TObject<{
2651
- email: alepha1.TString;
2652
- userRealmName: alepha1.TOptional<alepha1.TString>;
2661
+ checkEmailVerification: alepha_server0.ActionPrimitiveFn<{
2662
+ query: alepha23.TObject<{
2663
+ email: alepha23.TString;
2664
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2653
2665
  }>;
2654
- response: alepha1.TObject<{
2655
- verified: alepha1.TBoolean;
2666
+ response: alepha23.TObject<{
2667
+ verified: alepha23.TBoolean;
2656
2668
  }>;
2657
2669
  }>;
2658
2670
  }
@@ -2664,172 +2676,173 @@ declare class UserController {
2664
2676
  */
2665
2677
  declare class UserRealmController {
2666
2678
  protected readonly url = "/realms";
2679
+ protected readonly group = "realms";
2667
2680
  protected readonly userRealmProvider: UserRealmProvider;
2668
2681
  protected readonly serverAuthProvider: ServerAuthProvider;
2669
2682
  /**
2670
2683
  * Get realm configuration settings.
2671
2684
  * This endpoint is not exposed in the API documentation.
2672
2685
  */
2673
- readonly getRealmConfig: alepha_server14.ActionPrimitiveFn<{
2674
- query: alepha1.TObject<{
2675
- userRealmName: alepha1.TOptional<alepha1.TString>;
2686
+ readonly getRealmConfig: alepha_server0.ActionPrimitiveFn<{
2687
+ query: alepha23.TObject<{
2688
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2676
2689
  }>;
2677
- response: alepha1.TObject<{
2678
- settings: alepha1.TObject<{
2679
- displayName: alepha1.TOptional<alepha1.TString>;
2680
- description: alepha1.TOptional<alepha1.TString>;
2681
- logoUrl: alepha1.TOptional<alepha1.TString>;
2682
- registrationAllowed: alepha1.TBoolean;
2683
- emailEnabled: alepha1.TBoolean;
2684
- emailRequired: alepha1.TBoolean;
2685
- usernameEnabled: alepha1.TBoolean;
2686
- usernameRequired: alepha1.TBoolean;
2687
- phoneEnabled: alepha1.TBoolean;
2688
- phoneRequired: alepha1.TBoolean;
2689
- verifyEmailRequired: alepha1.TBoolean;
2690
- verifyPhoneRequired: alepha1.TBoolean;
2691
- firstNameLastNameEnabled: alepha1.TBoolean;
2692
- firstNameLastNameRequired: alepha1.TBoolean;
2693
- resetPasswordAllowed: alepha1.TBoolean;
2694
- passwordPolicy: alepha1.TObject<{
2695
- minLength: alepha1.TInteger;
2696
- requireUppercase: alepha1.TBoolean;
2697
- requireLowercase: alepha1.TBoolean;
2698
- requireNumbers: alepha1.TBoolean;
2699
- requireSpecialCharacters: alepha1.TBoolean;
2690
+ response: alepha23.TObject<{
2691
+ settings: alepha23.TObject<{
2692
+ displayName: alepha23.TOptional<alepha23.TString>;
2693
+ description: alepha23.TOptional<alepha23.TString>;
2694
+ logoUrl: alepha23.TOptional<alepha23.TString>;
2695
+ registrationAllowed: alepha23.TBoolean;
2696
+ emailEnabled: alepha23.TBoolean;
2697
+ emailRequired: alepha23.TBoolean;
2698
+ usernameEnabled: alepha23.TBoolean;
2699
+ usernameRequired: alepha23.TBoolean;
2700
+ phoneEnabled: alepha23.TBoolean;
2701
+ phoneRequired: alepha23.TBoolean;
2702
+ verifyEmailRequired: alepha23.TBoolean;
2703
+ verifyPhoneRequired: alepha23.TBoolean;
2704
+ firstNameLastNameEnabled: alepha23.TBoolean;
2705
+ firstNameLastNameRequired: alepha23.TBoolean;
2706
+ resetPasswordAllowed: alepha23.TBoolean;
2707
+ passwordPolicy: alepha23.TObject<{
2708
+ minLength: alepha23.TInteger;
2709
+ requireUppercase: alepha23.TBoolean;
2710
+ requireLowercase: alepha23.TBoolean;
2711
+ requireNumbers: alepha23.TBoolean;
2712
+ requireSpecialCharacters: alepha23.TBoolean;
2700
2713
  }>;
2701
2714
  }>;
2702
- realmName: alepha1.TString;
2703
- authenticationMethods: alepha1.TArray<alepha1.TObject<{
2704
- name: alepha1.TString;
2705
- type: alepha1.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2715
+ realmName: alepha23.TString;
2716
+ authenticationMethods: alepha23.TArray<alepha23.TObject<{
2717
+ name: alepha23.TString;
2718
+ type: alepha23.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2706
2719
  }>>;
2707
2720
  }>;
2708
2721
  }>;
2709
- readonly checkUsernameAvailability: alepha_server14.ActionPrimitiveFn<{
2710
- query: alepha1.TObject<{
2711
- userRealmName: alepha1.TOptional<alepha1.TString>;
2722
+ readonly checkUsernameAvailability: alepha_server0.ActionPrimitiveFn<{
2723
+ query: alepha23.TObject<{
2724
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2712
2725
  }>;
2713
- body: alepha1.TObject<{
2714
- username: alepha1.TString;
2726
+ body: alepha23.TObject<{
2727
+ username: alepha23.TString;
2715
2728
  }>;
2716
- response: alepha1.TObject<{
2717
- available: alepha1.TBoolean;
2729
+ response: alepha23.TObject<{
2730
+ available: alepha23.TBoolean;
2718
2731
  }>;
2719
2732
  }>;
2720
2733
  }
2721
2734
  //#endregion
2722
2735
  //#region ../../src/api/users/schemas/identityResourceSchema.d.ts
2723
- declare const identityResourceSchema: alepha1.TObject<{
2724
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2725
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2726
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2727
- 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
- providerUserId: alepha1.TOptional<alepha1.TString>;
2731
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2736
+ declare const identityResourceSchema: alepha23.TObject<{
2737
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2738
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2739
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2740
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2741
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2742
+ provider: alepha23.TString;
2743
+ providerUserId: alepha23.TOptional<alepha23.TString>;
2744
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
2732
2745
  }>;
2733
2746
  type IdentityResource = Static<typeof identityResourceSchema>;
2734
2747
  //#endregion
2735
2748
  //#region ../../src/api/users/schemas/loginSchema.d.ts
2736
- declare const loginSchema: alepha1.TObject<{
2737
- username: alepha1.TString;
2738
- password: alepha1.TString;
2749
+ declare const loginSchema: alepha23.TObject<{
2750
+ username: alepha23.TString;
2751
+ password: alepha23.TString;
2739
2752
  }>;
2740
2753
  type LoginInput = Static<typeof loginSchema>;
2741
2754
  //#endregion
2742
2755
  //#region ../../src/api/users/schemas/registerSchema.d.ts
2743
- declare const registerSchema: alepha1.TObject<{
2744
- username: alepha1.TString;
2745
- email: alepha1.TString;
2746
- password: alepha1.TString;
2747
- confirmPassword: alepha1.TString;
2748
- firstName: alepha1.TOptional<alepha1.TString>;
2749
- lastName: alepha1.TOptional<alepha1.TString>;
2756
+ declare const registerSchema: alepha23.TObject<{
2757
+ username: alepha23.TString;
2758
+ email: alepha23.TString;
2759
+ password: alepha23.TString;
2760
+ confirmPassword: alepha23.TString;
2761
+ firstName: alepha23.TOptional<alepha23.TString>;
2762
+ lastName: alepha23.TOptional<alepha23.TString>;
2750
2763
  }>;
2751
2764
  type RegisterInput = Static<typeof registerSchema>;
2752
2765
  //#endregion
2753
2766
  //#region ../../src/api/users/schemas/resetPasswordSchema.d.ts
2754
- declare const resetPasswordRequestSchema: alepha1.TObject<{
2755
- email: alepha1.TString;
2767
+ declare const resetPasswordRequestSchema: alepha23.TObject<{
2768
+ email: alepha23.TString;
2756
2769
  }>;
2757
- declare const resetPasswordSchema: alepha1.TObject<{
2758
- token: alepha1.TString;
2759
- password: alepha1.TString;
2760
- confirmPassword: alepha1.TString;
2770
+ declare const resetPasswordSchema: alepha23.TObject<{
2771
+ token: alepha23.TString;
2772
+ password: alepha23.TString;
2773
+ confirmPassword: alepha23.TString;
2761
2774
  }>;
2762
2775
  type ResetPasswordRequest = Static<typeof resetPasswordRequestSchema>;
2763
2776
  type ResetPasswordInput = Static<typeof resetPasswordSchema>;
2764
2777
  //#endregion
2765
2778
  //#region ../../src/api/users/schemas/sessionResourceSchema.d.ts
2766
- declare const sessionResourceSchema: alepha1.TObject<{
2767
- id: alepha1.TString;
2768
- version: alepha1.TNumber;
2769
- createdAt: alepha1.TString;
2770
- updatedAt: alepha1.TString;
2771
- refreshToken: alepha1.TString;
2772
- userId: alepha1.TString;
2773
- expiresAt: alepha1.TString;
2774
- ip: alepha1.TOptional<alepha1.TString>;
2775
- userAgent: alepha1.TOptional<alepha1.TObject<{
2776
- os: alepha1.TString;
2777
- browser: alepha1.TString;
2778
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2779
+ declare const sessionResourceSchema: alepha23.TObject<{
2780
+ id: alepha23.TString;
2781
+ version: alepha23.TNumber;
2782
+ createdAt: alepha23.TString;
2783
+ updatedAt: alepha23.TString;
2784
+ refreshToken: alepha23.TString;
2785
+ userId: alepha23.TString;
2786
+ expiresAt: alepha23.TString;
2787
+ ip: alepha23.TOptional<alepha23.TString>;
2788
+ userAgent: alepha23.TOptional<alepha23.TObject<{
2789
+ os: alepha23.TString;
2790
+ browser: alepha23.TString;
2791
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2779
2792
  }>>;
2780
2793
  }>;
2781
2794
  type SessionResource = Static<typeof sessionResourceSchema>;
2782
2795
  //#endregion
2783
2796
  //#region ../../src/api/users/schemas/userRealmConfigSchema.d.ts
2784
- declare const userRealmConfigSchema: alepha1.TObject<{
2785
- settings: alepha1.TObject<{
2786
- displayName: alepha1.TOptional<alepha1.TString>;
2787
- description: alepha1.TOptional<alepha1.TString>;
2788
- logoUrl: alepha1.TOptional<alepha1.TString>;
2789
- registrationAllowed: alepha1.TBoolean;
2790
- emailEnabled: alepha1.TBoolean;
2791
- emailRequired: alepha1.TBoolean;
2792
- usernameEnabled: alepha1.TBoolean;
2793
- usernameRequired: alepha1.TBoolean;
2794
- phoneEnabled: alepha1.TBoolean;
2795
- phoneRequired: alepha1.TBoolean;
2796
- verifyEmailRequired: alepha1.TBoolean;
2797
- verifyPhoneRequired: alepha1.TBoolean;
2798
- firstNameLastNameEnabled: alepha1.TBoolean;
2799
- firstNameLastNameRequired: alepha1.TBoolean;
2800
- resetPasswordAllowed: alepha1.TBoolean;
2801
- passwordPolicy: alepha1.TObject<{
2802
- minLength: alepha1.TInteger;
2803
- requireUppercase: alepha1.TBoolean;
2804
- requireLowercase: alepha1.TBoolean;
2805
- requireNumbers: alepha1.TBoolean;
2806
- requireSpecialCharacters: alepha1.TBoolean;
2797
+ declare const userRealmConfigSchema: alepha23.TObject<{
2798
+ settings: alepha23.TObject<{
2799
+ displayName: alepha23.TOptional<alepha23.TString>;
2800
+ description: alepha23.TOptional<alepha23.TString>;
2801
+ logoUrl: alepha23.TOptional<alepha23.TString>;
2802
+ registrationAllowed: alepha23.TBoolean;
2803
+ emailEnabled: alepha23.TBoolean;
2804
+ emailRequired: alepha23.TBoolean;
2805
+ usernameEnabled: alepha23.TBoolean;
2806
+ usernameRequired: alepha23.TBoolean;
2807
+ phoneEnabled: alepha23.TBoolean;
2808
+ phoneRequired: alepha23.TBoolean;
2809
+ verifyEmailRequired: alepha23.TBoolean;
2810
+ verifyPhoneRequired: alepha23.TBoolean;
2811
+ firstNameLastNameEnabled: alepha23.TBoolean;
2812
+ firstNameLastNameRequired: alepha23.TBoolean;
2813
+ resetPasswordAllowed: alepha23.TBoolean;
2814
+ passwordPolicy: alepha23.TObject<{
2815
+ minLength: alepha23.TInteger;
2816
+ requireUppercase: alepha23.TBoolean;
2817
+ requireLowercase: alepha23.TBoolean;
2818
+ requireNumbers: alepha23.TBoolean;
2819
+ requireSpecialCharacters: alepha23.TBoolean;
2807
2820
  }>;
2808
2821
  }>;
2809
- realmName: alepha1.TString;
2810
- authenticationMethods: alepha1.TArray<alepha1.TObject<{
2811
- name: alepha1.TString;
2812
- type: alepha1.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2822
+ realmName: alepha23.TString;
2823
+ authenticationMethods: alepha23.TArray<alepha23.TObject<{
2824
+ name: alepha23.TString;
2825
+ type: alepha23.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2813
2826
  }>>;
2814
2827
  }>;
2815
2828
  type UserRealmConfig = Static<typeof userRealmConfigSchema>;
2816
2829
  //#endregion
2817
2830
  //#region ../../src/api/users/schemas/userResourceSchema.d.ts
2818
- declare const userResourceSchema: alepha1.TObject<{
2819
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2820
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2821
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2822
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2823
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2824
- username: alepha1.TOptional<alepha1.TString>;
2825
- email: alepha1.TOptional<alepha1.TString>;
2826
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2827
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2828
- firstName: alepha1.TOptional<alepha1.TString>;
2829
- lastName: alepha1.TOptional<alepha1.TString>;
2830
- picture: alepha1.TOptional<alepha1.TString>;
2831
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2832
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2831
+ declare const userResourceSchema: alepha23.TObject<{
2832
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2833
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2834
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2835
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2836
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2837
+ username: alepha23.TOptional<alepha23.TString>;
2838
+ email: alepha23.TOptional<alepha23.TString>;
2839
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2840
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2841
+ firstName: alepha23.TOptional<alepha23.TString>;
2842
+ lastName: alepha23.TOptional<alepha23.TString>;
2843
+ picture: alepha23.TOptional<alepha23.TString>;
2844
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2845
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2833
2846
  }>;
2834
2847
  type UserResource = Static<typeof userResourceSchema>;
2835
2848
  //#endregion
@@ -2839,50 +2852,51 @@ declare class SessionService {
2839
2852
  protected readonly fsp: FileSystemProvider;
2840
2853
  protected readonly dateTimeProvider: DateTimeProvider;
2841
2854
  protected readonly cryptoProvider: CryptoProvider;
2842
- protected readonly log: alepha_logger0.Logger;
2855
+ protected readonly log: alepha_logger5.Logger;
2843
2856
  protected readonly userRealmProvider: UserRealmProvider;
2844
2857
  protected readonly fileController: alepha_server_links0.HttpVirtualClient<FileController>;
2845
- users(userRealmName?: string): Repository$1<alepha1.TObject<{
2846
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2847
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2848
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2849
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2850
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2851
- username: alepha1.TOptional<alepha1.TString>;
2852
- email: alepha1.TOptional<alepha1.TString>;
2853
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2854
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2855
- firstName: alepha1.TOptional<alepha1.TString>;
2856
- lastName: alepha1.TOptional<alepha1.TString>;
2857
- picture: alepha1.TOptional<alepha1.TString>;
2858
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2859
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2858
+ protected readonly auditService: AuditService;
2859
+ users(userRealmName?: string): Repository$1<alepha23.TObject<{
2860
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2861
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2862
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2863
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2864
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2865
+ username: alepha23.TOptional<alepha23.TString>;
2866
+ email: alepha23.TOptional<alepha23.TString>;
2867
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2868
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2869
+ firstName: alepha23.TOptional<alepha23.TString>;
2870
+ lastName: alepha23.TOptional<alepha23.TString>;
2871
+ picture: alepha23.TOptional<alepha23.TString>;
2872
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2873
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2860
2874
  }>>;
2861
- sessions(userRealmName?: string): Repository$1<alepha1.TObject<{
2862
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2863
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2864
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2865
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2866
- refreshToken: alepha1.TString;
2867
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2868
- expiresAt: alepha1.TString;
2869
- ip: alepha1.TOptional<alepha1.TString>;
2870
- userAgent: alepha1.TOptional<alepha1.TObject<{
2871
- os: alepha1.TString;
2872
- browser: alepha1.TString;
2873
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2875
+ sessions(userRealmName?: string): Repository$1<alepha23.TObject<{
2876
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2877
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2878
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2879
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2880
+ refreshToken: alepha23.TString;
2881
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2882
+ expiresAt: alepha23.TString;
2883
+ ip: alepha23.TOptional<alepha23.TString>;
2884
+ userAgent: alepha23.TOptional<alepha23.TObject<{
2885
+ os: alepha23.TString;
2886
+ browser: alepha23.TString;
2887
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2874
2888
  }>>;
2875
2889
  }>>;
2876
- identities(userRealmName?: string): Repository$1<alepha1.TObject<{
2877
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2878
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2879
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2880
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2881
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2882
- password: alepha1.TOptional<alepha1.TString>;
2883
- provider: alepha1.TString;
2884
- providerUserId: alepha1.TOptional<alepha1.TString>;
2885
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2890
+ identities(userRealmName?: string): Repository$1<alepha23.TObject<{
2891
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2892
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2893
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2894
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2895
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2896
+ password: alepha23.TOptional<alepha23.TString>;
2897
+ provider: alepha23.TString;
2898
+ providerUserId: alepha23.TOptional<alepha23.TString>;
2899
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
2886
2900
  }>>;
2887
2901
  /**
2888
2902
  * Random delay to prevent timing attacks (50-200ms)
@@ -2898,56 +2912,56 @@ declare class SessionService {
2898
2912
  sessionId: string;
2899
2913
  }>;
2900
2914
  refreshSession(refreshToken: string, userRealmName?: string): Promise<{
2901
- user: PgStatic<alepha1.TObject<{
2902
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2903
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2904
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2905
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2906
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2907
- username: alepha1.TOptional<alepha1.TString>;
2908
- email: alepha1.TOptional<alepha1.TString>;
2909
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2910
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2911
- firstName: alepha1.TOptional<alepha1.TString>;
2912
- lastName: alepha1.TOptional<alepha1.TString>;
2913
- picture: alepha1.TOptional<alepha1.TString>;
2914
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2915
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2916
- }>, PgRelationMap<alepha1.TObject<{
2917
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2918
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2919
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2920
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2921
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2922
- username: alepha1.TOptional<alepha1.TString>;
2923
- email: alepha1.TOptional<alepha1.TString>;
2924
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2925
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2926
- firstName: alepha1.TOptional<alepha1.TString>;
2927
- lastName: alepha1.TOptional<alepha1.TString>;
2928
- picture: alepha1.TOptional<alepha1.TString>;
2929
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2930
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2915
+ user: PgStatic<alepha23.TObject<{
2916
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2917
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2918
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2919
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2920
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2921
+ username: alepha23.TOptional<alepha23.TString>;
2922
+ email: alepha23.TOptional<alepha23.TString>;
2923
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2924
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2925
+ firstName: alepha23.TOptional<alepha23.TString>;
2926
+ lastName: alepha23.TOptional<alepha23.TString>;
2927
+ picture: alepha23.TOptional<alepha23.TString>;
2928
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2929
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2930
+ }>, PgRelationMap<alepha23.TObject<{
2931
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2932
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2933
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2934
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2935
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2936
+ username: alepha23.TOptional<alepha23.TString>;
2937
+ email: alepha23.TOptional<alepha23.TString>;
2938
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2939
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2940
+ firstName: alepha23.TOptional<alepha23.TString>;
2941
+ lastName: alepha23.TOptional<alepha23.TString>;
2942
+ picture: alepha23.TOptional<alepha23.TString>;
2943
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2944
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2931
2945
  }>>>;
2932
2946
  expiresIn: number;
2933
2947
  sessionId: string;
2934
2948
  }>;
2935
2949
  deleteSession(refreshToken: string, userRealmName?: string): Promise<void>;
2936
2950
  link(provider: string, profile: OAuth2Profile, userRealmName?: string): Promise<{
2937
- username?: string | undefined;
2938
2951
  email?: string | undefined;
2952
+ username?: string | undefined;
2939
2953
  phoneNumber?: string | undefined;
2940
2954
  firstName?: string | undefined;
2941
2955
  lastName?: string | undefined;
2942
2956
  picture?: string | undefined;
2943
- enabled: boolean;
2944
- emailVerified: boolean;
2945
- roles: string[];
2946
2957
  id: string;
2947
2958
  version: number;
2948
2959
  createdAt: string;
2949
2960
  updatedAt: string;
2950
2961
  realm: string;
2962
+ roles: string[];
2963
+ enabled: boolean;
2964
+ emailVerified: boolean;
2951
2965
  } | {
2952
2966
  sub: string;
2953
2967
  email?: string;
@@ -2989,7 +3003,7 @@ declare class SessionService {
2989
3003
  *
2990
3004
  * @module alepha.api.users
2991
3005
  */
2992
- declare const AlephaApiUsers: alepha1.Service<alepha1.Module>;
3006
+ declare const AlephaApiUsers: alepha23.Service<alepha23.Module>;
2993
3007
  //#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 };
3008
+ 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
3009
  //# sourceMappingURL=index.d.ts.map