alepha 0.14.4 → 0.15.0

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