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

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 (777) hide show
  1. package/CHANGELOG.md +278 -0
  2. package/README.md +28 -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/alerts/constants.d.ts +195 -0
  28. package/dist/cjs/alerts/constants.d.ts.map +1 -0
  29. package/dist/cjs/alerts/constants.js +165 -0
  30. package/dist/cjs/alerts/constants.js.map +1 -0
  31. package/dist/cjs/alerts/enum.d.ts +5 -0
  32. package/dist/cjs/alerts/enum.d.ts.map +1 -0
  33. package/dist/cjs/alerts/enum.js +9 -0
  34. package/dist/cjs/alerts/enum.js.map +1 -0
  35. package/dist/cjs/alerts/index.d.ts +5 -0
  36. package/dist/cjs/alerts/index.d.ts.map +1 -0
  37. package/dist/cjs/alerts/index.js +68 -0
  38. package/dist/cjs/alerts/index.js.map +1 -0
  39. package/dist/cjs/alerts/schemas.d.ts +351 -0
  40. package/dist/cjs/alerts/schemas.d.ts.map +1 -0
  41. package/dist/cjs/alerts/schemas.js +432 -0
  42. package/dist/cjs/alerts/schemas.js.map +1 -0
  43. package/dist/cjs/android-app/constants.d.ts +337 -0
  44. package/dist/cjs/android-app/constants.d.ts.map +1 -0
  45. package/dist/cjs/android-app/constants.js +312 -0
  46. package/dist/cjs/android-app/constants.js.map +1 -0
  47. package/dist/cjs/android-app/index.d.ts +5 -0
  48. package/dist/cjs/android-app/index.d.ts.map +1 -0
  49. package/dist/cjs/android-app/index.js +57 -0
  50. package/dist/cjs/android-app/index.js.map +1 -0
  51. package/dist/cjs/android-app/schemas.d.ts +358 -0
  52. package/dist/cjs/android-app/schemas.d.ts.map +1 -0
  53. package/dist/cjs/android-app/schemas.js +310 -0
  54. package/dist/cjs/android-app/schemas.js.map +1 -0
  55. package/dist/cjs/credentials/constants.d.ts +35 -0
  56. package/dist/cjs/credentials/constants.d.ts.map +1 -0
  57. package/dist/cjs/credentials/constants.js +39 -0
  58. package/dist/cjs/credentials/constants.js.map +1 -0
  59. package/dist/cjs/credentials/index.d.ts +5 -0
  60. package/dist/cjs/credentials/index.d.ts.map +1 -0
  61. package/dist/cjs/credentials/index.js +17 -0
  62. package/dist/cjs/credentials/index.js.map +1 -0
  63. package/dist/cjs/credentials/schemas.d.ts +64 -0
  64. package/dist/cjs/credentials/schemas.d.ts.map +1 -0
  65. package/dist/cjs/credentials/schemas.js +82 -0
  66. package/dist/cjs/credentials/schemas.js.map +1 -0
  67. package/dist/cjs/db-backup/config.d.ts +76 -0
  68. package/dist/cjs/db-backup/config.d.ts.map +1 -0
  69. package/dist/cjs/db-backup/config.js +115 -0
  70. package/dist/cjs/db-backup/config.js.map +1 -0
  71. package/dist/cjs/db-backup/constants.d.ts +314 -0
  72. package/dist/cjs/db-backup/constants.d.ts.map +1 -0
  73. package/dist/cjs/db-backup/constants.js +243 -0
  74. package/dist/cjs/db-backup/constants.js.map +1 -0
  75. package/dist/cjs/db-backup/index.d.ts +19 -0
  76. package/dist/cjs/db-backup/index.d.ts.map +1 -0
  77. package/dist/cjs/db-backup/index.js +81 -0
  78. package/dist/cjs/db-backup/index.js.map +1 -0
  79. package/dist/cjs/db-backup/node-credential.d.ts +37 -0
  80. package/dist/cjs/db-backup/node-credential.d.ts.map +1 -0
  81. package/dist/cjs/db-backup/node-credential.js +107 -0
  82. package/dist/cjs/db-backup/node-credential.js.map +1 -0
  83. package/dist/cjs/db-backup/node-result.d.ts +34 -0
  84. package/dist/cjs/db-backup/node-result.d.ts.map +1 -0
  85. package/dist/cjs/db-backup/node-result.js +168 -0
  86. package/dist/cjs/db-backup/node-result.js.map +1 -0
  87. package/dist/cjs/db-backup/restore.d.ts +405 -0
  88. package/dist/cjs/db-backup/restore.d.ts.map +1 -0
  89. package/dist/cjs/db-backup/restore.js +497 -0
  90. package/dist/cjs/db-backup/restore.js.map +1 -0
  91. package/dist/cjs/db-backup/run-actions.d.ts +49 -0
  92. package/dist/cjs/db-backup/run-actions.d.ts.map +1 -0
  93. package/dist/cjs/db-backup/run-actions.js +121 -0
  94. package/dist/cjs/db-backup/run-actions.js.map +1 -0
  95. package/dist/cjs/db-backup/runs-list-query.d.ts +20 -0
  96. package/dist/cjs/db-backup/runs-list-query.d.ts.map +1 -0
  97. package/dist/cjs/db-backup/runs-list-query.js +53 -0
  98. package/dist/cjs/db-backup/runs-list-query.js.map +1 -0
  99. package/dist/cjs/db-backup/runs.d.ts +46 -0
  100. package/dist/cjs/db-backup/runs.d.ts.map +1 -0
  101. package/dist/cjs/db-backup/runs.js +232 -0
  102. package/dist/cjs/db-backup/runs.js.map +1 -0
  103. package/dist/cjs/db-backup/schemas.d.ts +9 -0
  104. package/dist/cjs/db-backup/schemas.d.ts.map +1 -0
  105. package/dist/cjs/db-backup/schemas.js +31 -0
  106. package/dist/cjs/db-backup/schemas.js.map +1 -0
  107. package/dist/cjs/db-backup/settings-schemas.d.ts +217 -0
  108. package/dist/cjs/db-backup/settings-schemas.d.ts.map +1 -0
  109. package/dist/cjs/db-backup/settings-schemas.js +319 -0
  110. package/dist/cjs/db-backup/settings-schemas.js.map +1 -0
  111. package/dist/cjs/email/constants.d.ts +82 -0
  112. package/dist/cjs/email/constants.d.ts.map +1 -0
  113. package/dist/cjs/email/constants.js +82 -0
  114. package/dist/cjs/email/constants.js.map +1 -0
  115. package/dist/cjs/email/index.d.ts +5 -0
  116. package/dist/cjs/email/index.d.ts.map +1 -0
  117. package/dist/cjs/email/index.js +30 -0
  118. package/dist/cjs/email/index.js.map +1 -0
  119. package/dist/cjs/email/schemas.d.ts +276 -0
  120. package/dist/cjs/email/schemas.d.ts.map +1 -0
  121. package/dist/cjs/email/schemas.js +280 -0
  122. package/dist/cjs/email/schemas.js.map +1 -0
  123. package/dist/cjs/exports/constants.d.ts +123 -0
  124. package/dist/cjs/exports/constants.d.ts.map +1 -0
  125. package/dist/cjs/exports/constants.js +109 -0
  126. package/dist/cjs/exports/constants.js.map +1 -0
  127. package/dist/cjs/exports/index.d.ts +5 -0
  128. package/dist/cjs/exports/index.d.ts.map +1 -0
  129. package/dist/cjs/exports/index.js +42 -0
  130. package/dist/cjs/exports/index.js.map +1 -0
  131. package/dist/cjs/exports/schemas.d.ts +386 -0
  132. package/dist/cjs/exports/schemas.d.ts.map +1 -0
  133. package/dist/cjs/exports/schemas.js +288 -0
  134. package/dist/cjs/exports/schemas.js.map +1 -0
  135. package/dist/cjs/identity/constants.d.ts +326 -0
  136. package/dist/cjs/identity/constants.d.ts.map +1 -0
  137. package/dist/cjs/identity/constants.js +318 -0
  138. package/dist/cjs/identity/constants.js.map +1 -0
  139. package/dist/cjs/identity/index.d.ts +5 -0
  140. package/dist/cjs/identity/index.d.ts.map +1 -0
  141. package/dist/cjs/identity/index.js +79 -0
  142. package/dist/cjs/identity/index.js.map +1 -0
  143. package/dist/cjs/identity/schemas.d.ts +792 -0
  144. package/dist/cjs/identity/schemas.d.ts.map +1 -0
  145. package/dist/cjs/identity/schemas.js +703 -0
  146. package/dist/cjs/identity/schemas.js.map +1 -0
  147. package/dist/cjs/jobs/constants.d.ts +135 -0
  148. package/dist/cjs/jobs/constants.d.ts.map +1 -0
  149. package/dist/cjs/jobs/constants.js +130 -0
  150. package/dist/cjs/jobs/constants.js.map +1 -0
  151. package/dist/cjs/jobs/index.d.ts +9 -0
  152. package/dist/cjs/jobs/index.d.ts.map +1 -0
  153. package/dist/cjs/jobs/index.js +59 -0
  154. package/dist/cjs/jobs/index.js.map +1 -0
  155. package/dist/cjs/jobs/retention-schemas.d.ts +252 -0
  156. package/dist/cjs/jobs/retention-schemas.d.ts.map +1 -0
  157. package/dist/cjs/jobs/retention-schemas.js +233 -0
  158. package/dist/cjs/jobs/retention-schemas.js.map +1 -0
  159. package/dist/cjs/jobs/schemas.d.ts +361 -0
  160. package/dist/cjs/jobs/schemas.d.ts.map +1 -0
  161. package/dist/cjs/jobs/schemas.js +706 -0
  162. package/dist/cjs/jobs/schemas.js.map +1 -0
  163. package/dist/cjs/jobs/settings-schemas.d.ts +84 -0
  164. package/dist/cjs/jobs/settings-schemas.d.ts.map +1 -0
  165. package/dist/cjs/jobs/settings-schemas.js +116 -0
  166. package/dist/cjs/jobs/settings-schemas.js.map +1 -0
  167. package/dist/cjs/nodes/admin-schemas.d.ts +288 -0
  168. package/dist/cjs/nodes/admin-schemas.d.ts.map +1 -0
  169. package/dist/cjs/nodes/admin-schemas.js +207 -0
  170. package/dist/cjs/nodes/admin-schemas.js.map +1 -0
  171. package/dist/cjs/nodes/constants.d.ts +98 -0
  172. package/dist/cjs/nodes/constants.d.ts.map +1 -0
  173. package/dist/cjs/nodes/constants.js +114 -0
  174. package/dist/cjs/nodes/constants.js.map +1 -0
  175. package/dist/cjs/nodes/index.d.ts +8 -0
  176. package/dist/cjs/nodes/index.d.ts.map +1 -0
  177. package/dist/cjs/nodes/index.js +63 -0
  178. package/dist/cjs/nodes/index.js.map +1 -0
  179. package/dist/cjs/nodes/schemas.d.ts +510 -0
  180. package/dist/cjs/nodes/schemas.d.ts.map +1 -0
  181. package/dist/cjs/nodes/schemas.js +1085 -0
  182. package/dist/cjs/nodes/schemas.js.map +1 -0
  183. package/dist/cjs/nodes/settings-schemas.d.ts +82 -0
  184. package/dist/cjs/nodes/settings-schemas.d.ts.map +1 -0
  185. package/dist/cjs/nodes/settings-schemas.js +106 -0
  186. package/dist/cjs/nodes/settings-schemas.js.map +1 -0
  187. package/dist/cjs/notifications/constants.d.ts +243 -0
  188. package/dist/cjs/notifications/constants.d.ts.map +1 -0
  189. package/dist/cjs/notifications/constants.js +209 -0
  190. package/dist/cjs/notifications/constants.js.map +1 -0
  191. package/dist/cjs/notifications/index.d.ts +5 -0
  192. package/dist/cjs/notifications/index.d.ts.map +1 -0
  193. package/dist/cjs/notifications/index.js +93 -0
  194. package/dist/cjs/notifications/index.js.map +1 -0
  195. package/dist/cjs/notifications/schemas.d.ts +1094 -0
  196. package/dist/cjs/notifications/schemas.d.ts.map +1 -0
  197. package/dist/cjs/notifications/schemas.js +915 -0
  198. package/dist/cjs/notifications/schemas.js.map +1 -0
  199. package/dist/cjs/onboarding/constants.d.ts +138 -0
  200. package/dist/cjs/onboarding/constants.d.ts.map +1 -0
  201. package/dist/cjs/onboarding/constants.js +123 -0
  202. package/dist/cjs/onboarding/constants.js.map +1 -0
  203. package/dist/cjs/onboarding/index.d.ts +5 -0
  204. package/dist/cjs/onboarding/index.d.ts.map +1 -0
  205. package/dist/cjs/onboarding/index.js +42 -0
  206. package/dist/cjs/onboarding/index.js.map +1 -0
  207. package/dist/cjs/onboarding/schemas.d.ts +360 -0
  208. package/dist/cjs/onboarding/schemas.d.ts.map +1 -0
  209. package/dist/cjs/onboarding/schemas.js +260 -0
  210. package/dist/cjs/onboarding/schemas.js.map +1 -0
  211. package/dist/cjs/settings/constants.d.ts +206 -0
  212. package/dist/cjs/settings/constants.d.ts.map +1 -0
  213. package/dist/cjs/settings/constants.js +200 -0
  214. package/dist/cjs/settings/constants.js.map +1 -0
  215. package/dist/cjs/settings/index.d.ts +6 -0
  216. package/dist/cjs/settings/index.d.ts.map +1 -0
  217. package/dist/cjs/settings/index.js +67 -0
  218. package/dist/cjs/settings/index.js.map +1 -0
  219. package/dist/cjs/settings/schemas.d.ts +610 -0
  220. package/dist/cjs/settings/schemas.d.ts.map +1 -0
  221. package/dist/cjs/settings/schemas.js +498 -0
  222. package/dist/cjs/settings/schemas.js.map +1 -0
  223. package/dist/cjs/settings/types.d.ts +81 -0
  224. package/dist/cjs/settings/types.d.ts.map +1 -0
  225. package/dist/cjs/settings/types.js +6 -0
  226. package/dist/cjs/settings/types.js.map +1 -0
  227. package/dist/cjs/sharing/constants.d.ts +232 -0
  228. package/dist/cjs/sharing/constants.d.ts.map +1 -0
  229. package/dist/cjs/sharing/constants.js +179 -0
  230. package/dist/cjs/sharing/constants.js.map +1 -0
  231. package/dist/cjs/sharing/enum.d.ts +5 -0
  232. package/dist/cjs/sharing/enum.d.ts.map +1 -0
  233. package/dist/cjs/sharing/enum.js +9 -0
  234. package/dist/cjs/sharing/enum.js.map +1 -0
  235. package/dist/cjs/sharing/grants.d.ts +518 -0
  236. package/dist/cjs/sharing/grants.d.ts.map +1 -0
  237. package/dist/cjs/sharing/grants.js +484 -0
  238. package/dist/cjs/sharing/grants.js.map +1 -0
  239. package/dist/cjs/sharing/groups.d.ts +410 -0
  240. package/dist/cjs/sharing/groups.d.ts.map +1 -0
  241. package/dist/cjs/sharing/groups.js +375 -0
  242. package/dist/cjs/sharing/groups.js.map +1 -0
  243. package/dist/cjs/sharing/index.d.ts +5 -0
  244. package/dist/cjs/sharing/index.d.ts.map +1 -0
  245. package/dist/cjs/sharing/index.js +80 -0
  246. package/dist/cjs/sharing/index.js.map +1 -0
  247. package/dist/cjs/sharing/schemas.d.ts +3 -0
  248. package/dist/cjs/sharing/schemas.d.ts.map +1 -0
  249. package/dist/cjs/sharing/schemas.js +21 -0
  250. package/dist/cjs/sharing/schemas.js.map +1 -0
  251. package/dist/cjs/storage/constants.d.ts +142 -0
  252. package/dist/cjs/storage/constants.d.ts.map +1 -0
  253. package/dist/cjs/storage/constants.js +126 -0
  254. package/dist/cjs/storage/constants.js.map +1 -0
  255. package/dist/cjs/storage/index.d.ts +29 -0
  256. package/dist/cjs/storage/index.d.ts.map +1 -0
  257. package/dist/cjs/storage/index.js +86 -0
  258. package/dist/cjs/storage/index.js.map +1 -0
  259. package/dist/cjs/storage/objects-complete-upload.d.ts +19 -0
  260. package/dist/cjs/storage/objects-complete-upload.d.ts.map +1 -0
  261. package/dist/cjs/storage/objects-complete-upload.js +19 -0
  262. package/dist/cjs/storage/objects-complete-upload.js.map +1 -0
  263. package/dist/cjs/storage/objects-download-url.d.ts +17 -0
  264. package/dist/cjs/storage/objects-download-url.d.ts.map +1 -0
  265. package/dist/cjs/storage/objects-download-url.js +16 -0
  266. package/dist/cjs/storage/objects-download-url.js.map +1 -0
  267. package/dist/cjs/storage/objects-init-upload.d.ts +152 -0
  268. package/dist/cjs/storage/objects-init-upload.d.ts.map +1 -0
  269. package/dist/cjs/storage/objects-init-upload.js +129 -0
  270. package/dist/cjs/storage/objects-init-upload.js.map +1 -0
  271. package/dist/cjs/storage/objects-list-query.d.ts +50 -0
  272. package/dist/cjs/storage/objects-list-query.d.ts.map +1 -0
  273. package/dist/cjs/storage/objects-list-query.js +23 -0
  274. package/dist/cjs/storage/objects-list-query.js.map +1 -0
  275. package/dist/cjs/storage/objects-object-response.d.ts +49 -0
  276. package/dist/cjs/storage/objects-object-response.d.ts.map +1 -0
  277. package/dist/cjs/storage/objects-object-response.js +54 -0
  278. package/dist/cjs/storage/objects-object-response.js.map +1 -0
  279. package/dist/cjs/storage/objects-update-metadata.d.ts +16 -0
  280. package/dist/cjs/storage/objects-update-metadata.d.ts.map +1 -0
  281. package/dist/cjs/storage/objects-update-metadata.js +14 -0
  282. package/dist/cjs/storage/objects-update-metadata.js.map +1 -0
  283. package/dist/cjs/storage/schemas.d.ts +14 -0
  284. package/dist/cjs/storage/schemas.d.ts.map +1 -0
  285. package/dist/cjs/storage/schemas.js +36 -0
  286. package/dist/cjs/storage/schemas.js.map +1 -0
  287. package/dist/cjs/storage/settings-schemas.d.ts +188 -0
  288. package/dist/cjs/storage/settings-schemas.d.ts.map +1 -0
  289. package/dist/cjs/storage/settings-schemas.js +223 -0
  290. package/dist/cjs/storage/settings-schemas.js.map +1 -0
  291. package/dist/cjs/storage/storage-bucket-provision.d.ts +152 -0
  292. package/dist/cjs/storage/storage-bucket-provision.d.ts.map +1 -0
  293. package/dist/cjs/storage/storage-bucket-provision.js +216 -0
  294. package/dist/cjs/storage/storage-bucket-provision.js.map +1 -0
  295. package/dist/cjs/storage/storage-config-response.d.ts +105 -0
  296. package/dist/cjs/storage/storage-config-response.d.ts.map +1 -0
  297. package/dist/cjs/storage/storage-config-response.js +181 -0
  298. package/dist/cjs/storage/storage-config-response.js.map +1 -0
  299. package/dist/cjs/storage/storage-config-update.d.ts +46 -0
  300. package/dist/cjs/storage/storage-config-update.d.ts.map +1 -0
  301. package/dist/cjs/storage/storage-config-update.js +133 -0
  302. package/dist/cjs/storage/storage-config-update.js.map +1 -0
  303. package/dist/cjs/storage/storage-connection-test.d.ts +129 -0
  304. package/dist/cjs/storage/storage-connection-test.d.ts.map +1 -0
  305. package/dist/cjs/storage/storage-connection-test.js +244 -0
  306. package/dist/cjs/storage/storage-connection-test.js.map +1 -0
  307. package/dist/cjs/storage/storage-migration.d.ts +102 -0
  308. package/dist/cjs/storage/storage-migration.d.ts.map +1 -0
  309. package/dist/cjs/storage/storage-migration.js +107 -0
  310. package/dist/cjs/storage/storage-migration.js.map +1 -0
  311. package/dist/cjs/storage/storage-status.d.ts +16 -0
  312. package/dist/cjs/storage/storage-status.d.ts.map +1 -0
  313. package/dist/cjs/storage/storage-status.js +23 -0
  314. package/dist/cjs/storage/storage-status.js.map +1 -0
  315. package/dist/cjs/telemetry/config.d.ts +4 -0
  316. package/dist/cjs/telemetry/config.d.ts.map +1 -1
  317. package/dist/cjs/telemetry/config.js +16 -2
  318. package/dist/cjs/telemetry/config.js.map +1 -1
  319. package/dist/cjs/telemetry/connection.d.ts +1 -1
  320. package/dist/cjs/telemetry/constants.d.ts +378 -6
  321. package/dist/cjs/telemetry/constants.d.ts.map +1 -1
  322. package/dist/cjs/telemetry/constants.js +296 -5
  323. package/dist/cjs/telemetry/constants.js.map +1 -1
  324. package/dist/cjs/telemetry/dashboard.d.ts +188 -17
  325. package/dist/cjs/telemetry/dashboard.d.ts.map +1 -1
  326. package/dist/cjs/telemetry/dashboard.js +61 -3
  327. package/dist/cjs/telemetry/dashboard.js.map +1 -1
  328. package/dist/cjs/telemetry/index.d.ts +4 -4
  329. package/dist/cjs/telemetry/index.d.ts.map +1 -1
  330. package/dist/cjs/telemetry/index.js +35 -3
  331. package/dist/cjs/telemetry/index.js.map +1 -1
  332. package/dist/cjs/telemetry/presentation.d.ts +243 -0
  333. package/dist/cjs/telemetry/presentation.d.ts.map +1 -0
  334. package/dist/cjs/telemetry/presentation.js +300 -0
  335. package/dist/cjs/telemetry/presentation.js.map +1 -0
  336. package/dist/cjs/telemetry/query.d.ts +2 -2
  337. package/dist/cjs/telemetry/schemas.d.ts +5 -2
  338. package/dist/cjs/telemetry/schemas.d.ts.map +1 -1
  339. package/dist/cjs/telemetry/schemas.js +21 -1
  340. package/dist/cjs/telemetry/schemas.js.map +1 -1
  341. package/dist/cjs/telemetry/stack.d.ts +5 -5
  342. package/dist/cjs/telemetry/store.d.ts +111 -0
  343. package/dist/cjs/telemetry/store.d.ts.map +1 -0
  344. package/dist/cjs/telemetry/store.js +83 -0
  345. package/dist/cjs/telemetry/store.js.map +1 -0
  346. package/dist/cjs/timezone/constants.d.ts +16 -0
  347. package/dist/cjs/timezone/constants.d.ts.map +1 -0
  348. package/dist/cjs/timezone/constants.js +19 -0
  349. package/dist/cjs/timezone/constants.js.map +1 -0
  350. package/dist/cjs/timezone/index.d.ts +15 -0
  351. package/dist/cjs/timezone/index.d.ts.map +1 -0
  352. package/dist/cjs/timezone/index.js +34 -0
  353. package/dist/cjs/timezone/index.js.map +1 -0
  354. package/dist/cjs/timezone/schemas.d.ts +111 -0
  355. package/dist/cjs/timezone/schemas.d.ts.map +1 -0
  356. package/dist/cjs/timezone/schemas.js +194 -0
  357. package/dist/cjs/timezone/schemas.js.map +1 -0
  358. package/dist/cjs/user-data/constants.d.ts +157 -0
  359. package/dist/cjs/user-data/constants.d.ts.map +1 -0
  360. package/dist/cjs/user-data/constants.js +137 -0
  361. package/dist/cjs/user-data/constants.js.map +1 -0
  362. package/dist/cjs/user-data/index.d.ts +5 -0
  363. package/dist/cjs/user-data/index.d.ts.map +1 -0
  364. package/dist/cjs/user-data/index.js +46 -0
  365. package/dist/cjs/user-data/index.js.map +1 -0
  366. package/dist/cjs/user-data/schemas.d.ts +306 -0
  367. package/dist/cjs/user-data/schemas.d.ts.map +1 -0
  368. package/dist/cjs/user-data/schemas.js +333 -0
  369. package/dist/cjs/user-data/schemas.js.map +1 -0
  370. package/dist/cjs/webhooks/constants.d.ts +154 -0
  371. package/dist/cjs/webhooks/constants.d.ts.map +1 -0
  372. package/dist/cjs/webhooks/constants.js +136 -0
  373. package/dist/cjs/webhooks/constants.js.map +1 -0
  374. package/dist/cjs/webhooks/enum.d.ts +5 -0
  375. package/dist/cjs/webhooks/enum.d.ts.map +1 -0
  376. package/dist/cjs/webhooks/enum.js +9 -0
  377. package/dist/cjs/webhooks/enum.js.map +1 -0
  378. package/dist/cjs/webhooks/index.d.ts +7 -0
  379. package/dist/cjs/webhooks/index.d.ts.map +1 -0
  380. package/dist/cjs/webhooks/index.js +48 -0
  381. package/dist/cjs/webhooks/index.js.map +1 -0
  382. package/dist/cjs/webhooks/schemas.d.ts +288 -0
  383. package/dist/cjs/webhooks/schemas.d.ts.map +1 -0
  384. package/dist/cjs/webhooks/schemas.js +295 -0
  385. package/dist/cjs/webhooks/schemas.js.map +1 -0
  386. package/dist/cjs/webhooks/signature.d.ts +54 -0
  387. package/dist/cjs/webhooks/signature.d.ts.map +1 -0
  388. package/dist/cjs/webhooks/signature.js +97 -0
  389. package/dist/cjs/webhooks/signature.js.map +1 -0
  390. package/dist/esm/ai/capabilities.d.ts +85 -0
  391. package/dist/esm/ai/capabilities.d.ts.map +1 -0
  392. package/dist/esm/ai/capabilities.js +90 -0
  393. package/dist/esm/ai/capabilities.js.map +1 -0
  394. package/dist/esm/ai/constants.d.ts +239 -0
  395. package/dist/esm/ai/constants.d.ts.map +1 -0
  396. package/dist/esm/ai/constants.js +229 -0
  397. package/dist/esm/ai/constants.js.map +1 -0
  398. package/dist/esm/ai/features.d.ts +24 -0
  399. package/dist/esm/ai/features.d.ts.map +1 -0
  400. package/dist/esm/ai/features.js +30 -0
  401. package/dist/esm/ai/features.js.map +1 -0
  402. package/dist/esm/ai/index.d.ts +11 -0
  403. package/dist/esm/ai/index.d.ts.map +1 -0
  404. package/dist/esm/ai/index.js +16 -0
  405. package/dist/esm/ai/index.js.map +1 -0
  406. package/dist/esm/ai/org-keys.d.ts +50 -0
  407. package/dist/esm/ai/org-keys.d.ts.map +1 -0
  408. package/dist/esm/ai/org-keys.js +40 -0
  409. package/dist/esm/ai/org-keys.js.map +1 -0
  410. package/dist/esm/ai/schemas.d.ts +642 -0
  411. package/dist/esm/ai/schemas.d.ts.map +1 -0
  412. package/dist/esm/ai/schemas.js +889 -0
  413. package/dist/esm/ai/schemas.js.map +1 -0
  414. package/dist/esm/alerts/constants.d.ts +195 -0
  415. package/dist/esm/alerts/constants.d.ts.map +1 -0
  416. package/dist/esm/alerts/constants.js +162 -0
  417. package/dist/esm/alerts/constants.js.map +1 -0
  418. package/dist/esm/alerts/enum.d.ts +5 -0
  419. package/dist/esm/alerts/enum.d.ts.map +1 -0
  420. package/dist/esm/alerts/enum.js +6 -0
  421. package/dist/esm/alerts/enum.js.map +1 -0
  422. package/dist/esm/alerts/index.d.ts +5 -0
  423. package/dist/esm/alerts/index.d.ts.map +1 -0
  424. package/dist/esm/alerts/index.js +8 -0
  425. package/dist/esm/alerts/index.js.map +1 -0
  426. package/dist/esm/alerts/schemas.d.ts +351 -0
  427. package/dist/esm/alerts/schemas.d.ts.map +1 -0
  428. package/dist/esm/alerts/schemas.js +429 -0
  429. package/dist/esm/alerts/schemas.js.map +1 -0
  430. package/dist/esm/android-app/constants.d.ts +337 -0
  431. package/dist/esm/android-app/constants.d.ts.map +1 -0
  432. package/dist/esm/android-app/constants.js +306 -0
  433. package/dist/esm/android-app/constants.js.map +1 -0
  434. package/dist/esm/android-app/index.d.ts +5 -0
  435. package/dist/esm/android-app/index.d.ts.map +1 -0
  436. package/dist/esm/android-app/index.js +8 -0
  437. package/dist/esm/android-app/index.js.map +1 -0
  438. package/dist/esm/android-app/schemas.d.ts +358 -0
  439. package/dist/esm/android-app/schemas.d.ts.map +1 -0
  440. package/dist/esm/android-app/schemas.js +306 -0
  441. package/dist/esm/android-app/schemas.js.map +1 -0
  442. package/dist/esm/credentials/constants.d.ts +35 -0
  443. package/dist/esm/credentials/constants.d.ts.map +1 -0
  444. package/dist/esm/credentials/constants.js +36 -0
  445. package/dist/esm/credentials/constants.js.map +1 -0
  446. package/dist/esm/credentials/index.d.ts +5 -0
  447. package/dist/esm/credentials/index.d.ts.map +1 -0
  448. package/dist/esm/credentials/index.js +8 -0
  449. package/dist/esm/credentials/index.js.map +1 -0
  450. package/dist/esm/credentials/schemas.d.ts +64 -0
  451. package/dist/esm/credentials/schemas.d.ts.map +1 -0
  452. package/dist/esm/credentials/schemas.js +79 -0
  453. package/dist/esm/credentials/schemas.js.map +1 -0
  454. package/dist/esm/db-backup/config.d.ts +76 -0
  455. package/dist/esm/db-backup/config.d.ts.map +1 -0
  456. package/dist/esm/db-backup/config.js +112 -0
  457. package/dist/esm/db-backup/config.js.map +1 -0
  458. package/dist/esm/db-backup/constants.d.ts +314 -0
  459. package/dist/esm/db-backup/constants.d.ts.map +1 -0
  460. package/dist/esm/db-backup/constants.js +240 -0
  461. package/dist/esm/db-backup/constants.js.map +1 -0
  462. package/dist/esm/db-backup/index.d.ts +19 -0
  463. package/dist/esm/db-backup/index.d.ts.map +1 -0
  464. package/dist/esm/db-backup/index.js +25 -0
  465. package/dist/esm/db-backup/index.js.map +1 -0
  466. package/dist/esm/db-backup/node-credential.d.ts +37 -0
  467. package/dist/esm/db-backup/node-credential.d.ts.map +1 -0
  468. package/dist/esm/db-backup/node-credential.js +104 -0
  469. package/dist/esm/db-backup/node-credential.js.map +1 -0
  470. package/dist/esm/db-backup/node-result.d.ts +34 -0
  471. package/dist/esm/db-backup/node-result.d.ts.map +1 -0
  472. package/dist/esm/db-backup/node-result.js +165 -0
  473. package/dist/esm/db-backup/node-result.js.map +1 -0
  474. package/dist/esm/db-backup/restore.d.ts +405 -0
  475. package/dist/esm/db-backup/restore.d.ts.map +1 -0
  476. package/dist/esm/db-backup/restore.js +494 -0
  477. package/dist/esm/db-backup/restore.js.map +1 -0
  478. package/dist/esm/db-backup/run-actions.d.ts +49 -0
  479. package/dist/esm/db-backup/run-actions.d.ts.map +1 -0
  480. package/dist/esm/db-backup/run-actions.js +118 -0
  481. package/dist/esm/db-backup/run-actions.js.map +1 -0
  482. package/dist/esm/db-backup/runs-list-query.d.ts +20 -0
  483. package/dist/esm/db-backup/runs-list-query.d.ts.map +1 -0
  484. package/dist/esm/db-backup/runs-list-query.js +50 -0
  485. package/dist/esm/db-backup/runs-list-query.js.map +1 -0
  486. package/dist/esm/db-backup/runs.d.ts +46 -0
  487. package/dist/esm/db-backup/runs.d.ts.map +1 -0
  488. package/dist/esm/db-backup/runs.js +229 -0
  489. package/dist/esm/db-backup/runs.js.map +1 -0
  490. package/dist/esm/db-backup/schemas.d.ts +9 -0
  491. package/dist/esm/db-backup/schemas.d.ts.map +1 -0
  492. package/dist/esm/db-backup/schemas.js +15 -0
  493. package/dist/esm/db-backup/schemas.js.map +1 -0
  494. package/dist/esm/db-backup/settings-schemas.d.ts +217 -0
  495. package/dist/esm/db-backup/settings-schemas.d.ts.map +1 -0
  496. package/dist/esm/db-backup/settings-schemas.js +316 -0
  497. package/dist/esm/db-backup/settings-schemas.js.map +1 -0
  498. package/dist/esm/email/constants.d.ts +82 -0
  499. package/dist/esm/email/constants.d.ts.map +1 -0
  500. package/dist/esm/email/constants.js +79 -0
  501. package/dist/esm/email/constants.js.map +1 -0
  502. package/dist/esm/email/index.d.ts +5 -0
  503. package/dist/esm/email/index.d.ts.map +1 -0
  504. package/dist/esm/email/index.js +8 -0
  505. package/dist/esm/email/index.js.map +1 -0
  506. package/dist/esm/email/schemas.d.ts +276 -0
  507. package/dist/esm/email/schemas.d.ts.map +1 -0
  508. package/dist/esm/email/schemas.js +277 -0
  509. package/dist/esm/email/schemas.js.map +1 -0
  510. package/dist/esm/exports/constants.d.ts +123 -0
  511. package/dist/esm/exports/constants.d.ts.map +1 -0
  512. package/dist/esm/exports/constants.js +106 -0
  513. package/dist/esm/exports/constants.js.map +1 -0
  514. package/dist/esm/exports/index.d.ts +5 -0
  515. package/dist/esm/exports/index.d.ts.map +1 -0
  516. package/dist/esm/exports/index.js +7 -0
  517. package/dist/esm/exports/index.js.map +1 -0
  518. package/dist/esm/exports/schemas.d.ts +386 -0
  519. package/dist/esm/exports/schemas.d.ts.map +1 -0
  520. package/dist/esm/exports/schemas.js +285 -0
  521. package/dist/esm/exports/schemas.js.map +1 -0
  522. package/dist/esm/identity/constants.d.ts +326 -0
  523. package/dist/esm/identity/constants.d.ts.map +1 -0
  524. package/dist/esm/identity/constants.js +312 -0
  525. package/dist/esm/identity/constants.js.map +1 -0
  526. package/dist/esm/identity/index.d.ts +5 -0
  527. package/dist/esm/identity/index.d.ts.map +1 -0
  528. package/dist/esm/identity/index.js +10 -0
  529. package/dist/esm/identity/index.js.map +1 -0
  530. package/dist/esm/identity/schemas.d.ts +792 -0
  531. package/dist/esm/identity/schemas.d.ts.map +1 -0
  532. package/dist/esm/identity/schemas.js +700 -0
  533. package/dist/esm/identity/schemas.js.map +1 -0
  534. package/dist/esm/jobs/constants.d.ts +135 -0
  535. package/dist/esm/jobs/constants.d.ts.map +1 -0
  536. package/dist/esm/jobs/constants.js +127 -0
  537. package/dist/esm/jobs/constants.js.map +1 -0
  538. package/dist/esm/jobs/index.d.ts +9 -0
  539. package/dist/esm/jobs/index.d.ts.map +1 -0
  540. package/dist/esm/jobs/index.js +11 -0
  541. package/dist/esm/jobs/index.js.map +1 -0
  542. package/dist/esm/jobs/retention-schemas.d.ts +252 -0
  543. package/dist/esm/jobs/retention-schemas.d.ts.map +1 -0
  544. package/dist/esm/jobs/retention-schemas.js +229 -0
  545. package/dist/esm/jobs/retention-schemas.js.map +1 -0
  546. package/dist/esm/jobs/schemas.d.ts +361 -0
  547. package/dist/esm/jobs/schemas.d.ts.map +1 -0
  548. package/dist/esm/jobs/schemas.js +703 -0
  549. package/dist/esm/jobs/schemas.js.map +1 -0
  550. package/dist/esm/jobs/settings-schemas.d.ts +84 -0
  551. package/dist/esm/jobs/settings-schemas.d.ts.map +1 -0
  552. package/dist/esm/jobs/settings-schemas.js +113 -0
  553. package/dist/esm/jobs/settings-schemas.js.map +1 -0
  554. package/dist/esm/nodes/admin-schemas.d.ts +288 -0
  555. package/dist/esm/nodes/admin-schemas.d.ts.map +1 -0
  556. package/dist/esm/nodes/admin-schemas.js +204 -0
  557. package/dist/esm/nodes/admin-schemas.js.map +1 -0
  558. package/dist/esm/nodes/constants.d.ts +98 -0
  559. package/dist/esm/nodes/constants.d.ts.map +1 -0
  560. package/dist/esm/nodes/constants.js +111 -0
  561. package/dist/esm/nodes/constants.js.map +1 -0
  562. package/dist/esm/nodes/index.d.ts +8 -0
  563. package/dist/esm/nodes/index.d.ts.map +1 -0
  564. package/dist/esm/nodes/index.js +11 -0
  565. package/dist/esm/nodes/index.js.map +1 -0
  566. package/dist/esm/nodes/schemas.d.ts +510 -0
  567. package/dist/esm/nodes/schemas.d.ts.map +1 -0
  568. package/dist/esm/nodes/schemas.js +1082 -0
  569. package/dist/esm/nodes/schemas.js.map +1 -0
  570. package/dist/esm/nodes/settings-schemas.d.ts +82 -0
  571. package/dist/esm/nodes/settings-schemas.d.ts.map +1 -0
  572. package/dist/esm/nodes/settings-schemas.js +103 -0
  573. package/dist/esm/nodes/settings-schemas.js.map +1 -0
  574. package/dist/esm/notifications/constants.d.ts +243 -0
  575. package/dist/esm/notifications/constants.d.ts.map +1 -0
  576. package/dist/esm/notifications/constants.js +206 -0
  577. package/dist/esm/notifications/constants.js.map +1 -0
  578. package/dist/esm/notifications/index.d.ts +5 -0
  579. package/dist/esm/notifications/index.d.ts.map +1 -0
  580. package/dist/esm/notifications/index.js +9 -0
  581. package/dist/esm/notifications/index.js.map +1 -0
  582. package/dist/esm/notifications/schemas.d.ts +1094 -0
  583. package/dist/esm/notifications/schemas.d.ts.map +1 -0
  584. package/dist/esm/notifications/schemas.js +911 -0
  585. package/dist/esm/notifications/schemas.js.map +1 -0
  586. package/dist/esm/onboarding/constants.d.ts +138 -0
  587. package/dist/esm/onboarding/constants.d.ts.map +1 -0
  588. package/dist/esm/onboarding/constants.js +120 -0
  589. package/dist/esm/onboarding/constants.js.map +1 -0
  590. package/dist/esm/onboarding/index.d.ts +5 -0
  591. package/dist/esm/onboarding/index.d.ts.map +1 -0
  592. package/dist/esm/onboarding/index.js +7 -0
  593. package/dist/esm/onboarding/index.js.map +1 -0
  594. package/dist/esm/onboarding/schemas.d.ts +360 -0
  595. package/dist/esm/onboarding/schemas.d.ts.map +1 -0
  596. package/dist/esm/onboarding/schemas.js +257 -0
  597. package/dist/esm/onboarding/schemas.js.map +1 -0
  598. package/dist/esm/settings/constants.d.ts +206 -0
  599. package/dist/esm/settings/constants.d.ts.map +1 -0
  600. package/dist/esm/settings/constants.js +197 -0
  601. package/dist/esm/settings/constants.js.map +1 -0
  602. package/dist/esm/settings/index.d.ts +6 -0
  603. package/dist/esm/settings/index.d.ts.map +1 -0
  604. package/dist/esm/settings/index.js +11 -0
  605. package/dist/esm/settings/index.js.map +1 -0
  606. package/dist/esm/settings/schemas.d.ts +610 -0
  607. package/dist/esm/settings/schemas.d.ts.map +1 -0
  608. package/dist/esm/settings/schemas.js +493 -0
  609. package/dist/esm/settings/schemas.js.map +1 -0
  610. package/dist/esm/settings/types.d.ts +81 -0
  611. package/dist/esm/settings/types.d.ts.map +1 -0
  612. package/dist/esm/settings/types.js +5 -0
  613. package/dist/esm/settings/types.js.map +1 -0
  614. package/dist/esm/sharing/constants.d.ts +232 -0
  615. package/dist/esm/sharing/constants.d.ts.map +1 -0
  616. package/dist/esm/sharing/constants.js +175 -0
  617. package/dist/esm/sharing/constants.js.map +1 -0
  618. package/dist/esm/sharing/enum.d.ts +5 -0
  619. package/dist/esm/sharing/enum.d.ts.map +1 -0
  620. package/dist/esm/sharing/enum.js +6 -0
  621. package/dist/esm/sharing/enum.js.map +1 -0
  622. package/dist/esm/sharing/grants.d.ts +518 -0
  623. package/dist/esm/sharing/grants.d.ts.map +1 -0
  624. package/dist/esm/sharing/grants.js +481 -0
  625. package/dist/esm/sharing/grants.js.map +1 -0
  626. package/dist/esm/sharing/groups.d.ts +410 -0
  627. package/dist/esm/sharing/groups.d.ts.map +1 -0
  628. package/dist/esm/sharing/groups.js +372 -0
  629. package/dist/esm/sharing/groups.js.map +1 -0
  630. package/dist/esm/sharing/index.d.ts +5 -0
  631. package/dist/esm/sharing/index.d.ts.map +1 -0
  632. package/dist/esm/sharing/index.js +11 -0
  633. package/dist/esm/sharing/index.js.map +1 -0
  634. package/dist/esm/sharing/schemas.d.ts +3 -0
  635. package/dist/esm/sharing/schemas.d.ts.map +1 -0
  636. package/dist/esm/sharing/schemas.js +5 -0
  637. package/dist/esm/sharing/schemas.js.map +1 -0
  638. package/dist/esm/storage/constants.d.ts +142 -0
  639. package/dist/esm/storage/constants.d.ts.map +1 -0
  640. package/dist/esm/storage/constants.js +123 -0
  641. package/dist/esm/storage/constants.js.map +1 -0
  642. package/dist/esm/storage/index.d.ts +29 -0
  643. package/dist/esm/storage/index.d.ts.map +1 -0
  644. package/dist/esm/storage/index.js +25 -0
  645. package/dist/esm/storage/index.js.map +1 -0
  646. package/dist/esm/storage/objects-complete-upload.d.ts +19 -0
  647. package/dist/esm/storage/objects-complete-upload.d.ts.map +1 -0
  648. package/dist/esm/storage/objects-complete-upload.js +16 -0
  649. package/dist/esm/storage/objects-complete-upload.js.map +1 -0
  650. package/dist/esm/storage/objects-download-url.d.ts +17 -0
  651. package/dist/esm/storage/objects-download-url.d.ts.map +1 -0
  652. package/dist/esm/storage/objects-download-url.js +13 -0
  653. package/dist/esm/storage/objects-download-url.js.map +1 -0
  654. package/dist/esm/storage/objects-init-upload.d.ts +152 -0
  655. package/dist/esm/storage/objects-init-upload.d.ts.map +1 -0
  656. package/dist/esm/storage/objects-init-upload.js +126 -0
  657. package/dist/esm/storage/objects-init-upload.js.map +1 -0
  658. package/dist/esm/storage/objects-list-query.d.ts +50 -0
  659. package/dist/esm/storage/objects-list-query.d.ts.map +1 -0
  660. package/dist/esm/storage/objects-list-query.js +20 -0
  661. package/dist/esm/storage/objects-list-query.js.map +1 -0
  662. package/dist/esm/storage/objects-object-response.d.ts +49 -0
  663. package/dist/esm/storage/objects-object-response.d.ts.map +1 -0
  664. package/dist/esm/storage/objects-object-response.js +51 -0
  665. package/dist/esm/storage/objects-object-response.js.map +1 -0
  666. package/dist/esm/storage/objects-update-metadata.d.ts +16 -0
  667. package/dist/esm/storage/objects-update-metadata.d.ts.map +1 -0
  668. package/dist/esm/storage/objects-update-metadata.js +11 -0
  669. package/dist/esm/storage/objects-update-metadata.js.map +1 -0
  670. package/dist/esm/storage/schemas.d.ts +14 -0
  671. package/dist/esm/storage/schemas.d.ts.map +1 -0
  672. package/dist/esm/storage/schemas.js +20 -0
  673. package/dist/esm/storage/schemas.js.map +1 -0
  674. package/dist/esm/storage/settings-schemas.d.ts +188 -0
  675. package/dist/esm/storage/settings-schemas.d.ts.map +1 -0
  676. package/dist/esm/storage/settings-schemas.js +220 -0
  677. package/dist/esm/storage/settings-schemas.js.map +1 -0
  678. package/dist/esm/storage/storage-bucket-provision.d.ts +152 -0
  679. package/dist/esm/storage/storage-bucket-provision.d.ts.map +1 -0
  680. package/dist/esm/storage/storage-bucket-provision.js +213 -0
  681. package/dist/esm/storage/storage-bucket-provision.js.map +1 -0
  682. package/dist/esm/storage/storage-config-response.d.ts +105 -0
  683. package/dist/esm/storage/storage-config-response.d.ts.map +1 -0
  684. package/dist/esm/storage/storage-config-response.js +178 -0
  685. package/dist/esm/storage/storage-config-response.js.map +1 -0
  686. package/dist/esm/storage/storage-config-update.d.ts +46 -0
  687. package/dist/esm/storage/storage-config-update.d.ts.map +1 -0
  688. package/dist/esm/storage/storage-config-update.js +130 -0
  689. package/dist/esm/storage/storage-config-update.js.map +1 -0
  690. package/dist/esm/storage/storage-connection-test.d.ts +129 -0
  691. package/dist/esm/storage/storage-connection-test.d.ts.map +1 -0
  692. package/dist/esm/storage/storage-connection-test.js +241 -0
  693. package/dist/esm/storage/storage-connection-test.js.map +1 -0
  694. package/dist/esm/storage/storage-migration.d.ts +102 -0
  695. package/dist/esm/storage/storage-migration.d.ts.map +1 -0
  696. package/dist/esm/storage/storage-migration.js +104 -0
  697. package/dist/esm/storage/storage-migration.js.map +1 -0
  698. package/dist/esm/storage/storage-status.d.ts +16 -0
  699. package/dist/esm/storage/storage-status.d.ts.map +1 -0
  700. package/dist/esm/storage/storage-status.js +20 -0
  701. package/dist/esm/storage/storage-status.js.map +1 -0
  702. package/dist/esm/telemetry/config.d.ts +4 -0
  703. package/dist/esm/telemetry/config.d.ts.map +1 -1
  704. package/dist/esm/telemetry/config.js +16 -2
  705. package/dist/esm/telemetry/config.js.map +1 -1
  706. package/dist/esm/telemetry/connection.d.ts +1 -1
  707. package/dist/esm/telemetry/constants.d.ts +378 -6
  708. package/dist/esm/telemetry/constants.d.ts.map +1 -1
  709. package/dist/esm/telemetry/constants.js +294 -4
  710. package/dist/esm/telemetry/constants.js.map +1 -1
  711. package/dist/esm/telemetry/dashboard.d.ts +188 -17
  712. package/dist/esm/telemetry/dashboard.d.ts.map +1 -1
  713. package/dist/esm/telemetry/dashboard.js +61 -3
  714. package/dist/esm/telemetry/dashboard.js.map +1 -1
  715. package/dist/esm/telemetry/index.d.ts +4 -4
  716. package/dist/esm/telemetry/index.d.ts.map +1 -1
  717. package/dist/esm/telemetry/index.js +2 -2
  718. package/dist/esm/telemetry/index.js.map +1 -1
  719. package/dist/esm/telemetry/presentation.d.ts +243 -0
  720. package/dist/esm/telemetry/presentation.d.ts.map +1 -0
  721. package/dist/esm/telemetry/presentation.js +297 -0
  722. package/dist/esm/telemetry/presentation.js.map +1 -0
  723. package/dist/esm/telemetry/query.d.ts +2 -2
  724. package/dist/esm/telemetry/schemas.d.ts +5 -2
  725. package/dist/esm/telemetry/schemas.d.ts.map +1 -1
  726. package/dist/esm/telemetry/schemas.js +3 -1
  727. package/dist/esm/telemetry/schemas.js.map +1 -1
  728. package/dist/esm/telemetry/stack.d.ts +5 -5
  729. package/dist/esm/telemetry/store.d.ts +111 -0
  730. package/dist/esm/telemetry/store.d.ts.map +1 -0
  731. package/dist/esm/telemetry/store.js +80 -0
  732. package/dist/esm/telemetry/store.js.map +1 -0
  733. package/dist/esm/timezone/constants.d.ts +16 -0
  734. package/dist/esm/timezone/constants.d.ts.map +1 -0
  735. package/dist/esm/timezone/constants.js +16 -0
  736. package/dist/esm/timezone/constants.js.map +1 -0
  737. package/dist/esm/timezone/index.d.ts +15 -0
  738. package/dist/esm/timezone/index.d.ts.map +1 -0
  739. package/dist/esm/timezone/index.js +15 -0
  740. package/dist/esm/timezone/index.js.map +1 -0
  741. package/dist/esm/timezone/schemas.d.ts +111 -0
  742. package/dist/esm/timezone/schemas.d.ts.map +1 -0
  743. package/dist/esm/timezone/schemas.js +185 -0
  744. package/dist/esm/timezone/schemas.js.map +1 -0
  745. package/dist/esm/user-data/constants.d.ts +157 -0
  746. package/dist/esm/user-data/constants.d.ts.map +1 -0
  747. package/dist/esm/user-data/constants.js +134 -0
  748. package/dist/esm/user-data/constants.js.map +1 -0
  749. package/dist/esm/user-data/index.d.ts +5 -0
  750. package/dist/esm/user-data/index.d.ts.map +1 -0
  751. package/dist/esm/user-data/index.js +7 -0
  752. package/dist/esm/user-data/index.js.map +1 -0
  753. package/dist/esm/user-data/schemas.d.ts +306 -0
  754. package/dist/esm/user-data/schemas.d.ts.map +1 -0
  755. package/dist/esm/user-data/schemas.js +330 -0
  756. package/dist/esm/user-data/schemas.js.map +1 -0
  757. package/dist/esm/webhooks/constants.d.ts +154 -0
  758. package/dist/esm/webhooks/constants.d.ts.map +1 -0
  759. package/dist/esm/webhooks/constants.js +133 -0
  760. package/dist/esm/webhooks/constants.js.map +1 -0
  761. package/dist/esm/webhooks/enum.d.ts +5 -0
  762. package/dist/esm/webhooks/enum.d.ts.map +1 -0
  763. package/dist/esm/webhooks/enum.js +6 -0
  764. package/dist/esm/webhooks/enum.js.map +1 -0
  765. package/dist/esm/webhooks/index.d.ts +7 -0
  766. package/dist/esm/webhooks/index.d.ts.map +1 -0
  767. package/dist/esm/webhooks/index.js +8 -0
  768. package/dist/esm/webhooks/index.js.map +1 -0
  769. package/dist/esm/webhooks/schemas.d.ts +288 -0
  770. package/dist/esm/webhooks/schemas.d.ts.map +1 -0
  771. package/dist/esm/webhooks/schemas.js +292 -0
  772. package/dist/esm/webhooks/schemas.js.map +1 -0
  773. package/dist/esm/webhooks/signature.d.ts +54 -0
  774. package/dist/esm/webhooks/signature.d.ts.map +1 -0
  775. package/dist/esm/webhooks/signature.js +93 -0
  776. package/dist/esm/webhooks/signature.js.map +1 -0
  777. package/package.json +181 -1
@@ -0,0 +1,1085 @@
1
+ "use strict";
2
+ // =============================================================================
3
+ // Nodes: the node routes' request shapes (issue #734, PP-8.2)
4
+ // =============================================================================
5
+ //
6
+ // The node control plane (`register`, `heartbeat`, `claim`, `renew`, `result`,
7
+ // `fail`), the data plane's two URL mints, the per-job secret request and the
8
+ // node credential mint, as zod schemas. Moved verbatim (comments included)
9
+ // from `@marinoscar/platform-api/nodes`'s dto files, which wrap these with
10
+ // `createZodDto`; the response shapes stay there as Swagger classes. The
11
+ // node runner of `@marinoscar/platform-cli` sends exactly these bodies.
12
+ // =============================================================================
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.nodeJobSecretRequestSchema = exports.nodeUploadUrlSchema = exports.nodeDownloadUrlSchema = exports.nodeJobFailureSchema = exports.nodeJobResultSchema = exports.renewLeaseSchema = exports.claimJobsSchema = exports.heartbeatNodeSchema = exports.registerNodeResponseSchema = exports.NODE_SERVER_CAPABILITY_HOST_VITALS = exports.registerNodeSchema = exports.nodeEventSchema = exports.MAX_NODE_EVENT_ATTRS = exports.MAX_NODE_EVENTS_PER_HEARTBEAT = exports.NODE_EVENT_TYPES = exports.nodeVitalsSchema = exports.nodePowerSchema = exports.nodeHostVitalsSchema = exports.nodeVitalsExtraSchema = exports.nodeVitalsCountersSchema = exports.createNodeCredentialSchema = exports.claimTokenField = void 0;
15
+ const zod_1 = require("zod");
16
+ const constants_js_1 = require("./constants.js");
17
+ // -----------------------------------------------------------------------------
18
+ // From claim-token.field.ts: The claim token, as a node quotes it back (issue #364, epic #254)
19
+ // -----------------------------------------------------------------------------
20
+ // =============================================================================
21
+ // The claim token, as a node quotes it back (issue #364, epic #254)
22
+ // =============================================================================
23
+ //
24
+ // ONE FIELD IN ONE FILE, which in this folder needs a reason — the file beside
25
+ // it argues at length for keeping SIX request bodies together. The reason is
26
+ // that this field is not part of any one of those conversations: it is the
27
+ // same sentence spoken on SIX ROUTES ACROSS THREE DTO FILES — renew, result
28
+ // and failure (`node-control-plane.dto.ts`), download-url and upload-url
29
+ // (`node-data-plane.dto.ts`), and secret (`node-job-secret.dto.ts`) — and the
30
+ // one thing that must never differ between them is what that sentence means.
31
+ // Copied six times it drifts exactly once, in the direction that costs the
32
+ // most: somebody makes it `.nullable()` on one route to accommodate a client
33
+ // that serialises absent fields as `null`, and on that route alone a node
34
+ // asserting "no token" starts matching `claim_token IS NULL` instead of being
35
+ // refused.
36
+ //
37
+ // The alternative was exporting it from `node-control-plane.dto.ts`, and it is
38
+ // rejected for what it would say rather than what it would do: it would make
39
+ // the data plane's and the broker's guards look like borrowings from the
40
+ // control plane, when in fact all six are the same guard. Nothing here is
41
+ // control plane or data plane; it is the identity of a CLAIM.
42
+ // =============================================================================
43
+ /**
44
+ * THE CLAIM THIS MESSAGE IS ABOUT — `jobs.claim_token`, handed to the node in
45
+ * the claim response and quoted back on every route that speaks for a held
46
+ * job (#364).
47
+ *
48
+ * WHY A NODE ID IS NOT ENOUGH, which is the whole of this field. Every guard
49
+ * on the six routes above identified the caller by `claimedByNodeId` alone,
50
+ * which tells one node from another and NOT ONE NODE FROM ITSELF. A node that
51
+ * claims job J, stalls past its lease, is reaped, and then claims J again in a
52
+ * second worker slot has two live slots quoting the same node id, and every
53
+ * one of those six routes will believe the older one:
54
+ *
55
+ * - `renew` — the stale slot extends the lease its OWN newer claim is
56
+ * running under, so a second slot that dies is reaped late, for as long as
57
+ * the first keeps ticking.
58
+ * - `result` / `failure` — the stale slot SETTLES a job its newer claim is
59
+ * still executing, persisting output computed against an earlier attempt
60
+ * or charging a failure against a run that is going fine.
61
+ * - `upload-url` — the sharpest of the six, and the quietest. With
62
+ * `deriveOutputKey` (#348) the key is a function of the JOB, not of the
63
+ * claim, so a stale slot is handed a signed PUT for the exact output key
64
+ * its own later claim is currently writing. Both PUTs "succeed"; the
65
+ * bytes that survive are whichever finished last, and nothing anywhere
66
+ * records that two ran.
67
+ * - `download-url` — a bearer capability for the job's input, minted for a
68
+ * slot that no longer holds the row.
69
+ * - `secret` — a LIVE DATABASE CREDENTIAL handed to a slot that lost the
70
+ * job, valid for the lease of a claim that is not its own.
71
+ *
72
+ * The token is minted per row by the claim statement
73
+ * (`job-claim.service.ts`, `gen_random_uuid()`), so those two claims carry
74
+ * different tokens and the stale one is refused.
75
+ *
76
+ * ⚠ OPTIONAL ON THE WIRE EVERYWHERE, AND THAT IS LOAD-BEARING, not politeness.
77
+ * A fleet is upgraded one machine at a time; a node running older CLI code
78
+ * omits this field, and the server must then behave EXACTLY as it did before —
79
+ * the node id and the lease alone — rather than 400 the request or 409 the
80
+ * job. Same posture as `renewIntervalMs` in #347: additive, ignorable,
81
+ * strictly better when present. The ambiguity above stays open for that node
82
+ * until it is upgraded, which is a rolling-upgrade window rather than a new
83
+ * hole; nothing the server can do closes it earlier, because the only value
84
+ * able to tell two slots of one node apart is one only they hold.
85
+ *
86
+ * ⚠ OMITTED MUST STAY `undefined` AND MUST NOT BECOME `null`. Downstream this
87
+ * value reaches `heldLeaseWhere`, where the two mean opposite things:
88
+ * `undefined` drops the clause entirely ("I am not asserting a claim"), while
89
+ * `null` matches `claim_token IS NULL` ("I assert this row carries no token",
90
+ * which is what a claim taken before the column existed looks like).
91
+ * `.optional()` with no `.nullable()` is what keeps them apart — a body that
92
+ * spells the key as `null` is refused rather than silently reinterpreted as
93
+ * the other statement. Apply `.optional()` at each use site rather than baking
94
+ * it in here, so every body says out loud that the field may be absent.
95
+ *
96
+ * Validated as a uuid rather than as any bounded string because the column is
97
+ * `uuid`: a garbage value reaching a `where` clause is a Postgres cast error
98
+ * (a 500 about "inconsistent column data"), and a clean 400 naming the field
99
+ * is a better answer to a malformed token than a 500 is.
100
+ *
101
+ * @stability experimental
102
+ */
103
+ exports.claimTokenField = zod_1.z.uuid().describe(
104
+ // ⚠ THE PUBLISHED DESCRIPTION IS PART OF THE ONE DEFINITION, and it is here
105
+ // for the reason the schema is: six routes describing one grant six ways is
106
+ // six chances to describe it differently, and a node's author reads
107
+ // whichever one they happened to open. `.describe()` rides through
108
+ // `.optional()` into every generated body, so `openapi.json` says the same
109
+ // sentence six times by construction.
110
+ 'The `claimToken` this assignment was handed in the claim response, quoted back so the ' +
111
+ 'server can tell THIS claim of the job from a later one by the same node — the difference ' +
112
+ 'between renewing, settling, signing or crediting your own run and one your node started ' +
113
+ 'later. Optional: omit it and the request is identified by node id alone, exactly as ' +
114
+ 'before, so an older client is refused nothing and stays exactly as ambiguous as it was. ' +
115
+ 'Omit the key rather than sending `null`; `null` is a different assertion and is refused.');
116
+ // -----------------------------------------------------------------------------
117
+ // From create-node-credential.dto.ts: The create-credential request body (issue #267, epic #254)
118
+ // -----------------------------------------------------------------------------
119
+ // =============================================================================
120
+ // The create-credential request body (issue #267, epic #254)
121
+ // =============================================================================
122
+ //
123
+ // Deliberately NOT `CreatePatDto`'s `{ durationValue, durationUnit }` pair.
124
+ // That pair exists on a PAT because a PAT MUST expire — `PersonalAccessToken
125
+ // .expiresAt` is a required column — so its request body has to make the
126
+ // caller say when, and the two-field shape ("30" + "days") is friendlier than
127
+ // a raw timestamp for a human filling in a form.
128
+ //
129
+ // A node credential's expiry is OPTIONAL, and the reason is written out in
130
+ // full above `NodeCredential.expiresAt` in `prisma/schema.prisma`: a worker
131
+ // node runs unattended for months, and a mandatory expiry turns a fleet going
132
+ // dark at 3am into the DEFAULT behaviour rather than an incident. So the
133
+ // field is optional here, and its absence is a real, supported answer —
134
+ // "never expires, authenticate indefinitely until revoked" — not a validation
135
+ // hole and not an unset value some later code has to fill in.
136
+ //
137
+ // WHY `expiresInDays` AND NOT AN ISO TIMESTAMP. A caller-supplied absolute
138
+ // `expiresAt` would have to be validated against the server's clock (is it in
139
+ // the past? is it absurdly far in the future?) and would silently encode the
140
+ // CALLER's idea of "now" — a CLI on a box with a skewed clock could mint a
141
+ // credential that is already expired, or one that outlives the deployment. A
142
+ // relative duration is interpreted by the server against the server's own
143
+ // clock, which is the same clock `validateToken` compares against, so the two
144
+ // can never disagree. Days rather than a unit enum because a node credential
145
+ // measured in minutes is not a use case anybody has: this credential exists
146
+ // precisely for the long-lived, unattended case.
147
+ // =============================================================================
148
+ /**
149
+ * The body that mints a node credential (`nod_` token).
150
+ *
151
+ * @stability experimental
152
+ */
153
+ exports.createNodeCredentialSchema = zod_1.z.object({
154
+ /** The credential's display name, 1 to 100 characters. */
155
+ name: zod_1.z
156
+ .string()
157
+ .trim()
158
+ .min(1, 'Name is required')
159
+ .max(constants_js_1.MAX_NODE_CREDENTIAL_NAME_LENGTH, 'Name must be 100 characters or less'),
160
+ // Optional ON PURPOSE — see the file header. Omitted means `expiresAt: null`
161
+ // in the row, which `validateToken` treats as "no expiry to check", not as
162
+ // "expired" and not as "not configured yet".
163
+ /** Days until it expires, at most `MAX_NODE_CREDENTIAL_DAYS`; omitted, it never expires. */
164
+ expiresInDays: zod_1.z
165
+ .number()
166
+ .int('Expiry must be a whole number of days')
167
+ .min(1, 'Expiry must be at least 1 day')
168
+ .max(constants_js_1.MAX_NODE_CREDENTIAL_DAYS, `Expiry must be at most ${constants_js_1.MAX_NODE_CREDENTIAL_DAYS} days`)
169
+ .optional(),
170
+ });
171
+ // -----------------------------------------------------------------------------
172
+ // From node-control-plane.dto.ts: The node control plane's request bodies (issue #268, epic #254)
173
+ // -----------------------------------------------------------------------------
174
+ // =============================================================================
175
+ // The node control plane's request bodies (issue #268, epic #254)
176
+ // =============================================================================
177
+ //
178
+ // SIX BODIES IN ONE FILE, deliberately, where `create-node-credential.dto.ts`
179
+ // beside it is one body in one file. These six are not six independent
180
+ // shapes; they are one CONVERSATION between a worker node and this server —
181
+ // register, heartbeat, claim, renew, result, failure — and every one of the
182
+ // limits below (`MAX_NODE_CONCURRENCY`, the type-list caps, the error length)
183
+ // has to be the same number in more than one of them or the conversation
184
+ // develops a step that accepts what an earlier step refused. Split across six
185
+ // files, those shared constants become six imports nobody keeps aligned;
186
+ // together, a change to the concurrency ceiling is one line that every body
187
+ // sees — and `claimToken` below is the same argument one level up: the three
188
+ // bodies here that speak for a held job share ONE field definition with the
189
+ // three outside this file that do the same (`node-data-plane.dto.ts`,
190
+ // `node-job-secret.dto.ts`), so "renew accepts a token but failure silently
191
+ // ignores it" is unwritable. That definition lives in `claim-token.field.ts`,
192
+ // which carries its own note on why one field earned a file of its own.
193
+ //
194
+ // -----------------------------------------------------------------------------
195
+ // EVERY FIELD HERE ARRIVES FROM A MACHINE THIS DEPLOYMENT MAY NOT OWN
196
+ // -----------------------------------------------------------------------------
197
+ //
198
+ // That is the whole reason these schemas are as tight as they are. A node is
199
+ // authenticated (a `nod_` credential resolves to its owner) but it is not
200
+ // TRUSTED in the sense a first-party service is: it runs unattended on
201
+ // somebody's spare box, its config file is editable by whoever has that box,
202
+ // and the numbers it reports about itself go straight into a row this server
203
+ // then makes scheduling decisions from. So:
204
+ //
205
+ // - `concurrency` is bounded because it becomes the CLAIM LIMIT. An
206
+ // unbounded value is a node that asks for every runnable row in the queue
207
+ // in one call and holds all of them under one lease — a fleet-wide denial
208
+ // of service written as a config typo.
209
+ // - `eligibleTypes` is bounded in both length and element size because it
210
+ // is stored as an array column and then used as a `text[]` parameter in
211
+ // the claim's `type = ANY(...)`.
212
+ // - `error` is bounded because it lands in `Job.lastError`, which the admin
213
+ // job list renders. `JobTerminalService` truncates too, at 2000 — the
214
+ // same number on purpose, so the wire limit and the storage limit cannot
215
+ // disagree about what "too long" means.
216
+ //
217
+ // -----------------------------------------------------------------------------
218
+ // WHAT IS DELIBERATELY *NOT* IN ANY OF THESE BODIES
219
+ // -----------------------------------------------------------------------------
220
+ //
221
+ // REJECTED: a node-supplied `leaseMs` on claim or renew. It reads as
222
+ // courteous — the node knows how long its work takes — and it hands the one
223
+ // safety property the lease exists for to the least trustworthy participant.
224
+ // A node that asks for a 24-hour lease parks every row it claims for a day:
225
+ // the reaper (#263) will not touch a live lease, so a node that then dies
226
+ // takes its jobs with it until tomorrow, and nothing in the fleet looks
227
+ // broken while it happens. The lease is DERIVED on the server from
228
+ // `JOBS_JOB_TIMEOUT_MS` (`resolveJobLeaseMs`), identically for both
229
+ // executors, and a node cannot influence it.
230
+ //
231
+ // REJECTED: a node-supplied `status: 'disabled' | 'draining'` on heartbeat.
232
+ // Those two are operator decisions — see `WorkerNode.status` in
233
+ // `schema.prisma` — and a node that could report them could also report its
234
+ // way out of them. The union below is the two states a node may claim about
235
+ // itself, and `NodesService.heartbeat` additionally refuses to let even those
236
+ // overwrite an operator's `disabled`/`draining`.
237
+ //
238
+ // REJECTED: `willRetry` being anything but advisory. It is accepted (a node
239
+ // that has just read a provider's response often does know) and it is never
240
+ // acted on: the server's attempt budget decides, in `JobTerminalService`,
241
+ // because a node that could dictate "retry me" could retry itself forever
242
+ // past a budget that exists precisely to bound a job nobody is watching.
243
+ // =============================================================================
244
+ /** Cap on one job-type string, matching what a handler `type` key ever is. */
245
+ const MAX_TYPE_LENGTH = 200;
246
+ /**
247
+ * Cap on a node-reported failure message.
248
+ *
249
+ * The same 2000 as `MAX_LAST_ERROR_LENGTH` in `job-terminal.service.ts`, and
250
+ * that is the point: the terminal service truncates whatever it is given, so
251
+ * a larger limit here would only mean accepting bytes that are guaranteed to
252
+ * be thrown away, and a smaller one would reject messages the storage layer
253
+ * would have kept.
254
+ */
255
+ const MAX_ERROR_LENGTH = 2000;
256
+ /** A non-empty, bounded job-type key. */
257
+ const jobType = zod_1.z.string().trim().min(1).max(MAX_TYPE_LENGTH);
258
+ /**
259
+ * `jobs.claim_token`, as the node quotes it back — the field three of the
260
+ * bodies below carry, and three more outside this file (the two data-plane
261
+ * mints and the secret broker) carry for the same reason.
262
+ *
263
+ * SHARED, NOT REDECLARED: `claim-token.field.ts` holds the field and the whole
264
+ * argument for it, including why `undefined` and `null` must stay different
265
+ * statements. Six copies of a uuid would drift exactly once, and on one route
266
+ * only, which is the worst shape that drift can take.
267
+ */
268
+ const claimToken = exports.claimTokenField;
269
+ /**
270
+ * The node's self-reported capability bag.
271
+ *
272
+ * `Record<string, unknown>` and nothing narrower, mirroring
273
+ * `WorkerNode.capabilities` being JSONB: the shape is the FLEET PAGE's
274
+ * business (#276), not this server's, and pinning it here would mean a node
275
+ * that learns to report one new fact needs an API deploy before it may say
276
+ * so. Depth and size are bounded by the global body-size limit, not by this
277
+ * schema.
278
+ */
279
+ const capabilities = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
280
+ // =============================================================================
281
+ // Vitals (issue #604) — carried on the heartbeat
282
+ // =============================================================================
283
+ //
284
+ // WHAT A NODE SAYS ABOUT ITS OWN HEALTH, and the file header's argument
285
+ // applies to every field: these numbers come from a machine this deployment
286
+ // may not own, they are stored verbatim (`WorkerNode.lastVitals`, JSONB) and
287
+ // rendered on the admin fleet page. So the shape is CLOSED and every value is
288
+ // BOUNDED:
289
+ //
290
+ // - `.strict()` at both levels, unlike `capabilities` above. Capabilities
291
+ // are an open bag on purpose (the fleet page's business, free to grow);
292
+ // vitals are a CONTRACT the fleet page reads field by field, and an open
293
+ // bag here would be an unbounded JSONB write on a route every node hits
294
+ // every few seconds. A node that learns a new vital needs an API change
295
+ // first, which is the review this surface should get.
296
+ // - Every number is finite and non-negative with an explicit ceiling, so
297
+ // `NaN`/`Infinity`/negative garbage never reaches the row, and a number
298
+ // too large to be true is refused rather than charted.
299
+ // - Every string is short and version-shaped, because the three it carries
300
+ // are version banners rendered as text — never a free-form message.
301
+ // - Every field is optional. A node reports what it can measure (a node
302
+ // without `pg_dump` has no `pgDumpVersion`), and an old node sends no
303
+ // `vitals` key at all, which leaves the stored snapshot untouched.
304
+ //
305
+ // ⚠ THE CEILINGS ARE GENEROUS ON PURPOSE. A vitals value out of range fails
306
+ // the WHOLE heartbeat with a 400, and a node whose heartbeats fail goes stale
307
+ // on the fleet page and is swept offline — a far worse outcome than one odd
308
+ // number. So each ceiling is "physically implausible", not "unusual": disk
309
+ // sizes in particular allow a network filesystem that reports exabytes free
310
+ // (some do), which is why they are not required to be safe integers.
311
+ //
312
+ // REJECTED: a node-supplied timestamp for the snapshot. `lastVitalsAt` is
313
+ // stamped by the SERVER when the heartbeat lands, for the same reason
314
+ // `lastHeartbeatAt` is — a node's clock is one more thing it could get wrong.
315
+ // =============================================================================
316
+ /** Ceiling on a counter: a trillion events is past any node's plausible lifetime. */
317
+ const MAX_VITALS_COUNTER = 1e12;
318
+ /** Ceiling on a process memory figure (RSS, heap): 1 PiB. */
319
+ const MAX_VITALS_MEMORY_BYTES = 2 ** 50;
320
+ /**
321
+ * Ceiling on a filesystem figure: 2^64 bytes. Not an integer check — a
322
+ * `statfs` total past 2^53 arrives as a (still finite) double.
323
+ */
324
+ const MAX_VITALS_DISK_BYTES = 2 ** 64;
325
+ /** Ceiling on `cpuPercent`: 100% per core, for up to 128 cores. */
326
+ const MAX_VITALS_CPU_PERCENT = 12_800;
327
+ /** Ceiling on event-loop delay: one hour. A loop blocked longer is not sending heartbeats. */
328
+ const MAX_VITALS_EVENT_LOOP_DELAY_MS = 3_600_000;
329
+ /** Ceiling on uptime: ten years. */
330
+ const MAX_VITALS_UPTIME_SECONDS = 10 * 365 * 24 * 60 * 60;
331
+ /** Cap on a reported version banner (`v24.3.0`, `pg_dump (PostgreSQL) 16.4`). */
332
+ const MAX_VITALS_VERSION_LENGTH = 64;
333
+ /** Ceiling on a battery time estimate: 7 days. */
334
+ const MAX_POWER_TIME_REMAINING_SECONDS = 7 * 24 * 60 * 60;
335
+ /**
336
+ * A finite, non-negative number no larger than `max`. (Zod 4's `z.number()`
337
+ * already refuses `NaN` and `Infinity`; JSON cannot carry them anyway.)
338
+ */
339
+ const boundedNumber = (max) => zod_1.z.number().nonnegative().max(max);
340
+ /**
341
+ * A non-negative integer no larger than `max`. `.int()` comes FIRST: Zod 4's
342
+ * integer check carries its own safe-integer range, and applied after `.max()`
343
+ * it is that range, not ours, that reaches the generated OpenAPI schema.
344
+ */
345
+ const boundedInt = (max) => zod_1.z.number().int().nonnegative().max(max);
346
+ /** A non-negative integer counter since the node process started. */
347
+ const vitalsCounter = boundedInt(MAX_VITALS_COUNTER);
348
+ /** A short, version-shaped string: letters, digits, spaces and `. + - _ ( ) ~`. */
349
+ const vitalsVersion = zod_1.z
350
+ .string()
351
+ .trim()
352
+ .min(1)
353
+ .max(MAX_VITALS_VERSION_LENGTH)
354
+ .regex(/^[0-9A-Za-z .+\-_()~]+$/, 'Must be a version string');
355
+ /**
356
+ * Cumulative counters since the node process started; reset on restart.
357
+ *
358
+ * @stability experimental
359
+ */
360
+ exports.nodeVitalsCountersSchema = zod_1.z
361
+ .object({
362
+ /** Claim calls that returned at least one job. */
363
+ claims: vitalsCounter.optional(),
364
+ /** Claim calls that returned none. */
365
+ emptyPolls: vitalsCounter.optional(),
366
+ /** Claim calls that failed. */
367
+ claimFailures: vitalsCounter.optional(),
368
+ /** Jobs this process completed. */
369
+ succeeded: vitalsCounter.optional(),
370
+ /** Jobs this process reported failed. */
371
+ failed: vitalsCounter.optional(),
372
+ /** Jobs this process reported rate-limited. */
373
+ rateLimited: vitalsCounter.optional(),
374
+ /** Lease renewals that succeeded. */
375
+ leaseRenewals: vitalsCounter.optional(),
376
+ /** Lease renewals that failed. */
377
+ leaseRenewFailures: vitalsCounter.optional(),
378
+ /** Heartbeats that failed. */
379
+ heartbeatFailures: vitalsCounter.optional(),
380
+ /** Times the job watchdog killed a stuck job. */
381
+ watchdogTrips: vitalsCounter.optional(),
382
+ })
383
+ .strict();
384
+ /**
385
+ * App-defined numeric vitals: a bounded bag of `key -> number` an executor or
386
+ * the node's app reports beyond the closed fields (a transcoder's frames per
387
+ * second, a GPU's temperature). Still CLOSED IN SHAPE: at most
388
+ * {@link MAX_NODE_VITALS_EXTRA_KEYS} keys, each key matching
389
+ * {@link NODE_VITALS_EXTRA_KEY_PATTERN}, each value a finite number within
390
+ * +/-{@link MAX_NODE_VITALS_EXTRA_VALUE}. No strings, no nesting, so it stays
391
+ * the unbounded-JSONB-write-free surface the closed fields are. The CLI drops
392
+ * what would not pass before sending (a heartbeat the server refuses costs the
393
+ * node its liveness signal), and the fleet page labels a key through
394
+ * `registerNodeVital`.
395
+ *
396
+ * @stability experimental
397
+ */
398
+ exports.nodeVitalsExtraSchema = zod_1.z
399
+ .record(zod_1.z.string().regex(constants_js_1.NODE_VITALS_EXTRA_KEY_PATTERN, 'Must be a vital key'), zod_1.z.number().min(-constants_js_1.MAX_NODE_VITALS_EXTRA_VALUE).max(constants_js_1.MAX_NODE_VITALS_EXTRA_VALUE))
400
+ .refine((extra) => Object.keys(extra).length <= constants_js_1.MAX_NODE_VITALS_EXTRA_KEYS, {
401
+ message: `At most ${constants_js_1.MAX_NODE_VITALS_EXTRA_KEYS} extra vitals`,
402
+ });
403
+ /**
404
+ * Machine-level (host) readings, sent only to a server that advertised
405
+ * {@link NODE_SERVER_CAPABILITY_HOST_VITALS}. Every field optional, closed and
406
+ * bounded; `cpuPercent` here is SYSTEM-wide (0..100), unlike the process-level
407
+ * `cpuPercent` on the vitals object.
408
+ *
409
+ * @stability experimental
410
+ */
411
+ exports.nodeHostVitalsSchema = zod_1.z
412
+ .object({
413
+ /** System-wide CPU utilisation over the last interval, 0..100. */
414
+ cpuPercent: zod_1.z.number().min(0).max(100).optional(),
415
+ /** Logical CPU count. */
416
+ cpuCount: zod_1.z.number().int().min(1).max(4096).optional(),
417
+ /** 1-minute load average. */
418
+ loadAvg1: zod_1.z.number().min(0).max(10_000).optional(),
419
+ /** 5-minute load average. */
420
+ loadAvg5: zod_1.z.number().min(0).max(10_000).optional(),
421
+ /** 15-minute load average. */
422
+ loadAvg15: zod_1.z.number().min(0).max(10_000).optional(),
423
+ /** Total physical memory, in bytes. */
424
+ memTotalBytes: boundedInt(MAX_VITALS_MEMORY_BYTES).optional(),
425
+ /** Free physical memory, in bytes. */
426
+ memFreeBytes: boundedInt(MAX_VITALS_MEMORY_BYTES).optional(),
427
+ /** Memory available to new work (reclaimable included), in bytes. */
428
+ memAvailableBytes: boundedInt(MAX_VITALS_MEMORY_BYTES).optional(),
429
+ /** The OS release string. */
430
+ osRelease: zod_1.z.string().max(128).optional(),
431
+ /** The CPU architecture (`x64`, `arm64`). */
432
+ arch: zod_1.z.string().max(32).optional(),
433
+ /** Seconds since the machine booted. */
434
+ uptimeSeconds: boundedNumber(MAX_VITALS_UPTIME_SECONDS).optional(),
435
+ })
436
+ .strict();
437
+ /**
438
+ * Power state of the machine the node runs on.
439
+ *
440
+ * @stability experimental
441
+ */
442
+ exports.nodePowerSchema = zod_1.z
443
+ .object({
444
+ /** Where power comes from. */
445
+ source: zod_1.z.enum(constants_js_1.NODE_POWER_SOURCES),
446
+ /** Battery charge, 0..100. */
447
+ batteryPercent: zod_1.z.number().min(0).max(100).optional(),
448
+ /** Whether the battery is charging. */
449
+ charging: zod_1.z.boolean().optional(),
450
+ /** Estimated seconds of battery left (at most 7 days). */
451
+ timeRemainingSeconds: zod_1.z.number().int().min(0).max(MAX_POWER_TIME_REMAINING_SECONDS).optional(),
452
+ /** Whether the OS low-power / battery-saver mode is on. */
453
+ lowPowerMode: zod_1.z.boolean().optional(),
454
+ })
455
+ .strict();
456
+ /**
457
+ * A node's health snapshot, carried on its heartbeat; closed and bounded.
458
+ *
459
+ * @stability experimental
460
+ */
461
+ exports.nodeVitalsSchema = zod_1.z
462
+ .object({
463
+ /** Process CPU over the last interval; 100 = one full core. */
464
+ cpuPercent: boundedNumber(MAX_VITALS_CPU_PERCENT).optional(),
465
+ /** Resident set size of the node process, in bytes. */
466
+ rssBytes: boundedInt(MAX_VITALS_MEMORY_BYTES).optional(),
467
+ /** V8 heap in use, in bytes. */
468
+ heapUsedBytes: boundedInt(MAX_VITALS_MEMORY_BYTES).optional(),
469
+ /** V8 heap limit, in bytes. */
470
+ heapLimitBytes: boundedInt(MAX_VITALS_MEMORY_BYTES).optional(),
471
+ /** p99 event-loop delay over the last interval, in milliseconds. */
472
+ eventLoopDelayP99Ms: boundedNumber(MAX_VITALS_EVENT_LOOP_DELAY_MS).optional(),
473
+ /** Free/total bytes on the filesystem holding the node's state directory. */
474
+ stateDirFreeBytes: boundedNumber(MAX_VITALS_DISK_BYTES).optional(),
475
+ /** Total bytes of that filesystem. */
476
+ stateDirTotalBytes: boundedNumber(MAX_VITALS_DISK_BYTES).optional(),
477
+ /** Job slots in use / available. Bounded by the same ceiling as `concurrency`. */
478
+ slotsUsed: boundedInt(constants_js_1.MAX_NODE_CONCURRENCY).optional(),
479
+ /** Job slots available. */
480
+ slotsTotal: boundedInt(constants_js_1.MAX_NODE_CONCURRENCY).optional(),
481
+ /** Seconds since the node process started. */
482
+ uptimeSeconds: boundedNumber(MAX_VITALS_UPTIME_SECONDS).optional(),
483
+ /** Cumulative counters since the process started. */
484
+ counters: exports.nodeVitalsCountersSchema.optional(),
485
+ /** The node CLI's version. */
486
+ cliVersion: vitalsVersion.optional(),
487
+ /** The Node.js runtime version. */
488
+ nodeVersion: vitalsVersion.optional(),
489
+ /** The `pg_dump` version banner, when the node has one. */
490
+ pgDumpVersion: vitalsVersion.optional(),
491
+ /** App-defined numeric vitals; see {@link nodeVitalsExtraSchema}. */
492
+ extra: exports.nodeVitalsExtraSchema.optional(),
493
+ /** Machine-level readings (server feature `node_host_vitals`). */
494
+ host: exports.nodeHostVitalsSchema.optional(),
495
+ /** Power / battery state (server feature `node_host_vitals`). */
496
+ power: exports.nodePowerSchema.optional(),
497
+ })
498
+ .strict();
499
+ // =============================================================================
500
+ // Node events (heartbeat `events`)
501
+ // =============================================================================
502
+ /**
503
+ * Event types the platform's CLI emits. The `type` field itself stays an OPEN
504
+ * dotted string (an app's node may report its own); these are only the names
505
+ * the platform knows how to label.
506
+ *
507
+ * @stability experimental
508
+ */
509
+ exports.NODE_EVENT_TYPES = {
510
+ /** The machine switched between AC and battery. */
511
+ POWER_SOURCE_CHANGED: 'power.source_changed',
512
+ /** The battery fell to the low threshold while on battery. */
513
+ BATTERY_LOW: 'power.battery_low',
514
+ /** The battery fell to the critical threshold while on battery. */
515
+ BATTERY_CRITICAL: 'power.battery_critical',
516
+ /** The battery recovered above the low threshold (or AC returned). */
517
+ BATTERY_RECOVERED: 'power.battery_recovered',
518
+ /** The machine woke from sleep. */
519
+ SLEEP_RESUMED: 'node.sleep_resumed',
520
+ /** The free space of the state directory fell below the threshold. */
521
+ DISK_LOW: 'node.disk_low',
522
+ };
523
+ /**
524
+ * Most events one heartbeat may carry.
525
+ *
526
+ * @stability experimental
527
+ */
528
+ exports.MAX_NODE_EVENTS_PER_HEARTBEAT = 50;
529
+ /**
530
+ * Most attribute keys on one event.
531
+ *
532
+ * @stability experimental
533
+ */
534
+ exports.MAX_NODE_EVENT_ATTRS = 16;
535
+ /**
536
+ * One event a node observed about itself (power change, low battery, wake from
537
+ * sleep). `at` is the node's clock and is display-only; the server stamps its
538
+ * own `receivedAt`.
539
+ *
540
+ * @stability experimental
541
+ */
542
+ exports.nodeEventSchema = zod_1.z
543
+ .object({
544
+ /** A dotted lower-case type, e.g. `power.battery_low`. Open, not an enum. */
545
+ type: zod_1.z
546
+ .string()
547
+ .max(64)
548
+ .regex(/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/, 'Must be a dotted event type'),
549
+ /** How loud it is. */
550
+ severity: zod_1.z.enum(constants_js_1.NODE_EVENT_SEVERITIES),
551
+ /** When it happened, on the node's clock (ISO 8601). */
552
+ at: zod_1.z.iso.datetime({ offset: true }),
553
+ /** Small scalar attributes. */
554
+ attrs: zod_1.z
555
+ .record(zod_1.z.string().max(64), zod_1.z.union([zod_1.z.string().max(256), zod_1.z.number(), zod_1.z.boolean()]))
556
+ .refine((attrs) => Object.keys(attrs).length <= exports.MAX_NODE_EVENT_ATTRS, {
557
+ message: `At most ${exports.MAX_NODE_EVENT_ATTRS} attributes`,
558
+ })
559
+ .optional(),
560
+ })
561
+ .strict();
562
+ // =============================================================================
563
+ // POST /nodes/register
564
+ // =============================================================================
565
+ /**
566
+ * The body of `POST /api/nodes/register`.
567
+ *
568
+ * @stability experimental
569
+ */
570
+ exports.registerNodeSchema = zod_1.z.object({
571
+ /**
572
+ * THE IDENTITY HALF OF `@@unique([createdById, name])`. Two registrations
573
+ * with the same name from the same owner are the SAME node — see
574
+ * `NodesService.register`. This is why a node's name belongs in its config
575
+ * file rather than being generated at startup: a generated name makes every
576
+ * container restart a new node row.
577
+ */
578
+ name: zod_1.z.string().trim().min(1, 'Name is required').max(constants_js_1.MAX_NODE_CREDENTIAL_NAME_LENGTH, 'Name must be 100 characters or less'),
579
+ /** The machine's hostname, as the node reports it. */
580
+ hostname: zod_1.z.string().trim().min(1).max(255),
581
+ /** The OS and architecture (`linux-x64`). */
582
+ platform: zod_1.z.string().trim().min(1).max(100),
583
+ /** The node CLI's version. */
584
+ cliVersion: zod_1.z.string().trim().min(1).max(50),
585
+ /**
586
+ * The job types this node can run. An EMPTY LIST IS LEGAL and means "I can
587
+ * run nothing yet" — a node that registers before its handlers are
588
+ * configured is a real state, and refusing it would push the operator
589
+ * toward declaring a type the node cannot actually execute.
590
+ */
591
+ eligibleTypes: zod_1.z.array(jobType).max(constants_js_1.MAX_NODE_ELIGIBLE_TYPES).default([]),
592
+ /** How many jobs the node runs at once, 1 to `MAX_NODE_CONCURRENCY`. */
593
+ concurrency: zod_1.z
594
+ .number()
595
+ .int('Concurrency must be a whole number')
596
+ .min(1, 'Concurrency must be at least 1')
597
+ .max(constants_js_1.MAX_NODE_CONCURRENCY, `Concurrency must be at most ${constants_js_1.MAX_NODE_CONCURRENCY}`),
598
+ /** The node's self-reported capability bag (open JSON, shown on the fleet page). */
599
+ capabilities: capabilities.optional(),
600
+ });
601
+ /**
602
+ * The server features a register response may advertise in `serverFeatures`.
603
+ * A node sends an optional capability only when the server named it; an older
604
+ * server sends no list at all.
605
+ *
606
+ * @stability experimental
607
+ */
608
+ exports.NODE_SERVER_CAPABILITY_HOST_VITALS = 'node_host_vitals';
609
+ /**
610
+ * The register response's feature advertisement. The rest of the response
611
+ * (`node`, `reattached`) is the API's DTO; this schema names only the field the
612
+ * contract owns, so it is `.passthrough()`.
613
+ *
614
+ * @stability experimental
615
+ */
616
+ exports.registerNodeResponseSchema = zod_1.z
617
+ .object({
618
+ /** Optional server features (see {@link NODE_SERVER_CAPABILITY_HOST_VITALS}). */
619
+ serverFeatures: zod_1.z.array(zod_1.z.string().max(64)).max(32).optional(),
620
+ })
621
+ .passthrough();
622
+ // =============================================================================
623
+ // POST /nodes/:id/heartbeat
624
+ // =============================================================================
625
+ /**
626
+ * The body of `POST /api/nodes/:id/heartbeat`.
627
+ *
628
+ * @stability experimental
629
+ */
630
+ exports.heartbeatNodeSchema = zod_1.z.object({
631
+ /**
632
+ * The two states a node may report ABOUT ITSELF. `draining` and `disabled`
633
+ * are absent on purpose — see the file header.
634
+ */
635
+ status: zod_1.z.enum(['online', 'offline']).optional(),
636
+ /**
637
+ * A runtime concurrency change (`appctl node set-concurrency`), which the
638
+ * NEXT claim reads live off the row. This is the whole reason the claim
639
+ * endpoint re-reads the node rather than trusting a value captured at
640
+ * registration.
641
+ */
642
+ concurrency: zod_1.z.number().int().min(1).max(constants_js_1.MAX_NODE_CONCURRENCY).optional(),
643
+ /** A replacement capability bag, when it changed. */
644
+ capabilities: capabilities.optional(),
645
+ /**
646
+ * A health snapshot (#604), stored as `lastVitals` with a server-stamped
647
+ * `lastVitalsAt`. OMITTED leaves the stored snapshot untouched, which is
648
+ * what every node that predates vitals sends. See "Vitals" above.
649
+ */
650
+ vitals: exports.nodeVitalsSchema.optional(),
651
+ /**
652
+ * Events observed since the last heartbeat (power, sleep, disk). Sent only
653
+ * when the server advertised `node_host_vitals` at registration.
654
+ */
655
+ events: zod_1.z.array(exports.nodeEventSchema).max(exports.MAX_NODE_EVENTS_PER_HEARTBEAT).optional(),
656
+ });
657
+ // =============================================================================
658
+ // POST /nodes/:id/claim
659
+ // =============================================================================
660
+ /**
661
+ * The body of `POST /api/nodes/:id/claim`.
662
+ *
663
+ * @stability experimental
664
+ */
665
+ exports.claimJobsSchema = zod_1.z.object({
666
+ /**
667
+ * Which of the node's own types it wants right now — a node with free
668
+ * slots for one type and none for another. OMITTED means "anything I
669
+ * declared", which is the common case.
670
+ *
671
+ * NARROWING ONLY. `NodesService.claimJobs` intersects this with the row's
672
+ * `eligibleTypes`; a type here that the node never registered is dropped,
673
+ * not honoured.
674
+ */
675
+ types: zod_1.z.array(jobType).max(constants_js_1.MAX_NODE_ELIGIBLE_TYPES).optional(),
676
+ /**
677
+ * How many rows to take. CLAMPED DOWN to the node's declared
678
+ * `concurrency`; a larger number is not an error, it is simply capped —
679
+ * a node asking for more than it declared is describing free slots it does
680
+ * not have, and refusing the whole call would stall a fleet over an
681
+ * arithmetic disagreement.
682
+ */
683
+ limit: zod_1.z.number().int().min(1).max(constants_js_1.MAX_NODE_CONCURRENCY).optional(),
684
+ });
685
+ // =============================================================================
686
+ // POST /nodes/:id/jobs/:jobId/renew
687
+ // =============================================================================
688
+ /**
689
+ * ⚠ THIS BODY EXISTS TO CARRY ONE OPTIONAL FIELD, AND IT MUST SURVIVE HAVING
690
+ * NO BODY AT ALL (#364).
691
+ *
692
+ * Until this change the renew route took no body, so every node in every fleet
693
+ * posts to it with no payload and no `Content-Type` — Fastify hands Nest
694
+ * `undefined`, and a bare `z.object({...})` would reject that outright and
695
+ * fail every renewal from every node that has not been upgraded yet. `.default({})`
696
+ * is what makes "no body" parse to "no assertion", which is the pre-#364
697
+ * behaviour spelled as data. It is the only reason this is a `ZodDefault` and
698
+ * not a plain object schema; do not unwrap it.
699
+ *
700
+ * REJECTED: coercing a `null` body to `{}` as well. That would quietly turn
701
+ * "I assert this row has no token" into "I assert nothing", and those are
702
+ * different statements at the `where` clause (see `claimToken` above).
703
+ *
704
+ * @stability experimental
705
+ */
706
+ exports.renewLeaseSchema = zod_1.z
707
+ .object({
708
+ /** Which claim of the job is asking (`claimTokenField`). */
709
+ claimToken: claimToken.optional(),
710
+ })
711
+ .default({});
712
+ // =============================================================================
713
+ // POST /nodes/:id/jobs/:jobId/result
714
+ // =============================================================================
715
+ /**
716
+ * The body of `POST /api/nodes/:id/jobs/:jobId/result`.
717
+ *
718
+ * @stability experimental
719
+ */
720
+ exports.nodeJobResultSchema = zod_1.z.object({
721
+ /**
722
+ * The job type this result is FOR, checked against the row's own `type`
723
+ * before anything is parsed or persisted.
724
+ *
725
+ * It is redundant with the row — which is the point. A node holding two
726
+ * jobs at once and crossing their ids would otherwise post job A's result
727
+ * against job B, and the only thing standing between that and a persisted,
728
+ * plausible, permanently wrong row would be whether B's schema happened to
729
+ * reject A's payload. Two IDs agreeing is a coincidence; an id and a type
730
+ * agreeing is a statement.
731
+ */
732
+ type: jobType,
733
+ /**
734
+ * The computed result, UNVALIDATED at this layer on purpose.
735
+ *
736
+ * The real validation is `handler.nodeResultSchema`, resolved per job type
737
+ * at runtime and applied manually in `NodesService.submitResult` — the
738
+ * global Zod pipe cannot do it, because which schema applies is not known
739
+ * until the job row has been read. Typing it `unknown` here rather than
740
+ * `Record<string, unknown>` also keeps a handler free to accept a bare
741
+ * array or scalar result if that is what its work produces.
742
+ */
743
+ result: zod_1.z.unknown(),
744
+ /**
745
+ * WHICH CLAIM computed this result — see `claimToken` above.
746
+ *
747
+ * It matters MORE here than on renew, not less: a stale slot's renewal only
748
+ * delays the reaper, while a stale slot's RESULT settles a job its own later
749
+ * claim is still running, persisting output computed against an earlier
750
+ * attempt over a newer run. Optional for the same rolling-upgrade reason.
751
+ */
752
+ claimToken: claimToken.optional(),
753
+ });
754
+ // =============================================================================
755
+ // POST /nodes/:id/jobs/:jobId/failure
756
+ // =============================================================================
757
+ /**
758
+ * The body of `POST /api/nodes/:id/jobs/:jobId/failure`.
759
+ *
760
+ * @stability experimental
761
+ */
762
+ exports.nodeJobFailureSchema = zod_1.z.object({
763
+ /** What went wrong, in the words that will appear in `Job.lastError`. */
764
+ error: zod_1.z.string().trim().min(1, 'An error message is required').max(MAX_ERROR_LENGTH),
765
+ /**
766
+ * "A provider throttled me." Treated IDENTICALLY to a `RateLimitError`
767
+ * thrown by an in-process handler — see `job-terminal.service.ts`'s header
768
+ * on why a flag and a throw must reach the same conclusion.
769
+ */
770
+ rateLimited: zod_1.z.boolean().optional(),
771
+ /** A provider-requested delay in milliseconds; a FLOOR on the backoff, not an override. */
772
+ retryAfterMs: zod_1.z
773
+ .number()
774
+ .int()
775
+ .min(0)
776
+ // One day. Past this, a "retry after" is a bug in whatever produced it,
777
+ // and honouring it would park a job for longer than most deployments
778
+ // keep their history.
779
+ .max(86_400_000)
780
+ .optional(),
781
+ /**
782
+ * ADVISORY ONLY, and accepted only so a node can say what it believes.
783
+ * The server's attempt budget decides; see the file header.
784
+ */
785
+ willRetry: zod_1.z.boolean().optional(),
786
+ /**
787
+ * WHICH CLAIM failed — see `claimToken` above.
788
+ *
789
+ * Threaded here as well as on `result` because a failure is just as terminal:
790
+ * an old slot reporting "boom" settles the row (or charges an attempt against
791
+ * it) while a newer claim of the same job is still running fine. Optional for
792
+ * the same rolling-upgrade reason.
793
+ */
794
+ claimToken: claimToken.optional(),
795
+ });
796
+ // -----------------------------------------------------------------------------
797
+ // From node-data-plane.dto.ts: The data plane's request and response bodies (issue #269, epic #254)
798
+ // -----------------------------------------------------------------------------
799
+ // =============================================================================
800
+ // The data plane's request and response bodies (issue #269, epic #254)
801
+ // =============================================================================
802
+ //
803
+ // #268 gave a node a CONTROL plane: claim a job, renew its lease, report an
804
+ // outcome. What it could not do was read a single byte or write one, because
805
+ // a node holds no storage credentials — by design, and permanently. These
806
+ // bodies are the whole of the answer.
807
+ //
808
+ // -----------------------------------------------------------------------------
809
+ // THE SHAPE OF THE SOLUTION, AND THE TWO ALTERNATIVES IT BEATS
810
+ // -----------------------------------------------------------------------------
811
+ //
812
+ // The server mints a SHORT-LIVED, SINGLE-OBJECT signed URL and the node talks
813
+ // to the storage provider directly. Bytes never pass through the API.
814
+ //
815
+ // REJECTED: PROXYING BYTES THROUGH THE API (`GET /nodes/:id/jobs/:jobId/input`
816
+ // streaming the object, `POST …/output` accepting it). It is the smallest
817
+ // diff and it is the worst outcome. Every byte of every job would cross the
818
+ // API process twice — once in, once out — so the API's memory, its event loop
819
+ // and its egress bill become a function of how much work the FLEET is doing,
820
+ // which is the exact coupling a worker node exists to remove. A ten-node fleet
821
+ // hashing 1 GB objects would saturate the API before it saturated anything
822
+ // that was actually computing. It also puts long-lived streaming connections
823
+ // on the same process that serves interactive requests, so one large transfer
824
+ // degrades every page load, and a node on a slow link holds a request open for
825
+ // minutes against every timeout in the stack (Nginx, Fastify, the platform's
826
+ // load balancer) — each of which would have to be raised, for everyone.
827
+ //
828
+ // REJECTED: GIVING NODES STORAGE CREDENTIALS. Also small, also worse. A
829
+ // credential handed to a node is a bucket-wide capability sitting in a config
830
+ // file on a machine this deployment may not own, for as long as that machine
831
+ // exists — it does not expire when the job ends, it is not scoped to one
832
+ // object, and it cannot be revoked without rotating it for every other holder.
833
+ // A node compromised on Tuesday can read every object in the bucket on
834
+ // Friday. The signed URL below is the same capability reduced along three
835
+ // axes at once: ONE object, ONE verb, and MINUTES. Nothing has to be rotated
836
+ // when a node is decommissioned, because a decommissioned node holds nothing.
837
+ //
838
+ // -----------------------------------------------------------------------------
839
+ // ⚠ THE SERVER CHOOSES THE UPLOAD KEY. THE NODE NEVER DOES.
840
+ // -----------------------------------------------------------------------------
841
+ //
842
+ // REJECTED: `{ key: "outputs/my-thing.bin" }` in the upload request. A signed
843
+ // PUT is an unconditional overwrite of exactly the key it was signed for, so a
844
+ // key taken from the request body is a write primitive over the entire bucket,
845
+ // handed to the least trustworthy participant. `../../etc/config.json`,
846
+ // `uploads/<someone-else's-object>` and the storage key of any row in
847
+ // `storage_objects` are all just strings, and the provider will not object to
848
+ // any of them: S3 keys are opaque, `..` is not special, and there is no
849
+ // filesystem to refuse the traversal. The damage is silent — a job that
850
+ // "succeeded" while overwriting another user's file.
851
+ //
852
+ // The key is therefore derived server-side from the job id and a fresh UUID
853
+ // (`NodeDataPlaneService.createUploadTarget`), and a node-supplied one is
854
+ // REFUSED rather than silently ignored. Both are safe; the difference is what
855
+ // the node's author learns. Ignoring means their `key` field vanishes without
856
+ // a word: the upload succeeds, the bytes land somewhere they did not choose,
857
+ // and their code goes on referring to a path with nothing at it. That bug is
858
+ // found days later by a person, not minutes later by a machine. A `400` naming
859
+ // the field is found on the first run, by the person who just wrote it, and it
860
+ // costs a correct client exactly nothing — no legitimate node ever sends the
861
+ // field.
862
+ // =============================================================================
863
+ /**
864
+ * Cap on a node-declared `Content-Type`.
865
+ *
866
+ * It ends up in a signed header, so it is bounded for the same reason every
867
+ * other node-supplied string in this folder is: it arrives from a machine
868
+ * this deployment may not own.
869
+ */
870
+ const MAX_CONTENT_TYPE_LENGTH = 255;
871
+ // =============================================================================
872
+ // POST /nodes/:id/jobs/:jobId/download-url
873
+ // =============================================================================
874
+ //
875
+ // ONE FIELD, AND IT IS NOT A REQUEST FOR ANYTHING. This body had none at all
876
+ // until #364, and the distinction that let it acquire one is worth stating,
877
+ // because it is what keeps the next field out: `claimToken` does not ask the
878
+ // server for a different URL, a longer expiry or a different object. It
879
+ // answers "who is asking" — an ASSERTION about which claim of this job the
880
+ // caller is, checked against the row and never used to compute anything. A
881
+ // field that changed what came back would still be refused.
882
+ //
883
+ // So what has NOT changed: the server decides WHICH bytes (the job's
884
+ // `subjectId`, resolved server-side) and FOR HOW LONG. A DTO whose only field
885
+ // was `expiresIn` was considered and dropped for the same reason a
886
+ // node-supplied lease was dropped in #268 — the bound exists to limit the
887
+ // blast radius of a leaked URL, so the party the bound protects against does
888
+ // not get to set it.
889
+ //
890
+ // It is a POST rather than a GET even though it reads nothing, because it
891
+ // MINTS A CREDENTIAL. A GET's URL is the thing every layer between here and
892
+ // the node writes down — proxy access logs, browser history, a CDN cache key,
893
+ // an APM trace's endpoint label — and a response body containing a bearer URL
894
+ // has no business being cacheable by anything. POST is uncacheable by default
895
+ // and carries no such expectation.
896
+ /**
897
+ * What a node may say when asking to read its input: which claim is asking,
898
+ * and nothing else.
899
+ *
900
+ * ⚠ `.default({})` IS THE BACKWARD-COMPATIBILITY GUARANTEE, not a convenience.
901
+ * This route took no body at all until #364, so every node in every fleet
902
+ * posts to it with no payload and no `Content-Type` — Fastify hands Nest
903
+ * `undefined`, and a bare `z.object({...})` would reject that outright and
904
+ * fail every download from every node that has not been upgraded yet. The
905
+ * default is what makes "no body" parse to "no assertion", which is the
906
+ * pre-#364 behaviour spelled as data. Do not unwrap it. `nodeUploadUrlSchema`
907
+ * below and `nodeJobSecretRequestSchema` carry it for the milder version of
908
+ * the same reason — there, an empty body was always legal.
909
+ *
910
+ * A plain object rather than the `z.looseObject` its sibling uses: unknown
911
+ * keys here are stripped, exactly as they were ignored before this body
912
+ * existed. The loose-then-refuse-by-name treatment next door exists for `key`,
913
+ * a field whose silent omission would send a node's bytes somewhere it did not
914
+ * choose; nothing a node can put in THIS body has ever had an effect, so there
915
+ * is no misunderstanding to name.
916
+ *
917
+ * @stability experimental
918
+ */
919
+ exports.nodeDownloadUrlSchema = zod_1.z
920
+ .object({
921
+ /** Which claim of the job is asking (`claimTokenField`). */
922
+ claimToken: exports.claimTokenField.optional(),
923
+ })
924
+ .default({});
925
+ // =============================================================================
926
+ // POST /nodes/:id/jobs/:jobId/upload-url
927
+ // =============================================================================
928
+ /**
929
+ * What a node may say when asking for somewhere to write.
930
+ *
931
+ * ⚠ `z.looseObject` RATHER THAN `z.strictObject`, AND THE REASON IS THE ERROR
932
+ * MESSAGE. Strict mode rejects an unknown key with a perfectly good Zod issue
933
+ * naming it — and that issue is then DESTROYED on the way out, because
934
+ * `http-exception.filter.ts` rebuilds every error body from a fixed key
935
+ * allowlist (`message`, `code`, `details`) and the validation pipe puts its
936
+ * issues under `errors`. The node would receive a bare
937
+ * `400 "Validation failed"`, which for the one field this endpoint most needs
938
+ * to talk about — `key` — is the least useful answer available.
939
+ *
940
+ * So unknown keys are CAPTURED here and refused in
941
+ * `NodeDataPlaneService.createUploadTarget`, which can raise a
942
+ * `BadRequestException` carrying a message that names the field, explains that
943
+ * the server chooses the key, and survives the filter intact. The security
944
+ * outcome is identical either way (the key is never read); what differs is
945
+ * whether the node's author is told why.
946
+ *
947
+ * `.default({})` so a node with nothing to declare may send an EMPTY BODY
948
+ * rather than being required to send `{}` to satisfy a parser.
949
+ *
950
+ * @stability experimental
951
+ */
952
+ exports.nodeUploadUrlSchema = zod_1.z
953
+ .looseObject({
954
+ /**
955
+ * The `Content-Type` the node will send on its PUT.
956
+ *
957
+ * ⚠ IT BECOMES PART OF THE SIGNATURE. A node that declares it MUST send
958
+ * exactly this header, or the provider answers `SignatureDoesNotMatch` —
959
+ * an error that names the signature and not the header that broke it. A
960
+ * node that is unsure should omit it and send whatever it likes.
961
+ */
962
+ contentType: zod_1.z
963
+ .string()
964
+ .trim()
965
+ .min(1)
966
+ .max(MAX_CONTENT_TYPE_LENGTH)
967
+ .optional(),
968
+ /**
969
+ * WHICH CLAIM is asking for somewhere to write — see
970
+ * `claim-token.field.ts`.
971
+ *
972
+ * ⚠ THE SHARPEST OF THE SIX ROUTES THAT CARRY THIS, and the quietest if it
973
+ * is missing. Since #348 a type may derive its output key from the JOB
974
+ * (`deriveOutputKey`), so the key is a function of the row and not of the
975
+ * claim — which means a node's stale worker slot asking here is handed a
976
+ * signed PUT for the EXACT key its own later claim is currently writing.
977
+ * Both PUTs answer 200, the surviving bytes are whichever landed last, and
978
+ * nothing in any log ties the two together. The token is what refuses the
979
+ * first slot before the URL is minted.
980
+ *
981
+ * ⚠ IT IS ALSO A PERMITTED FIELD, which is not automatic here:
982
+ * `NodeDataPlaneService.rejectCallerSuppliedFields` refuses anything
983
+ * outside its allowlist by name, so adding a field to this schema without
984
+ * adding it there would 400 every upgraded node. The allowlist is the
985
+ * authority; this schema only describes.
986
+ */
987
+ claimToken: exports.claimTokenField.optional(),
988
+ })
989
+ .default({});
990
+ // -----------------------------------------------------------------------------
991
+ // From node-job-secret.dto.ts: The per-job secret request and response bodies (issue #349, epic #345)
992
+ // -----------------------------------------------------------------------------
993
+ // =============================================================================
994
+ // The per-job secret request and response bodies (issue #349, epic #345)
995
+ // =============================================================================
996
+ //
997
+ // #269 gave a node a way to move BYTES with no storage credentials. This gives
998
+ // it a way to hold a CREDENTIAL for exactly one job, for exactly as long as it
999
+ // holds that job's lease. `job-secret-broker.ts` carries the argument for why
1000
+ // the credential is brokered per job at all, and what the three rejected
1001
+ // alternatives were; this file is about the wire shape, which has two
1002
+ // properties worth stating on their own.
1003
+ //
1004
+ // -----------------------------------------------------------------------------
1005
+ // ⚠ THE REQUEST BODY ASKS FOR NOTHING, AND ANY FIELD THAT DOES IS A 400
1006
+ // -----------------------------------------------------------------------------
1007
+ //
1008
+ // Everything the server needs is already on the path (which node) and in the
1009
+ // row (which job, which type, which broker, which lease). There is nothing a
1010
+ // node could usefully ASK FOR — and, far more importantly, nothing it is
1011
+ // ALLOWED to ask for: A NODE MAY NOT REQUEST A SECRET IT WAS NOT ASSIGNED. A
1012
+ // `kind`, a `scope`, a `database`, a `ttl` in the body would each be a node
1013
+ // choosing some part of a credential's shape, and every one of those is the
1014
+ // server's choice derived from the job the node is holding.
1015
+ //
1016
+ // ⚠ `claimToken` (#364) IS THE ONE PERMITTED FIELD, AND IT IS NOT AN EXCEPTION
1017
+ // TO THAT RULE — it is the rule applied to a different question. Every field
1018
+ // above asks the server for something; this one ANSWERS something: which claim
1019
+ // of this job is asking. It changes nothing about the credential — not its
1020
+ // kind, not its scope, not its lifetime, all of which are still derived from
1021
+ // the row — and the only thing it can do is get the request REFUSED, which is
1022
+ // the whole point. Without it, the ambiguity this route is most exposed to is
1023
+ // also its worst: `claimedByNodeId` cannot tell a node's stalled, reaped slot
1024
+ // from the slot that re-claimed the job, so the stale one is handed a LIVE
1025
+ // DATABASE CREDENTIAL, bounded by a lease belonging to a claim that is not its
1026
+ // own. A field that can only ever narrow who may be answered is the one shape
1027
+ // of field this body can safely grow.
1028
+ //
1029
+ // So the refusal is the same one `NodeUploadUrlDto` makes about `key`, applied
1030
+ // to a body that permits nothing a node could ask for — including the `ttl`
1031
+ // case, which
1032
+ // is the one somebody will genuinely want. A node-chosen lifetime is refused
1033
+ // for the reason #268 refused a node-chosen lease: the bound exists to limit
1034
+ // the blast radius of a leaked credential, so the party the bound protects
1035
+ // against does not get to set it. The credential is bounded by the job's lease,
1036
+ // which the node is already renewing (#347), and there is deliberately no
1037
+ // second clock.
1038
+ //
1039
+ // `z.looseObject`, NOT `z.strictObject`, and the reason is the error message —
1040
+ // the identical reasoning `node-data-plane.dto.ts` records. Strict mode's
1041
+ // perfectly good Zod issue is DESTROYED on the way out, because
1042
+ // `http-exception.filter.ts` rebuilds every error body from a fixed key
1043
+ // allowlist and the validation pipe files its issues under `errors`; the node
1044
+ // would receive a bare `400 "Validation failed"` naming nothing. Unknown keys
1045
+ // are therefore CAPTURED here and refused in `NodeSecretBrokerService`, which
1046
+ // can raise a message that names the field and survives the filter intact. The
1047
+ // security outcome is identical either way — no field a node ASKS with is ever
1048
+ // read, and the one field that is read (`claimToken`) is declared in the schema
1049
+ // rather than swept up as an unknown key — and what differs is whether the
1050
+ // node's author is told why.
1051
+ //
1052
+ // -----------------------------------------------------------------------------
1053
+ // POST, NOT GET, AND `Cache-Control: no-store`
1054
+ // -----------------------------------------------------------------------------
1055
+ //
1056
+ // The same reason `worker-nodes.md`, "Data plane", gives for the two data-plane
1057
+ // routes, and it applies harder here because what comes back is not a scoped,
1058
+ // minutes-long URL but a credential. A `GET`'s URL is what every layer between
1059
+ // the server and the node writes down — proxy access logs, a CDN cache key, an
1060
+ // APM trace's endpoint label — and a response body containing a credential has
1061
+ // no business being cacheable by anything. `POST` is uncacheable by default;
1062
+ // `no-store` says so out loud for the intermediary that decides to be clever
1063
+ // anyway.
1064
+ // =============================================================================
1065
+ /**
1066
+ * What a node may say when asking for its job's credential: which claim is
1067
+ * asking, and nothing else.
1068
+ *
1069
+ * `.default({})` so a node with nothing to declare may send an empty body
1070
+ * rather than being made to send `{}` to satisfy a parser — an empty body is
1071
+ * still a correct request, and is what every node sent before #364. Anything
1072
+ * beyond `claimToken` is captured by the loose object and refused by name in
1073
+ * the service, whose allowlist — not this schema — is the authority on what
1074
+ * may be sent; adding a field here without adding it there would 400 the
1075
+ * clients that send it.
1076
+ *
1077
+ * @stability experimental
1078
+ */
1079
+ exports.nodeJobSecretRequestSchema = zod_1.z
1080
+ .looseObject({
1081
+ /** WHICH CLAIM is asking — see `claim-token.field.ts` and the header above. */
1082
+ claimToken: exports.claimTokenField.optional(),
1083
+ })
1084
+ .default({});
1085
+ //# sourceMappingURL=schemas.js.map