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,7 +1,7 @@
1
- import * as alepha226 from "alepha";
1
+ import * as alepha151 from "alepha";
2
2
  import { Alepha, Async, KIND, Primitive, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
3
3
  import * as alepha_server0 from "alepha/server";
4
- import * as alepha_orm33 from "alepha/orm";
4
+ import * as alepha_orm16 from "alepha/orm";
5
5
  import "alepha/logger";
6
6
  import { DateTime, DateTimeProvider } from "alepha/datetime";
7
7
  import { LockPrimitive } from "alepha/lock";
@@ -11,8 +11,6 @@ import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
11
11
  import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
12
12
  import "alepha/retry";
13
13
  import "drizzle-orm/sqlite-core";
14
- import "drizzle-orm/postgres-js";
15
- import "postgres";
16
14
 
17
15
  //#region ../../src/orm/schemas/insertSchema.d.ts
18
16
  /**
@@ -44,114 +42,114 @@ type TObjectUpdate<T extends TObject> = TObject<{ [K in keyof T["properties"]]:
44
42
  //#region ../../src/orm/primitives/$entity.d.ts
45
43
  interface EntityPrimitiveOptions<T extends TObject, Keys = keyof Static<T>> {
46
44
  /**
47
- * The database table name that will be created for this entity.
48
- * If not provided, name will be inferred from the $repository variable name.
49
- */
45
+ * The database table name that will be created for this entity.
46
+ * If not provided, name will be inferred from the $repository variable name.
47
+ */
50
48
  name: string;
51
49
  /**
52
- * TypeBox schema defining the table structure and column types.
53
- */
50
+ * TypeBox schema defining the table structure and column types.
51
+ */
54
52
  schema: T;
55
53
  /**
56
- * Database indexes to create for query optimization.
57
- */
54
+ * Database indexes to create for query optimization.
55
+ */
58
56
  indexes?: (Keys | {
59
57
  /**
60
- * Single column to index.
61
- */
58
+ * Single column to index.
59
+ */
62
60
  column: Keys;
63
61
  /**
64
- * Whether this should be a unique index (enforces uniqueness constraint).
65
- */
62
+ * Whether this should be a unique index (enforces uniqueness constraint).
63
+ */
66
64
  unique?: boolean;
67
65
  /**
68
- * Custom name for the index. If not provided, generates name automatically.
69
- */
66
+ * Custom name for the index. If not provided, generates name automatically.
67
+ */
70
68
  name?: string;
71
69
  } | {
72
70
  /**
73
- * Multiple columns for composite index (order matters for query optimization).
74
- */
71
+ * Multiple columns for composite index (order matters for query optimization).
72
+ */
75
73
  columns: Keys[];
76
74
  /**
77
- * Whether this should be a unique index (enforces uniqueness constraint).
78
- */
75
+ * Whether this should be a unique index (enforces uniqueness constraint).
76
+ */
79
77
  unique?: boolean;
80
78
  /**
81
- * Custom name for the index. If not provided, generates name automatically.
82
- */
79
+ * Custom name for the index. If not provided, generates name automatically.
80
+ */
83
81
  name?: string;
84
82
  })[];
85
83
  /**
86
- * Foreign key constraints to maintain referential integrity.
87
- */
84
+ * Foreign key constraints to maintain referential integrity.
85
+ */
88
86
  foreignKeys?: Array<{
89
87
  /**
90
- * Optional name for the foreign key constraint.
91
- */
88
+ * Optional name for the foreign key constraint.
89
+ */
92
90
  name?: string;
93
91
  /**
94
- * Local columns that reference the foreign table.
95
- */
92
+ * Local columns that reference the foreign table.
93
+ */
96
94
  columns: Array<keyof Static<T>>;
97
95
  /**
98
- * Referenced columns in the foreign table.
99
- * Must be EntityColumn references from other entities.
100
- */
96
+ * Referenced columns in the foreign table.
97
+ * Must be EntityColumn references from other entities.
98
+ */
101
99
  foreignColumns: Array<() => EntityColumn<any>>;
102
100
  }>;
103
101
  /**
104
- * Additional table constraints for data validation.
105
- *
106
- * Constraints enforce business rules at the database level, providing
107
- * an additional layer of data integrity beyond application validation.
108
- *
109
- * **Constraint Types**:
110
- * - **Unique constraints**: Prevent duplicate values across columns
111
- * - **Check constraints**: Enforce custom validation rules with SQL expressions
112
- *
113
- * @example
114
- * ```ts
115
- * constraints: [
116
- * {
117
- * name: "unique_user_email",
118
- * columns: ["email"],
119
- * unique: true
120
- * },
121
- * {
122
- * name: "valid_age_range",
123
- * columns: ["age"],
124
- * check: sql`age >= 0 AND age <= 150`
125
- * },
126
- * {
127
- * name: "unique_user_username_per_tenant",
128
- * columns: ["tenantId", "username"],
129
- * unique: true
130
- * }
131
- * ]
132
- * ```
133
- */
102
+ * Additional table constraints for data validation.
103
+ *
104
+ * Constraints enforce business rules at the database level, providing
105
+ * an additional layer of data integrity beyond application validation.
106
+ *
107
+ * **Constraint Types**:
108
+ * - **Unique constraints**: Prevent duplicate values across columns
109
+ * - **Check constraints**: Enforce custom validation rules with SQL expressions
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * constraints: [
114
+ * {
115
+ * name: "unique_user_email",
116
+ * columns: ["email"],
117
+ * unique: true
118
+ * },
119
+ * {
120
+ * name: "valid_age_range",
121
+ * columns: ["age"],
122
+ * check: sql`age >= 0 AND age <= 150`
123
+ * },
124
+ * {
125
+ * name: "unique_user_username_per_tenant",
126
+ * columns: ["tenantId", "username"],
127
+ * unique: true
128
+ * }
129
+ * ]
130
+ * ```
131
+ */
134
132
  constraints?: Array<{
135
133
  /**
136
- * Columns involved in this constraint.
137
- */
134
+ * Columns involved in this constraint.
135
+ */
138
136
  columns: Array<keyof Static<T>>;
139
137
  /**
140
- * Optional name for the constraint.
141
- */
138
+ * Optional name for the constraint.
139
+ */
142
140
  name?: string;
143
141
  /**
144
- * Whether this is a unique constraint.
145
- */
142
+ * Whether this is a unique constraint.
143
+ */
146
144
  unique?: boolean | {};
147
145
  /**
148
- * SQL expression for check constraint validation.
149
- */
146
+ * SQL expression for check constraint validation.
147
+ */
150
148
  check?: SQL;
151
149
  }>;
152
150
  /**
153
- * Advanced Drizzle ORM configuration for complex table setups.
154
- */
151
+ * Advanced Drizzle ORM configuration for complex table setups.
152
+ */
155
153
  config?: (self: BuildExtraConfigColumns<string, FromSchema<T>, "pg">) => PgTableExtraConfigValue[];
156
154
  }
157
155
  declare class EntityPrimitive<T extends TObject = TObject> {
@@ -199,8 +197,8 @@ type PgSymbols = {
199
197
  [PG_REF]: PgRefOptions;
200
198
  [PG_ENUM]: PgEnumOptions;
201
199
  /**
202
- * @deprecated Use `PG_IDENTITY` instead.
203
- */
200
+ * @deprecated Use `PG_IDENTITY` instead.
201
+ */
204
202
  [PG_SERIAL]: {};
205
203
  };
206
204
  type PgSymbolKeys = keyof PgSymbols;
@@ -230,186 +228,77 @@ interface PgRefOptions {
230
228
  */
231
229
  type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]: PgSymbols[K] };
232
230
  //#endregion
233
- //#region ../../src/orm/providers/drivers/NodePostgresProvider.d.ts
234
- declare module "alepha" {
235
- interface Env extends Partial<Static<typeof envSchema$1>> {}
236
- }
237
- declare const envSchema$1: alepha226.TObject<{
238
- /**
239
- * Main configuration for database connection.
240
- * Accept a string in the format of a Postgres connection URL.
241
- * Example: postgres://user:password@localhost:5432/database
242
- * or
243
- * Example: postgres://user:password@localhost:5432/database?sslmode=require
244
- */
245
- DATABASE_URL: alepha226.TOptional<alepha226.TString>;
246
- /**
247
- * In addition to the DATABASE_URL, you can specify the postgres schema name.
248
- *
249
- * It will monkey patch drizzle tables.
250
- */
251
- POSTGRES_SCHEMA: alepha226.TOptional<alepha226.TString>;
252
- }>;
253
- //#endregion
254
- //#region ../../src/orm/providers/drivers/NodeSqliteProvider.d.ts
255
- /**
256
- * Configuration options for the Node.js SQLite database provider.
257
- */
258
- declare const nodeSqliteOptions: alepha226.Atom<alepha226.TObject<{
259
- path: alepha226.TOptional<alepha226.TString>;
260
- }>, "alepha.postgres.node-sqlite.options">;
261
- type NodeSqliteProviderOptions = Static<typeof nodeSqliteOptions.schema>;
262
- declare module "alepha" {
263
- interface State {
264
- [nodeSqliteOptions.key]: NodeSqliteProviderOptions;
265
- }
266
- }
267
- /**
268
- * Add a fake support for SQLite in Node.js based on Postgres interfaces.
269
- *
270
- * This is NOT a real SQLite provider, it's a workaround to use SQLite with Drizzle ORM.
271
- * This is NOT recommended for production use.
272
- */
273
- //#endregion
274
- //#region ../../src/orm/index.d.ts
275
- declare module "alepha" {
276
- interface Hooks {
277
- /**
278
- * Fires before creating an entity in the repository.
279
- */
280
- "repository:create:before": {
281
- tableName: string;
282
- data: any;
283
- };
284
- /**
285
- * Fires after creating an entity in the repository.
286
- */
287
- "repository:create:after": {
288
- tableName: string;
289
- data: any;
290
- entity: any;
291
- };
292
- /**
293
- * Fires before updating entities in the repository.
294
- */
295
- "repository:update:before": {
296
- tableName: string;
297
- where: any;
298
- data: any;
299
- };
300
- /**
301
- * Fires after updating entities in the repository.
302
- */
303
- "repository:update:after": {
304
- tableName: string;
305
- where: any;
306
- data: any;
307
- entities: any[];
308
- };
309
- /**
310
- * Fires before deleting entities from the repository.
311
- */
312
- "repository:delete:before": {
313
- tableName: string;
314
- where: any;
315
- };
316
- /**
317
- * Fires after deleting entities from the repository.
318
- */
319
- "repository:delete:after": {
320
- tableName: string;
321
- where: any;
322
- ids: Array<string | number>;
323
- };
324
- /**
325
- * Fires before reading entities from the repository.
326
- */
327
- "repository:read:before": {
328
- tableName: string;
329
- query: any;
330
- };
331
- /**
332
- * Fires after reading entities from the repository.
333
- */
334
- "repository:read:after": {
335
- tableName: string;
336
- query: any;
337
- entities: any[];
338
- };
339
- }
340
- }
341
- //#endregion
342
231
  //#region ../../src/api/jobs/schemas/jobExecutionQuerySchema.d.ts
343
- declare const jobExecutionQuerySchema: alepha226.TObject<{
344
- page: alepha226.TOptional<alepha226.TInteger>;
345
- size: alepha226.TOptional<alepha226.TInteger>;
346
- sort: alepha226.TOptional<alepha226.TString>;
347
- status: alepha226.TOptional<alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
348
- job: alepha226.TOptional<alepha226.TString>;
232
+ declare const jobExecutionQuerySchema: alepha151.TObject<{
233
+ page: alepha151.TOptional<alepha151.TInteger>;
234
+ size: alepha151.TOptional<alepha151.TInteger>;
235
+ sort: alepha151.TOptional<alepha151.TString>;
236
+ status: alepha151.TOptional<alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
237
+ job: alepha151.TOptional<alepha151.TString>;
349
238
  }>;
350
239
  type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
351
240
  //#endregion
352
241
  //#region ../../src/api/jobs/services/JobService.d.ts
353
242
  declare class JobService {
354
243
  protected readonly alepha: Alepha;
355
- protected readonly executionRepository: alepha_orm33.Repository<alepha226.TObject<{
356
- id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
357
- version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
358
- createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
359
- updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
360
- finishedAt: alepha226.TOptional<alepha226.TString>;
361
- job: alepha226.TString;
362
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
363
- error: alepha226.TOptional<alepha226.TString>;
364
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
365
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
366
- message: alepha226.TString;
367
- service: alepha226.TString;
368
- module: alepha226.TString;
369
- context: alepha226.TOptional<alepha226.TString>;
370
- app: alepha226.TOptional<alepha226.TString>;
371
- data: alepha226.TOptional<alepha226.TAny>;
372
- timestamp: alepha226.TNumber;
244
+ protected readonly executionRepository: alepha_orm16.Repository<alepha151.TObject<{
245
+ id: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_PRIMARY_KEY>, typeof alepha_orm16.PG_DEFAULT>;
246
+ version: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TInteger, typeof alepha_orm16.PG_VERSION>, typeof alepha_orm16.PG_DEFAULT>;
247
+ createdAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_CREATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
248
+ updatedAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_UPDATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
249
+ finishedAt: alepha151.TOptional<alepha151.TString>;
250
+ job: alepha151.TString;
251
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
252
+ error: alepha151.TOptional<alepha151.TString>;
253
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
254
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
255
+ message: alepha151.TString;
256
+ service: alepha151.TString;
257
+ module: alepha151.TString;
258
+ context: alepha151.TOptional<alepha151.TString>;
259
+ app: alepha151.TOptional<alepha151.TString>;
260
+ data: alepha151.TOptional<alepha151.TAny>;
261
+ timestamp: alepha151.TNumber;
373
262
  }>>>;
374
263
  }>>;
375
264
  getJobs(): Promise<string[]>;
376
- getJobExecutions(query?: JobExecutionQuery): Promise<alepha226.Page<alepha_orm33.PgStatic<alepha226.TObject<{
377
- id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
378
- version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
379
- createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
380
- updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
381
- finishedAt: alepha226.TOptional<alepha226.TString>;
382
- job: alepha226.TString;
383
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
384
- error: alepha226.TOptional<alepha226.TString>;
385
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
386
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
387
- message: alepha226.TString;
388
- service: alepha226.TString;
389
- module: alepha226.TString;
390
- context: alepha226.TOptional<alepha226.TString>;
391
- app: alepha226.TOptional<alepha226.TString>;
392
- data: alepha226.TOptional<alepha226.TAny>;
393
- timestamp: alepha226.TNumber;
265
+ getJobExecutions(query?: JobExecutionQuery): Promise<alepha151.Page<alepha_orm16.PgStatic<alepha151.TObject<{
266
+ id: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_PRIMARY_KEY>, typeof alepha_orm16.PG_DEFAULT>;
267
+ version: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TInteger, typeof alepha_orm16.PG_VERSION>, typeof alepha_orm16.PG_DEFAULT>;
268
+ createdAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_CREATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
269
+ updatedAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_UPDATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
270
+ finishedAt: alepha151.TOptional<alepha151.TString>;
271
+ job: alepha151.TString;
272
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
273
+ error: alepha151.TOptional<alepha151.TString>;
274
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
275
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
276
+ message: alepha151.TString;
277
+ service: alepha151.TString;
278
+ module: alepha151.TString;
279
+ context: alepha151.TOptional<alepha151.TString>;
280
+ app: alepha151.TOptional<alepha151.TString>;
281
+ data: alepha151.TOptional<alepha151.TAny>;
282
+ timestamp: alepha151.TNumber;
394
283
  }>>>;
395
- }>, alepha_orm33.PgRelationMap<alepha226.TObject<{
396
- id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
397
- version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
398
- createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
399
- updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
400
- finishedAt: alepha226.TOptional<alepha226.TString>;
401
- job: alepha226.TString;
402
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
403
- error: alepha226.TOptional<alepha226.TString>;
404
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
405
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
406
- message: alepha226.TString;
407
- service: alepha226.TString;
408
- module: alepha226.TString;
409
- context: alepha226.TOptional<alepha226.TString>;
410
- app: alepha226.TOptional<alepha226.TString>;
411
- data: alepha226.TOptional<alepha226.TAny>;
412
- timestamp: alepha226.TNumber;
284
+ }>, alepha_orm16.PgRelationMap<alepha151.TObject<{
285
+ id: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_PRIMARY_KEY>, typeof alepha_orm16.PG_DEFAULT>;
286
+ version: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TInteger, typeof alepha_orm16.PG_VERSION>, typeof alepha_orm16.PG_DEFAULT>;
287
+ createdAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_CREATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
288
+ updatedAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_UPDATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
289
+ finishedAt: alepha151.TOptional<alepha151.TString>;
290
+ job: alepha151.TString;
291
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
292
+ error: alepha151.TOptional<alepha151.TString>;
293
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
294
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
295
+ message: alepha151.TString;
296
+ service: alepha151.TString;
297
+ module: alepha151.TString;
298
+ context: alepha151.TOptional<alepha151.TString>;
299
+ app: alepha151.TOptional<alepha151.TString>;
300
+ data: alepha151.TOptional<alepha151.TAny>;
301
+ timestamp: alepha151.TNumber;
413
302
  }>>>;
414
303
  }>>>>>;
415
304
  triggerJob(name: string): Promise<{
@@ -423,75 +312,75 @@ declare class AdminJobController {
423
312
  protected readonly group: string;
424
313
  protected readonly jobService: JobService;
425
314
  readonly getJobs: alepha_server0.ActionPrimitiveFn<{
426
- response: alepha226.TArray<alepha226.TString>;
315
+ response: alepha151.TArray<alepha151.TString>;
427
316
  }>;
428
317
  readonly getJobExecutions: alepha_server0.ActionPrimitiveFn<{
429
- query: alepha226.TObject<{
430
- page: alepha226.TOptional<alepha226.TInteger>;
431
- size: alepha226.TOptional<alepha226.TInteger>;
432
- sort: alepha226.TOptional<alepha226.TString>;
433
- status: alepha226.TOptional<alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
434
- job: alepha226.TOptional<alepha226.TString>;
318
+ query: alepha151.TObject<{
319
+ page: alepha151.TOptional<alepha151.TInteger>;
320
+ size: alepha151.TOptional<alepha151.TInteger>;
321
+ sort: alepha151.TOptional<alepha151.TString>;
322
+ status: alepha151.TOptional<alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">>;
323
+ job: alepha151.TOptional<alepha151.TString>;
435
324
  }>;
436
- response: alepha226.TPage<alepha226.TObject<{
437
- id: PgAttr<PgAttr<alepha226.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
438
- version: PgAttr<PgAttr<alepha226.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
439
- createdAt: PgAttr<PgAttr<alepha226.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
440
- updatedAt: PgAttr<PgAttr<alepha226.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
441
- finishedAt: alepha226.TOptional<alepha226.TString>;
442
- job: alepha226.TString;
443
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
444
- error: alepha226.TOptional<alepha226.TString>;
445
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
446
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
447
- message: alepha226.TString;
448
- service: alepha226.TString;
449
- module: alepha226.TString;
450
- context: alepha226.TOptional<alepha226.TString>;
451
- app: alepha226.TOptional<alepha226.TString>;
452
- data: alepha226.TOptional<alepha226.TAny>;
453
- timestamp: alepha226.TNumber;
325
+ response: alepha151.TPage<alepha151.TObject<{
326
+ id: PgAttr<PgAttr<alepha151.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
327
+ version: PgAttr<PgAttr<alepha151.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
328
+ createdAt: PgAttr<PgAttr<alepha151.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
329
+ updatedAt: PgAttr<PgAttr<alepha151.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
330
+ finishedAt: alepha151.TOptional<alepha151.TString>;
331
+ job: alepha151.TString;
332
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
333
+ error: alepha151.TOptional<alepha151.TString>;
334
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
335
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
336
+ message: alepha151.TString;
337
+ service: alepha151.TString;
338
+ module: alepha151.TString;
339
+ context: alepha151.TOptional<alepha151.TString>;
340
+ app: alepha151.TOptional<alepha151.TString>;
341
+ data: alepha151.TOptional<alepha151.TAny>;
342
+ timestamp: alepha151.TNumber;
454
343
  }>>>;
455
344
  }>>;
456
345
  }>;
457
346
  readonly triggerJob: alepha_server0.ActionPrimitiveFn<{
458
- body: alepha226.TObject<{
459
- name: alepha226.TString;
347
+ body: alepha151.TObject<{
348
+ name: alepha151.TString;
460
349
  }>;
461
- response: alepha226.TObject<{
462
- ok: alepha226.TBoolean;
463
- id: alepha226.TOptional<alepha226.TUnion<[alepha226.TString, alepha226.TInteger]>>;
464
- count: alepha226.TOptional<alepha226.TNumber>;
350
+ response: alepha151.TObject<{
351
+ ok: alepha151.TBoolean;
352
+ id: alepha151.TOptional<alepha151.TUnion<[alepha151.TString, alepha151.TInteger]>>;
353
+ count: alepha151.TOptional<alepha151.TNumber>;
465
354
  }>;
466
355
  }>;
467
356
  }
468
357
  //#endregion
469
358
  //#region ../../src/api/jobs/entities/jobExecutions.d.ts
470
- declare const jobExecutions: alepha_orm33.EntityPrimitive<alepha226.TObject<{
471
- id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
472
- version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
473
- createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
474
- updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
475
- finishedAt: alepha226.TOptional<alepha226.TString>;
476
- job: alepha226.TString;
477
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
478
- error: alepha226.TOptional<alepha226.TString>;
479
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
480
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
481
- message: alepha226.TString;
482
- service: alepha226.TString;
483
- module: alepha226.TString;
484
- context: alepha226.TOptional<alepha226.TString>;
485
- app: alepha226.TOptional<alepha226.TString>;
486
- data: alepha226.TOptional<alepha226.TAny>;
487
- timestamp: alepha226.TNumber;
359
+ declare const jobExecutions: alepha_orm16.EntityPrimitive<alepha151.TObject<{
360
+ id: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_PRIMARY_KEY>, typeof alepha_orm16.PG_DEFAULT>;
361
+ version: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TInteger, typeof alepha_orm16.PG_VERSION>, typeof alepha_orm16.PG_DEFAULT>;
362
+ createdAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_CREATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
363
+ updatedAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_UPDATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
364
+ finishedAt: alepha151.TOptional<alepha151.TString>;
365
+ job: alepha151.TString;
366
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
367
+ error: alepha151.TOptional<alepha151.TString>;
368
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
369
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
370
+ message: alepha151.TString;
371
+ service: alepha151.TString;
372
+ module: alepha151.TString;
373
+ context: alepha151.TOptional<alepha151.TString>;
374
+ app: alepha151.TOptional<alepha151.TString>;
375
+ data: alepha151.TOptional<alepha151.TAny>;
376
+ timestamp: alepha151.TNumber;
488
377
  }>>>;
489
378
  }>>;
490
379
  type JobExecutionEntity = Static<typeof jobExecutions.schema>;
491
380
  //#endregion
492
381
  //#region ../../src/api/jobs/providers/JobProvider.d.ts
493
- declare const envSchema: alepha226.TObject<{
494
- JOB_PREFIX: alepha226.TOptional<alepha226.TString>;
382
+ declare const envSchema: alepha151.TObject<{
383
+ JOB_PREFIX: alepha151.TOptional<alepha151.TString>;
495
384
  }>;
496
385
  declare module "alepha" {
497
386
  interface Env extends Partial<Static<typeof envSchema>> {}
@@ -504,24 +393,24 @@ declare class JobProvider {
504
393
  protected readonly alepha: Alepha;
505
394
  protected readonly dateTimeProvider: DateTimeProvider;
506
395
  protected readonly cronProvider: CronProvider;
507
- protected readonly executionRepository: alepha_orm33.Repository<alepha226.TObject<{
508
- id: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_PRIMARY_KEY>, typeof alepha_orm33.PG_DEFAULT>;
509
- version: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TInteger, typeof alepha_orm33.PG_VERSION>, typeof alepha_orm33.PG_DEFAULT>;
510
- createdAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_CREATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
511
- updatedAt: alepha_orm33.PgAttr<alepha_orm33.PgAttr<alepha226.TString, typeof alepha_orm33.PG_UPDATED_AT>, typeof alepha_orm33.PG_DEFAULT>;
512
- finishedAt: alepha226.TOptional<alepha226.TString>;
513
- job: alepha226.TString;
514
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
515
- error: alepha226.TOptional<alepha226.TString>;
516
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
517
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
518
- message: alepha226.TString;
519
- service: alepha226.TString;
520
- module: alepha226.TString;
521
- context: alepha226.TOptional<alepha226.TString>;
522
- app: alepha226.TOptional<alepha226.TString>;
523
- data: alepha226.TOptional<alepha226.TAny>;
524
- timestamp: alepha226.TNumber;
396
+ protected readonly executionRepository: alepha_orm16.Repository<alepha151.TObject<{
397
+ id: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_PRIMARY_KEY>, typeof alepha_orm16.PG_DEFAULT>;
398
+ version: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TInteger, typeof alepha_orm16.PG_VERSION>, typeof alepha_orm16.PG_DEFAULT>;
399
+ createdAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_CREATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
400
+ updatedAt: alepha_orm16.PgAttr<alepha_orm16.PgAttr<alepha151.TString, typeof alepha_orm16.PG_UPDATED_AT>, typeof alepha_orm16.PG_DEFAULT>;
401
+ finishedAt: alepha151.TOptional<alepha151.TString>;
402
+ job: alepha151.TString;
403
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
404
+ error: alepha151.TOptional<alepha151.TString>;
405
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
406
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
407
+ message: alepha151.TString;
408
+ service: alepha151.TString;
409
+ module: alepha151.TString;
410
+ context: alepha151.TOptional<alepha151.TString>;
411
+ app: alepha151.TOptional<alepha151.TString>;
412
+ data: alepha151.TOptional<alepha151.TAny>;
413
+ timestamp: alepha151.TNumber;
525
414
  }>>>;
526
415
  }>>;
527
416
  protected readonly env: {
@@ -539,49 +428,49 @@ declare class JobProvider {
539
428
  }[]>;
540
429
  protected readonly jobs: Map<string, JobRegistration>;
541
430
  /**
542
- * Register and set up a job for execution (called during primitive initialization).
543
- */
431
+ * Register and set up a job for execution (called during primitive initialization).
432
+ */
544
433
  registerJob(options: Job): JobRegistration;
545
434
  /**
546
- * Trigger a job by name.
547
- */
435
+ * Trigger a job by name.
436
+ */
548
437
  triggerJob(jobName: string): Promise<void>;
549
438
  /**
550
- * Execute a job handler (called by the job primitive).
551
- */
439
+ * Execute a job handler (called by the job primitive).
440
+ */
552
441
  executeJob(jobName: string, handler: (args: {
553
442
  now: DateTime;
554
443
  }) => Async<void>): Promise<void>;
555
444
  }
556
445
  interface Job {
557
446
  /**
558
- * Name of the job.
559
- */
447
+ * Name of the job.
448
+ */
560
449
  name: string;
561
450
  /**
562
- * Optional description of the job.
563
- */
451
+ * Optional description of the job.
452
+ */
564
453
  description?: string;
565
454
  /**
566
- * Function to run on schedule.
567
- */
455
+ * Function to run on schedule.
456
+ */
568
457
  handler: (args: {
569
458
  now: DateTime;
570
459
  }) => Async<void>;
571
460
  /**
572
- * Cron expression to run the job.
573
- */
461
+ * Cron expression to run the job.
462
+ */
574
463
  cron?: string;
575
464
  /**
576
- * If true, the job will be locked and only one instance will run at a time.
577
- * You probably need to import {@link AlephaLockRedis} for distributed locking.
578
- *
579
- * @default true
580
- */
465
+ * If true, the job will be locked and only one instance will run at a time.
466
+ * You probably need to import {@link AlephaLockRedis} for distributed locking.
467
+ *
468
+ * @default true
469
+ */
581
470
  lock?: boolean;
582
471
  /**
583
- * Optional prefix for job lock keys.
584
- */
472
+ * Optional prefix for job lock keys.
473
+ */
585
474
  lockPrefix?: string;
586
475
  }
587
476
  interface JobRegistration {
@@ -600,8 +489,8 @@ declare const $job: {
600
489
  };
601
490
  type JobPrimitiveOptions = Omit<Job, "name"> & {
602
491
  /**
603
- * Name of the job. Defaults to the primitive property name.
604
- */
492
+ * Name of the job. Defaults to the primitive property name.
493
+ */
605
494
  name?: string;
606
495
  };
607
496
  declare class JobPrimitive extends Primitive<JobPrimitiveOptions> {
@@ -615,31 +504,31 @@ interface JobHandlerArguments {
615
504
  }
616
505
  //#endregion
617
506
  //#region ../../src/api/jobs/schemas/jobExecutionResourceSchema.d.ts
618
- declare const jobExecutionResourceSchema: alepha226.TObject<{
619
- id: PgAttr<PgAttr<alepha226.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
620
- version: PgAttr<PgAttr<alepha226.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
621
- createdAt: PgAttr<PgAttr<alepha226.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
622
- updatedAt: PgAttr<PgAttr<alepha226.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
623
- finishedAt: alepha226.TOptional<alepha226.TString>;
624
- job: alepha226.TString;
625
- status: alepha226.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
626
- error: alepha226.TOptional<alepha226.TString>;
627
- logs: alepha226.TOptional<alepha226.TArray<alepha226.TObject<{
628
- level: alepha226.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
629
- message: alepha226.TString;
630
- service: alepha226.TString;
631
- module: alepha226.TString;
632
- context: alepha226.TOptional<alepha226.TString>;
633
- app: alepha226.TOptional<alepha226.TString>;
634
- data: alepha226.TOptional<alepha226.TAny>;
635
- timestamp: alepha226.TNumber;
507
+ declare const jobExecutionResourceSchema: alepha151.TObject<{
508
+ id: PgAttr<PgAttr<alepha151.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
509
+ version: PgAttr<PgAttr<alepha151.TInteger, typeof PG_VERSION>, typeof PG_DEFAULT>;
510
+ createdAt: PgAttr<PgAttr<alepha151.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
511
+ updatedAt: PgAttr<PgAttr<alepha151.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
512
+ finishedAt: alepha151.TOptional<alepha151.TString>;
513
+ job: alepha151.TString;
514
+ status: alepha151.TUnsafe<"STARTED" | "FAILED" | "COMPLETED">;
515
+ error: alepha151.TOptional<alepha151.TString>;
516
+ logs: alepha151.TOptional<alepha151.TArray<alepha151.TObject<{
517
+ level: alepha151.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
518
+ message: alepha151.TString;
519
+ service: alepha151.TString;
520
+ module: alepha151.TString;
521
+ context: alepha151.TOptional<alepha151.TString>;
522
+ app: alepha151.TOptional<alepha151.TString>;
523
+ data: alepha151.TOptional<alepha151.TAny>;
524
+ timestamp: alepha151.TNumber;
636
525
  }>>>;
637
526
  }>;
638
527
  type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
639
528
  //#endregion
640
529
  //#region ../../src/api/jobs/schemas/triggerJobSchema.d.ts
641
- declare const triggerJobSchema: alepha226.TObject<{
642
- name: alepha226.TString;
530
+ declare const triggerJobSchema: alepha151.TObject<{
531
+ name: alepha151.TString;
643
532
  }>;
644
533
  type TriggerJob = Static<typeof triggerJobSchema>;
645
534
  //#endregion
@@ -652,7 +541,7 @@ type TriggerJob = Static<typeof triggerJobSchema>;
652
541
  *
653
542
  * @module alepha.api.jobs
654
543
  */
655
- declare const AlephaApiJobs: alepha226.Service<alepha226.Module>;
544
+ declare const AlephaApiJobs: alepha151.Service<alepha151.Module>;
656
545
  //#endregion
657
546
  export { $job, AdminJobController, AlephaApiJobs, Job, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobHandlerArguments, JobPrimitive, JobPrimitiveOptions, JobProvider, JobRegistration, JobService, TriggerJob, jobExecutionQuerySchema, jobExecutionResourceSchema, jobExecutions, triggerJobSchema };
658
547
  //# sourceMappingURL=index.d.ts.map