@marinoscar/platform-contract 0.1.0-next.3 → 0.1.0-next.4

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 (673) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/README.md +23 -1
  3. package/dist/cjs/ai/capabilities.d.ts +85 -0
  4. package/dist/cjs/ai/capabilities.d.ts.map +1 -0
  5. package/dist/cjs/ai/capabilities.js +93 -0
  6. package/dist/cjs/ai/capabilities.js.map +1 -0
  7. package/dist/cjs/ai/constants.d.ts +239 -0
  8. package/dist/cjs/ai/constants.d.ts.map +1 -0
  9. package/dist/cjs/ai/constants.js +233 -0
  10. package/dist/cjs/ai/constants.js.map +1 -0
  11. package/dist/cjs/ai/features.d.ts +24 -0
  12. package/dist/cjs/ai/features.d.ts.map +1 -0
  13. package/dist/cjs/ai/features.js +33 -0
  14. package/dist/cjs/ai/features.js.map +1 -0
  15. package/dist/cjs/ai/index.d.ts +11 -0
  16. package/dist/cjs/ai/index.d.ts.map +1 -0
  17. package/dist/cjs/ai/index.js +81 -0
  18. package/dist/cjs/ai/index.js.map +1 -0
  19. package/dist/cjs/ai/org-keys.d.ts +50 -0
  20. package/dist/cjs/ai/org-keys.d.ts.map +1 -0
  21. package/dist/cjs/ai/org-keys.js +43 -0
  22. package/dist/cjs/ai/org-keys.js.map +1 -0
  23. package/dist/cjs/ai/schemas.d.ts +642 -0
  24. package/dist/cjs/ai/schemas.d.ts.map +1 -0
  25. package/dist/cjs/ai/schemas.js +894 -0
  26. package/dist/cjs/ai/schemas.js.map +1 -0
  27. package/dist/cjs/android-app/constants.d.ts +337 -0
  28. package/dist/cjs/android-app/constants.d.ts.map +1 -0
  29. package/dist/cjs/android-app/constants.js +312 -0
  30. package/dist/cjs/android-app/constants.js.map +1 -0
  31. package/dist/cjs/android-app/index.d.ts +5 -0
  32. package/dist/cjs/android-app/index.d.ts.map +1 -0
  33. package/dist/cjs/android-app/index.js +57 -0
  34. package/dist/cjs/android-app/index.js.map +1 -0
  35. package/dist/cjs/android-app/schemas.d.ts +358 -0
  36. package/dist/cjs/android-app/schemas.d.ts.map +1 -0
  37. package/dist/cjs/android-app/schemas.js +310 -0
  38. package/dist/cjs/android-app/schemas.js.map +1 -0
  39. package/dist/cjs/credentials/constants.d.ts +35 -0
  40. package/dist/cjs/credentials/constants.d.ts.map +1 -0
  41. package/dist/cjs/credentials/constants.js +39 -0
  42. package/dist/cjs/credentials/constants.js.map +1 -0
  43. package/dist/cjs/credentials/index.d.ts +5 -0
  44. package/dist/cjs/credentials/index.d.ts.map +1 -0
  45. package/dist/cjs/credentials/index.js +17 -0
  46. package/dist/cjs/credentials/index.js.map +1 -0
  47. package/dist/cjs/credentials/schemas.d.ts +64 -0
  48. package/dist/cjs/credentials/schemas.d.ts.map +1 -0
  49. package/dist/cjs/credentials/schemas.js +82 -0
  50. package/dist/cjs/credentials/schemas.js.map +1 -0
  51. package/dist/cjs/db-backup/config.d.ts +76 -0
  52. package/dist/cjs/db-backup/config.d.ts.map +1 -0
  53. package/dist/cjs/db-backup/config.js +115 -0
  54. package/dist/cjs/db-backup/config.js.map +1 -0
  55. package/dist/cjs/db-backup/constants.d.ts +314 -0
  56. package/dist/cjs/db-backup/constants.d.ts.map +1 -0
  57. package/dist/cjs/db-backup/constants.js +243 -0
  58. package/dist/cjs/db-backup/constants.js.map +1 -0
  59. package/dist/cjs/db-backup/index.d.ts +19 -0
  60. package/dist/cjs/db-backup/index.d.ts.map +1 -0
  61. package/dist/cjs/db-backup/index.js +81 -0
  62. package/dist/cjs/db-backup/index.js.map +1 -0
  63. package/dist/cjs/db-backup/node-credential.d.ts +37 -0
  64. package/dist/cjs/db-backup/node-credential.d.ts.map +1 -0
  65. package/dist/cjs/db-backup/node-credential.js +107 -0
  66. package/dist/cjs/db-backup/node-credential.js.map +1 -0
  67. package/dist/cjs/db-backup/node-result.d.ts +34 -0
  68. package/dist/cjs/db-backup/node-result.d.ts.map +1 -0
  69. package/dist/cjs/db-backup/node-result.js +168 -0
  70. package/dist/cjs/db-backup/node-result.js.map +1 -0
  71. package/dist/cjs/db-backup/restore.d.ts +405 -0
  72. package/dist/cjs/db-backup/restore.d.ts.map +1 -0
  73. package/dist/cjs/db-backup/restore.js +497 -0
  74. package/dist/cjs/db-backup/restore.js.map +1 -0
  75. package/dist/cjs/db-backup/run-actions.d.ts +49 -0
  76. package/dist/cjs/db-backup/run-actions.d.ts.map +1 -0
  77. package/dist/cjs/db-backup/run-actions.js +121 -0
  78. package/dist/cjs/db-backup/run-actions.js.map +1 -0
  79. package/dist/cjs/db-backup/runs-list-query.d.ts +20 -0
  80. package/dist/cjs/db-backup/runs-list-query.d.ts.map +1 -0
  81. package/dist/cjs/db-backup/runs-list-query.js +53 -0
  82. package/dist/cjs/db-backup/runs-list-query.js.map +1 -0
  83. package/dist/cjs/db-backup/runs.d.ts +46 -0
  84. package/dist/cjs/db-backup/runs.d.ts.map +1 -0
  85. package/dist/cjs/db-backup/runs.js +232 -0
  86. package/dist/cjs/db-backup/runs.js.map +1 -0
  87. package/dist/cjs/db-backup/schemas.d.ts +9 -0
  88. package/dist/cjs/db-backup/schemas.d.ts.map +1 -0
  89. package/dist/cjs/db-backup/schemas.js +31 -0
  90. package/dist/cjs/db-backup/schemas.js.map +1 -0
  91. package/dist/cjs/db-backup/settings-schemas.d.ts +217 -0
  92. package/dist/cjs/db-backup/settings-schemas.d.ts.map +1 -0
  93. package/dist/cjs/db-backup/settings-schemas.js +319 -0
  94. package/dist/cjs/db-backup/settings-schemas.js.map +1 -0
  95. package/dist/cjs/email/constants.d.ts +82 -0
  96. package/dist/cjs/email/constants.d.ts.map +1 -0
  97. package/dist/cjs/email/constants.js +82 -0
  98. package/dist/cjs/email/constants.js.map +1 -0
  99. package/dist/cjs/email/index.d.ts +5 -0
  100. package/dist/cjs/email/index.d.ts.map +1 -0
  101. package/dist/cjs/email/index.js +30 -0
  102. package/dist/cjs/email/index.js.map +1 -0
  103. package/dist/cjs/email/schemas.d.ts +276 -0
  104. package/dist/cjs/email/schemas.d.ts.map +1 -0
  105. package/dist/cjs/email/schemas.js +280 -0
  106. package/dist/cjs/email/schemas.js.map +1 -0
  107. package/dist/cjs/exports/constants.d.ts +123 -0
  108. package/dist/cjs/exports/constants.d.ts.map +1 -0
  109. package/dist/cjs/exports/constants.js +109 -0
  110. package/dist/cjs/exports/constants.js.map +1 -0
  111. package/dist/cjs/exports/index.d.ts +5 -0
  112. package/dist/cjs/exports/index.d.ts.map +1 -0
  113. package/dist/cjs/exports/index.js +42 -0
  114. package/dist/cjs/exports/index.js.map +1 -0
  115. package/dist/cjs/exports/schemas.d.ts +386 -0
  116. package/dist/cjs/exports/schemas.d.ts.map +1 -0
  117. package/dist/cjs/exports/schemas.js +288 -0
  118. package/dist/cjs/exports/schemas.js.map +1 -0
  119. package/dist/cjs/identity/constants.d.ts +273 -0
  120. package/dist/cjs/identity/constants.d.ts.map +1 -0
  121. package/dist/cjs/identity/constants.js +248 -0
  122. package/dist/cjs/identity/constants.js.map +1 -0
  123. package/dist/cjs/identity/index.d.ts +5 -0
  124. package/dist/cjs/identity/index.d.ts.map +1 -0
  125. package/dist/cjs/identity/index.js +73 -0
  126. package/dist/cjs/identity/index.js.map +1 -0
  127. package/dist/cjs/identity/schemas.d.ts +784 -0
  128. package/dist/cjs/identity/schemas.d.ts.map +1 -0
  129. package/dist/cjs/identity/schemas.js +684 -0
  130. package/dist/cjs/identity/schemas.js.map +1 -0
  131. package/dist/cjs/jobs/constants.d.ts +135 -0
  132. package/dist/cjs/jobs/constants.d.ts.map +1 -0
  133. package/dist/cjs/jobs/constants.js +130 -0
  134. package/dist/cjs/jobs/constants.js.map +1 -0
  135. package/dist/cjs/jobs/index.d.ts +9 -0
  136. package/dist/cjs/jobs/index.d.ts.map +1 -0
  137. package/dist/cjs/jobs/index.js +59 -0
  138. package/dist/cjs/jobs/index.js.map +1 -0
  139. package/dist/cjs/jobs/retention-schemas.d.ts +252 -0
  140. package/dist/cjs/jobs/retention-schemas.d.ts.map +1 -0
  141. package/dist/cjs/jobs/retention-schemas.js +233 -0
  142. package/dist/cjs/jobs/retention-schemas.js.map +1 -0
  143. package/dist/cjs/jobs/schemas.d.ts +361 -0
  144. package/dist/cjs/jobs/schemas.d.ts.map +1 -0
  145. package/dist/cjs/jobs/schemas.js +706 -0
  146. package/dist/cjs/jobs/schemas.js.map +1 -0
  147. package/dist/cjs/jobs/settings-schemas.d.ts +84 -0
  148. package/dist/cjs/jobs/settings-schemas.d.ts.map +1 -0
  149. package/dist/cjs/jobs/settings-schemas.js +116 -0
  150. package/dist/cjs/jobs/settings-schemas.js.map +1 -0
  151. package/dist/cjs/nodes/admin-schemas.d.ts +204 -0
  152. package/dist/cjs/nodes/admin-schemas.d.ts.map +1 -0
  153. package/dist/cjs/nodes/admin-schemas.js +153 -0
  154. package/dist/cjs/nodes/admin-schemas.js.map +1 -0
  155. package/dist/cjs/nodes/constants.d.ts +86 -0
  156. package/dist/cjs/nodes/constants.d.ts.map +1 -0
  157. package/dist/cjs/nodes/constants.js +102 -0
  158. package/dist/cjs/nodes/constants.js.map +1 -0
  159. package/dist/cjs/nodes/index.d.ts +8 -0
  160. package/dist/cjs/nodes/index.d.ts.map +1 -0
  161. package/dist/cjs/nodes/index.js +50 -0
  162. package/dist/cjs/nodes/index.js.map +1 -0
  163. package/dist/cjs/nodes/schemas.d.ts +332 -0
  164. package/dist/cjs/nodes/schemas.d.ts.map +1 -0
  165. package/dist/cjs/nodes/schemas.js +937 -0
  166. package/dist/cjs/nodes/schemas.js.map +1 -0
  167. package/dist/cjs/nodes/settings-schemas.d.ts +82 -0
  168. package/dist/cjs/nodes/settings-schemas.d.ts.map +1 -0
  169. package/dist/cjs/nodes/settings-schemas.js +106 -0
  170. package/dist/cjs/nodes/settings-schemas.js.map +1 -0
  171. package/dist/cjs/notifications/constants.d.ts +197 -0
  172. package/dist/cjs/notifications/constants.d.ts.map +1 -0
  173. package/dist/cjs/notifications/constants.js +181 -0
  174. package/dist/cjs/notifications/constants.js.map +1 -0
  175. package/dist/cjs/notifications/index.d.ts +5 -0
  176. package/dist/cjs/notifications/index.d.ts.map +1 -0
  177. package/dist/cjs/notifications/index.js +86 -0
  178. package/dist/cjs/notifications/index.js.map +1 -0
  179. package/dist/cjs/notifications/schemas.d.ts +1016 -0
  180. package/dist/cjs/notifications/schemas.d.ts.map +1 -0
  181. package/dist/cjs/notifications/schemas.js +851 -0
  182. package/dist/cjs/notifications/schemas.js.map +1 -0
  183. package/dist/cjs/onboarding/constants.d.ts +138 -0
  184. package/dist/cjs/onboarding/constants.d.ts.map +1 -0
  185. package/dist/cjs/onboarding/constants.js +123 -0
  186. package/dist/cjs/onboarding/constants.js.map +1 -0
  187. package/dist/cjs/onboarding/index.d.ts +5 -0
  188. package/dist/cjs/onboarding/index.d.ts.map +1 -0
  189. package/dist/cjs/onboarding/index.js +42 -0
  190. package/dist/cjs/onboarding/index.js.map +1 -0
  191. package/dist/cjs/onboarding/schemas.d.ts +360 -0
  192. package/dist/cjs/onboarding/schemas.d.ts.map +1 -0
  193. package/dist/cjs/onboarding/schemas.js +260 -0
  194. package/dist/cjs/onboarding/schemas.js.map +1 -0
  195. package/dist/cjs/settings/constants.d.ts +206 -0
  196. package/dist/cjs/settings/constants.d.ts.map +1 -0
  197. package/dist/cjs/settings/constants.js +200 -0
  198. package/dist/cjs/settings/constants.js.map +1 -0
  199. package/dist/cjs/settings/index.d.ts +6 -0
  200. package/dist/cjs/settings/index.d.ts.map +1 -0
  201. package/dist/cjs/settings/index.js +62 -0
  202. package/dist/cjs/settings/index.js.map +1 -0
  203. package/dist/cjs/settings/schemas.d.ts +574 -0
  204. package/dist/cjs/settings/schemas.d.ts.map +1 -0
  205. package/dist/cjs/settings/schemas.js +437 -0
  206. package/dist/cjs/settings/schemas.js.map +1 -0
  207. package/dist/cjs/settings/types.d.ts +79 -0
  208. package/dist/cjs/settings/types.d.ts.map +1 -0
  209. package/dist/cjs/settings/types.js +6 -0
  210. package/dist/cjs/settings/types.js.map +1 -0
  211. package/dist/cjs/sharing/constants.d.ts +216 -0
  212. package/dist/cjs/sharing/constants.d.ts.map +1 -0
  213. package/dist/cjs/sharing/constants.js +163 -0
  214. package/dist/cjs/sharing/constants.js.map +1 -0
  215. package/dist/cjs/sharing/enum.d.ts +5 -0
  216. package/dist/cjs/sharing/enum.d.ts.map +1 -0
  217. package/dist/cjs/sharing/enum.js +9 -0
  218. package/dist/cjs/sharing/enum.js.map +1 -0
  219. package/dist/cjs/sharing/grants.d.ts +490 -0
  220. package/dist/cjs/sharing/grants.d.ts.map +1 -0
  221. package/dist/cjs/sharing/grants.js +447 -0
  222. package/dist/cjs/sharing/grants.js.map +1 -0
  223. package/dist/cjs/sharing/groups.d.ts +410 -0
  224. package/dist/cjs/sharing/groups.d.ts.map +1 -0
  225. package/dist/cjs/sharing/groups.js +375 -0
  226. package/dist/cjs/sharing/groups.js.map +1 -0
  227. package/dist/cjs/sharing/index.d.ts +5 -0
  228. package/dist/cjs/sharing/index.d.ts.map +1 -0
  229. package/dist/cjs/sharing/index.js +77 -0
  230. package/dist/cjs/sharing/index.js.map +1 -0
  231. package/dist/cjs/sharing/schemas.d.ts +3 -0
  232. package/dist/cjs/sharing/schemas.d.ts.map +1 -0
  233. package/dist/cjs/sharing/schemas.js +21 -0
  234. package/dist/cjs/sharing/schemas.js.map +1 -0
  235. package/dist/cjs/storage/constants.d.ts +111 -0
  236. package/dist/cjs/storage/constants.d.ts.map +1 -0
  237. package/dist/cjs/storage/constants.js +107 -0
  238. package/dist/cjs/storage/constants.js.map +1 -0
  239. package/dist/cjs/storage/index.d.ts +27 -0
  240. package/dist/cjs/storage/index.d.ts.map +1 -0
  241. package/dist/cjs/storage/index.js +69 -0
  242. package/dist/cjs/storage/index.js.map +1 -0
  243. package/dist/cjs/storage/objects-complete-upload.d.ts +19 -0
  244. package/dist/cjs/storage/objects-complete-upload.d.ts.map +1 -0
  245. package/dist/cjs/storage/objects-complete-upload.js +19 -0
  246. package/dist/cjs/storage/objects-complete-upload.js.map +1 -0
  247. package/dist/cjs/storage/objects-download-url.d.ts +17 -0
  248. package/dist/cjs/storage/objects-download-url.d.ts.map +1 -0
  249. package/dist/cjs/storage/objects-download-url.js +16 -0
  250. package/dist/cjs/storage/objects-download-url.js.map +1 -0
  251. package/dist/cjs/storage/objects-init-upload.d.ts +39 -0
  252. package/dist/cjs/storage/objects-init-upload.d.ts.map +1 -0
  253. package/dist/cjs/storage/objects-init-upload.js +40 -0
  254. package/dist/cjs/storage/objects-init-upload.js.map +1 -0
  255. package/dist/cjs/storage/objects-list-query.d.ts +50 -0
  256. package/dist/cjs/storage/objects-list-query.d.ts.map +1 -0
  257. package/dist/cjs/storage/objects-list-query.js +23 -0
  258. package/dist/cjs/storage/objects-list-query.js.map +1 -0
  259. package/dist/cjs/storage/objects-object-response.d.ts +49 -0
  260. package/dist/cjs/storage/objects-object-response.d.ts.map +1 -0
  261. package/dist/cjs/storage/objects-object-response.js +54 -0
  262. package/dist/cjs/storage/objects-object-response.js.map +1 -0
  263. package/dist/cjs/storage/objects-update-metadata.d.ts +16 -0
  264. package/dist/cjs/storage/objects-update-metadata.d.ts.map +1 -0
  265. package/dist/cjs/storage/objects-update-metadata.js +14 -0
  266. package/dist/cjs/storage/objects-update-metadata.js.map +1 -0
  267. package/dist/cjs/storage/schemas.d.ts +13 -0
  268. package/dist/cjs/storage/schemas.d.ts.map +1 -0
  269. package/dist/cjs/storage/schemas.js +35 -0
  270. package/dist/cjs/storage/schemas.js.map +1 -0
  271. package/dist/cjs/storage/settings-schemas.d.ts +188 -0
  272. package/dist/cjs/storage/settings-schemas.d.ts.map +1 -0
  273. package/dist/cjs/storage/settings-schemas.js +223 -0
  274. package/dist/cjs/storage/settings-schemas.js.map +1 -0
  275. package/dist/cjs/storage/storage-bucket-provision.d.ts +152 -0
  276. package/dist/cjs/storage/storage-bucket-provision.d.ts.map +1 -0
  277. package/dist/cjs/storage/storage-bucket-provision.js +216 -0
  278. package/dist/cjs/storage/storage-bucket-provision.js.map +1 -0
  279. package/dist/cjs/storage/storage-config-response.d.ts +99 -0
  280. package/dist/cjs/storage/storage-config-response.d.ts.map +1 -0
  281. package/dist/cjs/storage/storage-config-response.js +173 -0
  282. package/dist/cjs/storage/storage-config-response.js.map +1 -0
  283. package/dist/cjs/storage/storage-config-update.d.ts +46 -0
  284. package/dist/cjs/storage/storage-config-update.d.ts.map +1 -0
  285. package/dist/cjs/storage/storage-config-update.js +133 -0
  286. package/dist/cjs/storage/storage-config-update.js.map +1 -0
  287. package/dist/cjs/storage/storage-connection-test.d.ts +129 -0
  288. package/dist/cjs/storage/storage-connection-test.d.ts.map +1 -0
  289. package/dist/cjs/storage/storage-connection-test.js +244 -0
  290. package/dist/cjs/storage/storage-connection-test.js.map +1 -0
  291. package/dist/cjs/storage/storage-status.d.ts +16 -0
  292. package/dist/cjs/storage/storage-status.d.ts.map +1 -0
  293. package/dist/cjs/storage/storage-status.js +23 -0
  294. package/dist/cjs/storage/storage-status.js.map +1 -0
  295. package/dist/cjs/telemetry/config.d.ts +4 -0
  296. package/dist/cjs/telemetry/config.d.ts.map +1 -1
  297. package/dist/cjs/telemetry/config.js +16 -2
  298. package/dist/cjs/telemetry/config.js.map +1 -1
  299. package/dist/cjs/telemetry/connection.d.ts +1 -1
  300. package/dist/cjs/telemetry/constants.d.ts +378 -6
  301. package/dist/cjs/telemetry/constants.d.ts.map +1 -1
  302. package/dist/cjs/telemetry/constants.js +290 -5
  303. package/dist/cjs/telemetry/constants.js.map +1 -1
  304. package/dist/cjs/telemetry/dashboard.d.ts +188 -17
  305. package/dist/cjs/telemetry/dashboard.d.ts.map +1 -1
  306. package/dist/cjs/telemetry/dashboard.js +61 -3
  307. package/dist/cjs/telemetry/dashboard.js.map +1 -1
  308. package/dist/cjs/telemetry/index.d.ts +4 -4
  309. package/dist/cjs/telemetry/index.d.ts.map +1 -1
  310. package/dist/cjs/telemetry/index.js +35 -3
  311. package/dist/cjs/telemetry/index.js.map +1 -1
  312. package/dist/cjs/telemetry/presentation.d.ts +243 -0
  313. package/dist/cjs/telemetry/presentation.d.ts.map +1 -0
  314. package/dist/cjs/telemetry/presentation.js +300 -0
  315. package/dist/cjs/telemetry/presentation.js.map +1 -0
  316. package/dist/cjs/telemetry/query.d.ts +2 -2
  317. package/dist/cjs/telemetry/schemas.d.ts +5 -2
  318. package/dist/cjs/telemetry/schemas.d.ts.map +1 -1
  319. package/dist/cjs/telemetry/schemas.js +21 -1
  320. package/dist/cjs/telemetry/schemas.js.map +1 -1
  321. package/dist/cjs/telemetry/stack.d.ts +5 -5
  322. package/dist/cjs/telemetry/store.d.ts +111 -0
  323. package/dist/cjs/telemetry/store.d.ts.map +1 -0
  324. package/dist/cjs/telemetry/store.js +83 -0
  325. package/dist/cjs/telemetry/store.js.map +1 -0
  326. package/dist/cjs/user-data/constants.d.ts +157 -0
  327. package/dist/cjs/user-data/constants.d.ts.map +1 -0
  328. package/dist/cjs/user-data/constants.js +137 -0
  329. package/dist/cjs/user-data/constants.js.map +1 -0
  330. package/dist/cjs/user-data/index.d.ts +5 -0
  331. package/dist/cjs/user-data/index.d.ts.map +1 -0
  332. package/dist/cjs/user-data/index.js +46 -0
  333. package/dist/cjs/user-data/index.js.map +1 -0
  334. package/dist/cjs/user-data/schemas.d.ts +306 -0
  335. package/dist/cjs/user-data/schemas.d.ts.map +1 -0
  336. package/dist/cjs/user-data/schemas.js +333 -0
  337. package/dist/cjs/user-data/schemas.js.map +1 -0
  338. package/dist/esm/ai/capabilities.d.ts +85 -0
  339. package/dist/esm/ai/capabilities.d.ts.map +1 -0
  340. package/dist/esm/ai/capabilities.js +90 -0
  341. package/dist/esm/ai/capabilities.js.map +1 -0
  342. package/dist/esm/ai/constants.d.ts +239 -0
  343. package/dist/esm/ai/constants.d.ts.map +1 -0
  344. package/dist/esm/ai/constants.js +229 -0
  345. package/dist/esm/ai/constants.js.map +1 -0
  346. package/dist/esm/ai/features.d.ts +24 -0
  347. package/dist/esm/ai/features.d.ts.map +1 -0
  348. package/dist/esm/ai/features.js +30 -0
  349. package/dist/esm/ai/features.js.map +1 -0
  350. package/dist/esm/ai/index.d.ts +11 -0
  351. package/dist/esm/ai/index.d.ts.map +1 -0
  352. package/dist/esm/ai/index.js +16 -0
  353. package/dist/esm/ai/index.js.map +1 -0
  354. package/dist/esm/ai/org-keys.d.ts +50 -0
  355. package/dist/esm/ai/org-keys.d.ts.map +1 -0
  356. package/dist/esm/ai/org-keys.js +40 -0
  357. package/dist/esm/ai/org-keys.js.map +1 -0
  358. package/dist/esm/ai/schemas.d.ts +642 -0
  359. package/dist/esm/ai/schemas.d.ts.map +1 -0
  360. package/dist/esm/ai/schemas.js +889 -0
  361. package/dist/esm/ai/schemas.js.map +1 -0
  362. package/dist/esm/android-app/constants.d.ts +337 -0
  363. package/dist/esm/android-app/constants.d.ts.map +1 -0
  364. package/dist/esm/android-app/constants.js +306 -0
  365. package/dist/esm/android-app/constants.js.map +1 -0
  366. package/dist/esm/android-app/index.d.ts +5 -0
  367. package/dist/esm/android-app/index.d.ts.map +1 -0
  368. package/dist/esm/android-app/index.js +8 -0
  369. package/dist/esm/android-app/index.js.map +1 -0
  370. package/dist/esm/android-app/schemas.d.ts +358 -0
  371. package/dist/esm/android-app/schemas.d.ts.map +1 -0
  372. package/dist/esm/android-app/schemas.js +306 -0
  373. package/dist/esm/android-app/schemas.js.map +1 -0
  374. package/dist/esm/credentials/constants.d.ts +35 -0
  375. package/dist/esm/credentials/constants.d.ts.map +1 -0
  376. package/dist/esm/credentials/constants.js +36 -0
  377. package/dist/esm/credentials/constants.js.map +1 -0
  378. package/dist/esm/credentials/index.d.ts +5 -0
  379. package/dist/esm/credentials/index.d.ts.map +1 -0
  380. package/dist/esm/credentials/index.js +8 -0
  381. package/dist/esm/credentials/index.js.map +1 -0
  382. package/dist/esm/credentials/schemas.d.ts +64 -0
  383. package/dist/esm/credentials/schemas.d.ts.map +1 -0
  384. package/dist/esm/credentials/schemas.js +79 -0
  385. package/dist/esm/credentials/schemas.js.map +1 -0
  386. package/dist/esm/db-backup/config.d.ts +76 -0
  387. package/dist/esm/db-backup/config.d.ts.map +1 -0
  388. package/dist/esm/db-backup/config.js +112 -0
  389. package/dist/esm/db-backup/config.js.map +1 -0
  390. package/dist/esm/db-backup/constants.d.ts +314 -0
  391. package/dist/esm/db-backup/constants.d.ts.map +1 -0
  392. package/dist/esm/db-backup/constants.js +240 -0
  393. package/dist/esm/db-backup/constants.js.map +1 -0
  394. package/dist/esm/db-backup/index.d.ts +19 -0
  395. package/dist/esm/db-backup/index.d.ts.map +1 -0
  396. package/dist/esm/db-backup/index.js +25 -0
  397. package/dist/esm/db-backup/index.js.map +1 -0
  398. package/dist/esm/db-backup/node-credential.d.ts +37 -0
  399. package/dist/esm/db-backup/node-credential.d.ts.map +1 -0
  400. package/dist/esm/db-backup/node-credential.js +104 -0
  401. package/dist/esm/db-backup/node-credential.js.map +1 -0
  402. package/dist/esm/db-backup/node-result.d.ts +34 -0
  403. package/dist/esm/db-backup/node-result.d.ts.map +1 -0
  404. package/dist/esm/db-backup/node-result.js +165 -0
  405. package/dist/esm/db-backup/node-result.js.map +1 -0
  406. package/dist/esm/db-backup/restore.d.ts +405 -0
  407. package/dist/esm/db-backup/restore.d.ts.map +1 -0
  408. package/dist/esm/db-backup/restore.js +494 -0
  409. package/dist/esm/db-backup/restore.js.map +1 -0
  410. package/dist/esm/db-backup/run-actions.d.ts +49 -0
  411. package/dist/esm/db-backup/run-actions.d.ts.map +1 -0
  412. package/dist/esm/db-backup/run-actions.js +118 -0
  413. package/dist/esm/db-backup/run-actions.js.map +1 -0
  414. package/dist/esm/db-backup/runs-list-query.d.ts +20 -0
  415. package/dist/esm/db-backup/runs-list-query.d.ts.map +1 -0
  416. package/dist/esm/db-backup/runs-list-query.js +50 -0
  417. package/dist/esm/db-backup/runs-list-query.js.map +1 -0
  418. package/dist/esm/db-backup/runs.d.ts +46 -0
  419. package/dist/esm/db-backup/runs.d.ts.map +1 -0
  420. package/dist/esm/db-backup/runs.js +229 -0
  421. package/dist/esm/db-backup/runs.js.map +1 -0
  422. package/dist/esm/db-backup/schemas.d.ts +9 -0
  423. package/dist/esm/db-backup/schemas.d.ts.map +1 -0
  424. package/dist/esm/db-backup/schemas.js +15 -0
  425. package/dist/esm/db-backup/schemas.js.map +1 -0
  426. package/dist/esm/db-backup/settings-schemas.d.ts +217 -0
  427. package/dist/esm/db-backup/settings-schemas.d.ts.map +1 -0
  428. package/dist/esm/db-backup/settings-schemas.js +316 -0
  429. package/dist/esm/db-backup/settings-schemas.js.map +1 -0
  430. package/dist/esm/email/constants.d.ts +82 -0
  431. package/dist/esm/email/constants.d.ts.map +1 -0
  432. package/dist/esm/email/constants.js +79 -0
  433. package/dist/esm/email/constants.js.map +1 -0
  434. package/dist/esm/email/index.d.ts +5 -0
  435. package/dist/esm/email/index.d.ts.map +1 -0
  436. package/dist/esm/email/index.js +8 -0
  437. package/dist/esm/email/index.js.map +1 -0
  438. package/dist/esm/email/schemas.d.ts +276 -0
  439. package/dist/esm/email/schemas.d.ts.map +1 -0
  440. package/dist/esm/email/schemas.js +277 -0
  441. package/dist/esm/email/schemas.js.map +1 -0
  442. package/dist/esm/exports/constants.d.ts +123 -0
  443. package/dist/esm/exports/constants.d.ts.map +1 -0
  444. package/dist/esm/exports/constants.js +106 -0
  445. package/dist/esm/exports/constants.js.map +1 -0
  446. package/dist/esm/exports/index.d.ts +5 -0
  447. package/dist/esm/exports/index.d.ts.map +1 -0
  448. package/dist/esm/exports/index.js +7 -0
  449. package/dist/esm/exports/index.js.map +1 -0
  450. package/dist/esm/exports/schemas.d.ts +386 -0
  451. package/dist/esm/exports/schemas.d.ts.map +1 -0
  452. package/dist/esm/exports/schemas.js +285 -0
  453. package/dist/esm/exports/schemas.js.map +1 -0
  454. package/dist/esm/identity/constants.d.ts +273 -0
  455. package/dist/esm/identity/constants.d.ts.map +1 -0
  456. package/dist/esm/identity/constants.js +244 -0
  457. package/dist/esm/identity/constants.js.map +1 -0
  458. package/dist/esm/identity/index.d.ts +5 -0
  459. package/dist/esm/identity/index.d.ts.map +1 -0
  460. package/dist/esm/identity/index.js +10 -0
  461. package/dist/esm/identity/index.js.map +1 -0
  462. package/dist/esm/identity/schemas.d.ts +784 -0
  463. package/dist/esm/identity/schemas.d.ts.map +1 -0
  464. package/dist/esm/identity/schemas.js +681 -0
  465. package/dist/esm/identity/schemas.js.map +1 -0
  466. package/dist/esm/jobs/constants.d.ts +135 -0
  467. package/dist/esm/jobs/constants.d.ts.map +1 -0
  468. package/dist/esm/jobs/constants.js +127 -0
  469. package/dist/esm/jobs/constants.js.map +1 -0
  470. package/dist/esm/jobs/index.d.ts +9 -0
  471. package/dist/esm/jobs/index.d.ts.map +1 -0
  472. package/dist/esm/jobs/index.js +11 -0
  473. package/dist/esm/jobs/index.js.map +1 -0
  474. package/dist/esm/jobs/retention-schemas.d.ts +252 -0
  475. package/dist/esm/jobs/retention-schemas.d.ts.map +1 -0
  476. package/dist/esm/jobs/retention-schemas.js +229 -0
  477. package/dist/esm/jobs/retention-schemas.js.map +1 -0
  478. package/dist/esm/jobs/schemas.d.ts +361 -0
  479. package/dist/esm/jobs/schemas.d.ts.map +1 -0
  480. package/dist/esm/jobs/schemas.js +703 -0
  481. package/dist/esm/jobs/schemas.js.map +1 -0
  482. package/dist/esm/jobs/settings-schemas.d.ts +84 -0
  483. package/dist/esm/jobs/settings-schemas.d.ts.map +1 -0
  484. package/dist/esm/jobs/settings-schemas.js +113 -0
  485. package/dist/esm/jobs/settings-schemas.js.map +1 -0
  486. package/dist/esm/nodes/admin-schemas.d.ts +204 -0
  487. package/dist/esm/nodes/admin-schemas.d.ts.map +1 -0
  488. package/dist/esm/nodes/admin-schemas.js +150 -0
  489. package/dist/esm/nodes/admin-schemas.js.map +1 -0
  490. package/dist/esm/nodes/constants.d.ts +86 -0
  491. package/dist/esm/nodes/constants.d.ts.map +1 -0
  492. package/dist/esm/nodes/constants.js +99 -0
  493. package/dist/esm/nodes/constants.js.map +1 -0
  494. package/dist/esm/nodes/index.d.ts +8 -0
  495. package/dist/esm/nodes/index.d.ts.map +1 -0
  496. package/dist/esm/nodes/index.js +11 -0
  497. package/dist/esm/nodes/index.js.map +1 -0
  498. package/dist/esm/nodes/schemas.d.ts +332 -0
  499. package/dist/esm/nodes/schemas.d.ts.map +1 -0
  500. package/dist/esm/nodes/schemas.js +934 -0
  501. package/dist/esm/nodes/schemas.js.map +1 -0
  502. package/dist/esm/nodes/settings-schemas.d.ts +82 -0
  503. package/dist/esm/nodes/settings-schemas.d.ts.map +1 -0
  504. package/dist/esm/nodes/settings-schemas.js +103 -0
  505. package/dist/esm/nodes/settings-schemas.js.map +1 -0
  506. package/dist/esm/notifications/constants.d.ts +197 -0
  507. package/dist/esm/notifications/constants.d.ts.map +1 -0
  508. package/dist/esm/notifications/constants.js +178 -0
  509. package/dist/esm/notifications/constants.js.map +1 -0
  510. package/dist/esm/notifications/index.d.ts +5 -0
  511. package/dist/esm/notifications/index.d.ts.map +1 -0
  512. package/dist/esm/notifications/index.js +9 -0
  513. package/dist/esm/notifications/index.js.map +1 -0
  514. package/dist/esm/notifications/schemas.d.ts +1016 -0
  515. package/dist/esm/notifications/schemas.d.ts.map +1 -0
  516. package/dist/esm/notifications/schemas.js +848 -0
  517. package/dist/esm/notifications/schemas.js.map +1 -0
  518. package/dist/esm/onboarding/constants.d.ts +138 -0
  519. package/dist/esm/onboarding/constants.d.ts.map +1 -0
  520. package/dist/esm/onboarding/constants.js +120 -0
  521. package/dist/esm/onboarding/constants.js.map +1 -0
  522. package/dist/esm/onboarding/index.d.ts +5 -0
  523. package/dist/esm/onboarding/index.d.ts.map +1 -0
  524. package/dist/esm/onboarding/index.js +7 -0
  525. package/dist/esm/onboarding/index.js.map +1 -0
  526. package/dist/esm/onboarding/schemas.d.ts +360 -0
  527. package/dist/esm/onboarding/schemas.d.ts.map +1 -0
  528. package/dist/esm/onboarding/schemas.js +257 -0
  529. package/dist/esm/onboarding/schemas.js.map +1 -0
  530. package/dist/esm/settings/constants.d.ts +206 -0
  531. package/dist/esm/settings/constants.d.ts.map +1 -0
  532. package/dist/esm/settings/constants.js +197 -0
  533. package/dist/esm/settings/constants.js.map +1 -0
  534. package/dist/esm/settings/index.d.ts +6 -0
  535. package/dist/esm/settings/index.d.ts.map +1 -0
  536. package/dist/esm/settings/index.js +11 -0
  537. package/dist/esm/settings/index.js.map +1 -0
  538. package/dist/esm/settings/schemas.d.ts +574 -0
  539. package/dist/esm/settings/schemas.d.ts.map +1 -0
  540. package/dist/esm/settings/schemas.js +434 -0
  541. package/dist/esm/settings/schemas.js.map +1 -0
  542. package/dist/esm/settings/types.d.ts +79 -0
  543. package/dist/esm/settings/types.d.ts.map +1 -0
  544. package/dist/esm/settings/types.js +5 -0
  545. package/dist/esm/settings/types.js.map +1 -0
  546. package/dist/esm/sharing/constants.d.ts +216 -0
  547. package/dist/esm/sharing/constants.d.ts.map +1 -0
  548. package/dist/esm/sharing/constants.js +159 -0
  549. package/dist/esm/sharing/constants.js.map +1 -0
  550. package/dist/esm/sharing/enum.d.ts +5 -0
  551. package/dist/esm/sharing/enum.d.ts.map +1 -0
  552. package/dist/esm/sharing/enum.js +6 -0
  553. package/dist/esm/sharing/enum.js.map +1 -0
  554. package/dist/esm/sharing/grants.d.ts +490 -0
  555. package/dist/esm/sharing/grants.d.ts.map +1 -0
  556. package/dist/esm/sharing/grants.js +444 -0
  557. package/dist/esm/sharing/grants.js.map +1 -0
  558. package/dist/esm/sharing/groups.d.ts +410 -0
  559. package/dist/esm/sharing/groups.d.ts.map +1 -0
  560. package/dist/esm/sharing/groups.js +372 -0
  561. package/dist/esm/sharing/groups.js.map +1 -0
  562. package/dist/esm/sharing/index.d.ts +5 -0
  563. package/dist/esm/sharing/index.d.ts.map +1 -0
  564. package/dist/esm/sharing/index.js +11 -0
  565. package/dist/esm/sharing/index.js.map +1 -0
  566. package/dist/esm/sharing/schemas.d.ts +3 -0
  567. package/dist/esm/sharing/schemas.d.ts.map +1 -0
  568. package/dist/esm/sharing/schemas.js +5 -0
  569. package/dist/esm/sharing/schemas.js.map +1 -0
  570. package/dist/esm/storage/constants.d.ts +111 -0
  571. package/dist/esm/storage/constants.d.ts.map +1 -0
  572. package/dist/esm/storage/constants.js +104 -0
  573. package/dist/esm/storage/constants.js.map +1 -0
  574. package/dist/esm/storage/index.d.ts +27 -0
  575. package/dist/esm/storage/index.d.ts.map +1 -0
  576. package/dist/esm/storage/index.js +23 -0
  577. package/dist/esm/storage/index.js.map +1 -0
  578. package/dist/esm/storage/objects-complete-upload.d.ts +19 -0
  579. package/dist/esm/storage/objects-complete-upload.d.ts.map +1 -0
  580. package/dist/esm/storage/objects-complete-upload.js +16 -0
  581. package/dist/esm/storage/objects-complete-upload.js.map +1 -0
  582. package/dist/esm/storage/objects-download-url.d.ts +17 -0
  583. package/dist/esm/storage/objects-download-url.d.ts.map +1 -0
  584. package/dist/esm/storage/objects-download-url.js +13 -0
  585. package/dist/esm/storage/objects-download-url.js.map +1 -0
  586. package/dist/esm/storage/objects-init-upload.d.ts +39 -0
  587. package/dist/esm/storage/objects-init-upload.d.ts.map +1 -0
  588. package/dist/esm/storage/objects-init-upload.js +37 -0
  589. package/dist/esm/storage/objects-init-upload.js.map +1 -0
  590. package/dist/esm/storage/objects-list-query.d.ts +50 -0
  591. package/dist/esm/storage/objects-list-query.d.ts.map +1 -0
  592. package/dist/esm/storage/objects-list-query.js +20 -0
  593. package/dist/esm/storage/objects-list-query.js.map +1 -0
  594. package/dist/esm/storage/objects-object-response.d.ts +49 -0
  595. package/dist/esm/storage/objects-object-response.d.ts.map +1 -0
  596. package/dist/esm/storage/objects-object-response.js +51 -0
  597. package/dist/esm/storage/objects-object-response.js.map +1 -0
  598. package/dist/esm/storage/objects-update-metadata.d.ts +16 -0
  599. package/dist/esm/storage/objects-update-metadata.d.ts.map +1 -0
  600. package/dist/esm/storage/objects-update-metadata.js +11 -0
  601. package/dist/esm/storage/objects-update-metadata.js.map +1 -0
  602. package/dist/esm/storage/schemas.d.ts +13 -0
  603. package/dist/esm/storage/schemas.d.ts.map +1 -0
  604. package/dist/esm/storage/schemas.js +19 -0
  605. package/dist/esm/storage/schemas.js.map +1 -0
  606. package/dist/esm/storage/settings-schemas.d.ts +188 -0
  607. package/dist/esm/storage/settings-schemas.d.ts.map +1 -0
  608. package/dist/esm/storage/settings-schemas.js +220 -0
  609. package/dist/esm/storage/settings-schemas.js.map +1 -0
  610. package/dist/esm/storage/storage-bucket-provision.d.ts +152 -0
  611. package/dist/esm/storage/storage-bucket-provision.d.ts.map +1 -0
  612. package/dist/esm/storage/storage-bucket-provision.js +213 -0
  613. package/dist/esm/storage/storage-bucket-provision.js.map +1 -0
  614. package/dist/esm/storage/storage-config-response.d.ts +99 -0
  615. package/dist/esm/storage/storage-config-response.d.ts.map +1 -0
  616. package/dist/esm/storage/storage-config-response.js +170 -0
  617. package/dist/esm/storage/storage-config-response.js.map +1 -0
  618. package/dist/esm/storage/storage-config-update.d.ts +46 -0
  619. package/dist/esm/storage/storage-config-update.d.ts.map +1 -0
  620. package/dist/esm/storage/storage-config-update.js +130 -0
  621. package/dist/esm/storage/storage-config-update.js.map +1 -0
  622. package/dist/esm/storage/storage-connection-test.d.ts +129 -0
  623. package/dist/esm/storage/storage-connection-test.d.ts.map +1 -0
  624. package/dist/esm/storage/storage-connection-test.js +241 -0
  625. package/dist/esm/storage/storage-connection-test.js.map +1 -0
  626. package/dist/esm/storage/storage-status.d.ts +16 -0
  627. package/dist/esm/storage/storage-status.d.ts.map +1 -0
  628. package/dist/esm/storage/storage-status.js +20 -0
  629. package/dist/esm/storage/storage-status.js.map +1 -0
  630. package/dist/esm/telemetry/config.d.ts +4 -0
  631. package/dist/esm/telemetry/config.d.ts.map +1 -1
  632. package/dist/esm/telemetry/config.js +16 -2
  633. package/dist/esm/telemetry/config.js.map +1 -1
  634. package/dist/esm/telemetry/connection.d.ts +1 -1
  635. package/dist/esm/telemetry/constants.d.ts +378 -6
  636. package/dist/esm/telemetry/constants.d.ts.map +1 -1
  637. package/dist/esm/telemetry/constants.js +288 -4
  638. package/dist/esm/telemetry/constants.js.map +1 -1
  639. package/dist/esm/telemetry/dashboard.d.ts +188 -17
  640. package/dist/esm/telemetry/dashboard.d.ts.map +1 -1
  641. package/dist/esm/telemetry/dashboard.js +61 -3
  642. package/dist/esm/telemetry/dashboard.js.map +1 -1
  643. package/dist/esm/telemetry/index.d.ts +4 -4
  644. package/dist/esm/telemetry/index.d.ts.map +1 -1
  645. package/dist/esm/telemetry/index.js +2 -2
  646. package/dist/esm/telemetry/index.js.map +1 -1
  647. package/dist/esm/telemetry/presentation.d.ts +243 -0
  648. package/dist/esm/telemetry/presentation.d.ts.map +1 -0
  649. package/dist/esm/telemetry/presentation.js +297 -0
  650. package/dist/esm/telemetry/presentation.js.map +1 -0
  651. package/dist/esm/telemetry/query.d.ts +2 -2
  652. package/dist/esm/telemetry/schemas.d.ts +5 -2
  653. package/dist/esm/telemetry/schemas.d.ts.map +1 -1
  654. package/dist/esm/telemetry/schemas.js +3 -1
  655. package/dist/esm/telemetry/schemas.js.map +1 -1
  656. package/dist/esm/telemetry/stack.d.ts +5 -5
  657. package/dist/esm/telemetry/store.d.ts +111 -0
  658. package/dist/esm/telemetry/store.d.ts.map +1 -0
  659. package/dist/esm/telemetry/store.js +80 -0
  660. package/dist/esm/telemetry/store.js.map +1 -0
  661. package/dist/esm/user-data/constants.d.ts +157 -0
  662. package/dist/esm/user-data/constants.d.ts.map +1 -0
  663. package/dist/esm/user-data/constants.js +134 -0
  664. package/dist/esm/user-data/constants.js.map +1 -0
  665. package/dist/esm/user-data/index.d.ts +5 -0
  666. package/dist/esm/user-data/index.d.ts.map +1 -0
  667. package/dist/esm/user-data/index.js +7 -0
  668. package/dist/esm/user-data/index.js.map +1 -0
  669. package/dist/esm/user-data/schemas.d.ts +306 -0
  670. package/dist/esm/user-data/schemas.d.ts.map +1 -0
  671. package/dist/esm/user-data/schemas.js +330 -0
  672. package/dist/esm/user-data/schemas.js.map +1 -0
  673. package/package.json +151 -1
@@ -0,0 +1,706 @@
1
+ "use strict";
2
+ // =============================================================================
3
+ // Jobs: the admin job routes' wire shapes (issue #734, PP-8.2)
4
+ // =============================================================================
5
+ //
6
+ // `GET /api/admin/jobs` (list query and row), `/stats`, `/insights` and the
7
+ // bulk actions' bodies and results, as zod schemas. Moved verbatim (comments
8
+ // included) from `@marinoscar/platform-api/jobs`'s dto files, which now wrap
9
+ // these with `createZodDto`. Node result schemas are NOT here: they stay with
10
+ // their handlers and cross to nodes as JSON Schema (`GET /api/nodes/job-types`).
11
+ // =============================================================================
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.resetStuckResultSchema = exports.retryFailedResultSchema = exports.resetStuckSchema = exports.retryFailedSchema = exports.resetHistoryResultSchema = exports.jobInsightsSchema = exports.jobLifetimeStatsSchema = exports.jobEtaSchema = exports.jobTypeDurationStatsSchema = exports.jobDurationStatsSchema = exports.jobInsightsQuerySchema = exports.jobStatsSchema = exports.jobTypeStatsSchema = exports.jobStatusCountsSchema = exports.jobListQuerySchema = exports.jobSchema = exports.jobReasonSchema = void 0;
14
+ const zod_1 = require("zod");
15
+ const constants_js_1 = require("./constants.js");
16
+ /**
17
+ * A job reason id: a string of the shape {@link JOB_REASON_PATTERN}, not an
18
+ * enum, so an app's `registerJobReason` ids pass. Whether an id is registered
19
+ * is checked where a job is enqueued, never in this schema.
20
+ *
21
+ * @stability experimental
22
+ */
23
+ exports.jobReasonSchema = zod_1.z
24
+ .string()
25
+ .regex(constants_js_1.JOB_REASON_PATTERN, 'A job reason is 2 to 48 lower-case letters, digits, "_", "." or "-", starting with a letter');
26
+ // -----------------------------------------------------------------------------
27
+ // From job-response.dto.ts: One `jobs` row, as the admin API publishes it (issue #264, epic #254)
28
+ // -----------------------------------------------------------------------------
29
+ // =============================================================================
30
+ // One `jobs` row, as the admin API publishes it (issue #264, epic #254)
31
+ // =============================================================================
32
+ //
33
+ // This schema describes the JSON an operator receives, NOT the Prisma model.
34
+ // The two differ in three deliberate ways, and each one is a decision rather
35
+ // than an oversight:
36
+ //
37
+ // 1. TIMESTAMPS ARE ISO STRINGS, not `Date`s. `JobAdminService` hands the
38
+ // controller the Prisma row and the serializer turns every `Date` into an
39
+ // ISO-8601 string on the way out. Documenting `z.date()` here would
40
+ // publish a type no HTTP client can ever receive. This mirrors
41
+ // `allowlist/dto/allowlist-response.dto.ts`, which describes its own
42
+ // response the same way and for the same reason.
43
+ //
44
+ // 2. `typeLabel` IS ADDED. `type` is a machine key (`'example.echo'`) and is
45
+ // what every filter matches on, so it must stay on the wire verbatim. The
46
+ // label is resolved server-side through `jobTypeLabel()` rather than
47
+ // shipped as a map the client joins against, because that helper's whole
48
+ // contract is "an unmapped type renders as itself, never blank" (see
49
+ // `job-type-labels.ts`) — and a client doing its own lookup is a client
50
+ // that can forget the `?? type` fallback and render an empty cell for
51
+ // exactly the job types a fork cares most about.
52
+ //
53
+ // 3. `payload` IS OMITTED, and this is the one worth arguing. A job's
54
+ // payload is arbitrary application JSONB with no size bound anywhere in
55
+ // the schema; a hundred rows of it is a response whose size is set by
56
+ // whatever a fork's largest handler input happens to be, on an endpoint
57
+ // that a dashboard polls. The fields an operator actually triages with —
58
+ // `type`, `subjectType`/`subjectId`, `attempts`, `lastError`, the
59
+ // timestamps — are all here, and `subjectType`/`subjectId` exist
60
+ // precisely so that "which thing was this job about" is answerable
61
+ // without reading the payload. A later per-job detail route can publish
62
+ // the payload for ONE row, where its size is bounded by construction;
63
+ // putting it in a paginated list is the shape that cannot be made safe.
64
+ //
65
+ // These DTO classes are documentation, not runtime validation. Nothing parses
66
+ // a response through them — `createZodDto` is used because it is how every
67
+ // other schema in this API reaches the OpenAPI document.
68
+ // =============================================================================
69
+ /**
70
+ * One `jobs` row as `GET /api/admin/jobs` lists it (no payload, no claim token).
71
+ *
72
+ * @stability experimental
73
+ */
74
+ exports.jobSchema = zod_1.z.object({
75
+ /** The job id (UUID). */
76
+ id: zod_1.z.uuid(),
77
+ /** The machine key a handler is registered under; what `type=` filters on. */
78
+ type: zod_1.z.string(),
79
+ /** `type` run through `jobTypeLabel()`; equal to `type` when unmapped. */
80
+ typeLabel: zod_1.z.string(),
81
+ /** What this job is about, when the enqueuer said so. */
82
+ subjectType: zod_1.z.string().nullable(),
83
+ /** Which one, when the enqueuer named a subject. */
84
+ subjectId: zod_1.z.string().nullable(),
85
+ /**
86
+ * The active-dedup key. Non-null only when the enqueuer wanted collapsing;
87
+ * see `jobs.service.ts` for why a NULL key can never collide.
88
+ */
89
+ dedupKey: zod_1.z.string().nullable(),
90
+ /** Lifecycle status: `pending`, `running`, `succeeded` or `failed`. */
91
+ status: zod_1.z.enum(constants_js_1.JOB_STATUSES),
92
+ /** Why it was queued: a built-in (`upload`, `rerun`, `backfill`) or an app's registered reason. */
93
+ reason: exports.jobReasonSchema,
94
+ /** `reason` run through `jobReasonLabel()`; equal to `reason` when unregistered. */
95
+ reasonLabel: zod_1.z.string(),
96
+ /** Ascending is more urgent; the claim orders by it first. */
97
+ priority: zod_1.z.number().int(),
98
+ /** The provider throttle bucket the work ran under, when it calls a rate-limited provider. */
99
+ providerKey: zod_1.z.string().nullable(),
100
+ /** The model version the work ran under, when there is one. */
101
+ modelVersion: zod_1.z.string().nullable(),
102
+ /** Attempts STARTED, charged at claim time — not attempts that reported back. */
103
+ attempts: zod_1.z.number().int(),
104
+ /** The last failure's message, bounded; never secret material. */
105
+ lastError: zod_1.z.string().nullable(),
106
+ /** When it was queued (ISO 8601). */
107
+ createdAt: zod_1.z.iso.datetime(),
108
+ /** When the current (or last) attempt started (ISO 8601). */
109
+ startedAt: zod_1.z.iso.datetime().nullable(),
110
+ /** When it reached a terminal status (ISO 8601). */
111
+ finishedAt: zod_1.z.iso.datetime().nullable(),
112
+ /** When set in the future on a `pending` row, the job is in backoff. */
113
+ scheduledFor: zod_1.z.iso.datetime().nullable(),
114
+ /** When a provider last rate-limited it (ISO 8601). */
115
+ rateLimitedAt: zod_1.z.iso.datetime().nullable(),
116
+ /** Rate-limit deferrals so far; not charged against `attempts`. */
117
+ rateLimitHits: zod_1.z.number().int(),
118
+ /** Ownership, while a row is claimed. All three are cleared by a retry. */
119
+ claimedByNodeId: zod_1.z.uuid().nullable(),
120
+ /** When the current claim's lease runs out (ISO 8601). */
121
+ leaseExpiresAt: zod_1.z.iso.datetime().nullable(),
122
+ /** `server` or `node`: who runs (or ran) the current attempt. */
123
+ executor: zod_1.z.string().nullable(),
124
+ /**
125
+ * The organization the work belongs to (#734), or `null` for a
126
+ * deployment-wide (system) job such as housekeeping.
127
+ */
128
+ orgId: zod_1.z.uuid().nullable(),
129
+ });
130
+ // -----------------------------------------------------------------------------
131
+ // From job-list-query.dto.ts: The job list's filters (issue #264, epic #254)
132
+ // -----------------------------------------------------------------------------
133
+ // =============================================================================
134
+ // The job list's filters (issue #264, epic #254)
135
+ // =============================================================================
136
+ //
137
+ // Seven query parameters, every one of which exists because an operator with a
138
+ // misbehaving queue asks a specific question. The three that are more than a
139
+ // plain column match are documented individually below; the rest (`type`,
140
+ // `subjectType`, `subjectId`, `page`, `pageSize`) are exactly what they look
141
+ // like, and `page`/`pageSize` are copied field-for-field from
142
+ // `users/dto/user-list-query.dto.ts` so that every paginated list in this API
143
+ // takes the same names and enforces the same 100-row ceiling.
144
+ //
145
+ // -----------------------------------------------------------------------------
146
+ // `scheduled` IS A BOOLEAN THAT OVERRIDES `status`, NOT A FIFTH STATUS
147
+ // -----------------------------------------------------------------------------
148
+ //
149
+ // "In backoff" is not a status — it is a `pending` row whose `scheduled_for`
150
+ // is still in the future, which is how `job-terminal.service.ts` records a
151
+ // retry and how `provider-throttle.service.ts` records a rate-limit deferral.
152
+ // There was a real temptation to publish it as `status=scheduled`, and it was
153
+ // rejected: `status` is a database enum with four values, a filter value that
154
+ // is not one of them cannot round-trip against a row, and a client would then
155
+ // have a `status` field whose vocabulary differs from the `status` field on
156
+ // every row it receives.
157
+ //
158
+ // So it is a separate boolean, and `scheduled=true` FORCES `status=pending`
159
+ // rather than intersecting with whatever `status` was also sent. The
160
+ // alternative — honouring both, so `?scheduled=true&status=failed` returns
161
+ // nothing — is technically defensible and practically useless: the request is
162
+ // a contradiction, and answering a contradiction with an empty page tells the
163
+ // operator that no such job exists, when what is true is that no such job CAN
164
+ // exist. Overriding answers the question they meant. `JobAdminService.list`
165
+ // is where that precedence is applied, so it is one rule in one place.
166
+ //
167
+ // -----------------------------------------------------------------------------
168
+ // `processedWithin` IS AN ACTIVITY WINDOW, NOT A `createdAt` WINDOW
169
+ // -----------------------------------------------------------------------------
170
+ //
171
+ // It filters on `COALESCE(finished_at, created_at)`: when a job last did
172
+ // something, falling back to when it appeared if it has not finished. A plain
173
+ // `createdAt >= …` window would hide the single most interesting row on the
174
+ // dashboard — a job enqueued two days ago that failed ninety seconds ago —
175
+ // from the "last 4 hours" view, which is the view an operator opens while the
176
+ // incident is happening.
177
+ //
178
+ // Prisma has no `COALESCE` in a `where`, so it is expressed as the two
179
+ // disjoint cases, `{ finishedAt: { gte } }` OR `{ finishedAt: null, createdAt:
180
+ // { gte } }`. They are disjoint because the second pins `finishedAt` to null,
181
+ // so no row can match both and no row is double-counted by a `count`.
182
+ //
183
+ // `all` is the DEFAULT and is a real value rather than an absent parameter:
184
+ // an operator hunting a rare historical failure needs a way to say "no window"
185
+ // that is visible in the URL, and a dashboard needs a value to put in its
186
+ // dropdown. Making a window the default would mean the unfiltered list
187
+ // silently hides rows.
188
+ // =============================================================================
189
+ /**
190
+ * The query of `GET /api/admin/jobs`: filters, the activity window and pagination.
191
+ *
192
+ * @stability experimental
193
+ */
194
+ exports.jobListQuerySchema = zod_1.z.object({
195
+ /** The 1-based page; default 1. */
196
+ page: zod_1.z.coerce.number().int().min(1).default(1),
197
+ /** Rows per page; default 20, at most 100. */
198
+ pageSize: zod_1.z.coerce.number().int().min(1).max(100).default(20),
199
+ /** Only jobs in this status. */
200
+ status: zod_1.z.enum(constants_js_1.JOB_STATUSES).optional(),
201
+ /** Only jobs of this type (an exact match on the machine key). */
202
+ type: zod_1.z.string().min(1).max(200).optional(),
203
+ /** Only jobs about this kind of subject. */
204
+ subjectType: zod_1.z.string().min(1).max(200).optional(),
205
+ /** Only jobs about this subject. */
206
+ subjectId: zod_1.z.string().min(1).max(200).optional(),
207
+ /**
208
+ * Only this organization's jobs (#734). Omitted, every job is listed,
209
+ * deployment-wide system jobs (`orgId: null`) included.
210
+ */
211
+ orgId: zod_1.z.uuid().optional(),
212
+ /**
213
+ * `z.enum(['true','false']).transform(...)` and NOT `z.coerce.boolean()`.
214
+ *
215
+ * Every query parameter arrives as a string, and `Boolean('false')` is
216
+ * `true` — so a coercing schema would turn the explicit opt-OUT
217
+ * `?scheduled=false` into the opt-IN, which is the worst possible direction
218
+ * for a filter that overrides `status`. The same reasoning, and the same
219
+ * shape, as `notifications/dto/notification.dto.ts` and
220
+ * `users/dto/user-list-query.dto.ts`.
221
+ */
222
+ scheduled: zod_1.z.enum(['true', 'false'])
223
+ .transform((value) => value === 'true')
224
+ .optional(),
225
+ /** Only jobs that finished (or, unfinished, were created) within this window; default `all`. */
226
+ processedWithin: zod_1.z.enum(constants_js_1.PROCESSED_WITHIN_VALUES).default('all'),
227
+ });
228
+ // -----------------------------------------------------------------------------
229
+ // From job-stats.dto.ts: The queue's summary (issue #264, epic #254)
230
+ // -----------------------------------------------------------------------------
231
+ // =============================================================================
232
+ // The queue's summary (issue #264, epic #254)
233
+ // =============================================================================
234
+ //
235
+ // What a dashboard polls: how much work exists, in what state, of what type,
236
+ // and how much of it is in trouble. One request, because the alternative — a
237
+ // count endpoint per tile — is five round trips whose answers are taken at
238
+ // five different instants, so the tiles do not add up and an operator learns
239
+ // to distrust the page.
240
+ //
241
+ // -----------------------------------------------------------------------------
242
+ // EVERY STATUS KEY IS ALWAYS PRESENT, INCLUDING THE ZEROES
243
+ // -----------------------------------------------------------------------------
244
+ //
245
+ // `byStatus` and each entry's `byStatus` are zero-filled from `JOB_STATUSES`
246
+ // before the `groupBy` rows are folded in. A `GROUP BY` returns no row for a
247
+ // status nothing is in, so the natural shape of this response is one where
248
+ // `failed` is simply absent on a healthy queue — and a client rendering
249
+ // `stats.byStatus.failed` then shows `undefined` exactly when everything is
250
+ // fine. Zero-filling makes "no failures" and "the key is missing" the same
251
+ // thing on the wire, which is what a tile can render without a fallback.
252
+ //
253
+ // -----------------------------------------------------------------------------
254
+ // `stuckThresholdMinutes` IS PUBLISHED BECAUSE `stuckRunning` IS MEANINGLESS
255
+ // WITHOUT IT
256
+ // -----------------------------------------------------------------------------
257
+ //
258
+ // `stuckRunning` is a count against a threshold the caller cannot see: it
259
+ // lives in the `jobs.stuckThresholdMinutes` system setting, it is read through
260
+ // `JobStuckService.getStuckThresholdMinutes()`, and it can be changed while
261
+ // the dashboard is open. A UI that showed "4 stuck" and had to hardcode "(over
262
+ // 30 minutes)" would go on saying 30 after an operator moved the setting to 5,
263
+ // which turns a status line into a false one. Sending the number that was
264
+ // ACTUALLY used for this response removes that possibility.
265
+ //
266
+ // It is also what the `reset-stuck` control needs to prefill its "older than"
267
+ // input with the value an empty body would use.
268
+ // =============================================================================
269
+ /**
270
+ * Counts per status, zero-filled — every key is always present.
271
+ *
272
+ * @stability experimental
273
+ */
274
+ exports.jobStatusCountsSchema = zod_1.z.object({
275
+ /** Jobs waiting to be claimed (including those in backoff). */
276
+ pending: zod_1.z.number().int(),
277
+ /** Jobs claimed and in progress. */
278
+ running: zod_1.z.number().int(),
279
+ /** Jobs that finished successfully. */
280
+ succeeded: zod_1.z.number().int(),
281
+ /** Jobs that failed permanently. */
282
+ failed: zod_1.z.number().int(),
283
+ });
284
+ /**
285
+ * One row of the by-type breakdown.
286
+ *
287
+ * Ordered by `total` descending then `type` ascending in the service, so the
288
+ * busiest type is first and the order is stable between two polls that see the
289
+ * same counts — a table whose rows reshuffle every two seconds is unreadable.
290
+ *
291
+ * @stability experimental
292
+ */
293
+ exports.jobTypeStatsSchema = zod_1.z.object({
294
+ /** The job type. */
295
+ type: zod_1.z.string(),
296
+ /** `type` through `jobTypeLabel()`; equal to `type` when unmapped. */
297
+ label: zod_1.z.string(),
298
+ /** Every row of this type. */
299
+ total: zod_1.z.number().int(),
300
+ /** Its rows per status. */
301
+ byStatus: exports.jobStatusCountsSchema,
302
+ });
303
+ /**
304
+ * The body of `GET /api/admin/jobs/stats`: the queue's summary.
305
+ *
306
+ * @stability experimental
307
+ */
308
+ exports.jobStatsSchema = zod_1.z.object({
309
+ /** Every `jobs` row, whatever its status or age. */
310
+ total: zod_1.z.number().int(),
311
+ /** Every row per status. */
312
+ byStatus: exports.jobStatusCountsSchema,
313
+ /** Per-type breakdown, busiest first. */
314
+ byType: zod_1.z.array(exports.jobTypeStatsSchema),
315
+ /**
316
+ * `pending` rows whose `scheduledFor` is still in the future — retry
317
+ * backoff and rate-limit deferrals. A subset of `byStatus.pending`, never a
318
+ * fifth status; see `job-list-query.dto.ts` for why that distinction is
319
+ * kept on the wire.
320
+ */
321
+ scheduled: zod_1.z.number().int(),
322
+ /**
323
+ * `running` rows the lease reaper would reclaim right now, counted with the
324
+ * reaper's own `stuckRunningWhere()` so the dashboard and the sweeper can
325
+ * never disagree about which rows those are.
326
+ */
327
+ stuckRunning: zod_1.z.number().int(),
328
+ /** The threshold `stuckRunning` was computed against, in minutes. */
329
+ stuckThresholdMinutes: zod_1.z.number().int().positive(),
330
+ /** When these counts were taken. Every field above shares this instant. */
331
+ generatedAt: zod_1.z.iso.datetime(),
332
+ });
333
+ // -----------------------------------------------------------------------------
334
+ // From job-insights.dto.ts: The queue's insights response (issue #265, epic #254)
335
+ // -----------------------------------------------------------------------------
336
+ // =============================================================================
337
+ // The queue's insights response (issue #265, epic #254)
338
+ // =============================================================================
339
+ //
340
+ // `stats` (#264) answers "what is the queue doing right now". This answers the
341
+ // two questions it structurally cannot: "how long will this take" and "is it
342
+ // getting faster or slower". One response, four blocks, because an operator
343
+ // reading a backlog wants the backlog, its recent speed and the resulting
344
+ // estimate to have been taken at the SAME instant — three endpoints polled
345
+ // separately produce an ETA computed from a queue depth that has already
346
+ // changed, which is how a progress number ends up going backwards.
347
+ //
348
+ // -----------------------------------------------------------------------------
349
+ // `avgMs`, `p50Ms` AND `p95Ms` ARE NULLABLE, AND ZERO WOULD BE A LIE
350
+ // -----------------------------------------------------------------------------
351
+ //
352
+ // A type with no succeeded jobs inside the window has no average duration.
353
+ // The tempting shape is `avgMs: 0`, and it is wrong twice over: a UI renders
354
+ // "0 ms" as a fact ("this job type is instant"), and the ETA below MULTIPLIES
355
+ // this number by a queue depth — so a zero average turns a thousand queued
356
+ // jobs into an estimate of "done already". `null` is the only value a client
357
+ // cannot accidentally do arithmetic on, and it is what makes the ETA's
358
+ // three-step fallback (below) necessary rather than optional.
359
+ //
360
+ // `samples` is therefore the field that says whether the other three mean
361
+ // anything, and it is always a number.
362
+ //
363
+ // -----------------------------------------------------------------------------
364
+ // `basis` EXISTS BECAUSE AN ESTIMATE MUST SAY HOW MUCH OF IT IS REAL
365
+ // -----------------------------------------------------------------------------
366
+ //
367
+ // Every ETA in the response is `remaining x avgMs / concurrency`, but `avgMs`
368
+ // can come from three very different places:
369
+ //
370
+ // - `live` — this type's OWN succeeded jobs inside the window. The
371
+ // estimate is measurement.
372
+ // - `partial` — the overall average across every type, because this type has
373
+ // no history of its own yet. The estimate is an analogy, and a
374
+ // bad one whenever job types differ in cost (they always do).
375
+ // - `none` — nothing has ever succeeded inside the window, so the number
376
+ // is a shipped constant. The estimate is a placeholder.
377
+ //
378
+ // Publishing only the milliseconds would make those three indistinguishable on
379
+ // the wire, and a UI would render all of them with the same confidence. With
380
+ // `basis` a client can say "about 4 minutes", "roughly 4 minutes, based on
381
+ // other job types" and "no idea yet" from one field — which is the difference
382
+ // between a useful estimate and a number nobody believes twice.
383
+ //
384
+ // -----------------------------------------------------------------------------
385
+ // `lifetime` HAS COUNTS AND AVERAGES AND NO PERCENTILES, DELIBERATELY
386
+ // -----------------------------------------------------------------------------
387
+ //
388
+ // Lifetime numbers are `JobStatsRollup` (the purged rows, #263) merged with
389
+ // the rows still in the table. A rollup row is four accumulators — two counts,
390
+ // a sum and a sample count — and those four are exactly the quantities that
391
+ // SURVIVE summarisation: counts add, and a mean can be reconstructed from a
392
+ // sum and a denominator.
393
+ //
394
+ // A percentile cannot. p95 is a position in a sorted distribution, and the
395
+ // distribution was deleted; nothing about `sumDurationMs` and
396
+ // `durationSamples` can recover it, and no scheme of storing "the p95 at purge
397
+ // time" and averaging it with a live p95 produces the p95 of the union — it
398
+ // produces a number that looks like one. So the rollup does not store
399
+ // percentiles and this block does not publish them. `history` publishes real
400
+ // percentiles over a bounded window, where the rows still exist to be sorted.
401
+ //
402
+ // The honest split is therefore: `history` = distribution over a window,
403
+ // `lifetime` = totals over all time. Neither pretends to be the other.
404
+ // =============================================================================
405
+ // ---------------------------------------------------------------------------
406
+ // Request
407
+ // ---------------------------------------------------------------------------
408
+ /**
409
+ * The query of `GET /api/admin/jobs/insights`: the history window in days.
410
+ *
411
+ * @stability experimental
412
+ */
413
+ exports.jobInsightsQuerySchema = zod_1.z.object({
414
+ /**
415
+ * How many days of succeeded jobs the `history` block covers.
416
+ *
417
+ * `z.coerce` because every query parameter arrives as a string. The bounds
418
+ * are the schema's, so an out-of-range value is a clean 400 from the global
419
+ * `ZodValidationPipe` before this service ever runs a query.
420
+ */
421
+ windowDays: zod_1.z.coerce
422
+ .number()
423
+ .int()
424
+ .min(1)
425
+ .max(constants_js_1.MAX_INSIGHTS_WINDOW_DAYS)
426
+ .default(constants_js_1.DEFAULT_INSIGHTS_WINDOW_DAYS),
427
+ });
428
+ // ---------------------------------------------------------------------------
429
+ // Response
430
+ // ---------------------------------------------------------------------------
431
+ /**
432
+ * Durations over one set of succeeded jobs. See the header on the nulls.
433
+ *
434
+ * @stability experimental
435
+ */
436
+ exports.jobDurationStatsSchema = zod_1.z.object({
437
+ /** Succeeded, fully timestamped jobs in the window. 0 means the rest is null. */
438
+ samples: zod_1.z.number().int(),
439
+ /** Mean duration, or `null` when `samples` is 0. */
440
+ avgMs: zod_1.z.number().nullable(),
441
+ /** Median, via `PERCENTILE_CONT(0.5)`. `null` when `samples` is 0. */
442
+ p50Ms: zod_1.z.number().nullable(),
443
+ /**
444
+ * 95th percentile, via `PERCENTILE_CONT(0.95)` — INTERPOLATED, not the
445
+ * nearest sample (`PERCENTILE_DISC`), so a small sample set still moves the
446
+ * number continuously as jobs get slower rather than jumping between two
447
+ * observed durations.
448
+ */
449
+ p95Ms: zod_1.z.number().nullable(),
450
+ /**
451
+ * Jobs succeeded per minute over the LAST HOUR — not over the window; see
452
+ * `THROUGHPUT_WINDOW_MS`. `history.throughputSince` publishes the instant it
453
+ * was measured from, so a client never has to hardcode "(last hour)".
454
+ */
455
+ throughputPerMin: zod_1.z.number(),
456
+ });
457
+ /**
458
+ * Duration percentiles of one job type over the window.
459
+ *
460
+ * @stability experimental
461
+ */
462
+ exports.jobTypeDurationStatsSchema = exports.jobDurationStatsSchema.extend({
463
+ /** The job type. */
464
+ type: zod_1.z.string(),
465
+ /** `type` through `jobTypeLabel()`; equal to `type` when unmapped. */
466
+ label: zod_1.z.string(),
467
+ });
468
+ /**
469
+ * One job type's drain estimate.
470
+ *
471
+ * @stability experimental
472
+ */
473
+ exports.jobEtaSchema = zod_1.z.object({
474
+ /** The job type. */
475
+ type: zod_1.z.string(),
476
+ /** Its display label (`jobTypeLabel`). */
477
+ label: zod_1.z.string(),
478
+ /** Jobs of this type not yet finished: `pending + running`. */
479
+ pending: zod_1.z.number().int(),
480
+ /** Jobs of this type running now. */
481
+ running: zod_1.z.number().int(),
482
+ /** `pending + running`: what the estimate covers. */
483
+ remaining: zod_1.z.number().int(),
484
+ /** The per-job average this estimate multiplied. Never null — see `basis`. */
485
+ avgMs: zod_1.z.number(),
486
+ /** What the average came from: `live` (this window), `partial` (lifetime fallback) or `none`. */
487
+ basis: zod_1.z.enum(constants_js_1.JOB_ETA_BASES),
488
+ /** `remaining x avgMs / concurrency`, in milliseconds. */
489
+ estimatedMs: zod_1.z.number(),
490
+ });
491
+ /**
492
+ * One job type's all-time totals (rollup plus live rows).
493
+ *
494
+ * @stability experimental
495
+ */
496
+ exports.jobLifetimeStatsSchema = zod_1.z.object({
497
+ /** The job type. */
498
+ type: zod_1.z.string(),
499
+ /** Its display label (`jobTypeLabel`). */
500
+ label: zod_1.z.string(),
501
+ /** Rollup (purged rows) plus the rows still in the table. Never both. */
502
+ succeeded: zod_1.z.number().int(),
503
+ /** Failed, rollup plus live rows. */
504
+ failed: zod_1.z.number().int(),
505
+ /** `succeeded + failed` — jobs that ran, whatever the outcome. */
506
+ total: zod_1.z.number().int(),
507
+ /**
508
+ * `(rollup.sumDurationMs + liveSum) / (rollup.durationSamples + liveSamples)`,
509
+ * or `null` when nothing timed has ever succeeded for this type.
510
+ */
511
+ avgMs: zod_1.z.number().nullable(),
512
+ /** The denominator above, published so `avgMs` can be weighed. */
513
+ durationSamples: zod_1.z.number().int(),
514
+ });
515
+ /**
516
+ * The body of `GET /api/admin/jobs/insights`: live counts, windowed history, lifetime totals and ETAs.
517
+ *
518
+ * @stability experimental
519
+ */
520
+ exports.jobInsightsSchema = zod_1.z.object({
521
+ /** The window actually used, after clamping. Echoed so a client can label it. */
522
+ windowDays: zod_1.z.number().int(),
523
+ /** When every number below was taken. One instant for the whole response. */
524
+ generatedAt: zod_1.z.iso.datetime(),
525
+ /**
526
+ * `JOBS_WORKER_CONCURRENCY` as this process reads it — the divisor every
527
+ * `eta.estimatedMs` used. Published for the same reason `stats` publishes
528
+ * `stuckThresholdMinutes`: an estimate computed against a number the caller
529
+ * cannot see is one a UI has to guess at, and it would guess wrong the
530
+ * moment a deployment changed the setting.
531
+ */
532
+ concurrency: zod_1.z.number().int(),
533
+ /** The queue right now: the same counts as `GET /api/admin/jobs/stats`. */
534
+ live: zod_1.z.object({
535
+ /** Every `jobs` row now. */
536
+ total: zod_1.z.number().int(),
537
+ /** Every row per status. */
538
+ byStatus: exports.jobStatusCountsSchema,
539
+ /** Per-type breakdown, busiest first. */
540
+ byType: zod_1.z.array(exports.jobTypeStatsSchema),
541
+ /** `pending` rows whose `scheduledFor` is still in the future. */
542
+ scheduled: zod_1.z.number().int(),
543
+ /**
544
+ * Non-terminal rows that have been deferred by a provider rate limit at
545
+ * least once (`rateLimitHits > 0`). Terminal rows are excluded because a
546
+ * job that finished is no longer being held up by anything.
547
+ */
548
+ rateLimited: zod_1.z.number().int(),
549
+ /**
550
+ * Rows that have been claimed more than once (`attempts > 1`) — the
551
+ * queue's flakiness signal, and the predicate `jobs_attempts_gt1_idx` was
552
+ * built for. Includes terminal rows: "how much of this history needed a
553
+ * second go" is the question.
554
+ */
555
+ retried: zod_1.z.number().int(),
556
+ }),
557
+ /** Duration distribution of succeeded jobs over the window. */
558
+ history: zod_1.z.object({
559
+ /** The oldest `finishedAt` the percentiles cover. */
560
+ windowStart: zod_1.z.iso.datetime(),
561
+ /** The instant `throughputPerMin` counts from — one hour before `generatedAt`. */
562
+ throughputSince: zod_1.z.iso.datetime(),
563
+ /**
564
+ * Every succeeded job in the window, as ONE distribution.
565
+ *
566
+ * Not derivable from `byType`: a mean could be re-weighted, but p50 and
567
+ * p95 cannot be combined from per-group percentiles at all. It is computed
568
+ * in the same scan as `byType` (a `GROUPING SETS` grand total), so the two
569
+ * always describe exactly the same rows.
570
+ */
571
+ overall: exports.jobDurationStatsSchema,
572
+ /** Per-type duration percentiles over the window. */
573
+ byType: zod_1.z.array(exports.jobTypeDurationStatsSchema),
574
+ }),
575
+ /** One entry per type with work outstanding, slowest estimate first. */
576
+ eta: zod_1.z.array(exports.jobEtaSchema),
577
+ /** All-time totals per type: rollup + live, counts and averages only. */
578
+ lifetime: zod_1.z.array(exports.jobLifetimeStatsSchema),
579
+ });
580
+ /**
581
+ * The result of resetting the job history.
582
+ *
583
+ * @stability experimental
584
+ */
585
+ exports.resetHistoryResultSchema = zod_1.z.object({
586
+ /**
587
+ * `JobStatsRollup` rows deleted.
588
+ *
589
+ * Rows, not jobs: one row per job type, each holding that type's whole
590
+ * purged history. A deployment with four job types reports `4` however many
591
+ * millions of jobs those four accumulators summarised.
592
+ */
593
+ reset: zod_1.z.number().int(),
594
+ });
595
+ // -----------------------------------------------------------------------------
596
+ // From job-actions.dto.ts: The bodies and results of the four job actions (issue #264, epic #254)
597
+ // -----------------------------------------------------------------------------
598
+ // =============================================================================
599
+ // The bodies and results of the four job actions (issue #264, epic #254)
600
+ // =============================================================================
601
+ //
602
+ // Two request bodies, both entirely optional, and three result shapes. They
603
+ // share a file because each is a handful of numbers and because splitting them
604
+ // would put the request and the result of the same operation in different
605
+ // places, which is exactly where they drift.
606
+ //
607
+ // -----------------------------------------------------------------------------
608
+ // `olderThanMinutes` HAS NO DEFAULT, AND THAT ABSENCE IS THE FEATURE
609
+ // -----------------------------------------------------------------------------
610
+ //
611
+ // `resetStuckSchema` gives `olderThanMinutes` no `.default(...)`, so an empty
612
+ // body parses to `{}` and `JobStuckService.resetStuck(undefined)` falls
613
+ // through to `getStuckThresholdMinutes()` — the `jobs.stuckThresholdMinutes`
614
+ // system setting, the same number the lease reaper's cron sweep uses.
615
+ //
616
+ // A default here — even `.default(30)`, even spelled as
617
+ // `DEFAULT_SYSTEM_SETTINGS.jobs.stuckThresholdMinutes` — would be a SECOND
618
+ // place the threshold is decided, and it would win: the parsed value is always
619
+ // defined, so the service's settings lookup would become dead code reachable
620
+ // only from the cron. An operator who moved the setting to 5 minutes would
621
+ // then find the dashboard button still sweeping at 30 and no way to tell why.
622
+ // The value is deliberately allowed to be `undefined` all the way down to the
623
+ // one function that knows where the number lives.
624
+ //
625
+ // The parameter still exists because there is a real use for it: sweeping
626
+ // tighter than the configured threshold during an incident, without changing a
627
+ // setting that the cron will then keep using afterwards. `0` is permitted and
628
+ // means "every running job that matches any recovery signal, at any age" —
629
+ // the lease signal in `stuckRunningWhere()` is independent of the threshold,
630
+ // so `0` is not a synonym for "everything running".
631
+ // =============================================================================
632
+ // ---------------------------------------------------------------------------
633
+ // Requests
634
+ // ---------------------------------------------------------------------------
635
+ /**
636
+ * The body of `POST /api/admin/jobs/retry-failed`.
637
+ *
638
+ * @stability experimental
639
+ */
640
+ exports.retryFailedSchema = zod_1.z.object({
641
+ /**
642
+ * Restrict the sweep to one job type. Omitted, every failed job is retried.
643
+ *
644
+ * A plain equality match on the machine key, not a prefix or a glob: `type`
645
+ * is what dispatch keys on, so "all the types starting with `billing.`" is a
646
+ * question about a naming convention this queue does not enforce.
647
+ */
648
+ type: zod_1.z.string().min(1).max(200).optional(),
649
+ });
650
+ /**
651
+ * The body of `POST /api/admin/jobs/reset-stuck`.
652
+ *
653
+ * @stability experimental
654
+ */
655
+ exports.resetStuckSchema = zod_1.z.object({
656
+ /**
657
+ * Sweep rows stuck for longer than this many minutes.
658
+ *
659
+ * DELIBERATELY UNDEFAULTED — see the file header. Omitting it defers to the
660
+ * `jobs.stuckThresholdMinutes` system setting, which is the behaviour the
661
+ * cron sweep already has.
662
+ */
663
+ olderThanMinutes: zod_1.z.coerce.number().int().min(0).max(60 * 24 * 365).optional(),
664
+ });
665
+ // ---------------------------------------------------------------------------
666
+ // Results
667
+ // ---------------------------------------------------------------------------
668
+ /**
669
+ * The result of `POST /api/admin/jobs/retry-failed`.
670
+ *
671
+ * @stability experimental
672
+ */
673
+ exports.retryFailedResultSchema = zod_1.z.object({
674
+ /** Rows moved back to `pending`. */
675
+ retried: zod_1.z.number().int(),
676
+ /**
677
+ * Rows left `failed` because an active job already holds their dedup key.
678
+ *
679
+ * Not an error: a non-zero `skipped` means the work those rows describe is
680
+ * already queued or running, which is the outcome the retry was asking for.
681
+ * See `job-admin.service.ts` for why this is counted rather than thrown.
682
+ */
683
+ skipped: zod_1.z.number().int(),
684
+ /**
685
+ * Failed rows still matching the scope after the sweep.
686
+ *
687
+ * Non-zero either because the batch cap was reached (run it again) or
688
+ * because everything left was skipped. A client can decide which by
689
+ * comparing against `skipped`.
690
+ */
691
+ remaining: zod_1.z.number().int(),
692
+ });
693
+ /**
694
+ * The result of `POST /api/admin/jobs/reset-stuck`.
695
+ *
696
+ * @stability experimental
697
+ */
698
+ exports.resetStuckResultSchema = zod_1.z.object({
699
+ /** Rows requeued as `pending` for another executor to claim. */
700
+ reset: zod_1.z.number().int(),
701
+ /** Rows failed permanently because their attempt budget was spent. */
702
+ failed: zod_1.z.number().int(),
703
+ /** The threshold actually applied, whether it came from the body or settings. */
704
+ thresholdMinutes: zod_1.z.number().int(),
705
+ });
706
+ //# sourceMappingURL=schemas.js.map