alepha 0.21.2 → 0.22.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 (463) hide show
  1. package/README.md +0 -1
  2. package/dist/api/audits/index.browser.js.map +1 -1
  3. package/dist/api/audits/index.d.ts +393 -403
  4. package/dist/api/audits/index.d.ts.map +1 -1
  5. package/dist/api/audits/index.js +25 -56
  6. package/dist/api/audits/index.js.map +1 -1
  7. package/dist/api/files/index.browser.js +31 -1
  8. package/dist/api/files/index.browser.js.map +1 -1
  9. package/dist/api/files/index.d.ts +313 -208
  10. package/dist/api/files/index.d.ts.map +1 -1
  11. package/dist/api/files/index.js +152 -42
  12. package/dist/api/files/index.js.map +1 -1
  13. package/dist/api/jobs/index.browser.js +2 -2
  14. package/dist/api/jobs/index.browser.js.map +1 -1
  15. package/dist/api/jobs/index.d.ts +289 -292
  16. package/dist/api/jobs/index.d.ts.map +1 -1
  17. package/dist/api/jobs/index.js +39 -33
  18. package/dist/api/jobs/index.js.map +1 -1
  19. package/dist/api/keys/index.d.ts +211 -216
  20. package/dist/api/keys/index.d.ts.map +1 -1
  21. package/dist/api/keys/index.js.map +1 -1
  22. package/dist/api/notifications/index.browser.js.map +1 -1
  23. package/dist/api/notifications/index.d.ts +188 -195
  24. package/dist/api/notifications/index.d.ts.map +1 -1
  25. package/dist/api/notifications/index.js.map +1 -1
  26. package/dist/api/oauth/index.d.ts +71 -76
  27. package/dist/api/oauth/index.d.ts.map +1 -1
  28. package/dist/api/oauth/index.js.map +1 -1
  29. package/dist/api/organizations/index.browser.js.map +1 -1
  30. package/dist/api/organizations/index.d.ts +104 -109
  31. package/dist/api/organizations/index.d.ts.map +1 -1
  32. package/dist/api/organizations/index.js.map +1 -1
  33. package/dist/api/parameters/index.browser.js +43 -16
  34. package/dist/api/parameters/index.browser.js.map +1 -1
  35. package/dist/api/parameters/index.d.ts +488 -344
  36. package/dist/api/parameters/index.d.ts.map +1 -1
  37. package/dist/api/parameters/index.js +175 -35
  38. package/dist/api/parameters/index.js.map +1 -1
  39. package/dist/api/payments/index.d.ts +396 -402
  40. package/dist/api/payments/index.d.ts.map +1 -1
  41. package/dist/api/payments/index.js.map +1 -1
  42. package/dist/api/subscriptions/index.d.ts +644 -652
  43. package/dist/api/subscriptions/index.d.ts.map +1 -1
  44. package/dist/api/subscriptions/index.js +1 -1
  45. package/dist/api/subscriptions/index.js.map +1 -1
  46. package/dist/api/users/index.browser.js +7 -0
  47. package/dist/api/users/index.browser.js.map +1 -1
  48. package/dist/api/users/index.d.ts +1073 -1006
  49. package/dist/api/users/index.d.ts.map +1 -1
  50. package/dist/api/users/index.js +283 -61
  51. package/dist/api/users/index.js.map +1 -1
  52. package/dist/api/verifications/index.browser.js.map +1 -1
  53. package/dist/api/verifications/index.d.ts +134 -140
  54. package/dist/api/verifications/index.d.ts.map +1 -1
  55. package/dist/api/verifications/index.js.map +1 -1
  56. package/dist/background/index.d.ts +95 -0
  57. package/dist/background/index.d.ts.map +1 -0
  58. package/dist/background/index.js +121 -0
  59. package/dist/background/index.js.map +1 -0
  60. package/dist/background/index.workerd.js +110 -0
  61. package/dist/background/index.workerd.js.map +1 -0
  62. package/dist/batch/index.d.ts +5 -7
  63. package/dist/batch/index.d.ts.map +1 -1
  64. package/dist/batch/index.js.map +1 -1
  65. package/dist/bin/index.js.map +1 -1
  66. package/dist/bucket/index.d.ts +76 -54
  67. package/dist/bucket/index.d.ts.map +1 -1
  68. package/dist/bucket/index.js +58 -11
  69. package/dist/bucket/index.js.map +1 -1
  70. package/dist/bucket/index.workerd.js +200 -5
  71. package/dist/bucket/index.workerd.js.map +1 -1
  72. package/dist/cache/core/index.d.ts +7 -10
  73. package/dist/cache/core/index.d.ts.map +1 -1
  74. package/dist/cache/core/index.js.map +1 -1
  75. package/dist/cache/core/index.workerd.js.map +1 -1
  76. package/dist/cache/database/index.d.ts +22 -26
  77. package/dist/cache/database/index.d.ts.map +1 -1
  78. package/dist/cache/database/index.js.map +1 -1
  79. package/dist/cache/redis/index.d.ts +4 -7
  80. package/dist/cache/redis/index.d.ts.map +1 -1
  81. package/dist/cache/redis/index.js.map +1 -1
  82. package/dist/captcha/index.d.ts +3 -6
  83. package/dist/captcha/index.d.ts.map +1 -1
  84. package/dist/captcha/index.js.map +1 -1
  85. package/dist/cli/config/index.d.ts.map +1 -1
  86. package/dist/cli/config/index.js.map +1 -1
  87. package/dist/cli/core/index.d.ts +417 -214
  88. package/dist/cli/core/index.d.ts.map +1 -1
  89. package/dist/cli/core/index.js +325 -563
  90. package/dist/cli/core/index.js.map +1 -1
  91. package/dist/cli/devtools/index.d.ts +3 -5
  92. package/dist/cli/devtools/index.d.ts.map +1 -1
  93. package/dist/cli/devtools/index.js.map +1 -1
  94. package/dist/cli/i18n/index.d.ts +8 -12
  95. package/dist/cli/i18n/index.d.ts.map +1 -1
  96. package/dist/cli/i18n/index.js.map +1 -1
  97. package/dist/cli/platform/index.d.ts +126 -1342
  98. package/dist/cli/platform/index.d.ts.map +1 -1
  99. package/dist/cli/platform/index.js +136 -2374
  100. package/dist/cli/platform/index.js.map +1 -1
  101. package/dist/cli/platform-lib/index.d.ts +1446 -0
  102. package/dist/cli/platform-lib/index.d.ts.map +1 -0
  103. package/dist/cli/platform-lib/index.js +2597 -0
  104. package/dist/cli/platform-lib/index.js.map +1 -0
  105. package/dist/cli/vendor/index.d.ts +17 -21
  106. package/dist/cli/vendor/index.d.ts.map +1 -1
  107. package/dist/cli/vendor/index.js.map +1 -1
  108. package/dist/command/index.d.ts +21 -20
  109. package/dist/command/index.d.ts.map +1 -1
  110. package/dist/command/index.js +39 -10
  111. package/dist/command/index.js.map +1 -1
  112. package/dist/{containers → container}/core/index.d.ts +13 -15
  113. package/dist/container/core/index.d.ts.map +1 -0
  114. package/dist/{containers → container}/core/index.js +23 -14
  115. package/dist/container/core/index.js.map +1 -0
  116. package/dist/{containers → container}/core/index.workerd.js +37 -22
  117. package/dist/container/core/index.workerd.js.map +1 -0
  118. package/dist/core/index.browser.js +27 -1
  119. package/dist/core/index.browser.js.map +1 -1
  120. package/dist/core/index.d.ts +48 -24
  121. package/dist/core/index.d.ts.map +1 -1
  122. package/dist/core/index.js +27 -1
  123. package/dist/core/index.js.map +1 -1
  124. package/dist/core/index.native.js +27 -1
  125. package/dist/core/index.native.js.map +1 -1
  126. package/dist/core/index.workerd.js +27 -1
  127. package/dist/core/index.workerd.js.map +1 -1
  128. package/dist/crypto/index.browser.js.map +1 -1
  129. package/dist/crypto/index.d.ts +5 -8
  130. package/dist/crypto/index.d.ts.map +1 -1
  131. package/dist/crypto/index.js.map +1 -1
  132. package/dist/datetime/index.d.ts +3 -4
  133. package/dist/datetime/index.d.ts.map +1 -1
  134. package/dist/datetime/index.js.map +1 -1
  135. package/dist/email/brevo/index.d.ts +2 -4
  136. package/dist/email/brevo/index.d.ts.map +1 -1
  137. package/dist/email/brevo/index.js.map +1 -1
  138. package/dist/email/cloudflare/index.d.ts +20 -7
  139. package/dist/email/cloudflare/index.d.ts.map +1 -1
  140. package/dist/email/cloudflare/index.js +46 -9
  141. package/dist/email/cloudflare/index.js.map +1 -1
  142. package/dist/email/core/index.d.ts +6 -9
  143. package/dist/email/core/index.d.ts.map +1 -1
  144. package/dist/email/core/index.js.map +1 -1
  145. package/dist/email/core/index.workerd.js.map +1 -1
  146. package/dist/email/smtp/index.d.ts +10 -13
  147. package/dist/email/smtp/index.d.ts.map +1 -1
  148. package/dist/email/smtp/index.js +107 -32
  149. package/dist/email/smtp/index.js.map +1 -1
  150. package/dist/fake/index.d.ts +1 -2
  151. package/dist/fake/index.d.ts.map +1 -1
  152. package/dist/fake/index.js.map +1 -1
  153. package/dist/lock/core/index.d.ts +9 -14
  154. package/dist/lock/core/index.d.ts.map +1 -1
  155. package/dist/lock/core/index.js.map +1 -1
  156. package/dist/lock/redis/index.d.ts +2 -4
  157. package/dist/lock/redis/index.d.ts.map +1 -1
  158. package/dist/lock/redis/index.js.map +1 -1
  159. package/dist/logger/index.d.ts +105 -76
  160. package/dist/logger/index.d.ts.map +1 -1
  161. package/dist/logger/index.js +196 -174
  162. package/dist/logger/index.js.map +1 -1
  163. package/dist/mcp/index.d.ts +16 -20
  164. package/dist/mcp/index.d.ts.map +1 -1
  165. package/dist/mcp/index.js.map +1 -1
  166. package/dist/orm/core/index.browser.js.map +1 -1
  167. package/dist/orm/core/index.bun.js +19 -1
  168. package/dist/orm/core/index.bun.js.map +1 -1
  169. package/dist/orm/core/index.d.ts +76 -62
  170. package/dist/orm/core/index.d.ts.map +1 -1
  171. package/dist/orm/core/index.js +20 -2
  172. package/dist/orm/core/index.js.map +1 -1
  173. package/dist/orm/postgres/index.bun.js.map +1 -1
  174. package/dist/orm/postgres/index.d.ts +28 -20
  175. package/dist/orm/postgres/index.d.ts.map +1 -1
  176. package/dist/orm/postgres/index.js.map +1 -1
  177. package/dist/queue/core/index.d.ts +12 -15
  178. package/dist/queue/core/index.d.ts.map +1 -1
  179. package/dist/queue/core/index.js.map +1 -1
  180. package/dist/queue/core/index.workerd.js.map +1 -1
  181. package/dist/queue/redis/index.d.ts +3 -5
  182. package/dist/queue/redis/index.d.ts.map +1 -1
  183. package/dist/queue/redis/index.js.map +1 -1
  184. package/dist/react/auth/index.browser.js +9 -2
  185. package/dist/react/auth/index.browser.js.map +1 -1
  186. package/dist/react/auth/index.d.ts +14 -9
  187. package/dist/react/auth/index.d.ts.map +1 -1
  188. package/dist/react/auth/index.js +9 -2
  189. package/dist/react/auth/index.js.map +1 -1
  190. package/dist/react/core/index.d.ts +7 -8
  191. package/dist/react/core/index.d.ts.map +1 -1
  192. package/dist/react/core/index.js +6 -3
  193. package/dist/react/core/index.js.map +1 -1
  194. package/dist/react/form/index.d.ts +2 -4
  195. package/dist/react/form/index.d.ts.map +1 -1
  196. package/dist/react/form/index.js.map +1 -1
  197. package/dist/react/head/index.browser.js.map +1 -1
  198. package/dist/react/head/index.d.ts +2 -4
  199. package/dist/react/head/index.d.ts.map +1 -1
  200. package/dist/react/head/index.js.map +1 -1
  201. package/dist/react/i18n/index.d.ts +47 -11
  202. package/dist/react/i18n/index.d.ts.map +1 -1
  203. package/dist/react/i18n/index.js +33 -1
  204. package/dist/react/i18n/index.js.map +1 -1
  205. package/dist/react/intro/index.d.ts +1 -2
  206. package/dist/react/intro/index.d.ts.map +1 -1
  207. package/dist/react/intro/index.js +2 -2
  208. package/dist/react/intro/index.js.map +1 -1
  209. package/dist/react/router/index.browser.js +65 -19
  210. package/dist/react/router/index.browser.js.map +1 -1
  211. package/dist/react/router/index.d.ts +327 -222
  212. package/dist/react/router/index.d.ts.map +1 -1
  213. package/dist/react/router/index.js +65 -29
  214. package/dist/react/router/index.js.map +1 -1
  215. package/dist/react/testing/index.d.ts +1 -2
  216. package/dist/react/testing/index.d.ts.map +1 -1
  217. package/dist/react/testing/index.js +16 -17
  218. package/dist/react/testing/index.js.map +1 -1
  219. package/dist/react/ui/index.d.ts +20 -25
  220. package/dist/react/ui/index.d.ts.map +1 -1
  221. package/dist/react/ui/index.js.map +1 -1
  222. package/dist/redis/index.bun.js.map +1 -1
  223. package/dist/redis/index.d.ts +17 -19
  224. package/dist/redis/index.d.ts.map +1 -1
  225. package/dist/redis/index.js.map +1 -1
  226. package/dist/retry/index.d.ts +2 -4
  227. package/dist/retry/index.d.ts.map +1 -1
  228. package/dist/retry/index.js.map +1 -1
  229. package/dist/router/index.d.ts.map +1 -1
  230. package/dist/router/index.js.map +1 -1
  231. package/dist/scheduler/index.d.ts +10 -13
  232. package/dist/scheduler/index.d.ts.map +1 -1
  233. package/dist/scheduler/index.js.map +1 -1
  234. package/dist/scheduler/index.workerd.js.map +1 -1
  235. package/dist/security/index.browser.js.map +1 -1
  236. package/dist/security/index.d.ts +45 -48
  237. package/dist/security/index.d.ts.map +1 -1
  238. package/dist/security/index.js.map +1 -1
  239. package/dist/server/auth/index.browser.js.map +1 -1
  240. package/dist/server/auth/index.d.ts +167 -172
  241. package/dist/server/auth/index.d.ts.map +1 -1
  242. package/dist/server/auth/index.js +4 -8
  243. package/dist/server/auth/index.js.map +1 -1
  244. package/dist/server/cookies/index.browser.js.map +1 -1
  245. package/dist/server/cookies/index.d.ts +5 -7
  246. package/dist/server/cookies/index.d.ts.map +1 -1
  247. package/dist/server/cookies/index.js.map +1 -1
  248. package/dist/server/core/index.browser.js.map +1 -1
  249. package/dist/server/core/index.d.ts +88 -73
  250. package/dist/server/core/index.d.ts.map +1 -1
  251. package/dist/server/core/index.js +19 -0
  252. package/dist/server/core/index.js.map +1 -1
  253. package/dist/server/cors/index.d.ts +11 -14
  254. package/dist/server/cors/index.d.ts.map +1 -1
  255. package/dist/server/cors/index.js.map +1 -1
  256. package/dist/server/etag/index.d.ts +6 -9
  257. package/dist/server/etag/index.d.ts.map +1 -1
  258. package/dist/server/etag/index.js.map +1 -1
  259. package/dist/server/health/index.d.ts +18 -21
  260. package/dist/server/health/index.d.ts.map +1 -1
  261. package/dist/server/health/index.js.map +1 -1
  262. package/dist/server/links/index.browser.js +2 -0
  263. package/dist/server/links/index.browser.js.map +1 -1
  264. package/dist/server/links/index.d.ts +63 -67
  265. package/dist/server/links/index.d.ts.map +1 -1
  266. package/dist/server/links/index.js +2 -0
  267. package/dist/server/links/index.js.map +1 -1
  268. package/dist/server/metrics/index.d.ts +5 -7
  269. package/dist/server/metrics/index.d.ts.map +1 -1
  270. package/dist/server/metrics/index.js.map +1 -1
  271. package/dist/server/proxy/index.d.ts +3 -5
  272. package/dist/server/proxy/index.d.ts.map +1 -1
  273. package/dist/server/proxy/index.js.map +1 -1
  274. package/dist/server/rate-limit/index.d.ts +10 -13
  275. package/dist/server/rate-limit/index.d.ts.map +1 -1
  276. package/dist/server/rate-limit/index.js.map +1 -1
  277. package/dist/server/static/index.d.ts +3 -5
  278. package/dist/server/static/index.d.ts.map +1 -1
  279. package/dist/server/static/index.js.map +1 -1
  280. package/dist/server/swagger/index.d.ts +5 -8
  281. package/dist/server/swagger/index.d.ts.map +1 -1
  282. package/dist/server/swagger/index.js.map +1 -1
  283. package/dist/sms/index.d.ts +3 -5
  284. package/dist/sms/index.d.ts.map +1 -1
  285. package/dist/sms/index.js.map +1 -1
  286. package/dist/system/index.browser.js.map +1 -1
  287. package/dist/system/index.d.ts +2 -4
  288. package/dist/system/index.d.ts.map +1 -1
  289. package/dist/system/index.js.map +1 -1
  290. package/dist/system/index.workerd.js.map +1 -1
  291. package/dist/topic/core/index.d.ts +4 -6
  292. package/dist/topic/core/index.d.ts.map +1 -1
  293. package/dist/topic/core/index.js.map +1 -1
  294. package/dist/topic/redis/index.d.ts +5 -8
  295. package/dist/topic/redis/index.d.ts.map +1 -1
  296. package/dist/topic/redis/index.js.map +1 -1
  297. package/package.json +45 -22
  298. package/src/api/audits/__tests__/AuditService.spec.ts +18 -110
  299. package/src/api/audits/controllers/AdminAuditController.ts +14 -0
  300. package/src/api/audits/services/AuditService.ts +21 -88
  301. package/src/api/files/__tests__/FileService.spec.ts +207 -2
  302. package/src/api/files/index.ts +3 -0
  303. package/src/api/files/schemas/fileCreatorSummarySchema.ts +22 -0
  304. package/src/api/files/schemas/fileResourceSchema.ts +10 -1
  305. package/src/api/files/services/FileService.ts +170 -72
  306. package/src/api/jobs/__tests__/$job.spec.ts +24 -1
  307. package/src/api/jobs/index.ts +4 -3
  308. package/src/api/jobs/primitives/$job.ts +7 -3
  309. package/src/api/jobs/providers/DirectJobDispatcher.ts +17 -36
  310. package/src/api/jobs/providers/JobProvider.ts +53 -24
  311. package/src/api/jobs/schemas/jobConfigAtom.ts +1 -1
  312. package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +4 -1
  313. package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +3 -1
  314. package/src/api/parameters/__tests__/$parameter.spec.ts +19 -2
  315. package/src/api/parameters/audits/ParameterAudits.ts +17 -0
  316. package/src/api/parameters/controllers/AdminParameterController.ts +95 -19
  317. package/src/api/parameters/index.ts +3 -0
  318. package/src/api/parameters/schemas/activateParameterBodySchema.ts +3 -3
  319. package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +3 -2
  320. package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +25 -0
  321. package/src/api/parameters/schemas/parameterResponseSchema.ts +5 -0
  322. package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +4 -2
  323. package/src/api/parameters/services/ParameterProvider.ts +69 -6
  324. package/src/api/subscriptions/jobs/SubscriptionJobs.ts +1 -1
  325. package/src/api/users/__tests__/AdminSessionController.spec.ts +37 -0
  326. package/src/api/users/audits/SessionAudits.ts +33 -0
  327. package/src/api/users/audits/UserAudits.ts +19 -43
  328. package/src/api/users/controllers/AdminUserController.ts +66 -1
  329. package/src/api/users/entities/sessions.ts +6 -0
  330. package/src/api/users/entities/users.ts +2 -0
  331. package/src/api/users/index.ts +9 -1
  332. package/src/api/users/primitives/$realm.ts +3 -0
  333. package/src/api/users/schemas/sessionResourceSchema.ts +16 -0
  334. package/src/api/users/schemas/updateUserSchema.ts +1 -8
  335. package/src/api/users/schemas/userQuerySchema.ts +7 -0
  336. package/src/api/users/services/CredentialService.ts +15 -6
  337. package/src/api/users/services/IdentityService.ts +2 -1
  338. package/src/api/users/services/RegistrationService.ts +2 -1
  339. package/src/api/users/services/SessionCrudService.ts +19 -2
  340. package/src/api/users/services/SessionService.ts +39 -19
  341. package/src/api/users/services/UserService.ts +106 -8
  342. package/src/background/__tests__/BackgroundTaskProvider.spec.ts +96 -0
  343. package/src/background/index.ts +37 -0
  344. package/src/background/index.workerd.ts +28 -0
  345. package/src/background/providers/BackgroundTaskProvider.ts +70 -0
  346. package/src/background/providers/WorkerdBackgroundTaskProvider.ts +43 -0
  347. package/src/bucket/__tests__/$bucket.spec.ts +18 -0
  348. package/src/bucket/__tests__/LocalFileStorageProvider.spec.ts +5 -0
  349. package/src/bucket/__tests__/MemoryFileStorageProvider.spec.ts +5 -0
  350. package/src/bucket/__tests__/NodeS3BucketProvider.spec.ts +23 -4
  351. package/src/bucket/__tests__/shared.ts +30 -0
  352. package/src/bucket/index.ts +5 -5
  353. package/src/bucket/index.workerd.ts +11 -4
  354. package/src/bucket/primitives/$bucket.ts +27 -0
  355. package/src/bucket/providers/FileStorageProvider.ts +13 -0
  356. package/src/bucket/providers/LocalFileStorageProvider.ts +17 -1
  357. package/src/bucket/providers/MemoryFileStorageProvider.ts +7 -0
  358. package/src/bucket/providers/{CloudflareR2Provider.ts → R2FileStorageProvider.ts} +10 -1
  359. package/src/bucket/providers/{NodeS3BucketProvider.ts → S3FileStorageProvider.ts} +27 -5
  360. package/src/cli/core/__tests__/BuildDockerTask.spec.ts +25 -1
  361. package/src/cli/core/__tests__/init.spec.ts +0 -219
  362. package/src/cli/core/commands/__tests__/BuildCommand.spec.ts +43 -0
  363. package/src/cli/core/commands/build.ts +108 -30
  364. package/src/cli/core/commands/init.ts +0 -12
  365. package/src/cli/core/commands/pack.ts +133 -0
  366. package/src/cli/core/index.ts +3 -0
  367. package/src/cli/core/providers/ViteDevServerProvider.ts +40 -16
  368. package/src/cli/core/services/PackageManagerUtils.ts +0 -16
  369. package/src/cli/core/services/ProjectScaffolder.ts +29 -291
  370. package/src/cli/core/tasks/BuildCloudflareTask.ts +353 -47
  371. package/src/cli/core/tasks/BuildDockerTask.ts +33 -3
  372. package/src/cli/core/tasks/BuildTask.ts +34 -0
  373. package/src/cli/core/templates/apiIndexTs.ts +1 -22
  374. package/src/cli/core/templates/mainCss.ts +0 -1
  375. package/src/cli/core/templates/webAppRouterTs.ts +0 -99
  376. package/src/cli/core/templates/webIndexTs.ts +1 -22
  377. package/src/cli/platform/__tests__/SecretsCommand.spec.ts +5 -3
  378. package/src/cli/platform/commands/SecretsCommand.ts +8 -6
  379. package/src/cli/platform/commands/platform.ts +192 -46
  380. package/src/cli/platform/index.ts +12 -52
  381. package/src/cli/{platform → platform-lib}/__tests__/CloudflareAdapter.spec.ts +426 -169
  382. package/src/cli/{platform → platform-lib}/__tests__/NamingService.spec.ts +91 -4
  383. package/src/cli/{platform → platform-lib}/__tests__/VercelAdapter.spec.ts +56 -85
  384. package/src/cli/{platform → platform-lib}/adapters/CloudflareAdapter.ts +402 -165
  385. package/src/cli/{platform → platform-lib}/adapters/PlatformAdapter.ts +62 -35
  386. package/src/cli/{platform → platform-lib}/adapters/VercelAdapter.ts +6 -10
  387. package/src/cli/{platform → platform-lib}/atoms/platformOptions.ts +34 -1
  388. package/src/cli/platform-lib/index.ts +67 -0
  389. package/src/cli/platform-lib/services/NamingService.ts +136 -0
  390. package/src/cli/{platform → platform-lib}/services/PlatformInspector.ts +60 -13
  391. package/src/cli/{platform → platform-lib}/services/PlatformOrchestrator.ts +54 -43
  392. package/src/cli/{platform → platform-lib}/services/WranglerApi.ts +4 -2
  393. package/src/command/__tests__/Runner.spec.ts +20 -0
  394. package/src/command/helpers/EnvUtils.ts +19 -3
  395. package/src/command/helpers/Runner.ts +12 -2
  396. package/src/command/providers/CliProvider.ts +34 -1
  397. package/src/{containers → container}/core/__tests__/$container.spec.ts +5 -5
  398. package/src/{containers → container}/core/index.ts +4 -4
  399. package/src/{containers → container}/core/index.workerd.ts +19 -3
  400. package/src/{containers → container}/core/primitives/$container.ts +1 -1
  401. package/src/{containers → container}/core/providers/CloudflareContainerProvider.ts +17 -19
  402. package/src/{containers → container}/core/providers/ContainerProvider.ts +16 -2
  403. package/src/{containers → container}/core/providers/MockContainerProvider.ts +1 -1
  404. package/src/core/Alepha.ts +49 -1
  405. package/src/core/__tests__/$env.spec.ts +42 -0
  406. package/src/core/__tests__/dump.spec.ts +47 -0
  407. package/src/email/cloudflare/__tests__/CloudflareEmailProvider.spec.ts +42 -10
  408. package/src/email/cloudflare/index.ts +14 -5
  409. package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +54 -9
  410. package/src/logger/__tests__/Logger.spec.ts +55 -0
  411. package/src/logger/index.ts +13 -0
  412. package/src/logger/services/Logger.ts +31 -1
  413. package/src/orm/__tests__/orm-showcase-tests.ts +27 -0
  414. package/src/orm/__tests__/orm-showcase.spec.ts +12 -0
  415. package/src/orm/core/interfaces/PgQuery.ts +4 -1
  416. package/src/orm/core/services/Repository.ts +27 -11
  417. package/src/react/auth/hooks/useAuth.ts +10 -5
  418. package/src/react/core/__tests__/useQuery.browser.spec.tsx +25 -0
  419. package/src/react/core/hooks/useAction.ts +14 -3
  420. package/src/react/core/hooks/useQuery.ts +24 -4
  421. package/src/react/i18n/components/Translate.tsx +47 -0
  422. package/src/react/i18n/index.ts +2 -0
  423. package/src/react/intro/components/GettingStartedAdminSlide.tsx +2 -2
  424. package/src/react/router/__tests__/$page.spec.tsx +3 -2
  425. package/src/react/router/__tests__/page-can.spec.ts +18 -13
  426. package/src/react/router/hooks/useQueryParams.ts +114 -14
  427. package/src/react/router/primitives/$page.ts +85 -4
  428. package/src/react/router/providers/ReactBrowserRouterProvider.ts +3 -7
  429. package/src/react/router/providers/ReactServerProvider.ts +4 -13
  430. package/src/react/ui/services/SchemaControl.ts +3 -4
  431. package/src/server/core/providers/ServerMultipartProvider.ts +19 -0
  432. package/src/server/links/providers/LinkProvider.ts +10 -0
  433. package/dist/containers/core/index.d.ts.map +0 -1
  434. package/dist/containers/core/index.js.map +0 -1
  435. package/dist/containers/core/index.workerd.js.map +0 -1
  436. package/src/cli/core/templates/componentsJsonTs.ts +0 -39
  437. package/src/cli/core/templates/saasAdminLayoutTsx.ts +0 -77
  438. package/src/cli/core/templates/saasAdminPagesTsx.ts +0 -26
  439. package/src/cli/core/templates/saasAuthLayoutTsx.ts +0 -22
  440. package/src/cli/core/templates/saasAuthPagesTsx.ts +0 -62
  441. package/src/cli/core/templates/saasRealmProviderTs.ts +0 -52
  442. package/src/cli/platform/services/NamingService.ts +0 -54
  443. /package/dist/orm/core/{chunk-o8xxKEmq.js → chunk-B4FMCO8f.js} +0 -0
  444. /package/dist/react/testing/{chunk-6Ep1yQYe.js → chunk-BpyX8vjI.js} +0 -0
  445. /package/src/cli/{platform → platform-lib}/__tests__/GitHubSecretStore.spec.ts +0 -0
  446. /package/src/cli/{platform → platform-lib}/__tests__/PlatformCacheProvider.spec.ts +0 -0
  447. /package/src/cli/{platform → platform-lib}/__tests__/PlatformInspector.spec.ts +0 -0
  448. /package/src/cli/{platform → platform-lib}/__tests__/PlatformOrchestrator.spec.ts +0 -0
  449. /package/src/cli/{platform → platform-lib}/__tests__/SecretFilterService.spec.ts +0 -0
  450. /package/src/cli/{platform → platform-lib}/__tests__/detectResources.spec.ts +0 -0
  451. /package/src/cli/{platform → platform-lib}/providers/GitHubSecretStore.ts +0 -0
  452. /package/src/cli/{platform → platform-lib}/providers/MemorySecretStore.ts +0 -0
  453. /package/src/cli/{platform → platform-lib}/providers/PlatformCacheProvider.ts +0 -0
  454. /package/src/cli/{platform → platform-lib}/providers/SecretStoreProvider.ts +0 -0
  455. /package/src/cli/{platform → platform-lib}/schemas/cloudflare.ts +0 -0
  456. /package/src/cli/{platform → platform-lib}/schemas/platform.ts +0 -0
  457. /package/src/cli/{platform → platform-lib}/schemas/vercel.ts +0 -0
  458. /package/src/cli/{platform → platform-lib}/services/CloudflareApi.ts +0 -0
  459. /package/src/cli/{platform → platform-lib}/services/SecretFilterService.ts +0 -0
  460. /package/src/cli/{platform → platform-lib}/services/VercelApi.ts +0 -0
  461. /package/src/cli/{platform → platform-lib}/services/VercelCli.ts +0 -0
  462. /package/src/{containers → container}/core/interfaces/ContainerOptions.ts +0 -0
  463. /package/src/{containers → container}/core/providers/NodeContainerProvider.ts +0 -0
@@ -1,15 +1,10 @@
1
- import * as _$alepha from "alepha";
2
1
  import { Alepha, AlephaError, Async, KIND, PipelinePrimitive, PipelinePrimitiveOptions, Static, TNull, TObject, TOptional, TSchema, TUnion } from "alepha";
2
+ import { BackgroundTaskProvider } from "alepha/background";
3
3
  import { LockProvider } from "alepha/lock";
4
- import * as _$alepha_queue0 from "alepha/queue";
5
4
  import { CronProvider } from "alepha/scheduler";
6
- import * as _$alepha_server0 from "alepha/server";
7
- import * as _$alepha_logger0 from "alepha/logger";
8
5
  import { LogEntry } from "alepha/logger";
9
- import * as _$alepha_orm0 from "alepha/orm";
10
6
  import { CryptoProvider } from "alepha/crypto";
11
7
  import { DateTime, DateTimeProvider, DurationLike } from "alepha/datetime";
12
- import * as _$typebox from "typebox";
13
8
  import { BuildExtraConfigColumns, SQL } from "drizzle-orm";
14
9
  import { PgColumnBuilderBase, PgSequenceOptions, PgTableExtraConfigValue, UpdateDeleteAction } from "drizzle-orm/pg-core";
15
10
  //#region ../../src/orm/core/schemas/insertSchema.d.ts
@@ -303,8 +298,8 @@ type PgAttr<T extends TSchema, TAttr extends PgSymbolKeys> = T & { [K in TAttr]:
303
298
  * - `d1://BINDING_NAME` — Cloudflare D1
304
299
  * - `hyperdrive://BINDING_NAME` — Cloudflare Hyperdrive
305
300
  */
306
- declare const databaseEnvSchema: _$typebox.TObject<{
307
- DATABASE_URL: _$typebox.TOptional<_$typebox.TString>;
301
+ declare const databaseEnvSchema: import("typebox").TObject<{
302
+ DATABASE_URL: import("typebox").TOptional<import("typebox").TString>;
308
303
  /**
309
304
  * Enable or disable push-based schema synchronization (drizzle-kit push).
310
305
  *
@@ -312,7 +307,7 @@ declare const databaseEnvSchema: _$typebox.TObject<{
312
307
  * Set to `false` in development to skip automatic schema sync
313
308
  * (e.g. when managing migrations manually).
314
309
  */
315
- DATABASE_SYNC: _$typebox.TOptional<_$typebox.TBoolean>;
310
+ DATABASE_SYNC: import("typebox").TOptional<import("typebox").TBoolean>;
316
311
  }>;
317
312
  declare module "alepha" {
318
313
  interface Env extends Partial<Static<typeof databaseEnvSchema>> {}
@@ -336,35 +331,35 @@ declare module "alepha" {
336
331
  * - sweep picks due ones → pending
337
332
  * - cancel → cancelled
338
333
  */
339
- declare const jobExecutionEntity: _$alepha_orm0.EntityPrimitive<_$typebox.TObject<{
340
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
341
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
342
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
343
- jobName: _$typebox.TString;
344
- key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
345
- status: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
346
- priority: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
347
- attempt: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
348
- maxAttempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
349
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
350
- scheduledAt: _$typebox.TOptional<_$typebox.TString>;
351
- startedAt: _$typebox.TOptional<_$typebox.TString>;
352
- completedAt: _$typebox.TOptional<_$typebox.TString>;
353
- error: _$typebox.TOptional<_$typebox.TString>;
354
- logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
355
- level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
356
- message: _$typebox.TString;
357
- service: _$typebox.TString;
358
- module: _$typebox.TString;
359
- context: _$typebox.TOptional<_$typebox.TString>;
360
- app: _$typebox.TOptional<_$typebox.TString>;
361
- data: _$typebox.TOptional<_$typebox.TAny>;
362
- timestamp: _$typebox.TNumber;
334
+ declare const jobExecutionEntity: import("alepha/orm").EntityPrimitive<import("typebox").TObject<{
335
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
336
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
337
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
338
+ jobName: import("typebox").TString;
339
+ key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
340
+ status: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof import("alepha/orm").PG_DEFAULT>;
341
+ priority: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
342
+ attempt: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
343
+ maxAttempts: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
344
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
345
+ scheduledAt: import("typebox").TOptional<import("typebox").TString>;
346
+ startedAt: import("typebox").TOptional<import("typebox").TString>;
347
+ completedAt: import("typebox").TOptional<import("typebox").TString>;
348
+ error: import("typebox").TOptional<import("typebox").TString>;
349
+ logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
350
+ level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
351
+ message: import("typebox").TString;
352
+ service: import("typebox").TString;
353
+ module: import("typebox").TString;
354
+ context: import("typebox").TOptional<import("typebox").TString>;
355
+ app: import("typebox").TOptional<import("typebox").TString>;
356
+ data: import("typebox").TOptional<import("typebox").TAny>;
357
+ timestamp: import("typebox").TNumber;
363
358
  }>>>;
364
- triggeredBy: _$typebox.TOptional<_$typebox.TString>;
365
- triggeredByName: _$typebox.TOptional<_$typebox.TString>;
366
- cancelledBy: _$typebox.TOptional<_$typebox.TString>;
367
- cancelledByName: _$typebox.TOptional<_$typebox.TString>;
359
+ triggeredBy: import("typebox").TOptional<import("typebox").TString>;
360
+ triggeredByName: import("typebox").TOptional<import("typebox").TString>;
361
+ cancelledBy: import("typebox").TOptional<import("typebox").TString>;
362
+ cancelledByName: import("typebox").TOptional<import("typebox").TString>;
368
363
  }>>;
369
364
  type JobExecutionEntity = Static<typeof jobExecutionEntity.schema>;
370
365
  type JobStatus = "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
@@ -419,8 +414,8 @@ interface JobPrimitiveOptions<T extends TSchema = TSchema> extends PipelinePrimi
419
414
  * Cron-mode jobs do not retry — the next tick re-runs.
420
415
  *
421
416
  * Retries are picked up by the reconciliation sweep, so retry granularity
422
- * is bounded by `sweepCron` (default 5 minutes). The first retry may run
423
- * earlier than 5 minutes if the sweep tick happens sooner.
417
+ * is bounded by `sweepCron` (default 15 minutes). The first retry may run
418
+ * earlier than 15 minutes if the sweep tick happens sooner.
424
419
  */
425
420
  retry?: JobRetryOptions;
426
421
  /**
@@ -453,10 +448,14 @@ interface JobPrimitiveOptions<T extends TSchema = TSchema> extends PipelinePrimi
453
448
  /**
454
449
  * Whether to record successful executions.
455
450
  *
456
- * - `"error"` (default for cron, default for queue): only error/cancelled rows kept
451
+ * - `"error"` (default for queue): only error/cancelled rows kept
457
452
  * - `"all"`: keep success rows too (bounded by `keepLastSuccess`)
458
453
  * - `"none"`: fire-and-forget, no row even on error
459
454
  *
455
+ * **Cron jobs default to keeping their last successful run** (`record: "all"`
456
+ * with `keep.ok = 1`) so the admin "Last run" is accurate — set
457
+ * `record: "error"` to opt out (e.g. for very high-frequency crons).
458
+ *
460
459
  * Note: queue-mode jobs always write a `pending` row at push time (outbox).
461
460
  * This setting controls whether that row is kept on success.
462
461
  */
@@ -645,36 +644,36 @@ declare class JobProvider {
645
644
  */
646
645
  protected dispatcherRef?: JobDispatcher;
647
646
  get dispatcher(): JobDispatcher;
648
- protected readonly log: _$alepha_logger0.Logger;
649
- protected readonly executions: _$alepha_orm0.Repository<_$typebox.TObject<{
650
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
651
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
652
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
653
- jobName: _$typebox.TString;
654
- key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
655
- status: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
656
- priority: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
657
- attempt: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
658
- maxAttempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
659
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
660
- scheduledAt: _$typebox.TOptional<_$typebox.TString>;
661
- startedAt: _$typebox.TOptional<_$typebox.TString>;
662
- completedAt: _$typebox.TOptional<_$typebox.TString>;
663
- error: _$typebox.TOptional<_$typebox.TString>;
664
- logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
665
- level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
666
- message: _$typebox.TString;
667
- service: _$typebox.TString;
668
- module: _$typebox.TString;
669
- context: _$typebox.TOptional<_$typebox.TString>;
670
- app: _$typebox.TOptional<_$typebox.TString>;
671
- data: _$typebox.TOptional<_$typebox.TAny>;
672
- timestamp: _$typebox.TNumber;
647
+ protected readonly log: import("alepha/logger").Logger;
648
+ protected readonly executions: import("alepha/orm").Repository<import("typebox").TObject<{
649
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
650
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
651
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
652
+ jobName: import("typebox").TString;
653
+ key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
654
+ status: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof import("alepha/orm").PG_DEFAULT>;
655
+ priority: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
656
+ attempt: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
657
+ maxAttempts: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
658
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
659
+ scheduledAt: import("typebox").TOptional<import("typebox").TString>;
660
+ startedAt: import("typebox").TOptional<import("typebox").TString>;
661
+ completedAt: import("typebox").TOptional<import("typebox").TString>;
662
+ error: import("typebox").TOptional<import("typebox").TString>;
663
+ logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
664
+ level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
665
+ message: import("typebox").TString;
666
+ service: import("typebox").TString;
667
+ module: import("typebox").TString;
668
+ context: import("typebox").TOptional<import("typebox").TString>;
669
+ app: import("typebox").TOptional<import("typebox").TString>;
670
+ data: import("typebox").TOptional<import("typebox").TAny>;
671
+ timestamp: import("typebox").TNumber;
673
672
  }>>>;
674
- triggeredBy: _$typebox.TOptional<_$typebox.TString>;
675
- triggeredByName: _$typebox.TOptional<_$typebox.TString>;
676
- cancelledBy: _$typebox.TOptional<_$typebox.TString>;
677
- cancelledByName: _$typebox.TOptional<_$typebox.TString>;
673
+ triggeredBy: import("typebox").TOptional<import("typebox").TString>;
674
+ triggeredByName: import("typebox").TOptional<import("typebox").TString>;
675
+ cancelledBy: import("typebox").TOptional<import("typebox").TString>;
676
+ cancelledByName: import("typebox").TOptional<import("typebox").TString>;
678
677
  }>>;
679
678
  protected readonly jobs: Map<string, JobRuntimeRegistration>;
680
679
  protected readonly inFlight: Set<Promise<void>>;
@@ -690,6 +689,7 @@ declare class JobProvider {
690
689
  timestamp: number;
691
690
  }[]>;
692
691
  protected stopping: boolean;
692
+ constructor();
693
693
  registerJob(name: string, options: JobPrimitiveOptions): void;
694
694
  getRegisteredJobs(): Map<string, JobRuntimeRegistration>;
695
695
  /**
@@ -813,8 +813,8 @@ declare class JobProvider {
813
813
  * path is 2 queries instead of 3.
814
814
  */
815
815
  protected claim(executionId: string): Promise<{
816
- key?: string | null | undefined;
817
816
  error?: string | undefined;
817
+ key?: string | null | undefined;
818
818
  payload?: Record<string, any> | undefined;
819
819
  scheduledAt?: string | undefined;
820
820
  startedAt?: string | undefined;
@@ -833,12 +833,12 @@ declare class JobProvider {
833
833
  triggeredByName?: string | undefined;
834
834
  cancelledBy?: string | undefined;
835
835
  cancelledByName?: string | undefined;
836
+ priority: number;
837
+ status: "ok" | "error" | "pending" | "running" | "scheduled" | "cancelled";
836
838
  id: string;
837
839
  createdAt: string;
838
840
  updatedAt: string;
839
841
  jobName: string;
840
- status: "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
841
- priority: number;
842
842
  attempt: number;
843
843
  maxAttempts: number;
844
844
  } | null>;
@@ -854,15 +854,15 @@ declare class JobProvider {
854
854
  protected dispatchScheduled(jobName: string, executionId: string): Promise<void>;
855
855
  protected trimRingBuffers(): Promise<void>;
856
856
  protected trimByStatus(jobName: string, status: "ok" | "error", keep: number): Promise<void>;
857
- protected readonly onStart: _$alepha.HookPrimitive<"start">;
858
- protected readonly onStop: _$alepha.HookPrimitive<"stop">;
857
+ protected readonly onStart: import("alepha").HookPrimitive<"start">;
858
+ protected readonly onStop: import("alepha").HookPrimitive<"stop">;
859
859
  protected getRegistration(name: string): JobRuntimeRegistration;
860
860
  }
861
861
  //#endregion
862
862
  //#region ../../src/api/jobs/schemas/jobExecutionQuerySchema.d.ts
863
- declare const jobExecutionQuerySchema: _$typebox.TObject<{
864
- status: _$typebox.TOptional<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">>;
865
- limit: _$typebox.TOptional<_$typebox.TInteger>;
863
+ declare const jobExecutionQuerySchema: import("typebox").TObject<{
864
+ status: import("typebox").TOptional<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">>;
865
+ limit: import("typebox").TOptional<import("typebox").TInteger>;
866
866
  }>;
867
867
  type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
868
868
  //#endregion
@@ -877,57 +877,57 @@ type JobExecutionQuery = Static<typeof jobExecutionQuerySchema>;
877
877
  * `JobService` is responsible for the int → string transform.
878
878
  * - `can` derives the available admin actions from the row's status.
879
879
  */
880
- declare const jobExecutionResourceSchema: _$typebox.TObject<{
881
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
882
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
883
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
884
- jobName: _$typebox.TString;
885
- key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
886
- status: PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof PG_DEFAULT>;
887
- priority: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
888
- attempt: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
889
- maxAttempts: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
890
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
891
- scheduledAt: _$typebox.TOptional<_$typebox.TString>;
892
- startedAt: _$typebox.TOptional<_$typebox.TString>;
893
- completedAt: _$typebox.TOptional<_$typebox.TString>;
894
- error: _$typebox.TOptional<_$typebox.TString>;
895
- logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
896
- level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
897
- message: _$typebox.TString;
898
- service: _$typebox.TString;
899
- module: _$typebox.TString;
900
- context: _$typebox.TOptional<_$typebox.TString>;
901
- app: _$typebox.TOptional<_$typebox.TString>;
902
- data: _$typebox.TOptional<_$typebox.TAny>;
903
- timestamp: _$typebox.TNumber;
880
+ declare const jobExecutionResourceSchema: import("typebox").TObject<{
881
+ error: import("typebox").TOptional<import("typebox").TString>;
882
+ status: PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof PG_DEFAULT>;
883
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
884
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
885
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
886
+ jobName: import("typebox").TString;
887
+ key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
888
+ attempt: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
889
+ maxAttempts: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
890
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
891
+ scheduledAt: import("typebox").TOptional<import("typebox").TString>;
892
+ startedAt: import("typebox").TOptional<import("typebox").TString>;
893
+ completedAt: import("typebox").TOptional<import("typebox").TString>;
894
+ logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
895
+ level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
896
+ message: import("typebox").TString;
897
+ service: import("typebox").TString;
898
+ module: import("typebox").TString;
899
+ context: import("typebox").TOptional<import("typebox").TString>;
900
+ app: import("typebox").TOptional<import("typebox").TString>;
901
+ data: import("typebox").TOptional<import("typebox").TAny>;
902
+ timestamp: import("typebox").TNumber;
904
903
  }>>>;
905
- triggeredBy: _$typebox.TOptional<_$typebox.TString>;
906
- triggeredByName: _$typebox.TOptional<_$typebox.TString>;
907
- cancelledBy: _$typebox.TOptional<_$typebox.TString>;
908
- cancelledByName: _$typebox.TOptional<_$typebox.TString>;
909
- can: _$typebox.TObject<{
910
- retry: _$typebox.TBoolean;
911
- cancel: _$typebox.TBoolean;
904
+ triggeredBy: import("typebox").TOptional<import("typebox").TString>;
905
+ triggeredByName: import("typebox").TOptional<import("typebox").TString>;
906
+ cancelledBy: import("typebox").TOptional<import("typebox").TString>;
907
+ cancelledByName: import("typebox").TOptional<import("typebox").TString>;
908
+ priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
909
+ can: import("typebox").TObject<{
910
+ retry: import("typebox").TBoolean;
911
+ cancel: import("typebox").TBoolean;
912
912
  }>;
913
913
  }>;
914
914
  type JobExecutionResource = Static<typeof jobExecutionResourceSchema>;
915
915
  //#endregion
916
916
  //#region ../../src/api/jobs/schemas/jobRegistrationSchema.d.ts
917
- declare const jobRegistrationSchema: _$typebox.TObject<{
918
- name: _$typebox.TString;
919
- description: _$typebox.TOptional<_$typebox.TString>;
920
- type: _$typebox.TUnsafe<"cron" | "queue" | "direct">;
921
- priority: _$typebox.TUnsafe<"critical" | "high" | "normal" | "low">;
922
- cron: _$typebox.TOptional<_$typebox.TString>;
923
- timeout: _$typebox.TOptional<_$typebox.TString>;
924
- retry: _$typebox.TOptional<_$typebox.TObject<{
925
- retries: _$typebox.TInteger;
917
+ declare const jobRegistrationSchema: import("typebox").TObject<{
918
+ name: import("typebox").TString;
919
+ description: import("typebox").TOptional<import("typebox").TString>;
920
+ type: import("typebox").TUnsafe<"cron" | "queue" | "direct">;
921
+ priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
922
+ cron: import("typebox").TOptional<import("typebox").TString>;
923
+ timeout: import("typebox").TOptional<import("typebox").TString>;
924
+ retry: import("typebox").TOptional<import("typebox").TObject<{
925
+ retries: import("typebox").TInteger;
926
926
  }>>;
927
- recent: _$typebox.TObject<{
928
- ok: _$typebox.TInteger;
929
- error: _$typebox.TInteger;
930
- lastRun: _$typebox.TOptional<_$typebox.TString>;
927
+ recent: import("typebox").TObject<{
928
+ ok: import("typebox").TInteger;
929
+ error: import("typebox").TInteger;
930
+ lastRun: import("typebox").TOptional<import("typebox").TString>;
931
931
  }>;
932
932
  }>;
933
933
  type JobRegistration = Static<typeof jobRegistrationSchema>;
@@ -943,37 +943,37 @@ type JobRegistration = Static<typeof jobRegistrationSchema>;
943
943
  */
944
944
  declare class JobService {
945
945
  protected readonly alepha: Alepha;
946
- protected readonly log: _$alepha_logger0.Logger;
946
+ protected readonly log: import("alepha/logger").Logger;
947
947
  protected readonly jobProvider: JobProvider;
948
- protected readonly executions: _$alepha_orm0.Repository<_$typebox.TObject<{
949
- id: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_PRIMARY_KEY>, typeof _$alepha_orm0.PG_DEFAULT>;
950
- createdAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_CREATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
951
- updatedAt: _$alepha_orm0.PgAttr<_$alepha_orm0.PgAttr<_$typebox.TString, typeof _$alepha_orm0.PG_UPDATED_AT>, typeof _$alepha_orm0.PG_DEFAULT>;
952
- jobName: _$typebox.TString;
953
- key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
954
- status: _$alepha_orm0.PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof _$alepha_orm0.PG_DEFAULT>;
955
- priority: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
956
- attempt: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
957
- maxAttempts: _$alepha_orm0.PgAttr<_$typebox.TInteger, typeof _$alepha_orm0.PG_DEFAULT>;
958
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
959
- scheduledAt: _$typebox.TOptional<_$typebox.TString>;
960
- startedAt: _$typebox.TOptional<_$typebox.TString>;
961
- completedAt: _$typebox.TOptional<_$typebox.TString>;
962
- error: _$typebox.TOptional<_$typebox.TString>;
963
- logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
964
- level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
965
- message: _$typebox.TString;
966
- service: _$typebox.TString;
967
- module: _$typebox.TString;
968
- context: _$typebox.TOptional<_$typebox.TString>;
969
- app: _$typebox.TOptional<_$typebox.TString>;
970
- data: _$typebox.TOptional<_$typebox.TAny>;
971
- timestamp: _$typebox.TNumber;
948
+ protected readonly executions: import("alepha/orm").Repository<import("typebox").TObject<{
949
+ id: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_PRIMARY_KEY>, typeof import("alepha/orm").PG_DEFAULT>;
950
+ createdAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_CREATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
951
+ updatedAt: import("alepha/orm").PgAttr<import("alepha/orm").PgAttr<import("typebox").TString, typeof import("alepha/orm").PG_UPDATED_AT>, typeof import("alepha/orm").PG_DEFAULT>;
952
+ jobName: import("typebox").TString;
953
+ key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
954
+ status: import("alepha/orm").PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof import("alepha/orm").PG_DEFAULT>;
955
+ priority: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
956
+ attempt: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
957
+ maxAttempts: import("alepha/orm").PgAttr<import("typebox").TInteger, typeof import("alepha/orm").PG_DEFAULT>;
958
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
959
+ scheduledAt: import("typebox").TOptional<import("typebox").TString>;
960
+ startedAt: import("typebox").TOptional<import("typebox").TString>;
961
+ completedAt: import("typebox").TOptional<import("typebox").TString>;
962
+ error: import("typebox").TOptional<import("typebox").TString>;
963
+ logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
964
+ level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
965
+ message: import("typebox").TString;
966
+ service: import("typebox").TString;
967
+ module: import("typebox").TString;
968
+ context: import("typebox").TOptional<import("typebox").TString>;
969
+ app: import("typebox").TOptional<import("typebox").TString>;
970
+ data: import("typebox").TOptional<import("typebox").TAny>;
971
+ timestamp: import("typebox").TNumber;
972
972
  }>>>;
973
- triggeredBy: _$typebox.TOptional<_$typebox.TString>;
974
- triggeredByName: _$typebox.TOptional<_$typebox.TString>;
975
- cancelledBy: _$typebox.TOptional<_$typebox.TString>;
976
- cancelledByName: _$typebox.TOptional<_$typebox.TString>;
973
+ triggeredBy: import("typebox").TOptional<import("typebox").TString>;
974
+ triggeredByName: import("typebox").TOptional<import("typebox").TString>;
975
+ cancelledBy: import("typebox").TOptional<import("typebox").TString>;
976
+ cancelledByName: import("typebox").TOptional<import("typebox").TString>;
977
977
  }>>;
978
978
  protected computeCan(status: string): {
979
979
  retry: boolean;
@@ -998,8 +998,8 @@ declare class JobService {
998
998
  * Recent executions for a single job, ORDER BY startedAt DESC.
999
999
  */
1000
1000
  getExecutions(jobName: string, query?: JobExecutionQuery): Promise<{
1001
- key?: string | null | undefined;
1002
1001
  error?: string | undefined;
1002
+ key?: string | null | undefined;
1003
1003
  payload?: Record<string, any> | undefined;
1004
1004
  scheduledAt?: string | undefined;
1005
1005
  startedAt?: string | undefined;
@@ -1018,12 +1018,12 @@ declare class JobService {
1018
1018
  triggeredByName?: string | undefined;
1019
1019
  cancelledBy?: string | undefined;
1020
1020
  cancelledByName?: string | undefined;
1021
+ priority: "critical" | "high" | "normal" | "low";
1022
+ status: "ok" | "error" | "pending" | "running" | "scheduled" | "cancelled";
1021
1023
  id: string;
1022
1024
  createdAt: string;
1023
1025
  updatedAt: string;
1024
1026
  jobName: string;
1025
- status: "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
1026
- priority: number;
1027
1027
  attempt: number;
1028
1028
  maxAttempts: number;
1029
1029
  can: {
@@ -1035,8 +1035,8 @@ declare class JobService {
1035
1035
  * Full execution detail (includes captured logs).
1036
1036
  */
1037
1037
  getExecution(id: string): Promise<{
1038
- key?: string | null | undefined;
1039
1038
  error?: string | undefined;
1039
+ key?: string | null | undefined;
1040
1040
  payload?: Record<string, any> | undefined;
1041
1041
  scheduledAt?: string | undefined;
1042
1042
  startedAt?: string | undefined;
@@ -1055,12 +1055,12 @@ declare class JobService {
1055
1055
  triggeredByName?: string | undefined;
1056
1056
  cancelledBy?: string | undefined;
1057
1057
  cancelledByName?: string | undefined;
1058
+ priority: "critical" | "high" | "normal" | "low";
1059
+ status: "ok" | "error" | "pending" | "running" | "scheduled" | "cancelled";
1058
1060
  id: string;
1059
1061
  createdAt: string;
1060
1062
  updatedAt: string;
1061
1063
  jobName: string;
1062
- status: "pending" | "running" | "scheduled" | "ok" | "error" | "cancelled";
1063
- priority: number;
1064
1064
  attempt: number;
1065
1065
  maxAttempts: number;
1066
1066
  can: {
@@ -1099,137 +1099,137 @@ declare class AdminJobController {
1099
1099
  protected readonly url: string;
1100
1100
  protected readonly group: string;
1101
1101
  protected readonly jobService: JobService;
1102
- readonly listJobs: _$alepha_server0.ActionPrimitiveFn<{
1103
- response: _$typebox.TArray<_$typebox.TObject<{
1104
- name: _$typebox.TString;
1105
- description: _$typebox.TOptional<_$typebox.TString>;
1106
- type: _$typebox.TUnsafe<"cron" | "queue" | "direct">;
1107
- priority: _$typebox.TUnsafe<"critical" | "high" | "normal" | "low">;
1108
- cron: _$typebox.TOptional<_$typebox.TString>;
1109
- timeout: _$typebox.TOptional<_$typebox.TString>;
1110
- retry: _$typebox.TOptional<_$typebox.TObject<{
1111
- retries: _$typebox.TInteger;
1102
+ readonly listJobs: import("alepha/server").ActionPrimitiveFn<{
1103
+ response: import("typebox").TArray<import("typebox").TObject<{
1104
+ name: import("typebox").TString;
1105
+ description: import("typebox").TOptional<import("typebox").TString>;
1106
+ type: import("typebox").TUnsafe<"cron" | "queue" | "direct">;
1107
+ priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
1108
+ cron: import("typebox").TOptional<import("typebox").TString>;
1109
+ timeout: import("typebox").TOptional<import("typebox").TString>;
1110
+ retry: import("typebox").TOptional<import("typebox").TObject<{
1111
+ retries: import("typebox").TInteger;
1112
1112
  }>>;
1113
- recent: _$typebox.TObject<{
1114
- ok: _$typebox.TInteger;
1115
- error: _$typebox.TInteger;
1116
- lastRun: _$typebox.TOptional<_$typebox.TString>;
1113
+ recent: import("typebox").TObject<{
1114
+ ok: import("typebox").TInteger;
1115
+ error: import("typebox").TInteger;
1116
+ lastRun: import("typebox").TOptional<import("typebox").TString>;
1117
1117
  }>;
1118
1118
  }>>;
1119
1119
  }>;
1120
- readonly listExecutions: _$alepha_server0.ActionPrimitiveFn<{
1121
- params: _$typebox.TObject<{
1122
- name: _$typebox.TString;
1120
+ readonly listExecutions: import("alepha/server").ActionPrimitiveFn<{
1121
+ params: import("typebox").TObject<{
1122
+ name: import("typebox").TString;
1123
1123
  }>;
1124
- query: _$typebox.TObject<{
1125
- status: _$typebox.TOptional<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">>;
1126
- limit: _$typebox.TOptional<_$typebox.TInteger>;
1124
+ query: import("typebox").TObject<{
1125
+ status: import("typebox").TOptional<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">>;
1126
+ limit: import("typebox").TOptional<import("typebox").TInteger>;
1127
1127
  }>;
1128
- response: _$typebox.TArray<_$typebox.TObject<{
1129
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1130
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1131
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1132
- jobName: _$typebox.TString;
1133
- key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
1134
- status: PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof PG_DEFAULT>;
1135
- priority: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
1136
- attempt: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
1137
- maxAttempts: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
1138
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
1139
- scheduledAt: _$typebox.TOptional<_$typebox.TString>;
1140
- startedAt: _$typebox.TOptional<_$typebox.TString>;
1141
- completedAt: _$typebox.TOptional<_$typebox.TString>;
1142
- error: _$typebox.TOptional<_$typebox.TString>;
1143
- logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
1144
- level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
1145
- message: _$typebox.TString;
1146
- service: _$typebox.TString;
1147
- module: _$typebox.TString;
1148
- context: _$typebox.TOptional<_$typebox.TString>;
1149
- app: _$typebox.TOptional<_$typebox.TString>;
1150
- data: _$typebox.TOptional<_$typebox.TAny>;
1151
- timestamp: _$typebox.TNumber;
1128
+ response: import("typebox").TArray<import("typebox").TObject<{
1129
+ error: import("typebox").TOptional<import("typebox").TString>;
1130
+ status: PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof PG_DEFAULT>;
1131
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1132
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1133
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1134
+ jobName: import("typebox").TString;
1135
+ key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
1136
+ attempt: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
1137
+ maxAttempts: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
1138
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
1139
+ scheduledAt: import("typebox").TOptional<import("typebox").TString>;
1140
+ startedAt: import("typebox").TOptional<import("typebox").TString>;
1141
+ completedAt: import("typebox").TOptional<import("typebox").TString>;
1142
+ logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
1143
+ level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
1144
+ message: import("typebox").TString;
1145
+ service: import("typebox").TString;
1146
+ module: import("typebox").TString;
1147
+ context: import("typebox").TOptional<import("typebox").TString>;
1148
+ app: import("typebox").TOptional<import("typebox").TString>;
1149
+ data: import("typebox").TOptional<import("typebox").TAny>;
1150
+ timestamp: import("typebox").TNumber;
1152
1151
  }>>>;
1153
- triggeredBy: _$typebox.TOptional<_$typebox.TString>;
1154
- triggeredByName: _$typebox.TOptional<_$typebox.TString>;
1155
- cancelledBy: _$typebox.TOptional<_$typebox.TString>;
1156
- cancelledByName: _$typebox.TOptional<_$typebox.TString>;
1157
- can: _$typebox.TObject<{
1158
- retry: _$typebox.TBoolean;
1159
- cancel: _$typebox.TBoolean;
1152
+ triggeredBy: import("typebox").TOptional<import("typebox").TString>;
1153
+ triggeredByName: import("typebox").TOptional<import("typebox").TString>;
1154
+ cancelledBy: import("typebox").TOptional<import("typebox").TString>;
1155
+ cancelledByName: import("typebox").TOptional<import("typebox").TString>;
1156
+ priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
1157
+ can: import("typebox").TObject<{
1158
+ retry: import("typebox").TBoolean;
1159
+ cancel: import("typebox").TBoolean;
1160
1160
  }>;
1161
1161
  }>>;
1162
1162
  }>;
1163
- readonly getExecution: _$alepha_server0.ActionPrimitiveFn<{
1164
- params: _$typebox.TObject<{
1165
- id: _$typebox.TString;
1163
+ readonly getExecution: import("alepha/server").ActionPrimitiveFn<{
1164
+ params: import("typebox").TObject<{
1165
+ id: import("typebox").TString;
1166
1166
  }>;
1167
- response: _$typebox.TObject<{
1168
- id: PgAttr<PgAttr<_$typebox.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1169
- createdAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1170
- updatedAt: PgAttr<PgAttr<_$typebox.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1171
- jobName: _$typebox.TString;
1172
- key: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TNull, _$typebox.TString]>>;
1173
- status: PgAttr<_$typebox.TUnsafe<"pending" | "running" | "scheduled" | "ok" | "error" | "cancelled">, typeof PG_DEFAULT>;
1174
- priority: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
1175
- attempt: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
1176
- maxAttempts: PgAttr<_$typebox.TInteger, typeof PG_DEFAULT>;
1177
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
1178
- scheduledAt: _$typebox.TOptional<_$typebox.TString>;
1179
- startedAt: _$typebox.TOptional<_$typebox.TString>;
1180
- completedAt: _$typebox.TOptional<_$typebox.TString>;
1181
- error: _$typebox.TOptional<_$typebox.TString>;
1182
- logs: _$typebox.TOptional<_$typebox.TArray<_$typebox.TObject<{
1183
- level: _$typebox.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
1184
- message: _$typebox.TString;
1185
- service: _$typebox.TString;
1186
- module: _$typebox.TString;
1187
- context: _$typebox.TOptional<_$typebox.TString>;
1188
- app: _$typebox.TOptional<_$typebox.TString>;
1189
- data: _$typebox.TOptional<_$typebox.TAny>;
1190
- timestamp: _$typebox.TNumber;
1167
+ response: import("typebox").TObject<{
1168
+ error: import("typebox").TOptional<import("typebox").TString>;
1169
+ status: PgAttr<import("typebox").TUnsafe<"ok" | "error" | "pending" | "running" | "scheduled" | "cancelled">, typeof PG_DEFAULT>;
1170
+ id: PgAttr<PgAttr<import("typebox").TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
1171
+ createdAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
1172
+ updatedAt: PgAttr<PgAttr<import("typebox").TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
1173
+ jobName: import("typebox").TString;
1174
+ key: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNull, import("typebox").TString]>>;
1175
+ attempt: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
1176
+ maxAttempts: PgAttr<import("typebox").TInteger, typeof PG_DEFAULT>;
1177
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
1178
+ scheduledAt: import("typebox").TOptional<import("typebox").TString>;
1179
+ startedAt: import("typebox").TOptional<import("typebox").TString>;
1180
+ completedAt: import("typebox").TOptional<import("typebox").TString>;
1181
+ logs: import("typebox").TOptional<import("typebox").TArray<import("typebox").TObject<{
1182
+ level: import("typebox").TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
1183
+ message: import("typebox").TString;
1184
+ service: import("typebox").TString;
1185
+ module: import("typebox").TString;
1186
+ context: import("typebox").TOptional<import("typebox").TString>;
1187
+ app: import("typebox").TOptional<import("typebox").TString>;
1188
+ data: import("typebox").TOptional<import("typebox").TAny>;
1189
+ timestamp: import("typebox").TNumber;
1191
1190
  }>>>;
1192
- triggeredBy: _$typebox.TOptional<_$typebox.TString>;
1193
- triggeredByName: _$typebox.TOptional<_$typebox.TString>;
1194
- cancelledBy: _$typebox.TOptional<_$typebox.TString>;
1195
- cancelledByName: _$typebox.TOptional<_$typebox.TString>;
1196
- can: _$typebox.TObject<{
1197
- retry: _$typebox.TBoolean;
1198
- cancel: _$typebox.TBoolean;
1191
+ triggeredBy: import("typebox").TOptional<import("typebox").TString>;
1192
+ triggeredByName: import("typebox").TOptional<import("typebox").TString>;
1193
+ cancelledBy: import("typebox").TOptional<import("typebox").TString>;
1194
+ cancelledByName: import("typebox").TOptional<import("typebox").TString>;
1195
+ priority: import("typebox").TUnsafe<"critical" | "high" | "normal" | "low">;
1196
+ can: import("typebox").TObject<{
1197
+ retry: import("typebox").TBoolean;
1198
+ cancel: import("typebox").TBoolean;
1199
1199
  }>;
1200
1200
  }>;
1201
1201
  }>;
1202
- readonly triggerJob: _$alepha_server0.ActionPrimitiveFn<{
1203
- params: _$typebox.TObject<{
1204
- name: _$typebox.TString;
1202
+ readonly triggerJob: import("alepha/server").ActionPrimitiveFn<{
1203
+ params: import("typebox").TObject<{
1204
+ name: import("typebox").TString;
1205
1205
  }>;
1206
- body: _$typebox.TObject<{
1207
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
1206
+ body: import("typebox").TObject<{
1207
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
1208
1208
  }>;
1209
- response: _$typebox.TObject<{
1210
- ok: _$typebox.TBoolean;
1211
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
1212
- count: _$typebox.TOptional<_$typebox.TNumber>;
1209
+ response: import("typebox").TObject<{
1210
+ ok: import("typebox").TBoolean;
1211
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
1212
+ count: import("typebox").TOptional<import("typebox").TNumber>;
1213
1213
  }>;
1214
1214
  }>;
1215
- readonly retryExecution: _$alepha_server0.ActionPrimitiveFn<{
1216
- params: _$typebox.TObject<{
1217
- id: _$typebox.TString;
1215
+ readonly retryExecution: import("alepha/server").ActionPrimitiveFn<{
1216
+ params: import("typebox").TObject<{
1217
+ id: import("typebox").TString;
1218
1218
  }>;
1219
- response: _$typebox.TObject<{
1220
- ok: _$typebox.TBoolean;
1221
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
1222
- count: _$typebox.TOptional<_$typebox.TNumber>;
1219
+ response: import("typebox").TObject<{
1220
+ ok: import("typebox").TBoolean;
1221
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
1222
+ count: import("typebox").TOptional<import("typebox").TNumber>;
1223
1223
  }>;
1224
1224
  }>;
1225
- readonly cancelExecution: _$alepha_server0.ActionPrimitiveFn<{
1226
- params: _$typebox.TObject<{
1227
- id: _$typebox.TString;
1225
+ readonly cancelExecution: import("alepha/server").ActionPrimitiveFn<{
1226
+ params: import("typebox").TObject<{
1227
+ id: import("typebox").TString;
1228
1228
  }>;
1229
- response: _$typebox.TObject<{
1230
- ok: _$typebox.TBoolean;
1231
- id: _$typebox.TOptional<_$typebox.TUnion<[_$typebox.TString, _$typebox.TInteger]>>;
1232
- count: _$typebox.TOptional<_$typebox.TNumber>;
1229
+ response: import("typebox").TObject<{
1230
+ ok: import("typebox").TBoolean;
1231
+ id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TInteger]>>;
1232
+ count: import("typebox").TOptional<import("typebox").TNumber>;
1233
1233
  }>;
1234
1234
  }>;
1235
1235
  }
@@ -1244,20 +1244,17 @@ declare class AdminJobController {
1244
1244
  * if the process dies before the handler finishes, the next sweep tick
1245
1245
  * picks the row up and re-dispatches.
1246
1246
  *
1247
- * **Cloudflare Workers** when an `executionCtx.waitUntil` is available
1248
- * in the alepha store at `cloudflare.waitUntil`, the dispatch wraps the
1249
- * background promise with `waitUntil` so the runtime keeps the isolate
1250
- * alive past the HTTP response. Without this, the handler would be
1251
- * terminated when the response is returned and only the next sweep
1252
- * (every 5 min by default) would re-dispatch.
1253
- *
1254
- * **Vercel / single-Node** — on long-running runtimes the event loop
1255
- * keeps the promise alive naturally; no special wiring is required.
1247
+ * Keeping the isolate alive past the HTTP response (Cloudflare Workers) vs.
1248
+ * relying on the event loop (Node/Vercel) is delegated to
1249
+ * {@link BackgroundTaskProvider.defer} this dispatcher stays
1250
+ * platform-agnostic. The DB outbox row remains the durability guarantee: if
1251
+ * the process dies mid-handler, the next sweep re-dispatches.
1256
1252
  */
1257
1253
  declare class DirectJobDispatcher extends JobDispatcher {
1258
1254
  readonly kind: "direct";
1259
1255
  protected readonly alepha: Alepha;
1260
- protected readonly log: _$alepha_logger0.Logger;
1256
+ protected readonly background: BackgroundTaskProvider;
1257
+ protected readonly log: import("alepha/logger").Logger;
1261
1258
  protected jobProviderRef?: JobProvider;
1262
1259
  protected getJobProvider(): JobProvider;
1263
1260
  dispatch(jobName: string, executionId: string): Promise<void>;
@@ -1280,9 +1277,9 @@ declare class JobQueueProvider extends JobDispatcher {
1280
1277
  protected readonly alepha: Alepha;
1281
1278
  protected jobProviderRef?: JobProvider;
1282
1279
  protected getJobProvider(): JobProvider;
1283
- protected readonly queue: _$alepha_queue0.QueuePrimitive<_$typebox.TObject<{
1284
- jobName: _$typebox.TString;
1285
- executionId: _$typebox.TString;
1280
+ protected readonly queue: import("alepha/queue").QueuePrimitive<import("typebox").TObject<{
1281
+ jobName: import("typebox").TString;
1282
+ executionId: import("typebox").TString;
1286
1283
  }>>;
1287
1284
  dispatch(jobName: string, executionId: string): Promise<void>;
1288
1285
  /**
@@ -1303,15 +1300,15 @@ declare class JobQueueProvider extends JobDispatcher {
1303
1300
  }
1304
1301
  //#endregion
1305
1302
  //#region ../../src/api/jobs/schemas/jobConfigAtom.d.ts
1306
- declare const jobConfig: _$alepha.Atom<_$typebox.TObject<{
1307
- sweepCron: _$typebox.TString;
1308
- trimCron: _$typebox.TString;
1309
- staleThreshold: _$typebox.TInteger;
1310
- runTimeout: _$typebox.TInteger;
1311
- keepLastSuccess: _$typebox.TInteger;
1312
- keepLastError: _$typebox.TInteger;
1313
- logMaxEntries: _$typebox.TInteger;
1314
- drainTimeout: _$typebox.TInteger;
1303
+ declare const jobConfig: import("alepha").Atom<import("typebox").TObject<{
1304
+ sweepCron: import("typebox").TString;
1305
+ trimCron: import("typebox").TString;
1306
+ staleThreshold: import("typebox").TInteger;
1307
+ runTimeout: import("typebox").TInteger;
1308
+ keepLastSuccess: import("typebox").TInteger;
1309
+ keepLastError: import("typebox").TInteger;
1310
+ logMaxEntries: import("typebox").TInteger;
1311
+ drainTimeout: import("typebox").TInteger;
1315
1312
  }>, "alepha.jobs">;
1316
1313
  type JobConfig = Static<typeof jobConfig.schema>;
1317
1314
  declare module "alepha" {
@@ -1321,8 +1318,8 @@ declare module "alepha" {
1321
1318
  } //# sourceMappingURL=jobConfigAtom.d.ts.map
1322
1319
  //#endregion
1323
1320
  //#region ../../src/api/jobs/schemas/triggerJobSchema.d.ts
1324
- declare const triggerJobSchema: _$typebox.TObject<{
1325
- payload: _$typebox.TOptional<_$typebox.TRecord<"^.*$", _$typebox.TAny>>;
1321
+ declare const triggerJobSchema: import("typebox").TObject<{
1322
+ payload: import("typebox").TOptional<import("typebox").TRecord<"^.*$", import("typebox").TAny>>;
1326
1323
  }>;
1327
1324
  type TriggerJob = Static<typeof triggerJobSchema>;
1328
1325
  //#endregion
@@ -1375,8 +1372,8 @@ declare module "alepha" {
1375
1372
  * is overkill.
1376
1373
  *
1377
1374
  * **Retries** are sweep-driven across all modes (no exponential backoff).
1378
- * Granularity is bounded by `sweepCron` (default 5 min). The first retry
1379
- * may land anywhere from a few seconds to ~5 min later depending on when
1375
+ * Granularity is bounded by `sweepCron` (default 15 min). The first retry
1376
+ * may land anywhere from a few seconds to ~15 min later depending on when
1380
1377
  * the next sweep tick fires. Cron jobs that declare `retry` go through
1381
1378
  * the same sweep path — a transient failure no longer means waiting for
1382
1379
  * the next cron tick (useful for once-daily jobs).
@@ -1396,7 +1393,7 @@ declare module "alepha" {
1396
1393
  *
1397
1394
  * @module alepha.api.jobs
1398
1395
  */
1399
- declare const AlephaApiJobs: _$alepha.Service<_$alepha.Module>;
1396
+ declare const AlephaApiJobs: import("alepha").Service<import("alepha").Module>;
1400
1397
  /**
1401
1398
  * Queue support for `$job`. Import alongside {@link AlephaApiJobs} when your
1402
1399
  * app declares queue-mode jobs (any `$job` with a `schema`) and you want a
@@ -1408,7 +1405,7 @@ declare const AlephaApiJobs: _$alepha.Service<_$alepha.Module>;
1408
1405
  *
1409
1406
  * @module alepha.api.jobs.queue
1410
1407
  */
1411
- declare const AlephaApiJobsQueue: _$alepha.Service<_$alepha.Module>;
1408
+ declare const AlephaApiJobsQueue: import("alepha").Service<import("alepha").Module>;
1412
1409
  //#endregion
1413
1410
  export { $job, AdminJobController, AlephaApiJobs, AlephaApiJobsQueue, CancelContext, DirectJobDispatcher, JobConfig, JobDispatcher, JobEffectiveMode, JobExecutionEntity, JobExecutionQuery, JobExecutionResource, JobHandlerArgs, JobPrimitive, JobPrimitiveOptions, JobPriority, JobProvider, JobQueueProvider, JobRegistration, JobRetryOptions, JobService, JobStatus, JobTriggerContext, PRIORITY_MAP, PRIORITY_REVERSE, PushManyItem, PushOptions, TriggerJob, jobConfig, jobExecutionEntity, jobExecutionQuerySchema, jobExecutionResourceSchema, jobRegistrationSchema, triggerJobSchema };
1414
1411
  //# sourceMappingURL=index.d.ts.map