alepha 0.14.3 → 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 (317) hide show
  1. package/README.md +2 -5
  2. package/dist/api/audits/index.d.ts +620 -811
  3. package/dist/api/audits/index.d.ts.map +1 -1
  4. package/dist/api/files/index.d.ts +185 -377
  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 -435
  9. package/dist/api/jobs/index.d.ts.map +1 -1
  10. package/dist/api/notifications/index.d.ts +238 -429
  11. package/dist/api/notifications/index.d.ts.map +1 -1
  12. package/dist/api/parameters/index.d.ts +236 -427
  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 +1010 -1196
  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 +17 -17
  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 +384 -285
  32. package/dist/cli/index.d.ts.map +1 -1
  33. package/dist/cli/index.js +1113 -623
  34. package/dist/cli/index.js.map +1 -1
  35. package/dist/command/index.d.ts +299 -300
  36. package/dist/command/index.d.ts.map +1 -1
  37. package/dist/command/index.js +13 -9
  38. package/dist/command/index.js.map +1 -1
  39. package/dist/core/index.browser.js +445 -103
  40. package/dist/core/index.browser.js.map +1 -1
  41. package/dist/core/index.d.ts +733 -625
  42. package/dist/core/index.d.ts.map +1 -1
  43. package/dist/core/index.js +446 -103
  44. package/dist/core/index.js.map +1 -1
  45. package/dist/core/index.native.js +445 -103
  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/logger/index.js +12 -2
  67. package/dist/logger/index.js.map +1 -1
  68. package/dist/mcp/index.d.ts +197 -197
  69. package/dist/mcp/index.d.ts.map +1 -1
  70. package/dist/mcp/index.js +1 -1
  71. package/dist/mcp/index.js.map +1 -1
  72. package/dist/orm/chunk-DtkW-qnP.js +38 -0
  73. package/dist/orm/index.browser.js.map +1 -1
  74. package/dist/orm/index.bun.js +2814 -0
  75. package/dist/orm/index.bun.js.map +1 -0
  76. package/dist/orm/index.d.ts +1228 -1216
  77. package/dist/orm/index.d.ts.map +1 -1
  78. package/dist/orm/index.js +2041 -1967
  79. package/dist/orm/index.js.map +1 -1
  80. package/dist/queue/core/index.d.ts +248 -248
  81. package/dist/queue/core/index.d.ts.map +1 -1
  82. package/dist/queue/redis/index.d.ts.map +1 -1
  83. package/dist/redis/index.bun.js +285 -0
  84. package/dist/redis/index.bun.js.map +1 -0
  85. package/dist/redis/index.d.ts +118 -136
  86. package/dist/redis/index.d.ts.map +1 -1
  87. package/dist/redis/index.js +18 -38
  88. package/dist/redis/index.js.map +1 -1
  89. package/dist/retry/index.d.ts +69 -69
  90. package/dist/retry/index.d.ts.map +1 -1
  91. package/dist/router/index.d.ts +6 -6
  92. package/dist/router/index.d.ts.map +1 -1
  93. package/dist/scheduler/index.d.ts +25 -25
  94. package/dist/scheduler/index.d.ts.map +1 -1
  95. package/dist/security/index.browser.js +5 -1
  96. package/dist/security/index.browser.js.map +1 -1
  97. package/dist/security/index.d.ts +417 -254
  98. package/dist/security/index.d.ts.map +1 -1
  99. package/dist/security/index.js +386 -86
  100. package/dist/security/index.js.map +1 -1
  101. package/dist/server/auth/index.d.ts +110 -110
  102. package/dist/server/auth/index.d.ts.map +1 -1
  103. package/dist/server/auth/index.js +20 -20
  104. package/dist/server/auth/index.js.map +1 -1
  105. package/dist/server/cache/index.d.ts +62 -47
  106. package/dist/server/cache/index.d.ts.map +1 -1
  107. package/dist/server/cache/index.js +56 -3
  108. package/dist/server/cache/index.js.map +1 -1
  109. package/dist/server/compress/index.d.ts +6 -0
  110. package/dist/server/compress/index.d.ts.map +1 -1
  111. package/dist/server/compress/index.js +36 -1
  112. package/dist/server/compress/index.js.map +1 -1
  113. package/dist/server/cookies/index.d.ts +6 -6
  114. package/dist/server/cookies/index.d.ts.map +1 -1
  115. package/dist/server/cookies/index.js +3 -3
  116. package/dist/server/cookies/index.js.map +1 -1
  117. package/dist/server/core/index.browser.js +2 -2
  118. package/dist/server/core/index.browser.js.map +1 -1
  119. package/dist/server/core/index.d.ts +242 -150
  120. package/dist/server/core/index.d.ts.map +1 -1
  121. package/dist/server/core/index.js +294 -125
  122. package/dist/server/core/index.js.map +1 -1
  123. package/dist/server/cors/index.d.ts +11 -12
  124. package/dist/server/cors/index.d.ts.map +1 -1
  125. package/dist/server/health/index.d.ts +0 -1
  126. package/dist/server/health/index.d.ts.map +1 -1
  127. package/dist/server/helmet/index.d.ts +2 -2
  128. package/dist/server/helmet/index.d.ts.map +1 -1
  129. package/dist/server/links/index.browser.js.map +1 -1
  130. package/dist/server/links/index.d.ts +123 -124
  131. package/dist/server/links/index.d.ts.map +1 -1
  132. package/dist/server/links/index.js +1 -2
  133. package/dist/server/links/index.js.map +1 -1
  134. package/dist/server/metrics/index.d.ts.map +1 -1
  135. package/dist/server/multipart/index.d.ts +6 -6
  136. package/dist/server/multipart/index.d.ts.map +1 -1
  137. package/dist/server/proxy/index.d.ts +102 -103
  138. package/dist/server/proxy/index.d.ts.map +1 -1
  139. package/dist/server/rate-limit/index.d.ts +16 -16
  140. package/dist/server/rate-limit/index.d.ts.map +1 -1
  141. package/dist/server/static/index.d.ts +44 -44
  142. package/dist/server/static/index.d.ts.map +1 -1
  143. package/dist/server/static/index.js +4 -0
  144. package/dist/server/static/index.js.map +1 -1
  145. package/dist/server/swagger/index.d.ts +48 -49
  146. package/dist/server/swagger/index.d.ts.map +1 -1
  147. package/dist/server/swagger/index.js +3 -5
  148. package/dist/server/swagger/index.js.map +1 -1
  149. package/dist/sms/index.d.ts +13 -11
  150. package/dist/sms/index.d.ts.map +1 -1
  151. package/dist/sms/index.js +7 -7
  152. package/dist/sms/index.js.map +1 -1
  153. package/dist/thread/index.d.ts +71 -72
  154. package/dist/thread/index.d.ts.map +1 -1
  155. package/dist/topic/core/index.d.ts +318 -318
  156. package/dist/topic/core/index.d.ts.map +1 -1
  157. package/dist/topic/redis/index.d.ts +6 -6
  158. package/dist/topic/redis/index.d.ts.map +1 -1
  159. package/dist/vite/index.d.ts +5805 -249
  160. package/dist/vite/index.d.ts.map +1 -1
  161. package/dist/vite/index.js +599 -513
  162. package/dist/vite/index.js.map +1 -1
  163. package/dist/websocket/index.browser.js +6 -6
  164. package/dist/websocket/index.browser.js.map +1 -1
  165. package/dist/websocket/index.d.ts +247 -247
  166. package/dist/websocket/index.d.ts.map +1 -1
  167. package/dist/websocket/index.js +6 -6
  168. package/dist/websocket/index.js.map +1 -1
  169. package/package.json +9 -14
  170. package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
  171. package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
  172. package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
  173. package/src/api/users/entities/users.ts +1 -1
  174. package/src/api/users/index.ts +8 -8
  175. package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
  176. package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
  177. package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
  178. package/src/api/users/services/CredentialService.ts +7 -7
  179. package/src/api/users/services/IdentityService.ts +4 -4
  180. package/src/api/users/services/RegistrationService.spec.ts +25 -27
  181. package/src/api/users/services/RegistrationService.ts +38 -27
  182. package/src/api/users/services/SessionCrudService.ts +3 -3
  183. package/src/api/users/services/SessionService.spec.ts +3 -3
  184. package/src/api/users/services/SessionService.ts +28 -9
  185. package/src/api/users/services/UserService.ts +7 -7
  186. package/src/batch/providers/BatchProvider.ts +1 -2
  187. package/src/cli/apps/AlephaCli.ts +0 -2
  188. package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
  189. package/src/cli/assets/apiHelloControllerTs.ts +18 -0
  190. package/src/cli/assets/apiIndexTs.ts +16 -0
  191. package/src/cli/assets/claudeMd.ts +303 -0
  192. package/src/cli/assets/mainBrowserTs.ts +2 -2
  193. package/src/cli/assets/mainServerTs.ts +24 -0
  194. package/src/cli/assets/webAppRouterTs.ts +15 -0
  195. package/src/cli/assets/webHelloComponentTsx.ts +16 -0
  196. package/src/cli/assets/webIndexTs.ts +16 -0
  197. package/src/cli/atoms/buildOptions.ts +88 -0
  198. package/src/cli/commands/build.ts +70 -87
  199. package/src/cli/commands/db.ts +21 -22
  200. package/src/cli/commands/deploy.ts +17 -5
  201. package/src/cli/commands/dev.ts +22 -14
  202. package/src/cli/commands/format.ts +8 -2
  203. package/src/cli/commands/gen/env.ts +53 -0
  204. package/src/cli/commands/gen/openapi.ts +1 -1
  205. package/src/cli/commands/gen/resource.ts +15 -0
  206. package/src/cli/commands/gen.ts +7 -1
  207. package/src/cli/commands/init.ts +74 -30
  208. package/src/cli/commands/lint.ts +8 -2
  209. package/src/cli/commands/test.ts +8 -3
  210. package/src/cli/commands/typecheck.ts +5 -1
  211. package/src/cli/commands/verify.ts +5 -3
  212. package/src/cli/defineConfig.ts +49 -7
  213. package/src/cli/index.ts +0 -1
  214. package/src/cli/services/AlephaCliUtils.ts +39 -589
  215. package/src/cli/services/PackageManagerUtils.ts +301 -0
  216. package/src/cli/services/ProjectScaffolder.ts +306 -0
  217. package/src/command/helpers/Runner.spec.ts +2 -2
  218. package/src/command/helpers/Runner.ts +16 -4
  219. package/src/command/primitives/$command.ts +0 -6
  220. package/src/command/providers/CliProvider.ts +1 -3
  221. package/src/core/Alepha.ts +42 -0
  222. package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
  223. package/src/core/index.shared.ts +1 -0
  224. package/src/core/index.ts +2 -0
  225. package/src/core/primitives/$hook.ts +6 -2
  226. package/src/core/primitives/$module.spec.ts +4 -0
  227. package/src/core/providers/AlsProvider.ts +1 -1
  228. package/src/core/providers/CodecManager.spec.ts +12 -6
  229. package/src/core/providers/CodecManager.ts +26 -6
  230. package/src/core/providers/EventManager.ts +169 -13
  231. package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
  232. package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
  233. package/src/core/providers/StateManager.spec.ts +27 -16
  234. package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
  235. package/src/email/providers/LocalEmailProvider.ts +52 -15
  236. package/src/email/providers/NodemailerEmailProvider.ts +167 -56
  237. package/src/file/errors/FileError.ts +7 -0
  238. package/src/file/index.ts +9 -1
  239. package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
  240. package/src/logger/index.ts +15 -3
  241. package/src/mcp/transports/StdioMcpTransport.ts +1 -1
  242. package/src/orm/index.browser.ts +1 -19
  243. package/src/orm/index.bun.ts +77 -0
  244. package/src/orm/index.shared-server.ts +22 -0
  245. package/src/orm/index.shared.ts +15 -0
  246. package/src/orm/index.ts +13 -39
  247. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
  248. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  249. package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
  250. package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
  251. package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
  252. package/src/orm/services/Repository.ts +8 -0
  253. package/src/queue/core/providers/WorkerProvider.spec.ts +48 -32
  254. package/src/redis/index.bun.ts +35 -0
  255. package/src/redis/providers/BunRedisProvider.ts +12 -43
  256. package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
  257. package/src/redis/providers/NodeRedisProvider.ts +16 -34
  258. package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
  259. package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
  260. package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
  261. package/src/security/index.browser.ts +5 -0
  262. package/src/security/index.ts +90 -7
  263. package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
  264. package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
  265. package/src/security/primitives/$role.ts +5 -5
  266. package/src/security/primitives/$serviceAccount.spec.ts +5 -5
  267. package/src/security/primitives/$serviceAccount.ts +3 -3
  268. package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
  269. package/src/server/auth/primitives/$auth.ts +10 -10
  270. package/src/server/auth/primitives/$authCredentials.ts +3 -3
  271. package/src/server/auth/primitives/$authGithub.ts +3 -3
  272. package/src/server/auth/primitives/$authGoogle.ts +3 -3
  273. package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
  274. package/src/server/cache/providers/ServerCacheProvider.spec.ts +183 -0
  275. package/src/server/cache/providers/ServerCacheProvider.ts +95 -10
  276. package/src/server/compress/providers/ServerCompressProvider.ts +61 -2
  277. package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
  278. package/src/server/core/helpers/ServerReply.ts +2 -2
  279. package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
  280. package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
  281. package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
  282. package/src/server/core/providers/ServerProvider.ts +155 -22
  283. package/src/server/core/providers/ServerRouterProvider.ts +259 -115
  284. package/src/server/core/providers/ServerTimingProvider.ts +2 -2
  285. package/src/server/links/index.ts +1 -1
  286. package/src/server/links/providers/LinkProvider.ts +1 -1
  287. package/src/server/static/providers/ServerStaticProvider.ts +10 -0
  288. package/src/server/swagger/index.ts +1 -1
  289. package/src/server/swagger/providers/ServerSwaggerProvider.ts +5 -8
  290. package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
  291. package/src/sms/providers/LocalSmsProvider.ts +8 -7
  292. package/src/vite/helpers/boot.ts +28 -17
  293. package/src/vite/helpers/importViteReact.ts +13 -0
  294. package/src/vite/index.ts +1 -21
  295. package/src/vite/plugins/viteAlephaDev.ts +16 -1
  296. package/src/vite/plugins/viteAlephaSsrPreload.ts +222 -0
  297. package/src/vite/tasks/buildClient.ts +11 -0
  298. package/src/vite/tasks/buildServer.ts +59 -4
  299. package/src/vite/tasks/devServer.ts +71 -0
  300. package/src/vite/tasks/generateCloudflare.ts +7 -0
  301. package/src/vite/tasks/index.ts +2 -1
  302. package/dist/server/security/index.browser.js +0 -13
  303. package/dist/server/security/index.browser.js.map +0 -1
  304. package/dist/server/security/index.d.ts +0 -173
  305. package/dist/server/security/index.d.ts.map +0 -1
  306. package/dist/server/security/index.js +0 -311
  307. package/dist/server/security/index.js.map +0 -1
  308. package/src/cli/assets/appRouterTs.ts +0 -9
  309. package/src/cli/assets/mainTs.ts +0 -13
  310. package/src/cli/assets/viteConfigTs.ts +0 -14
  311. package/src/cli/commands/run.ts +0 -24
  312. package/src/server/security/index.browser.ts +0 -10
  313. package/src/server/security/index.ts +0 -94
  314. package/src/vite/plugins/viteAlepha.ts +0 -37
  315. package/src/vite/plugins/viteAlephaBuild.ts +0 -281
  316. /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
  317. /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
@@ -1,23 +1,16 @@
1
- import * as alepha579 from "alepha";
1
+ import * as alepha381 from "alepha";
2
2
  import { Alepha, KIND, Primitive, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
3
3
  import * as alepha_server0 from "alepha/server";
4
4
  import { ServerRequest } from "alepha/server";
5
- import * as alepha_orm0 from "alepha/orm";
5
+ import * as alepha_orm12 from "alepha/orm";
6
6
  import { Page } from "alepha/orm";
7
7
  import * as alepha_logger0 from "alepha/logger";
8
- import "bun";
9
- import "bun:sqlite";
10
- import "drizzle-orm/bun-sql";
11
- import "drizzle-orm/bun-sqlite";
12
8
  import "drizzle-orm/d1";
13
9
  import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
14
10
  import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
15
11
  import "alepha/datetime";
16
12
  import "alepha/retry";
17
- import "alepha/lock";
18
13
  import "drizzle-orm/sqlite-core";
19
- import "drizzle-orm/postgres-js";
20
- import "postgres";
21
14
 
22
15
  //#region ../../src/orm/schemas/insertSchema.d.ts
23
16
  /**
@@ -49,114 +42,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
49
42
  //#region ../../src/orm/primitives/$entity.d.ts
50
43
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
51
44
  /**
52
- * The database table name that will be created for this entity.
53
- * If not provided, name will be inferred from the $repository variable name.
54
- */
45
+ * The database table name that will be created for this entity.
46
+ * If not provided, name will be inferred from the $repository variable name.
47
+ */
55
48
  name: string;
56
49
  /**
57
- * TypeBox schema defining the table structure and column types.
58
- */
50
+ * TypeBox schema defining the table structure and column types.
51
+ */
59
52
  schema: T;
60
53
  /**
61
- * Database indexes to create for query optimization.
62
- */
54
+ * Database indexes to create for query optimization.
55
+ */
63
56
  indexes?: (Keys | {
64
57
  /**
65
- * Single column to index.
66
- */
58
+ * Single column to index.
59
+ */
67
60
  column: Keys;
68
61
  /**
69
- * Whether this should be a unique index (enforces uniqueness constraint).
70
- */
62
+ * Whether this should be a unique index (enforces uniqueness constraint).
63
+ */
71
64
  unique?: boolean;
72
65
  /**
73
- * Custom name for the index. If not provided, generates name automatically.
74
- */
66
+ * Custom name for the index. If not provided, generates name automatically.
67
+ */
75
68
  name?: string;
76
69
  } | {
77
70
  /**
78
- * Multiple columns for composite index (order matters for query optimization).
79
- */
71
+ * Multiple columns for composite index (order matters for query optimization).
72
+ */
80
73
  columns: Keys[];
81
74
  /**
82
- * Whether this should be a unique index (enforces uniqueness constraint).
83
- */
75
+ * Whether this should be a unique index (enforces uniqueness constraint).
76
+ */
84
77
  unique?: boolean;
85
78
  /**
86
- * Custom name for the index. If not provided, generates name automatically.
87
- */
79
+ * Custom name for the index. If not provided, generates name automatically.
80
+ */
88
81
  name?: string;
89
82
  })[];
90
83
  /**
91
- * Foreign key constraints to maintain referential integrity.
92
- */
84
+ * Foreign key constraints to maintain referential integrity.
85
+ */
93
86
  foreignKeys?: Array<{
94
87
  /**
95
- * Optional name for the foreign key constraint.
96
- */
88
+ * Optional name for the foreign key constraint.
89
+ */
97
90
  name?: string;
98
91
  /**
99
- * Local columns that reference the foreign table.
100
- */
92
+ * Local columns that reference the foreign table.
93
+ */
101
94
  columns: Array<keyof Static<T>>;
102
95
  /**
103
- * Referenced columns in the foreign table.
104
- * Must be EntityColumn references from other entities.
105
- */
96
+ * Referenced columns in the foreign table.
97
+ * Must be EntityColumn references from other entities.
98
+ */
106
99
  foreignColumns: Array<() => EntityColumn<any>>;
107
100
  }>;
108
101
  /**
109
- * Additional table constraints for data validation.
110
- *
111
- * Constraints enforce business rules at the database level, providing
112
- * an additional layer of data integrity beyond application validation.
113
- *
114
- * **Constraint Types**:
115
- * - **Unique constraints**: Prevent duplicate values across columns
116
- * - **Check constraints**: Enforce custom validation rules with SQL expressions
117
- *
118
- * @example
119
- * ```ts
120
- * constraints: [
121
- * {
122
- * name: "unique_user_email",
123
- * columns: ["email"],
124
- * unique: true
125
- * },
126
- * {
127
- * name: "valid_age_range",
128
- * columns: ["age"],
129
- * check: sql`age >= 0 AND age <= 150`
130
- * },
131
- * {
132
- * name: "unique_user_username_per_tenant",
133
- * columns: ["tenantId", "username"],
134
- * unique: true
135
- * }
136
- * ]
137
- * ```
138
- */
102
+ * Additional table constraints for data validation.
103
+ *
104
+ * Constraints enforce business rules at the database level, providing
105
+ * an additional layer of data integrity beyond application validation.
106
+ *
107
+ * **Constraint Types**:
108
+ * - **Unique constraints**: Prevent duplicate values across columns
109
+ * - **Check constraints**: Enforce custom validation rules with SQL expressions
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * constraints: [
114
+ * {
115
+ * name: "unique_user_email",
116
+ * columns: ["email"],
117
+ * unique: true
118
+ * },
119
+ * {
120
+ * name: "valid_age_range",
121
+ * columns: ["age"],
122
+ * check: sql`age >= 0 AND age <= 150`
123
+ * },
124
+ * {
125
+ * name: "unique_user_username_per_tenant",
126
+ * columns: ["tenantId", "username"],
127
+ * unique: true
128
+ * }
129
+ * ]
130
+ * ```
131
+ */
139
132
  constraints?: Array<{
140
133
  /**
141
- * Columns involved in this constraint.
142
- */
134
+ * Columns involved in this constraint.
135
+ */
143
136
  columns: Array<keyof Static<T>>;
144
137
  /**
145
- * Optional name for the constraint.
146
- */
138
+ * Optional name for the constraint.
139
+ */
147
140
  name?: string;
148
141
  /**
149
- * Whether this is a unique constraint.
150
- */
142
+ * Whether this is a unique constraint.
143
+ */
151
144
  unique?: boolean | {};
152
145
  /**
153
- * SQL expression for check constraint validation.
154
- */
146
+ * SQL expression for check constraint validation.
147
+ */
155
148
  check?: SQL;
156
149
  }>;
157
150
  /**
158
- * Advanced Drizzle ORM configuration for complex table setups.
159
- */
151
+ * Advanced Drizzle ORM configuration for complex table setups.
152
+ */
160
153
  config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
161
154
  }
162
155
  declare class EntityPrimitive<T extends TObject = TObject> {
@@ -204,8 +197,8 @@ type PgSymbols = {
204
197
  [PG_REF]: PgRefOptions;
205
198
  [PG_ENUM]: PgEnumOptions;
206
199
  /**
207
- * @deprecated Use `PG_IDENTITY` instead.
208
- */
200
+ * @deprecated Use `PG_IDENTITY` instead.
201
+ */
209
202
  [PG_SERIAL]: {};
210
203
  };
211
204
  type PgSymbolKeys = keyof PgSymbols;
@@ -235,195 +228,11 @@ interface PgRefOptions {
235
228
  */
236
229
  type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
237
230
  //#endregion
238
- //#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
239
- declare module "alepha" {
240
- interface Env extends Partial<Static<typeof envSchema$1>> {}
241
- }
242
- declare const envSchema$1: alepha579.TObject<{
243
- /**
244
- * Main configuration for database connection.
245
- * Accept a string in the format of a Postgres connection URL.
246
- * Example: postgres://user:password@localhost:5432/database
247
- * or
248
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
249
- */
250
- DATABASE_URL: alepha579.TOptional<alepha579.TString>;
251
- /**
252
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
253
- */
254
- POSTGRES_SCHEMA: alepha579.TOptional<alepha579.TString>;
255
- }>;
256
- /**
257
- * Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
258
- *
259
- * This provider uses Bun's built-in SQL class for PostgreSQL connections,
260
- * which provides excellent performance on the Bun runtime.
261
- *
262
- * @example
263
- * ```ts
264
- * // Set DATABASE_URL environment variable
265
- * // DATABASE_URL=postgres://user:password@localhost:5432/database
266
- *
267
- * // Or configure programmatically
268
- * alepha.with({
269
- * provide: DatabaseProvider,
270
- * use: BunPostgresProvider,
271
- * });
272
- * ```
273
- */
274
- //#endregion
275
- //#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
276
- /**
277
- * Configuration options for the Bun SQLite database provider.
278
- */
279
- declare const bunSqliteOptions: alepha579.Atom<alepha579.TObject<{
280
- path: alepha579.TOptional<alepha579.TString>;
281
- }>, "alepha.postgres.bun-sqlite.options">;
282
- type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
283
- declare module "alepha" {
284
- interface State {
285
- [bunSqliteOptions.key]: BunSqliteProviderOptions;
286
- }
287
- }
288
- /**
289
- * Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
290
- *
291
- * This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
292
- * which provides excellent performance on the Bun runtime.
293
- *
294
- * @example
295
- * ```ts
296
- * // Set DATABASE_URL environment variable
297
- * // DATABASE_URL=sqlite://./my-database.db
298
- *
299
- * // Or configure programmatically
300
- * alepha.with({
301
- * provide: DatabaseProvider,
302
- * use: BunSqliteProvider,
303
- * });
304
- *
305
- * // Or use options atom
306
- * alepha.store.mut(bunSqliteOptions, (old) => ({
307
- * ...old,
308
- * path: ":memory:",
309
- * }));
310
- * ```
311
- */
312
- //#endregion
313
- //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
314
- declare module "alepha" {
315
- interface Env extends Partial<Static<typeof envSchema>> {}
316
- }
317
- declare const envSchema: alepha579.TObject<{
318
- /**
319
- * Main configuration for database connection.
320
- * Accept a string in the format of a Postgres connection URL.
321
- * Example: postgres://user:password@localhost:5432/database
322
- * or
323
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
324
- */
325
- DATABASE_URL: alepha579.TOptional<alepha579.TString>;
326
- /**
327
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
328
- *
329
- * It will monkey patch drizzle tables.
330
- */
331
- POSTGRES_SCHEMA: alepha579.TOptional<alepha579.TString>;
332
- }>;
333
- //#endregion
334
- //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
335
- /**
336
- * Configuration options for the Node.js SQLite database provider.
337
- */
338
- declare const nodeSqliteOptions: alepha579.Atom<alepha579.TObject<{
339
- path: alepha579.TOptional<alepha579.TString>;
340
- }>, "alepha.postgres.node-sqlite.options">;
341
- type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
342
- declare module "alepha" {
343
- interface State {
344
- [nodeSqliteOptions.key]: NodeSqliteProviderOptions;
345
- }
346
- }
347
- /**
348
- * Add a fake support for SQLite in Node.js based on Postgres interfaces.
349
- *
350
- * This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
351
- * This is NOT recommended for production use.
352
- */
353
- //#endregion
354
- //#region ../../src/orm/index.d.ts
355
- declare module "alepha" {
356
- interface Hooks {
357
- /**
358
- * Fires before creating an entity in the repository.
359
- */
360
- "repository:create:before": {
361
- tableName: string;
362
- data: any;
363
- };
364
- /**
365
- * Fires after creating an entity in the repository.
366
- */
367
- "repository:create:after": {
368
- tableName: string;
369
- data: any;
370
- entity: any;
371
- };
372
- /**
373
- * Fires before updating entities in the repository.
374
- */
375
- "repository:update:before": {
376
- tableName: string;
377
- where: any;
378
- data: any;
379
- };
380
- /**
381
- * Fires after updating entities in the repository.
382
- */
383
- "repository:update:after": {
384
- tableName: string;
385
- where: any;
386
- data: any;
387
- entities: any[];
388
- };
389
- /**
390
- * Fires before deleting entities from the repository.
391
- */
392
- "repository:delete:before": {
393
- tableName: string;
394
- where: any;
395
- };
396
- /**
397
- * Fires after deleting entities from the repository.
398
- */
399
- "repository:delete:after": {
400
- tableName: string;
401
- where: any;
402
- ids: Array<string | number>;
403
- };
404
- /**
405
- * Fires before reading entities from the repository.
406
- */
407
- "repository:read:before": {
408
- tableName: string;
409
- query: any;
410
- };
411
- /**
412
- * Fires after reading entities from the repository.
413
- */
414
- "repository:read:after": {
415
- tableName: string;
416
- query: any;
417
- entities: any[];
418
- };
419
- }
420
- }
421
- //#endregion
422
231
  //#region ../../src/api/audits/entities/audits.d.ts
423
232
  /**
424
233
  * Audit severity levels for categorizing events.
425
234
  */
426
- declare const auditSeveritySchema: alepha579.TUnsafe<"info" | "warning" | "critical">;
235
+ declare const auditSeveritySchema: alepha381.TUnsafe<"info" | "warning" | "critical">;
427
236
  type AuditSeverity = Static<typeof auditSeveritySchema>;
428
237
  /**
429
238
  * Audit log entity for tracking important system events.
@@ -434,212 +243,212 @@ type AuditSeverity = Static<typeof auditSeveritySchema>;
434
243
  * - When it happened (createdAt)
435
244
  * - Context and details (metadata, ipAddress, userAgent)
436
245
  */
437
- declare const audits: alepha_orm0.EntityPrimitive<alepha579.TObject<{
438
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
439
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
440
- /**
441
- * Audit event type (e.g., "auth", "user", "payment", "system").
442
- * Used for categorizing and filtering audit events.
443
- */
444
- type: alepha579.TString;
445
- /**
446
- * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
447
- */
448
- action: alepha579.TString;
449
- /**
450
- * Severity level of the event.
451
- */
452
- severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
453
- /**
454
- * User ID who performed the action (null for system events).
455
- */
456
- userId: alepha579.TOptional<alepha579.TString>;
457
- /**
458
- * User realm for multi-tenant support.
459
- */
460
- userRealm: alepha579.TOptional<alepha579.TString>;
461
- /**
462
- * User email at the time of the event (denormalized for history).
463
- */
464
- userEmail: alepha579.TOptional<alepha579.TString>;
465
- /**
466
- * Resource type affected (e.g., "user", "order", "file").
467
- */
468
- resourceType: alepha579.TOptional<alepha579.TString>;
469
- /**
470
- * Resource ID affected.
471
- */
472
- resourceId: alepha579.TOptional<alepha579.TString>;
473
- /**
474
- * Human-readable description of the event.
475
- */
476
- description: alepha579.TOptional<alepha579.TString>;
477
- /**
478
- * Additional metadata/context as JSON.
479
- */
480
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
481
- /**
482
- * Client IP address.
483
- */
484
- ipAddress: alepha579.TOptional<alepha579.TString>;
485
- /**
486
- * Client user agent.
487
- */
488
- userAgent: alepha579.TOptional<alepha579.TString>;
489
- /**
490
- * Session ID if applicable.
491
- */
492
- sessionId: alepha579.TOptional<alepha579.TString>;
493
- /**
494
- * Request ID for correlation.
495
- */
496
- requestId: alepha579.TOptional<alepha579.TString>;
497
- /**
498
- * Whether the action was successful.
499
- */
500
- success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
501
- /**
502
- * Error message if the action failed.
503
- */
504
- errorMessage: alepha579.TOptional<alepha579.TString>;
246
+ declare const audits: alepha_orm12.EntityPrimitive<alepha381.TObject<{
247
+ id: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_PRIMARY_KEY>, typeof alepha_orm12.PG_DEFAULT>;
248
+ createdAt: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_CREATED_AT>, typeof alepha_orm12.PG_DEFAULT>;
249
+ /**
250
+ * Audit event type (e.g., "auth", "user", "payment", "system").
251
+ * Used for categorizing and filtering audit events.
252
+ */
253
+ type: alepha381.TString;
254
+ /**
255
+ * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
256
+ */
257
+ action: alepha381.TString;
258
+ /**
259
+ * Severity level of the event.
260
+ */
261
+ severity: alepha_orm12.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm12.PG_DEFAULT>;
262
+ /**
263
+ * User ID who performed the action (null for system events).
264
+ */
265
+ userId: alepha381.TOptional<alepha381.TString>;
266
+ /**
267
+ * User realm for multi-tenant support.
268
+ */
269
+ userRealm: alepha381.TOptional<alepha381.TString>;
270
+ /**
271
+ * User email at the time of the event (denormalized for history).
272
+ */
273
+ userEmail: alepha381.TOptional<alepha381.TString>;
274
+ /**
275
+ * Resource type affected (e.g., "user", "order", "file").
276
+ */
277
+ resourceType: alepha381.TOptional<alepha381.TString>;
278
+ /**
279
+ * Resource ID affected.
280
+ */
281
+ resourceId: alepha381.TOptional<alepha381.TString>;
282
+ /**
283
+ * Human-readable description of the event.
284
+ */
285
+ description: alepha381.TOptional<alepha381.TString>;
286
+ /**
287
+ * Additional metadata/context as JSON.
288
+ */
289
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
290
+ /**
291
+ * Client IP address.
292
+ */
293
+ ipAddress: alepha381.TOptional<alepha381.TString>;
294
+ /**
295
+ * Client user agent.
296
+ */
297
+ userAgent: alepha381.TOptional<alepha381.TString>;
298
+ /**
299
+ * Session ID if applicable.
300
+ */
301
+ sessionId: alepha381.TOptional<alepha381.TString>;
302
+ /**
303
+ * Request ID for correlation.
304
+ */
305
+ requestId: alepha381.TOptional<alepha381.TString>;
306
+ /**
307
+ * Whether the action was successful.
308
+ */
309
+ success: alepha_orm12.PgAttr<alepha381.TBoolean, typeof alepha_orm12.PG_DEFAULT>;
310
+ /**
311
+ * Error message if the action failed.
312
+ */
313
+ errorMessage: alepha381.TOptional<alepha381.TString>;
505
314
  }>>;
506
- declare const auditEntitySchema: alepha579.TObject<{
507
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
508
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
509
- /**
510
- * Audit event type (e.g., "auth", "user", "payment", "system").
511
- * Used for categorizing and filtering audit events.
512
- */
513
- type: alepha579.TString;
514
- /**
515
- * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
516
- */
517
- action: alepha579.TString;
518
- /**
519
- * Severity level of the event.
520
- */
521
- severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
522
- /**
523
- * User ID who performed the action (null for system events).
524
- */
525
- userId: alepha579.TOptional<alepha579.TString>;
526
- /**
527
- * User realm for multi-tenant support.
528
- */
529
- userRealm: alepha579.TOptional<alepha579.TString>;
530
- /**
531
- * User email at the time of the event (denormalized for history).
532
- */
533
- userEmail: alepha579.TOptional<alepha579.TString>;
534
- /**
535
- * Resource type affected (e.g., "user", "order", "file").
536
- */
537
- resourceType: alepha579.TOptional<alepha579.TString>;
538
- /**
539
- * Resource ID affected.
540
- */
541
- resourceId: alepha579.TOptional<alepha579.TString>;
542
- /**
543
- * Human-readable description of the event.
544
- */
545
- description: alepha579.TOptional<alepha579.TString>;
546
- /**
547
- * Additional metadata/context as JSON.
548
- */
549
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
550
- /**
551
- * Client IP address.
552
- */
553
- ipAddress: alepha579.TOptional<alepha579.TString>;
554
- /**
555
- * Client user agent.
556
- */
557
- userAgent: alepha579.TOptional<alepha579.TString>;
558
- /**
559
- * Session ID if applicable.
560
- */
561
- sessionId: alepha579.TOptional<alepha579.TString>;
562
- /**
563
- * Request ID for correlation.
564
- */
565
- requestId: alepha579.TOptional<alepha579.TString>;
566
- /**
567
- * Whether the action was successful.
568
- */
569
- success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
570
- /**
571
- * Error message if the action failed.
572
- */
573
- errorMessage: alepha579.TOptional<alepha579.TString>;
315
+ declare const auditEntitySchema: alepha381.TObject<{
316
+ id: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_PRIMARY_KEY>, typeof alepha_orm12.PG_DEFAULT>;
317
+ createdAt: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_CREATED_AT>, typeof alepha_orm12.PG_DEFAULT>;
318
+ /**
319
+ * Audit event type (e.g., "auth", "user", "payment", "system").
320
+ * Used for categorizing and filtering audit events.
321
+ */
322
+ type: alepha381.TString;
323
+ /**
324
+ * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
325
+ */
326
+ action: alepha381.TString;
327
+ /**
328
+ * Severity level of the event.
329
+ */
330
+ severity: alepha_orm12.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm12.PG_DEFAULT>;
331
+ /**
332
+ * User ID who performed the action (null for system events).
333
+ */
334
+ userId: alepha381.TOptional<alepha381.TString>;
335
+ /**
336
+ * User realm for multi-tenant support.
337
+ */
338
+ userRealm: alepha381.TOptional<alepha381.TString>;
339
+ /**
340
+ * User email at the time of the event (denormalized for history).
341
+ */
342
+ userEmail: alepha381.TOptional<alepha381.TString>;
343
+ /**
344
+ * Resource type affected (e.g., "user", "order", "file").
345
+ */
346
+ resourceType: alepha381.TOptional<alepha381.TString>;
347
+ /**
348
+ * Resource ID affected.
349
+ */
350
+ resourceId: alepha381.TOptional<alepha381.TString>;
351
+ /**
352
+ * Human-readable description of the event.
353
+ */
354
+ description: alepha381.TOptional<alepha381.TString>;
355
+ /**
356
+ * Additional metadata/context as JSON.
357
+ */
358
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
359
+ /**
360
+ * Client IP address.
361
+ */
362
+ ipAddress: alepha381.TOptional<alepha381.TString>;
363
+ /**
364
+ * Client user agent.
365
+ */
366
+ userAgent: alepha381.TOptional<alepha381.TString>;
367
+ /**
368
+ * Session ID if applicable.
369
+ */
370
+ sessionId: alepha381.TOptional<alepha381.TString>;
371
+ /**
372
+ * Request ID for correlation.
373
+ */
374
+ requestId: alepha381.TOptional<alepha381.TString>;
375
+ /**
376
+ * Whether the action was successful.
377
+ */
378
+ success: alepha_orm12.PgAttr<alepha381.TBoolean, typeof alepha_orm12.PG_DEFAULT>;
379
+ /**
380
+ * Error message if the action failed.
381
+ */
382
+ errorMessage: alepha381.TOptional<alepha381.TString>;
574
383
  }>;
575
- declare const auditEntityInsertSchema: alepha_orm0.TObjectInsert<alepha579.TObject<{
576
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
577
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
578
- /**
579
- * Audit event type (e.g., "auth", "user", "payment", "system").
580
- * Used for categorizing and filtering audit events.
581
- */
582
- type: alepha579.TString;
583
- /**
584
- * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
585
- */
586
- action: alepha579.TString;
587
- /**
588
- * Severity level of the event.
589
- */
590
- severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
591
- /**
592
- * User ID who performed the action (null for system events).
593
- */
594
- userId: alepha579.TOptional<alepha579.TString>;
595
- /**
596
- * User realm for multi-tenant support.
597
- */
598
- userRealm: alepha579.TOptional<alepha579.TString>;
599
- /**
600
- * User email at the time of the event (denormalized for history).
601
- */
602
- userEmail: alepha579.TOptional<alepha579.TString>;
603
- /**
604
- * Resource type affected (e.g., "user", "order", "file").
605
- */
606
- resourceType: alepha579.TOptional<alepha579.TString>;
607
- /**
608
- * Resource ID affected.
609
- */
610
- resourceId: alepha579.TOptional<alepha579.TString>;
611
- /**
612
- * Human-readable description of the event.
613
- */
614
- description: alepha579.TOptional<alepha579.TString>;
615
- /**
616
- * Additional metadata/context as JSON.
617
- */
618
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
619
- /**
620
- * Client IP address.
621
- */
622
- ipAddress: alepha579.TOptional<alepha579.TString>;
623
- /**
624
- * Client user agent.
625
- */
626
- userAgent: alepha579.TOptional<alepha579.TString>;
627
- /**
628
- * Session ID if applicable.
629
- */
630
- sessionId: alepha579.TOptional<alepha579.TString>;
631
- /**
632
- * Request ID for correlation.
633
- */
634
- requestId: alepha579.TOptional<alepha579.TString>;
635
- /**
636
- * Whether the action was successful.
637
- */
638
- success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
639
- /**
640
- * Error message if the action failed.
641
- */
642
- errorMessage: alepha579.TOptional<alepha579.TString>;
384
+ declare const auditEntityInsertSchema: alepha_orm12.TObjectInsert<alepha381.TObject<{
385
+ id: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_PRIMARY_KEY>, typeof alepha_orm12.PG_DEFAULT>;
386
+ createdAt: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_CREATED_AT>, typeof alepha_orm12.PG_DEFAULT>;
387
+ /**
388
+ * Audit event type (e.g., "auth", "user", "payment", "system").
389
+ * Used for categorizing and filtering audit events.
390
+ */
391
+ type: alepha381.TString;
392
+ /**
393
+ * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
394
+ */
395
+ action: alepha381.TString;
396
+ /**
397
+ * Severity level of the event.
398
+ */
399
+ severity: alepha_orm12.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm12.PG_DEFAULT>;
400
+ /**
401
+ * User ID who performed the action (null for system events).
402
+ */
403
+ userId: alepha381.TOptional<alepha381.TString>;
404
+ /**
405
+ * User realm for multi-tenant support.
406
+ */
407
+ userRealm: alepha381.TOptional<alepha381.TString>;
408
+ /**
409
+ * User email at the time of the event (denormalized for history).
410
+ */
411
+ userEmail: alepha381.TOptional<alepha381.TString>;
412
+ /**
413
+ * Resource type affected (e.g., "user", "order", "file").
414
+ */
415
+ resourceType: alepha381.TOptional<alepha381.TString>;
416
+ /**
417
+ * Resource ID affected.
418
+ */
419
+ resourceId: alepha381.TOptional<alepha381.TString>;
420
+ /**
421
+ * Human-readable description of the event.
422
+ */
423
+ description: alepha381.TOptional<alepha381.TString>;
424
+ /**
425
+ * Additional metadata/context as JSON.
426
+ */
427
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
428
+ /**
429
+ * Client IP address.
430
+ */
431
+ ipAddress: alepha381.TOptional<alepha381.TString>;
432
+ /**
433
+ * Client user agent.
434
+ */
435
+ userAgent: alepha381.TOptional<alepha381.TString>;
436
+ /**
437
+ * Session ID if applicable.
438
+ */
439
+ sessionId: alepha381.TOptional<alepha381.TString>;
440
+ /**
441
+ * Request ID for correlation.
442
+ */
443
+ requestId: alepha381.TOptional<alepha381.TString>;
444
+ /**
445
+ * Whether the action was successful.
446
+ */
447
+ success: alepha_orm12.PgAttr<alepha381.TBoolean, typeof alepha_orm12.PG_DEFAULT>;
448
+ /**
449
+ * Error message if the action failed.
450
+ */
451
+ errorMessage: alepha381.TOptional<alepha381.TString>;
643
452
  }>>;
644
453
  type AuditEntity = Static<typeof audits.schema>;
645
454
  //#endregion
@@ -647,21 +456,21 @@ type AuditEntity = Static<typeof audits.schema>;
647
456
  /**
648
457
  * Query schema for searching and filtering audit logs.
649
458
  */
650
- declare const auditQuerySchema: alepha579.TObject<{
651
- page: alepha579.TOptional<alepha579.TInteger>;
652
- size: alepha579.TOptional<alepha579.TInteger>;
653
- sort: alepha579.TOptional<alepha579.TString>;
654
- type: alepha579.TOptional<alepha579.TString>;
655
- action: alepha579.TOptional<alepha579.TString>;
656
- severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
657
- userId: alepha579.TOptional<alepha579.TString>;
658
- userRealm: alepha579.TOptional<alepha579.TString>;
659
- resourceType: alepha579.TOptional<alepha579.TString>;
660
- resourceId: alepha579.TOptional<alepha579.TString>;
661
- success: alepha579.TOptional<alepha579.TBoolean>;
662
- from: alepha579.TOptional<alepha579.TString>;
663
- to: alepha579.TOptional<alepha579.TString>;
664
- search: alepha579.TOptional<alepha579.TString>;
459
+ declare const auditQuerySchema: alepha381.TObject<{
460
+ page: alepha381.TOptional<alepha381.TInteger>;
461
+ size: alepha381.TOptional<alepha381.TInteger>;
462
+ sort: alepha381.TOptional<alepha381.TString>;
463
+ type: alepha381.TOptional<alepha381.TString>;
464
+ action: alepha381.TOptional<alepha381.TString>;
465
+ severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
466
+ userId: alepha381.TOptional<alepha381.TString>;
467
+ userRealm: alepha381.TOptional<alepha381.TString>;
468
+ resourceType: alepha381.TOptional<alepha381.TString>;
469
+ resourceId: alepha381.TOptional<alepha381.TString>;
470
+ success: alepha381.TOptional<alepha381.TBoolean>;
471
+ from: alepha381.TOptional<alepha381.TString>;
472
+ to: alepha381.TOptional<alepha381.TString>;
473
+ search: alepha381.TOptional<alepha381.TString>;
665
474
  }>;
666
475
  type AuditQuery = Static<typeof auditQuerySchema>;
667
476
  //#endregion
@@ -669,23 +478,23 @@ type AuditQuery = Static<typeof auditQuerySchema>;
669
478
  /**
670
479
  * Schema for creating a new audit log entry.
671
480
  */
672
- declare const createAuditSchema: alepha579.TObject<{
673
- type: alepha579.TString;
674
- action: alepha579.TString;
675
- severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
676
- userId: alepha579.TOptional<alepha579.TString>;
677
- userRealm: alepha579.TOptional<alepha579.TString>;
678
- userEmail: alepha579.TOptional<alepha579.TString>;
679
- resourceType: alepha579.TOptional<alepha579.TString>;
680
- resourceId: alepha579.TOptional<alepha579.TString>;
681
- description: alepha579.TOptional<alepha579.TString>;
682
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
683
- ipAddress: alepha579.TOptional<alepha579.TString>;
684
- userAgent: alepha579.TOptional<alepha579.TString>;
685
- sessionId: alepha579.TOptional<alepha579.TString>;
686
- requestId: alepha579.TOptional<alepha579.TString>;
687
- success: alepha579.TOptional<alepha579.TBoolean>;
688
- errorMessage: alepha579.TOptional<alepha579.TString>;
481
+ declare const createAuditSchema: alepha381.TObject<{
482
+ type: alepha381.TString;
483
+ action: alepha381.TString;
484
+ severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
485
+ userId: alepha381.TOptional<alepha381.TString>;
486
+ userRealm: alepha381.TOptional<alepha381.TString>;
487
+ userEmail: alepha381.TOptional<alepha381.TString>;
488
+ resourceType: alepha381.TOptional<alepha381.TString>;
489
+ resourceId: alepha381.TOptional<alepha381.TString>;
490
+ description: alepha381.TOptional<alepha381.TString>;
491
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
492
+ ipAddress: alepha381.TOptional<alepha381.TString>;
493
+ userAgent: alepha381.TOptional<alepha381.TString>;
494
+ sessionId: alepha381.TOptional<alepha381.TString>;
495
+ requestId: alepha381.TOptional<alepha381.TString>;
496
+ success: alepha381.TOptional<alepha381.TBoolean>;
497
+ errorMessage: alepha381.TOptional<alepha381.TString>;
689
498
  }>;
690
499
  type CreateAudit = Static<typeof createAuditSchema>;
691
500
  //#endregion
@@ -710,98 +519,98 @@ interface AuditTypeDefinition {
710
519
  declare class AuditService {
711
520
  protected readonly alepha: Alepha;
712
521
  protected readonly log: alepha_logger0.Logger;
713
- protected readonly repo: alepha_orm0.Repository<alepha579.TObject<{
714
- id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
715
- createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha579.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
716
- type: alepha579.TString;
717
- action: alepha579.TString;
718
- severity: alepha_orm0.PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
719
- userId: alepha579.TOptional<alepha579.TString>;
720
- userRealm: alepha579.TOptional<alepha579.TString>;
721
- userEmail: alepha579.TOptional<alepha579.TString>;
722
- resourceType: alepha579.TOptional<alepha579.TString>;
723
- resourceId: alepha579.TOptional<alepha579.TString>;
724
- description: alepha579.TOptional<alepha579.TString>;
725
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
726
- ipAddress: alepha579.TOptional<alepha579.TString>;
727
- userAgent: alepha579.TOptional<alepha579.TString>;
728
- sessionId: alepha579.TOptional<alepha579.TString>;
729
- requestId: alepha579.TOptional<alepha579.TString>;
730
- success: alepha_orm0.PgAttr<alepha579.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
731
- errorMessage: alepha579.TOptional<alepha579.TString>;
522
+ protected readonly repo: alepha_orm12.Repository<alepha381.TObject<{
523
+ id: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_PRIMARY_KEY>, typeof alepha_orm12.PG_DEFAULT>;
524
+ createdAt: alepha_orm12.PgAttr<alepha_orm12.PgAttr<alepha381.TString, typeof alepha_orm12.PG_CREATED_AT>, typeof alepha_orm12.PG_DEFAULT>;
525
+ type: alepha381.TString;
526
+ action: alepha381.TString;
527
+ severity: alepha_orm12.PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm12.PG_DEFAULT>;
528
+ userId: alepha381.TOptional<alepha381.TString>;
529
+ userRealm: alepha381.TOptional<alepha381.TString>;
530
+ userEmail: alepha381.TOptional<alepha381.TString>;
531
+ resourceType: alepha381.TOptional<alepha381.TString>;
532
+ resourceId: alepha381.TOptional<alepha381.TString>;
533
+ description: alepha381.TOptional<alepha381.TString>;
534
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
535
+ ipAddress: alepha381.TOptional<alepha381.TString>;
536
+ userAgent: alepha381.TOptional<alepha381.TString>;
537
+ sessionId: alepha381.TOptional<alepha381.TString>;
538
+ requestId: alepha381.TOptional<alepha381.TString>;
539
+ success: alepha_orm12.PgAttr<alepha381.TBoolean, typeof alepha_orm12.PG_DEFAULT>;
540
+ errorMessage: alepha381.TOptional<alepha381.TString>;
732
541
  }>>;
733
542
  /**
734
- * Registry of audit types and their allowed actions.
735
- */
543
+ * Registry of audit types and their allowed actions.
544
+ */
736
545
  protected readonly auditTypes: Map<string, AuditTypeDefinition>;
737
546
  /**
738
- * Register an audit type with its allowed actions.
739
- */
547
+ * Register an audit type with its allowed actions.
548
+ */
740
549
  registerType(definition: AuditTypeDefinition): void;
741
550
  /**
742
- * Get all registered audit types.
743
- */
551
+ * Get all registered audit types.
552
+ */
744
553
  getRegisteredTypes(): AuditTypeDefinition[];
745
554
  /**
746
- * Get current request context if available.
747
- */
555
+ * Get current request context if available.
556
+ */
748
557
  protected getRequestContext(): ServerRequest | undefined;
749
558
  /**
750
- * Create a new audit log entry.
751
- * Automatically populates ipAddress, userAgent, and requestId from the current request context.
752
- */
559
+ * Create a new audit log entry.
560
+ * Automatically populates ipAddress, userAgent, and requestId from the current request context.
561
+ */
753
562
  create(data: CreateAudit): Promise<AuditEntity>;
754
563
  /**
755
- * Record an audit event (convenience method).
756
- */
564
+ * Record an audit event (convenience method).
565
+ */
757
566
  record(type: string, action: string, options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
758
567
  /**
759
- * Record an authentication event.
760
- */
568
+ * Record an authentication event.
569
+ */
761
570
  recordAuth(action: "login" | "logout" | "login_failed" | "token_refresh" | "mfa_setup" | "mfa_verify", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
762
571
  /**
763
- * Record a user management event.
764
- */
572
+ * Record a user management event.
573
+ */
765
574
  recordUser(action: "create" | "update" | "delete" | "enable" | "disable" | "role_change", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
766
575
  /**
767
- * Record a data access event.
768
- */
576
+ * Record a data access event.
577
+ */
769
578
  recordAccess(action: "view" | "export" | "download", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
770
579
  /**
771
- * Record a security event.
772
- */
580
+ * Record a security event.
581
+ */
773
582
  recordSecurity(action: "permission_denied" | "suspicious_activity" | "rate_limited" | "blocked", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
774
583
  /**
775
- * Record a system event.
776
- */
584
+ * Record a system event.
585
+ */
777
586
  recordSystem(action: "startup" | "shutdown" | "config_change" | "maintenance" | "error", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
778
587
  /**
779
- * Find audit entries with filtering and pagination.
780
- */
588
+ * Find audit entries with filtering and pagination.
589
+ */
781
590
  find(query?: AuditQuery): Promise<Page<AuditEntity>>;
782
591
  /**
783
- * Get audit entry by ID.
784
- */
592
+ * Get audit entry by ID.
593
+ */
785
594
  getById(id: string): Promise<AuditEntity>;
786
595
  /**
787
- * Get audit entries for a specific user.
788
- */
596
+ * Get audit entries for a specific user.
597
+ */
789
598
  findByUser(userId: string, query?: Omit<AuditQuery, "userId">): Promise<Page<AuditEntity>>;
790
599
  /**
791
- * Get audit entries for a specific resource.
792
- */
600
+ * Get audit entries for a specific resource.
601
+ */
793
602
  findByResource(resourceType: string, resourceId: string, query?: Omit<AuditQuery, "resourceType" | "resourceId">): Promise<Page<AuditEntity>>;
794
603
  /**
795
- * Get audit statistics for a time period.
796
- */
604
+ * Get audit statistics for a time period.
605
+ */
797
606
  getStats(options?: {
798
607
  from?: Date;
799
608
  to?: Date;
800
609
  userRealm?: string;
801
610
  }): Promise<AuditStats>;
802
611
  /**
803
- * Delete old audit entries (for retention policy).
804
- */
612
+ * Delete old audit entries (for retention policy).
613
+ */
805
614
  deleteOlderThan(date: Date): Promise<number>;
806
615
  }
807
616
  /**
@@ -830,262 +639,262 @@ declare class AdminAuditController {
830
639
  protected readonly group = "admin:audits";
831
640
  protected readonly auditService: AuditService;
832
641
  /**
833
- * Find audit entries with filtering and pagination.
834
- */
642
+ * Find audit entries with filtering and pagination.
643
+ */
835
644
  readonly findAudits: alepha_server0.ActionPrimitiveFn<{
836
- query: alepha579.TObject<{
837
- page: alepha579.TOptional<alepha579.TInteger>;
838
- size: alepha579.TOptional<alepha579.TInteger>;
839
- sort: alepha579.TOptional<alepha579.TString>;
840
- type: alepha579.TOptional<alepha579.TString>;
841
- action: alepha579.TOptional<alepha579.TString>;
842
- severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
843
- userId: alepha579.TOptional<alepha579.TString>;
844
- userRealm: alepha579.TOptional<alepha579.TString>;
845
- resourceType: alepha579.TOptional<alepha579.TString>;
846
- resourceId: alepha579.TOptional<alepha579.TString>;
847
- success: alepha579.TOptional<alepha579.TBoolean>;
848
- from: alepha579.TOptional<alepha579.TString>;
849
- to: alepha579.TOptional<alepha579.TString>;
850
- search: alepha579.TOptional<alepha579.TString>;
645
+ query: alepha381.TObject<{
646
+ page: alepha381.TOptional<alepha381.TInteger>;
647
+ size: alepha381.TOptional<alepha381.TInteger>;
648
+ sort: alepha381.TOptional<alepha381.TString>;
649
+ type: alepha381.TOptional<alepha381.TString>;
650
+ action: alepha381.TOptional<alepha381.TString>;
651
+ severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
652
+ userId: alepha381.TOptional<alepha381.TString>;
653
+ userRealm: alepha381.TOptional<alepha381.TString>;
654
+ resourceType: alepha381.TOptional<alepha381.TString>;
655
+ resourceId: alepha381.TOptional<alepha381.TString>;
656
+ success: alepha381.TOptional<alepha381.TBoolean>;
657
+ from: alepha381.TOptional<alepha381.TString>;
658
+ to: alepha381.TOptional<alepha381.TString>;
659
+ search: alepha381.TOptional<alepha381.TString>;
851
660
  }>;
852
- response: alepha579.TPage<alepha579.TObject<{
853
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
854
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
855
- type: alepha579.TString;
856
- action: alepha579.TString;
857
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
858
- userId: alepha579.TOptional<alepha579.TString>;
859
- userRealm: alepha579.TOptional<alepha579.TString>;
860
- userEmail: alepha579.TOptional<alepha579.TString>;
861
- resourceType: alepha579.TOptional<alepha579.TString>;
862
- resourceId: alepha579.TOptional<alepha579.TString>;
863
- description: alepha579.TOptional<alepha579.TString>;
864
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
865
- ipAddress: alepha579.TOptional<alepha579.TString>;
866
- userAgent: alepha579.TOptional<alepha579.TString>;
867
- sessionId: alepha579.TOptional<alepha579.TString>;
868
- requestId: alepha579.TOptional<alepha579.TString>;
869
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
870
- errorMessage: alepha579.TOptional<alepha579.TString>;
661
+ response: alepha381.TPage<alepha381.TObject<{
662
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
663
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
664
+ type: alepha381.TString;
665
+ action: alepha381.TString;
666
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
667
+ userId: alepha381.TOptional<alepha381.TString>;
668
+ userRealm: alepha381.TOptional<alepha381.TString>;
669
+ userEmail: alepha381.TOptional<alepha381.TString>;
670
+ resourceType: alepha381.TOptional<alepha381.TString>;
671
+ resourceId: alepha381.TOptional<alepha381.TString>;
672
+ description: alepha381.TOptional<alepha381.TString>;
673
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
674
+ ipAddress: alepha381.TOptional<alepha381.TString>;
675
+ userAgent: alepha381.TOptional<alepha381.TString>;
676
+ sessionId: alepha381.TOptional<alepha381.TString>;
677
+ requestId: alepha381.TOptional<alepha381.TString>;
678
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
679
+ errorMessage: alepha381.TOptional<alepha381.TString>;
871
680
  }>>;
872
681
  }>;
873
682
  /**
874
- * Get a single audit entry by ID.
875
- */
683
+ * Get a single audit entry by ID.
684
+ */
876
685
  readonly getAudit: alepha_server0.ActionPrimitiveFn<{
877
- params: alepha579.TObject<{
878
- id: alepha579.TString;
686
+ params: alepha381.TObject<{
687
+ id: alepha381.TString;
879
688
  }>;
880
- response: alepha579.TObject<{
881
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
882
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
883
- type: alepha579.TString;
884
- action: alepha579.TString;
885
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
886
- userId: alepha579.TOptional<alepha579.TString>;
887
- userRealm: alepha579.TOptional<alepha579.TString>;
888
- userEmail: alepha579.TOptional<alepha579.TString>;
889
- resourceType: alepha579.TOptional<alepha579.TString>;
890
- resourceId: alepha579.TOptional<alepha579.TString>;
891
- description: alepha579.TOptional<alepha579.TString>;
892
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
893
- ipAddress: alepha579.TOptional<alepha579.TString>;
894
- userAgent: alepha579.TOptional<alepha579.TString>;
895
- sessionId: alepha579.TOptional<alepha579.TString>;
896
- requestId: alepha579.TOptional<alepha579.TString>;
897
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
898
- errorMessage: alepha579.TOptional<alepha579.TString>;
689
+ response: alepha381.TObject<{
690
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
691
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
692
+ type: alepha381.TString;
693
+ action: alepha381.TString;
694
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
695
+ userId: alepha381.TOptional<alepha381.TString>;
696
+ userRealm: alepha381.TOptional<alepha381.TString>;
697
+ userEmail: alepha381.TOptional<alepha381.TString>;
698
+ resourceType: alepha381.TOptional<alepha381.TString>;
699
+ resourceId: alepha381.TOptional<alepha381.TString>;
700
+ description: alepha381.TOptional<alepha381.TString>;
701
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
702
+ ipAddress: alepha381.TOptional<alepha381.TString>;
703
+ userAgent: alepha381.TOptional<alepha381.TString>;
704
+ sessionId: alepha381.TOptional<alepha381.TString>;
705
+ requestId: alepha381.TOptional<alepha381.TString>;
706
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
707
+ errorMessage: alepha381.TOptional<alepha381.TString>;
899
708
  }>;
900
709
  }>;
901
710
  /**
902
- * Create a new audit entry.
903
- */
711
+ * Create a new audit entry.
712
+ */
904
713
  readonly createAudit: alepha_server0.ActionPrimitiveFn<{
905
- body: alepha579.TObject<{
906
- type: alepha579.TString;
907
- action: alepha579.TString;
908
- severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
909
- userId: alepha579.TOptional<alepha579.TString>;
910
- userRealm: alepha579.TOptional<alepha579.TString>;
911
- userEmail: alepha579.TOptional<alepha579.TString>;
912
- resourceType: alepha579.TOptional<alepha579.TString>;
913
- resourceId: alepha579.TOptional<alepha579.TString>;
914
- description: alepha579.TOptional<alepha579.TString>;
915
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
916
- ipAddress: alepha579.TOptional<alepha579.TString>;
917
- userAgent: alepha579.TOptional<alepha579.TString>;
918
- sessionId: alepha579.TOptional<alepha579.TString>;
919
- requestId: alepha579.TOptional<alepha579.TString>;
920
- success: alepha579.TOptional<alepha579.TBoolean>;
921
- errorMessage: alepha579.TOptional<alepha579.TString>;
714
+ body: alepha381.TObject<{
715
+ type: alepha381.TString;
716
+ action: alepha381.TString;
717
+ severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
718
+ userId: alepha381.TOptional<alepha381.TString>;
719
+ userRealm: alepha381.TOptional<alepha381.TString>;
720
+ userEmail: alepha381.TOptional<alepha381.TString>;
721
+ resourceType: alepha381.TOptional<alepha381.TString>;
722
+ resourceId: alepha381.TOptional<alepha381.TString>;
723
+ description: alepha381.TOptional<alepha381.TString>;
724
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
725
+ ipAddress: alepha381.TOptional<alepha381.TString>;
726
+ userAgent: alepha381.TOptional<alepha381.TString>;
727
+ sessionId: alepha381.TOptional<alepha381.TString>;
728
+ requestId: alepha381.TOptional<alepha381.TString>;
729
+ success: alepha381.TOptional<alepha381.TBoolean>;
730
+ errorMessage: alepha381.TOptional<alepha381.TString>;
922
731
  }>;
923
- response: alepha579.TObject<{
924
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
925
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
926
- type: alepha579.TString;
927
- action: alepha579.TString;
928
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
929
- userId: alepha579.TOptional<alepha579.TString>;
930
- userRealm: alepha579.TOptional<alepha579.TString>;
931
- userEmail: alepha579.TOptional<alepha579.TString>;
932
- resourceType: alepha579.TOptional<alepha579.TString>;
933
- resourceId: alepha579.TOptional<alepha579.TString>;
934
- description: alepha579.TOptional<alepha579.TString>;
935
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
936
- ipAddress: alepha579.TOptional<alepha579.TString>;
937
- userAgent: alepha579.TOptional<alepha579.TString>;
938
- sessionId: alepha579.TOptional<alepha579.TString>;
939
- requestId: alepha579.TOptional<alepha579.TString>;
940
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
941
- errorMessage: alepha579.TOptional<alepha579.TString>;
732
+ response: alepha381.TObject<{
733
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
734
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
735
+ type: alepha381.TString;
736
+ action: alepha381.TString;
737
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
738
+ userId: alepha381.TOptional<alepha381.TString>;
739
+ userRealm: alepha381.TOptional<alepha381.TString>;
740
+ userEmail: alepha381.TOptional<alepha381.TString>;
741
+ resourceType: alepha381.TOptional<alepha381.TString>;
742
+ resourceId: alepha381.TOptional<alepha381.TString>;
743
+ description: alepha381.TOptional<alepha381.TString>;
744
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
745
+ ipAddress: alepha381.TOptional<alepha381.TString>;
746
+ userAgent: alepha381.TOptional<alepha381.TString>;
747
+ sessionId: alepha381.TOptional<alepha381.TString>;
748
+ requestId: alepha381.TOptional<alepha381.TString>;
749
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
750
+ errorMessage: alepha381.TOptional<alepha381.TString>;
942
751
  }>;
943
752
  }>;
944
753
  /**
945
- * Get audit entries for a specific user.
946
- */
754
+ * Get audit entries for a specific user.
755
+ */
947
756
  readonly findByUser: alepha_server0.ActionPrimitiveFn<{
948
- params: alepha579.TObject<{
949
- userId: alepha579.TString;
757
+ params: alepha381.TObject<{
758
+ userId: alepha381.TString;
950
759
  }>;
951
- query: alepha579.TObject<{
952
- page: alepha579.TOptional<alepha579.TInteger>;
953
- type: alepha579.TOptional<alepha579.TString>;
954
- size: alepha579.TOptional<alepha579.TInteger>;
955
- sort: alepha579.TOptional<alepha579.TString>;
956
- action: alepha579.TOptional<alepha579.TString>;
957
- severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
958
- userRealm: alepha579.TOptional<alepha579.TString>;
959
- resourceType: alepha579.TOptional<alepha579.TString>;
960
- resourceId: alepha579.TOptional<alepha579.TString>;
961
- success: alepha579.TOptional<alepha579.TBoolean>;
962
- from: alepha579.TOptional<alepha579.TString>;
963
- to: alepha579.TOptional<alepha579.TString>;
964
- search: alepha579.TOptional<alepha579.TString>;
760
+ query: alepha381.TObject<{
761
+ type: alepha381.TOptional<alepha381.TString>;
762
+ search: alepha381.TOptional<alepha381.TString>;
763
+ action: alepha381.TOptional<alepha381.TString>;
764
+ severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
765
+ sort: alepha381.TOptional<alepha381.TString>;
766
+ userRealm: alepha381.TOptional<alepha381.TString>;
767
+ resourceType: alepha381.TOptional<alepha381.TString>;
768
+ resourceId: alepha381.TOptional<alepha381.TString>;
769
+ success: alepha381.TOptional<alepha381.TBoolean>;
770
+ page: alepha381.TOptional<alepha381.TInteger>;
771
+ size: alepha381.TOptional<alepha381.TInteger>;
772
+ from: alepha381.TOptional<alepha381.TString>;
773
+ to: alepha381.TOptional<alepha381.TString>;
965
774
  }>;
966
- response: alepha579.TPage<alepha579.TObject<{
967
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
968
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
969
- type: alepha579.TString;
970
- action: alepha579.TString;
971
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
972
- userId: alepha579.TOptional<alepha579.TString>;
973
- userRealm: alepha579.TOptional<alepha579.TString>;
974
- userEmail: alepha579.TOptional<alepha579.TString>;
975
- resourceType: alepha579.TOptional<alepha579.TString>;
976
- resourceId: alepha579.TOptional<alepha579.TString>;
977
- description: alepha579.TOptional<alepha579.TString>;
978
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
979
- ipAddress: alepha579.TOptional<alepha579.TString>;
980
- userAgent: alepha579.TOptional<alepha579.TString>;
981
- sessionId: alepha579.TOptional<alepha579.TString>;
982
- requestId: alepha579.TOptional<alepha579.TString>;
983
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
984
- errorMessage: alepha579.TOptional<alepha579.TString>;
775
+ response: alepha381.TPage<alepha381.TObject<{
776
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
777
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
778
+ type: alepha381.TString;
779
+ action: alepha381.TString;
780
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
781
+ userId: alepha381.TOptional<alepha381.TString>;
782
+ userRealm: alepha381.TOptional<alepha381.TString>;
783
+ userEmail: alepha381.TOptional<alepha381.TString>;
784
+ resourceType: alepha381.TOptional<alepha381.TString>;
785
+ resourceId: alepha381.TOptional<alepha381.TString>;
786
+ description: alepha381.TOptional<alepha381.TString>;
787
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
788
+ ipAddress: alepha381.TOptional<alepha381.TString>;
789
+ userAgent: alepha381.TOptional<alepha381.TString>;
790
+ sessionId: alepha381.TOptional<alepha381.TString>;
791
+ requestId: alepha381.TOptional<alepha381.TString>;
792
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
793
+ errorMessage: alepha381.TOptional<alepha381.TString>;
985
794
  }>>;
986
795
  }>;
987
796
  /**
988
- * Get audit entries for a specific resource.
989
- */
797
+ * Get audit entries for a specific resource.
798
+ */
990
799
  readonly findByResource: alepha_server0.ActionPrimitiveFn<{
991
- params: alepha579.TObject<{
992
- resourceType: alepha579.TString;
993
- resourceId: alepha579.TString;
800
+ params: alepha381.TObject<{
801
+ resourceType: alepha381.TString;
802
+ resourceId: alepha381.TString;
994
803
  }>;
995
- query: alepha579.TObject<{
996
- page: alepha579.TOptional<alepha579.TInteger>;
997
- type: alepha579.TOptional<alepha579.TString>;
998
- size: alepha579.TOptional<alepha579.TInteger>;
999
- sort: alepha579.TOptional<alepha579.TString>;
1000
- action: alepha579.TOptional<alepha579.TString>;
1001
- severity: alepha579.TOptional<alepha579.TUnsafe<"info" | "warning" | "critical">>;
1002
- userId: alepha579.TOptional<alepha579.TString>;
1003
- userRealm: alepha579.TOptional<alepha579.TString>;
1004
- success: alepha579.TOptional<alepha579.TBoolean>;
1005
- from: alepha579.TOptional<alepha579.TString>;
1006
- to: alepha579.TOptional<alepha579.TString>;
1007
- search: alepha579.TOptional<alepha579.TString>;
804
+ query: alepha381.TObject<{
805
+ type: alepha381.TOptional<alepha381.TString>;
806
+ search: alepha381.TOptional<alepha381.TString>;
807
+ action: alepha381.TOptional<alepha381.TString>;
808
+ severity: alepha381.TOptional<alepha381.TUnsafe<"info" | "warning" | "critical">>;
809
+ sort: alepha381.TOptional<alepha381.TString>;
810
+ userId: alepha381.TOptional<alepha381.TString>;
811
+ userRealm: alepha381.TOptional<alepha381.TString>;
812
+ success: alepha381.TOptional<alepha381.TBoolean>;
813
+ page: alepha381.TOptional<alepha381.TInteger>;
814
+ size: alepha381.TOptional<alepha381.TInteger>;
815
+ from: alepha381.TOptional<alepha381.TString>;
816
+ to: alepha381.TOptional<alepha381.TString>;
1008
817
  }>;
1009
- response: alepha579.TPage<alepha579.TObject<{
1010
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1011
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1012
- type: alepha579.TString;
1013
- action: alepha579.TString;
1014
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
1015
- userId: alepha579.TOptional<alepha579.TString>;
1016
- userRealm: alepha579.TOptional<alepha579.TString>;
1017
- userEmail: alepha579.TOptional<alepha579.TString>;
1018
- resourceType: alepha579.TOptional<alepha579.TString>;
1019
- resourceId: alepha579.TOptional<alepha579.TString>;
1020
- description: alepha579.TOptional<alepha579.TString>;
1021
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
1022
- ipAddress: alepha579.TOptional<alepha579.TString>;
1023
- userAgent: alepha579.TOptional<alepha579.TString>;
1024
- sessionId: alepha579.TOptional<alepha579.TString>;
1025
- requestId: alepha579.TOptional<alepha579.TString>;
1026
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
1027
- errorMessage: alepha579.TOptional<alepha579.TString>;
818
+ response: alepha381.TPage<alepha381.TObject<{
819
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
820
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
821
+ type: alepha381.TString;
822
+ action: alepha381.TString;
823
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
824
+ userId: alepha381.TOptional<alepha381.TString>;
825
+ userRealm: alepha381.TOptional<alepha381.TString>;
826
+ userEmail: alepha381.TOptional<alepha381.TString>;
827
+ resourceType: alepha381.TOptional<alepha381.TString>;
828
+ resourceId: alepha381.TOptional<alepha381.TString>;
829
+ description: alepha381.TOptional<alepha381.TString>;
830
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
831
+ ipAddress: alepha381.TOptional<alepha381.TString>;
832
+ userAgent: alepha381.TOptional<alepha381.TString>;
833
+ sessionId: alepha381.TOptional<alepha381.TString>;
834
+ requestId: alepha381.TOptional<alepha381.TString>;
835
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
836
+ errorMessage: alepha381.TOptional<alepha381.TString>;
1028
837
  }>>;
1029
838
  }>;
1030
839
  /**
1031
- * Get audit statistics.
1032
- */
840
+ * Get audit statistics.
841
+ */
1033
842
  readonly getStats: alepha_server0.ActionPrimitiveFn<{
1034
- query: alepha579.TObject<{
1035
- from: alepha579.TOptional<alepha579.TString>;
1036
- to: alepha579.TOptional<alepha579.TString>;
1037
- userRealm: alepha579.TOptional<alepha579.TString>;
843
+ query: alepha381.TObject<{
844
+ from: alepha381.TOptional<alepha381.TString>;
845
+ to: alepha381.TOptional<alepha381.TString>;
846
+ userRealm: alepha381.TOptional<alepha381.TString>;
1038
847
  }>;
1039
- response: alepha579.TObject<{
1040
- total: alepha579.TInteger;
1041
- byType: alepha579.TRecord<"^.*$", alepha579.TInteger>;
1042
- bySeverity: alepha579.TObject<{
1043
- info: alepha579.TInteger;
1044
- warning: alepha579.TInteger;
1045
- critical: alepha579.TInteger;
848
+ response: alepha381.TObject<{
849
+ total: alepha381.TInteger;
850
+ byType: alepha381.TRecord<"^.*$", alepha381.TInteger>;
851
+ bySeverity: alepha381.TObject<{
852
+ info: alepha381.TInteger;
853
+ warning: alepha381.TInteger;
854
+ critical: alepha381.TInteger;
1046
855
  }>;
1047
- successRate: alepha579.TNumber;
1048
- recentFailures: alepha579.TArray<alepha579.TObject<{
1049
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1050
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1051
- type: alepha579.TString;
1052
- action: alepha579.TString;
1053
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
1054
- userId: alepha579.TOptional<alepha579.TString>;
1055
- userRealm: alepha579.TOptional<alepha579.TString>;
1056
- userEmail: alepha579.TOptional<alepha579.TString>;
1057
- resourceType: alepha579.TOptional<alepha579.TString>;
1058
- resourceId: alepha579.TOptional<alepha579.TString>;
1059
- description: alepha579.TOptional<alepha579.TString>;
1060
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
1061
- ipAddress: alepha579.TOptional<alepha579.TString>;
1062
- userAgent: alepha579.TOptional<alepha579.TString>;
1063
- sessionId: alepha579.TOptional<alepha579.TString>;
1064
- requestId: alepha579.TOptional<alepha579.TString>;
1065
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
1066
- errorMessage: alepha579.TOptional<alepha579.TString>;
856
+ successRate: alepha381.TNumber;
857
+ recentFailures: alepha381.TArray<alepha381.TObject<{
858
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
859
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
860
+ type: alepha381.TString;
861
+ action: alepha381.TString;
862
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
863
+ userId: alepha381.TOptional<alepha381.TString>;
864
+ userRealm: alepha381.TOptional<alepha381.TString>;
865
+ userEmail: alepha381.TOptional<alepha381.TString>;
866
+ resourceType: alepha381.TOptional<alepha381.TString>;
867
+ resourceId: alepha381.TOptional<alepha381.TString>;
868
+ description: alepha381.TOptional<alepha381.TString>;
869
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
870
+ ipAddress: alepha381.TOptional<alepha381.TString>;
871
+ userAgent: alepha381.TOptional<alepha381.TString>;
872
+ sessionId: alepha381.TOptional<alepha381.TString>;
873
+ requestId: alepha381.TOptional<alepha381.TString>;
874
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
875
+ errorMessage: alepha381.TOptional<alepha381.TString>;
1067
876
  }>>;
1068
877
  }>;
1069
878
  }>;
1070
879
  /**
1071
- * Get registered audit types.
1072
- */
880
+ * Get registered audit types.
881
+ */
1073
882
  readonly getTypes: alepha_server0.ActionPrimitiveFn<{
1074
- response: alepha579.TArray<alepha579.TObject<{
1075
- type: alepha579.TString;
1076
- description: alepha579.TOptional<alepha579.TString>;
1077
- actions: alepha579.TArray<alepha579.TString>;
883
+ response: alepha381.TArray<alepha381.TObject<{
884
+ type: alepha381.TString;
885
+ description: alepha381.TOptional<alepha381.TString>;
886
+ actions: alepha381.TArray<alepha381.TString>;
1078
887
  }>>;
1079
888
  }>;
1080
889
  /**
1081
- * Get distinct values for filters.
1082
- */
890
+ * Get distinct values for filters.
891
+ */
1083
892
  readonly getFilterOptions: alepha_server0.ActionPrimitiveFn<{
1084
- response: alepha579.TObject<{
1085
- types: alepha579.TArray<alepha579.TString>;
1086
- actions: alepha579.TArray<alepha579.TString>;
1087
- resourceTypes: alepha579.TArray<alepha579.TString>;
1088
- userRealms: alepha579.TArray<alepha579.TString>;
893
+ response: alepha381.TObject<{
894
+ types: alepha381.TArray<alepha381.TString>;
895
+ actions: alepha381.TArray<alepha381.TString>;
896
+ resourceTypes: alepha381.TArray<alepha381.TString>;
897
+ userRealms: alepha381.TArray<alepha381.TString>;
1089
898
  }>;
1090
899
  }>;
1091
900
  }
@@ -1096,16 +905,16 @@ declare class AdminAuditController {
1096
905
  */
1097
906
  interface AuditPrimitiveOptions {
1098
907
  /**
1099
- * Unique audit type identifier (e.g., "auth", "payment", "order").
1100
- */
908
+ * Unique audit type identifier (e.g., "auth", "payment", "order").
909
+ */
1101
910
  type: string;
1102
911
  /**
1103
- * Human-readable description of this audit type.
1104
- */
912
+ * Human-readable description of this audit type.
913
+ */
1105
914
  description?: string;
1106
915
  /**
1107
- * List of allowed actions for this audit type.
1108
- */
916
+ * List of allowed actions for this audit type.
917
+ */
1109
918
  actions: string[];
1110
919
  }
1111
920
  /**
@@ -1137,32 +946,32 @@ interface AuditPrimitiveOptions {
1137
946
  declare class AuditPrimitive extends Primitive<AuditPrimitiveOptions> {
1138
947
  protected readonly auditService: AuditService;
1139
948
  /**
1140
- * The audit type identifier.
1141
- */
949
+ * The audit type identifier.
950
+ */
1142
951
  get type(): string;
1143
952
  /**
1144
- * The audit type description.
1145
- */
953
+ * The audit type description.
954
+ */
1146
955
  get description(): string | undefined;
1147
956
  /**
1148
- * The allowed actions for this audit type.
1149
- */
957
+ * The allowed actions for this audit type.
958
+ */
1150
959
  get actions(): string[];
1151
960
  /**
1152
- * Log an audit event for this type.
1153
- */
961
+ * Log an audit event for this type.
962
+ */
1154
963
  log(action: string, options?: AuditLogOptions): Promise<void>;
1155
964
  /**
1156
- * Log a successful audit event.
1157
- */
965
+ * Log a successful audit event.
966
+ */
1158
967
  logSuccess(action: string, options?: Omit<AuditLogOptions, "success">): Promise<void>;
1159
968
  /**
1160
- * Log a failed audit event.
1161
- */
969
+ * Log a failed audit event.
970
+ */
1162
971
  logFailure(action: string, errorMessage: string, options?: Omit<AuditLogOptions, "success" | "errorMessage">): Promise<void>;
1163
972
  /**
1164
- * Called during initialization to register this audit type.
1165
- */
973
+ * Called during initialization to register this audit type.
974
+ */
1166
975
  protected onInit(): void;
1167
976
  }
1168
977
  /**
@@ -1207,25 +1016,25 @@ declare const $audit: {
1207
1016
  /**
1208
1017
  * Resource schema for audit log responses.
1209
1018
  */
1210
- declare const auditResourceSchema: alepha579.TObject<{
1211
- id: PgAttr<PgAttr<alepha579.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1212
- createdAt: PgAttr<PgAttr<alepha579.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1213
- type: alepha579.TString;
1214
- action: alepha579.TString;
1215
- severity: PgAttr<alepha579.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
1216
- userId: alepha579.TOptional<alepha579.TString>;
1217
- userRealm: alepha579.TOptional<alepha579.TString>;
1218
- userEmail: alepha579.TOptional<alepha579.TString>;
1219
- resourceType: alepha579.TOptional<alepha579.TString>;
1220
- resourceId: alepha579.TOptional<alepha579.TString>;
1221
- description: alepha579.TOptional<alepha579.TString>;
1222
- metadata: alepha579.TOptional<alepha579.TRecord<string, alepha579.TAny>>;
1223
- ipAddress: alepha579.TOptional<alepha579.TString>;
1224
- userAgent: alepha579.TOptional<alepha579.TString>;
1225
- sessionId: alepha579.TOptional<alepha579.TString>;
1226
- requestId: alepha579.TOptional<alepha579.TString>;
1227
- success: PgAttr<alepha579.TBoolean, typeof PG_DEFAULT>;
1228
- errorMessage: alepha579.TOptional<alepha579.TString>;
1019
+ declare const auditResourceSchema: alepha381.TObject<{
1020
+ id: PgAttr<PgAttr<alepha381.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1021
+ createdAt: PgAttr<PgAttr<alepha381.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1022
+ type: alepha381.TString;
1023
+ action: alepha381.TString;
1024
+ severity: PgAttr<alepha381.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
1025
+ userId: alepha381.TOptional<alepha381.TString>;
1026
+ userRealm: alepha381.TOptional<alepha381.TString>;
1027
+ userEmail: alepha381.TOptional<alepha381.TString>;
1028
+ resourceType: alepha381.TOptional<alepha381.TString>;
1029
+ resourceId: alepha381.TOptional<alepha381.TString>;
1030
+ description: alepha381.TOptional<alepha381.TString>;
1031
+ metadata: alepha381.TOptional<alepha381.TRecord<string, alepha381.TAny>>;
1032
+ ipAddress: alepha381.TOptional<alepha381.TString>;
1033
+ userAgent: alepha381.TOptional<alepha381.TString>;
1034
+ sessionId: alepha381.TOptional<alepha381.TString>;
1035
+ requestId: alepha381.TOptional<alepha381.TString>;
1036
+ success: PgAttr<alepha381.TBoolean, typeof PG_DEFAULT>;
1037
+ errorMessage: alepha381.TOptional<alepha381.TString>;
1229
1038
  }>;
1230
1039
  type AuditResource = Static<typeof auditResourceSchema>;
1231
1040
  //#endregion
@@ -1268,7 +1077,7 @@ type AuditResource = Static<typeof auditResourceSchema>;
1268
1077
  * }
1269
1078
  * ```
1270
1079
  */
1271
- declare const AlephaApiAudits: alepha579.Service<alepha579.Module>;
1080
+ declare const AlephaApiAudits: alepha381.Service<alepha381.Module>;
1272
1081
  //#endregion
1273
1082
  export { $audit, AdminAuditController, AlephaApiAudits, AuditEntity, AuditLogOptions, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
1274
1083
  //# sourceMappingURL=index.d.ts.map