alepha 0.14.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/README.md +1 -4
  2. package/dist/api/audits/index.d.ts +619 -731
  3. package/dist/api/audits/index.d.ts.map +1 -1
  4. package/dist/api/files/index.d.ts +185 -298
  5. package/dist/api/files/index.d.ts.map +1 -1
  6. package/dist/api/files/index.js +0 -1
  7. package/dist/api/files/index.js.map +1 -1
  8. package/dist/api/jobs/index.d.ts +245 -356
  9. package/dist/api/jobs/index.d.ts.map +1 -1
  10. package/dist/api/notifications/index.d.ts +238 -350
  11. package/dist/api/notifications/index.d.ts.map +1 -1
  12. package/dist/api/parameters/index.d.ts +499 -611
  13. package/dist/api/parameters/index.d.ts.map +1 -1
  14. package/dist/api/users/index.browser.js +1 -2
  15. package/dist/api/users/index.browser.js.map +1 -1
  16. package/dist/api/users/index.d.ts +1697 -1804
  17. package/dist/api/users/index.d.ts.map +1 -1
  18. package/dist/api/users/index.js +178 -151
  19. package/dist/api/users/index.js.map +1 -1
  20. package/dist/api/verifications/index.d.ts +132 -132
  21. package/dist/api/verifications/index.d.ts.map +1 -1
  22. package/dist/batch/index.d.ts +122 -122
  23. package/dist/batch/index.d.ts.map +1 -1
  24. package/dist/batch/index.js +1 -2
  25. package/dist/batch/index.js.map +1 -1
  26. package/dist/bucket/index.d.ts +163 -163
  27. package/dist/bucket/index.d.ts.map +1 -1
  28. package/dist/cache/core/index.d.ts +46 -46
  29. package/dist/cache/core/index.d.ts.map +1 -1
  30. package/dist/cache/redis/index.d.ts.map +1 -1
  31. package/dist/cli/index.d.ts +302 -299
  32. package/dist/cli/index.d.ts.map +1 -1
  33. package/dist/cli/index.js +966 -564
  34. package/dist/cli/index.js.map +1 -1
  35. package/dist/command/index.d.ts +303 -299
  36. package/dist/command/index.d.ts.map +1 -1
  37. package/dist/command/index.js +11 -7
  38. package/dist/command/index.js.map +1 -1
  39. package/dist/core/index.browser.js +419 -99
  40. package/dist/core/index.browser.js.map +1 -1
  41. package/dist/core/index.d.ts +718 -625
  42. package/dist/core/index.d.ts.map +1 -1
  43. package/dist/core/index.js +420 -99
  44. package/dist/core/index.js.map +1 -1
  45. package/dist/core/index.native.js +419 -99
  46. package/dist/core/index.native.js.map +1 -1
  47. package/dist/datetime/index.d.ts +44 -44
  48. package/dist/datetime/index.d.ts.map +1 -1
  49. package/dist/datetime/index.js +4 -4
  50. package/dist/datetime/index.js.map +1 -1
  51. package/dist/email/index.d.ts +97 -50
  52. package/dist/email/index.d.ts.map +1 -1
  53. package/dist/email/index.js +129 -33
  54. package/dist/email/index.js.map +1 -1
  55. package/dist/fake/index.d.ts +7981 -14
  56. package/dist/fake/index.d.ts.map +1 -1
  57. package/dist/file/index.d.ts +523 -390
  58. package/dist/file/index.d.ts.map +1 -1
  59. package/dist/file/index.js +253 -1
  60. package/dist/file/index.js.map +1 -1
  61. package/dist/lock/core/index.d.ts +208 -208
  62. package/dist/lock/core/index.d.ts.map +1 -1
  63. package/dist/lock/redis/index.d.ts.map +1 -1
  64. package/dist/logger/index.d.ts +25 -26
  65. package/dist/logger/index.d.ts.map +1 -1
  66. package/dist/mcp/index.d.ts +197 -197
  67. package/dist/mcp/index.d.ts.map +1 -1
  68. package/dist/orm/chunk-DtkW-qnP.js +38 -0
  69. package/dist/orm/index.browser.js.map +1 -1
  70. package/dist/orm/index.bun.js +2814 -0
  71. package/dist/orm/index.bun.js.map +1 -0
  72. package/dist/orm/index.d.ts +1205 -1057
  73. package/dist/orm/index.d.ts.map +1 -1
  74. package/dist/orm/index.js +2056 -1753
  75. package/dist/orm/index.js.map +1 -1
  76. package/dist/queue/core/index.d.ts +248 -248
  77. package/dist/queue/core/index.d.ts.map +1 -1
  78. package/dist/queue/redis/index.d.ts.map +1 -1
  79. package/dist/redis/index.bun.js +285 -0
  80. package/dist/redis/index.bun.js.map +1 -0
  81. package/dist/redis/index.d.ts +118 -136
  82. package/dist/redis/index.d.ts.map +1 -1
  83. package/dist/redis/index.js +18 -38
  84. package/dist/redis/index.js.map +1 -1
  85. package/dist/retry/index.d.ts +69 -69
  86. package/dist/retry/index.d.ts.map +1 -1
  87. package/dist/router/index.d.ts +6 -6
  88. package/dist/router/index.d.ts.map +1 -1
  89. package/dist/scheduler/index.d.ts +25 -25
  90. package/dist/scheduler/index.d.ts.map +1 -1
  91. package/dist/security/index.browser.js +5 -1
  92. package/dist/security/index.browser.js.map +1 -1
  93. package/dist/security/index.d.ts +417 -254
  94. package/dist/security/index.d.ts.map +1 -1
  95. package/dist/security/index.js +386 -86
  96. package/dist/security/index.js.map +1 -1
  97. package/dist/server/auth/index.d.ts +277 -277
  98. package/dist/server/auth/index.d.ts.map +1 -1
  99. package/dist/server/auth/index.js +20 -20
  100. package/dist/server/auth/index.js.map +1 -1
  101. package/dist/server/cache/index.d.ts +60 -57
  102. package/dist/server/cache/index.d.ts.map +1 -1
  103. package/dist/server/cache/index.js +1 -1
  104. package/dist/server/cache/index.js.map +1 -1
  105. package/dist/server/compress/index.d.ts +3 -3
  106. package/dist/server/compress/index.d.ts.map +1 -1
  107. package/dist/server/cookies/index.d.ts +6 -6
  108. package/dist/server/cookies/index.d.ts.map +1 -1
  109. package/dist/server/cookies/index.js +3 -3
  110. package/dist/server/cookies/index.js.map +1 -1
  111. package/dist/server/core/index.d.ts +242 -150
  112. package/dist/server/core/index.d.ts.map +1 -1
  113. package/dist/server/core/index.js +288 -122
  114. package/dist/server/core/index.js.map +1 -1
  115. package/dist/server/cors/index.d.ts +11 -12
  116. package/dist/server/cors/index.d.ts.map +1 -1
  117. package/dist/server/health/index.d.ts +0 -1
  118. package/dist/server/health/index.d.ts.map +1 -1
  119. package/dist/server/helmet/index.d.ts +2 -2
  120. package/dist/server/helmet/index.d.ts.map +1 -1
  121. package/dist/server/links/index.browser.js.map +1 -1
  122. package/dist/server/links/index.d.ts +84 -85
  123. package/dist/server/links/index.d.ts.map +1 -1
  124. package/dist/server/links/index.js +1 -2
  125. package/dist/server/links/index.js.map +1 -1
  126. package/dist/server/metrics/index.d.ts.map +1 -1
  127. package/dist/server/multipart/index.d.ts +6 -6
  128. package/dist/server/multipart/index.d.ts.map +1 -1
  129. package/dist/server/proxy/index.d.ts +102 -103
  130. package/dist/server/proxy/index.d.ts.map +1 -1
  131. package/dist/server/rate-limit/index.d.ts +16 -16
  132. package/dist/server/rate-limit/index.d.ts.map +1 -1
  133. package/dist/server/static/index.d.ts +44 -44
  134. package/dist/server/static/index.d.ts.map +1 -1
  135. package/dist/server/swagger/index.d.ts +48 -49
  136. package/dist/server/swagger/index.d.ts.map +1 -1
  137. package/dist/server/swagger/index.js +1 -2
  138. package/dist/server/swagger/index.js.map +1 -1
  139. package/dist/sms/index.d.ts +13 -11
  140. package/dist/sms/index.d.ts.map +1 -1
  141. package/dist/sms/index.js +7 -7
  142. package/dist/sms/index.js.map +1 -1
  143. package/dist/thread/index.d.ts +71 -72
  144. package/dist/thread/index.d.ts.map +1 -1
  145. package/dist/topic/core/index.d.ts +318 -318
  146. package/dist/topic/core/index.d.ts.map +1 -1
  147. package/dist/topic/redis/index.d.ts +6 -6
  148. package/dist/topic/redis/index.d.ts.map +1 -1
  149. package/dist/vite/index.d.ts +5720 -159
  150. package/dist/vite/index.d.ts.map +1 -1
  151. package/dist/vite/index.js +41 -18
  152. package/dist/vite/index.js.map +1 -1
  153. package/dist/websocket/index.browser.js +6 -6
  154. package/dist/websocket/index.browser.js.map +1 -1
  155. package/dist/websocket/index.d.ts +247 -247
  156. package/dist/websocket/index.d.ts.map +1 -1
  157. package/dist/websocket/index.js +6 -6
  158. package/dist/websocket/index.js.map +1 -1
  159. package/package.json +9 -14
  160. package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
  161. package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
  162. package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
  163. package/src/api/users/entities/users.ts +1 -1
  164. package/src/api/users/index.ts +8 -8
  165. package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
  166. package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
  167. package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
  168. package/src/api/users/services/CredentialService.ts +7 -7
  169. package/src/api/users/services/IdentityService.ts +4 -4
  170. package/src/api/users/services/RegistrationService.spec.ts +25 -27
  171. package/src/api/users/services/RegistrationService.ts +38 -27
  172. package/src/api/users/services/SessionCrudService.ts +3 -3
  173. package/src/api/users/services/SessionService.spec.ts +3 -3
  174. package/src/api/users/services/SessionService.ts +28 -9
  175. package/src/api/users/services/UserService.ts +7 -7
  176. package/src/batch/providers/BatchProvider.ts +1 -2
  177. package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
  178. package/src/cli/assets/apiHelloControllerTs.ts +18 -0
  179. package/src/cli/assets/apiIndexTs.ts +16 -0
  180. package/src/cli/assets/claudeMd.ts +303 -0
  181. package/src/cli/assets/mainBrowserTs.ts +2 -2
  182. package/src/cli/assets/mainServerTs.ts +24 -0
  183. package/src/cli/assets/webAppRouterTs.ts +15 -0
  184. package/src/cli/assets/webHelloComponentTsx.ts +16 -0
  185. package/src/cli/assets/webIndexTs.ts +16 -0
  186. package/src/cli/commands/build.ts +41 -21
  187. package/src/cli/commands/db.ts +21 -18
  188. package/src/cli/commands/deploy.ts +17 -5
  189. package/src/cli/commands/dev.ts +13 -17
  190. package/src/cli/commands/format.ts +8 -2
  191. package/src/cli/commands/init.ts +74 -29
  192. package/src/cli/commands/lint.ts +8 -2
  193. package/src/cli/commands/test.ts +8 -2
  194. package/src/cli/commands/typecheck.ts +5 -1
  195. package/src/cli/commands/verify.ts +4 -2
  196. package/src/cli/services/AlephaCliUtils.ts +39 -600
  197. package/src/cli/services/PackageManagerUtils.ts +301 -0
  198. package/src/cli/services/ProjectScaffolder.ts +306 -0
  199. package/src/command/helpers/Runner.ts +15 -3
  200. package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
  201. package/src/core/index.shared.ts +1 -0
  202. package/src/core/index.ts +2 -0
  203. package/src/core/primitives/$hook.ts +6 -2
  204. package/src/core/primitives/$module.spec.ts +4 -0
  205. package/src/core/providers/AlsProvider.ts +1 -1
  206. package/src/core/providers/CodecManager.spec.ts +12 -6
  207. package/src/core/providers/CodecManager.ts +26 -6
  208. package/src/core/providers/EventManager.ts +169 -13
  209. package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
  210. package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
  211. package/src/core/providers/StateManager.spec.ts +27 -16
  212. package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
  213. package/src/email/providers/LocalEmailProvider.ts +52 -15
  214. package/src/email/providers/NodemailerEmailProvider.ts +167 -56
  215. package/src/file/errors/FileError.ts +7 -0
  216. package/src/file/index.ts +9 -1
  217. package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
  218. package/src/orm/index.browser.ts +1 -19
  219. package/src/orm/index.bun.ts +77 -0
  220. package/src/orm/index.shared-server.ts +22 -0
  221. package/src/orm/index.shared.ts +15 -0
  222. package/src/orm/index.ts +19 -39
  223. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
  224. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  225. package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
  226. package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
  227. package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
  228. package/src/orm/services/Repository.ts +8 -0
  229. package/src/redis/index.bun.ts +35 -0
  230. package/src/redis/providers/BunRedisProvider.ts +12 -43
  231. package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
  232. package/src/redis/providers/NodeRedisProvider.ts +16 -34
  233. package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
  234. package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
  235. package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
  236. package/src/security/index.browser.ts +5 -0
  237. package/src/security/index.ts +90 -7
  238. package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
  239. package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
  240. package/src/security/primitives/$role.ts +5 -5
  241. package/src/security/primitives/$serviceAccount.spec.ts +5 -5
  242. package/src/security/primitives/$serviceAccount.ts +3 -3
  243. package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
  244. package/src/server/auth/primitives/$auth.ts +10 -10
  245. package/src/server/auth/primitives/$authCredentials.ts +3 -3
  246. package/src/server/auth/primitives/$authGithub.ts +3 -3
  247. package/src/server/auth/primitives/$authGoogle.ts +3 -3
  248. package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
  249. package/src/server/cache/providers/ServerCacheProvider.ts +1 -1
  250. package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
  251. package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
  252. package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
  253. package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
  254. package/src/server/core/providers/ServerProvider.ts +144 -21
  255. package/src/server/core/providers/ServerRouterProvider.ts +259 -115
  256. package/src/server/core/providers/ServerTimingProvider.ts +2 -2
  257. package/src/server/links/index.ts +1 -1
  258. package/src/server/links/providers/LinkProvider.ts +1 -1
  259. package/src/server/swagger/index.ts +1 -1
  260. package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
  261. package/src/sms/providers/LocalSmsProvider.ts +8 -7
  262. package/src/vite/helpers/boot.ts +28 -17
  263. package/src/vite/tasks/buildServer.ts +12 -1
  264. package/src/vite/tasks/devServer.ts +3 -1
  265. package/src/vite/tasks/generateCloudflare.ts +7 -0
  266. package/dist/server/security/index.browser.js +0 -13
  267. package/dist/server/security/index.browser.js.map +0 -1
  268. package/dist/server/security/index.d.ts +0 -173
  269. package/dist/server/security/index.d.ts.map +0 -1
  270. package/dist/server/security/index.js +0 -311
  271. package/dist/server/security/index.js.map +0 -1
  272. package/src/cli/assets/appRouterTs.ts +0 -9
  273. package/src/cli/assets/mainTs.ts +0 -13
  274. package/src/server/security/index.browser.ts +0 -10
  275. package/src/server/security/index.ts +0 -94
  276. /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
  277. /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
@@ -1,18 +1,18 @@
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
5
  import * as alepha_server0 from "alepha/server";
6
- import * as alepha_orm0 from "alepha/orm";
6
+ import * as alepha_orm24 from "alepha/orm";
7
7
  import { Page as Page$1, Repository } from "alepha/orm";
8
8
  import { AuditService } from "alepha/api/audits";
9
9
  import * as alepha_logger5 from "alepha/logger";
10
10
  import * as alepha_bucket0 from "alepha/bucket";
11
- import * as alepha_server_links2 from "alepha/server/links";
11
+ import * as alepha_server_links0 from "alepha/server/links";
12
+ import { OAuth2Profile, ServerAuthProvider, WithLinkFn, WithLoginFn } from "alepha/server/auth";
12
13
  import * as alepha_cache0 from "alepha/cache";
13
14
  import { DateTime, DateTimeProvider } from "alepha/datetime";
14
- import { CryptoProvider, RealmPrimitive, RealmPrimitiveOptions, UserAccount } from "alepha/security";
15
- import { OAuth2Profile, ServerAuthProvider, WithLinkFn, WithLoginFn } from "alepha/server/auth";
15
+ import { CryptoProvider, IssuerPrimitive, IssuerPrimitiveOptions, UserAccount } from "alepha/security";
16
16
  import { FileSystemProvider } from "alepha/file";
17
17
  import { FileController } from "alepha/api/files";
18
18
  import "drizzle-orm/d1";
@@ -24,33 +24,31 @@ import { PgTransactionConfig } from "drizzle-orm/pg-core/session";
24
24
  import * as DrizzleKit from "drizzle-kit/api";
25
25
  import "alepha/retry";
26
26
  import "drizzle-orm/sqlite-core";
27
- import "alepha/lock";
28
- import "drizzle-orm/postgres-js";
29
- import "postgres";
30
27
 
31
28
  //#region ../../src/api/users/atoms/realmAuthSettingsAtom.d.ts
32
- declare const realmAuthSettingsAtom: alepha1.Atom<alepha1.TObject<{
33
- displayName: alepha1.TOptional<alepha1.TString>;
34
- description: alepha1.TOptional<alepha1.TString>;
35
- logoUrl: alepha1.TOptional<alepha1.TString>;
36
- registrationAllowed: alepha1.TBoolean;
37
- emailEnabled: alepha1.TBoolean;
38
- emailRequired: alepha1.TBoolean;
39
- usernameEnabled: alepha1.TBoolean;
40
- usernameRequired: alepha1.TBoolean;
41
- phoneEnabled: alepha1.TBoolean;
42
- phoneRequired: alepha1.TBoolean;
43
- verifyEmailRequired: alepha1.TBoolean;
44
- verifyPhoneRequired: alepha1.TBoolean;
45
- firstNameLastNameEnabled: alepha1.TBoolean;
46
- firstNameLastNameRequired: alepha1.TBoolean;
47
- resetPasswordAllowed: alepha1.TBoolean;
48
- passwordPolicy: alepha1.TObject<{
49
- minLength: alepha1.TInteger;
50
- requireUppercase: alepha1.TBoolean;
51
- requireLowercase: alepha1.TBoolean;
52
- requireNumbers: alepha1.TBoolean;
53
- requireSpecialCharacters: alepha1.TBoolean;
29
+ declare const realmAuthSettingsAtom: alepha23.Atom<alepha23.TObject<{
30
+ displayName: alepha23.TOptional<alepha23.TString>;
31
+ description: alepha23.TOptional<alepha23.TString>;
32
+ logoUrl: alepha23.TOptional<alepha23.TString>;
33
+ registrationAllowed: alepha23.TBoolean;
34
+ emailEnabled: alepha23.TBoolean;
35
+ emailRequired: alepha23.TBoolean;
36
+ usernameEnabled: alepha23.TBoolean;
37
+ usernameRequired: alepha23.TBoolean;
38
+ usernameRegExp: alepha23.TString;
39
+ phoneEnabled: alepha23.TBoolean;
40
+ phoneRequired: alepha23.TBoolean;
41
+ verifyEmailRequired: alepha23.TBoolean;
42
+ verifyPhoneRequired: alepha23.TBoolean;
43
+ firstNameLastNameEnabled: alepha23.TBoolean;
44
+ firstNameLastNameRequired: alepha23.TBoolean;
45
+ resetPasswordAllowed: alepha23.TBoolean;
46
+ passwordPolicy: alepha23.TObject<{
47
+ minLength: alepha23.TInteger;
48
+ requireUppercase: alepha23.TBoolean;
49
+ requireLowercase: alepha23.TBoolean;
50
+ requireNumbers: alepha23.TBoolean;
51
+ requireSpecialCharacters: alepha23.TBoolean;
54
52
  }>;
55
53
  }>, "alepha.api.users.realmAuthSettings">;
56
54
  type RealmAuthSettings = Static<typeof realmAuthSettingsAtom.schema>;
@@ -85,114 +83,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
85
83
  //#region ../../src/orm/primitives/$entity.d.ts
86
84
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
87
85
  /**
88
- * The database table name that will be created for this entity.
89
- * If not provided, name will be inferred from the $repository variable name.
90
- */
86
+ * The database table name that will be created for this entity.
87
+ * If not provided, name will be inferred from the $repository variable name.
88
+ */
91
89
  name: string;
92
90
  /**
93
- * TypeBox schema defining the table structure and column types.
94
- */
91
+ * TypeBox schema defining the table structure and column types.
92
+ */
95
93
  schema: T;
96
94
  /**
97
- * Database indexes to create for query optimization.
98
- */
95
+ * Database indexes to create for query optimization.
96
+ */
99
97
  indexes?: (Keys | {
100
98
  /**
101
- * Single column to index.
102
- */
99
+ * Single column to index.
100
+ */
103
101
  column: Keys;
104
102
  /**
105
- * Whether this should be a unique index (enforces uniqueness constraint).
106
- */
103
+ * Whether this should be a unique index (enforces uniqueness constraint).
104
+ */
107
105
  unique?: boolean;
108
106
  /**
109
- * Custom name for the index. If not provided, generates name automatically.
110
- */
107
+ * Custom name for the index. If not provided, generates name automatically.
108
+ */
111
109
  name?: string;
112
110
  } | {
113
111
  /**
114
- * Multiple columns for composite index (order matters for query optimization).
115
- */
112
+ * Multiple columns for composite index (order matters for query optimization).
113
+ */
116
114
  columns: Keys[];
117
115
  /**
118
- * Whether this should be a unique index (enforces uniqueness constraint).
119
- */
116
+ * Whether this should be a unique index (enforces uniqueness constraint).
117
+ */
120
118
  unique?: boolean;
121
119
  /**
122
- * Custom name for the index. If not provided, generates name automatically.
123
- */
120
+ * Custom name for the index. If not provided, generates name automatically.
121
+ */
124
122
  name?: string;
125
123
  })[];
126
124
  /**
127
- * Foreign key constraints to maintain referential integrity.
128
- */
125
+ * Foreign key constraints to maintain referential integrity.
126
+ */
129
127
  foreignKeys?: Array<{
130
128
  /**
131
- * Optional name for the foreign key constraint.
132
- */
129
+ * Optional name for the foreign key constraint.
130
+ */
133
131
  name?: string;
134
132
  /**
135
- * Local columns that reference the foreign table.
136
- */
133
+ * Local columns that reference the foreign table.
134
+ */
137
135
  columns: Array<keyof Static<T>>;
138
136
  /**
139
- * Referenced columns in the foreign table.
140
- * Must be EntityColumn references from other entities.
141
- */
137
+ * Referenced columns in the foreign table.
138
+ * Must be EntityColumn references from other entities.
139
+ */
142
140
  foreignColumns: Array<() => EntityColumn<any>>;
143
141
  }>;
144
142
  /**
145
- * Additional table constraints for data validation.
146
- *
147
- * Constraints enforce business rules at the database level, providing
148
- * an additional layer of data integrity beyond application validation.
149
- *
150
- * **Constraint Types**:
151
- * - **Unique constraints**: Prevent duplicate values across columns
152
- * - **Check constraints**: Enforce custom validation rules with SQL expressions
153
- *
154
- * @example
155
- * ```ts
156
- * constraints: [
157
- * {
158
- * name: "unique_user_email",
159
- * columns: ["email"],
160
- * unique: true
161
- * },
162
- * {
163
- * name: "valid_age_range",
164
- * columns: ["age"],
165
- * check: sql`age >= 0 AND age <= 150`
166
- * },
167
- * {
168
- * name: "unique_user_username_per_tenant",
169
- * columns: ["tenantId", "username"],
170
- * unique: true
171
- * }
172
- * ]
173
- * ```
174
- */
143
+ * Additional table constraints for data validation.
144
+ *
145
+ * Constraints enforce business rules at the database level, providing
146
+ * an additional layer of data integrity beyond application validation.
147
+ *
148
+ * **Constraint Types**:
149
+ * - **Unique constraints**: Prevent duplicate values across columns
150
+ * - **Check constraints**: Enforce custom validation rules with SQL expressions
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * constraints: [
155
+ * {
156
+ * name: "unique_user_email",
157
+ * columns: ["email"],
158
+ * unique: true
159
+ * },
160
+ * {
161
+ * name: "valid_age_range",
162
+ * columns: ["age"],
163
+ * check: sql`age >= 0 AND age <= 150`
164
+ * },
165
+ * {
166
+ * name: "unique_user_username_per_tenant",
167
+ * columns: ["tenantId", "username"],
168
+ * unique: true
169
+ * }
170
+ * ]
171
+ * ```
172
+ */
175
173
  constraints?: Array<{
176
174
  /**
177
- * Columns involved in this constraint.
178
- */
175
+ * Columns involved in this constraint.
176
+ */
179
177
  columns: Array<keyof Static<T>>;
180
178
  /**
181
- * Optional name for the constraint.
182
- */
179
+ * Optional name for the constraint.
180
+ */
183
181
  name?: string;
184
182
  /**
185
- * Whether this is a unique constraint.
186
- */
183
+ * Whether this is a unique constraint.
184
+ */
187
185
  unique?: boolean | {};
188
186
  /**
189
- * SQL expression for check constraint validation.
190
- */
187
+ * SQL expression for check constraint validation.
188
+ */
191
189
  check?: SQL;
192
190
  }>;
193
191
  /**
194
- * Advanced Drizzle ORM configuration for complex table setups.
195
- */
192
+ * Advanced Drizzle ORM configuration for complex table setups.
193
+ */
196
194
  config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
197
195
  }
198
196
  declare class EntityPrimitive<T extends TObject = TObject> {
@@ -246,8 +244,8 @@ type PgSymbols = {
246
244
  [PG_REF]: PgRefOptions;
247
245
  [PG_ENUM]: PgEnumOptions;
248
246
  /**
249
- * @deprecated Use `PG_IDENTITY` instead.
250
- */
247
+ * @deprecated Use `PG_IDENTITY` instead.
248
+ */
251
249
  [PG_SERIAL]: {};
252
250
  };
253
251
  type PgSymbolKeys = keyof PgSymbols;
@@ -280,416 +278,416 @@ declare class DbError extends AlephaError {
280
278
  //#region ../../src/orm/interfaces/FilterOperators.d.ts
281
279
  interface FilterOperators<TValue> {
282
280
  /**
283
- * Test that two values are equal.
284
- *
285
- * Remember that the SQL standard dictates that
286
- * two NULL values are not equal, so if you want to test
287
- * whether a value is null, you may want to use
288
- * `isNull` instead.
289
- *
290
- * ## Examples
291
- *
292
- * ```ts
293
- * // Select cars made by Ford
294
- * db.select().from(cars)
295
- * .where(eq(cars.make, 'Ford'))
296
- * ```
297
- *
298
- * @see isNull for a way to test equality to NULL.
299
- */
281
+ * Test that two values are equal.
282
+ *
283
+ * Remember that the SQL standard dictates that
284
+ * two NULL values are not equal, so if you want to test
285
+ * whether a value is null, you may want to use
286
+ * `isNull` instead.
287
+ *
288
+ * ## Examples
289
+ *
290
+ * ```ts
291
+ * // Select cars made by Ford
292
+ * db.select().from(cars)
293
+ * .where(eq(cars.make, 'Ford'))
294
+ * ```
295
+ *
296
+ * @see isNull for a way to test equality to NULL.
297
+ */
300
298
  eq?: TValue;
301
299
  /**
302
- * Test that two values are not equal.
303
- *
304
- * Remember that the SQL standard dictates that
305
- * two NULL values are not equal, so if you want to test
306
- * whether a value is not null, you may want to use
307
- * `isNotNull` instead.
308
- *
309
- * ## Examples
310
- *
311
- * ```ts
312
- * // Select cars not made by Ford
313
- * db.select().from(cars)
314
- * .where(ne(cars.make, 'Ford'))
315
- * ```
316
- *
317
- * @see isNotNull for a way to test whether a value is not null.
318
- */
300
+ * Test that two values are not equal.
301
+ *
302
+ * Remember that the SQL standard dictates that
303
+ * two NULL values are not equal, so if you want to test
304
+ * whether a value is not null, you may want to use
305
+ * `isNotNull` instead.
306
+ *
307
+ * ## Examples
308
+ *
309
+ * ```ts
310
+ * // Select cars not made by Ford
311
+ * db.select().from(cars)
312
+ * .where(ne(cars.make, 'Ford'))
313
+ * ```
314
+ *
315
+ * @see isNotNull for a way to test whether a value is not null.
316
+ */
319
317
  ne?: TValue;
320
318
  /**
321
- * Test that the first expression passed is greater than
322
- * the second expression.
323
- *
324
- * ## Examples
325
- *
326
- * ```ts
327
- * // Select cars made after 2000.
328
- * db.select().from(cars)
329
- * .where(gt(cars.year, 2000))
330
- * ```
331
- *
332
- * @see gte for greater-than-or-equal
333
- */
319
+ * Test that the first expression passed is greater than
320
+ * the second expression.
321
+ *
322
+ * ## Examples
323
+ *
324
+ * ```ts
325
+ * // Select cars made after 2000.
326
+ * db.select().from(cars)
327
+ * .where(gt(cars.year, 2000))
328
+ * ```
329
+ *
330
+ * @see gte for greater-than-or-equal
331
+ */
334
332
  gt?: TValue;
335
333
  /**
336
- * Test that the first expression passed is greater than
337
- * or equal to the second expression. Use `gt` to
338
- * test whether an expression is strictly greater
339
- * than another.
340
- *
341
- * ## Examples
342
- *
343
- * ```ts
344
- * // Select cars made on or after 2000.
345
- * db.select().from(cars)
346
- * .where(gte(cars.year, 2000))
347
- * ```
348
- *
349
- * @see gt for a strictly greater-than condition
350
- */
334
+ * Test that the first expression passed is greater than
335
+ * or equal to the second expression. Use `gt` to
336
+ * test whether an expression is strictly greater
337
+ * than another.
338
+ *
339
+ * ## Examples
340
+ *
341
+ * ```ts
342
+ * // Select cars made on or after 2000.
343
+ * db.select().from(cars)
344
+ * .where(gte(cars.year, 2000))
345
+ * ```
346
+ *
347
+ * @see gt for a strictly greater-than condition
348
+ */
351
349
  gte?: TValue;
352
350
  /**
353
- * Test that the first expression passed is less than
354
- * the second expression.
355
- *
356
- * ## Examples
357
- *
358
- * ```ts
359
- * // Select cars made before 2000.
360
- * db.select().from(cars)
361
- * .where(lt(cars.year, 2000))
362
- * ```
363
- *
364
- * @see lte for greater-than-or-equal
365
- */
351
+ * Test that the first expression passed is less than
352
+ * the second expression.
353
+ *
354
+ * ## Examples
355
+ *
356
+ * ```ts
357
+ * // Select cars made before 2000.
358
+ * db.select().from(cars)
359
+ * .where(lt(cars.year, 2000))
360
+ * ```
361
+ *
362
+ * @see lte for greater-than-or-equal
363
+ */
366
364
  lt?: TValue;
367
365
  /**
368
- * Test that the first expression passed is less than
369
- * or equal to the second expression.
370
- *
371
- * ## Examples
372
- *
373
- * ```ts
374
- * // Select cars made before 2000.
375
- * db.select().from(cars)
376
- * .where(lte(cars.year, 2000))
377
- * ```
378
- *
379
- * @see lt for a strictly less-than condition
380
- */
366
+ * Test that the first expression passed is less than
367
+ * or equal to the second expression.
368
+ *
369
+ * ## Examples
370
+ *
371
+ * ```ts
372
+ * // Select cars made before 2000.
373
+ * db.select().from(cars)
374
+ * .where(lte(cars.year, 2000))
375
+ * ```
376
+ *
377
+ * @see lt for a strictly less-than condition
378
+ */
381
379
  lte?: TValue;
382
380
  /**
383
- * Test whether the first parameter, a column or expression,
384
- * has a value from a list passed as the second argument.
385
- *
386
- * ## Throws
387
- *
388
- * The argument passed in the second array can't be empty:
389
- * if an empty is provided, this method will throw.
390
- *
391
- * ## Examples
392
- *
393
- * ```ts
394
- * // Select cars made by Ford or GM.
395
- * db.select().from(cars)
396
- * .where(inArray(cars.make, ['Ford', 'GM']))
397
- * ```
398
- *
399
- * @see notInArray for the inverse of this test
400
- */
381
+ * Test whether the first parameter, a column or expression,
382
+ * has a value from a list passed as the second argument.
383
+ *
384
+ * ## Throws
385
+ *
386
+ * The argument passed in the second array can't be empty:
387
+ * if an empty is provided, this method will throw.
388
+ *
389
+ * ## Examples
390
+ *
391
+ * ```ts
392
+ * // Select cars made by Ford or GM.
393
+ * db.select().from(cars)
394
+ * .where(inArray(cars.make, ['Ford', 'GM']))
395
+ * ```
396
+ *
397
+ * @see notInArray for the inverse of this test
398
+ */
401
399
  inArray?: TValue[];
402
400
  /**
403
- * Test whether the first parameter, a column or expression,
404
- * has a value that is not present in a list passed as the
405
- * second argument.
406
- *
407
- * ## Throws
408
- *
409
- * The argument passed in the second array can't be empty:
410
- * if an empty is provided, this method will throw.
411
- *
412
- * ## Examples
413
- *
414
- * ```ts
415
- * // Select cars made by any company except Ford or GM.
416
- * db.select().from(cars)
417
- * .where(notInArray(cars.make, ['Ford', 'GM']))
418
- * ```
419
- *
420
- * @see inArray for the inverse of this test
421
- */
401
+ * Test whether the first parameter, a column or expression,
402
+ * has a value that is not present in a list passed as the
403
+ * second argument.
404
+ *
405
+ * ## Throws
406
+ *
407
+ * The argument passed in the second array can't be empty:
408
+ * if an empty is provided, this method will throw.
409
+ *
410
+ * ## Examples
411
+ *
412
+ * ```ts
413
+ * // Select cars made by any company except Ford or GM.
414
+ * db.select().from(cars)
415
+ * .where(notInArray(cars.make, ['Ford', 'GM']))
416
+ * ```
417
+ *
418
+ * @see inArray for the inverse of this test
419
+ */
422
420
  notInArray?: TValue[];
423
421
  /**
424
- * Test whether an expression is not NULL. By the SQL standard,
425
- * NULL is neither equal nor not equal to itself, so
426
- * it's recommended to use `isNull` and `notIsNull` for
427
- * comparisons to NULL.
428
- *
429
- * ## Examples
430
- *
431
- * ```ts
432
- * // Select cars that have been discontinued.
433
- * db.select().from(cars)
434
- * .where(isNotNull(cars.discontinuedAt))
435
- * ```
436
- *
437
- * @see isNull for the inverse of this test
438
- */
422
+ * Test whether an expression is not NULL. By the SQL standard,
423
+ * NULL is neither equal nor not equal to itself, so
424
+ * it's recommended to use `isNull` and `notIsNull` for
425
+ * comparisons to NULL.
426
+ *
427
+ * ## Examples
428
+ *
429
+ * ```ts
430
+ * // Select cars that have been discontinued.
431
+ * db.select().from(cars)
432
+ * .where(isNotNull(cars.discontinuedAt))
433
+ * ```
434
+ *
435
+ * @see isNull for the inverse of this test
436
+ */
439
437
  isNotNull?: true;
440
438
  /**
441
- * Test whether an expression is NULL. By the SQL standard,
442
- * NULL is neither equal nor not equal to itself, so
443
- * it's recommended to use `isNull` and `notIsNull` for
444
- * comparisons to NULL.
445
- *
446
- * ## Examples
447
- *
448
- * ```ts
449
- * // Select cars that have no discontinuedAt date.
450
- * db.select().from(cars)
451
- * .where(isNull(cars.discontinuedAt))
452
- * ```
453
- *
454
- * @see isNotNull for the inverse of this test
455
- */
439
+ * Test whether an expression is NULL. By the SQL standard,
440
+ * NULL is neither equal nor not equal to itself, so
441
+ * it's recommended to use `isNull` and `notIsNull` for
442
+ * comparisons to NULL.
443
+ *
444
+ * ## Examples
445
+ *
446
+ * ```ts
447
+ * // Select cars that have no discontinuedAt date.
448
+ * db.select().from(cars)
449
+ * .where(isNull(cars.discontinuedAt))
450
+ * ```
451
+ *
452
+ * @see isNotNull for the inverse of this test
453
+ */
456
454
  isNull?: true;
457
455
  /**
458
- * Test whether an expression is between two values. This
459
- * is an easier way to express range tests, which would be
460
- * expressed mathematically as `x <= a <= y` but in SQL
461
- * would have to be like `a >= x AND a <= y`.
462
- *
463
- * Between is inclusive of the endpoints: if `column`
464
- * is equal to `min` or `max`, it will be TRUE.
465
- *
466
- * ## Examples
467
- *
468
- * ```ts
469
- * // Select cars made between 1990 and 2000
470
- * db.select().from(cars)
471
- * .where(between(cars.year, 1990, 2000))
472
- * ```
473
- *
474
- * @see notBetween for the inverse of this test
475
- */
456
+ * Test whether an expression is between two values. This
457
+ * is an easier way to express range tests, which would be
458
+ * expressed mathematically as `x <= a <= y` but in SQL
459
+ * would have to be like `a >= x AND a <= y`.
460
+ *
461
+ * Between is inclusive of the endpoints: if `column`
462
+ * is equal to `min` or `max`, it will be TRUE.
463
+ *
464
+ * ## Examples
465
+ *
466
+ * ```ts
467
+ * // Select cars made between 1990 and 2000
468
+ * db.select().from(cars)
469
+ * .where(between(cars.year, 1990, 2000))
470
+ * ```
471
+ *
472
+ * @see notBetween for the inverse of this test
473
+ */
476
474
  between?: [number, number];
477
475
  /**
478
- * Test whether an expression is not between two values.
479
- *
480
- * This, like `between`, includes its endpoints, so if
481
- * the `column` is equal to `min` or `max`, in this case
482
- * it will evaluate to FALSE.
483
- *
484
- * ## Examples
485
- *
486
- * ```ts
487
- * // Exclude cars made in the 1970s
488
- * db.select().from(cars)
489
- * .where(notBetween(cars.year, 1970, 1979))
490
- * ```
491
- *
492
- * @see between for the inverse of this test
493
- */
476
+ * Test whether an expression is not between two values.
477
+ *
478
+ * This, like `between`, includes its endpoints, so if
479
+ * the `column` is equal to `min` or `max`, in this case
480
+ * it will evaluate to FALSE.
481
+ *
482
+ * ## Examples
483
+ *
484
+ * ```ts
485
+ * // Exclude cars made in the 1970s
486
+ * db.select().from(cars)
487
+ * .where(notBetween(cars.year, 1970, 1979))
488
+ * ```
489
+ *
490
+ * @see between for the inverse of this test
491
+ */
494
492
  notBetween?: [number, number];
495
493
  /**
496
- * Compare a column to a pattern, which can include `%` and `_`
497
- * characters to match multiple variations. Including `%`
498
- * in the pattern matches zero or more characters, and including
499
- * `_` will match a single character.
500
- *
501
- * ## Examples
502
- *
503
- * ```ts
504
- * // Select all cars with 'Turbo' in their names.
505
- * db.select().from(cars)
506
- * .where(like(cars.name, '%Turbo%'))
507
- * ```
508
- *
509
- * @see ilike for a case-insensitive version of this condition
510
- */
494
+ * Compare a column to a pattern, which can include `%` and `_`
495
+ * characters to match multiple variations. Including `%`
496
+ * in the pattern matches zero or more characters, and including
497
+ * `_` will match a single character.
498
+ *
499
+ * ## Examples
500
+ *
501
+ * ```ts
502
+ * // Select all cars with 'Turbo' in their names.
503
+ * db.select().from(cars)
504
+ * .where(like(cars.name, '%Turbo%'))
505
+ * ```
506
+ *
507
+ * @see ilike for a case-insensitive version of this condition
508
+ */
511
509
  like?: string;
512
510
  /**
513
- * The inverse of like - this tests that a given column
514
- * does not match a pattern, which can include `%` and `_`
515
- * characters to match multiple variations. Including `%`
516
- * in the pattern matches zero or more characters, and including
517
- * `_` will match a single character.
518
- *
519
- * ## Examples
520
- *
521
- * ```ts
522
- * // Select all cars that don't have "ROver" in their name.
523
- * db.select().from(cars)
524
- * .where(notLike(cars.name, '%Rover%'))
525
- * ```
526
- *
527
- * @see like for the inverse condition
528
- * @see notIlike for a case-insensitive version of this condition
529
- */
511
+ * The inverse of like - this tests that a given column
512
+ * does not match a pattern, which can include `%` and `_`
513
+ * characters to match multiple variations. Including `%`
514
+ * in the pattern matches zero or more characters, and including
515
+ * `_` will match a single character.
516
+ *
517
+ * ## Examples
518
+ *
519
+ * ```ts
520
+ * // Select all cars that don't have "ROver" in their name.
521
+ * db.select().from(cars)
522
+ * .where(notLike(cars.name, '%Rover%'))
523
+ * ```
524
+ *
525
+ * @see like for the inverse condition
526
+ * @see notIlike for a case-insensitive version of this condition
527
+ */
530
528
  notLike?: string;
531
529
  /**
532
- * Case-insensitively compare a column to a pattern,
533
- * which can include `%` and `_`
534
- * characters to match multiple variations. Including `%`
535
- * in the pattern matches zero or more characters, and including
536
- * `_` will match a single character.
537
- *
538
- * Unlike like, this performs a case-insensitive comparison.
539
- *
540
- * ## Examples
541
- *
542
- * ```ts
543
- * // Select all cars with 'Turbo' in their names.
544
- * db.select().from(cars)
545
- * .where(ilike(cars.name, '%Turbo%'))
546
- * ```
547
- *
548
- * @see like for a case-sensitive version of this condition
549
- */
530
+ * Case-insensitively compare a column to a pattern,
531
+ * which can include `%` and `_`
532
+ * characters to match multiple variations. Including `%`
533
+ * in the pattern matches zero or more characters, and including
534
+ * `_` will match a single character.
535
+ *
536
+ * Unlike like, this performs a case-insensitive comparison.
537
+ *
538
+ * ## Examples
539
+ *
540
+ * ```ts
541
+ * // Select all cars with 'Turbo' in their names.
542
+ * db.select().from(cars)
543
+ * .where(ilike(cars.name, '%Turbo%'))
544
+ * ```
545
+ *
546
+ * @see like for a case-sensitive version of this condition
547
+ */
550
548
  ilike?: string;
551
549
  /**
552
- * The inverse of ilike - this case-insensitively tests that a given column
553
- * does not match a pattern, which can include `%` and `_`
554
- * characters to match multiple variations. Including `%`
555
- * in the pattern matches zero or more characters, and including
556
- * `_` will match a single character.
557
- *
558
- * ## Examples
559
- *
560
- * ```ts
561
- * // Select all cars that don't have "Rover" in their name.
562
- * db.select().from(cars)
563
- * .where(notLike(cars.name, '%Rover%'))
564
- * ```
565
- *
566
- * @see ilike for the inverse condition
567
- * @see notLike for a case-sensitive version of this condition
568
- */
550
+ * The inverse of ilike - this case-insensitively tests that a given column
551
+ * does not match a pattern, which can include `%` and `_`
552
+ * characters to match multiple variations. Including `%`
553
+ * in the pattern matches zero or more characters, and including
554
+ * `_` will match a single character.
555
+ *
556
+ * ## Examples
557
+ *
558
+ * ```ts
559
+ * // Select all cars that don't have "Rover" in their name.
560
+ * db.select().from(cars)
561
+ * .where(notLike(cars.name, '%Rover%'))
562
+ * ```
563
+ *
564
+ * @see ilike for the inverse condition
565
+ * @see notLike for a case-sensitive version of this condition
566
+ */
569
567
  notIlike?: string;
570
568
  /**
571
- * Syntactic sugar for case-insensitive substring matching.
572
- * Automatically wraps the value with `%` wildcards on both sides.
573
- *
574
- * Equivalent to: `ilike: '%value%'`
575
- *
576
- * ## Examples
577
- *
578
- * ```ts
579
- * // Select all cars with "Turbo" anywhere in their name.
580
- * db.select().from(cars)
581
- * .where({ name: { contains: 'Turbo' } })
582
- * // Same as: .where(ilike(cars.name, '%Turbo%'))
583
- * ```
584
- *
585
- * @see ilike for manual pattern matching
586
- * @see startsWith for prefix matching
587
- * @see endsWith for suffix matching
588
- */
569
+ * Syntactic sugar for case-insensitive substring matching.
570
+ * Automatically wraps the value with `%` wildcards on both sides.
571
+ *
572
+ * Equivalent to: `ilike: '%value%'`
573
+ *
574
+ * ## Examples
575
+ *
576
+ * ```ts
577
+ * // Select all cars with "Turbo" anywhere in their name.
578
+ * db.select().from(cars)
579
+ * .where({ name: { contains: 'Turbo' } })
580
+ * // Same as: .where(ilike(cars.name, '%Turbo%'))
581
+ * ```
582
+ *
583
+ * @see ilike for manual pattern matching
584
+ * @see startsWith for prefix matching
585
+ * @see endsWith for suffix matching
586
+ */
589
587
  contains?: string;
590
588
  /**
591
- * Syntactic sugar for case-insensitive prefix matching.
592
- * Automatically appends a `%` wildcard to the end of the value.
593
- *
594
- * Equivalent to: `ilike: 'value%'`
595
- *
596
- * ## Examples
597
- *
598
- * ```ts
599
- * // Select all cars whose names start with "Ford".
600
- * db.select().from(cars)
601
- * .where({ name: { startsWith: 'Ford' } })
602
- * // Same as: .where(ilike(cars.name, 'Ford%'))
603
- * ```
604
- *
605
- * @see ilike for manual pattern matching
606
- * @see contains for substring matching
607
- * @see endsWith for suffix matching
608
- */
589
+ * Syntactic sugar for case-insensitive prefix matching.
590
+ * Automatically appends a `%` wildcard to the end of the value.
591
+ *
592
+ * Equivalent to: `ilike: 'value%'`
593
+ *
594
+ * ## Examples
595
+ *
596
+ * ```ts
597
+ * // Select all cars whose names start with "Ford".
598
+ * db.select().from(cars)
599
+ * .where({ name: { startsWith: 'Ford' } })
600
+ * // Same as: .where(ilike(cars.name, 'Ford%'))
601
+ * ```
602
+ *
603
+ * @see ilike for manual pattern matching
604
+ * @see contains for substring matching
605
+ * @see endsWith for suffix matching
606
+ */
609
607
  startsWith?: string;
610
608
  /**
611
- * Syntactic sugar for case-insensitive suffix matching.
612
- * Automatically prepends a `%` wildcard to the beginning of the value.
613
- *
614
- * Equivalent to: `ilike: '%value'`
615
- *
616
- * ## Examples
617
- *
618
- * ```ts
619
- * // Select all cars whose names end with "Turbo".
620
- * db.select().from(cars)
621
- * .where({ name: { endsWith: 'Turbo' } })
622
- * // Same as: .where(ilike(cars.name, '%Turbo'))
623
- * ```
624
- *
625
- * @see ilike for manual pattern matching
626
- * @see contains for substring matching
627
- * @see startsWith for prefix matching
628
- */
609
+ * Syntactic sugar for case-insensitive suffix matching.
610
+ * Automatically prepends a `%` wildcard to the beginning of the value.
611
+ *
612
+ * Equivalent to: `ilike: '%value'`
613
+ *
614
+ * ## Examples
615
+ *
616
+ * ```ts
617
+ * // Select all cars whose names end with "Turbo".
618
+ * db.select().from(cars)
619
+ * .where({ name: { endsWith: 'Turbo' } })
620
+ * // Same as: .where(ilike(cars.name, '%Turbo'))
621
+ * ```
622
+ *
623
+ * @see ilike for manual pattern matching
624
+ * @see contains for substring matching
625
+ * @see startsWith for prefix matching
626
+ */
629
627
  endsWith?: string;
630
628
  /**
631
- * Test that a column or expression contains all elements of
632
- * the list passed as the second argument.
633
- *
634
- * ## Throws
635
- *
636
- * The argument passed in the second array can't be empty:
637
- * if an empty is provided, this method will throw.
638
- *
639
- * ## Examples
640
- *
641
- * ```ts
642
- * // Select posts where its tags contain "Typescript" and "ORM".
643
- * db.select().from(posts)
644
- * .where(arrayContains(posts.tags, ['Typescript', 'ORM']))
645
- * ```
646
- *
647
- * @see arrayContained to find if an array contains all elements of a column or expression
648
- * @see arrayOverlaps to find if a column or expression contains any elements of an array
649
- */
629
+ * Test that a column or expression contains all elements of
630
+ * the list passed as the second argument.
631
+ *
632
+ * ## Throws
633
+ *
634
+ * The argument passed in the second array can't be empty:
635
+ * if an empty is provided, this method will throw.
636
+ *
637
+ * ## Examples
638
+ *
639
+ * ```ts
640
+ * // Select posts where its tags contain "Typescript" and "ORM".
641
+ * db.select().from(posts)
642
+ * .where(arrayContains(posts.tags, ['Typescript', 'ORM']))
643
+ * ```
644
+ *
645
+ * @see arrayContained to find if an array contains all elements of a column or expression
646
+ * @see arrayOverlaps to find if a column or expression contains any elements of an array
647
+ */
650
648
  arrayContains?: TValue;
651
649
  /**
652
- * Test that the list passed as the second argument contains
653
- * all elements of a column or expression.
654
- *
655
- * ## Throws
656
- *
657
- * The argument passed in the second array can't be empty:
658
- * if an empty is provided, this method will throw.
659
- *
660
- * ## Examples
661
- *
662
- * ```ts
663
- * // Select posts where its tags contain "Typescript", "ORM" or both,
664
- * // but filtering posts that have additional tags.
665
- * db.select().from(posts)
666
- * .where(arrayContained(posts.tags, ['Typescript', 'ORM']))
667
- * ```
668
- *
669
- * @see arrayContains to find if a column or expression contains all elements of an array
670
- * @see arrayOverlaps to find if a column or expression contains any elements of an array
671
- */
650
+ * Test that the list passed as the second argument contains
651
+ * all elements of a column or expression.
652
+ *
653
+ * ## Throws
654
+ *
655
+ * The argument passed in the second array can't be empty:
656
+ * if an empty is provided, this method will throw.
657
+ *
658
+ * ## Examples
659
+ *
660
+ * ```ts
661
+ * // Select posts where its tags contain "Typescript", "ORM" or both,
662
+ * // but filtering posts that have additional tags.
663
+ * db.select().from(posts)
664
+ * .where(arrayContained(posts.tags, ['Typescript', 'ORM']))
665
+ * ```
666
+ *
667
+ * @see arrayContains to find if a column or expression contains all elements of an array
668
+ * @see arrayOverlaps to find if a column or expression contains any elements of an array
669
+ */
672
670
  arrayContained?: TValue;
673
671
  /**
674
- * Test that a column or expression contains any elements of
675
- * the list passed as the second argument.
676
- *
677
- * ## Throws
678
- *
679
- * The argument passed in the second array can't be empty:
680
- * if an empty is provided, this method will throw.
681
- *
682
- * ## Examples
683
- *
684
- * ```ts
685
- * // Select posts where its tags contain "Typescript", "ORM" or both.
686
- * db.select().from(posts)
687
- * .where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']))
688
- * ```
689
- *
690
- * @see arrayContains to find if a column or expression contains all elements of an array
691
- * @see arrayContained to find if an array contains all elements of a column or expression
692
- */
672
+ * Test that a column or expression contains any elements of
673
+ * the list passed as the second argument.
674
+ *
675
+ * ## Throws
676
+ *
677
+ * The argument passed in the second array can't be empty:
678
+ * if an empty is provided, this method will throw.
679
+ *
680
+ * ## Examples
681
+ *
682
+ * ```ts
683
+ * // Select posts where its tags contain "Typescript", "ORM" or both.
684
+ * db.select().from(posts)
685
+ * .where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']))
686
+ * ```
687
+ *
688
+ * @see arrayContains to find if a column or expression contains all elements of an array
689
+ * @see arrayContained to find if an array contains all elements of a column or expression
690
+ */
693
691
  arrayOverlaps?: TValue;
694
692
  }
695
693
  //#endregion
@@ -748,71 +746,71 @@ type PgQueryWhereOrSQL<T extends TObject, Relations extends PgRelationMap<TObjec
748
746
  type PgQueryWhereOperators<T extends TObject> = { [Key in keyof Static<T>]?: FilterOperators<Static<T>[Key]> | Static<T>[Key] };
749
747
  type PgQueryWhereConditions<T extends TObject, Relations extends PgRelationMap<TObject> | undefined = undefined> = {
750
748
  /**
751
- * Combine a list of conditions with the `and` operator. Conditions
752
- * that are equal `undefined` are automatically ignored.
753
- *
754
- * ## Examples
755
- *
756
- * ```ts
757
- * db.select().from(cars)
758
- * .where(
759
- * and(
760
- * eq(cars.make, 'Volvo'),
761
- * eq(cars.year, 1950),
762
- * )
763
- * )
764
- * ```
765
- */
749
+ * Combine a list of conditions with the `and` operator. Conditions
750
+ * that are equal `undefined` are automatically ignored.
751
+ *
752
+ * ## Examples
753
+ *
754
+ * ```ts
755
+ * db.select().from(cars)
756
+ * .where(
757
+ * and(
758
+ * eq(cars.make, 'Volvo'),
759
+ * eq(cars.year, 1950),
760
+ * )
761
+ * )
762
+ * ```
763
+ */
766
764
  and?: Array<PgQueryWhereOrSQL<T, Relations>>;
767
765
  /**
768
- * Combine a list of conditions with the `or` operator. Conditions
769
- * that are equal `undefined` are automatically ignored.
770
- *
771
- * ## Examples
772
- *
773
- * ```ts
774
- * db.select().from(cars)
775
- * .where(
776
- * or(
777
- * eq(cars.make, 'GM'),
778
- * eq(cars.make, 'Ford'),
779
- * )
780
- * )
781
- * ```
782
- */
766
+ * Combine a list of conditions with the `or` operator. Conditions
767
+ * that are equal `undefined` are automatically ignored.
768
+ *
769
+ * ## Examples
770
+ *
771
+ * ```ts
772
+ * db.select().from(cars)
773
+ * .where(
774
+ * or(
775
+ * eq(cars.make, 'GM'),
776
+ * eq(cars.make, 'Ford'),
777
+ * )
778
+ * )
779
+ * ```
780
+ */
783
781
  or?: Array<PgQueryWhereOrSQL<T, Relations>>;
784
782
  /**
785
- * Negate the meaning of an expression using the `not` keyword.
786
- *
787
- * ## Examples
788
- *
789
- * ```ts
790
- * // Select cars _not_ made by GM or Ford.
791
- * db.select().from(cars)
792
- * .where(not(inArray(cars.make, ['GM', 'Ford'])))
793
- * ```
794
- */
783
+ * Negate the meaning of an expression using the `not` keyword.
784
+ *
785
+ * ## Examples
786
+ *
787
+ * ```ts
788
+ * // Select cars _not_ made by GM or Ford.
789
+ * db.select().from(cars)
790
+ * .where(not(inArray(cars.make, ['GM', 'Ford'])))
791
+ * ```
792
+ */
795
793
  not?: PgQueryWhereOrSQL<T, Relations>;
796
794
  /**
797
- * Test whether a subquery evaluates to have any rows.
798
- *
799
- * ## Examples
800
- *
801
- * ```ts
802
- * // Users whose `homeCity` column has a match in a cities
803
- * // table.
804
- * db
805
- * .select()
806
- * .from(users)
807
- * .where(
808
- * exists(db.select()
809
- * .from(cities)
810
- * .where(eq(users.homeCity, cities.id))),
811
- * );
812
- * ```
813
- *
814
- * @see notExists for the inverse of this test
815
- */
795
+ * Test whether a subquery evaluates to have any rows.
796
+ *
797
+ * ## Examples
798
+ *
799
+ * ```ts
800
+ * // Users whose `homeCity` column has a match in a cities
801
+ * // table.
802
+ * db
803
+ * .select()
804
+ * .from(users)
805
+ * .where(
806
+ * exists(db.select()
807
+ * .from(cities)
808
+ * .where(eq(users.homeCity, cities.id))),
809
+ * );
810
+ * ```
811
+ *
812
+ * @see notExists for the inverse of this test
813
+ */
816
814
  exists?: SQLWrapper;
817
815
  };
818
816
  type PgQueryWhereRelations<Relations extends PgRelationMap<TObject> | undefined = undefined> = Relations extends PgRelationMap<TObject> ? { [K in keyof Relations]?: PgQueryWhere<Relations[K]["join"]["schema"], Relations[K]["with"]> } : {};
@@ -833,8 +831,8 @@ interface PgAttrField {
833
831
  //#region ../../src/orm/primitives/$sequence.d.ts
834
832
  interface SequencePrimitiveOptions extends PgSequenceOptions {
835
833
  /**
836
- * The name of the sequence. If not provided, the property key will be used.
837
- */
834
+ * The name of the sequence. If not provided, the property key will be used.
835
+ */
838
836
  name?: string;
839
837
  provider?: DatabaseProvider;
840
838
  }
@@ -874,33 +872,33 @@ interface TableConfigBuilders<TConfig> {
874
872
  */
875
873
  declare abstract class ModelBuilder {
876
874
  /**
877
- * Build a table from an entity primitive.
878
- */
875
+ * Build a table from an entity primitive.
876
+ */
879
877
  abstract buildTable(entity: EntityPrimitive, options: {
880
878
  tables: Map<string, unknown>;
881
879
  enums: Map<string, unknown>;
882
880
  schema: string;
883
881
  }): void;
884
882
  /**
885
- * Build a sequence from a sequence primitive.
886
- */
883
+ * Build a sequence from a sequence primitive.
884
+ */
887
885
  abstract buildSequence(sequence: SequencePrimitive, options: {
888
886
  sequences: Map<string, unknown>;
889
887
  schema: string;
890
888
  }): void;
891
889
  /**
892
- * Convert camelCase to snake_case for column names.
893
- */
890
+ * Convert camelCase to snake_case for column names.
891
+ */
894
892
  protected toColumnName(str: string): string;
895
893
  /**
896
- * Build the table configuration function for any database.
897
- * This includes indexes, foreign keys, constraints, and custom config.
898
- *
899
- * @param entity - The entity primitive
900
- * @param builders - Database-specific builder functions
901
- * @param tableResolver - Function to resolve entity references to table columns
902
- * @param customConfigHandler - Optional handler for custom config
903
- */
894
+ * Build the table configuration function for any database.
895
+ * This includes indexes, foreign keys, constraints, and custom config.
896
+ *
897
+ * @param entity - The entity primitive
898
+ * @param builders - Database-specific builder functions
899
+ * @param tableResolver - Function to resolve entity references to table columns
900
+ * @param customConfigHandler - Optional handler for custom config
901
+ */
904
902
  protected buildTableConfig<TConfig, TSelf>(entity: EntityPrimitive, builders: TableConfigBuilders<TConfig>, tableResolver?: (entityName: string) => any, customConfigHandler?: (config: any, self: TSelf) => TConfig[]): ((self: TSelf) => TConfig[]) | undefined;
905
903
  }
906
904
  //#endregion
@@ -909,44 +907,44 @@ declare class DrizzleKitProvider {
909
907
  protected readonly log: alepha_logger5.Logger;
910
908
  protected readonly alepha: Alepha;
911
909
  /**
912
- * Synchronize database with current schema definitions.
913
- *
914
- * In development mode, it will generate and execute migrations based on the current state.
915
- * In testing mode, it will generate migrations from scratch without applying them.
916
- *
917
- * Does nothing in production mode, you must handle migrations manually.
918
- */
910
+ * Synchronize database with current schema definitions.
911
+ *
912
+ * In development mode, it will generate and execute migrations based on the current state.
913
+ * In testing mode, it will generate migrations from scratch without applying them.
914
+ *
915
+ * Does nothing in production mode, you must handle migrations manually.
916
+ */
919
917
  synchronize(provider: DatabaseProvider): Promise<void>;
920
918
  /**
921
- * Mostly used for testing purposes. You can generate SQL migration statements without executing them.
922
- */
919
+ * Mostly used for testing purposes. You can generate SQL migration statements without executing them.
920
+ */
923
921
  generateMigration(provider: DatabaseProvider, prevSnapshot?: any): Promise<{
924
922
  statements: string[];
925
923
  models: Record<string, unknown>;
926
924
  snapshot?: any;
927
925
  }>;
928
926
  /**
929
- * Load all tables, enums, sequences, etc. from the provider's repositories.
930
- */
927
+ * Load all tables, enums, sequences, etc. from the provider's repositories.
928
+ */
931
929
  getModels(provider: DatabaseProvider): Record<string, unknown>;
932
930
  /**
933
- * Load the migration snapshot from the database.
934
- */
931
+ * Load the migration snapshot from the database.
932
+ */
935
933
  protected loadDevMigrations(provider: DatabaseProvider): Promise<DevMigrations | undefined>;
936
934
  protected saveDevMigrations(provider: DatabaseProvider, curr: Record<string, any>, devMigrations?: DevMigrations): Promise<void>;
937
935
  protected executeStatements(statements: string[], provider: DatabaseProvider, catchErrors?: boolean): Promise<void>;
938
936
  protected createSchemaIfNotExists(provider: DatabaseProvider, schemaName: string): Promise<void>;
939
937
  /**
940
- * Try to load the official Drizzle Kit API.
941
- * If not available, fallback to the local kit import.
942
- */
938
+ * Try to load the official Drizzle Kit API.
939
+ * If not available, fallback to the local kit import.
940
+ */
943
941
  importDrizzleKit(): typeof DrizzleKit;
944
942
  }
945
- declare const devMigrationsSchema: alepha1.TObject<{
946
- id: alepha1.TNumber;
947
- name: alepha1.TString;
948
- snapshot: alepha1.TString;
949
- created_at: alepha1.TString;
943
+ declare const devMigrationsSchema: alepha23.TObject<{
944
+ id: alepha23.TNumber;
945
+ name: alepha23.TString;
946
+ snapshot: alepha23.TString;
947
+ created_at: alepha23.TString;
950
948
  }>;
951
949
  type DevMigrations = Static<typeof devMigrationsSchema>;
952
950
  //#endregion
@@ -964,6 +962,7 @@ declare abstract class DatabaseProvider {
964
962
  readonly tables: Map<string, unknown>;
965
963
  readonly sequences: Map<string, unknown>;
966
964
  get name(): string;
965
+ get driver(): string;
967
966
  get schema(): string;
968
967
  table<T extends TObject>(entity: EntityPrimitive<T>): PgTableWithColumns<SchemaToTableConfig<T>>;
969
968
  registerEntity(entity: EntityPrimitive): void;
@@ -971,39 +970,39 @@ declare abstract class DatabaseProvider {
971
970
  abstract execute(statement: SQLLike): Promise<Record<string, unknown>[]>;
972
971
  run<T extends TObject>(statement: SQLLike, schema: T): Promise<Array<Static<T>>>;
973
972
  /**
974
- * Get migrations folder path - can be overridden
975
- */
973
+ * Get migrations folder path - can be overridden
974
+ */
976
975
  protected getMigrationsFolder(): string;
977
976
  /**
978
- * Base migration orchestration - handles environment logic
979
- */
977
+ * Base migration orchestration - handles environment logic
978
+ */
980
979
  migrate(): Promise<void>;
981
980
  /**
982
- * Production: run migrations from folder
983
- */
981
+ * Production: run migrations from folder
982
+ */
984
983
  protected runProductionMigration(migrationsFolder: string): Promise<void>;
985
984
  /**
986
- * Test: always synchronize
987
- */
985
+ * Test: always synchronize
986
+ */
988
987
  protected runTestMigration(): Promise<void>;
989
988
  /**
990
- * Development: default to synchronize (can be overridden)
991
- */
989
+ * Development: default to synchronize (can be overridden)
990
+ */
992
991
  protected runDevelopmentMigration(migrationsFolder: string): Promise<void>;
993
992
  /**
994
- * Common synchronization with error handling
995
- */
993
+ * Common synchronization with error handling
994
+ */
996
995
  protected synchronizeSchema(): Promise<void>;
997
996
  /**
998
- * Provider-specific migration execution
999
- * MUST be implemented by each provider
1000
- */
997
+ * Provider-specific migration execution
998
+ * MUST be implemented by each provider
999
+ */
1001
1000
  protected abstract executeMigrations(migrationsFolder: string): Promise<void>;
1002
1001
  /**
1003
- * For testing purposes, generate a unique schema name.
1004
- * The schema name will be generated based on the current date and time.
1005
- * It will be in the format of `test_YYYYMMDD_HHMMSS_randomSuffix`.
1006
- */
1002
+ * For testing purposes, generate a unique schema name.
1003
+ * The schema name will be generated based on the current date and time.
1004
+ * It will be in the format of `test_YYYYMMDD_HHMMSS_randomSuffix`.
1005
+ */
1007
1006
  protected generateTestSchemaName(): string;
1008
1007
  }
1009
1008
  //#endregion
@@ -1011,8 +1010,8 @@ declare abstract class DatabaseProvider {
1011
1010
  declare class QueryManager {
1012
1011
  protected readonly alepha: Alepha;
1013
1012
  /**
1014
- * Convert a query object to a SQL query.
1015
- */
1013
+ * Convert a query object to a SQL query.
1014
+ */
1016
1015
  toSQL(query: PgQueryWhereOrSQL<TObject>, options: {
1017
1016
  schema: TObject;
1018
1017
  col: (key: string) => PgColumn;
@@ -1020,22 +1019,22 @@ declare class QueryManager {
1020
1019
  dialect: "postgresql" | "sqlite";
1021
1020
  }): SQL | undefined;
1022
1021
  /**
1023
- * Check if an object has any filter operator properties.
1024
- */
1022
+ * Check if an object has any filter operator properties.
1023
+ */
1025
1024
  protected hasFilterOperatorProperties(obj: any): boolean;
1026
1025
  /**
1027
- * Map a filter operator to a SQL query.
1028
- */
1026
+ * Map a filter operator to a SQL query.
1027
+ */
1029
1028
  mapOperatorToSql(operator: FilterOperators<any> | any, column: PgColumn, columnSchema?: TObject, columnName?: string, dialect?: "postgresql" | "sqlite"): SQL | undefined;
1030
1029
  /**
1031
- * Parse pagination sort string to orderBy format.
1032
- * Format: "firstName,-lastName" -> [{ column: "firstName", direction: "asc" }, { column: "lastName", direction: "desc" }]
1033
- * - Columns separated by comma
1034
- * - Prefix with '-' for DESC direction
1035
- *
1036
- * @param sort Pagination sort string
1037
- * @returns OrderBy array or single object
1038
- */
1030
+ * Parse pagination sort string to orderBy format.
1031
+ * Format: "firstName,-lastName" -> [{ column: "firstName", direction: "asc" }, { column: "lastName", direction: "desc" }]
1032
+ * - Columns separated by comma
1033
+ * - Prefix with '-' for DESC direction
1034
+ *
1035
+ * @param sort Pagination sort string
1036
+ * @returns OrderBy array or single object
1037
+ */
1039
1038
  parsePaginationSort(sort: string): Array<{
1040
1039
  column: string;
1041
1040
  direction: "asc" | "desc";
@@ -1044,34 +1043,34 @@ declare class QueryManager {
1044
1043
  direction: "asc" | "desc";
1045
1044
  };
1046
1045
  /**
1047
- * Normalize orderBy parameter to array format.
1048
- * Supports 3 modes:
1049
- * 1. String: "name" -> [{ column: "name", direction: "asc" }]
1050
- * 2. Object: { column: "name", direction: "desc" } -> [{ column: "name", direction: "desc" }]
1051
- * 3. Array: [{ column: "name" }, { column: "age", direction: "desc" }] -> normalized array
1052
- *
1053
- * @param orderBy The orderBy parameter
1054
- * @returns Normalized array of order by clauses
1055
- */
1046
+ * Normalize orderBy parameter to array format.
1047
+ * Supports 3 modes:
1048
+ * 1. String: "name" -> [{ column: "name", direction: "asc" }]
1049
+ * 2. Object: { column: "name", direction: "desc" } -> [{ column: "name", direction: "desc" }]
1050
+ * 3. Array: [{ column: "name" }, { column: "age", direction: "desc" }] -> normalized array
1051
+ *
1052
+ * @param orderBy The orderBy parameter
1053
+ * @returns Normalized array of order by clauses
1054
+ */
1056
1055
  normalizeOrderBy(orderBy: any): Array<{
1057
1056
  column: string;
1058
1057
  direction: "asc" | "desc";
1059
1058
  }>;
1060
1059
  /**
1061
- * Create a pagination object.
1062
- *
1063
- * @deprecated Use `createPagination` from alepha instead.
1064
- * This method now delegates to the framework-level helper.
1065
- *
1066
- * @param entities The entities to paginate.
1067
- * @param limit The limit of the pagination.
1068
- * @param offset The offset of the pagination.
1069
- * @param sort Optional sort metadata to include in response.
1070
- */
1060
+ * Create a pagination object.
1061
+ *
1062
+ * @deprecated Use `createPagination` from alepha instead.
1063
+ * This method now delegates to the framework-level helper.
1064
+ *
1065
+ * @param entities The entities to paginate.
1066
+ * @param limit The limit of the pagination.
1067
+ * @param offset The offset of the pagination.
1068
+ * @param sort Optional sort metadata to include in response.
1069
+ */
1071
1070
  createPagination<T>(entities: T[], limit?: number, offset?: number, sort?: Array<{
1072
1071
  column: string;
1073
1072
  direction: "asc" | "desc";
1074
- }>): alepha1.Page<T>;
1073
+ }>): alepha23.Page<T>;
1075
1074
  }
1076
1075
  interface PgJoin {
1077
1076
  table: string;
@@ -1084,20 +1083,20 @@ interface PgJoin {
1084
1083
  //#region ../../src/orm/services/PgRelationManager.d.ts
1085
1084
  declare class PgRelationManager {
1086
1085
  /**
1087
- * Recursively build joins for the query builder based on the relations map
1088
- */
1086
+ * Recursively build joins for the query builder based on the relations map
1087
+ */
1089
1088
  buildJoins(provider: DatabaseProvider, builder: PgSelectBase<any, any, any>, joins: Array<PgJoin>, withRelations: PgRelationMap<TObject>, table: PgTableWithColumns<any>, parentKey?: string): void;
1090
1089
  /**
1091
- * Map a row with its joined relations based on the joins definition
1092
- */
1090
+ * Map a row with its joined relations based on the joins definition
1091
+ */
1093
1092
  mapRowWithJoins(record: Record<string, unknown>, row: Record<string, unknown>, schema: TObject, joins: PgJoin[], parentKey?: string): Record<string, unknown>;
1094
1093
  /**
1095
- * Check if all values in an object are null (indicates a left join with no match)
1096
- */
1094
+ * Check if all values in an object are null (indicates a left join with no match)
1095
+ */
1097
1096
  private isAllNull;
1098
1097
  /**
1099
- * Build a schema that includes all join properties recursively
1100
- */
1098
+ * Build a schema that includes all join properties recursively
1099
+ */
1101
1100
  buildSchemaWithJoins(baseSchema: TObject, joins: PgJoin[], parentPath?: string): TObject;
1102
1101
  }
1103
1102
  //#endregion
@@ -1105,216 +1104,217 @@ declare class PgRelationManager {
1105
1104
  declare abstract class Repository$1<T extends TObject> {
1106
1105
  readonly entity: EntityPrimitive<T>;
1107
1106
  readonly provider: DatabaseProvider;
1107
+ protected readonly log: alepha_logger5.Logger;
1108
1108
  protected readonly relationManager: PgRelationManager;
1109
1109
  protected readonly queryManager: QueryManager;
1110
1110
  protected readonly dateTimeProvider: DateTimeProvider;
1111
1111
  protected readonly alepha: Alepha;
1112
1112
  constructor(entity: EntityPrimitive<T>, provider?: typeof DatabaseProvider);
1113
1113
  /**
1114
- * Represents the primary key of the table.
1115
- * - Key is the name of the primary key column.
1116
- * - Type is the type (TypeBox) of the primary key column.
1117
- *
1118
- * ID is mandatory. If the table does not have a primary key, it will throw an error.
1119
- */
1114
+ * Represents the primary key of the table.
1115
+ * - Key is the name of the primary key column.
1116
+ * - Type is the type (TypeBox) of the primary key column.
1117
+ *
1118
+ * ID is mandatory. If the table does not have a primary key, it will throw an error.
1119
+ */
1120
1120
  get id(): {
1121
1121
  type: TSchema;
1122
1122
  key: keyof T["properties"];
1123
1123
  col: PgColumn;
1124
1124
  };
1125
1125
  /**
1126
- * Get Drizzle table object.
1127
- */
1126
+ * Get Drizzle table object.
1127
+ */
1128
1128
  get table(): PgTableWithColumns<SchemaToTableConfig<T>>;
1129
1129
  /**
1130
- * Get SQL table name. (from Drizzle table object)
1131
- */
1130
+ * Get SQL table name. (from Drizzle table object)
1131
+ */
1132
1132
  get tableName(): string;
1133
1133
  /**
1134
- * Getter for the database connection from the database provider.
1135
- */
1134
+ * Getter for the database connection from the database provider.
1135
+ */
1136
1136
  protected get db(): PgDatabase<any>;
1137
1137
  /**
1138
- * Execute a SQL query.
1139
- *
1140
- * This method allows executing raw SQL queries against the database.
1141
- * This is by far the easiest way to run custom queries that are not covered by the repository's built-in methods!
1142
- *
1143
- * You must use the `sql` tagged template function from Drizzle ORM to create the query. https://orm.drizzle.team/docs/sql
1144
- *
1145
- * @example
1146
- * ```ts
1147
- * class App {
1148
- * repository = $repository({ ... });
1149
- * async getAdults() {
1150
- * const users = repository.table; // Drizzle table object
1151
- * await repository.query(sql`SELECT * FROM ${users} WHERE ${users.age} > ${18}`);
1152
- * // or better
1153
- * await repository.query((users) => sql`SELECT * FROM ${users} WHERE ${users.age} > ${18}`);
1154
- * }
1155
- * }
1156
- * ```
1157
- */
1138
+ * Execute a SQL query.
1139
+ *
1140
+ * This method allows executing raw SQL queries against the database.
1141
+ * This is by far the easiest way to run custom queries that are not covered by the repository's built-in methods!
1142
+ *
1143
+ * You must use the `sql` tagged template function from Drizzle ORM to create the query. https://orm.drizzle.team/docs/sql
1144
+ *
1145
+ * @example
1146
+ * ```ts
1147
+ * class App {
1148
+ * repository = $repository({ ... });
1149
+ * async getAdults() {
1150
+ * const users = repository.table; // Drizzle table object
1151
+ * await repository.query(sql`SELECT * FROM ${users} WHERE ${users.age} > ${18}`);
1152
+ * // or better
1153
+ * await repository.query((users) => sql`SELECT * FROM ${users} WHERE ${users.age} > ${18}`);
1154
+ * }
1155
+ * }
1156
+ * ```
1157
+ */
1158
1158
  query<R extends TObject = T>(query: SQLLike | ((table: PgTableWithColumns<SchemaToTableConfig<T>>, db: PgDatabase<any>) => SQLLike), schema?: R): Promise<Static<R>[]>;
1159
1159
  /**
1160
- * Map raw database fields to entity fields. (handles column name differences)
1161
- */
1160
+ * Map raw database fields to entity fields. (handles column name differences)
1161
+ */
1162
1162
  protected mapRawFieldsToEntity(row: Record<string, unknown>): any;
1163
1163
  /**
1164
- * Get a Drizzle column from the table by his name.
1165
- */
1164
+ * Get a Drizzle column from the table by his name.
1165
+ */
1166
1166
  protected col(name: keyof StaticEncode<T>): PgColumn;
1167
1167
  /**
1168
- * Run a transaction.
1169
- */
1168
+ * Run a transaction.
1169
+ */
1170
1170
  transaction<T>(transaction: (tx: PgTransaction<any, Record<string, any>, any>) => Promise<T>, config?: PgTransactionConfig): Promise<T>;
1171
1171
  /**
1172
- * Start a SELECT query on the table.
1173
- */
1172
+ * Start a SELECT query on the table.
1173
+ */
1174
1174
  protected rawSelect(opts?: StatementOptions): drizzle_orm_pg_core0.PgSelectBase<string, Record<string, PgColumn<drizzle_orm0.ColumnBaseConfig<drizzle_orm0.ColumnDataType, string>, {}, {}>>, "single", Record<string, "not-null">, false, never, {
1175
1175
  [x: string]: unknown;
1176
1176
  }[], {
1177
1177
  [x: string]: PgColumn<drizzle_orm0.ColumnBaseConfig<drizzle_orm0.ColumnDataType, string>, {}, {}>;
1178
1178
  }>;
1179
1179
  /**
1180
- * Start a SELECT DISTINCT query on the table.
1181
- */
1180
+ * Start a SELECT DISTINCT query on the table.
1181
+ */
1182
1182
  protected rawSelectDistinct(opts?: StatementOptions, columns?: (keyof Static<T>)[]): drizzle_orm_pg_core0.PgSelectBase<string, Record<string, any>, "partial", Record<string, "not-null">, false, never, {
1183
1183
  [x: string]: any;
1184
1184
  }[], {
1185
1185
  [x: string]: any;
1186
1186
  }>;
1187
1187
  /**
1188
- * Start an INSERT query on the table.
1189
- */
1188
+ * Start an INSERT query on the table.
1189
+ */
1190
1190
  protected rawInsert(opts?: StatementOptions): drizzle_orm_pg_core0.PgInsertBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any, false>;
1191
1191
  /**
1192
- * Start an UPDATE query on the table.
1193
- */
1192
+ * Start an UPDATE query on the table.
1193
+ */
1194
1194
  protected rawUpdate(opts?: StatementOptions): drizzle_orm_pg_core0.PgUpdateBuilder<PgTableWithColumns<SchemaToTableConfig<T>>, any>;
1195
1195
  /**
1196
- * Start a DELETE query on the table.
1197
- */
1196
+ * Start a DELETE query on the table.
1197
+ */
1198
1198
  protected rawDelete(opts?: StatementOptions): drizzle_orm_pg_core0.PgDeleteBase<PgTableWithColumns<SchemaToTableConfig<T>>, any, undefined, undefined, false, never>;
1199
1199
  /**
1200
- * Create a Drizzle `select` query based on a JSON query object.
1201
- *
1202
- * > This method is the base for `find`, `findOne`, `findById`, and `paginate`.
1203
- */
1200
+ * Create a Drizzle `select` query based on a JSON query object.
1201
+ *
1202
+ * > This method is the base for `find`, `findOne`, `findById`, and `paginate`.
1203
+ */
1204
1204
  findMany<R extends PgRelationMap<T>>(query?: PgQueryRelations<T, R>, opts?: StatementOptions): Promise<PgStatic<T, R>[]>;
1205
1205
  /**
1206
- * Find a single entity.
1207
- */
1206
+ * Find a single entity.
1207
+ */
1208
1208
  findOne<R extends PgRelationMap<T>>(query: Pick<PgQueryRelations<T, R>, "with" | "where">, opts?: StatementOptions): Promise<PgStatic<T, R>>;
1209
1209
  /**
1210
- * Find entities with pagination.
1211
- *
1212
- * It uses the same parameters as `find()`, but adds pagination metadata to the response.
1213
- *
1214
- * > Pagination CAN also do a count query to get the total number of elements.
1215
- */
1210
+ * Find entities with pagination.
1211
+ *
1212
+ * It uses the same parameters as `find()`, but adds pagination metadata to the response.
1213
+ *
1214
+ * > Pagination CAN also do a count query to get the total number of elements.
1215
+ */
1216
1216
  paginate<R extends PgRelationMap<T>>(pagination?: PageQuery, query?: PgQueryRelations<T, R>, opts?: StatementOptions & {
1217
1217
  count?: boolean;
1218
1218
  }): Promise<Page<PgStatic<T, R>>>;
1219
1219
  /**
1220
- * Find an entity by ID.
1221
- *
1222
- * This is a convenience method for `findOne` with a where clause on the primary key.
1223
- * If you need more complex queries, use `findOne` instead.
1224
- */
1220
+ * Find an entity by ID.
1221
+ *
1222
+ * This is a convenience method for `findOne` with a where clause on the primary key.
1223
+ * If you need more complex queries, use `findOne` instead.
1224
+ */
1225
1225
  findById(id: string | number, opts?: StatementOptions): Promise<Static<T>>;
1226
1226
  /**
1227
- * Helper to create a type-safe query object.
1228
- */
1227
+ * Helper to create a type-safe query object.
1228
+ */
1229
1229
  createQuery(): PgQuery<T>;
1230
1230
  /**
1231
- * Helper to create a type-safe where clause.
1232
- */
1231
+ * Helper to create a type-safe where clause.
1232
+ */
1233
1233
  createQueryWhere(): PgQueryWhere<T>;
1234
1234
  /**
1235
- * Create an entity.
1236
- *
1237
- * @param data The entity to create.
1238
- * @param opts The options for creating the entity.
1239
- * @returns The ID of the created entity.
1240
- */
1235
+ * Create an entity.
1236
+ *
1237
+ * @param data The entity to create.
1238
+ * @param opts The options for creating the entity.
1239
+ * @returns The ID of the created entity.
1240
+ */
1241
1241
  create(data: Static<TObjectInsert<T>>, opts?: StatementOptions): Promise<Static<T>>;
1242
1242
  /**
1243
- * Create many entities.
1244
- *
1245
- * Inserts are batched in chunks of 1000 to avoid hitting database limits.
1246
- *
1247
- * @param values The entities to create.
1248
- * @param opts The statement options.
1249
- * @returns The created entities.
1250
- */
1243
+ * Create many entities.
1244
+ *
1245
+ * Inserts are batched in chunks of 1000 to avoid hitting database limits.
1246
+ *
1247
+ * @param values The entities to create.
1248
+ * @param opts The statement options.
1249
+ * @returns The created entities.
1250
+ */
1251
1251
  createMany(values: Array<Static<TObjectInsert<T>>>, opts?: StatementOptions & {
1252
1252
  batchSize?: number;
1253
1253
  }): Promise<Static<T>[]>;
1254
1254
  /**
1255
- * Find an entity and update it.
1256
- */
1255
+ * Find an entity and update it.
1256
+ */
1257
1257
  updateOne(where: PgQueryWhereOrSQL<T>, data: Partial<Static<TObjectUpdate<T>>>, opts?: StatementOptions): Promise<Static<T>>;
1258
1258
  /**
1259
- * Save a given entity.
1260
- *
1261
- * @example
1262
- * ```ts
1263
- * const entity = await repository.findById(1);
1264
- * entity.name = "New Name"; // update a field
1265
- * delete entity.description; // delete a field
1266
- * await repository.save(entity);
1267
- * ```
1268
- *
1269
- * Difference with `updateById/updateOne`:
1270
- *
1271
- * - requires the entity to be fetched first (whole object is expected)
1272
- * - check pg.version() if present -> optimistic locking
1273
- * - validate entity against schema
1274
- * - undefined values will be set to null, not ignored!
1275
- *
1276
- * @see {@link DbVersionMismatchError}
1277
- */
1259
+ * Save a given entity.
1260
+ *
1261
+ * @example
1262
+ * ```ts
1263
+ * const entity = await repository.findById(1);
1264
+ * entity.name = "New Name"; // update a field
1265
+ * delete entity.description; // delete a field
1266
+ * await repository.save(entity);
1267
+ * ```
1268
+ *
1269
+ * Difference with `updateById/updateOne`:
1270
+ *
1271
+ * - requires the entity to be fetched first (whole object is expected)
1272
+ * - check pg.version() if present -> optimistic locking
1273
+ * - validate entity against schema
1274
+ * - undefined values will be set to null, not ignored!
1275
+ *
1276
+ * @see {@link DbVersionMismatchError}
1277
+ */
1278
1278
  save(entity: Static<T>, opts?: StatementOptions): Promise<void>;
1279
1279
  /**
1280
- * Find an entity by ID and update it.
1281
- */
1280
+ * Find an entity by ID and update it.
1281
+ */
1282
1282
  updateById(id: string | number, data: Partial<Static<TObjectUpdate<T>>>, opts?: StatementOptions): Promise<Static<T>>;
1283
1283
  /**
1284
- * Find many entities and update all of them.
1285
- */
1284
+ * Find many entities and update all of them.
1285
+ */
1286
1286
  updateMany(where: PgQueryWhereOrSQL<T>, data: Partial<Static<TObjectUpdate<T>>>, opts?: StatementOptions): Promise<Array<number | string>>;
1287
1287
  /**
1288
- * Find many and delete all of them.
1289
- * @returns Array of deleted entity IDs
1290
- */
1288
+ * Find many and delete all of them.
1289
+ * @returns Array of deleted entity IDs
1290
+ */
1291
1291
  deleteMany(where?: PgQueryWhereOrSQL<T>, opts?: StatementOptions): Promise<Array<number | string>>;
1292
1292
  /**
1293
- * Delete all entities.
1294
- * @returns Array of deleted entity IDs
1295
- */
1293
+ * Delete all entities.
1294
+ * @returns Array of deleted entity IDs
1295
+ */
1296
1296
  clear(opts?: StatementOptions): Promise<Array<number | string>>;
1297
1297
  /**
1298
- * Delete the given entity.
1299
- *
1300
- * You must fetch the entity first in order to delete it.
1301
- * @returns Array containing the deleted entity ID
1302
- */
1298
+ * Delete the given entity.
1299
+ *
1300
+ * You must fetch the entity first in order to delete it.
1301
+ * @returns Array containing the deleted entity ID
1302
+ */
1303
1303
  destroy(entity: Static<T>, opts?: StatementOptions): Promise<Array<number | string>>;
1304
1304
  /**
1305
- * Find an entity and delete it.
1306
- * @returns Array of deleted entity IDs (should contain at most one ID)
1307
- */
1305
+ * Find an entity and delete it.
1306
+ * @returns Array of deleted entity IDs (should contain at most one ID)
1307
+ */
1308
1308
  deleteOne(where?: PgQueryWhereOrSQL<T>, opts?: StatementOptions): Promise<Array<number | string>>;
1309
1309
  /**
1310
- * Find an entity by ID and delete it.
1311
- * @returns Array containing the deleted entity ID
1312
- * @throws DbEntityNotFoundError if the entity is not found
1313
- */
1310
+ * Find an entity by ID and delete it.
1311
+ * @returns Array containing the deleted entity ID
1312
+ * @throws DbEntityNotFoundError if the entity is not found
1313
+ */
1314
1314
  deleteById(id: string | number, opts?: StatementOptions): Promise<Array<number | string>>;
1315
1315
  /**
1316
- * Count entities.
1317
- */
1316
+ * Count entities.
1317
+ */
1318
1318
  count(where?: PgQueryWhereOrSQL<T>, opts?: StatementOptions): Promise<number>;
1319
1319
  protected conflictMessagePattern: string;
1320
1320
  protected handleError(error: unknown, message: string): DbError;
@@ -1323,31 +1323,31 @@ declare abstract class Repository$1<T extends TObject> {
1323
1323
  }): PgQueryWhereOrSQL<T>;
1324
1324
  protected deletedAt(): PgAttrField | undefined;
1325
1325
  /**
1326
- * Convert something to valid Pg Insert Value.
1327
- */
1326
+ * Convert something to valid Pg Insert Value.
1327
+ */
1328
1328
  protected cast(data: any, insert: boolean): PgInsertValue<PgTableWithColumns<SchemaToTableConfig<T>>>;
1329
1329
  /**
1330
- * Transform a row from the database into a clean entity.
1331
- */
1330
+ * Transform a row from the database into a clean entity.
1331
+ */
1332
1332
  protected clean<T extends TObject>(row: Record<string, unknown>, schema: T): Static<T>;
1333
1333
  /**
1334
- * Clean a row with joins recursively
1335
- */
1334
+ * Clean a row with joins recursively
1335
+ */
1336
1336
  protected cleanWithJoins<T extends TObject>(row: Record<string, unknown>, schema: T, joins: PgJoin[], parentPath?: string): Static<T>;
1337
1337
  /**
1338
- * Convert a where clause to SQL.
1339
- */
1338
+ * Convert a where clause to SQL.
1339
+ */
1340
1340
  protected toSQL(where: PgQueryWhereOrSQL<T>, joins?: PgJoin[]): SQL | undefined;
1341
1341
  /**
1342
- * Get the where clause for an ID.
1343
- *
1344
- * @param id The ID to get the where clause for.
1345
- * @returns The where clause for the ID.
1346
- */
1342
+ * Get the where clause for an ID.
1343
+ *
1344
+ * @param id The ID to get the where clause for.
1345
+ * @returns The where clause for the ID.
1346
+ */
1347
1347
  protected getWhereId(id: string | number): PgQueryWhere<T>;
1348
1348
  /**
1349
- * Find a primary key in the schema.
1350
- */
1349
+ * Find a primary key in the schema.
1350
+ */
1351
1351
  protected getPrimaryKey(schema: TObject): {
1352
1352
  key: string;
1353
1353
  col: PgColumn<drizzle_orm0.ColumnBaseConfig<drizzle_orm0.ColumnDataType, string>, {}, {}>;
@@ -1359,189 +1359,80 @@ declare abstract class Repository$1<T extends TObject> {
1359
1359
  */
1360
1360
  interface StatementOptions {
1361
1361
  /**
1362
- * Transaction to use.
1363
- */
1362
+ * Transaction to use.
1363
+ */
1364
1364
  tx?: PgTransaction<any, Record<string, any>>;
1365
1365
  /**
1366
- * Lock strength.
1367
- */
1366
+ * Lock strength.
1367
+ */
1368
1368
  for?: LockStrength | {
1369
1369
  config: LockConfig;
1370
1370
  strength: LockStrength;
1371
1371
  };
1372
1372
  /**
1373
- * If true, ignore soft delete.
1374
- */
1373
+ * If true, ignore soft delete.
1374
+ */
1375
1375
  force?: boolean;
1376
1376
  /**
1377
- * Force the current time.
1378
- */
1377
+ * Force the current time.
1378
+ */
1379
1379
  now?: DateTime | string;
1380
1380
  }
1381
1381
  //#endregion
1382
- //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
1383
- declare module "alepha" {
1384
- interface Env extends Partial<Static<typeof envSchema>> {}
1385
- }
1386
- declare const envSchema: alepha1.TObject<{
1387
- /**
1388
- * Main configuration for database connection.
1389
- * Accept a string in the format of a Postgres connection URL.
1390
- * Example: postgres://user:password@localhost:5432/database
1391
- * or
1392
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
1393
- */
1394
- DATABASE_URL: alepha1.TOptional<alepha1.TString>;
1395
- /**
1396
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
1397
- *
1398
- * It will monkey patch drizzle tables.
1399
- */
1400
- POSTGRES_SCHEMA: alepha1.TOptional<alepha1.TString>;
1401
- }>;
1402
- //#endregion
1403
- //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
1404
- /**
1405
- * Configuration options for the Node.js SQLite database provider.
1406
- */
1407
- declare const nodeSqliteOptions: alepha1.Atom<alepha1.TObject<{
1408
- path: alepha1.TOptional<alepha1.TString>;
1409
- }>, "alepha.postgres.node-sqlite.options">;
1410
- type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
1411
- declare module "alepha" {
1412
- interface State {
1413
- [nodeSqliteOptions.key]: NodeSqliteProviderOptions;
1414
- }
1415
- }
1416
- /**
1417
- * Add a fake support for SQLite in Node.js based on Postgres interfaces.
1418
- *
1419
- * This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
1420
- * This is NOT recommended for production use.
1421
- */
1422
- //#endregion
1423
- //#region ../../src/orm/index.d.ts
1424
- declare module "alepha" {
1425
- interface Hooks {
1426
- /**
1427
- * Fires before creating an entity in the repository.
1428
- */
1429
- "repository:create:before": {
1430
- tableName: string;
1431
- data: any;
1432
- };
1433
- /**
1434
- * Fires after creating an entity in the repository.
1435
- */
1436
- "repository:create:after": {
1437
- tableName: string;
1438
- data: any;
1439
- entity: any;
1440
- };
1441
- /**
1442
- * Fires before updating entities in the repository.
1443
- */
1444
- "repository:update:before": {
1445
- tableName: string;
1446
- where: any;
1447
- data: any;
1448
- };
1449
- /**
1450
- * Fires after updating entities in the repository.
1451
- */
1452
- "repository:update:after": {
1453
- tableName: string;
1454
- where: any;
1455
- data: any;
1456
- entities: any[];
1457
- };
1458
- /**
1459
- * Fires before deleting entities from the repository.
1460
- */
1461
- "repository:delete:before": {
1462
- tableName: string;
1463
- where: any;
1464
- };
1465
- /**
1466
- * Fires after deleting entities from the repository.
1467
- */
1468
- "repository:delete:after": {
1469
- tableName: string;
1470
- where: any;
1471
- ids: Array<string | number>;
1472
- };
1473
- /**
1474
- * Fires before reading entities from the repository.
1475
- */
1476
- "repository:read:before": {
1477
- tableName: string;
1478
- query: any;
1479
- };
1480
- /**
1481
- * Fires after reading entities from the repository.
1482
- */
1483
- "repository:read:after": {
1484
- tableName: string;
1485
- query: any;
1486
- entities: any[];
1487
- };
1488
- }
1489
- }
1490
- //#endregion
1491
1382
  //#region ../../src/api/users/entities/identities.d.ts
1492
- declare const identities: alepha_orm0.EntityPrimitive<alepha1.TObject<{
1493
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1494
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1495
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1496
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1497
- userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1498
- password: alepha1.TOptional<alepha1.TString>;
1499
- provider: alepha1.TString;
1500
- providerUserId: alepha1.TOptional<alepha1.TString>;
1501
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1383
+ declare const identities: alepha_orm24.EntityPrimitive<alepha23.TObject<{
1384
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1385
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1386
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1387
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1388
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1389
+ password: alepha23.TOptional<alepha23.TString>;
1390
+ provider: alepha23.TString;
1391
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1392
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1502
1393
  }>>;
1503
1394
  type IdentityEntity = Static<typeof identities.schema>;
1504
1395
  //#endregion
1505
1396
  //#region ../../src/api/users/entities/sessions.d.ts
1506
- declare const sessions: alepha_orm0.EntityPrimitive<alepha1.TObject<{
1507
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1508
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1509
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1510
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1511
- refreshToken: alepha1.TString;
1512
- userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1513
- expiresAt: alepha1.TString;
1514
- ip: alepha1.TOptional<alepha1.TString>;
1515
- userAgent: alepha1.TOptional<alepha1.TObject<{
1516
- os: alepha1.TString;
1517
- browser: alepha1.TString;
1518
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1397
+ declare const sessions: alepha_orm24.EntityPrimitive<alepha23.TObject<{
1398
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1399
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1400
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1401
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1402
+ refreshToken: alepha23.TString;
1403
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1404
+ expiresAt: alepha23.TString;
1405
+ ip: alepha23.TOptional<alepha23.TString>;
1406
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1407
+ os: alepha23.TString;
1408
+ browser: alepha23.TString;
1409
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1519
1410
  }>>;
1520
1411
  }>>;
1521
1412
  type SessionEntity = Static<typeof sessions.schema>;
1522
1413
  //#endregion
1523
1414
  //#region ../../src/api/users/entities/users.d.ts
1524
1415
  declare const DEFAULT_USER_REALM_NAME = "default";
1525
- declare const users: alepha_orm0.EntityPrimitive<alepha1.TObject<{
1526
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1527
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1528
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1529
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1530
- realm: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_DEFAULT>;
1531
- username: alepha1.TOptional<alepha1.TString>;
1532
- email: alepha1.TOptional<alepha1.TString>;
1533
- phoneNumber: alepha1.TOptional<alepha1.TString>;
1534
- roles: alepha_orm0.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm0.PG_DEFAULT>;
1535
- firstName: alepha1.TOptional<alepha1.TString>;
1536
- lastName: alepha1.TOptional<alepha1.TString>;
1537
- picture: alepha1.TOptional<alepha1.TString>;
1538
- enabled: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1539
- emailVerified: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1416
+ declare const users: alepha_orm24.EntityPrimitive<alepha23.TObject<{
1417
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1418
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1419
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1420
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1421
+ realm: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_DEFAULT>;
1422
+ username: alepha23.TOptional<alepha23.TString>;
1423
+ email: alepha23.TOptional<alepha23.TString>;
1424
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1425
+ roles: alepha_orm24.PgAttr<alepha23.TArray<alepha23.TString>, typeof alepha_orm24.PG_DEFAULT>;
1426
+ firstName: alepha23.TOptional<alepha23.TString>;
1427
+ lastName: alepha23.TOptional<alepha23.TString>;
1428
+ picture: alepha23.TOptional<alepha23.TString>;
1429
+ enabled: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1430
+ emailVerified: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1540
1431
  }>>;
1541
1432
  type UserEntity = Static<typeof users.schema>;
1542
1433
  //#endregion
1543
- //#region ../../src/api/users/primitives/$userRealm.d.ts
1544
- type UserRealmPrimitive = RealmPrimitive & WithLinkFn & WithLoginFn;
1434
+ //#region ../../src/api/users/primitives/$realm.d.ts
1435
+ type RealmPrimitive = IssuerPrimitive & WithLinkFn & WithLoginFn;
1545
1436
  /**
1546
1437
  * Already configured realm for user management.
1547
1438
  *
@@ -1555,23 +1446,23 @@ type UserRealmPrimitive = RealmPrimitive & WithLinkFn & WithLoginFn;
1555
1446
  * Environment Variables:
1556
1447
  * - `APP_SECRET`: Secret key for signing tokens (if not provided in options).
1557
1448
  */
1558
- declare const $userRealm: (options?: UserRealmOptions) => UserRealmPrimitive;
1559
- interface UserRealmOptions {
1449
+ declare const $realm: (options?: RealmOptions) => RealmPrimitive;
1450
+ interface RealmOptions {
1560
1451
  /**
1561
- * Secret key for signing tokens.
1562
- *
1563
- * If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
1564
- */
1452
+ * Secret key for signing tokens.
1453
+ *
1454
+ * If not provided, the secret from the SecurityProvider will be used (usually from the APP_SECRET environment variable).
1455
+ */
1565
1456
  secret?: string;
1566
1457
  /**
1567
- * Realm configuration options.
1568
- *
1569
- * It's already pre-configured for user management with admin and user roles.
1570
- */
1571
- realm?: Partial<RealmPrimitiveOptions>;
1458
+ * Issuer configuration options.
1459
+ *
1460
+ * It's already pre-configured for user management with admin and user roles.
1461
+ */
1462
+ issuer?: Partial<IssuerPrimitiveOptions>;
1572
1463
  /**
1573
- * Override entities.
1574
- */
1464
+ * Override entities.
1465
+ */
1575
1466
  entities?: {
1576
1467
  users?: Repository<typeof users.schema>;
1577
1468
  identities?: Repository<typeof identities.schema>;
@@ -1590,111 +1481,111 @@ interface UserRealmOptions {
1590
1481
  };
1591
1482
  }
1592
1483
  //#endregion
1593
- //#region ../../src/api/users/providers/UserRealmProvider.d.ts
1594
- interface UserRealmRepositories {
1484
+ //#region ../../src/api/users/providers/RealmProvider.d.ts
1485
+ interface RealmRepositories {
1595
1486
  identities: Repository<typeof identities.schema>;
1596
1487
  sessions: Repository<typeof sessions.schema>;
1597
1488
  users: Repository<typeof users.schema>;
1598
1489
  }
1599
- interface UserRealm {
1490
+ interface Realm {
1600
1491
  name: string;
1601
- repositories: UserRealmRepositories;
1492
+ repositories: RealmRepositories;
1602
1493
  settings: RealmAuthSettings;
1603
1494
  }
1604
- declare class UserRealmProvider {
1495
+ declare class RealmProvider {
1605
1496
  protected readonly alepha: Alepha;
1606
- protected readonly defaultIdentities: Repository<alepha1.TObject<{
1607
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1608
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1609
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1610
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1611
- userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1612
- password: alepha1.TOptional<alepha1.TString>;
1613
- provider: alepha1.TString;
1614
- providerUserId: alepha1.TOptional<alepha1.TString>;
1615
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1497
+ protected readonly defaultIdentities: Repository<alepha23.TObject<{
1498
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1499
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1500
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1501
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1502
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1503
+ password: alepha23.TOptional<alepha23.TString>;
1504
+ provider: alepha23.TString;
1505
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1506
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1616
1507
  }>>;
1617
- protected readonly defaultSessions: Repository<alepha1.TObject<{
1618
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1619
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1620
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1621
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1622
- refreshToken: alepha1.TString;
1623
- userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1624
- expiresAt: alepha1.TString;
1625
- ip: alepha1.TOptional<alepha1.TString>;
1626
- userAgent: alepha1.TOptional<alepha1.TObject<{
1627
- os: alepha1.TString;
1628
- browser: alepha1.TString;
1629
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1508
+ protected readonly defaultSessions: Repository<alepha23.TObject<{
1509
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1510
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1511
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1512
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1513
+ refreshToken: alepha23.TString;
1514
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1515
+ expiresAt: alepha23.TString;
1516
+ ip: alepha23.TOptional<alepha23.TString>;
1517
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1518
+ os: alepha23.TString;
1519
+ browser: alepha23.TString;
1520
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1630
1521
  }>>;
1631
1522
  }>>;
1632
- protected readonly defaultUsers: Repository<alepha1.TObject<{
1633
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1634
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1635
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1636
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1637
- realm: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_DEFAULT>;
1638
- username: alepha1.TOptional<alepha1.TString>;
1639
- email: alepha1.TOptional<alepha1.TString>;
1640
- phoneNumber: alepha1.TOptional<alepha1.TString>;
1641
- roles: alepha_orm0.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm0.PG_DEFAULT>;
1642
- firstName: alepha1.TOptional<alepha1.TString>;
1643
- lastName: alepha1.TOptional<alepha1.TString>;
1644
- picture: alepha1.TOptional<alepha1.TString>;
1645
- enabled: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1646
- emailVerified: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1523
+ protected readonly defaultUsers: Repository<alepha23.TObject<{
1524
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1525
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1526
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1527
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1528
+ realm: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_DEFAULT>;
1529
+ username: alepha23.TOptional<alepha23.TString>;
1530
+ email: alepha23.TOptional<alepha23.TString>;
1531
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1532
+ roles: alepha_orm24.PgAttr<alepha23.TArray<alepha23.TString>, typeof alepha_orm24.PG_DEFAULT>;
1533
+ firstName: alepha23.TOptional<alepha23.TString>;
1534
+ lastName: alepha23.TOptional<alepha23.TString>;
1535
+ picture: alepha23.TOptional<alepha23.TString>;
1536
+ enabled: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1537
+ emailVerified: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1647
1538
  }>>;
1648
- protected realms: Map<string, UserRealm>;
1539
+ protected realms: Map<string, Realm>;
1649
1540
  avatars: alepha_bucket0.BucketPrimitive;
1650
- protected readonly onConfigure: alepha1.HookPrimitive<"configure">;
1651
- register(userRealmName: string, userRealmOptions?: UserRealmOptions): UserRealm;
1652
- /**
1653
- * Gets a registered realm by name, auto-creating default if needed.
1654
- */
1655
- getRealm(userRealmName?: string): UserRealm;
1656
- identityRepository(userRealmName?: string): Repository<typeof identities.schema>;
1657
- sessionRepository(userRealmName?: string): Repository<typeof sessions.schema>;
1658
- userRepository(userRealmName?: string): Repository<typeof users.schema>;
1541
+ protected readonly onConfigure: alepha23.HookPrimitive<"configure">;
1542
+ register(realmName: string, realmOptions?: RealmOptions): Realm;
1543
+ /**
1544
+ * Gets a registered realm by name, auto-creating default if needed.
1545
+ */
1546
+ getRealm(realmName?: string): Realm;
1547
+ identityRepository(realmName?: string): Repository<typeof identities.schema>;
1548
+ sessionRepository(realmName?: string): Repository<typeof sessions.schema>;
1549
+ userRepository(realmName?: string): Repository<typeof users.schema>;
1659
1550
  }
1660
1551
  //#endregion
1661
1552
  //#region ../../src/api/users/schemas/identityQuerySchema.d.ts
1662
- declare const identityQuerySchema: alepha1.TObject<{
1663
- page: alepha1.TOptional<alepha1.TInteger>;
1664
- size: alepha1.TOptional<alepha1.TInteger>;
1665
- sort: alepha1.TOptional<alepha1.TString>;
1666
- userId: alepha1.TOptional<alepha1.TString>;
1667
- provider: alepha1.TOptional<alepha1.TString>;
1553
+ declare const identityQuerySchema: alepha23.TObject<{
1554
+ page: alepha23.TOptional<alepha23.TInteger>;
1555
+ size: alepha23.TOptional<alepha23.TInteger>;
1556
+ sort: alepha23.TOptional<alepha23.TString>;
1557
+ userId: alepha23.TOptional<alepha23.TString>;
1558
+ provider: alepha23.TOptional<alepha23.TString>;
1668
1559
  }>;
1669
1560
  type IdentityQuery = Static<typeof identityQuerySchema>;
1670
1561
  //#endregion
1671
1562
  //#region ../../src/api/users/services/IdentityService.d.ts
1672
1563
  declare class IdentityService {
1673
1564
  protected readonly log: alepha_logger5.Logger;
1674
- protected readonly userRealmProvider: UserRealmProvider;
1565
+ protected readonly realmProvider: RealmProvider;
1675
1566
  protected readonly auditService: AuditService;
1676
- identities(userRealmName?: string): alepha_orm0.Repository<alepha1.TObject<{
1677
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1678
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1679
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1680
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1681
- userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1682
- password: alepha1.TOptional<alepha1.TString>;
1683
- provider: alepha1.TString;
1684
- providerUserId: alepha1.TOptional<alepha1.TString>;
1685
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1567
+ identities(userRealmName?: string): alepha_orm24.Repository<alepha23.TObject<{
1568
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1569
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1570
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1571
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1572
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1573
+ password: alepha23.TOptional<alepha23.TString>;
1574
+ provider: alepha23.TString;
1575
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1576
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1686
1577
  }>>;
1687
1578
  /**
1688
- * Find identities with pagination and filtering.
1689
- */
1579
+ * Find identities with pagination and filtering.
1580
+ */
1690
1581
  findIdentities(q?: IdentityQuery, userRealmName?: string): Promise<Page$1<IdentityEntity>>;
1691
1582
  /**
1692
- * Get an identity by ID.
1693
- */
1583
+ * Get an identity by ID.
1584
+ */
1694
1585
  getIdentityById(id: string, userRealmName?: string): Promise<IdentityEntity>;
1695
1586
  /**
1696
- * Delete an identity by ID.
1697
- */
1587
+ * Delete an identity by ID.
1588
+ */
1698
1589
  deleteIdentity(id: string, userRealmName?: string): Promise<void>;
1699
1590
  }
1700
1591
  //#endregion
@@ -1704,106 +1595,106 @@ declare class AdminIdentityController {
1704
1595
  protected readonly group = "admin:identities";
1705
1596
  protected readonly identityService: IdentityService;
1706
1597
  /**
1707
- * Find identities with pagination and filtering.
1708
- */
1598
+ * Find identities with pagination and filtering.
1599
+ */
1709
1600
  readonly findIdentities: alepha_server0.ActionPrimitiveFn<{
1710
- query: alepha1.TObject<{
1711
- page: alepha1.TOptional<alepha1.TInteger>;
1712
- size: alepha1.TOptional<alepha1.TInteger>;
1713
- sort: alepha1.TOptional<alepha1.TString>;
1714
- userId: alepha1.TOptional<alepha1.TString>;
1715
- provider: alepha1.TOptional<alepha1.TString>;
1716
- userRealmName: alepha1.TOptional<alepha1.TString>;
1601
+ query: alepha23.TObject<{
1602
+ page: alepha23.TOptional<alepha23.TInteger>;
1603
+ size: alepha23.TOptional<alepha23.TInteger>;
1604
+ sort: alepha23.TOptional<alepha23.TString>;
1605
+ userId: alepha23.TOptional<alepha23.TString>;
1606
+ provider: alepha23.TOptional<alepha23.TString>;
1607
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1717
1608
  }>;
1718
- response: alepha1.TPage<alepha1.TObject<{
1719
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
1720
- provider: alepha1.TString;
1721
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1722
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1723
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1724
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1725
- providerUserId: alepha1.TOptional<alepha1.TString>;
1726
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1609
+ response: alepha23.TPage<alepha23.TObject<{
1610
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1611
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1612
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1613
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1614
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
1615
+ provider: alepha23.TString;
1616
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1617
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1727
1618
  }>>;
1728
1619
  }>;
1729
1620
  /**
1730
- * Get an identity by ID.
1731
- */
1621
+ * Get an identity by ID.
1622
+ */
1732
1623
  readonly getIdentity: alepha_server0.ActionPrimitiveFn<{
1733
- params: alepha1.TObject<{
1734
- id: alepha1.TString;
1624
+ params: alepha23.TObject<{
1625
+ id: alepha23.TString;
1735
1626
  }>;
1736
- query: alepha1.TObject<{
1737
- userRealmName: alepha1.TOptional<alepha1.TString>;
1627
+ query: alepha23.TObject<{
1628
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1738
1629
  }>;
1739
- response: alepha1.TObject<{
1740
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
1741
- provider: alepha1.TString;
1742
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1743
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1744
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1745
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1746
- providerUserId: alepha1.TOptional<alepha1.TString>;
1747
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
1630
+ response: alepha23.TObject<{
1631
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1632
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1633
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1634
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1635
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
1636
+ provider: alepha23.TString;
1637
+ providerUserId: alepha23.TOptional<alepha23.TString>;
1638
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
1748
1639
  }>;
1749
1640
  }>;
1750
1641
  /**
1751
- * Delete an identity.
1752
- */
1642
+ * Delete an identity.
1643
+ */
1753
1644
  readonly deleteIdentity: alepha_server0.ActionPrimitiveFn<{
1754
- params: alepha1.TObject<{
1755
- id: alepha1.TString;
1645
+ params: alepha23.TObject<{
1646
+ id: alepha23.TString;
1756
1647
  }>;
1757
- query: alepha1.TObject<{
1758
- userRealmName: alepha1.TOptional<alepha1.TString>;
1648
+ query: alepha23.TObject<{
1649
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1759
1650
  }>;
1760
- response: alepha1.TObject<{
1761
- ok: alepha1.TBoolean;
1762
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
1763
- count: alepha1.TOptional<alepha1.TNumber>;
1651
+ response: alepha23.TObject<{
1652
+ ok: alepha23.TBoolean;
1653
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
1654
+ count: alepha23.TOptional<alepha23.TNumber>;
1764
1655
  }>;
1765
1656
  }>;
1766
1657
  }
1767
1658
  //#endregion
1768
1659
  //#region ../../src/api/users/schemas/sessionQuerySchema.d.ts
1769
- declare const sessionQuerySchema: alepha1.TObject<{
1770
- page: alepha1.TOptional<alepha1.TInteger>;
1771
- size: alepha1.TOptional<alepha1.TInteger>;
1772
- sort: alepha1.TOptional<alepha1.TString>;
1773
- userId: alepha1.TOptional<alepha1.TString>;
1660
+ declare const sessionQuerySchema: alepha23.TObject<{
1661
+ page: alepha23.TOptional<alepha23.TInteger>;
1662
+ size: alepha23.TOptional<alepha23.TInteger>;
1663
+ sort: alepha23.TOptional<alepha23.TString>;
1664
+ userId: alepha23.TOptional<alepha23.TString>;
1774
1665
  }>;
1775
1666
  type SessionQuery = Static<typeof sessionQuerySchema>;
1776
1667
  //#endregion
1777
1668
  //#region ../../src/api/users/services/SessionCrudService.d.ts
1778
1669
  declare class SessionCrudService {
1779
1670
  protected readonly log: alepha_logger5.Logger;
1780
- protected readonly userRealmProvider: UserRealmProvider;
1781
- sessions(userRealmName?: string): alepha_orm0.Repository<alepha1.TObject<{
1782
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1783
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1784
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1785
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1786
- refreshToken: alepha1.TString;
1787
- userId: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_REF>;
1788
- expiresAt: alepha1.TString;
1789
- ip: alepha1.TOptional<alepha1.TString>;
1790
- userAgent: alepha1.TOptional<alepha1.TObject<{
1791
- os: alepha1.TString;
1792
- browser: alepha1.TString;
1793
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1671
+ protected readonly realmProvider: RealmProvider;
1672
+ sessions(userRealmName?: string): alepha_orm24.Repository<alepha23.TObject<{
1673
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1674
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1675
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1676
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1677
+ refreshToken: alepha23.TString;
1678
+ userId: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_REF>;
1679
+ expiresAt: alepha23.TString;
1680
+ ip: alepha23.TOptional<alepha23.TString>;
1681
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1682
+ os: alepha23.TString;
1683
+ browser: alepha23.TString;
1684
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1794
1685
  }>>;
1795
1686
  }>>;
1796
1687
  /**
1797
- * Find sessions with pagination and filtering.
1798
- */
1688
+ * Find sessions with pagination and filtering.
1689
+ */
1799
1690
  findSessions(q?: SessionQuery, userRealmName?: string): Promise<Page$1<SessionEntity>>;
1800
1691
  /**
1801
- * Get a session by ID.
1802
- */
1692
+ * Get a session by ID.
1693
+ */
1803
1694
  getSessionById(id: string, userRealmName?: string): Promise<SessionEntity>;
1804
1695
  /**
1805
- * Delete a session by ID.
1806
- */
1696
+ * Delete a session by ID.
1697
+ */
1807
1698
  deleteSession(id: string, userRealmName?: string): Promise<void>;
1808
1699
  }
1809
1700
  //#endregion
@@ -1813,208 +1704,208 @@ declare class AdminSessionController {
1813
1704
  protected readonly group = "admin:sessions";
1814
1705
  protected readonly sessionService: SessionCrudService;
1815
1706
  /**
1816
- * Find sessions with pagination and filtering.
1817
- */
1707
+ * Find sessions with pagination and filtering.
1708
+ */
1818
1709
  readonly findSessions: alepha_server0.ActionPrimitiveFn<{
1819
- query: alepha1.TObject<{
1820
- page: alepha1.TOptional<alepha1.TInteger>;
1821
- size: alepha1.TOptional<alepha1.TInteger>;
1822
- sort: alepha1.TOptional<alepha1.TString>;
1823
- userId: alepha1.TOptional<alepha1.TString>;
1824
- userRealmName: alepha1.TOptional<alepha1.TString>;
1710
+ query: alepha23.TObject<{
1711
+ page: alepha23.TOptional<alepha23.TInteger>;
1712
+ size: alepha23.TOptional<alepha23.TInteger>;
1713
+ sort: alepha23.TOptional<alepha23.TString>;
1714
+ userId: alepha23.TOptional<alepha23.TString>;
1715
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1825
1716
  }>;
1826
- response: alepha1.TPage<alepha1.TObject<{
1827
- id: alepha1.TString;
1828
- version: alepha1.TNumber;
1829
- createdAt: alepha1.TString;
1830
- updatedAt: alepha1.TString;
1831
- refreshToken: alepha1.TString;
1832
- userId: alepha1.TString;
1833
- expiresAt: alepha1.TString;
1834
- ip: alepha1.TOptional<alepha1.TString>;
1835
- userAgent: alepha1.TOptional<alepha1.TObject<{
1836
- os: alepha1.TString;
1837
- browser: alepha1.TString;
1838
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1717
+ response: alepha23.TPage<alepha23.TObject<{
1718
+ id: alepha23.TString;
1719
+ version: alepha23.TNumber;
1720
+ createdAt: alepha23.TString;
1721
+ updatedAt: alepha23.TString;
1722
+ refreshToken: alepha23.TString;
1723
+ userId: alepha23.TString;
1724
+ expiresAt: alepha23.TString;
1725
+ ip: alepha23.TOptional<alepha23.TString>;
1726
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1727
+ os: alepha23.TString;
1728
+ browser: alepha23.TString;
1729
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1839
1730
  }>>;
1840
1731
  }>>;
1841
1732
  }>;
1842
1733
  /**
1843
- * Get a session by ID.
1844
- */
1734
+ * Get a session by ID.
1735
+ */
1845
1736
  readonly getSession: alepha_server0.ActionPrimitiveFn<{
1846
- params: alepha1.TObject<{
1847
- id: alepha1.TString;
1737
+ params: alepha23.TObject<{
1738
+ id: alepha23.TString;
1848
1739
  }>;
1849
- query: alepha1.TObject<{
1850
- userRealmName: alepha1.TOptional<alepha1.TString>;
1740
+ query: alepha23.TObject<{
1741
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1851
1742
  }>;
1852
- response: alepha1.TObject<{
1853
- id: alepha1.TString;
1854
- version: alepha1.TNumber;
1855
- createdAt: alepha1.TString;
1856
- updatedAt: alepha1.TString;
1857
- refreshToken: alepha1.TString;
1858
- userId: alepha1.TString;
1859
- expiresAt: alepha1.TString;
1860
- ip: alepha1.TOptional<alepha1.TString>;
1861
- userAgent: alepha1.TOptional<alepha1.TObject<{
1862
- os: alepha1.TString;
1863
- browser: alepha1.TString;
1864
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1743
+ response: alepha23.TObject<{
1744
+ id: alepha23.TString;
1745
+ version: alepha23.TNumber;
1746
+ createdAt: alepha23.TString;
1747
+ updatedAt: alepha23.TString;
1748
+ refreshToken: alepha23.TString;
1749
+ userId: alepha23.TString;
1750
+ expiresAt: alepha23.TString;
1751
+ ip: alepha23.TOptional<alepha23.TString>;
1752
+ userAgent: alepha23.TOptional<alepha23.TObject<{
1753
+ os: alepha23.TString;
1754
+ browser: alepha23.TString;
1755
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
1865
1756
  }>>;
1866
1757
  }>;
1867
1758
  }>;
1868
1759
  /**
1869
- * Delete a session.
1870
- */
1760
+ * Delete a session.
1761
+ */
1871
1762
  readonly deleteSession: alepha_server0.ActionPrimitiveFn<{
1872
- params: alepha1.TObject<{
1873
- id: alepha1.TString;
1763
+ params: alepha23.TObject<{
1764
+ id: alepha23.TString;
1874
1765
  }>;
1875
- query: alepha1.TObject<{
1876
- userRealmName: alepha1.TOptional<alepha1.TString>;
1766
+ query: alepha23.TObject<{
1767
+ userRealmName: alepha23.TOptional<alepha23.TString>;
1877
1768
  }>;
1878
- response: alepha1.TObject<{
1879
- ok: alepha1.TBoolean;
1880
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
1881
- count: alepha1.TOptional<alepha1.TNumber>;
1769
+ response: alepha23.TObject<{
1770
+ ok: alepha23.TBoolean;
1771
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
1772
+ count: alepha23.TOptional<alepha23.TNumber>;
1882
1773
  }>;
1883
1774
  }>;
1884
1775
  }
1885
1776
  //#endregion
1886
1777
  //#region ../../src/api/users/notifications/UserNotifications.d.ts
1887
1778
  declare class UserNotifications {
1888
- readonly passwordReset: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1889
- email: alepha1.TString;
1890
- code: alepha1.TString;
1891
- expiresInMinutes: alepha1.TNumber;
1779
+ readonly passwordReset: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1780
+ email: alepha23.TString;
1781
+ code: alepha23.TString;
1782
+ expiresInMinutes: alepha23.TNumber;
1892
1783
  }>>;
1893
- readonly emailVerification: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1894
- email: alepha1.TString;
1895
- code: alepha1.TString;
1896
- expiresInMinutes: alepha1.TNumber;
1784
+ readonly emailVerification: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1785
+ email: alepha23.TString;
1786
+ code: alepha23.TString;
1787
+ expiresInMinutes: alepha23.TNumber;
1897
1788
  }>>;
1898
- readonly phoneVerification: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1899
- phoneNumber: alepha1.TString;
1900
- code: alepha1.TString;
1901
- expiresInMinutes: alepha1.TNumber;
1789
+ readonly phoneVerification: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1790
+ phoneNumber: alepha23.TString;
1791
+ code: alepha23.TString;
1792
+ expiresInMinutes: alepha23.TNumber;
1902
1793
  }>>;
1903
- readonly passwordResetLink: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1904
- email: alepha1.TString;
1905
- resetUrl: alepha1.TString;
1906
- expiresInMinutes: alepha1.TNumber;
1794
+ readonly passwordResetLink: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1795
+ email: alepha23.TString;
1796
+ resetUrl: alepha23.TString;
1797
+ expiresInMinutes: alepha23.TNumber;
1907
1798
  }>>;
1908
- readonly emailVerificationLink: alepha_api_notifications0.NotificationPrimitive<alepha1.TObject<{
1909
- email: alepha1.TString;
1910
- verifyUrl: alepha1.TString;
1911
- expiresInMinutes: alepha1.TNumber;
1799
+ readonly emailVerificationLink: alepha_api_notifications0.NotificationPrimitive<alepha23.TObject<{
1800
+ email: alepha23.TString;
1801
+ verifyUrl: alepha23.TString;
1802
+ expiresInMinutes: alepha23.TNumber;
1912
1803
  }>>;
1913
1804
  }
1914
1805
  //#endregion
1915
1806
  //#region ../../src/api/users/schemas/createUserSchema.d.ts
1916
- declare const createUserSchema: alepha1.TObject<{
1917
- id: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
1918
- version: alepha1.TOptional<PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
1919
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1920
- createdAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
1921
- updatedAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
1922
- username: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1923
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1924
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
1925
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1926
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1927
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1928
- enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1929
- emailVerified: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1807
+ declare const createUserSchema: alepha23.TObject<{
1808
+ id: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
1809
+ version: alepha23.TOptional<PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
1810
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1811
+ createdAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
1812
+ updatedAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
1813
+ username: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1814
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1815
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
1816
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1817
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1818
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1819
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
1820
+ emailVerified: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
1930
1821
  }>;
1931
1822
  type CreateUser = Static<typeof createUserSchema>;
1932
1823
  //#endregion
1933
1824
  //#region ../../src/api/users/schemas/updateUserSchema.d.ts
1934
- declare const updateUserSchema: alepha1.TObject<{
1935
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1936
- realm: alepha1.TOptional<PgAttr<alepha1.TString, typeof PG_DEFAULT>>;
1937
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1938
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
1939
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1940
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1941
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
1942
- enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1825
+ declare const updateUserSchema: alepha23.TObject<{
1826
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1827
+ realm: alepha23.TOptional<PgAttr<alepha23.TString, typeof PG_DEFAULT>>;
1828
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1829
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
1830
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1831
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1832
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1833
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
1943
1834
  }>;
1944
1835
  type UpdateUser = Static<typeof updateUserSchema>;
1945
1836
  //#endregion
1946
1837
  //#region ../../src/api/users/schemas/userQuerySchema.d.ts
1947
- declare const userQuerySchema: alepha1.TObject<{
1948
- page: alepha1.TOptional<alepha1.TInteger>;
1949
- size: alepha1.TOptional<alepha1.TInteger>;
1950
- sort: alepha1.TOptional<alepha1.TString>;
1951
- email: alepha1.TOptional<alepha1.TString>;
1952
- enabled: alepha1.TOptional<alepha1.TBoolean>;
1953
- emailVerified: alepha1.TOptional<alepha1.TBoolean>;
1954
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
1955
- query: alepha1.TOptional<alepha1.TString>;
1838
+ declare const userQuerySchema: alepha23.TObject<{
1839
+ page: alepha23.TOptional<alepha23.TInteger>;
1840
+ size: alepha23.TOptional<alepha23.TInteger>;
1841
+ sort: alepha23.TOptional<alepha23.TString>;
1842
+ email: alepha23.TOptional<alepha23.TString>;
1843
+ enabled: alepha23.TOptional<alepha23.TBoolean>;
1844
+ emailVerified: alepha23.TOptional<alepha23.TBoolean>;
1845
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
1846
+ query: alepha23.TOptional<alepha23.TString>;
1956
1847
  }>;
1957
1848
  type UserQuery = Static<typeof userQuerySchema>;
1958
1849
  //#endregion
1959
1850
  //#region ../../src/api/users/services/UserService.d.ts
1960
1851
  declare class UserService {
1961
1852
  protected readonly log: alepha_logger5.Logger;
1962
- protected readonly verificationController: alepha_server_links2.HttpVirtualClient<VerificationController>;
1853
+ protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
1963
1854
  protected readonly userNotifications: UserNotifications;
1964
- protected readonly userRealmProvider: UserRealmProvider;
1855
+ protected readonly realmProvider: RealmProvider;
1965
1856
  protected readonly auditService: AuditService;
1966
- users(userRealmName?: string): alepha_orm0.Repository<alepha1.TObject<{
1967
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
1968
- version: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TInteger, typeof alepha_orm0.PG_VERSION>, typeof alepha_orm0.PG_DEFAULT>;
1969
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1970
- updatedAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_UPDATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
1971
- realm: alepha_orm0.PgAttr<alepha1.TString, typeof alepha_orm0.PG_DEFAULT>;
1972
- username: alepha1.TOptional<alepha1.TString>;
1973
- email: alepha1.TOptional<alepha1.TString>;
1974
- phoneNumber: alepha1.TOptional<alepha1.TString>;
1975
- roles: alepha_orm0.PgAttr<alepha1.TArray<alepha1.TString>, typeof alepha_orm0.PG_DEFAULT>;
1976
- firstName: alepha1.TOptional<alepha1.TString>;
1977
- lastName: alepha1.TOptional<alepha1.TString>;
1978
- picture: alepha1.TOptional<alepha1.TString>;
1979
- enabled: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1980
- emailVerified: alepha_orm0.PgAttr<alepha1.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
1857
+ users(userRealmName?: string): alepha_orm24.Repository<alepha23.TObject<{
1858
+ id: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_PRIMARY_KEY>, typeof alepha_orm24.PG_DEFAULT>;
1859
+ version: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TInteger, typeof alepha_orm24.PG_VERSION>, typeof alepha_orm24.PG_DEFAULT>;
1860
+ createdAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_CREATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1861
+ updatedAt: alepha_orm24.PgAttr<alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_UPDATED_AT>, typeof alepha_orm24.PG_DEFAULT>;
1862
+ realm: alepha_orm24.PgAttr<alepha23.TString, typeof alepha_orm24.PG_DEFAULT>;
1863
+ username: alepha23.TOptional<alepha23.TString>;
1864
+ email: alepha23.TOptional<alepha23.TString>;
1865
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1866
+ roles: alepha_orm24.PgAttr<alepha23.TArray<alepha23.TString>, typeof alepha_orm24.PG_DEFAULT>;
1867
+ firstName: alepha23.TOptional<alepha23.TString>;
1868
+ lastName: alepha23.TOptional<alepha23.TString>;
1869
+ picture: alepha23.TOptional<alepha23.TString>;
1870
+ enabled: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1871
+ emailVerified: alepha_orm24.PgAttr<alepha23.TBoolean, typeof alepha_orm24.PG_DEFAULT>;
1981
1872
  }>>;
1982
1873
  /**
1983
- * Request email verification for a user.
1984
- * @param email - The email address to verify.
1985
- * @param userRealmName - Optional realm name.
1986
- * @param method - The verification method: "code" (default) or "link".
1987
- * @param verifyUrl - Base URL for verification link (required when method is "link").
1988
- */
1874
+ * Request email verification for a user.
1875
+ * @param email - The email address to verify.
1876
+ * @param userRealmName - Optional realm name.
1877
+ * @param method - The verification method: "code" (default) or "link".
1878
+ * @param verifyUrl - Base URL for verification link (required when method is "link").
1879
+ */
1989
1880
  requestEmailVerification(email: string, userRealmName?: string, method?: "code" | "link", verifyUrl?: string): Promise<boolean>;
1990
1881
  /**
1991
- * Verify a user's email using a valid verification token.
1992
- * Supports both code (6-digit) and link (UUID) verification tokens.
1993
- */
1882
+ * Verify a user's email using a valid verification token.
1883
+ * Supports both code (6-digit) and link (UUID) verification tokens.
1884
+ */
1994
1885
  verifyEmail(email: string, token: string, userRealmName?: string): Promise<void>;
1995
1886
  /**
1996
- * Check if an email is verified.
1997
- */
1887
+ * Check if an email is verified.
1888
+ */
1998
1889
  isEmailVerified(email: string, userRealmName?: string): Promise<boolean>;
1999
1890
  /**
2000
- * Find users with pagination and filtering.
2001
- */
1891
+ * Find users with pagination and filtering.
1892
+ */
2002
1893
  findUsers(q?: UserQuery, userRealmName?: string): Promise<Page$1<UserEntity>>;
2003
1894
  /**
2004
- * Get a user by ID.
2005
- */
1895
+ * Get a user by ID.
1896
+ */
2006
1897
  getUserById(id: string, userRealmName?: string): Promise<UserEntity>;
2007
1898
  /**
2008
- * Create a new user.
2009
- */
1899
+ * Create a new user.
1900
+ */
2010
1901
  createUser(data: CreateUser, userRealmName?: string): Promise<UserEntity>;
2011
1902
  /**
2012
- * Update an existing user.
2013
- */
1903
+ * Update an existing user.
1904
+ */
2014
1905
  updateUser(id: string, data: UpdateUser, userRealmName?: string): Promise<UserEntity>;
2015
1906
  /**
2016
- * Delete a user by ID.
2017
- */
1907
+ * Delete a user by ID.
1908
+ */
2018
1909
  deleteUser(id: string, userRealmName?: string): Promise<void>;
2019
1910
  }
2020
1911
  //#endregion
@@ -2024,154 +1915,218 @@ declare class AdminUserController {
2024
1915
  protected readonly group = "admin:users";
2025
1916
  protected readonly userService: UserService;
2026
1917
  /**
2027
- * Find users with pagination and filtering.
2028
- */
1918
+ * Find users with pagination and filtering.
1919
+ */
2029
1920
  readonly findUsers: alepha_server0.ActionPrimitiveFn<{
2030
- query: alepha1.TObject<{
2031
- page: alepha1.TOptional<alepha1.TInteger>;
2032
- size: alepha1.TOptional<alepha1.TInteger>;
2033
- sort: alepha1.TOptional<alepha1.TString>;
2034
- email: alepha1.TOptional<alepha1.TString>;
2035
- enabled: alepha1.TOptional<alepha1.TBoolean>;
2036
- emailVerified: alepha1.TOptional<alepha1.TBoolean>;
2037
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2038
- query: alepha1.TOptional<alepha1.TString>;
2039
- userRealmName: alepha1.TOptional<alepha1.TString>;
1921
+ query: alepha23.TObject<{
1922
+ page: alepha23.TOptional<alepha23.TInteger>;
1923
+ size: alepha23.TOptional<alepha23.TInteger>;
1924
+ sort: alepha23.TOptional<alepha23.TString>;
1925
+ email: alepha23.TOptional<alepha23.TString>;
1926
+ enabled: alepha23.TOptional<alepha23.TBoolean>;
1927
+ emailVerified: alepha23.TOptional<alepha23.TBoolean>;
1928
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
1929
+ query: alepha23.TOptional<alepha23.TString>;
1930
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2040
1931
  }>;
2041
- response: alepha1.TPage<alepha1.TObject<{
2042
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2043
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2044
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2045
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2046
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2047
- username: alepha1.TOptional<alepha1.TString>;
2048
- email: alepha1.TOptional<alepha1.TString>;
2049
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2050
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2051
- firstName: alepha1.TOptional<alepha1.TString>;
2052
- lastName: alepha1.TOptional<alepha1.TString>;
2053
- picture: alepha1.TOptional<alepha1.TString>;
2054
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2055
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
1932
+ response: alepha23.TPage<alepha23.TObject<{
1933
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1934
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1935
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1936
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1937
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
1938
+ username: alepha23.TOptional<alepha23.TString>;
1939
+ email: alepha23.TOptional<alepha23.TString>;
1940
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1941
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
1942
+ firstName: alepha23.TOptional<alepha23.TString>;
1943
+ lastName: alepha23.TOptional<alepha23.TString>;
1944
+ picture: alepha23.TOptional<alepha23.TString>;
1945
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
1946
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2056
1947
  }>>;
2057
1948
  }>;
2058
1949
  /**
2059
- * Get a user by ID.
2060
- */
1950
+ * Get a user by ID.
1951
+ */
2061
1952
  readonly getUser: alepha_server0.ActionPrimitiveFn<{
2062
- params: alepha1.TObject<{
2063
- id: alepha1.TString;
1953
+ params: alepha23.TObject<{
1954
+ id: alepha23.TString;
2064
1955
  }>;
2065
- query: alepha1.TObject<{
2066
- userRealmName: alepha1.TOptional<alepha1.TString>;
1956
+ query: alepha23.TObject<{
1957
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2067
1958
  }>;
2068
- response: alepha1.TObject<{
2069
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2070
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2071
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2072
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2073
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2074
- username: alepha1.TOptional<alepha1.TString>;
2075
- email: alepha1.TOptional<alepha1.TString>;
2076
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2077
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2078
- firstName: alepha1.TOptional<alepha1.TString>;
2079
- lastName: alepha1.TOptional<alepha1.TString>;
2080
- picture: alepha1.TOptional<alepha1.TString>;
2081
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2082
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
1959
+ response: alepha23.TObject<{
1960
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1961
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
1962
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1963
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1964
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
1965
+ username: alepha23.TOptional<alepha23.TString>;
1966
+ email: alepha23.TOptional<alepha23.TString>;
1967
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
1968
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
1969
+ firstName: alepha23.TOptional<alepha23.TString>;
1970
+ lastName: alepha23.TOptional<alepha23.TString>;
1971
+ picture: alepha23.TOptional<alepha23.TString>;
1972
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
1973
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2083
1974
  }>;
2084
1975
  }>;
2085
1976
  /**
2086
- * Create a new user.
2087
- */
1977
+ * Create a new user.
1978
+ */
2088
1979
  readonly createUser: alepha_server0.ActionPrimitiveFn<{
2089
- query: alepha1.TObject<{
2090
- userRealmName: alepha1.TOptional<alepha1.TString>;
1980
+ query: alepha23.TObject<{
1981
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2091
1982
  }>;
2092
- body: alepha1.TObject<{
2093
- id: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
2094
- version: alepha1.TOptional<PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
2095
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2096
- createdAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
2097
- updatedAt: alepha1.TOptional<PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
2098
- username: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2099
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2100
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2101
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2102
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2103
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2104
- enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2105
- emailVerified: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
1983
+ body: alepha23.TObject<{
1984
+ id: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>>;
1985
+ version: alepha23.TOptional<PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>>;
1986
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1987
+ createdAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>>;
1988
+ updatedAt: alepha23.TOptional<PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>>;
1989
+ username: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1990
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1991
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
1992
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1993
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1994
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
1995
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
1996
+ emailVerified: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2106
1997
  }>;
2107
- response: alepha1.TObject<{
2108
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2109
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2110
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2111
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2112
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2113
- username: alepha1.TOptional<alepha1.TString>;
2114
- email: alepha1.TOptional<alepha1.TString>;
2115
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2116
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2117
- firstName: alepha1.TOptional<alepha1.TString>;
2118
- lastName: alepha1.TOptional<alepha1.TString>;
2119
- picture: alepha1.TOptional<alepha1.TString>;
2120
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2121
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
1998
+ response: alepha23.TObject<{
1999
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2000
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2001
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2002
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2003
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2004
+ username: alepha23.TOptional<alepha23.TString>;
2005
+ email: alepha23.TOptional<alepha23.TString>;
2006
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2007
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2008
+ firstName: alepha23.TOptional<alepha23.TString>;
2009
+ lastName: alepha23.TOptional<alepha23.TString>;
2010
+ picture: alepha23.TOptional<alepha23.TString>;
2011
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2012
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2122
2013
  }>;
2123
2014
  }>;
2124
2015
  /**
2125
- * Update a user.
2126
- */
2016
+ * Update a user.
2017
+ */
2127
2018
  readonly updateUser: alepha_server0.ActionPrimitiveFn<{
2128
- params: alepha1.TObject<{
2129
- id: alepha1.TString;
2019
+ params: alepha23.TObject<{
2020
+ id: alepha23.TString;
2130
2021
  }>;
2131
- query: alepha1.TObject<{
2132
- userRealmName: alepha1.TOptional<alepha1.TString>;
2022
+ query: alepha23.TObject<{
2023
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2133
2024
  }>;
2134
- body: alepha1.TObject<{
2135
- email: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2136
- realm: alepha1.TOptional<PgAttr<alepha1.TString, typeof PG_DEFAULT>>;
2137
- phoneNumber: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2138
- roles: alepha1.TOptional<alepha1.TArray<alepha1.TString>>;
2139
- firstName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2140
- lastName: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2141
- picture: alepha1.TOptional<alepha1.TOptional<alepha1.TString>>;
2142
- enabled: alepha1.TOptional<PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>>;
2025
+ body: alepha23.TObject<{
2026
+ email: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2027
+ realm: alepha23.TOptional<PgAttr<alepha23.TString, typeof PG_DEFAULT>>;
2028
+ phoneNumber: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2029
+ roles: alepha23.TOptional<alepha23.TArray<alepha23.TString>>;
2030
+ firstName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2031
+ lastName: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2032
+ picture: alepha23.TOptional<alepha23.TOptional<alepha23.TString>>;
2033
+ enabled: alepha23.TOptional<PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>>;
2143
2034
  }>;
2144
- response: alepha1.TObject<{
2145
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2146
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2147
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2148
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2149
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2150
- username: alepha1.TOptional<alepha1.TString>;
2151
- email: alepha1.TOptional<alepha1.TString>;
2152
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2153
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2154
- firstName: alepha1.TOptional<alepha1.TString>;
2155
- lastName: alepha1.TOptional<alepha1.TString>;
2156
- picture: alepha1.TOptional<alepha1.TString>;
2157
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2158
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2035
+ response: alepha23.TObject<{
2036
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2037
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2038
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2039
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2040
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2041
+ username: alepha23.TOptional<alepha23.TString>;
2042
+ email: alepha23.TOptional<alepha23.TString>;
2043
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2044
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2045
+ firstName: alepha23.TOptional<alepha23.TString>;
2046
+ lastName: alepha23.TOptional<alepha23.TString>;
2047
+ picture: alepha23.TOptional<alepha23.TString>;
2048
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2049
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2159
2050
  }>;
2160
2051
  }>;
2161
2052
  /**
2162
- * Delete a user.
2163
- */
2053
+ * Delete a user.
2054
+ */
2164
2055
  readonly deleteUser: alepha_server0.ActionPrimitiveFn<{
2165
- params: alepha1.TObject<{
2166
- id: alepha1.TString;
2056
+ params: alepha23.TObject<{
2057
+ id: alepha23.TString;
2167
2058
  }>;
2168
- query: alepha1.TObject<{
2169
- userRealmName: alepha1.TOptional<alepha1.TString>;
2059
+ query: alepha23.TObject<{
2060
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2170
2061
  }>;
2171
- response: alepha1.TObject<{
2172
- ok: alepha1.TBoolean;
2173
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
2174
- count: alepha1.TOptional<alepha1.TNumber>;
2062
+ response: alepha23.TObject<{
2063
+ ok: alepha23.TBoolean;
2064
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
2065
+ count: alepha23.TOptional<alepha23.TNumber>;
2066
+ }>;
2067
+ }>;
2068
+ }
2069
+ //#endregion
2070
+ //#region ../../src/api/users/controllers/RealmController.d.ts
2071
+ /**
2072
+ * Controller for exposing realm configuration.
2073
+ * Uses $route instead of $action to keep endpoints hidden from API documentation.
2074
+ */
2075
+ declare class RealmController {
2076
+ protected readonly url = "/realms";
2077
+ protected readonly group = "realms";
2078
+ protected readonly realmProvider: RealmProvider;
2079
+ protected readonly serverAuthProvider: ServerAuthProvider;
2080
+ /**
2081
+ * Get realm configuration settings.
2082
+ * This endpoint is not exposed in the API documentation.
2083
+ */
2084
+ readonly getRealmConfig: alepha_server0.ActionPrimitiveFn<{
2085
+ query: alepha23.TObject<{
2086
+ realmName: alepha23.TOptional<alepha23.TString>;
2087
+ }>;
2088
+ response: alepha23.TObject<{
2089
+ settings: alepha23.TObject<{
2090
+ displayName: alepha23.TOptional<alepha23.TString>;
2091
+ description: alepha23.TOptional<alepha23.TString>;
2092
+ logoUrl: alepha23.TOptional<alepha23.TString>;
2093
+ registrationAllowed: alepha23.TBoolean;
2094
+ emailEnabled: alepha23.TBoolean;
2095
+ emailRequired: alepha23.TBoolean;
2096
+ usernameEnabled: alepha23.TBoolean;
2097
+ usernameRequired: alepha23.TBoolean;
2098
+ usernameRegExp: alepha23.TString;
2099
+ phoneEnabled: alepha23.TBoolean;
2100
+ phoneRequired: alepha23.TBoolean;
2101
+ verifyEmailRequired: alepha23.TBoolean;
2102
+ verifyPhoneRequired: alepha23.TBoolean;
2103
+ firstNameLastNameEnabled: alepha23.TBoolean;
2104
+ firstNameLastNameRequired: alepha23.TBoolean;
2105
+ resetPasswordAllowed: alepha23.TBoolean;
2106
+ passwordPolicy: alepha23.TObject<{
2107
+ minLength: alepha23.TInteger;
2108
+ requireUppercase: alepha23.TBoolean;
2109
+ requireLowercase: alepha23.TBoolean;
2110
+ requireNumbers: alepha23.TBoolean;
2111
+ requireSpecialCharacters: alepha23.TBoolean;
2112
+ }>;
2113
+ }>;
2114
+ realmName: alepha23.TString;
2115
+ authenticationMethods: alepha23.TArray<alepha23.TObject<{
2116
+ name: alepha23.TString;
2117
+ type: alepha23.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2118
+ }>>;
2119
+ }>;
2120
+ }>;
2121
+ readonly checkUsernameAvailability: alepha_server0.ActionPrimitiveFn<{
2122
+ query: alepha23.TObject<{
2123
+ realmName: alepha23.TOptional<alepha23.TString>;
2124
+ }>;
2125
+ body: alepha23.TObject<{
2126
+ username: alepha23.TString;
2127
+ }>;
2128
+ response: alepha23.TObject<{
2129
+ available: alepha23.TBoolean;
2175
2130
  }>;
2176
2131
  }>;
2177
2132
  }
@@ -2183,10 +2138,10 @@ declare class AdminUserController {
2183
2138
  * Requires the intent ID from Phase 1, the verification code,
2184
2139
  * and the new password.
2185
2140
  */
2186
- declare const completePasswordResetRequestSchema: alepha1.TObject<{
2187
- intentId: alepha1.TString;
2188
- code: alepha1.TString;
2189
- newPassword: alepha1.TString;
2141
+ declare const completePasswordResetRequestSchema: alepha23.TObject<{
2142
+ intentId: alepha23.TString;
2143
+ code: alepha23.TString;
2144
+ newPassword: alepha23.TString;
2190
2145
  }>;
2191
2146
  type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSchema>;
2192
2147
  //#endregion
@@ -2197,9 +2152,9 @@ type CompletePasswordResetRequest = Static<typeof completePasswordResetRequestSc
2197
2152
  * Contains the intent ID needed for Phase 2 completion,
2198
2153
  * along with expiration time.
2199
2154
  */
2200
- declare const passwordResetIntentResponseSchema: alepha1.TObject<{
2201
- intentId: alepha1.TString;
2202
- expiresAt: alepha1.TString;
2155
+ declare const passwordResetIntentResponseSchema: alepha23.TObject<{
2156
+ intentId: alepha23.TString;
2157
+ expiresAt: alepha23.TString;
2203
2158
  }>;
2204
2159
  type PasswordResetIntentResponse = Static<typeof passwordResetIntentResponseSchema>;
2205
2160
  //#endregion
@@ -2218,93 +2173,93 @@ declare class CredentialService {
2218
2173
  protected readonly log: alepha_logger5.Logger;
2219
2174
  protected readonly cryptoProvider: CryptoProvider;
2220
2175
  protected readonly dateTimeProvider: DateTimeProvider;
2221
- protected readonly verificationController: alepha_server_links2.HttpVirtualClient<VerificationController>;
2176
+ protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2222
2177
  protected readonly userNotifications: UserNotifications;
2223
- protected readonly userRealmProvider: UserRealmProvider;
2178
+ protected readonly realmProvider: RealmProvider;
2224
2179
  protected readonly auditService: AuditService;
2225
2180
  protected readonly intentCache: alepha_cache0.CachePrimitiveFn<PasswordResetIntent, any[]>;
2226
- users(userRealmName?: string): Repository$1<alepha1.TObject<{
2227
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2228
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2229
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2230
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2231
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2232
- username: alepha1.TOptional<alepha1.TString>;
2233
- email: alepha1.TOptional<alepha1.TString>;
2234
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2235
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2236
- firstName: alepha1.TOptional<alepha1.TString>;
2237
- lastName: alepha1.TOptional<alepha1.TString>;
2238
- picture: alepha1.TOptional<alepha1.TString>;
2239
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2240
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2181
+ users(userRealmName?: string): Repository$1<alepha23.TObject<{
2182
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2183
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2184
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2185
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2186
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2187
+ username: alepha23.TOptional<alepha23.TString>;
2188
+ email: alepha23.TOptional<alepha23.TString>;
2189
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2190
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2191
+ firstName: alepha23.TOptional<alepha23.TString>;
2192
+ lastName: alepha23.TOptional<alepha23.TString>;
2193
+ picture: alepha23.TOptional<alepha23.TString>;
2194
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2195
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2241
2196
  }>>;
2242
- sessions(userRealmName?: string): Repository$1<alepha1.TObject<{
2243
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2244
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2245
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2246
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2247
- refreshToken: alepha1.TString;
2248
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2249
- expiresAt: alepha1.TString;
2250
- ip: alepha1.TOptional<alepha1.TString>;
2251
- userAgent: alepha1.TOptional<alepha1.TObject<{
2252
- os: alepha1.TString;
2253
- browser: alepha1.TString;
2254
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2197
+ sessions(userRealmName?: string): Repository$1<alepha23.TObject<{
2198
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2199
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2200
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2201
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2202
+ refreshToken: alepha23.TString;
2203
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2204
+ expiresAt: alepha23.TString;
2205
+ ip: alepha23.TOptional<alepha23.TString>;
2206
+ userAgent: alepha23.TOptional<alepha23.TObject<{
2207
+ os: alepha23.TString;
2208
+ browser: alepha23.TString;
2209
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2255
2210
  }>>;
2256
2211
  }>>;
2257
- identities(userRealmName?: string): Repository$1<alepha1.TObject<{
2258
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2259
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2260
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2261
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2262
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2263
- password: alepha1.TOptional<alepha1.TString>;
2264
- provider: alepha1.TString;
2265
- providerUserId: alepha1.TOptional<alepha1.TString>;
2266
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2212
+ identities(userRealmName?: string): Repository$1<alepha23.TObject<{
2213
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2214
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2215
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2216
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2217
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2218
+ password: alepha23.TOptional<alepha23.TString>;
2219
+ provider: alepha23.TString;
2220
+ providerUserId: alepha23.TOptional<alepha23.TString>;
2221
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
2267
2222
  }>>;
2268
2223
  /**
2269
- * Phase 1: Create a password reset intent.
2270
- *
2271
- * Validates the email, checks for existing user with credentials,
2272
- * sends verification code, and stores the intent in cache.
2273
- *
2274
- * @param email - User's email address
2275
- * @param userRealmName - Optional realm name
2276
- * @returns Intent response with intentId and expiration (always returns for security)
2277
- */
2224
+ * Phase 1: Create a password reset intent.
2225
+ *
2226
+ * Validates the email, checks for existing user with credentials,
2227
+ * sends verification code, and stores the intent in cache.
2228
+ *
2229
+ * @param email - User's email address
2230
+ * @param userRealmName - Optional realm name
2231
+ * @returns Intent response with intentId and expiration (always returns for security)
2232
+ */
2278
2233
  createPasswordResetIntent(email: string, userRealmName?: string): Promise<PasswordResetIntentResponse>;
2279
2234
  /**
2280
- * Phase 2: Complete password reset using an intent.
2281
- *
2282
- * Validates the verification code, updates the password,
2283
- * and invalidates all existing sessions.
2284
- *
2285
- * @param body - Request body with intentId, code, and newPassword
2286
- */
2235
+ * Phase 2: Complete password reset using an intent.
2236
+ *
2237
+ * Validates the verification code, updates the password,
2238
+ * and invalidates all existing sessions.
2239
+ *
2240
+ * @param body - Request body with intentId, code, and newPassword
2241
+ */
2287
2242
  completePasswordReset(body: CompletePasswordResetRequest): Promise<void>;
2288
2243
  /**
2289
- * @deprecated Use createPasswordResetIntent instead
2290
- */
2244
+ * @deprecated Use createPasswordResetIntent instead
2245
+ */
2291
2246
  requestPasswordReset(email: string, userRealmName?: string): Promise<boolean>;
2292
2247
  /**
2293
- * @deprecated Use completePasswordReset instead
2294
- */
2248
+ * @deprecated Use completePasswordReset instead
2249
+ */
2295
2250
  validateResetToken(email: string, token: string, _userRealmName?: string): Promise<string>;
2296
2251
  /**
2297
- * @deprecated Use completePasswordReset instead
2298
- */
2252
+ * @deprecated Use completePasswordReset instead
2253
+ */
2299
2254
  resetPassword(email: string, token: string, newPassword: string, userRealmName?: string): Promise<void>;
2300
2255
  }
2301
2256
  //#endregion
2302
2257
  //#region ../../src/api/users/schemas/completeRegistrationRequestSchema.d.ts
2303
- declare const completeRegistrationRequestSchema: alepha1.TObject<{
2304
- intentId: alepha1.TString;
2305
- emailCode: alepha1.TOptional<alepha1.TString>;
2306
- phoneCode: alepha1.TOptional<alepha1.TString>;
2307
- captchaToken: alepha1.TOptional<alepha1.TString>;
2258
+ declare const completeRegistrationRequestSchema: alepha23.TObject<{
2259
+ intentId: alepha23.TString;
2260
+ emailCode: alepha23.TOptional<alepha23.TString>;
2261
+ phoneCode: alepha23.TOptional<alepha23.TString>;
2262
+ captchaToken: alepha23.TOptional<alepha23.TString>;
2308
2263
  }>;
2309
2264
  type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSchema>;
2310
2265
  //#endregion
@@ -2313,24 +2268,24 @@ type CompleteRegistrationRequest = Static<typeof completeRegistrationRequestSche
2313
2268
  * Schema for user registration request body.
2314
2269
  * Password is always required, other fields depend on realm settings.
2315
2270
  */
2316
- declare const registerRequestSchema: alepha1.TObject<{
2317
- password: alepha1.TString;
2318
- username: alepha1.TOptional<alepha1.TString>;
2319
- email: alepha1.TOptional<alepha1.TString>;
2320
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2321
- firstName: alepha1.TOptional<alepha1.TString>;
2322
- lastName: alepha1.TOptional<alepha1.TString>;
2323
- picture: alepha1.TOptional<alepha1.TString>;
2271
+ declare const registerRequestSchema: alepha23.TObject<{
2272
+ password: alepha23.TString;
2273
+ username: alepha23.TOptional<alepha23.TString>;
2274
+ email: alepha23.TOptional<alepha23.TString>;
2275
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2276
+ firstName: alepha23.TOptional<alepha23.TString>;
2277
+ lastName: alepha23.TOptional<alepha23.TString>;
2278
+ picture: alepha23.TOptional<alepha23.TString>;
2324
2279
  }>;
2325
2280
  type RegisterRequest = Static<typeof registerRequestSchema>;
2326
2281
  //#endregion
2327
2282
  //#region ../../src/api/users/schemas/registrationIntentResponseSchema.d.ts
2328
- declare const registrationIntentResponseSchema: alepha1.TObject<{
2329
- intentId: alepha1.TString;
2330
- expectCaptcha: alepha1.TBoolean;
2331
- expectEmailVerification: alepha1.TBoolean;
2332
- expectPhoneVerification: alepha1.TBoolean;
2333
- expiresAt: alepha1.TString;
2283
+ declare const registrationIntentResponseSchema: alepha23.TObject<{
2284
+ intentId: alepha23.TString;
2285
+ expectCaptcha: alepha23.TBoolean;
2286
+ expectEmailVerification: alepha23.TBoolean;
2287
+ expectPhoneVerification: alepha23.TBoolean;
2288
+ expiresAt: alepha23.TString;
2334
2289
  }>;
2335
2290
  type RegistrationIntentResponse = Static<typeof registrationIntentResponseSchema>;
2336
2291
  //#endregion
@@ -2360,44 +2315,44 @@ declare class RegistrationService {
2360
2315
  protected readonly log: alepha_logger5.Logger;
2361
2316
  protected readonly dateTimeProvider: DateTimeProvider;
2362
2317
  protected readonly cryptoProvider: CryptoProvider;
2363
- protected readonly verificationController: alepha_server_links2.HttpVirtualClient<VerificationController>;
2318
+ protected readonly verificationController: alepha_server_links0.HttpVirtualClient<VerificationController>;
2364
2319
  protected readonly userNotifications: UserNotifications;
2365
- protected readonly userRealmProvider: UserRealmProvider;
2320
+ protected readonly realmProvider: RealmProvider;
2366
2321
  protected readonly auditService: AuditService;
2367
2322
  protected readonly intentCache: alepha_cache0.CachePrimitiveFn<RegistrationIntent, any[]>;
2368
2323
  /**
2369
- * Phase 1: Create a registration intent.
2370
- *
2371
- * Validates the registration data, checks for existing users,
2372
- * creates verification sessions, and stores the intent in cache.
2373
- */
2324
+ * Phase 1: Create a registration intent.
2325
+ *
2326
+ * Validates the registration data, checks for existing users,
2327
+ * creates verification sessions, and stores the intent in cache.
2328
+ */
2374
2329
  createRegistrationIntent(body: RegisterRequest, userRealmName?: string): Promise<RegistrationIntentResponse>;
2375
2330
  /**
2376
- * Phase 2: Complete registration using an intent.
2377
- *
2378
- * Validates all requirements (verification codes, captcha),
2379
- * creates the user and credentials, and returns the user.
2380
- */
2331
+ * Phase 2: Complete registration using an intent.
2332
+ *
2333
+ * Validates all requirements (verification codes, captcha),
2334
+ * creates the user and credentials, and returns the user.
2335
+ */
2381
2336
  completeRegistration(body: CompleteRegistrationRequest): Promise<UserEntity>;
2382
2337
  /**
2383
- * Check if username, email, and phone are available.
2384
- */
2338
+ * Check if username, email, and phone are available.
2339
+ */
2385
2340
  protected checkUserAvailability(body: Pick<RegisterRequest, "username" | "email" | "phoneNumber">, userRealmName?: string): Promise<void>;
2386
2341
  /**
2387
- * Send email verification code.
2388
- */
2342
+ * Send email verification code.
2343
+ */
2389
2344
  protected sendEmailVerification(email: string): Promise<void>;
2390
2345
  /**
2391
- * Send phone verification code.
2392
- */
2346
+ * Send phone verification code.
2347
+ */
2393
2348
  protected sendPhoneVerification(phoneNumber: string): Promise<void>;
2394
2349
  /**
2395
- * Verify email code using verification service.
2396
- */
2350
+ * Verify email code using verification service.
2351
+ */
2397
2352
  protected verifyEmailCode(email: string, code: string): Promise<void>;
2398
2353
  /**
2399
- * Verify phone code using verification service.
2400
- */
2354
+ * Verify phone code using verification service.
2355
+ */
2401
2356
  protected verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
2402
2357
  }
2403
2358
  //#endregion
@@ -2409,361 +2364,299 @@ declare class UserController {
2409
2364
  protected readonly userService: UserService;
2410
2365
  protected readonly registrationService: RegistrationService;
2411
2366
  /**
2412
- * Phase 1: Create a registration intent.
2413
- * Validates data, creates verification sessions, and stores intent in cache.
2414
- */
2367
+ * Phase 1: Create a registration intent.
2368
+ * Validates data, creates verification sessions, and stores intent in cache.
2369
+ */
2415
2370
  readonly createRegistrationIntent: alepha_server0.ActionPrimitiveFn<{
2416
- body: alepha1.TObject<{
2417
- password: alepha1.TString;
2418
- username: alepha1.TOptional<alepha1.TString>;
2419
- email: alepha1.TOptional<alepha1.TString>;
2420
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2421
- firstName: alepha1.TOptional<alepha1.TString>;
2422
- lastName: alepha1.TOptional<alepha1.TString>;
2423
- picture: alepha1.TOptional<alepha1.TString>;
2371
+ body: alepha23.TObject<{
2372
+ password: alepha23.TString;
2373
+ username: alepha23.TOptional<alepha23.TString>;
2374
+ email: alepha23.TOptional<alepha23.TString>;
2375
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2376
+ firstName: alepha23.TOptional<alepha23.TString>;
2377
+ lastName: alepha23.TOptional<alepha23.TString>;
2378
+ picture: alepha23.TOptional<alepha23.TString>;
2424
2379
  }>;
2425
- query: alepha1.TObject<{
2426
- userRealmName: alepha1.TOptional<alepha1.TString>;
2380
+ query: alepha23.TObject<{
2381
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2427
2382
  }>;
2428
- response: alepha1.TObject<{
2429
- intentId: alepha1.TString;
2430
- expectCaptcha: alepha1.TBoolean;
2431
- expectEmailVerification: alepha1.TBoolean;
2432
- expectPhoneVerification: alepha1.TBoolean;
2433
- expiresAt: alepha1.TString;
2383
+ response: alepha23.TObject<{
2384
+ intentId: alepha23.TString;
2385
+ expectCaptcha: alepha23.TBoolean;
2386
+ expectEmailVerification: alepha23.TBoolean;
2387
+ expectPhoneVerification: alepha23.TBoolean;
2388
+ expiresAt: alepha23.TString;
2434
2389
  }>;
2435
2390
  }>;
2436
2391
  /**
2437
- * Phase 2: Complete registration using an intent.
2438
- * Validates verification codes and creates the user.
2439
- */
2392
+ * Phase 2: Complete registration using an intent.
2393
+ * Validates verification codes and creates the user.
2394
+ */
2440
2395
  readonly createUserFromIntent: alepha_server0.ActionPrimitiveFn<{
2441
- body: alepha1.TObject<{
2442
- intentId: alepha1.TString;
2443
- emailCode: alepha1.TOptional<alepha1.TString>;
2444
- phoneCode: alepha1.TOptional<alepha1.TString>;
2445
- captchaToken: alepha1.TOptional<alepha1.TString>;
2396
+ body: alepha23.TObject<{
2397
+ intentId: alepha23.TString;
2398
+ emailCode: alepha23.TOptional<alepha23.TString>;
2399
+ phoneCode: alepha23.TOptional<alepha23.TString>;
2400
+ captchaToken: alepha23.TOptional<alepha23.TString>;
2446
2401
  }>;
2447
- response: alepha1.TObject<{
2448
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2449
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2450
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2451
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2452
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2453
- username: alepha1.TOptional<alepha1.TString>;
2454
- email: alepha1.TOptional<alepha1.TString>;
2455
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2456
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2457
- firstName: alepha1.TOptional<alepha1.TString>;
2458
- lastName: alepha1.TOptional<alepha1.TString>;
2459
- picture: alepha1.TOptional<alepha1.TString>;
2460
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2461
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2402
+ response: alepha23.TObject<{
2403
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2404
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2405
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2406
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2407
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2408
+ username: alepha23.TOptional<alepha23.TString>;
2409
+ email: alepha23.TOptional<alepha23.TString>;
2410
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2411
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2412
+ firstName: alepha23.TOptional<alepha23.TString>;
2413
+ lastName: alepha23.TOptional<alepha23.TString>;
2414
+ picture: alepha23.TOptional<alepha23.TString>;
2415
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2416
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2462
2417
  }>;
2463
2418
  }>;
2464
2419
  /**
2465
- * Phase 1: Create a password reset intent.
2466
- * Validates email, sends verification code, and stores intent in cache.
2467
- */
2420
+ * Phase 1: Create a password reset intent.
2421
+ * Validates email, sends verification code, and stores intent in cache.
2422
+ */
2468
2423
  readonly createPasswordResetIntent: alepha_server0.ActionPrimitiveFn<{
2469
- query: alepha1.TObject<{
2470
- userRealmName: alepha1.TOptional<alepha1.TString>;
2424
+ query: alepha23.TObject<{
2425
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2471
2426
  }>;
2472
- body: alepha1.TObject<{
2473
- email: alepha1.TString;
2427
+ body: alepha23.TObject<{
2428
+ email: alepha23.TString;
2474
2429
  }>;
2475
- response: alepha1.TObject<{
2476
- intentId: alepha1.TString;
2477
- expiresAt: alepha1.TString;
2430
+ response: alepha23.TObject<{
2431
+ intentId: alepha23.TString;
2432
+ expiresAt: alepha23.TString;
2478
2433
  }>;
2479
2434
  }>;
2480
2435
  /**
2481
- * Phase 2: Complete password reset using an intent.
2482
- * Validates verification code, updates password, and invalidates sessions.
2483
- */
2436
+ * Phase 2: Complete password reset using an intent.
2437
+ * Validates verification code, updates password, and invalidates sessions.
2438
+ */
2484
2439
  readonly completePasswordReset: alepha_server0.ActionPrimitiveFn<{
2485
- body: alepha1.TObject<{
2486
- intentId: alepha1.TString;
2487
- code: alepha1.TString;
2488
- newPassword: alepha1.TString;
2440
+ body: alepha23.TObject<{
2441
+ intentId: alepha23.TString;
2442
+ code: alepha23.TString;
2443
+ newPassword: alepha23.TString;
2489
2444
  }>;
2490
- response: alepha1.TObject<{
2491
- ok: alepha1.TBoolean;
2492
- id: alepha1.TOptional<alepha1.TUnion<[alepha1.TString, alepha1.TInteger]>>;
2493
- count: alepha1.TOptional<alepha1.TNumber>;
2445
+ response: alepha23.TObject<{
2446
+ ok: alepha23.TBoolean;
2447
+ id: alepha23.TOptional<alepha23.TUnion<[alepha23.TString, alepha23.TInteger]>>;
2448
+ count: alepha23.TOptional<alepha23.TNumber>;
2494
2449
  }>;
2495
2450
  }>;
2496
2451
  /**
2497
- * @deprecated Use createPasswordResetIntent instead
2498
- */
2452
+ * @deprecated Use createPasswordResetIntent instead
2453
+ */
2499
2454
  requestPasswordReset: alepha_server0.ActionPrimitiveFn<{
2500
- query: alepha1.TObject<{
2501
- userRealmName: alepha1.TOptional<alepha1.TString>;
2455
+ query: alepha23.TObject<{
2456
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2502
2457
  }>;
2503
- body: alepha1.TObject<{
2504
- email: alepha1.TString;
2458
+ body: alepha23.TObject<{
2459
+ email: alepha23.TString;
2505
2460
  }>;
2506
- response: alepha1.TObject<{
2507
- success: alepha1.TBoolean;
2508
- message: alepha1.TString;
2461
+ response: alepha23.TObject<{
2462
+ success: alepha23.TBoolean;
2463
+ message: alepha23.TString;
2509
2464
  }>;
2510
2465
  }>;
2511
2466
  /**
2512
- * @deprecated Use completePasswordReset instead
2513
- */
2467
+ * @deprecated Use completePasswordReset instead
2468
+ */
2514
2469
  validateResetToken: alepha_server0.ActionPrimitiveFn<{
2515
- query: alepha1.TObject<{
2516
- email: alepha1.TString;
2517
- token: alepha1.TString;
2518
- userRealmName: alepha1.TOptional<alepha1.TString>;
2470
+ query: alepha23.TObject<{
2471
+ email: alepha23.TString;
2472
+ token: alepha23.TString;
2473
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2519
2474
  }>;
2520
- response: alepha1.TObject<{
2521
- valid: alepha1.TBoolean;
2522
- email: alepha1.TOptional<alepha1.TString>;
2475
+ response: alepha23.TObject<{
2476
+ valid: alepha23.TBoolean;
2477
+ email: alepha23.TOptional<alepha23.TString>;
2523
2478
  }>;
2524
2479
  }>;
2525
2480
  /**
2526
- * @deprecated Use completePasswordReset instead
2527
- */
2481
+ * @deprecated Use completePasswordReset instead
2482
+ */
2528
2483
  resetPassword: alepha_server0.ActionPrimitiveFn<{
2529
- query: alepha1.TObject<{
2530
- userRealmName: alepha1.TOptional<alepha1.TString>;
2484
+ query: alepha23.TObject<{
2485
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2531
2486
  }>;
2532
- body: alepha1.TObject<{
2533
- email: alepha1.TString;
2534
- token: alepha1.TString;
2535
- newPassword: alepha1.TString;
2487
+ body: alepha23.TObject<{
2488
+ email: alepha23.TString;
2489
+ token: alepha23.TString;
2490
+ newPassword: alepha23.TString;
2536
2491
  }>;
2537
- response: alepha1.TObject<{
2538
- success: alepha1.TBoolean;
2539
- message: alepha1.TString;
2492
+ response: alepha23.TObject<{
2493
+ success: alepha23.TBoolean;
2494
+ message: alepha23.TString;
2540
2495
  }>;
2541
2496
  }>;
2542
2497
  /**
2543
- * Request email verification.
2544
- * Generates a verification token using verification service and sends an email to the user.
2545
- * @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
2546
- * @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
2547
- */
2498
+ * Request email verification.
2499
+ * Generates a verification token using verification service and sends an email to the user.
2500
+ * @param method - The verification method: "code" (default) sends a 6-digit code, "link" sends a clickable verification link.
2501
+ * @param verifyUrl - Required when method is "link". The base URL for the verification link. Token and email will be appended as query params.
2502
+ */
2548
2503
  requestEmailVerification: alepha_server0.ActionPrimitiveFn<{
2549
- query: alepha1.TObject<{
2550
- userRealmName: alepha1.TOptional<alepha1.TString>;
2551
- method: alepha1.TOptional<alepha1.TUnsafe<"link" | "code">>;
2552
- verifyUrl: alepha1.TOptional<alepha1.TString>;
2504
+ query: alepha23.TObject<{
2505
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2506
+ method: alepha23.TOptional<alepha23.TUnsafe<"link" | "code">>;
2507
+ verifyUrl: alepha23.TOptional<alepha23.TString>;
2553
2508
  }>;
2554
- body: alepha1.TObject<{
2555
- email: alepha1.TString;
2509
+ body: alepha23.TObject<{
2510
+ email: alepha23.TString;
2556
2511
  }>;
2557
- response: alepha1.TObject<{
2558
- success: alepha1.TBoolean;
2559
- message: alepha1.TString;
2512
+ response: alepha23.TObject<{
2513
+ success: alepha23.TBoolean;
2514
+ message: alepha23.TString;
2560
2515
  }>;
2561
2516
  }>;
2562
2517
  /**
2563
- * Verify email with a valid token.
2564
- * Updates the user's emailVerified status.
2565
- */
2518
+ * Verify email with a valid token.
2519
+ * Updates the user's emailVerified status.
2520
+ */
2566
2521
  verifyEmail: alepha_server0.ActionPrimitiveFn<{
2567
- query: alepha1.TObject<{
2568
- userRealmName: alepha1.TOptional<alepha1.TString>;
2522
+ query: alepha23.TObject<{
2523
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2569
2524
  }>;
2570
- body: alepha1.TObject<{
2571
- email: alepha1.TString;
2572
- token: alepha1.TString;
2525
+ body: alepha23.TObject<{
2526
+ email: alepha23.TString;
2527
+ token: alepha23.TString;
2573
2528
  }>;
2574
- response: alepha1.TObject<{
2575
- success: alepha1.TBoolean;
2576
- message: alepha1.TString;
2529
+ response: alepha23.TObject<{
2530
+ success: alepha23.TBoolean;
2531
+ message: alepha23.TString;
2577
2532
  }>;
2578
2533
  }>;
2579
2534
  /**
2580
- * Check if an email is verified.
2581
- */
2535
+ * Check if an email is verified.
2536
+ */
2582
2537
  checkEmailVerification: alepha_server0.ActionPrimitiveFn<{
2583
- query: alepha1.TObject<{
2584
- email: alepha1.TString;
2585
- userRealmName: alepha1.TOptional<alepha1.TString>;
2586
- }>;
2587
- response: alepha1.TObject<{
2588
- verified: alepha1.TBoolean;
2589
- }>;
2590
- }>;
2591
- }
2592
- //#endregion
2593
- //#region ../../src/api/users/controllers/UserRealmController.d.ts
2594
- /**
2595
- * Controller for exposing realm configuration.
2596
- * Uses $route instead of $action to keep endpoints hidden from API documentation.
2597
- */
2598
- declare class UserRealmController {
2599
- protected readonly url = "/realms";
2600
- protected readonly group = "realms";
2601
- protected readonly userRealmProvider: UserRealmProvider;
2602
- protected readonly serverAuthProvider: ServerAuthProvider;
2603
- /**
2604
- * Get realm configuration settings.
2605
- * This endpoint is not exposed in the API documentation.
2606
- */
2607
- readonly getRealmConfig: alepha_server0.ActionPrimitiveFn<{
2608
- query: alepha1.TObject<{
2609
- userRealmName: alepha1.TOptional<alepha1.TString>;
2610
- }>;
2611
- response: alepha1.TObject<{
2612
- settings: alepha1.TObject<{
2613
- displayName: alepha1.TOptional<alepha1.TString>;
2614
- description: alepha1.TOptional<alepha1.TString>;
2615
- logoUrl: alepha1.TOptional<alepha1.TString>;
2616
- registrationAllowed: alepha1.TBoolean;
2617
- emailEnabled: alepha1.TBoolean;
2618
- emailRequired: alepha1.TBoolean;
2619
- usernameEnabled: alepha1.TBoolean;
2620
- usernameRequired: alepha1.TBoolean;
2621
- phoneEnabled: alepha1.TBoolean;
2622
- phoneRequired: alepha1.TBoolean;
2623
- verifyEmailRequired: alepha1.TBoolean;
2624
- verifyPhoneRequired: alepha1.TBoolean;
2625
- firstNameLastNameEnabled: alepha1.TBoolean;
2626
- firstNameLastNameRequired: alepha1.TBoolean;
2627
- resetPasswordAllowed: alepha1.TBoolean;
2628
- passwordPolicy: alepha1.TObject<{
2629
- minLength: alepha1.TInteger;
2630
- requireUppercase: alepha1.TBoolean;
2631
- requireLowercase: alepha1.TBoolean;
2632
- requireNumbers: alepha1.TBoolean;
2633
- requireSpecialCharacters: alepha1.TBoolean;
2634
- }>;
2635
- }>;
2636
- realmName: alepha1.TString;
2637
- authenticationMethods: alepha1.TArray<alepha1.TObject<{
2638
- name: alepha1.TString;
2639
- type: alepha1.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2640
- }>>;
2641
- }>;
2642
- }>;
2643
- readonly checkUsernameAvailability: alepha_server0.ActionPrimitiveFn<{
2644
- query: alepha1.TObject<{
2645
- userRealmName: alepha1.TOptional<alepha1.TString>;
2646
- }>;
2647
- body: alepha1.TObject<{
2648
- username: alepha1.TString;
2538
+ query: alepha23.TObject<{
2539
+ email: alepha23.TString;
2540
+ userRealmName: alepha23.TOptional<alepha23.TString>;
2649
2541
  }>;
2650
- response: alepha1.TObject<{
2651
- available: alepha1.TBoolean;
2542
+ response: alepha23.TObject<{
2543
+ verified: alepha23.TBoolean;
2652
2544
  }>;
2653
2545
  }>;
2654
2546
  }
2655
2547
  //#endregion
2656
2548
  //#region ../../src/api/users/schemas/identityResourceSchema.d.ts
2657
- declare const identityResourceSchema: alepha1.TObject<{
2658
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2659
- provider: alepha1.TString;
2660
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2661
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2662
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2663
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2664
- providerUserId: alepha1.TOptional<alepha1.TString>;
2665
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2549
+ declare const identityResourceSchema: alepha23.TObject<{
2550
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2551
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2552
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2553
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2554
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2555
+ provider: alepha23.TString;
2556
+ providerUserId: alepha23.TOptional<alepha23.TString>;
2557
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
2666
2558
  }>;
2667
2559
  type IdentityResource = Static<typeof identityResourceSchema>;
2668
2560
  //#endregion
2669
2561
  //#region ../../src/api/users/schemas/loginSchema.d.ts
2670
- declare const loginSchema: alepha1.TObject<{
2671
- username: alepha1.TString;
2672
- password: alepha1.TString;
2562
+ declare const loginSchema: alepha23.TObject<{
2563
+ username: alepha23.TString;
2564
+ password: alepha23.TString;
2673
2565
  }>;
2674
2566
  type LoginInput = Static<typeof loginSchema>;
2675
2567
  //#endregion
2568
+ //#region ../../src/api/users/schemas/realmConfigSchema.d.ts
2569
+ declare const realmConfigSchema: alepha23.TObject<{
2570
+ settings: alepha23.TObject<{
2571
+ displayName: alepha23.TOptional<alepha23.TString>;
2572
+ description: alepha23.TOptional<alepha23.TString>;
2573
+ logoUrl: alepha23.TOptional<alepha23.TString>;
2574
+ registrationAllowed: alepha23.TBoolean;
2575
+ emailEnabled: alepha23.TBoolean;
2576
+ emailRequired: alepha23.TBoolean;
2577
+ usernameEnabled: alepha23.TBoolean;
2578
+ usernameRequired: alepha23.TBoolean;
2579
+ usernameRegExp: alepha23.TString;
2580
+ phoneEnabled: alepha23.TBoolean;
2581
+ phoneRequired: alepha23.TBoolean;
2582
+ verifyEmailRequired: alepha23.TBoolean;
2583
+ verifyPhoneRequired: alepha23.TBoolean;
2584
+ firstNameLastNameEnabled: alepha23.TBoolean;
2585
+ firstNameLastNameRequired: alepha23.TBoolean;
2586
+ resetPasswordAllowed: alepha23.TBoolean;
2587
+ passwordPolicy: alepha23.TObject<{
2588
+ minLength: alepha23.TInteger;
2589
+ requireUppercase: alepha23.TBoolean;
2590
+ requireLowercase: alepha23.TBoolean;
2591
+ requireNumbers: alepha23.TBoolean;
2592
+ requireSpecialCharacters: alepha23.TBoolean;
2593
+ }>;
2594
+ }>;
2595
+ realmName: alepha23.TString;
2596
+ authenticationMethods: alepha23.TArray<alepha23.TObject<{
2597
+ name: alepha23.TString;
2598
+ type: alepha23.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2599
+ }>>;
2600
+ }>;
2601
+ type RealmConfig = Static<typeof realmConfigSchema>;
2602
+ //#endregion
2676
2603
  //#region ../../src/api/users/schemas/registerSchema.d.ts
2677
- declare const registerSchema: alepha1.TObject<{
2678
- username: alepha1.TString;
2679
- email: alepha1.TString;
2680
- password: alepha1.TString;
2681
- confirmPassword: alepha1.TString;
2682
- firstName: alepha1.TOptional<alepha1.TString>;
2683
- lastName: alepha1.TOptional<alepha1.TString>;
2604
+ declare const registerSchema: alepha23.TObject<{
2605
+ username: alepha23.TString;
2606
+ email: alepha23.TString;
2607
+ password: alepha23.TString;
2608
+ confirmPassword: alepha23.TString;
2609
+ firstName: alepha23.TOptional<alepha23.TString>;
2610
+ lastName: alepha23.TOptional<alepha23.TString>;
2684
2611
  }>;
2685
2612
  type RegisterInput = Static<typeof registerSchema>;
2686
2613
  //#endregion
2687
2614
  //#region ../../src/api/users/schemas/resetPasswordSchema.d.ts
2688
- declare const resetPasswordRequestSchema: alepha1.TObject<{
2689
- email: alepha1.TString;
2615
+ declare const resetPasswordRequestSchema: alepha23.TObject<{
2616
+ email: alepha23.TString;
2690
2617
  }>;
2691
- declare const resetPasswordSchema: alepha1.TObject<{
2692
- token: alepha1.TString;
2693
- password: alepha1.TString;
2694
- confirmPassword: alepha1.TString;
2618
+ declare const resetPasswordSchema: alepha23.TObject<{
2619
+ token: alepha23.TString;
2620
+ password: alepha23.TString;
2621
+ confirmPassword: alepha23.TString;
2695
2622
  }>;
2696
2623
  type ResetPasswordRequest = Static<typeof resetPasswordRequestSchema>;
2697
2624
  type ResetPasswordInput = Static<typeof resetPasswordSchema>;
2698
2625
  //#endregion
2699
2626
  //#region ../../src/api/users/schemas/sessionResourceSchema.d.ts
2700
- declare const sessionResourceSchema: alepha1.TObject<{
2701
- id: alepha1.TString;
2702
- version: alepha1.TNumber;
2703
- createdAt: alepha1.TString;
2704
- updatedAt: alepha1.TString;
2705
- refreshToken: alepha1.TString;
2706
- userId: alepha1.TString;
2707
- expiresAt: alepha1.TString;
2708
- ip: alepha1.TOptional<alepha1.TString>;
2709
- userAgent: alepha1.TOptional<alepha1.TObject<{
2710
- os: alepha1.TString;
2711
- browser: alepha1.TString;
2712
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2627
+ declare const sessionResourceSchema: alepha23.TObject<{
2628
+ id: alepha23.TString;
2629
+ version: alepha23.TNumber;
2630
+ createdAt: alepha23.TString;
2631
+ updatedAt: alepha23.TString;
2632
+ refreshToken: alepha23.TString;
2633
+ userId: alepha23.TString;
2634
+ expiresAt: alepha23.TString;
2635
+ ip: alepha23.TOptional<alepha23.TString>;
2636
+ userAgent: alepha23.TOptional<alepha23.TObject<{
2637
+ os: alepha23.TString;
2638
+ browser: alepha23.TString;
2639
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2713
2640
  }>>;
2714
2641
  }>;
2715
2642
  type SessionResource = Static<typeof sessionResourceSchema>;
2716
2643
  //#endregion
2717
- //#region ../../src/api/users/schemas/userRealmConfigSchema.d.ts
2718
- declare const userRealmConfigSchema: alepha1.TObject<{
2719
- settings: alepha1.TObject<{
2720
- displayName: alepha1.TOptional<alepha1.TString>;
2721
- description: alepha1.TOptional<alepha1.TString>;
2722
- logoUrl: alepha1.TOptional<alepha1.TString>;
2723
- registrationAllowed: alepha1.TBoolean;
2724
- emailEnabled: alepha1.TBoolean;
2725
- emailRequired: alepha1.TBoolean;
2726
- usernameEnabled: alepha1.TBoolean;
2727
- usernameRequired: alepha1.TBoolean;
2728
- phoneEnabled: alepha1.TBoolean;
2729
- phoneRequired: alepha1.TBoolean;
2730
- verifyEmailRequired: alepha1.TBoolean;
2731
- verifyPhoneRequired: alepha1.TBoolean;
2732
- firstNameLastNameEnabled: alepha1.TBoolean;
2733
- firstNameLastNameRequired: alepha1.TBoolean;
2734
- resetPasswordAllowed: alepha1.TBoolean;
2735
- passwordPolicy: alepha1.TObject<{
2736
- minLength: alepha1.TInteger;
2737
- requireUppercase: alepha1.TBoolean;
2738
- requireLowercase: alepha1.TBoolean;
2739
- requireNumbers: alepha1.TBoolean;
2740
- requireSpecialCharacters: alepha1.TBoolean;
2741
- }>;
2742
- }>;
2743
- realmName: alepha1.TString;
2744
- authenticationMethods: alepha1.TArray<alepha1.TObject<{
2745
- name: alepha1.TString;
2746
- type: alepha1.TUnsafe<"OAUTH2" | "OIDC" | "CREDENTIALS">;
2747
- }>>;
2748
- }>;
2749
- type UserRealmConfig = Static<typeof userRealmConfigSchema>;
2750
- //#endregion
2751
2644
  //#region ../../src/api/users/schemas/userResourceSchema.d.ts
2752
- declare const userResourceSchema: alepha1.TObject<{
2753
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2754
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2755
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2756
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2757
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2758
- username: alepha1.TOptional<alepha1.TString>;
2759
- email: alepha1.TOptional<alepha1.TString>;
2760
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2761
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2762
- firstName: alepha1.TOptional<alepha1.TString>;
2763
- lastName: alepha1.TOptional<alepha1.TString>;
2764
- picture: alepha1.TOptional<alepha1.TString>;
2765
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2766
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2645
+ declare const userResourceSchema: alepha23.TObject<{
2646
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2647
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2648
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2649
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2650
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2651
+ username: alepha23.TOptional<alepha23.TString>;
2652
+ email: alepha23.TOptional<alepha23.TString>;
2653
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2654
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2655
+ firstName: alepha23.TOptional<alepha23.TString>;
2656
+ lastName: alepha23.TOptional<alepha23.TString>;
2657
+ picture: alepha23.TOptional<alepha23.TString>;
2658
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2659
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2767
2660
  }>;
2768
2661
  type UserResource = Static<typeof userResourceSchema>;
2769
2662
  //#endregion
@@ -2774,95 +2667,95 @@ declare class SessionService {
2774
2667
  protected readonly dateTimeProvider: DateTimeProvider;
2775
2668
  protected readonly cryptoProvider: CryptoProvider;
2776
2669
  protected readonly log: alepha_logger5.Logger;
2777
- protected readonly userRealmProvider: UserRealmProvider;
2778
- protected readonly fileController: alepha_server_links2.HttpVirtualClient<FileController>;
2670
+ protected readonly realmProvider: RealmProvider;
2671
+ protected readonly fileController: alepha_server_links0.HttpVirtualClient<FileController>;
2779
2672
  protected readonly auditService: AuditService;
2780
- users(userRealmName?: string): Repository$1<alepha1.TObject<{
2781
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2782
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2783
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2784
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2785
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2786
- username: alepha1.TOptional<alepha1.TString>;
2787
- email: alepha1.TOptional<alepha1.TString>;
2788
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2789
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2790
- firstName: alepha1.TOptional<alepha1.TString>;
2791
- lastName: alepha1.TOptional<alepha1.TString>;
2792
- picture: alepha1.TOptional<alepha1.TString>;
2793
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2794
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2673
+ users(userRealmName?: string): Repository$1<alepha23.TObject<{
2674
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2675
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2676
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2677
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2678
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2679
+ username: alepha23.TOptional<alepha23.TString>;
2680
+ email: alepha23.TOptional<alepha23.TString>;
2681
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2682
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2683
+ firstName: alepha23.TOptional<alepha23.TString>;
2684
+ lastName: alepha23.TOptional<alepha23.TString>;
2685
+ picture: alepha23.TOptional<alepha23.TString>;
2686
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2687
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2795
2688
  }>>;
2796
- sessions(userRealmName?: string): Repository$1<alepha1.TObject<{
2797
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2798
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2799
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2800
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2801
- refreshToken: alepha1.TString;
2802
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2803
- expiresAt: alepha1.TString;
2804
- ip: alepha1.TOptional<alepha1.TString>;
2805
- userAgent: alepha1.TOptional<alepha1.TObject<{
2806
- os: alepha1.TString;
2807
- browser: alepha1.TString;
2808
- device: alepha1.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2689
+ sessions(userRealmName?: string): Repository$1<alepha23.TObject<{
2690
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2691
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2692
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2693
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2694
+ refreshToken: alepha23.TString;
2695
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2696
+ expiresAt: alepha23.TString;
2697
+ ip: alepha23.TOptional<alepha23.TString>;
2698
+ userAgent: alepha23.TOptional<alepha23.TObject<{
2699
+ os: alepha23.TString;
2700
+ browser: alepha23.TString;
2701
+ device: alepha23.TUnsafe<"MOBILE" | "DESKTOP" | "TABLET">;
2809
2702
  }>>;
2810
2703
  }>>;
2811
- identities(userRealmName?: string): Repository$1<alepha1.TObject<{
2812
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2813
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2814
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2815
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2816
- userId: PgAttr<alepha1.TString, typeof PG_REF>;
2817
- password: alepha1.TOptional<alepha1.TString>;
2818
- provider: alepha1.TString;
2819
- providerUserId: alepha1.TOptional<alepha1.TString>;
2820
- providerData: alepha1.TOptional<alepha1.TRecord<string, alepha1.TAny>>;
2704
+ identities(userRealmName?: string): Repository$1<alepha23.TObject<{
2705
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2706
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2707
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2708
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2709
+ userId: PgAttr<alepha23.TString, typeof PG_REF>;
2710
+ password: alepha23.TOptional<alepha23.TString>;
2711
+ provider: alepha23.TString;
2712
+ providerUserId: alepha23.TOptional<alepha23.TString>;
2713
+ providerData: alepha23.TOptional<alepha23.TRecord<string, alepha23.TAny>>;
2821
2714
  }>>;
2822
2715
  /**
2823
- * Random delay to prevent timing attacks (50-200ms)
2824
- * Uses cryptographically secure random number generation
2825
- */
2716
+ * Random delay to prevent timing attacks (50-200ms)
2717
+ * Uses cryptographically secure random number generation
2718
+ */
2826
2719
  protected randomDelay(): Promise<void>;
2827
2720
  /**
2828
- * Validate user credentials and return the user if valid.
2829
- */
2721
+ * Validate user credentials and return the user if valid.
2722
+ */
2830
2723
  login(provider: string, username: string, password: string, userRealmName?: string): Promise<UserEntity>;
2831
2724
  createSession(user: UserAccount, expiresIn: number, userRealmName?: string): Promise<{
2832
2725
  refreshToken: string;
2833
2726
  sessionId: string;
2834
2727
  }>;
2835
2728
  refreshSession(refreshToken: string, userRealmName?: string): Promise<{
2836
- user: PgStatic<alepha1.TObject<{
2837
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2838
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2839
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2840
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2841
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2842
- username: alepha1.TOptional<alepha1.TString>;
2843
- email: alepha1.TOptional<alepha1.TString>;
2844
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2845
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2846
- firstName: alepha1.TOptional<alepha1.TString>;
2847
- lastName: alepha1.TOptional<alepha1.TString>;
2848
- picture: alepha1.TOptional<alepha1.TString>;
2849
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2850
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2851
- }>, PgRelationMap<alepha1.TObject<{
2852
- id: PgAttr<PgAttr<alepha1.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2853
- version: PgAttr<PgAttr<alepha1.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2854
- createdAt: PgAttr<PgAttr<alepha1.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2855
- updatedAt: PgAttr<PgAttr<alepha1.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2856
- realm: PgAttr<alepha1.TString, typeof PG_DEFAULT>;
2857
- username: alepha1.TOptional<alepha1.TString>;
2858
- email: alepha1.TOptional<alepha1.TString>;
2859
- phoneNumber: alepha1.TOptional<alepha1.TString>;
2860
- roles: PgAttr<alepha1.TArray<alepha1.TString>, typeof PG_DEFAULT>;
2861
- firstName: alepha1.TOptional<alepha1.TString>;
2862
- lastName: alepha1.TOptional<alepha1.TString>;
2863
- picture: alepha1.TOptional<alepha1.TString>;
2864
- enabled: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2865
- emailVerified: PgAttr<alepha1.TBoolean, typeof PG_DEFAULT>;
2729
+ user: PgStatic<alepha23.TObject<{
2730
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2731
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2732
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2733
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2734
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2735
+ username: alepha23.TOptional<alepha23.TString>;
2736
+ email: alepha23.TOptional<alepha23.TString>;
2737
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2738
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2739
+ firstName: alepha23.TOptional<alepha23.TString>;
2740
+ lastName: alepha23.TOptional<alepha23.TString>;
2741
+ picture: alepha23.TOptional<alepha23.TString>;
2742
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2743
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2744
+ }>, PgRelationMap<alepha23.TObject<{
2745
+ id: PgAttr<PgAttr<alepha23.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
2746
+ version: PgAttr<PgAttr<alepha23.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
2747
+ createdAt: PgAttr<PgAttr<alepha23.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
2748
+ updatedAt: PgAttr<PgAttr<alepha23.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
2749
+ realm: PgAttr<alepha23.TString, typeof PG_DEFAULT>;
2750
+ username: alepha23.TOptional<alepha23.TString>;
2751
+ email: alepha23.TOptional<alepha23.TString>;
2752
+ phoneNumber: alepha23.TOptional<alepha23.TString>;
2753
+ roles: PgAttr<alepha23.TArray<alepha23.TString>, typeof PG_DEFAULT>;
2754
+ firstName: alepha23.TOptional<alepha23.TString>;
2755
+ lastName: alepha23.TOptional<alepha23.TString>;
2756
+ picture: alepha23.TOptional<alepha23.TString>;
2757
+ enabled: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2758
+ emailVerified: PgAttr<alepha23.TBoolean, typeof PG_DEFAULT>;
2866
2759
  }>>>;
2867
2760
  expiresIn: number;
2868
2761
  sessionId: string;
@@ -2924,7 +2817,7 @@ declare class SessionService {
2924
2817
  *
2925
2818
  * @module alepha.api.users
2926
2819
  */
2927
- declare const AlephaApiUsers: alepha1.Service<alepha1.Module>;
2820
+ declare const AlephaApiUsers: alepha23.Service<alepha23.Module>;
2928
2821
  //#endregion
2929
- export { $userRealm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, RealmAuthSettings, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserController, UserEntity, UserQuery, UserRealm, UserRealmConfig, UserRealmController, UserRealmOptions, UserRealmPrimitive, UserRealmProvider, UserRealmRepositories, UserResource, UserService, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userRealmConfigSchema, userResourceSchema, users };
2822
+ export { $realm, AdminIdentityController, AdminSessionController, AdminUserController, AlephaApiUsers, CompletePasswordResetRequest, CompleteRegistrationRequest, CreateUser, CredentialService, DEFAULT_USER_REALM_NAME, IdentityEntity, IdentityQuery, IdentityResource, IdentityService, LoginInput, PasswordResetIntentResponse, Realm, RealmAuthSettings, RealmConfig, RealmController, RealmOptions, RealmPrimitive, RealmProvider, RealmRepositories, RegisterInput, RegistrationIntentResponse, RegistrationService, ResetPasswordInput, ResetPasswordRequest, SessionCrudService, SessionEntity, SessionQuery, SessionResource, SessionService, UpdateUser, UserController, UserEntity, UserQuery, UserResource, UserService, completePasswordResetRequestSchema, completeRegistrationRequestSchema, createUserSchema, identities, identityQuerySchema, identityResourceSchema, loginSchema, passwordResetIntentResponseSchema, realmAuthSettingsAtom, realmConfigSchema, registerSchema, registrationIntentResponseSchema, resetPasswordRequestSchema, resetPasswordSchema, sessionQuerySchema, sessionResourceSchema, sessions, updateUserSchema, userQuerySchema, userResourceSchema, users };
2930
2823
  //# sourceMappingURL=index.d.ts.map