alepha 0.14.3 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/README.md +2 -5
  2. package/dist/api/audits/index.d.ts +620 -811
  3. package/dist/api/audits/index.d.ts.map +1 -1
  4. package/dist/api/files/index.d.ts +185 -377
  5. package/dist/api/files/index.d.ts.map +1 -1
  6. package/dist/api/files/index.js +0 -1
  7. package/dist/api/files/index.js.map +1 -1
  8. package/dist/api/jobs/index.d.ts +245 -435
  9. package/dist/api/jobs/index.d.ts.map +1 -1
  10. package/dist/api/notifications/index.d.ts +238 -429
  11. package/dist/api/notifications/index.d.ts.map +1 -1
  12. package/dist/api/parameters/index.d.ts +236 -427
  13. package/dist/api/parameters/index.d.ts.map +1 -1
  14. package/dist/api/users/index.browser.js +1 -2
  15. package/dist/api/users/index.browser.js.map +1 -1
  16. package/dist/api/users/index.d.ts +1010 -1196
  17. package/dist/api/users/index.d.ts.map +1 -1
  18. package/dist/api/users/index.js +178 -151
  19. package/dist/api/users/index.js.map +1 -1
  20. package/dist/api/verifications/index.d.ts +17 -17
  21. package/dist/api/verifications/index.d.ts.map +1 -1
  22. package/dist/batch/index.d.ts +122 -122
  23. package/dist/batch/index.d.ts.map +1 -1
  24. package/dist/batch/index.js +1 -2
  25. package/dist/batch/index.js.map +1 -1
  26. package/dist/bucket/index.d.ts +163 -163
  27. package/dist/bucket/index.d.ts.map +1 -1
  28. package/dist/cache/core/index.d.ts +46 -46
  29. package/dist/cache/core/index.d.ts.map +1 -1
  30. package/dist/cache/redis/index.d.ts.map +1 -1
  31. package/dist/cli/index.d.ts +384 -285
  32. package/dist/cli/index.d.ts.map +1 -1
  33. package/dist/cli/index.js +1113 -623
  34. package/dist/cli/index.js.map +1 -1
  35. package/dist/command/index.d.ts +299 -300
  36. package/dist/command/index.d.ts.map +1 -1
  37. package/dist/command/index.js +13 -9
  38. package/dist/command/index.js.map +1 -1
  39. package/dist/core/index.browser.js +445 -103
  40. package/dist/core/index.browser.js.map +1 -1
  41. package/dist/core/index.d.ts +733 -625
  42. package/dist/core/index.d.ts.map +1 -1
  43. package/dist/core/index.js +446 -103
  44. package/dist/core/index.js.map +1 -1
  45. package/dist/core/index.native.js +445 -103
  46. package/dist/core/index.native.js.map +1 -1
  47. package/dist/datetime/index.d.ts +44 -44
  48. package/dist/datetime/index.d.ts.map +1 -1
  49. package/dist/datetime/index.js +4 -4
  50. package/dist/datetime/index.js.map +1 -1
  51. package/dist/email/index.d.ts +97 -50
  52. package/dist/email/index.d.ts.map +1 -1
  53. package/dist/email/index.js +129 -33
  54. package/dist/email/index.js.map +1 -1
  55. package/dist/fake/index.d.ts +7981 -14
  56. package/dist/fake/index.d.ts.map +1 -1
  57. package/dist/file/index.d.ts +523 -390
  58. package/dist/file/index.d.ts.map +1 -1
  59. package/dist/file/index.js +253 -1
  60. package/dist/file/index.js.map +1 -1
  61. package/dist/lock/core/index.d.ts +208 -208
  62. package/dist/lock/core/index.d.ts.map +1 -1
  63. package/dist/lock/redis/index.d.ts.map +1 -1
  64. package/dist/logger/index.d.ts +25 -26
  65. package/dist/logger/index.d.ts.map +1 -1
  66. package/dist/logger/index.js +12 -2
  67. package/dist/logger/index.js.map +1 -1
  68. package/dist/mcp/index.d.ts +197 -197
  69. package/dist/mcp/index.d.ts.map +1 -1
  70. package/dist/mcp/index.js +1 -1
  71. package/dist/mcp/index.js.map +1 -1
  72. package/dist/orm/chunk-DtkW-qnP.js +38 -0
  73. package/dist/orm/index.browser.js.map +1 -1
  74. package/dist/orm/index.bun.js +2814 -0
  75. package/dist/orm/index.bun.js.map +1 -0
  76. package/dist/orm/index.d.ts +1228 -1216
  77. package/dist/orm/index.d.ts.map +1 -1
  78. package/dist/orm/index.js +2041 -1967
  79. package/dist/orm/index.js.map +1 -1
  80. package/dist/queue/core/index.d.ts +248 -248
  81. package/dist/queue/core/index.d.ts.map +1 -1
  82. package/dist/queue/redis/index.d.ts.map +1 -1
  83. package/dist/redis/index.bun.js +285 -0
  84. package/dist/redis/index.bun.js.map +1 -0
  85. package/dist/redis/index.d.ts +118 -136
  86. package/dist/redis/index.d.ts.map +1 -1
  87. package/dist/redis/index.js +18 -38
  88. package/dist/redis/index.js.map +1 -1
  89. package/dist/retry/index.d.ts +69 -69
  90. package/dist/retry/index.d.ts.map +1 -1
  91. package/dist/router/index.d.ts +6 -6
  92. package/dist/router/index.d.ts.map +1 -1
  93. package/dist/scheduler/index.d.ts +25 -25
  94. package/dist/scheduler/index.d.ts.map +1 -1
  95. package/dist/security/index.browser.js +5 -1
  96. package/dist/security/index.browser.js.map +1 -1
  97. package/dist/security/index.d.ts +417 -254
  98. package/dist/security/index.d.ts.map +1 -1
  99. package/dist/security/index.js +386 -86
  100. package/dist/security/index.js.map +1 -1
  101. package/dist/server/auth/index.d.ts +110 -110
  102. package/dist/server/auth/index.d.ts.map +1 -1
  103. package/dist/server/auth/index.js +20 -20
  104. package/dist/server/auth/index.js.map +1 -1
  105. package/dist/server/cache/index.d.ts +62 -47
  106. package/dist/server/cache/index.d.ts.map +1 -1
  107. package/dist/server/cache/index.js +56 -3
  108. package/dist/server/cache/index.js.map +1 -1
  109. package/dist/server/compress/index.d.ts +6 -0
  110. package/dist/server/compress/index.d.ts.map +1 -1
  111. package/dist/server/compress/index.js +36 -1
  112. package/dist/server/compress/index.js.map +1 -1
  113. package/dist/server/cookies/index.d.ts +6 -6
  114. package/dist/server/cookies/index.d.ts.map +1 -1
  115. package/dist/server/cookies/index.js +3 -3
  116. package/dist/server/cookies/index.js.map +1 -1
  117. package/dist/server/core/index.browser.js +2 -2
  118. package/dist/server/core/index.browser.js.map +1 -1
  119. package/dist/server/core/index.d.ts +242 -150
  120. package/dist/server/core/index.d.ts.map +1 -1
  121. package/dist/server/core/index.js +294 -125
  122. package/dist/server/core/index.js.map +1 -1
  123. package/dist/server/cors/index.d.ts +11 -12
  124. package/dist/server/cors/index.d.ts.map +1 -1
  125. package/dist/server/health/index.d.ts +0 -1
  126. package/dist/server/health/index.d.ts.map +1 -1
  127. package/dist/server/helmet/index.d.ts +2 -2
  128. package/dist/server/helmet/index.d.ts.map +1 -1
  129. package/dist/server/links/index.browser.js.map +1 -1
  130. package/dist/server/links/index.d.ts +123 -124
  131. package/dist/server/links/index.d.ts.map +1 -1
  132. package/dist/server/links/index.js +1 -2
  133. package/dist/server/links/index.js.map +1 -1
  134. package/dist/server/metrics/index.d.ts.map +1 -1
  135. package/dist/server/multipart/index.d.ts +6 -6
  136. package/dist/server/multipart/index.d.ts.map +1 -1
  137. package/dist/server/proxy/index.d.ts +102 -103
  138. package/dist/server/proxy/index.d.ts.map +1 -1
  139. package/dist/server/rate-limit/index.d.ts +16 -16
  140. package/dist/server/rate-limit/index.d.ts.map +1 -1
  141. package/dist/server/static/index.d.ts +44 -44
  142. package/dist/server/static/index.d.ts.map +1 -1
  143. package/dist/server/static/index.js +4 -0
  144. package/dist/server/static/index.js.map +1 -1
  145. package/dist/server/swagger/index.d.ts +48 -49
  146. package/dist/server/swagger/index.d.ts.map +1 -1
  147. package/dist/server/swagger/index.js +3 -5
  148. package/dist/server/swagger/index.js.map +1 -1
  149. package/dist/sms/index.d.ts +13 -11
  150. package/dist/sms/index.d.ts.map +1 -1
  151. package/dist/sms/index.js +7 -7
  152. package/dist/sms/index.js.map +1 -1
  153. package/dist/thread/index.d.ts +71 -72
  154. package/dist/thread/index.d.ts.map +1 -1
  155. package/dist/topic/core/index.d.ts +318 -318
  156. package/dist/topic/core/index.d.ts.map +1 -1
  157. package/dist/topic/redis/index.d.ts +6 -6
  158. package/dist/topic/redis/index.d.ts.map +1 -1
  159. package/dist/vite/index.d.ts +5805 -249
  160. package/dist/vite/index.d.ts.map +1 -1
  161. package/dist/vite/index.js +599 -513
  162. package/dist/vite/index.js.map +1 -1
  163. package/dist/websocket/index.browser.js +6 -6
  164. package/dist/websocket/index.browser.js.map +1 -1
  165. package/dist/websocket/index.d.ts +247 -247
  166. package/dist/websocket/index.d.ts.map +1 -1
  167. package/dist/websocket/index.js +6 -6
  168. package/dist/websocket/index.js.map +1 -1
  169. package/package.json +9 -14
  170. package/src/api/files/controllers/AdminFileStatsController.ts +0 -1
  171. package/src/api/users/atoms/realmAuthSettingsAtom.ts +5 -0
  172. package/src/api/users/controllers/{UserRealmController.ts → RealmController.ts} +11 -11
  173. package/src/api/users/entities/users.ts +1 -1
  174. package/src/api/users/index.ts +8 -8
  175. package/src/api/users/primitives/{$userRealm.ts → $realm.ts} +17 -19
  176. package/src/api/users/providers/{UserRealmProvider.ts → RealmProvider.ts} +26 -30
  177. package/src/api/users/schemas/{userRealmConfigSchema.ts → realmConfigSchema.ts} +2 -2
  178. package/src/api/users/services/CredentialService.ts +7 -7
  179. package/src/api/users/services/IdentityService.ts +4 -4
  180. package/src/api/users/services/RegistrationService.spec.ts +25 -27
  181. package/src/api/users/services/RegistrationService.ts +38 -27
  182. package/src/api/users/services/SessionCrudService.ts +3 -3
  183. package/src/api/users/services/SessionService.spec.ts +3 -3
  184. package/src/api/users/services/SessionService.ts +28 -9
  185. package/src/api/users/services/UserService.ts +7 -7
  186. package/src/batch/providers/BatchProvider.ts +1 -2
  187. package/src/cli/apps/AlephaCli.ts +0 -2
  188. package/src/cli/apps/AlephaPackageBuilderCli.ts +38 -19
  189. package/src/cli/assets/apiHelloControllerTs.ts +18 -0
  190. package/src/cli/assets/apiIndexTs.ts +16 -0
  191. package/src/cli/assets/claudeMd.ts +303 -0
  192. package/src/cli/assets/mainBrowserTs.ts +2 -2
  193. package/src/cli/assets/mainServerTs.ts +24 -0
  194. package/src/cli/assets/webAppRouterTs.ts +15 -0
  195. package/src/cli/assets/webHelloComponentTsx.ts +16 -0
  196. package/src/cli/assets/webIndexTs.ts +16 -0
  197. package/src/cli/atoms/buildOptions.ts +88 -0
  198. package/src/cli/commands/build.ts +70 -87
  199. package/src/cli/commands/db.ts +21 -22
  200. package/src/cli/commands/deploy.ts +17 -5
  201. package/src/cli/commands/dev.ts +22 -14
  202. package/src/cli/commands/format.ts +8 -2
  203. package/src/cli/commands/gen/env.ts +53 -0
  204. package/src/cli/commands/gen/openapi.ts +1 -1
  205. package/src/cli/commands/gen/resource.ts +15 -0
  206. package/src/cli/commands/gen.ts +7 -1
  207. package/src/cli/commands/init.ts +74 -30
  208. package/src/cli/commands/lint.ts +8 -2
  209. package/src/cli/commands/test.ts +8 -3
  210. package/src/cli/commands/typecheck.ts +5 -1
  211. package/src/cli/commands/verify.ts +5 -3
  212. package/src/cli/defineConfig.ts +49 -7
  213. package/src/cli/index.ts +0 -1
  214. package/src/cli/services/AlephaCliUtils.ts +39 -589
  215. package/src/cli/services/PackageManagerUtils.ts +301 -0
  216. package/src/cli/services/ProjectScaffolder.ts +306 -0
  217. package/src/command/helpers/Runner.spec.ts +2 -2
  218. package/src/command/helpers/Runner.ts +16 -4
  219. package/src/command/primitives/$command.ts +0 -6
  220. package/src/command/providers/CliProvider.ts +1 -3
  221. package/src/core/Alepha.ts +42 -0
  222. package/src/core/__tests__/Alepha-graph.spec.ts +4 -0
  223. package/src/core/index.shared.ts +1 -0
  224. package/src/core/index.ts +2 -0
  225. package/src/core/primitives/$hook.ts +6 -2
  226. package/src/core/primitives/$module.spec.ts +4 -0
  227. package/src/core/providers/AlsProvider.ts +1 -1
  228. package/src/core/providers/CodecManager.spec.ts +12 -6
  229. package/src/core/providers/CodecManager.ts +26 -6
  230. package/src/core/providers/EventManager.ts +169 -13
  231. package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +621 -0
  232. package/src/core/providers/KeylessJsonSchemaCodec.ts +407 -0
  233. package/src/core/providers/StateManager.spec.ts +27 -16
  234. package/src/email/providers/LocalEmailProvider.spec.ts +111 -87
  235. package/src/email/providers/LocalEmailProvider.ts +52 -15
  236. package/src/email/providers/NodemailerEmailProvider.ts +167 -56
  237. package/src/file/errors/FileError.ts +7 -0
  238. package/src/file/index.ts +9 -1
  239. package/src/file/providers/MemoryFileSystemProvider.ts +393 -0
  240. package/src/logger/index.ts +15 -3
  241. package/src/mcp/transports/StdioMcpTransport.ts +1 -1
  242. package/src/orm/index.browser.ts +1 -19
  243. package/src/orm/index.bun.ts +77 -0
  244. package/src/orm/index.shared-server.ts +22 -0
  245. package/src/orm/index.shared.ts +15 -0
  246. package/src/orm/index.ts +13 -39
  247. package/src/orm/providers/drivers/BunPostgresProvider.ts +3 -5
  248. package/src/orm/providers/drivers/BunSqliteProvider.ts +1 -1
  249. package/src/orm/providers/drivers/CloudflareD1Provider.ts +4 -0
  250. package/src/orm/providers/drivers/DatabaseProvider.ts +4 -0
  251. package/src/orm/providers/drivers/PglitePostgresProvider.ts +4 -0
  252. package/src/orm/services/Repository.ts +8 -0
  253. package/src/queue/core/providers/WorkerProvider.spec.ts +48 -32
  254. package/src/redis/index.bun.ts +35 -0
  255. package/src/redis/providers/BunRedisProvider.ts +12 -43
  256. package/src/redis/providers/BunRedisSubscriberProvider.ts +2 -3
  257. package/src/redis/providers/NodeRedisProvider.ts +16 -34
  258. package/src/{server/security → security}/__tests__/BasicAuth.spec.ts +11 -11
  259. package/src/{server/security → security}/__tests__/ServerSecurityProvider-realm.spec.ts +21 -16
  260. package/src/{server/security/providers → security/__tests__}/ServerSecurityProvider.spec.ts +5 -5
  261. package/src/security/index.browser.ts +5 -0
  262. package/src/security/index.ts +90 -7
  263. package/src/security/primitives/{$realm.spec.ts → $issuer.spec.ts} +11 -11
  264. package/src/security/primitives/{$realm.ts → $issuer.ts} +20 -17
  265. package/src/security/primitives/$role.ts +5 -5
  266. package/src/security/primitives/$serviceAccount.spec.ts +5 -5
  267. package/src/security/primitives/$serviceAccount.ts +3 -3
  268. package/src/{server/security → security}/providers/ServerSecurityProvider.ts +5 -7
  269. package/src/server/auth/primitives/$auth.ts +10 -10
  270. package/src/server/auth/primitives/$authCredentials.ts +3 -3
  271. package/src/server/auth/primitives/$authGithub.ts +3 -3
  272. package/src/server/auth/primitives/$authGoogle.ts +3 -3
  273. package/src/server/auth/providers/ServerAuthProvider.ts +13 -13
  274. package/src/server/cache/providers/ServerCacheProvider.spec.ts +183 -0
  275. package/src/server/cache/providers/ServerCacheProvider.ts +95 -10
  276. package/src/server/compress/providers/ServerCompressProvider.ts +61 -2
  277. package/src/server/cookies/providers/ServerCookiesProvider.ts +3 -3
  278. package/src/server/core/helpers/ServerReply.ts +2 -2
  279. package/src/server/core/providers/NodeHttpServerProvider.ts +25 -6
  280. package/src/server/core/providers/ServerBodyParserProvider.ts +19 -23
  281. package/src/server/core/providers/ServerLoggerProvider.ts +23 -19
  282. package/src/server/core/providers/ServerProvider.ts +155 -22
  283. package/src/server/core/providers/ServerRouterProvider.ts +259 -115
  284. package/src/server/core/providers/ServerTimingProvider.ts +2 -2
  285. package/src/server/links/index.ts +1 -1
  286. package/src/server/links/providers/LinkProvider.ts +1 -1
  287. package/src/server/static/providers/ServerStaticProvider.ts +10 -0
  288. package/src/server/swagger/index.ts +1 -1
  289. package/src/server/swagger/providers/ServerSwaggerProvider.ts +5 -8
  290. package/src/sms/providers/LocalSmsProvider.spec.ts +153 -111
  291. package/src/sms/providers/LocalSmsProvider.ts +8 -7
  292. package/src/vite/helpers/boot.ts +28 -17
  293. package/src/vite/helpers/importViteReact.ts +13 -0
  294. package/src/vite/index.ts +1 -21
  295. package/src/vite/plugins/viteAlephaDev.ts +16 -1
  296. package/src/vite/plugins/viteAlephaSsrPreload.ts +222 -0
  297. package/src/vite/tasks/buildClient.ts +11 -0
  298. package/src/vite/tasks/buildServer.ts +59 -4
  299. package/src/vite/tasks/devServer.ts +71 -0
  300. package/src/vite/tasks/generateCloudflare.ts +7 -0
  301. package/src/vite/tasks/index.ts +2 -1
  302. package/dist/server/security/index.browser.js +0 -13
  303. package/dist/server/security/index.browser.js.map +0 -1
  304. package/dist/server/security/index.d.ts +0 -173
  305. package/dist/server/security/index.d.ts.map +0 -1
  306. package/dist/server/security/index.js +0 -311
  307. package/dist/server/security/index.js.map +0 -1
  308. package/src/cli/assets/appRouterTs.ts +0 -9
  309. package/src/cli/assets/mainTs.ts +0 -13
  310. package/src/cli/assets/viteConfigTs.ts +0 -14
  311. package/src/cli/commands/run.ts +0 -24
  312. package/src/server/security/index.browser.ts +0 -10
  313. package/src/server/security/index.ts +0 -94
  314. package/src/vite/plugins/viteAlepha.ts +0 -37
  315. package/src/vite/plugins/viteAlephaBuild.ts +0 -281
  316. /package/src/{server/security → security}/primitives/$basicAuth.ts +0 -0
  317. /package/src/{server/security → security}/providers/ServerBasicAuthProvider.ts +0 -0
@@ -1,4 +1,4 @@
1
- import * as alepha252 from "alepha";
1
+ import * as alepha133 from "alepha";
2
2
  import { Alepha, AlephaError, KIND, Primitive, Static, StaticEncode, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
3
3
  import * as alepha_server0 from "alepha/server";
4
4
  import * as alepha_orm50 from "alepha/orm";
@@ -9,19 +9,12 @@ import * as alepha_logger0 from "alepha/logger";
9
9
  import * as alepha_queue0 from "alepha/queue";
10
10
  import { EmailProvider } from "alepha/email";
11
11
  import { SmsProvider } from "alepha/sms";
12
- import "bun";
13
- import "bun:sqlite";
14
- import "drizzle-orm/bun-sql";
15
- import "drizzle-orm/bun-sqlite";
16
12
  import "drizzle-orm/d1";
17
13
  import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
18
14
  import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
19
15
  import "alepha/retry";
20
- import "alepha/lock";
21
16
  import * as typebox0 from "typebox";
22
17
  import "drizzle-orm/sqlite-core";
23
- import "drizzle-orm/postgres-js";
24
- import "postgres";
25
18
 
26
19
  //#region ../../src/orm/schemas/insertSchema.d.ts
27
20
  /**
@@ -53,114 +46,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
53
46
  //#region ../../src/orm/primitives/$entity.d.ts
54
47
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
55
48
  /**
56
- * The database table name that will be created for this entity.
57
- * If not provided, name will be inferred from the $repository variable name.
58
- */
49
+ * The database table name that will be created for this entity.
50
+ * If not provided, name will be inferred from the $repository variable name.
51
+ */
59
52
  name: string;
60
53
  /**
61
- * TypeBox schema defining the table structure and column types.
62
- */
54
+ * TypeBox schema defining the table structure and column types.
55
+ */
63
56
  schema: T;
64
57
  /**
65
- * Database indexes to create for query optimization.
66
- */
58
+ * Database indexes to create for query optimization.
59
+ */
67
60
  indexes?: (Keys | {
68
61
  /**
69
- * Single column to index.
70
- */
62
+ * Single column to index.
63
+ */
71
64
  column: Keys;
72
65
  /**
73
- * Whether this should be a unique index (enforces uniqueness constraint).
74
- */
66
+ * Whether this should be a unique index (enforces uniqueness constraint).
67
+ */
75
68
  unique?: boolean;
76
69
  /**
77
- * Custom name for the index. If not provided, generates name automatically.
78
- */
70
+ * Custom name for the index. If not provided, generates name automatically.
71
+ */
79
72
  name?: string;
80
73
  } | {
81
74
  /**
82
- * Multiple columns for composite index (order matters for query optimization).
83
- */
75
+ * Multiple columns for composite index (order matters for query optimization).
76
+ */
84
77
  columns: Keys[];
85
78
  /**
86
- * Whether this should be a unique index (enforces uniqueness constraint).
87
- */
79
+ * Whether this should be a unique index (enforces uniqueness constraint).
80
+ */
88
81
  unique?: boolean;
89
82
  /**
90
- * Custom name for the index. If not provided, generates name automatically.
91
- */
83
+ * Custom name for the index. If not provided, generates name automatically.
84
+ */
92
85
  name?: string;
93
86
  })[];
94
87
  /**
95
- * Foreign key constraints to maintain referential integrity.
96
- */
88
+ * Foreign key constraints to maintain referential integrity.
89
+ */
97
90
  foreignKeys?: Array<{
98
91
  /**
99
- * Optional name for the foreign key constraint.
100
- */
92
+ * Optional name for the foreign key constraint.
93
+ */
101
94
  name?: string;
102
95
  /**
103
- * Local columns that reference the foreign table.
104
- */
96
+ * Local columns that reference the foreign table.
97
+ */
105
98
  columns: Array<keyof Static<T>>;
106
99
  /**
107
- * Referenced columns in the foreign table.
108
- * Must be EntityColumn references from other entities.
109
- */
100
+ * Referenced columns in the foreign table.
101
+ * Must be EntityColumn references from other entities.
102
+ */
110
103
  foreignColumns: Array<() => EntityColumn<any>>;
111
104
  }>;
112
105
  /**
113
- * Additional table constraints for data validation.
114
- *
115
- * Constraints enforce business rules at the database level, providing
116
- * an additional layer of data integrity beyond application validation.
117
- *
118
- * **Constraint Types**:
119
- * - **Unique constraints**: Prevent duplicate values across columns
120
- * - **Check constraints**: Enforce custom validation rules with SQL expressions
121
- *
122
- * @example
123
- * ```ts
124
- * constraints: [
125
- * {
126
- * name: "unique_user_email",
127
- * columns: ["email"],
128
- * unique: true
129
- * },
130
- * {
131
- * name: "valid_age_range",
132
- * columns: ["age"],
133
- * check: sql`age >= 0 AND age <= 150`
134
- * },
135
- * {
136
- * name: "unique_user_username_per_tenant",
137
- * columns: ["tenantId", "username"],
138
- * unique: true
139
- * }
140
- * ]
141
- * ```
142
- */
106
+ * Additional table constraints for data validation.
107
+ *
108
+ * Constraints enforce business rules at the database level, providing
109
+ * an additional layer of data integrity beyond application validation.
110
+ *
111
+ * **Constraint Types**:
112
+ * - **Unique constraints**: Prevent duplicate values across columns
113
+ * - **Check constraints**: Enforce custom validation rules with SQL expressions
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * constraints: [
118
+ * {
119
+ * name: "unique_user_email",
120
+ * columns: ["email"],
121
+ * unique: true
122
+ * },
123
+ * {
124
+ * name: "valid_age_range",
125
+ * columns: ["age"],
126
+ * check: sql`age >= 0 AND age <= 150`
127
+ * },
128
+ * {
129
+ * name: "unique_user_username_per_tenant",
130
+ * columns: ["tenantId", "username"],
131
+ * unique: true
132
+ * }
133
+ * ]
134
+ * ```
135
+ */
143
136
  constraints?: Array<{
144
137
  /**
145
- * Columns involved in this constraint.
146
- */
138
+ * Columns involved in this constraint.
139
+ */
147
140
  columns: Array<keyof Static<T>>;
148
141
  /**
149
- * Optional name for the constraint.
150
- */
142
+ * Optional name for the constraint.
143
+ */
151
144
  name?: string;
152
145
  /**
153
- * Whether this is a unique constraint.
154
- */
146
+ * Whether this is a unique constraint.
147
+ */
155
148
  unique?: boolean | {};
156
149
  /**
157
- * SQL expression for check constraint validation.
158
- */
150
+ * SQL expression for check constraint validation.
151
+ */
159
152
  check?: SQL;
160
153
  }>;
161
154
  /**
162
- * Advanced Drizzle ORM configuration for complex table setups.
163
- */
155
+ * Advanced Drizzle ORM configuration for complex table setups.
156
+ */
164
157
  config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
165
158
  }
166
159
  declare class EntityPrimitive<T extends TObject = TObject> {
@@ -208,8 +201,8 @@ type PgSymbols = {
208
201
  [PG_REF]: PgRefOptions;
209
202
  [PG_ENUM]: PgEnumOptions;
210
203
  /**
211
- * @deprecated Use `PG_IDENTITY` instead.
212
- */
204
+ * @deprecated Use `PG_IDENTITY` instead.
205
+ */
213
206
  [PG_SERIAL]: {};
214
207
  };
215
208
  type PgSymbolKeys = keyof PgSymbols;
@@ -239,232 +232,48 @@ interface PgRefOptions {
239
232
  */
240
233
  type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
241
234
  //#endregion
242
- //#region ../../src/orm/providers/drivers/BunPostgresProvider.d.ts
243
- declare module "alepha" {
244
- interface Env extends Partial<Static<typeof envSchema$1>> {}
245
- }
246
- declare const envSchema$1: alepha252.TObject<{
247
- /**
248
- * Main configuration for database connection.
249
- * Accept a string in the format of a Postgres connection URL.
250
- * Example: postgres://user:password@localhost:5432/database
251
- * or
252
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
253
- */
254
- DATABASE_URL: alepha252.TOptional<alepha252.TString>;
255
- /**
256
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
257
- */
258
- POSTGRES_SCHEMA: alepha252.TOptional<alepha252.TString>;
259
- }>;
260
- /**
261
- * Bun PostgreSQL provider using Drizzle ORM with Bun's native SQL client.
262
- *
263
- * This provider uses Bun's built-in SQL class for PostgreSQL connections,
264
- * which provides excellent performance on the Bun runtime.
265
- *
266
- * @example
267
- * ```ts
268
- * // Set DATABASE_URL environment variable
269
- * // DATABASE_URL=postgres://user:password@localhost:5432/database
270
- *
271
- * // Or configure programmatically
272
- * alepha.with({
273
- * provide: DatabaseProvider,
274
- * use: BunPostgresProvider,
275
- * });
276
- * ```
277
- */
278
- //#endregion
279
- //#region ../../src/orm/providers/drivers/BunSqliteProvider.d.ts
280
- /**
281
- * Configuration options for the Bun SQLite database provider.
282
- */
283
- declare const bunSqliteOptions: alepha252.Atom<alepha252.TObject<{
284
- path: alepha252.TOptional<alepha252.TString>;
285
- }>, "alepha.postgres.bun-sqlite.options">;
286
- type BunSqliteProviderOptions = Static<typeof bunSqliteOptions.schema>;
287
- declare module "alepha" {
288
- interface State {
289
- [bunSqliteOptions.key]: BunSqliteProviderOptions;
290
- }
291
- }
292
- /**
293
- * Bun SQLite provider using Drizzle ORM with Bun's native SQLite client.
294
- *
295
- * This provider uses Bun's built-in `bun:sqlite` for SQLite connections,
296
- * which provides excellent performance on the Bun runtime.
297
- *
298
- * @example
299
- * ```ts
300
- * // Set DATABASE_URL environment variable
301
- * // DATABASE_URL=sqlite://./my-database.db
302
- *
303
- * // Or configure programmatically
304
- * alepha.with({
305
- * provide: DatabaseProvider,
306
- * use: BunSqliteProvider,
307
- * });
308
- *
309
- * // Or use options atom
310
- * alepha.store.mut(bunSqliteOptions, (old) => ({
311
- * ...old,
312
- * path: ":memory:",
313
- * }));
314
- * ```
315
- */
316
- //#endregion
317
- //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
318
- declare module "alepha" {
319
- interface Env extends Partial<Static<typeof envSchema>> {}
320
- }
321
- declare const envSchema: alepha252.TObject<{
322
- /**
323
- * Main configuration for database connection.
324
- * Accept a string in the format of a Postgres connection URL.
325
- * Example: postgres://user:password@localhost:5432/database
326
- * or
327
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
328
- */
329
- DATABASE_URL: alepha252.TOptional<alepha252.TString>;
330
- /**
331
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
332
- *
333
- * It will monkey patch drizzle tables.
334
- */
335
- POSTGRES_SCHEMA: alepha252.TOptional<alepha252.TString>;
336
- }>;
337
- //#endregion
338
- //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
339
- /**
340
- * Configuration options for the Node.js SQLite database provider.
341
- */
342
- declare const nodeSqliteOptions: alepha252.Atom<alepha252.TObject<{
343
- path: alepha252.TOptional<alepha252.TString>;
344
- }>, "alepha.postgres.node-sqlite.options">;
345
- type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
346
- declare module "alepha" {
347
- interface State {
348
- [nodeSqliteOptions.key]: NodeSqliteProviderOptions;
349
- }
350
- }
351
- /**
352
- * Add a fake support for SQLite in Node.js based on Postgres interfaces.
353
- *
354
- * This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
355
- * This is NOT recommended for production use.
356
- */
357
- //#endregion
358
- //#region ../../src/orm/index.d.ts
359
- declare module "alepha" {
360
- interface Hooks {
361
- /**
362
- * Fires before creating an entity in the repository.
363
- */
364
- "repository:create:before": {
365
- tableName: string;
366
- data: any;
367
- };
368
- /**
369
- * Fires after creating an entity in the repository.
370
- */
371
- "repository:create:after": {
372
- tableName: string;
373
- data: any;
374
- entity: any;
375
- };
376
- /**
377
- * Fires before updating entities in the repository.
378
- */
379
- "repository:update:before": {
380
- tableName: string;
381
- where: any;
382
- data: any;
383
- };
384
- /**
385
- * Fires after updating entities in the repository.
386
- */
387
- "repository:update:after": {
388
- tableName: string;
389
- where: any;
390
- data: any;
391
- entities: any[];
392
- };
393
- /**
394
- * Fires before deleting entities from the repository.
395
- */
396
- "repository:delete:before": {
397
- tableName: string;
398
- where: any;
399
- };
400
- /**
401
- * Fires after deleting entities from the repository.
402
- */
403
- "repository:delete:after": {
404
- tableName: string;
405
- where: any;
406
- ids: Array<string | number>;
407
- };
408
- /**
409
- * Fires before reading entities from the repository.
410
- */
411
- "repository:read:before": {
412
- tableName: string;
413
- query: any;
414
- };
415
- /**
416
- * Fires after reading entities from the repository.
417
- */
418
- "repository:read:after": {
419
- tableName: string;
420
- query: any;
421
- entities: any[];
422
- };
423
- }
424
- }
425
- //#endregion
426
235
  //#region ../../src/api/notifications/entities/notifications.d.ts
427
- declare const notifications: alepha_orm50.EntityPrimitive<alepha252.TObject<{
428
- id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
429
- version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
430
- createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
431
- updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
432
- type: alepha252.TUnsafe<"email" | "sms">;
433
- template: alepha252.TString;
434
- category: alepha252.TOptional<alepha252.TString>;
435
- critical: alepha252.TOptional<alepha252.TBoolean>;
436
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
437
- contact: alepha252.TString;
438
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
439
- scheduledAt: alepha252.TOptional<alepha252.TString>;
440
- sentAt: alepha252.TOptional<alepha252.TString>;
441
- error: alepha252.TOptional<alepha252.TObject<{
442
- at: alepha252.TString;
443
- name: alepha252.TString;
444
- message: alepha252.TString;
236
+ declare const notifications: alepha_orm50.EntityPrimitive<alepha133.TObject<{
237
+ id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
238
+ version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
239
+ createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
240
+ updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
241
+ type: alepha133.TUnsafe<"email" | "sms">;
242
+ template: alepha133.TString;
243
+ category: alepha133.TOptional<alepha133.TString>;
244
+ critical: alepha133.TOptional<alepha133.TBoolean>;
245
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
246
+ contact: alepha133.TString;
247
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
248
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
249
+ sentAt: alepha133.TOptional<alepha133.TString>;
250
+ error: alepha133.TOptional<alepha133.TObject<{
251
+ at: alepha133.TString;
252
+ name: alepha133.TString;
253
+ message: alepha133.TString;
445
254
  }>>;
446
255
  }>>;
447
256
  type NotificationEntity = Static<typeof notifications.schema>;
448
257
  //#endregion
449
258
  //#region ../../src/api/notifications/schemas/notificationCreateSchema.d.ts
450
- declare const notificationCreateSchema: alepha252.TObject<{
451
- type: alepha252.TUnsafe<"email" | "sms">;
452
- template: alepha252.TString;
453
- contact: alepha252.TString;
454
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
259
+ declare const notificationCreateSchema: alepha133.TObject<{
260
+ type: alepha133.TUnsafe<"email" | "sms">;
261
+ template: alepha133.TString;
262
+ contact: alepha133.TString;
263
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
455
264
  }>;
456
265
  type NotificationCreate = Static<typeof notificationCreateSchema>;
457
266
  //#endregion
458
267
  //#region ../../src/api/notifications/schemas/notificationQuerySchema.d.ts
459
- declare const notificationQuerySchema: alepha252.TObject<{
460
- page: alepha252.TOptional<alepha252.TInteger>;
461
- size: alepha252.TOptional<alepha252.TInteger>;
462
- sort: alepha252.TOptional<alepha252.TString>;
463
- type: alepha252.TOptional<alepha252.TUnsafe<"email" | "sms">>;
464
- template: alepha252.TOptional<alepha252.TString>;
465
- contact: alepha252.TOptional<alepha252.TString>;
466
- category: alepha252.TOptional<alepha252.TString>;
467
- status: alepha252.TOptional<alepha252.TUnsafe<"pending" | "sent" | "failed">>;
268
+ declare const notificationQuerySchema: alepha133.TObject<{
269
+ page: alepha133.TOptional<alepha133.TInteger>;
270
+ size: alepha133.TOptional<alepha133.TInteger>;
271
+ sort: alepha133.TOptional<alepha133.TString>;
272
+ type: alepha133.TOptional<alepha133.TUnsafe<"email" | "sms">>;
273
+ template: alepha133.TOptional<alepha133.TString>;
274
+ contact: alepha133.TOptional<alepha133.TString>;
275
+ category: alepha133.TOptional<alepha133.TString>;
276
+ status: alepha133.TOptional<alepha133.TUnsafe<"pending" | "sent" | "failed">>;
468
277
  }>;
469
278
  type NotificationQuery = Static<typeof notificationQuerySchema>;
470
279
  //#endregion
@@ -536,24 +345,24 @@ interface NotificationMessage<T extends TObject> {
536
345
  declare class NotificationSenderService {
537
346
  protected readonly alepha: Alepha;
538
347
  protected readonly log: alepha_logger0.Logger;
539
- protected readonly notificationRepository: alepha_orm50.Repository<alepha252.TObject<{
540
- id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
541
- version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
542
- createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
543
- updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
544
- type: alepha252.TUnsafe<"email" | "sms">;
545
- template: alepha252.TString;
546
- category: alepha252.TOptional<alepha252.TString>;
547
- critical: alepha252.TOptional<alepha252.TBoolean>;
548
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
549
- contact: alepha252.TString;
550
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
551
- scheduledAt: alepha252.TOptional<alepha252.TString>;
552
- sentAt: alepha252.TOptional<alepha252.TString>;
553
- error: alepha252.TOptional<alepha252.TObject<{
554
- at: alepha252.TString;
555
- name: alepha252.TString;
556
- message: alepha252.TString;
348
+ protected readonly notificationRepository: alepha_orm50.Repository<alepha133.TObject<{
349
+ id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
350
+ version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
351
+ createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
352
+ updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
353
+ type: alepha133.TUnsafe<"email" | "sms">;
354
+ template: alepha133.TString;
355
+ category: alepha133.TOptional<alepha133.TString>;
356
+ critical: alepha133.TOptional<alepha133.TBoolean>;
357
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
358
+ contact: alepha133.TString;
359
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
360
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
361
+ sentAt: alepha133.TOptional<alepha133.TString>;
362
+ error: alepha133.TOptional<alepha133.TObject<{
363
+ at: alepha133.TString;
364
+ name: alepha133.TString;
365
+ message: alepha133.TString;
557
366
  }>>;
558
367
  }>>;
559
368
  protected readonly dateTimeProvider: DateTimeProvider;
@@ -570,34 +379,34 @@ declare class NotificationSenderService {
570
379
  body: string;
571
380
  };
572
381
  protected load(notification: NotificationEntity): {
573
- template: NotificationPrimitive<alepha252.TObject<alepha252.TProperties>>;
382
+ template: NotificationPrimitive<alepha133.TObject<alepha133.TProperties>>;
574
383
  variables: typebox0.StaticRecord<[], "Decode", {}, {
575
- id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
576
- version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
577
- createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
578
- updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
579
- type: alepha252.TUnsafe<"email" | "sms">;
580
- template: alepha252.TString;
581
- category: alepha252.TOptional<alepha252.TString>;
582
- critical: alepha252.TOptional<alepha252.TBoolean>;
583
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
584
- contact: alepha252.TString;
585
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
586
- scheduledAt: alepha252.TOptional<alepha252.TString>;
587
- sentAt: alepha252.TOptional<alepha252.TString>;
588
- error: alepha252.TOptional<alepha252.TObject<{
589
- at: alepha252.TString;
590
- name: alepha252.TString;
591
- message: alepha252.TString;
384
+ id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
385
+ version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
386
+ createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
387
+ updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
388
+ type: alepha133.TUnsafe<"email" | "sms">;
389
+ template: alepha133.TString;
390
+ category: alepha133.TOptional<alepha133.TString>;
391
+ critical: alepha133.TOptional<alepha133.TBoolean>;
392
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
393
+ contact: alepha133.TString;
394
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
395
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
396
+ sentAt: alepha133.TOptional<alepha133.TString>;
397
+ error: alepha133.TOptional<alepha133.TObject<{
398
+ at: alepha133.TString;
399
+ name: alepha133.TString;
400
+ message: alepha133.TString;
592
401
  }>>;
593
- }, "^.*$", alepha252.TAny>;
402
+ }, "^.*$", alepha133.TAny>;
594
403
  contact: string;
595
404
  };
596
405
  }
597
406
  //#endregion
598
407
  //#region ../../src/api/notifications/services/NotificationService.d.ts
599
- declare const notificationServiceEnvSchema: alepha252.TObject<{
600
- NOTIFICATION_QUEUE: alepha252.TOptional<alepha252.TBoolean>;
408
+ declare const notificationServiceEnvSchema: alepha133.TObject<{
409
+ NOTIFICATION_QUEUE: alepha133.TOptional<alepha133.TBoolean>;
601
410
  }>;
602
411
  declare module "alepha" {
603
412
  interface Env extends Partial<Static<typeof notificationServiceEnvSchema>> {}
@@ -608,77 +417,77 @@ declare class NotificationService {
608
417
  protected readonly env: {
609
418
  NOTIFICATION_QUEUE?: boolean | undefined;
610
419
  };
611
- protected readonly notificationRepository: alepha_orm50.Repository<alepha252.TObject<{
612
- id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
613
- version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
614
- createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
615
- updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
616
- type: alepha252.TUnsafe<"email" | "sms">;
617
- template: alepha252.TString;
618
- category: alepha252.TOptional<alepha252.TString>;
619
- critical: alepha252.TOptional<alepha252.TBoolean>;
620
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
621
- contact: alepha252.TString;
622
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
623
- scheduledAt: alepha252.TOptional<alepha252.TString>;
624
- sentAt: alepha252.TOptional<alepha252.TString>;
625
- error: alepha252.TOptional<alepha252.TObject<{
626
- at: alepha252.TString;
627
- name: alepha252.TString;
628
- message: alepha252.TString;
420
+ protected readonly notificationRepository: alepha_orm50.Repository<alepha133.TObject<{
421
+ id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
422
+ version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
423
+ createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
424
+ updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
425
+ type: alepha133.TUnsafe<"email" | "sms">;
426
+ template: alepha133.TString;
427
+ category: alepha133.TOptional<alepha133.TString>;
428
+ critical: alepha133.TOptional<alepha133.TBoolean>;
429
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
430
+ contact: alepha133.TString;
431
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
432
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
433
+ sentAt: alepha133.TOptional<alepha133.TString>;
434
+ error: alepha133.TOptional<alepha133.TObject<{
435
+ at: alepha133.TString;
436
+ name: alepha133.TString;
437
+ message: alepha133.TString;
629
438
  }>>;
630
439
  }>>;
631
440
  protected readonly dateTimeProvider: DateTimeProvider;
632
441
  protected readonly notificationSenderService: NotificationSenderService;
633
- readonly notificationBatch: alepha_batch0.BatchPrimitive<alepha252.TObject<{
634
- type: alepha252.TUnsafe<"email" | "sms">;
635
- template: alepha252.TString;
636
- contact: alepha252.TString;
637
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
442
+ readonly notificationBatch: alepha_batch0.BatchPrimitive<alepha133.TObject<{
443
+ type: alepha133.TUnsafe<"email" | "sms">;
444
+ template: alepha133.TString;
445
+ contact: alepha133.TString;
446
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
638
447
  }>, Promise<void>>;
639
- findNotificationById(id: string): Promise<alepha_orm50.PgStatic<alepha252.TObject<{
640
- id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
641
- version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
642
- createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
643
- updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
644
- type: alepha252.TUnsafe<"email" | "sms">;
645
- template: alepha252.TString;
646
- category: alepha252.TOptional<alepha252.TString>;
647
- critical: alepha252.TOptional<alepha252.TBoolean>;
648
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
649
- contact: alepha252.TString;
650
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
651
- scheduledAt: alepha252.TOptional<alepha252.TString>;
652
- sentAt: alepha252.TOptional<alepha252.TString>;
653
- error: alepha252.TOptional<alepha252.TObject<{
654
- at: alepha252.TString;
655
- name: alepha252.TString;
656
- message: alepha252.TString;
448
+ findNotificationById(id: string): Promise<alepha_orm50.PgStatic<alepha133.TObject<{
449
+ id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
450
+ version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
451
+ createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
452
+ updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
453
+ type: alepha133.TUnsafe<"email" | "sms">;
454
+ template: alepha133.TString;
455
+ category: alepha133.TOptional<alepha133.TString>;
456
+ critical: alepha133.TOptional<alepha133.TBoolean>;
457
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
458
+ contact: alepha133.TString;
459
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
460
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
461
+ sentAt: alepha133.TOptional<alepha133.TString>;
462
+ error: alepha133.TOptional<alepha133.TObject<{
463
+ at: alepha133.TString;
464
+ name: alepha133.TString;
465
+ message: alepha133.TString;
657
466
  }>>;
658
- }>, alepha_orm50.PgRelationMap<alepha252.TObject<{
659
- id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
660
- version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
661
- createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
662
- updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha252.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
663
- type: alepha252.TUnsafe<"email" | "sms">;
664
- template: alepha252.TString;
665
- category: alepha252.TOptional<alepha252.TString>;
666
- critical: alepha252.TOptional<alepha252.TBoolean>;
667
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
668
- contact: alepha252.TString;
669
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
670
- scheduledAt: alepha252.TOptional<alepha252.TString>;
671
- sentAt: alepha252.TOptional<alepha252.TString>;
672
- error: alepha252.TOptional<alepha252.TObject<{
673
- at: alepha252.TString;
674
- name: alepha252.TString;
675
- message: alepha252.TString;
467
+ }>, alepha_orm50.PgRelationMap<alepha133.TObject<{
468
+ id: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_PRIMARY_KEY>, typeof alepha_orm50.PG_DEFAULT>;
469
+ version: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TInteger, typeof alepha_orm50.PG_VERSION>, typeof alepha_orm50.PG_DEFAULT>;
470
+ createdAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_CREATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
471
+ updatedAt: alepha_orm50.PgAttr<alepha_orm50.PgAttr<alepha133.TString, typeof alepha_orm50.PG_UPDATED_AT>, typeof alepha_orm50.PG_DEFAULT>;
472
+ type: alepha133.TUnsafe<"email" | "sms">;
473
+ template: alepha133.TString;
474
+ category: alepha133.TOptional<alepha133.TString>;
475
+ critical: alepha133.TOptional<alepha133.TBoolean>;
476
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
477
+ contact: alepha133.TString;
478
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
479
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
480
+ sentAt: alepha133.TOptional<alepha133.TString>;
481
+ error: alepha133.TOptional<alepha133.TObject<{
482
+ at: alepha133.TString;
483
+ name: alepha133.TString;
484
+ message: alepha133.TString;
676
485
  }>>;
677
486
  }>>>>;
678
487
  findNotifications(q?: NotificationQuery): Promise<Page<NotificationEntity>>;
679
488
  /**
680
- * Create a new notification.
681
- */
489
+ * Create a new notification.
490
+ */
682
491
  createNotification(entry: NotificationCreate): Promise<void>;
683
492
  }
684
493
  //#endregion
@@ -688,37 +497,37 @@ declare class AdminNotificationController {
688
497
  protected readonly group = "admin:notifications";
689
498
  protected readonly notificationService: NotificationService;
690
499
  /**
691
- * Find notifications with pagination and filtering.
692
- */
500
+ * Find notifications with pagination and filtering.
501
+ */
693
502
  readonly findNotifications: alepha_server0.ActionPrimitiveFn<{
694
- query: alepha252.TObject<{
695
- page: alepha252.TOptional<alepha252.TInteger>;
696
- size: alepha252.TOptional<alepha252.TInteger>;
697
- sort: alepha252.TOptional<alepha252.TString>;
698
- type: alepha252.TOptional<alepha252.TUnsafe<"email" | "sms">>;
699
- template: alepha252.TOptional<alepha252.TString>;
700
- contact: alepha252.TOptional<alepha252.TString>;
701
- category: alepha252.TOptional<alepha252.TString>;
702
- status: alepha252.TOptional<alepha252.TUnsafe<"pending" | "sent" | "failed">>;
503
+ query: alepha133.TObject<{
504
+ page: alepha133.TOptional<alepha133.TInteger>;
505
+ size: alepha133.TOptional<alepha133.TInteger>;
506
+ sort: alepha133.TOptional<alepha133.TString>;
507
+ type: alepha133.TOptional<alepha133.TUnsafe<"email" | "sms">>;
508
+ template: alepha133.TOptional<alepha133.TString>;
509
+ contact: alepha133.TOptional<alepha133.TString>;
510
+ category: alepha133.TOptional<alepha133.TString>;
511
+ status: alepha133.TOptional<alepha133.TUnsafe<"pending" | "sent" | "failed">>;
703
512
  }>;
704
- response: alepha252.TPage<alepha252.TObject<{
705
- id: PgAttr<PgAttr<alepha252.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
706
- version: PgAttr<PgAttr<alepha252.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
707
- createdAt: PgAttr<PgAttr<alepha252.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
708
- updatedAt: PgAttr<PgAttr<alepha252.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
709
- type: alepha252.TUnsafe<"email" | "sms">;
710
- template: alepha252.TString;
711
- category: alepha252.TOptional<alepha252.TString>;
712
- critical: alepha252.TOptional<alepha252.TBoolean>;
713
- sensitive: alepha252.TOptional<alepha252.TBoolean>;
714
- contact: alepha252.TString;
715
- variables: alepha252.TOptional<alepha252.TRecord<"^.*$", alepha252.TAny>>;
716
- scheduledAt: alepha252.TOptional<alepha252.TString>;
717
- sentAt: alepha252.TOptional<alepha252.TString>;
718
- error: alepha252.TOptional<alepha252.TObject<{
719
- at: alepha252.TString;
720
- name: alepha252.TString;
721
- message: alepha252.TString;
513
+ response: alepha133.TPage<alepha133.TObject<{
514
+ id: PgAttr<PgAttr<alepha133.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
515
+ version: PgAttr<PgAttr<alepha133.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
516
+ createdAt: PgAttr<PgAttr<alepha133.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
517
+ updatedAt: PgAttr<PgAttr<alepha133.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
518
+ type: alepha133.TUnsafe<"email" | "sms">;
519
+ template: alepha133.TString;
520
+ category: alepha133.TOptional<alepha133.TString>;
521
+ critical: alepha133.TOptional<alepha133.TBoolean>;
522
+ sensitive: alepha133.TOptional<alepha133.TBoolean>;
523
+ contact: alepha133.TString;
524
+ variables: alepha133.TOptional<alepha133.TRecord<"^.*$", alepha133.TAny>>;
525
+ scheduledAt: alepha133.TOptional<alepha133.TString>;
526
+ sentAt: alepha133.TOptional<alepha133.TString>;
527
+ error: alepha133.TOptional<alepha133.TObject<{
528
+ at: alepha133.TString;
529
+ name: alepha133.TString;
530
+ message: alepha133.TString;
722
531
  }>>;
723
532
  }>>;
724
533
  }>;
@@ -730,15 +539,15 @@ declare class NotificationJobs {}
730
539
  //#region ../../src/api/notifications/queues/NotificationQueues.d.ts
731
540
  declare class NotificationQueues {
732
541
  protected readonly notificationSenderService: NotificationSenderService;
733
- readonly processNotification: alepha_queue0.QueuePrimitive<alepha252.TObject<{
734
- notificationId: alepha252.TString;
542
+ readonly processNotification: alepha_queue0.QueuePrimitive<alepha133.TObject<{
543
+ notificationId: alepha133.TString;
735
544
  }>>;
736
545
  }
737
546
  //#endregion
738
547
  //#region ../../src/api/notifications/schemas/notificationContactPreferencesSchema.d.ts
739
- declare const notificationContactPreferencesSchema: alepha252.TObject<{
740
- language: alepha252.TOptional<alepha252.TString>;
741
- exclude: alepha252.TArray<alepha252.TString>;
548
+ declare const notificationContactPreferencesSchema: alepha133.TObject<{
549
+ language: alepha133.TOptional<alepha133.TString>;
550
+ exclude: alepha133.TArray<alepha133.TString>;
742
551
  }>;
743
552
  type NotificationContactPreferences = Static<typeof notificationContactPreferencesSchema>;
744
553
  //#endregion
@@ -753,7 +562,7 @@ type NotificationContactPreferences = Static<typeof notificationContactPreferenc
753
562
  *
754
563
  * @module alepha.api.notifications
755
564
  */
756
- declare const AlephaApiNotifications: alepha252.Service<alepha252.Module>;
565
+ declare const AlephaApiNotifications: alepha133.Service<alepha133.Module>;
757
566
  //#endregion
758
567
  export { $notification, AdminNotificationController, AlephaApiNotifications, NotificationContactPreferences, NotificationCreate, NotificationEntity, NotificationJobs, NotificationMessage, NotificationPrimitive, NotificationPrimitiveOptions, NotificationPushOptions, NotificationQuery, NotificationQueues, NotificationSenderService, NotificationService, notificationContactPreferencesSchema, notificationCreateSchema, notificationQuerySchema, notificationServiceEnvSchema, notifications };
759
568
  //# sourceMappingURL=index.d.ts.map