alepha 0.15.0 → 0.15.2

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 (551) hide show
  1. package/README.md +43 -98
  2. package/dist/api/audits/index.d.ts +630 -653
  3. package/dist/api/audits/index.d.ts.map +1 -1
  4. package/dist/api/audits/index.js +12 -35
  5. package/dist/api/audits/index.js.map +1 -1
  6. package/dist/api/files/index.d.ts +365 -358
  7. package/dist/api/files/index.d.ts.map +1 -1
  8. package/dist/api/files/index.js +12 -5
  9. package/dist/api/files/index.js.map +1 -1
  10. package/dist/api/jobs/index.d.ts +255 -248
  11. package/dist/api/jobs/index.d.ts.map +1 -1
  12. package/dist/api/jobs/index.js +10 -3
  13. package/dist/api/jobs/index.js.map +1 -1
  14. package/dist/api/keys/index.d.ts +413 -0
  15. package/dist/api/keys/index.d.ts.map +1 -0
  16. package/dist/api/keys/index.js +476 -0
  17. package/dist/api/keys/index.js.map +1 -0
  18. package/dist/api/notifications/index.browser.js +4 -4
  19. package/dist/api/notifications/index.browser.js.map +1 -1
  20. package/dist/api/notifications/index.d.ts +84 -78
  21. package/dist/api/notifications/index.d.ts.map +1 -1
  22. package/dist/api/notifications/index.js +14 -8
  23. package/dist/api/notifications/index.js.map +1 -1
  24. package/dist/api/parameters/index.d.ts +528 -535
  25. package/dist/api/parameters/index.d.ts.map +1 -1
  26. package/dist/api/parameters/index.js +30 -37
  27. package/dist/api/parameters/index.js.map +1 -1
  28. package/dist/api/users/index.d.ts +1221 -910
  29. package/dist/api/users/index.d.ts.map +1 -1
  30. package/dist/api/users/index.js +2556 -248
  31. package/dist/api/users/index.js.map +1 -1
  32. package/dist/api/verifications/index.d.ts +142 -136
  33. package/dist/api/verifications/index.d.ts.map +1 -1
  34. package/dist/api/verifications/index.js +12 -4
  35. package/dist/api/verifications/index.js.map +1 -1
  36. package/dist/batch/index.d.ts +142 -162
  37. package/dist/batch/index.d.ts.map +1 -1
  38. package/dist/batch/index.js +31 -44
  39. package/dist/batch/index.js.map +1 -1
  40. package/dist/bucket/index.d.ts +595 -171
  41. package/dist/bucket/index.d.ts.map +1 -1
  42. package/dist/bucket/index.js +1856 -12
  43. package/dist/bucket/index.js.map +1 -1
  44. package/dist/cache/core/index.d.ts +225 -53
  45. package/dist/cache/core/index.d.ts.map +1 -1
  46. package/dist/cache/core/index.js +213 -7
  47. package/dist/cache/core/index.js.map +1 -1
  48. package/dist/cache/redis/index.d.ts +1 -0
  49. package/dist/cache/redis/index.d.ts.map +1 -1
  50. package/dist/cache/redis/index.js +6 -2
  51. package/dist/cache/redis/index.js.map +1 -1
  52. package/dist/cli/index.d.ts +834 -226
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli/index.js +2872 -417
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/command/index.d.ts +458 -310
  57. package/dist/command/index.d.ts.map +1 -1
  58. package/dist/command/index.js +2011 -76
  59. package/dist/command/index.js.map +1 -1
  60. package/dist/core/index.browser.js +309 -97
  61. package/dist/core/index.browser.js.map +1 -1
  62. package/dist/core/index.d.ts +796 -701
  63. package/dist/core/index.d.ts.map +1 -1
  64. package/dist/core/index.js +329 -97
  65. package/dist/core/index.js.map +1 -1
  66. package/dist/core/index.native.js +309 -97
  67. package/dist/core/index.native.js.map +1 -1
  68. package/dist/datetime/index.d.ts +59 -44
  69. package/dist/datetime/index.d.ts.map +1 -1
  70. package/dist/datetime/index.js +15 -0
  71. package/dist/datetime/index.js.map +1 -1
  72. package/dist/email/index.d.ts +314 -19
  73. package/dist/email/index.d.ts.map +1 -1
  74. package/dist/email/index.js +1852 -7
  75. package/dist/email/index.js.map +1 -1
  76. package/dist/fake/index.d.ts +5500 -5418
  77. package/dist/fake/index.d.ts.map +1 -1
  78. package/dist/fake/index.js +113 -42
  79. package/dist/fake/index.js.map +1 -1
  80. package/dist/lock/core/index.d.ts +219 -212
  81. package/dist/lock/core/index.d.ts.map +1 -1
  82. package/dist/lock/core/index.js +11 -4
  83. package/dist/lock/core/index.js.map +1 -1
  84. package/dist/lock/redis/index.d.ts.map +1 -1
  85. package/dist/logger/index.d.ts +41 -90
  86. package/dist/logger/index.d.ts.map +1 -1
  87. package/dist/logger/index.js +15 -68
  88. package/dist/logger/index.js.map +1 -1
  89. package/dist/mcp/index.d.ts +228 -230
  90. package/dist/mcp/index.d.ts.map +1 -1
  91. package/dist/mcp/index.js +32 -31
  92. package/dist/mcp/index.js.map +1 -1
  93. package/dist/orm/index.browser.js +12 -12
  94. package/dist/orm/index.browser.js.map +1 -1
  95. package/dist/orm/index.bun.js +90 -80
  96. package/dist/orm/index.bun.js.map +1 -1
  97. package/dist/orm/index.d.ts +1434 -1459
  98. package/dist/orm/index.d.ts.map +1 -1
  99. package/dist/orm/index.js +112 -130
  100. package/dist/orm/index.js.map +1 -1
  101. package/dist/queue/core/index.d.ts +262 -254
  102. package/dist/queue/core/index.d.ts.map +1 -1
  103. package/dist/queue/core/index.js +14 -6
  104. package/dist/queue/core/index.js.map +1 -1
  105. package/dist/queue/redis/index.d.ts.map +1 -1
  106. package/dist/react/auth/index.browser.js +108 -0
  107. package/dist/react/auth/index.browser.js.map +1 -0
  108. package/dist/react/auth/index.d.ts +100 -0
  109. package/dist/react/auth/index.d.ts.map +1 -0
  110. package/dist/react/auth/index.js +145 -0
  111. package/dist/react/auth/index.js.map +1 -0
  112. package/dist/react/core/index.d.ts +469 -0
  113. package/dist/react/core/index.d.ts.map +1 -0
  114. package/dist/react/core/index.js +464 -0
  115. package/dist/react/core/index.js.map +1 -0
  116. package/dist/react/form/index.d.ts +232 -0
  117. package/dist/react/form/index.d.ts.map +1 -0
  118. package/dist/react/form/index.js +432 -0
  119. package/dist/react/form/index.js.map +1 -0
  120. package/dist/react/head/index.browser.js +423 -0
  121. package/dist/react/head/index.browser.js.map +1 -0
  122. package/dist/react/head/index.d.ts +288 -0
  123. package/dist/react/head/index.d.ts.map +1 -0
  124. package/dist/react/head/index.js +465 -0
  125. package/dist/react/head/index.js.map +1 -0
  126. package/dist/react/i18n/index.d.ts +175 -0
  127. package/dist/react/i18n/index.d.ts.map +1 -0
  128. package/dist/react/i18n/index.js +224 -0
  129. package/dist/react/i18n/index.js.map +1 -0
  130. package/dist/react/router/index.browser.js +1980 -0
  131. package/dist/react/router/index.browser.js.map +1 -0
  132. package/dist/react/router/index.d.ts +2068 -0
  133. package/dist/react/router/index.d.ts.map +1 -0
  134. package/dist/react/router/index.js +4932 -0
  135. package/dist/react/router/index.js.map +1 -0
  136. package/dist/react/websocket/index.d.ts +117 -0
  137. package/dist/react/websocket/index.d.ts.map +1 -0
  138. package/dist/react/websocket/index.js +107 -0
  139. package/dist/react/websocket/index.js.map +1 -0
  140. package/dist/redis/index.bun.js +4 -0
  141. package/dist/redis/index.bun.js.map +1 -1
  142. package/dist/redis/index.d.ts +127 -130
  143. package/dist/redis/index.d.ts.map +1 -1
  144. package/dist/redis/index.js +16 -25
  145. package/dist/redis/index.js.map +1 -1
  146. package/dist/retry/index.d.ts +80 -71
  147. package/dist/retry/index.d.ts.map +1 -1
  148. package/dist/retry/index.js +11 -2
  149. package/dist/retry/index.js.map +1 -1
  150. package/dist/router/index.d.ts +6 -6
  151. package/dist/router/index.d.ts.map +1 -1
  152. package/dist/scheduler/index.d.ts +119 -28
  153. package/dist/scheduler/index.d.ts.map +1 -1
  154. package/dist/scheduler/index.js +404 -3
  155. package/dist/scheduler/index.js.map +1 -1
  156. package/dist/security/index.d.ts +642 -228
  157. package/dist/security/index.d.ts.map +1 -1
  158. package/dist/security/index.js +1579 -37
  159. package/dist/security/index.js.map +1 -1
  160. package/dist/server/auth/index.d.ts +1141 -111
  161. package/dist/server/auth/index.d.ts.map +1 -1
  162. package/dist/server/auth/index.js +1261 -25
  163. package/dist/server/auth/index.js.map +1 -1
  164. package/dist/server/cache/index.d.ts +63 -78
  165. package/dist/server/cache/index.d.ts.map +1 -1
  166. package/dist/server/cache/index.js +7 -22
  167. package/dist/server/cache/index.js.map +1 -1
  168. package/dist/server/compress/index.d.ts +13 -5
  169. package/dist/server/compress/index.d.ts.map +1 -1
  170. package/dist/server/compress/index.js +10 -2
  171. package/dist/server/compress/index.js.map +1 -1
  172. package/dist/server/cookies/index.d.ts +46 -22
  173. package/dist/server/cookies/index.d.ts.map +1 -1
  174. package/dist/server/cookies/index.js +7 -5
  175. package/dist/server/cookies/index.js.map +1 -1
  176. package/dist/server/core/index.d.ts +307 -196
  177. package/dist/server/core/index.d.ts.map +1 -1
  178. package/dist/server/core/index.js +271 -38
  179. package/dist/server/core/index.js.map +1 -1
  180. package/dist/server/cors/index.d.ts +24 -34
  181. package/dist/server/cors/index.d.ts.map +1 -1
  182. package/dist/server/cors/index.js +7 -21
  183. package/dist/server/cors/index.js.map +1 -1
  184. package/dist/server/health/index.d.ts +25 -19
  185. package/dist/server/health/index.d.ts.map +1 -1
  186. package/dist/server/health/index.js +8 -2
  187. package/dist/server/health/index.js.map +1 -1
  188. package/dist/server/helmet/index.d.ts +13 -5
  189. package/dist/server/helmet/index.d.ts.map +1 -1
  190. package/dist/server/helmet/index.js +11 -3
  191. package/dist/server/helmet/index.js.map +1 -1
  192. package/dist/server/links/index.browser.js +9 -1
  193. package/dist/server/links/index.browser.js.map +1 -1
  194. package/dist/server/links/index.d.ts +133 -128
  195. package/dist/server/links/index.d.ts.map +1 -1
  196. package/dist/server/links/index.js +24 -11
  197. package/dist/server/links/index.js.map +1 -1
  198. package/dist/server/metrics/index.d.ts +524 -4
  199. package/dist/server/metrics/index.d.ts.map +1 -1
  200. package/dist/server/metrics/index.js +4472 -7
  201. package/dist/server/metrics/index.js.map +1 -1
  202. package/dist/server/multipart/index.d.ts +15 -9
  203. package/dist/server/multipart/index.d.ts.map +1 -1
  204. package/dist/server/multipart/index.js +9 -3
  205. package/dist/server/multipart/index.js.map +1 -1
  206. package/dist/server/proxy/index.d.ts +110 -104
  207. package/dist/server/proxy/index.d.ts.map +1 -1
  208. package/dist/server/proxy/index.js +8 -2
  209. package/dist/server/proxy/index.js.map +1 -1
  210. package/dist/server/rate-limit/index.d.ts +46 -51
  211. package/dist/server/rate-limit/index.d.ts.map +1 -1
  212. package/dist/server/rate-limit/index.js +18 -55
  213. package/dist/server/rate-limit/index.js.map +1 -1
  214. package/dist/server/static/index.d.ts +181 -48
  215. package/dist/server/static/index.d.ts.map +1 -1
  216. package/dist/server/static/index.js +1848 -5
  217. package/dist/server/static/index.js.map +1 -1
  218. package/dist/server/swagger/index.d.ts +348 -53
  219. package/dist/server/swagger/index.d.ts.map +1 -1
  220. package/dist/server/swagger/index.js +1849 -6
  221. package/dist/server/swagger/index.js.map +1 -1
  222. package/dist/sms/index.d.ts +312 -18
  223. package/dist/sms/index.d.ts.map +1 -1
  224. package/dist/sms/index.js +1854 -10
  225. package/dist/sms/index.js.map +1 -1
  226. package/dist/system/index.browser.js +496 -0
  227. package/dist/system/index.browser.js.map +1 -0
  228. package/dist/system/index.d.ts +1158 -0
  229. package/dist/system/index.d.ts.map +1 -0
  230. package/dist/{file → system}/index.js +412 -20
  231. package/dist/system/index.js.map +1 -0
  232. package/dist/thread/index.d.ts +82 -73
  233. package/dist/thread/index.d.ts.map +1 -1
  234. package/dist/thread/index.js +13 -4
  235. package/dist/thread/index.js.map +1 -1
  236. package/dist/topic/core/index.d.ts +330 -323
  237. package/dist/topic/core/index.d.ts.map +1 -1
  238. package/dist/topic/core/index.js +12 -5
  239. package/dist/topic/core/index.js.map +1 -1
  240. package/dist/topic/redis/index.d.ts +6 -6
  241. package/dist/topic/redis/index.d.ts.map +1 -1
  242. package/dist/vite/index.d.ts +163 -5825
  243. package/dist/vite/index.d.ts.map +1 -1
  244. package/dist/vite/index.js +130 -477
  245. package/dist/vite/index.js.map +1 -1
  246. package/dist/websocket/index.browser.js +3 -3
  247. package/dist/websocket/index.browser.js.map +1 -1
  248. package/dist/websocket/index.d.ts +287 -283
  249. package/dist/websocket/index.d.ts.map +1 -1
  250. package/dist/websocket/index.js +15 -11
  251. package/dist/websocket/index.js.map +1 -1
  252. package/package.json +86 -17
  253. package/src/api/audits/index.ts +10 -33
  254. package/src/api/files/__tests__/$bucket.spec.ts +1 -1
  255. package/src/api/files/controllers/AdminFileStatsController.spec.ts +1 -1
  256. package/src/api/files/controllers/FileController.spec.ts +1 -1
  257. package/src/api/files/index.ts +10 -3
  258. package/src/api/files/jobs/FileJobs.spec.ts +1 -1
  259. package/src/api/files/services/FileService.spec.ts +1 -1
  260. package/src/api/jobs/index.ts +10 -3
  261. package/src/api/keys/controllers/AdminApiKeyController.ts +75 -0
  262. package/src/api/keys/controllers/ApiKeyController.ts +103 -0
  263. package/src/api/keys/entities/apiKeyEntity.ts +41 -0
  264. package/src/api/keys/index.ts +49 -0
  265. package/src/api/keys/schemas/adminApiKeyQuerySchema.ts +7 -0
  266. package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +17 -0
  267. package/src/api/keys/schemas/createApiKeyBodySchema.ts +7 -0
  268. package/src/api/keys/schemas/createApiKeyResponseSchema.ts +11 -0
  269. package/src/api/keys/schemas/listApiKeyResponseSchema.ts +15 -0
  270. package/src/api/keys/schemas/revokeApiKeyParamsSchema.ts +5 -0
  271. package/src/api/keys/schemas/revokeApiKeyResponseSchema.ts +5 -0
  272. package/src/api/keys/services/ApiKeyService.spec.ts +553 -0
  273. package/src/api/keys/services/ApiKeyService.ts +306 -0
  274. package/src/api/logs/TODO.md +52 -0
  275. package/src/api/notifications/index.ts +10 -4
  276. package/src/api/parameters/index.ts +9 -30
  277. package/src/api/parameters/primitives/$config.ts +12 -4
  278. package/src/api/parameters/services/ConfigStore.ts +9 -3
  279. package/src/api/users/__tests__/ApiKeys-integration.spec.ts +1035 -0
  280. package/src/api/users/__tests__/ApiKeys.spec.ts +401 -0
  281. package/src/api/users/index.ts +14 -3
  282. package/src/api/users/primitives/$realm.ts +33 -5
  283. package/src/api/users/providers/RealmProvider.ts +1 -12
  284. package/src/api/users/services/SessionService.ts +1 -11
  285. package/src/api/verifications/controllers/VerificationController.ts +2 -0
  286. package/src/api/verifications/index.ts +10 -4
  287. package/src/batch/index.ts +9 -36
  288. package/src/batch/primitives/$batch.ts +0 -8
  289. package/src/batch/providers/BatchProvider.ts +29 -2
  290. package/src/bucket/__tests__/shared.ts +1 -1
  291. package/src/bucket/index.ts +13 -6
  292. package/src/bucket/primitives/$bucket.ts +1 -1
  293. package/src/bucket/providers/LocalFileStorageProvider.ts +1 -1
  294. package/src/bucket/providers/MemoryFileStorageProvider.ts +1 -1
  295. package/src/cache/core/__tests__/shared.ts +30 -0
  296. package/src/cache/core/index.ts +11 -6
  297. package/src/cache/core/primitives/$cache.spec.ts +5 -0
  298. package/src/cache/core/providers/CacheProvider.ts +17 -0
  299. package/src/cache/core/providers/MemoryCacheProvider.ts +300 -1
  300. package/src/cache/redis/__tests__/cache-redis.spec.ts +5 -0
  301. package/src/cache/redis/providers/RedisCacheProvider.ts +9 -0
  302. package/src/cli/apps/AlephaCli.ts +3 -16
  303. package/src/cli/apps/AlephaPackageBuilderCli.ts +10 -2
  304. package/src/cli/atoms/appEntryOptions.ts +13 -0
  305. package/src/cli/atoms/buildOptions.ts +1 -1
  306. package/src/cli/atoms/changelogOptions.ts +1 -1
  307. package/src/cli/commands/build.ts +64 -52
  308. package/src/cli/commands/db.ts +17 -11
  309. package/src/cli/commands/deploy.ts +1 -1
  310. package/src/cli/commands/dev.ts +13 -49
  311. package/src/cli/commands/gen/env.ts +6 -3
  312. package/src/cli/commands/gen/openapi.ts +5 -2
  313. package/src/cli/commands/init.spec.ts +544 -0
  314. package/src/cli/commands/init.ts +101 -58
  315. package/src/cli/commands/lint.ts +8 -2
  316. package/src/cli/commands/typecheck.ts +11 -0
  317. package/src/cli/defineConfig.ts +9 -0
  318. package/src/cli/index.ts +2 -1
  319. package/src/cli/providers/AppEntryProvider.ts +131 -0
  320. package/src/cli/providers/ViteBuildProvider.ts +40 -0
  321. package/src/cli/providers/ViteDevServerProvider.ts +378 -0
  322. package/src/cli/services/AlephaCliUtils.ts +39 -93
  323. package/src/cli/services/PackageManagerUtils.ts +140 -17
  324. package/src/cli/services/ProjectScaffolder.ts +169 -101
  325. package/src/cli/services/ViteUtils.ts +82 -0
  326. package/src/cli/{assets/claudeMd.ts → templates/agentMd.ts} +41 -28
  327. package/src/cli/{assets → templates}/apiHelloControllerTs.ts +2 -1
  328. package/src/cli/{assets → templates}/biomeJson.ts +2 -1
  329. package/src/cli/{assets → templates}/dummySpecTs.ts +2 -1
  330. package/src/cli/{assets → templates}/editorconfig.ts +2 -1
  331. package/src/cli/templates/gitignore.ts +39 -0
  332. package/src/cli/{assets → templates}/mainBrowserTs.ts +2 -1
  333. package/src/cli/templates/mainCss.ts +33 -0
  334. package/src/cli/templates/mainServerTs.ts +33 -0
  335. package/src/cli/{assets → templates}/tsconfigJson.ts +2 -1
  336. package/src/cli/templates/webAppRouterTs.ts +50 -0
  337. package/src/cli/templates/webHelloComponentTsx.ts +20 -0
  338. package/src/command/helpers/Runner.spec.ts +4 -0
  339. package/src/command/helpers/Runner.ts +3 -21
  340. package/src/command/index.ts +12 -4
  341. package/src/command/providers/CliProvider.spec.ts +1067 -0
  342. package/src/command/providers/CliProvider.ts +203 -40
  343. package/src/core/Alepha.ts +3 -9
  344. package/src/core/__tests__/Alepha-start.spec.ts +4 -4
  345. package/src/core/helpers/jsonSchemaToTypeBox.spec.ts +771 -0
  346. package/src/core/helpers/jsonSchemaToTypeBox.ts +62 -10
  347. package/src/core/index.shared.ts +1 -0
  348. package/src/core/index.ts +20 -0
  349. package/src/core/primitives/$module.ts +12 -0
  350. package/src/core/providers/EventManager.spec.ts +0 -71
  351. package/src/core/providers/EventManager.ts +3 -15
  352. package/src/core/providers/Json.ts +2 -14
  353. package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +257 -0
  354. package/src/core/providers/KeylessJsonSchemaCodec.ts +396 -14
  355. package/src/core/providers/SchemaValidator.spec.ts +236 -0
  356. package/src/datetime/index.ts +15 -0
  357. package/src/email/index.ts +10 -5
  358. package/src/email/providers/LocalEmailProvider.spec.ts +1 -1
  359. package/src/email/providers/LocalEmailProvider.ts +1 -1
  360. package/src/fake/__tests__/keyName.example.ts +1 -1
  361. package/src/fake/__tests__/keyName.spec.ts +5 -5
  362. package/src/fake/index.ts +9 -6
  363. package/src/fake/providers/FakeProvider.spec.ts +258 -40
  364. package/src/fake/providers/FakeProvider.ts +133 -19
  365. package/src/lock/core/index.ts +11 -4
  366. package/src/logger/index.ts +17 -66
  367. package/src/logger/providers/PrettyFormatterProvider.ts +0 -9
  368. package/src/mcp/errors/McpError.ts +30 -0
  369. package/src/mcp/index.ts +13 -27
  370. package/src/mcp/transports/SseMcpTransport.ts +6 -7
  371. package/src/orm/__tests__/PostgresProvider.spec.ts +2 -2
  372. package/src/orm/index.browser.ts +2 -2
  373. package/src/orm/index.bun.ts +4 -2
  374. package/src/orm/index.ts +21 -47
  375. package/src/orm/providers/DrizzleKitProvider.ts +3 -5
  376. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -0
  377. package/src/orm/services/Repository.ts +18 -3
  378. package/src/queue/core/index.ts +14 -6
  379. package/src/react/auth/__tests__/$auth.spec.ts +202 -0
  380. package/src/react/auth/hooks/useAuth.ts +32 -0
  381. package/src/react/auth/index.browser.ts +13 -0
  382. package/src/react/auth/index.shared.ts +2 -0
  383. package/src/react/auth/index.ts +48 -0
  384. package/src/react/auth/providers/ReactAuthProvider.ts +16 -0
  385. package/src/react/auth/services/ReactAuth.ts +135 -0
  386. package/src/react/core/__tests__/Router.spec.tsx +169 -0
  387. package/src/react/core/components/ClientOnly.tsx +49 -0
  388. package/src/react/core/components/ErrorBoundary.tsx +73 -0
  389. package/src/react/core/contexts/AlephaContext.ts +7 -0
  390. package/src/react/core/contexts/AlephaProvider.tsx +42 -0
  391. package/src/react/core/hooks/useAction.browser.spec.tsx +569 -0
  392. package/src/react/core/hooks/useAction.ts +480 -0
  393. package/src/react/core/hooks/useAlepha.ts +26 -0
  394. package/src/react/core/hooks/useClient.ts +17 -0
  395. package/src/react/core/hooks/useEvents.ts +51 -0
  396. package/src/react/core/hooks/useInject.ts +12 -0
  397. package/src/react/core/hooks/useStore.ts +52 -0
  398. package/src/react/core/index.ts +90 -0
  399. package/src/react/form/components/FormState.tsx +17 -0
  400. package/src/react/form/errors/FormValidationError.ts +18 -0
  401. package/src/react/form/hooks/useForm.browser.spec.tsx +366 -0
  402. package/src/react/form/hooks/useForm.ts +47 -0
  403. package/src/react/form/hooks/useFormState.ts +130 -0
  404. package/src/react/form/index.ts +44 -0
  405. package/src/react/form/services/FormModel.ts +614 -0
  406. package/src/react/head/helpers/SeoExpander.spec.ts +203 -0
  407. package/src/react/head/helpers/SeoExpander.ts +142 -0
  408. package/src/react/head/hooks/useHead.spec.tsx +288 -0
  409. package/src/react/head/hooks/useHead.ts +62 -0
  410. package/src/react/head/index.browser.ts +26 -0
  411. package/src/react/head/index.ts +44 -0
  412. package/src/react/head/interfaces/Head.ts +105 -0
  413. package/src/react/head/primitives/$head.ts +25 -0
  414. package/src/react/head/providers/BrowserHeadProvider.browser.spec.ts +196 -0
  415. package/src/react/head/providers/BrowserHeadProvider.ts +212 -0
  416. package/src/react/head/providers/HeadProvider.ts +168 -0
  417. package/src/react/head/providers/ServerHeadProvider.ts +31 -0
  418. package/src/react/i18n/__tests__/integration.spec.tsx +239 -0
  419. package/src/react/i18n/components/Localize.spec.tsx +357 -0
  420. package/src/react/i18n/components/Localize.tsx +35 -0
  421. package/src/react/i18n/hooks/useI18n.browser.spec.tsx +438 -0
  422. package/src/react/i18n/hooks/useI18n.ts +18 -0
  423. package/src/react/i18n/index.ts +41 -0
  424. package/src/react/i18n/primitives/$dictionary.ts +69 -0
  425. package/src/react/i18n/providers/I18nProvider.spec.ts +389 -0
  426. package/src/react/i18n/providers/I18nProvider.ts +278 -0
  427. package/src/react/router/__tests__/page-head-browser.browser.spec.ts +95 -0
  428. package/src/react/router/__tests__/page-head.spec.ts +48 -0
  429. package/src/react/router/__tests__/seo-head.spec.ts +125 -0
  430. package/src/react/router/atoms/ssrManifestAtom.ts +58 -0
  431. package/src/react/router/components/ErrorViewer.tsx +872 -0
  432. package/src/react/router/components/Link.tsx +23 -0
  433. package/src/react/router/components/NestedView.tsx +223 -0
  434. package/src/react/router/components/NotFound.tsx +30 -0
  435. package/src/react/router/constants/PAGE_PRELOAD_KEY.ts +6 -0
  436. package/src/react/router/contexts/RouterLayerContext.ts +12 -0
  437. package/src/react/router/errors/Redirection.ts +28 -0
  438. package/src/react/router/hooks/useActive.ts +52 -0
  439. package/src/react/router/hooks/useQueryParams.ts +63 -0
  440. package/src/react/router/hooks/useRouter.ts +20 -0
  441. package/src/react/router/hooks/useRouterState.ts +11 -0
  442. package/src/react/router/index.browser.ts +45 -0
  443. package/src/react/router/index.shared.ts +19 -0
  444. package/src/react/router/index.ts +142 -0
  445. package/src/react/router/primitives/$page.browser.spec.tsx +851 -0
  446. package/src/react/router/primitives/$page.spec.tsx +708 -0
  447. package/src/react/router/primitives/$page.ts +497 -0
  448. package/src/react/router/providers/ReactBrowserProvider.ts +309 -0
  449. package/src/react/router/providers/ReactBrowserRendererProvider.ts +25 -0
  450. package/src/react/router/providers/ReactBrowserRouterProvider.ts +168 -0
  451. package/src/react/router/providers/ReactPageProvider.ts +726 -0
  452. package/src/react/router/providers/ReactServerProvider.spec.tsx +316 -0
  453. package/src/react/router/providers/ReactServerProvider.ts +558 -0
  454. package/src/react/router/providers/ReactServerTemplateProvider.ts +979 -0
  455. package/src/react/router/providers/SSRManifestProvider.ts +334 -0
  456. package/src/react/router/services/ReactPageServerService.ts +48 -0
  457. package/src/react/router/services/ReactPageService.ts +27 -0
  458. package/src/react/router/services/ReactRouter.ts +262 -0
  459. package/src/react/websocket/hooks/useRoom.tsx +242 -0
  460. package/src/react/websocket/index.ts +7 -0
  461. package/src/redis/__tests__/redis.spec.ts +13 -0
  462. package/src/redis/index.ts +9 -25
  463. package/src/redis/providers/BunRedisProvider.ts +9 -0
  464. package/src/redis/providers/NodeRedisProvider.ts +8 -0
  465. package/src/redis/providers/RedisProvider.ts +16 -0
  466. package/src/retry/index.ts +11 -2
  467. package/src/router/index.ts +15 -0
  468. package/src/scheduler/index.ts +11 -2
  469. package/src/security/__tests__/BasicAuth.spec.ts +2 -0
  470. package/src/security/__tests__/ServerSecurityProvider.spec.ts +13 -5
  471. package/src/security/index.ts +15 -10
  472. package/src/security/interfaces/IssuerResolver.ts +27 -0
  473. package/src/security/primitives/$issuer.ts +55 -0
  474. package/src/security/providers/SecurityProvider.ts +179 -0
  475. package/src/security/providers/ServerBasicAuthProvider.ts +6 -2
  476. package/src/security/providers/ServerSecurityProvider.ts +36 -22
  477. package/src/server/auth/index.ts +12 -7
  478. package/src/server/cache/index.ts +7 -22
  479. package/src/server/compress/index.ts +10 -2
  480. package/src/server/cookies/index.ts +7 -5
  481. package/src/server/cookies/primitives/$cookie.ts +33 -11
  482. package/src/server/core/index.ts +17 -7
  483. package/src/server/core/interfaces/ServerRequest.ts +83 -1
  484. package/src/server/core/primitives/$action.spec.ts +1 -1
  485. package/src/server/core/primitives/$action.ts +8 -3
  486. package/src/server/core/providers/BunHttpServerProvider.ts +1 -1
  487. package/src/server/core/providers/NodeHttpServerProvider.spec.ts +125 -0
  488. package/src/server/core/providers/NodeHttpServerProvider.ts +77 -22
  489. package/src/server/core/providers/ServerLoggerProvider.ts +2 -2
  490. package/src/server/core/providers/ServerProvider.ts +9 -12
  491. package/src/server/core/services/ServerRequestParser.spec.ts +520 -0
  492. package/src/server/core/services/ServerRequestParser.ts +306 -13
  493. package/src/server/cors/index.ts +7 -21
  494. package/src/server/cors/primitives/$cors.ts +6 -2
  495. package/src/server/health/index.ts +8 -2
  496. package/src/server/helmet/index.ts +11 -3
  497. package/src/server/links/atoms/apiLinksAtom.ts +7 -0
  498. package/src/server/links/index.browser.ts +2 -0
  499. package/src/server/links/index.ts +13 -6
  500. package/src/server/metrics/index.ts +10 -3
  501. package/src/server/multipart/index.ts +9 -3
  502. package/src/server/proxy/index.ts +8 -2
  503. package/src/server/rate-limit/index.ts +21 -25
  504. package/src/server/rate-limit/primitives/$rateLimit.ts +6 -2
  505. package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +38 -14
  506. package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +22 -56
  507. package/src/server/static/index.ts +8 -2
  508. package/src/server/static/providers/ServerStaticProvider.ts +1 -1
  509. package/src/server/swagger/index.ts +9 -4
  510. package/src/server/swagger/providers/ServerSwaggerProvider.ts +1 -1
  511. package/src/sms/index.ts +9 -5
  512. package/src/sms/providers/LocalSmsProvider.spec.ts +1 -1
  513. package/src/sms/providers/LocalSmsProvider.ts +1 -1
  514. package/src/system/index.browser.ts +11 -0
  515. package/src/system/index.ts +62 -0
  516. package/src/{file → system}/providers/FileSystemProvider.ts +16 -0
  517. package/src/{file → system}/providers/MemoryFileSystemProvider.ts +116 -3
  518. package/src/system/providers/MemoryShellProvider.ts +164 -0
  519. package/src/{file → system}/providers/NodeFileSystemProvider.spec.ts +2 -2
  520. package/src/{file → system}/providers/NodeFileSystemProvider.ts +36 -0
  521. package/src/system/providers/NodeShellProvider.ts +184 -0
  522. package/src/system/providers/ShellProvider.ts +74 -0
  523. package/src/{file → system}/services/FileDetector.spec.ts +2 -2
  524. package/src/thread/index.ts +11 -2
  525. package/src/topic/core/index.ts +12 -5
  526. package/src/vite/index.ts +3 -2
  527. package/src/vite/tasks/buildClient.ts +2 -8
  528. package/src/vite/tasks/buildServer.ts +84 -21
  529. package/src/vite/tasks/copyAssets.ts +5 -4
  530. package/src/vite/tasks/generateSitemap.ts +64 -23
  531. package/src/vite/tasks/index.ts +0 -2
  532. package/src/vite/tasks/prerenderPages.ts +49 -24
  533. package/src/websocket/index.ts +12 -8
  534. package/dist/file/index.d.ts +0 -839
  535. package/dist/file/index.d.ts.map +0 -1
  536. package/dist/file/index.js.map +0 -1
  537. package/src/cli/assets/indexHtml.ts +0 -15
  538. package/src/cli/assets/mainServerTs.ts +0 -24
  539. package/src/cli/assets/webAppRouterTs.ts +0 -15
  540. package/src/cli/assets/webHelloComponentTsx.ts +0 -16
  541. package/src/cli/commands/format.ts +0 -23
  542. package/src/file/index.ts +0 -43
  543. package/src/vite/helpers/boot.ts +0 -117
  544. package/src/vite/plugins/viteAlephaDev.ts +0 -177
  545. package/src/vite/tasks/devServer.ts +0 -71
  546. package/src/vite/tasks/runAlepha.ts +0 -270
  547. /package/dist/orm/{chunk-DtkW-qnP.js → chunk-DH6iiROE.js} +0 -0
  548. /package/src/cli/{assets → templates}/apiIndexTs.ts +0 -0
  549. /package/src/cli/{assets → templates}/webIndexTs.ts +0 -0
  550. /package/src/{file → system}/errors/FileError.ts +0 -0
  551. /package/src/{file → system}/services/FileDetector.ts +0 -0
@@ -1,8 +1,8 @@
1
- import * as alepha381 from "alepha";
1
+ import * as alepha349 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_orm12 from "alepha/orm";
5
+ import * as alepha_orm0 from "alepha/orm";
6
6
  import { Page } from "alepha/orm";
7
7
  import * as alepha_logger0 from "alepha/logger";
8
8
  import "drizzle-orm/d1";
@@ -42,114 +42,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
42
42
  //#region ../../src/orm/primitives/$entity.d.ts
43
43
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
44
44
  /**
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
- */
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
+ */
48
48
  name: string;
49
49
  /**
50
- * TypeBox schema defining the table structure and column types.
51
- */
50
+ * TypeBox schema defining the table structure and column types.
51
+ */
52
52
  schema: T;
53
53
  /**
54
- * Database indexes to create for query optimization.
55
- */
54
+ * Database indexes to create for query optimization.
55
+ */
56
56
  indexes?: (Keys | {
57
57
  /**
58
- * Single column to index.
59
- */
58
+ * Single column to index.
59
+ */
60
60
  column: Keys;
61
61
  /**
62
- * Whether this should be a unique index (enforces uniqueness constraint).
63
- */
62
+ * Whether this should be a unique index (enforces uniqueness constraint).
63
+ */
64
64
  unique?: boolean;
65
65
  /**
66
- * Custom name for the index. If not provided, generates name automatically.
67
- */
66
+ * Custom name for the index. If not provided, generates name automatically.
67
+ */
68
68
  name?: string;
69
69
  } | {
70
70
  /**
71
- * Multiple columns for composite index (order matters for query optimization).
72
- */
71
+ * Multiple columns for composite index (order matters for query optimization).
72
+ */
73
73
  columns: Keys[];
74
74
  /**
75
- * Whether this should be a unique index (enforces uniqueness constraint).
76
- */
75
+ * Whether this should be a unique index (enforces uniqueness constraint).
76
+ */
77
77
  unique?: boolean;
78
78
  /**
79
- * Custom name for the index. If not provided, generates name automatically.
80
- */
79
+ * Custom name for the index. If not provided, generates name automatically.
80
+ */
81
81
  name?: string;
82
82
  })[];
83
83
  /**
84
- * Foreign key constraints to maintain referential integrity.
85
- */
84
+ * Foreign key constraints to maintain referential integrity.
85
+ */
86
86
  foreignKeys?: Array<{
87
87
  /**
88
- * Optional name for the foreign key constraint.
89
- */
88
+ * Optional name for the foreign key constraint.
89
+ */
90
90
  name?: string;
91
91
  /**
92
- * Local columns that reference the foreign table.
93
- */
92
+ * Local columns that reference the foreign table.
93
+ */
94
94
  columns: Array<keyof Static<T>>;
95
95
  /**
96
- * Referenced columns in the foreign table.
97
- * Must be EntityColumn references from other entities.
98
- */
96
+ * Referenced columns in the foreign table.
97
+ * Must be EntityColumn references from other entities.
98
+ */
99
99
  foreignColumns: Array<() => EntityColumn<any>>;
100
100
  }>;
101
101
  /**
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
- */
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
+ */
132
132
  constraints?: Array<{
133
133
  /**
134
- * Columns involved in this constraint.
135
- */
134
+ * Columns involved in this constraint.
135
+ */
136
136
  columns: Array<keyof Static<T>>;
137
137
  /**
138
- * Optional name for the constraint.
139
- */
138
+ * Optional name for the constraint.
139
+ */
140
140
  name?: string;
141
141
  /**
142
- * Whether this is a unique constraint.
143
- */
142
+ * Whether this is a unique constraint.
143
+ */
144
144
  unique?: boolean | {};
145
145
  /**
146
- * SQL expression for check constraint validation.
147
- */
146
+ * SQL expression for check constraint validation.
147
+ */
148
148
  check?: SQL;
149
149
  }>;
150
150
  /**
151
- * Advanced Drizzle ORM configuration for complex table setups.
152
- */
151
+ * Advanced Drizzle ORM configuration for complex table setups.
152
+ */
153
153
  config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
154
154
  }
155
155
  declare class EntityPrimitive<T extends TObject = TObject> {
@@ -197,8 +197,8 @@ type PgSymbols = {
197
197
  [PG_REF]: PgRefOptions;
198
198
  [PG_ENUM]: PgEnumOptions;
199
199
  /**
200
- * @deprecated Use `PG_IDENTITY` instead.
201
- */
200
+ * @deprecated Use `PG_IDENTITY` instead.
201
+ */
202
202
  [PG_SERIAL]: {};
203
203
  };
204
204
  type PgSymbolKeys = keyof PgSymbols;
@@ -232,7 +232,7 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
232
232
  /**
233
233
  * Audit severity levels for categorizing events.
234
234
  */
235
- declare const auditSeveritySchema: alepha381.TUnsafe<"info" | "warning" | "critical">;
235
+ declare const auditSeveritySchema: alepha349.TUnsafe<"info" | "warning" | "critical">;
236
236
  type AuditSeverity = Static<typeof auditSeveritySchema>;
237
237
  /**
238
238
  * Audit log entity for tracking important system events.
@@ -243,212 +243,212 @@ type AuditSeverity = Static<typeof auditSeveritySchema>;
243
243
  * - When it happened (createdAt)
244
244
  * - Context and details (metadata, ipAddress, userAgent)
245
245
  */
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>;
246
+ declare const audits: alepha_orm0.EntityPrimitive<alepha349.TObject<{
247
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
248
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
249
+ /**
250
+ * Audit event type (e.g., "auth", "user", "payment", "system").
251
+ * Used for categorizing and filtering audit events.
252
+ */
253
+ type: alepha349.TString;
254
+ /**
255
+ * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
256
+ */
257
+ action: alepha349.TString;
258
+ /**
259
+ * Severity level of the event.
260
+ */
261
+ severity: alepha_orm0.PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
262
+ /**
263
+ * User ID who performed the action (null for system events).
264
+ */
265
+ userId: alepha349.TOptional<alepha349.TString>;
266
+ /**
267
+ * User realm for multi-tenant support.
268
+ */
269
+ userRealm: alepha349.TOptional<alepha349.TString>;
270
+ /**
271
+ * User email at the time of the event (denormalized for history).
272
+ */
273
+ userEmail: alepha349.TOptional<alepha349.TString>;
274
+ /**
275
+ * Resource type affected (e.g., "user", "order", "file").
276
+ */
277
+ resourceType: alepha349.TOptional<alepha349.TString>;
278
+ /**
279
+ * Resource ID affected.
280
+ */
281
+ resourceId: alepha349.TOptional<alepha349.TString>;
282
+ /**
283
+ * Human-readable description of the event.
284
+ */
285
+ description: alepha349.TOptional<alepha349.TString>;
286
+ /**
287
+ * Additional metadata/context as JSON.
288
+ */
289
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
290
+ /**
291
+ * Client IP address.
292
+ */
293
+ ipAddress: alepha349.TOptional<alepha349.TString>;
294
+ /**
295
+ * Client user agent.
296
+ */
297
+ userAgent: alepha349.TOptional<alepha349.TString>;
298
+ /**
299
+ * Session ID if applicable.
300
+ */
301
+ sessionId: alepha349.TOptional<alepha349.TString>;
302
+ /**
303
+ * Request ID for correlation.
304
+ */
305
+ requestId: alepha349.TOptional<alepha349.TString>;
306
+ /**
307
+ * Whether the action was successful.
308
+ */
309
+ success: alepha_orm0.PgAttr<alepha349.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
310
+ /**
311
+ * Error message if the action failed.
312
+ */
313
+ errorMessage: alepha349.TOptional<alepha349.TString>;
314
314
  }>>;
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>;
315
+ declare const auditEntitySchema: alepha349.TObject<{
316
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
317
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
318
+ /**
319
+ * Audit event type (e.g., "auth", "user", "payment", "system").
320
+ * Used for categorizing and filtering audit events.
321
+ */
322
+ type: alepha349.TString;
323
+ /**
324
+ * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
325
+ */
326
+ action: alepha349.TString;
327
+ /**
328
+ * Severity level of the event.
329
+ */
330
+ severity: alepha_orm0.PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
331
+ /**
332
+ * User ID who performed the action (null for system events).
333
+ */
334
+ userId: alepha349.TOptional<alepha349.TString>;
335
+ /**
336
+ * User realm for multi-tenant support.
337
+ */
338
+ userRealm: alepha349.TOptional<alepha349.TString>;
339
+ /**
340
+ * User email at the time of the event (denormalized for history).
341
+ */
342
+ userEmail: alepha349.TOptional<alepha349.TString>;
343
+ /**
344
+ * Resource type affected (e.g., "user", "order", "file").
345
+ */
346
+ resourceType: alepha349.TOptional<alepha349.TString>;
347
+ /**
348
+ * Resource ID affected.
349
+ */
350
+ resourceId: alepha349.TOptional<alepha349.TString>;
351
+ /**
352
+ * Human-readable description of the event.
353
+ */
354
+ description: alepha349.TOptional<alepha349.TString>;
355
+ /**
356
+ * Additional metadata/context as JSON.
357
+ */
358
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
359
+ /**
360
+ * Client IP address.
361
+ */
362
+ ipAddress: alepha349.TOptional<alepha349.TString>;
363
+ /**
364
+ * Client user agent.
365
+ */
366
+ userAgent: alepha349.TOptional<alepha349.TString>;
367
+ /**
368
+ * Session ID if applicable.
369
+ */
370
+ sessionId: alepha349.TOptional<alepha349.TString>;
371
+ /**
372
+ * Request ID for correlation.
373
+ */
374
+ requestId: alepha349.TOptional<alepha349.TString>;
375
+ /**
376
+ * Whether the action was successful.
377
+ */
378
+ success: alepha_orm0.PgAttr<alepha349.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
379
+ /**
380
+ * Error message if the action failed.
381
+ */
382
+ errorMessage: alepha349.TOptional<alepha349.TString>;
383
383
  }>;
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>;
384
+ declare const auditEntityInsertSchema: alepha_orm0.TObjectInsert<alepha349.TObject<{
385
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
386
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
387
+ /**
388
+ * Audit event type (e.g., "auth", "user", "payment", "system").
389
+ * Used for categorizing and filtering audit events.
390
+ */
391
+ type: alepha349.TString;
392
+ /**
393
+ * Specific action performed (e.g., "login", "logout", "create", "update", "delete").
394
+ */
395
+ action: alepha349.TString;
396
+ /**
397
+ * Severity level of the event.
398
+ */
399
+ severity: alepha_orm0.PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
400
+ /**
401
+ * User ID who performed the action (null for system events).
402
+ */
403
+ userId: alepha349.TOptional<alepha349.TString>;
404
+ /**
405
+ * User realm for multi-tenant support.
406
+ */
407
+ userRealm: alepha349.TOptional<alepha349.TString>;
408
+ /**
409
+ * User email at the time of the event (denormalized for history).
410
+ */
411
+ userEmail: alepha349.TOptional<alepha349.TString>;
412
+ /**
413
+ * Resource type affected (e.g., "user", "order", "file").
414
+ */
415
+ resourceType: alepha349.TOptional<alepha349.TString>;
416
+ /**
417
+ * Resource ID affected.
418
+ */
419
+ resourceId: alepha349.TOptional<alepha349.TString>;
420
+ /**
421
+ * Human-readable description of the event.
422
+ */
423
+ description: alepha349.TOptional<alepha349.TString>;
424
+ /**
425
+ * Additional metadata/context as JSON.
426
+ */
427
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
428
+ /**
429
+ * Client IP address.
430
+ */
431
+ ipAddress: alepha349.TOptional<alepha349.TString>;
432
+ /**
433
+ * Client user agent.
434
+ */
435
+ userAgent: alepha349.TOptional<alepha349.TString>;
436
+ /**
437
+ * Session ID if applicable.
438
+ */
439
+ sessionId: alepha349.TOptional<alepha349.TString>;
440
+ /**
441
+ * Request ID for correlation.
442
+ */
443
+ requestId: alepha349.TOptional<alepha349.TString>;
444
+ /**
445
+ * Whether the action was successful.
446
+ */
447
+ success: alepha_orm0.PgAttr<alepha349.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
448
+ /**
449
+ * Error message if the action failed.
450
+ */
451
+ errorMessage: alepha349.TOptional<alepha349.TString>;
452
452
  }>>;
453
453
  type AuditEntity = Static<typeof audits.schema>;
454
454
  //#endregion
@@ -456,21 +456,21 @@ type AuditEntity = Static<typeof audits.schema>;
456
456
  /**
457
457
  * Query schema for searching and filtering audit logs.
458
458
  */
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>;
459
+ declare const auditQuerySchema: alepha349.TObject<{
460
+ page: alepha349.TOptional<alepha349.TInteger>;
461
+ size: alepha349.TOptional<alepha349.TInteger>;
462
+ sort: alepha349.TOptional<alepha349.TString>;
463
+ type: alepha349.TOptional<alepha349.TString>;
464
+ action: alepha349.TOptional<alepha349.TString>;
465
+ severity: alepha349.TOptional<alepha349.TUnsafe<"info" | "warning" | "critical">>;
466
+ userId: alepha349.TOptional<alepha349.TString>;
467
+ userRealm: alepha349.TOptional<alepha349.TString>;
468
+ resourceType: alepha349.TOptional<alepha349.TString>;
469
+ resourceId: alepha349.TOptional<alepha349.TString>;
470
+ success: alepha349.TOptional<alepha349.TBoolean>;
471
+ from: alepha349.TOptional<alepha349.TString>;
472
+ to: alepha349.TOptional<alepha349.TString>;
473
+ search: alepha349.TOptional<alepha349.TString>;
474
474
  }>;
475
475
  type AuditQuery = Static<typeof auditQuerySchema>;
476
476
  //#endregion
@@ -478,23 +478,23 @@ type AuditQuery = Static<typeof auditQuerySchema>;
478
478
  /**
479
479
  * Schema for creating a new audit log entry.
480
480
  */
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>;
481
+ declare const createAuditSchema: alepha349.TObject<{
482
+ type: alepha349.TString;
483
+ action: alepha349.TString;
484
+ severity: alepha349.TOptional<alepha349.TUnsafe<"info" | "warning" | "critical">>;
485
+ userId: alepha349.TOptional<alepha349.TString>;
486
+ userRealm: alepha349.TOptional<alepha349.TString>;
487
+ userEmail: alepha349.TOptional<alepha349.TString>;
488
+ resourceType: alepha349.TOptional<alepha349.TString>;
489
+ resourceId: alepha349.TOptional<alepha349.TString>;
490
+ description: alepha349.TOptional<alepha349.TString>;
491
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
492
+ ipAddress: alepha349.TOptional<alepha349.TString>;
493
+ userAgent: alepha349.TOptional<alepha349.TString>;
494
+ sessionId: alepha349.TOptional<alepha349.TString>;
495
+ requestId: alepha349.TOptional<alepha349.TString>;
496
+ success: alepha349.TOptional<alepha349.TBoolean>;
497
+ errorMessage: alepha349.TOptional<alepha349.TString>;
498
498
  }>;
499
499
  type CreateAudit = Static<typeof createAuditSchema>;
500
500
  //#endregion
@@ -519,98 +519,98 @@ interface AuditTypeDefinition {
519
519
  declare class AuditService {
520
520
  protected readonly alepha: Alepha;
521
521
  protected readonly log: alepha_logger0.Logger;
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>;
522
+ protected readonly repo: alepha_orm0.Repository<alepha349.TObject<{
523
+ id: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_PRIMARY_KEY>, typeof alepha_orm0.PG_DEFAULT>;
524
+ createdAt: alepha_orm0.PgAttr<alepha_orm0.PgAttr<alepha349.TString, typeof alepha_orm0.PG_CREATED_AT>, typeof alepha_orm0.PG_DEFAULT>;
525
+ type: alepha349.TString;
526
+ action: alepha349.TString;
527
+ severity: alepha_orm0.PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof alepha_orm0.PG_DEFAULT>;
528
+ userId: alepha349.TOptional<alepha349.TString>;
529
+ userRealm: alepha349.TOptional<alepha349.TString>;
530
+ userEmail: alepha349.TOptional<alepha349.TString>;
531
+ resourceType: alepha349.TOptional<alepha349.TString>;
532
+ resourceId: alepha349.TOptional<alepha349.TString>;
533
+ description: alepha349.TOptional<alepha349.TString>;
534
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
535
+ ipAddress: alepha349.TOptional<alepha349.TString>;
536
+ userAgent: alepha349.TOptional<alepha349.TString>;
537
+ sessionId: alepha349.TOptional<alepha349.TString>;
538
+ requestId: alepha349.TOptional<alepha349.TString>;
539
+ success: alepha_orm0.PgAttr<alepha349.TBoolean, typeof alepha_orm0.PG_DEFAULT>;
540
+ errorMessage: alepha349.TOptional<alepha349.TString>;
541
541
  }>>;
542
542
  /**
543
- * Registry of audit types and their allowed actions.
544
- */
543
+ * Registry of audit types and their allowed actions.
544
+ */
545
545
  protected readonly auditTypes: Map<string, AuditTypeDefinition>;
546
546
  /**
547
- * Register an audit type with its allowed actions.
548
- */
547
+ * Register an audit type with its allowed actions.
548
+ */
549
549
  registerType(definition: AuditTypeDefinition): void;
550
550
  /**
551
- * Get all registered audit types.
552
- */
551
+ * Get all registered audit types.
552
+ */
553
553
  getRegisteredTypes(): AuditTypeDefinition[];
554
554
  /**
555
- * Get current request context if available.
556
- */
555
+ * Get current request context if available.
556
+ */
557
557
  protected getRequestContext(): ServerRequest | undefined;
558
558
  /**
559
- * Create a new audit log entry.
560
- * Automatically populates ipAddress, userAgent, and requestId from the current request context.
561
- */
559
+ * Create a new audit log entry.
560
+ * Automatically populates ipAddress, userAgent, and requestId from the current request context.
561
+ */
562
562
  create(data: CreateAudit): Promise<AuditEntity>;
563
563
  /**
564
- * Record an audit event (convenience method).
565
- */
564
+ * Record an audit event (convenience method).
565
+ */
566
566
  record(type: string, action: string, options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
567
567
  /**
568
- * Record an authentication event.
569
- */
568
+ * Record an authentication event.
569
+ */
570
570
  recordAuth(action: "login" | "logout" | "login_failed" | "token_refresh" | "mfa_setup" | "mfa_verify", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
571
571
  /**
572
- * Record a user management event.
573
- */
572
+ * Record a user management event.
573
+ */
574
574
  recordUser(action: "create" | "update" | "delete" | "enable" | "disable" | "role_change", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
575
575
  /**
576
- * Record a data access event.
577
- */
576
+ * Record a data access event.
577
+ */
578
578
  recordAccess(action: "view" | "export" | "download", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
579
579
  /**
580
- * Record a security event.
581
- */
580
+ * Record a security event.
581
+ */
582
582
  recordSecurity(action: "permission_denied" | "suspicious_activity" | "rate_limited" | "blocked", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
583
583
  /**
584
- * Record a system event.
585
- */
584
+ * Record a system event.
585
+ */
586
586
  recordSystem(action: "startup" | "shutdown" | "config_change" | "maintenance" | "error", options?: Omit<CreateAudit, "type" | "action">): Promise<AuditEntity>;
587
587
  /**
588
- * Find audit entries with filtering and pagination.
589
- */
588
+ * Find audit entries with filtering and pagination.
589
+ */
590
590
  find(query?: AuditQuery): Promise<Page<AuditEntity>>;
591
591
  /**
592
- * Get audit entry by ID.
593
- */
592
+ * Get audit entry by ID.
593
+ */
594
594
  getById(id: string): Promise<AuditEntity>;
595
595
  /**
596
- * Get audit entries for a specific user.
597
- */
596
+ * Get audit entries for a specific user.
597
+ */
598
598
  findByUser(userId: string, query?: Omit<AuditQuery, "userId">): Promise<Page<AuditEntity>>;
599
599
  /**
600
- * Get audit entries for a specific resource.
601
- */
600
+ * Get audit entries for a specific resource.
601
+ */
602
602
  findByResource(resourceType: string, resourceId: string, query?: Omit<AuditQuery, "resourceType" | "resourceId">): Promise<Page<AuditEntity>>;
603
603
  /**
604
- * Get audit statistics for a time period.
605
- */
604
+ * Get audit statistics for a time period.
605
+ */
606
606
  getStats(options?: {
607
607
  from?: Date;
608
608
  to?: Date;
609
609
  userRealm?: string;
610
610
  }): Promise<AuditStats>;
611
611
  /**
612
- * Delete old audit entries (for retention policy).
613
- */
612
+ * Delete old audit entries (for retention policy).
613
+ */
614
614
  deleteOlderThan(date: Date): Promise<number>;
615
615
  }
616
616
  /**
@@ -639,262 +639,262 @@ declare class AdminAuditController {
639
639
  protected readonly group = "admin:audits";
640
640
  protected readonly auditService: AuditService;
641
641
  /**
642
- * Find audit entries with filtering and pagination.
643
- */
642
+ * Find audit entries with filtering and pagination.
643
+ */
644
644
  readonly findAudits: alepha_server0.ActionPrimitiveFn<{
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>;
645
+ query: alepha349.TObject<{
646
+ page: alepha349.TOptional<alepha349.TInteger>;
647
+ size: alepha349.TOptional<alepha349.TInteger>;
648
+ sort: alepha349.TOptional<alepha349.TString>;
649
+ type: alepha349.TOptional<alepha349.TString>;
650
+ action: alepha349.TOptional<alepha349.TString>;
651
+ severity: alepha349.TOptional<alepha349.TUnsafe<"info" | "warning" | "critical">>;
652
+ userId: alepha349.TOptional<alepha349.TString>;
653
+ userRealm: alepha349.TOptional<alepha349.TString>;
654
+ resourceType: alepha349.TOptional<alepha349.TString>;
655
+ resourceId: alepha349.TOptional<alepha349.TString>;
656
+ success: alepha349.TOptional<alepha349.TBoolean>;
657
+ from: alepha349.TOptional<alepha349.TString>;
658
+ to: alepha349.TOptional<alepha349.TString>;
659
+ search: alepha349.TOptional<alepha349.TString>;
660
660
  }>;
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>;
661
+ response: alepha349.TPage<alepha349.TObject<{
662
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
663
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
664
+ type: alepha349.TString;
665
+ action: alepha349.TString;
666
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
667
+ userId: alepha349.TOptional<alepha349.TString>;
668
+ userRealm: alepha349.TOptional<alepha349.TString>;
669
+ userEmail: alepha349.TOptional<alepha349.TString>;
670
+ resourceType: alepha349.TOptional<alepha349.TString>;
671
+ resourceId: alepha349.TOptional<alepha349.TString>;
672
+ description: alepha349.TOptional<alepha349.TString>;
673
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
674
+ ipAddress: alepha349.TOptional<alepha349.TString>;
675
+ userAgent: alepha349.TOptional<alepha349.TString>;
676
+ sessionId: alepha349.TOptional<alepha349.TString>;
677
+ requestId: alepha349.TOptional<alepha349.TString>;
678
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
679
+ errorMessage: alepha349.TOptional<alepha349.TString>;
680
680
  }>>;
681
681
  }>;
682
682
  /**
683
- * Get a single audit entry by ID.
684
- */
683
+ * Get a single audit entry by ID.
684
+ */
685
685
  readonly getAudit: alepha_server0.ActionPrimitiveFn<{
686
- params: alepha381.TObject<{
687
- id: alepha381.TString;
686
+ params: alepha349.TObject<{
687
+ id: alepha349.TString;
688
688
  }>;
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>;
689
+ response: alepha349.TObject<{
690
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
691
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
692
+ type: alepha349.TString;
693
+ action: alepha349.TString;
694
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
695
+ userId: alepha349.TOptional<alepha349.TString>;
696
+ userRealm: alepha349.TOptional<alepha349.TString>;
697
+ userEmail: alepha349.TOptional<alepha349.TString>;
698
+ resourceType: alepha349.TOptional<alepha349.TString>;
699
+ resourceId: alepha349.TOptional<alepha349.TString>;
700
+ description: alepha349.TOptional<alepha349.TString>;
701
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
702
+ ipAddress: alepha349.TOptional<alepha349.TString>;
703
+ userAgent: alepha349.TOptional<alepha349.TString>;
704
+ sessionId: alepha349.TOptional<alepha349.TString>;
705
+ requestId: alepha349.TOptional<alepha349.TString>;
706
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
707
+ errorMessage: alepha349.TOptional<alepha349.TString>;
708
708
  }>;
709
709
  }>;
710
710
  /**
711
- * Create a new audit entry.
712
- */
711
+ * Create a new audit entry.
712
+ */
713
713
  readonly createAudit: alepha_server0.ActionPrimitiveFn<{
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>;
714
+ body: alepha349.TObject<{
715
+ type: alepha349.TString;
716
+ action: alepha349.TString;
717
+ severity: alepha349.TOptional<alepha349.TUnsafe<"info" | "warning" | "critical">>;
718
+ userId: alepha349.TOptional<alepha349.TString>;
719
+ userRealm: alepha349.TOptional<alepha349.TString>;
720
+ userEmail: alepha349.TOptional<alepha349.TString>;
721
+ resourceType: alepha349.TOptional<alepha349.TString>;
722
+ resourceId: alepha349.TOptional<alepha349.TString>;
723
+ description: alepha349.TOptional<alepha349.TString>;
724
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
725
+ ipAddress: alepha349.TOptional<alepha349.TString>;
726
+ userAgent: alepha349.TOptional<alepha349.TString>;
727
+ sessionId: alepha349.TOptional<alepha349.TString>;
728
+ requestId: alepha349.TOptional<alepha349.TString>;
729
+ success: alepha349.TOptional<alepha349.TBoolean>;
730
+ errorMessage: alepha349.TOptional<alepha349.TString>;
731
731
  }>;
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>;
732
+ response: alepha349.TObject<{
733
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
734
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
735
+ type: alepha349.TString;
736
+ action: alepha349.TString;
737
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
738
+ userId: alepha349.TOptional<alepha349.TString>;
739
+ userRealm: alepha349.TOptional<alepha349.TString>;
740
+ userEmail: alepha349.TOptional<alepha349.TString>;
741
+ resourceType: alepha349.TOptional<alepha349.TString>;
742
+ resourceId: alepha349.TOptional<alepha349.TString>;
743
+ description: alepha349.TOptional<alepha349.TString>;
744
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
745
+ ipAddress: alepha349.TOptional<alepha349.TString>;
746
+ userAgent: alepha349.TOptional<alepha349.TString>;
747
+ sessionId: alepha349.TOptional<alepha349.TString>;
748
+ requestId: alepha349.TOptional<alepha349.TString>;
749
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
750
+ errorMessage: alepha349.TOptional<alepha349.TString>;
751
751
  }>;
752
752
  }>;
753
753
  /**
754
- * Get audit entries for a specific user.
755
- */
754
+ * Get audit entries for a specific user.
755
+ */
756
756
  readonly findByUser: alepha_server0.ActionPrimitiveFn<{
757
- params: alepha381.TObject<{
758
- userId: alepha381.TString;
757
+ params: alepha349.TObject<{
758
+ userId: alepha349.TString;
759
759
  }>;
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>;
760
+ query: alepha349.TObject<{
761
+ page: alepha349.TOptional<alepha349.TInteger>;
762
+ type: alepha349.TOptional<alepha349.TString>;
763
+ size: alepha349.TOptional<alepha349.TInteger>;
764
+ sort: alepha349.TOptional<alepha349.TString>;
765
+ action: alepha349.TOptional<alepha349.TString>;
766
+ severity: alepha349.TOptional<alepha349.TUnsafe<"info" | "warning" | "critical">>;
767
+ userRealm: alepha349.TOptional<alepha349.TString>;
768
+ resourceType: alepha349.TOptional<alepha349.TString>;
769
+ resourceId: alepha349.TOptional<alepha349.TString>;
770
+ success: alepha349.TOptional<alepha349.TBoolean>;
771
+ from: alepha349.TOptional<alepha349.TString>;
772
+ to: alepha349.TOptional<alepha349.TString>;
773
+ search: alepha349.TOptional<alepha349.TString>;
774
774
  }>;
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>;
775
+ response: alepha349.TPage<alepha349.TObject<{
776
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
777
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
778
+ type: alepha349.TString;
779
+ action: alepha349.TString;
780
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
781
+ userId: alepha349.TOptional<alepha349.TString>;
782
+ userRealm: alepha349.TOptional<alepha349.TString>;
783
+ userEmail: alepha349.TOptional<alepha349.TString>;
784
+ resourceType: alepha349.TOptional<alepha349.TString>;
785
+ resourceId: alepha349.TOptional<alepha349.TString>;
786
+ description: alepha349.TOptional<alepha349.TString>;
787
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
788
+ ipAddress: alepha349.TOptional<alepha349.TString>;
789
+ userAgent: alepha349.TOptional<alepha349.TString>;
790
+ sessionId: alepha349.TOptional<alepha349.TString>;
791
+ requestId: alepha349.TOptional<alepha349.TString>;
792
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
793
+ errorMessage: alepha349.TOptional<alepha349.TString>;
794
794
  }>>;
795
795
  }>;
796
796
  /**
797
- * Get audit entries for a specific resource.
798
- */
797
+ * Get audit entries for a specific resource.
798
+ */
799
799
  readonly findByResource: alepha_server0.ActionPrimitiveFn<{
800
- params: alepha381.TObject<{
801
- resourceType: alepha381.TString;
802
- resourceId: alepha381.TString;
800
+ params: alepha349.TObject<{
801
+ resourceType: alepha349.TString;
802
+ resourceId: alepha349.TString;
803
803
  }>;
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>;
804
+ query: alepha349.TObject<{
805
+ page: alepha349.TOptional<alepha349.TInteger>;
806
+ type: alepha349.TOptional<alepha349.TString>;
807
+ size: alepha349.TOptional<alepha349.TInteger>;
808
+ sort: alepha349.TOptional<alepha349.TString>;
809
+ action: alepha349.TOptional<alepha349.TString>;
810
+ severity: alepha349.TOptional<alepha349.TUnsafe<"info" | "warning" | "critical">>;
811
+ userId: alepha349.TOptional<alepha349.TString>;
812
+ userRealm: alepha349.TOptional<alepha349.TString>;
813
+ success: alepha349.TOptional<alepha349.TBoolean>;
814
+ from: alepha349.TOptional<alepha349.TString>;
815
+ to: alepha349.TOptional<alepha349.TString>;
816
+ search: alepha349.TOptional<alepha349.TString>;
817
817
  }>;
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>;
818
+ response: alepha349.TPage<alepha349.TObject<{
819
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
820
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
821
+ type: alepha349.TString;
822
+ action: alepha349.TString;
823
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
824
+ userId: alepha349.TOptional<alepha349.TString>;
825
+ userRealm: alepha349.TOptional<alepha349.TString>;
826
+ userEmail: alepha349.TOptional<alepha349.TString>;
827
+ resourceType: alepha349.TOptional<alepha349.TString>;
828
+ resourceId: alepha349.TOptional<alepha349.TString>;
829
+ description: alepha349.TOptional<alepha349.TString>;
830
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
831
+ ipAddress: alepha349.TOptional<alepha349.TString>;
832
+ userAgent: alepha349.TOptional<alepha349.TString>;
833
+ sessionId: alepha349.TOptional<alepha349.TString>;
834
+ requestId: alepha349.TOptional<alepha349.TString>;
835
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
836
+ errorMessage: alepha349.TOptional<alepha349.TString>;
837
837
  }>>;
838
838
  }>;
839
839
  /**
840
- * Get audit statistics.
841
- */
840
+ * Get audit statistics.
841
+ */
842
842
  readonly getStats: alepha_server0.ActionPrimitiveFn<{
843
- query: alepha381.TObject<{
844
- from: alepha381.TOptional<alepha381.TString>;
845
- to: alepha381.TOptional<alepha381.TString>;
846
- userRealm: alepha381.TOptional<alepha381.TString>;
843
+ query: alepha349.TObject<{
844
+ from: alepha349.TOptional<alepha349.TString>;
845
+ to: alepha349.TOptional<alepha349.TString>;
846
+ userRealm: alepha349.TOptional<alepha349.TString>;
847
847
  }>;
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;
848
+ response: alepha349.TObject<{
849
+ total: alepha349.TInteger;
850
+ byType: alepha349.TRecord<"^.*$", alepha349.TInteger>;
851
+ bySeverity: alepha349.TObject<{
852
+ info: alepha349.TInteger;
853
+ warning: alepha349.TInteger;
854
+ critical: alepha349.TInteger;
855
855
  }>;
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>;
856
+ successRate: alepha349.TNumber;
857
+ recentFailures: alepha349.TArray<alepha349.TObject<{
858
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
859
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
860
+ type: alepha349.TString;
861
+ action: alepha349.TString;
862
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
863
+ userId: alepha349.TOptional<alepha349.TString>;
864
+ userRealm: alepha349.TOptional<alepha349.TString>;
865
+ userEmail: alepha349.TOptional<alepha349.TString>;
866
+ resourceType: alepha349.TOptional<alepha349.TString>;
867
+ resourceId: alepha349.TOptional<alepha349.TString>;
868
+ description: alepha349.TOptional<alepha349.TString>;
869
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
870
+ ipAddress: alepha349.TOptional<alepha349.TString>;
871
+ userAgent: alepha349.TOptional<alepha349.TString>;
872
+ sessionId: alepha349.TOptional<alepha349.TString>;
873
+ requestId: alepha349.TOptional<alepha349.TString>;
874
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
875
+ errorMessage: alepha349.TOptional<alepha349.TString>;
876
876
  }>>;
877
877
  }>;
878
878
  }>;
879
879
  /**
880
- * Get registered audit types.
881
- */
880
+ * Get registered audit types.
881
+ */
882
882
  readonly getTypes: alepha_server0.ActionPrimitiveFn<{
883
- response: alepha381.TArray<alepha381.TObject<{
884
- type: alepha381.TString;
885
- description: alepha381.TOptional<alepha381.TString>;
886
- actions: alepha381.TArray<alepha381.TString>;
883
+ response: alepha349.TArray<alepha349.TObject<{
884
+ type: alepha349.TString;
885
+ description: alepha349.TOptional<alepha349.TString>;
886
+ actions: alepha349.TArray<alepha349.TString>;
887
887
  }>>;
888
888
  }>;
889
889
  /**
890
- * Get distinct values for filters.
891
- */
890
+ * Get distinct values for filters.
891
+ */
892
892
  readonly getFilterOptions: alepha_server0.ActionPrimitiveFn<{
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>;
893
+ response: alepha349.TObject<{
894
+ types: alepha349.TArray<alepha349.TString>;
895
+ actions: alepha349.TArray<alepha349.TString>;
896
+ resourceTypes: alepha349.TArray<alepha349.TString>;
897
+ userRealms: alepha349.TArray<alepha349.TString>;
898
898
  }>;
899
899
  }>;
900
900
  }
@@ -905,16 +905,16 @@ declare class AdminAuditController {
905
905
  */
906
906
  interface AuditPrimitiveOptions {
907
907
  /**
908
- * Unique audit type identifier (e.g., "auth", "payment", "order").
909
- */
908
+ * Unique audit type identifier (e.g., "auth", "payment", "order").
909
+ */
910
910
  type: string;
911
911
  /**
912
- * Human-readable description of this audit type.
913
- */
912
+ * Human-readable description of this audit type.
913
+ */
914
914
  description?: string;
915
915
  /**
916
- * List of allowed actions for this audit type.
917
- */
916
+ * List of allowed actions for this audit type.
917
+ */
918
918
  actions: string[];
919
919
  }
920
920
  /**
@@ -946,32 +946,32 @@ interface AuditPrimitiveOptions {
946
946
  declare class AuditPrimitive extends Primitive<AuditPrimitiveOptions> {
947
947
  protected readonly auditService: AuditService;
948
948
  /**
949
- * The audit type identifier.
950
- */
949
+ * The audit type identifier.
950
+ */
951
951
  get type(): string;
952
952
  /**
953
- * The audit type description.
954
- */
953
+ * The audit type description.
954
+ */
955
955
  get description(): string | undefined;
956
956
  /**
957
- * The allowed actions for this audit type.
958
- */
957
+ * The allowed actions for this audit type.
958
+ */
959
959
  get actions(): string[];
960
960
  /**
961
- * Log an audit event for this type.
962
- */
961
+ * Log an audit event for this type.
962
+ */
963
963
  log(action: string, options?: AuditLogOptions): Promise<void>;
964
964
  /**
965
- * Log a successful audit event.
966
- */
965
+ * Log a successful audit event.
966
+ */
967
967
  logSuccess(action: string, options?: Omit<AuditLogOptions, "success">): Promise<void>;
968
968
  /**
969
- * Log a failed audit event.
970
- */
969
+ * Log a failed audit event.
970
+ */
971
971
  logFailure(action: string, errorMessage: string, options?: Omit<AuditLogOptions, "success" | "errorMessage">): Promise<void>;
972
972
  /**
973
- * Called during initialization to register this audit type.
974
- */
973
+ * Called during initialization to register this audit type.
974
+ */
975
975
  protected onInit(): void;
976
976
  }
977
977
  /**
@@ -1016,68 +1016,45 @@ declare const $audit: {
1016
1016
  /**
1017
1017
  * Resource schema for audit log responses.
1018
1018
  */
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>;
1019
+ declare const auditResourceSchema: alepha349.TObject<{
1020
+ id: PgAttr<PgAttr<alepha349.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1021
+ createdAt: PgAttr<PgAttr<alepha349.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1022
+ type: alepha349.TString;
1023
+ action: alepha349.TString;
1024
+ severity: PgAttr<alepha349.TUnsafe<"info" | "warning" | "critical">, typeof PG_DEFAULT>;
1025
+ userId: alepha349.TOptional<alepha349.TString>;
1026
+ userRealm: alepha349.TOptional<alepha349.TString>;
1027
+ userEmail: alepha349.TOptional<alepha349.TString>;
1028
+ resourceType: alepha349.TOptional<alepha349.TString>;
1029
+ resourceId: alepha349.TOptional<alepha349.TString>;
1030
+ description: alepha349.TOptional<alepha349.TString>;
1031
+ metadata: alepha349.TOptional<alepha349.TRecord<string, alepha349.TAny>>;
1032
+ ipAddress: alepha349.TOptional<alepha349.TString>;
1033
+ userAgent: alepha349.TOptional<alepha349.TString>;
1034
+ sessionId: alepha349.TOptional<alepha349.TString>;
1035
+ requestId: alepha349.TOptional<alepha349.TString>;
1036
+ success: PgAttr<alepha349.TBoolean, typeof PG_DEFAULT>;
1037
+ errorMessage: alepha349.TOptional<alepha349.TString>;
1038
1038
  }>;
1039
1039
  type AuditResource = Static<typeof auditResourceSchema>;
1040
1040
  //#endregion
1041
1041
  //#region ../../src/api/audits/index.d.ts
1042
1042
  /**
1043
- * Provides audit logging API endpoints for Alepha applications.
1043
+ * | type | quality | stability |
1044
+ * |------|---------|-----------|
1045
+ * | backend | standard | stable |
1044
1046
  *
1045
- * This module includes:
1046
- * - Audit log CRUD operations
1047
- * - Filtering and searching audit events
1048
- * - Audit statistics and analytics
1049
- * - `$audit` primitive for domain-specific audit types
1047
+ * Audit trail for compliance.
1050
1048
  *
1051
- * @module alepha.api.audits
1052
- *
1053
- * @example
1054
- * ```ts
1055
- * // In your app module
1056
- * import { AlephaApiAudits } from "alepha/api/audits";
1057
- *
1058
- * const App = $module({
1059
- * name: "app",
1060
- * services: [AlephaApiAudits, ...],
1061
- * });
1062
- *
1063
- * // Create domain-specific audit types
1064
- * class PaymentAudits {
1065
- * audit = $audit({
1066
- * type: "payment",
1067
- * actions: ["create", "refund", "cancel"],
1068
- * });
1049
+ * **Features:**
1050
+ * - Domain-specific audit types
1051
+ * - Audit event logging
1052
+ * - Filtering and searching
1053
+ * - User action tracking
1069
1054
  *
1070
- * async onPaymentCreated(paymentId: string, userId: string) {
1071
- * await this.audit.log("create", {
1072
- * userId,
1073
- * resourceType: "payment",
1074
- * resourceId: paymentId,
1075
- * });
1076
- * }
1077
- * }
1078
- * ```
1055
+ * @module alepha.api.audits
1079
1056
  */
1080
- declare const AlephaApiAudits: alepha381.Service<alepha381.Module>;
1057
+ declare const AlephaApiAudits: alepha349.Service<alepha349.Module>;
1081
1058
  //#endregion
1082
1059
  export { $audit, AdminAuditController, AlephaApiAudits, AuditEntity, AuditLogOptions, AuditPrimitive, AuditPrimitiveOptions, AuditQuery, AuditResource, AuditService, AuditSeverity, AuditStats, AuditTypeDefinition, CreateAudit, auditEntityInsertSchema, auditEntitySchema, auditQuerySchema, auditResourceSchema, auditSeveritySchema, audits, createAuditSchema };
1083
1060
  //# sourceMappingURL=index.d.ts.map