monday-cli 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/CHANGELOG.md +324 -2
  2. package/README.md +128 -30
  3. package/dist/api/board-favorites.d.ts +329 -0
  4. package/dist/api/board-favorites.d.ts.map +1 -0
  5. package/dist/api/board-favorites.js +353 -0
  6. package/dist/api/board-favorites.js.map +1 -0
  7. package/dist/api/board-mutation-result.d.ts +9 -5
  8. package/dist/api/board-mutation-result.d.ts.map +1 -1
  9. package/dist/api/board-mutation-result.js +9 -5
  10. package/dist/api/board-mutation-result.js.map +1 -1
  11. package/dist/api/board-relation-validation.d.ts +161 -0
  12. package/dist/api/board-relation-validation.d.ts.map +1 -0
  13. package/dist/api/board-relation-validation.js +317 -0
  14. package/dist/api/board-relation-validation.js.map +1 -0
  15. package/dist/api/cache.d.ts +14 -5
  16. package/dist/api/cache.d.ts.map +1 -1
  17. package/dist/api/cache.js +8 -10
  18. package/dist/api/cache.js.map +1 -1
  19. package/dist/api/column-mapping.js +2 -2
  20. package/dist/api/column-mapping.js.map +1 -1
  21. package/dist/api/column-mutation-result.d.ts +9 -5
  22. package/dist/api/column-mutation-result.d.ts.map +1 -1
  23. package/dist/api/column-mutation-result.js +9 -5
  24. package/dist/api/column-mutation-result.js.map +1 -1
  25. package/dist/api/column-types.d.ts +26 -7
  26. package/dist/api/column-types.d.ts.map +1 -1
  27. package/dist/api/column-types.js +42 -3
  28. package/dist/api/column-types.js.map +1 -1
  29. package/dist/api/column-values.d.ts +228 -31
  30. package/dist/api/column-values.d.ts.map +1 -1
  31. package/dist/api/column-values.js +551 -124
  32. package/dist/api/column-values.js.map +1 -1
  33. package/dist/api/cross-board-search.d.ts +501 -0
  34. package/dist/api/cross-board-search.d.ts.map +1 -0
  35. package/dist/api/cross-board-search.js +547 -0
  36. package/dist/api/cross-board-search.js.map +1 -0
  37. package/dist/api/dev-conventions.d.ts +1038 -0
  38. package/dist/api/dev-conventions.d.ts.map +1 -0
  39. package/dist/api/dev-conventions.js +1556 -0
  40. package/dist/api/dev-conventions.js.map +1 -0
  41. package/dist/api/dry-run.d.ts +32 -5
  42. package/dist/api/dry-run.d.ts.map +1 -1
  43. package/dist/api/dry-run.js +149 -32
  44. package/dist/api/dry-run.js.map +1 -1
  45. package/dist/api/errors.d.ts.map +1 -1
  46. package/dist/api/errors.js +28 -7
  47. package/dist/api/errors.js.map +1 -1
  48. package/dist/api/group-mutation-result.d.ts +9 -5
  49. package/dist/api/group-mutation-result.d.ts.map +1 -1
  50. package/dist/api/group-mutation-result.js +9 -5
  51. package/dist/api/group-mutation-result.js.map +1 -1
  52. package/dist/api/item-history-projection.d.ts +919 -0
  53. package/dist/api/item-history-projection.d.ts.map +1 -0
  54. package/dist/api/item-history-projection.js +1104 -0
  55. package/dist/api/item-history-projection.js.map +1 -0
  56. package/dist/api/item-mutation-execute.d.ts +82 -0
  57. package/dist/api/item-mutation-execute.d.ts.map +1 -0
  58. package/dist/api/item-mutation-execute.js +199 -0
  59. package/dist/api/item-mutation-execute.js.map +1 -0
  60. package/dist/api/notifications.d.ts +156 -0
  61. package/dist/api/notifications.d.ts.map +1 -0
  62. package/dist/api/notifications.js +215 -0
  63. package/dist/api/notifications.js.map +1 -0
  64. package/dist/api/oauth-test-helper.d.ts +64 -0
  65. package/dist/api/oauth-test-helper.d.ts.map +1 -0
  66. package/dist/api/oauth-test-helper.js +179 -0
  67. package/dist/api/oauth-test-helper.js.map +1 -0
  68. package/dist/api/oauth.d.ts +198 -0
  69. package/dist/api/oauth.d.ts.map +1 -0
  70. package/dist/api/oauth.js +471 -0
  71. package/dist/api/oauth.js.map +1 -0
  72. package/dist/api/partial-success-bulk.d.ts +422 -0
  73. package/dist/api/partial-success-bulk.d.ts.map +1 -0
  74. package/dist/api/partial-success-bulk.js +378 -0
  75. package/dist/api/partial-success-bulk.js.map +1 -0
  76. package/dist/api/people.d.ts +54 -1
  77. package/dist/api/people.d.ts.map +1 -1
  78. package/dist/api/people.js +27 -3
  79. package/dist/api/people.js.map +1 -1
  80. package/dist/api/probes.d.ts +487 -0
  81. package/dist/api/probes.d.ts.map +1 -0
  82. package/dist/api/probes.js +881 -0
  83. package/dist/api/probes.js.map +1 -0
  84. package/dist/api/raw-document.d.ts.map +1 -1
  85. package/dist/api/raw-document.js +2 -2
  86. package/dist/api/raw-document.js.map +1 -1
  87. package/dist/api/raw-write.d.ts.map +1 -1
  88. package/dist/api/raw-write.js +11 -3
  89. package/dist/api/raw-write.js.map +1 -1
  90. package/dist/api/resolution-context.d.ts +23 -11
  91. package/dist/api/resolution-context.d.ts.map +1 -1
  92. package/dist/api/resolution-context.js +53 -12
  93. package/dist/api/resolution-context.js.map +1 -1
  94. package/dist/api/resolution-pass.d.ts +30 -1
  95. package/dist/api/resolution-pass.d.ts.map +1 -1
  96. package/dist/api/resolution-pass.js +36 -1
  97. package/dist/api/resolution-pass.js.map +1 -1
  98. package/dist/api/resolve-client.d.ts +11 -0
  99. package/dist/api/resolve-client.d.ts.map +1 -1
  100. package/dist/api/resolve-client.js +1 -1
  101. package/dist/api/resolve-client.js.map +1 -1
  102. package/dist/api/response-root.d.ts +92 -46
  103. package/dist/api/response-root.d.ts.map +1 -1
  104. package/dist/api/response-root.js +93 -41
  105. package/dist/api/response-root.js.map +1 -1
  106. package/dist/api/tag-directory.d.ts +154 -0
  107. package/dist/api/tag-directory.d.ts.map +1 -0
  108. package/dist/api/tag-directory.js +325 -0
  109. package/dist/api/tag-directory.js.map +1 -0
  110. package/dist/api/time-tracking.d.ts +165 -0
  111. package/dist/api/time-tracking.d.ts.map +1 -0
  112. package/dist/api/time-tracking.js +135 -0
  113. package/dist/api/time-tracking.js.map +1 -0
  114. package/dist/api/transport.js +3 -3
  115. package/dist/api/transport.js.map +1 -1
  116. package/dist/api/usage.d.ts +190 -0
  117. package/dist/api/usage.d.ts.map +1 -0
  118. package/dist/api/usage.js +194 -0
  119. package/dist/api/usage.js.map +1 -0
  120. package/dist/api/users-fan-out-mutation.d.ts.map +1 -1
  121. package/dist/api/users-fan-out-mutation.js +10 -5
  122. package/dist/api/users-fan-out-mutation.js.map +1 -1
  123. package/dist/api/webhooks.d.ts +357 -0
  124. package/dist/api/webhooks.d.ts.map +1 -0
  125. package/dist/api/webhooks.js +333 -0
  126. package/dist/api/webhooks.js.map +1 -0
  127. package/dist/cli/envelope-out.d.ts +18 -1
  128. package/dist/cli/envelope-out.d.ts.map +1 -1
  129. package/dist/cli/envelope-out.js +16 -2
  130. package/dist/cli/envelope-out.js.map +1 -1
  131. package/dist/cli/program.d.ts.map +1 -1
  132. package/dist/cli/program.js +120 -1
  133. package/dist/cli/program.js.map +1 -1
  134. package/dist/cli/run.d.ts +12 -0
  135. package/dist/cli/run.d.ts.map +1 -1
  136. package/dist/cli/run.js +2 -0
  137. package/dist/cli/run.js.map +1 -1
  138. package/dist/commands/account/tags.d.ts +37 -0
  139. package/dist/commands/account/tags.d.ts.map +1 -0
  140. package/dist/commands/account/tags.js +84 -0
  141. package/dist/commands/account/tags.js.map +1 -0
  142. package/dist/commands/auth/login.d.ts +14 -0
  143. package/dist/commands/auth/login.d.ts.map +1 -0
  144. package/dist/commands/auth/login.js +314 -0
  145. package/dist/commands/auth/login.js.map +1 -0
  146. package/dist/commands/auth/logout.d.ts +28 -0
  147. package/dist/commands/auth/logout.d.ts.map +1 -0
  148. package/dist/commands/auth/logout.js +94 -0
  149. package/dist/commands/auth/logout.js.map +1 -0
  150. package/dist/commands/board/archive.d.ts.map +1 -1
  151. package/dist/commands/board/archive.js +14 -14
  152. package/dist/commands/board/archive.js.map +1 -1
  153. package/dist/commands/board/column-create.d.ts +3 -3
  154. package/dist/commands/board/column-create.d.ts.map +1 -1
  155. package/dist/commands/board/column-create.js +52 -45
  156. package/dist/commands/board/column-create.js.map +1 -1
  157. package/dist/commands/board/column-delete.d.ts.map +1 -1
  158. package/dist/commands/board/column-delete.js +15 -16
  159. package/dist/commands/board/column-delete.js.map +1 -1
  160. package/dist/commands/board/column-update.d.ts.map +1 -1
  161. package/dist/commands/board/column-update.js +23 -22
  162. package/dist/commands/board/column-update.js.map +1 -1
  163. package/dist/commands/board/create.d.ts.map +1 -1
  164. package/dist/commands/board/create.js +14 -17
  165. package/dist/commands/board/create.js.map +1 -1
  166. package/dist/commands/board/delete.d.ts.map +1 -1
  167. package/dist/commands/board/delete.js +12 -15
  168. package/dist/commands/board/delete.js.map +1 -1
  169. package/dist/commands/board/describe.d.ts.map +1 -1
  170. package/dist/commands/board/describe.js +30 -0
  171. package/dist/commands/board/describe.js.map +1 -1
  172. package/dist/commands/board/duplicate.d.ts.map +1 -1
  173. package/dist/commands/board/duplicate.js +12 -13
  174. package/dist/commands/board/duplicate.js.map +1 -1
  175. package/dist/commands/board/favorites.d.ts +33 -0
  176. package/dist/commands/board/favorites.d.ts.map +1 -0
  177. package/dist/commands/board/favorites.js +74 -0
  178. package/dist/commands/board/favorites.js.map +1 -0
  179. package/dist/commands/board/find.d.ts +1 -1
  180. package/dist/commands/board/group-archive.d.ts.map +1 -1
  181. package/dist/commands/board/group-archive.js +12 -16
  182. package/dist/commands/board/group-archive.js.map +1 -1
  183. package/dist/commands/board/group-create.d.ts.map +1 -1
  184. package/dist/commands/board/group-create.js +9 -19
  185. package/dist/commands/board/group-create.js.map +1 -1
  186. package/dist/commands/board/group-delete.d.ts.map +1 -1
  187. package/dist/commands/board/group-delete.js +12 -16
  188. package/dist/commands/board/group-delete.js.map +1 -1
  189. package/dist/commands/board/group-duplicate.d.ts.map +1 -1
  190. package/dist/commands/board/group-duplicate.js +12 -16
  191. package/dist/commands/board/group-duplicate.js.map +1 -1
  192. package/dist/commands/board/group-update.d.ts.map +1 -1
  193. package/dist/commands/board/group-update.js +12 -11
  194. package/dist/commands/board/group-update.js.map +1 -1
  195. package/dist/commands/board/list.d.ts +1 -1
  196. package/dist/commands/board/update.d.ts.map +1 -1
  197. package/dist/commands/board/update.js +16 -11
  198. package/dist/commands/board/update.js.map +1 -1
  199. package/dist/commands/cache/list.d.ts +2 -0
  200. package/dist/commands/cache/list.d.ts.map +1 -1
  201. package/dist/commands/cache/list.js +2 -2
  202. package/dist/commands/cache/list.js.map +1 -1
  203. package/dist/commands/dev/_shared.d.ts +40 -0
  204. package/dist/commands/dev/_shared.d.ts.map +1 -0
  205. package/dist/commands/dev/_shared.js +104 -0
  206. package/dist/commands/dev/_shared.js.map +1 -0
  207. package/dist/commands/dev/configure.d.ts +36 -0
  208. package/dist/commands/dev/configure.d.ts.map +1 -0
  209. package/dist/commands/dev/configure.js +145 -0
  210. package/dist/commands/dev/configure.js.map +1 -0
  211. package/dist/commands/dev/discover.d.ts +34 -0
  212. package/dist/commands/dev/discover.d.ts.map +1 -0
  213. package/dist/commands/dev/discover.js +117 -0
  214. package/dist/commands/dev/discover.js.map +1 -0
  215. package/dist/commands/dev/doctor.d.ts +39 -0
  216. package/dist/commands/dev/doctor.d.ts.map +1 -0
  217. package/dist/commands/dev/doctor.js +91 -0
  218. package/dist/commands/dev/doctor.js.map +1 -0
  219. package/dist/commands/dev/epic/items.d.ts +24 -0
  220. package/dist/commands/dev/epic/items.d.ts.map +1 -0
  221. package/dist/commands/dev/epic/items.js +103 -0
  222. package/dist/commands/dev/epic/items.js.map +1 -0
  223. package/dist/commands/dev/epic/list.d.ts +36 -0
  224. package/dist/commands/dev/epic/list.d.ts.map +1 -0
  225. package/dist/commands/dev/epic/list.js +120 -0
  226. package/dist/commands/dev/epic/list.js.map +1 -0
  227. package/dist/commands/dev/release/list.d.ts +21 -0
  228. package/dist/commands/dev/release/list.d.ts.map +1 -0
  229. package/dist/commands/dev/release/list.js +73 -0
  230. package/dist/commands/dev/release/list.js.map +1 -0
  231. package/dist/commands/dev/sprint/current.d.ts +24 -0
  232. package/dist/commands/dev/sprint/current.d.ts.map +1 -0
  233. package/dist/commands/dev/sprint/current.js +90 -0
  234. package/dist/commands/dev/sprint/current.js.map +1 -0
  235. package/dist/commands/dev/sprint/items.d.ts +34 -0
  236. package/dist/commands/dev/sprint/items.d.ts.map +1 -0
  237. package/dist/commands/dev/sprint/items.js +118 -0
  238. package/dist/commands/dev/sprint/items.js.map +1 -0
  239. package/dist/commands/dev/sprint/list.d.ts +41 -0
  240. package/dist/commands/dev/sprint/list.d.ts.map +1 -0
  241. package/dist/commands/dev/sprint/list.js +104 -0
  242. package/dist/commands/dev/sprint/list.js.map +1 -0
  243. package/dist/commands/dev/task/block.d.ts +29 -0
  244. package/dist/commands/dev/task/block.d.ts.map +1 -0
  245. package/dist/commands/dev/task/block.js +106 -0
  246. package/dist/commands/dev/task/block.js.map +1 -0
  247. package/dist/commands/dev/task/done.d.ts +30 -0
  248. package/dist/commands/dev/task/done.d.ts.map +1 -0
  249. package/dist/commands/dev/task/done.js +113 -0
  250. package/dist/commands/dev/task/done.js.map +1 -0
  251. package/dist/commands/dev/task/list.d.ts +42 -0
  252. package/dist/commands/dev/task/list.d.ts.map +1 -0
  253. package/dist/commands/dev/task/list.js +227 -0
  254. package/dist/commands/dev/task/list.js.map +1 -0
  255. package/dist/commands/dev/task/start.d.ts +29 -0
  256. package/dist/commands/dev/task/start.d.ts.map +1 -0
  257. package/dist/commands/dev/task/start.js +90 -0
  258. package/dist/commands/dev/task/start.js.map +1 -0
  259. package/dist/commands/emit.d.ts.map +1 -1
  260. package/dist/commands/emit.js +5 -3
  261. package/dist/commands/emit.js.map +1 -1
  262. package/dist/commands/index.d.ts.map +1 -1
  263. package/dist/commands/index.js +95 -0
  264. package/dist/commands/index.js.map +1 -1
  265. package/dist/commands/item/archive.d.ts.map +1 -1
  266. package/dist/commands/item/archive.js +11 -0
  267. package/dist/commands/item/archive.js.map +1 -1
  268. package/dist/commands/item/clear.d.ts.map +1 -1
  269. package/dist/commands/item/clear.js +15 -0
  270. package/dist/commands/item/clear.js.map +1 -1
  271. package/dist/commands/item/create.d.ts.map +1 -1
  272. package/dist/commands/item/create.js +41 -8
  273. package/dist/commands/item/create.js.map +1 -1
  274. package/dist/commands/item/delete.d.ts.map +1 -1
  275. package/dist/commands/item/delete.js +11 -0
  276. package/dist/commands/item/delete.js.map +1 -1
  277. package/dist/commands/item/duplicate.d.ts.map +1 -1
  278. package/dist/commands/item/duplicate.js +12 -0
  279. package/dist/commands/item/duplicate.js.map +1 -1
  280. package/dist/commands/item/history.d.ts +60 -0
  281. package/dist/commands/item/history.d.ts.map +1 -0
  282. package/dist/commands/item/history.js +309 -0
  283. package/dist/commands/item/history.js.map +1 -0
  284. package/dist/commands/item/list.d.ts.map +1 -1
  285. package/dist/commands/item/list.js +16 -13
  286. package/dist/commands/item/list.js.map +1 -1
  287. package/dist/commands/item/move.d.ts.map +1 -1
  288. package/dist/commands/item/move.js +41 -7
  289. package/dist/commands/item/move.js.map +1 -1
  290. package/dist/commands/item/search.d.ts +99 -15
  291. package/dist/commands/item/search.d.ts.map +1 -1
  292. package/dist/commands/item/search.js +480 -36
  293. package/dist/commands/item/search.js.map +1 -1
  294. package/dist/commands/item/set.d.ts.map +1 -1
  295. package/dist/commands/item/set.js +52 -8
  296. package/dist/commands/item/set.js.map +1 -1
  297. package/dist/commands/item/time-track/start.d.ts +61 -0
  298. package/dist/commands/item/time-track/start.d.ts.map +1 -0
  299. package/dist/commands/item/time-track/start.js +138 -0
  300. package/dist/commands/item/time-track/start.js.map +1 -0
  301. package/dist/commands/item/time-track/stop.d.ts +32 -0
  302. package/dist/commands/item/time-track/stop.d.ts.map +1 -0
  303. package/dist/commands/item/time-track/stop.js +97 -0
  304. package/dist/commands/item/time-track/stop.js.map +1 -0
  305. package/dist/commands/item/update.d.ts +1 -0
  306. package/dist/commands/item/update.d.ts.map +1 -1
  307. package/dist/commands/item/update.js +103 -113
  308. package/dist/commands/item/update.js.map +1 -1
  309. package/dist/commands/item/upsert.d.ts.map +1 -1
  310. package/dist/commands/item/upsert.js +48 -1
  311. package/dist/commands/item/upsert.js.map +1 -1
  312. package/dist/commands/notification/send.d.ts +60 -0
  313. package/dist/commands/notification/send.d.ts.map +1 -0
  314. package/dist/commands/notification/send.js +147 -0
  315. package/dist/commands/notification/send.js.map +1 -0
  316. package/dist/commands/parse-argv.d.ts.map +1 -1
  317. package/dist/commands/parse-argv.js +14 -4
  318. package/dist/commands/parse-argv.js.map +1 -1
  319. package/dist/commands/raw/index.d.ts.map +1 -1
  320. package/dist/commands/raw/index.js +13 -15
  321. package/dist/commands/raw/index.js.map +1 -1
  322. package/dist/commands/run-by-id-lookup.d.ts.map +1 -1
  323. package/dist/commands/run-by-id-lookup.js +2 -2
  324. package/dist/commands/run-by-id-lookup.js.map +1 -1
  325. package/dist/commands/schema/index.d.ts +2 -0
  326. package/dist/commands/schema/index.d.ts.map +1 -1
  327. package/dist/commands/status.d.ts +120 -0
  328. package/dist/commands/status.d.ts.map +1 -0
  329. package/dist/commands/status.js +365 -0
  330. package/dist/commands/status.js.map +1 -0
  331. package/dist/commands/update/body-source.d.ts.map +1 -1
  332. package/dist/commands/update/body-source.js +2 -2
  333. package/dist/commands/update/body-source.js.map +1 -1
  334. package/dist/commands/update/create.d.ts +2 -3
  335. package/dist/commands/update/create.d.ts.map +1 -1
  336. package/dist/commands/update/create.js +15 -3
  337. package/dist/commands/update/create.js.map +1 -1
  338. package/dist/commands/update/delete.d.ts.map +1 -1
  339. package/dist/commands/update/delete.js +11 -0
  340. package/dist/commands/update/delete.js.map +1 -1
  341. package/dist/commands/update/edit.d.ts.map +1 -1
  342. package/dist/commands/update/edit.js +11 -0
  343. package/dist/commands/update/edit.js.map +1 -1
  344. package/dist/commands/update/list.d.ts.map +1 -1
  345. package/dist/commands/update/list.js +15 -12
  346. package/dist/commands/update/list.js.map +1 -1
  347. package/dist/commands/update/reply.d.ts.map +1 -1
  348. package/dist/commands/update/reply.js +11 -0
  349. package/dist/commands/update/reply.js.map +1 -1
  350. package/dist/commands/update/toggle.d.ts.map +1 -1
  351. package/dist/commands/update/toggle.js +13 -0
  352. package/dist/commands/update/toggle.js.map +1 -1
  353. package/dist/commands/usage.d.ts +58 -0
  354. package/dist/commands/usage.d.ts.map +1 -0
  355. package/dist/commands/usage.js +94 -0
  356. package/dist/commands/usage.js.map +1 -0
  357. package/dist/commands/webhook/create.d.ts +74 -0
  358. package/dist/commands/webhook/create.d.ts.map +1 -0
  359. package/dist/commands/webhook/create.js +150 -0
  360. package/dist/commands/webhook/create.js.map +1 -0
  361. package/dist/commands/webhook/delete.d.ts +46 -0
  362. package/dist/commands/webhook/delete.d.ts.map +1 -0
  363. package/dist/commands/webhook/delete.js +141 -0
  364. package/dist/commands/webhook/delete.js.map +1 -0
  365. package/dist/commands/webhook/list.d.ts +23 -0
  366. package/dist/commands/webhook/list.d.ts.map +1 -0
  367. package/dist/commands/webhook/list.js +68 -0
  368. package/dist/commands/webhook/list.js.map +1 -0
  369. package/dist/commands/workspace/create.d.ts.map +1 -1
  370. package/dist/commands/workspace/create.js +16 -0
  371. package/dist/commands/workspace/create.js.map +1 -1
  372. package/dist/commands/workspace/delete.d.ts.map +1 -1
  373. package/dist/commands/workspace/delete.js +13 -13
  374. package/dist/commands/workspace/delete.js.map +1 -1
  375. package/dist/commands/workspace/list.d.ts +1 -1
  376. package/dist/commands/workspace/update.d.ts.map +1 -1
  377. package/dist/commands/workspace/update.js +15 -15
  378. package/dist/commands/workspace/update.js.map +1 -1
  379. package/dist/config/credentials.d.ts +189 -0
  380. package/dist/config/credentials.d.ts.map +1 -0
  381. package/dist/config/credentials.js +300 -0
  382. package/dist/config/credentials.js.map +1 -0
  383. package/dist/config/profiles.d.ts +125 -0
  384. package/dist/config/profiles.d.ts.map +1 -0
  385. package/dist/config/profiles.js +227 -0
  386. package/dist/config/profiles.js.map +1 -0
  387. package/dist/types/global-flags.d.ts +1 -1
  388. package/dist/types/global-flags.d.ts.map +1 -1
  389. package/dist/types/global-flags.js +28 -16
  390. package/dist/types/global-flags.js.map +1 -1
  391. package/dist/types/ids.d.ts +2 -0
  392. package/dist/types/ids.d.ts.map +1 -1
  393. package/dist/types/ids.js +5 -3
  394. package/dist/types/ids.js.map +1 -1
  395. package/dist/utils/errors.d.ts +57 -3
  396. package/dist/utils/errors.d.ts.map +1 -1
  397. package/dist/utils/errors.js +69 -2
  398. package/dist/utils/errors.js.map +1 -1
  399. package/dist/utils/fs.d.ts +35 -0
  400. package/dist/utils/fs.d.ts.map +1 -0
  401. package/dist/utils/fs.js +36 -0
  402. package/dist/utils/fs.js.map +1 -0
  403. package/dist/utils/json.d.ts +60 -0
  404. package/dist/utils/json.d.ts.map +1 -0
  405. package/dist/utils/json.js +86 -0
  406. package/dist/utils/json.js.map +1 -0
  407. package/dist/utils/output/ndjson.d.ts +65 -3
  408. package/dist/utils/output/ndjson.d.ts.map +1 -1
  409. package/dist/utils/output/ndjson.js +21 -0
  410. package/dist/utils/output/ndjson.js.map +1 -1
  411. package/dist/utils/redact.d.ts.map +1 -1
  412. package/dist/utils/redact.js +31 -0
  413. package/dist/utils/redact.js.map +1 -1
  414. package/package.json +2 -1
  415. package/dist/commands/account/client-helper.d.ts +0 -37
  416. package/dist/commands/account/client-helper.d.ts.map +0 -1
  417. package/dist/commands/account/client-helper.js +0 -55
  418. package/dist/commands/account/client-helper.js.map +0 -1
@@ -7,27 +7,39 @@
7
7
  * `change_column_value` / `change_multiple_column_values` mutations
8
8
  * accept.
9
9
  *
10
- * **Two entry points.** Nine of the ten allowlisted types translate
11
- * purely locally — no network, no clock dependency beyond the date
10
+ * **Two entry points.** Most allowlisted types translate purely
11
+ * locally — no network, no clock dependency beyond the date
12
12
  * module's injectable clock — and live behind the sync
13
- * `translateColumnValue`. `people` is the exception: email→ID
14
- * resolution can hit the network. Rather than forcing a
15
- * `Promise<TranslatedColumnValue>` on every call site for the nine
16
- * sync types, `translateColumnValueAsync` is the unified async entry
17
- * point the command layer always calls. It delegates to the sync
18
- * version for non-people types and dispatches to `parsePeopleInput`
19
- * for `people`. M5b's write surface goes through async exclusively
20
- * (people may appear in any `--set` bundle).
21
- *
22
- * **Scope.** All ten allowlisted types translate:
13
+ * `translateColumnValue`. The four async types — `people`,
14
+ * `tags`, `board_relation`, `dependency` — hit the network during
15
+ * resolution (email→ID lookup, tag-name→tag-id lookup against the
16
+ * per-account directory, item-allowed-board membership check via
17
+ * batched `items(ids: [...])`). Rather than forcing a
18
+ * `Promise<TranslatedColumnValue>` on every call site for the
19
+ * sync types, `translateColumnValueAsync` is the unified async
20
+ * entry point the command layer always calls. It delegates to the
21
+ * sync version for non-async types and dispatches to
22
+ * `translatePeople` / `translateTags` / `translateRelation` for
23
+ * the async ones. M5b's write surface goes through async
24
+ * exclusively (any of those four types may appear in a `--set`
25
+ * bundle).
26
+ *
27
+ * **Scope.** Thirteen allowlisted types translate (post-M19 close):
23
28
  * `text` / `long_text` / `numbers` (simple-string payloads, M5a
24
29
  * skeleton); `status` / `dropdown` (rich-object payloads); `date`
25
30
  * (rich, with relative-token resolution against the profile
26
31
  * timezone); `people` (rich, with `me`-token + email resolution via
27
- * the M3 `userByEmail` directory cache); and the M8 firm additions
32
+ * the M3 `userByEmail` directory cache); the M8 firm additions
28
33
  * `link` / `email` / `phone` (pipe-form parsers in `links.ts` /
29
34
  * `emails.ts` / `phones.ts`; same `change_column_value` wire path
30
- * as the v0.1 rich types).
35
+ * as the v0.1 rich types); and the M19 row — `tags` (rich, with
36
+ * tag-name→tag-id resolution via the per-account directory cache
37
+ * in `tag-directory.ts`), `board_relation` and `dependency`
38
+ * (rich, with `{item_ids: [N1, N2]}` wire shape and per-item
39
+ * allowed-boards validation via
40
+ * `validateBoardRelationItems` in `board-relation-validation.ts`;
41
+ * `board_relation` reads `column.settings.boardIds`, `dependency`
42
+ * reads `column.settings.dependencyBoards`).
31
43
  *
32
44
  * **Date resolution context** (cli-design §5.3 step 3 + the
33
45
  * "Relative dates and timezone" subsection). Relative tokens
@@ -99,12 +111,13 @@
99
111
  * targets at `--set-raw`."
100
112
  */
101
113
  import { ApiError, UsageError } from '../utils/errors.js';
102
- import { getColumnRoadmapCategory, isFilesShapedType, isWritableColumnType, } from './column-types.js';
114
+ import { isFilesShapedType, isReadOnlyForeverType, isV0_2WriterExpansionType, isWritableColumnType, parseColumnSettings, } from './column-types.js';
103
115
  import { parseDateInput, } from './dates.js';
104
116
  import { parsePeopleInput, } from './people.js';
105
117
  import { parseLinkInput } from './links.js';
106
118
  import { parseEmailInput } from './emails.js';
107
119
  import { parsePhoneInput } from './phones.js';
120
+ import { parseRelationItemIds, } from './board-relation-validation.js';
108
121
  /**
109
122
  * Translates a single `<column>=<value>` pair into the Monday wire
110
123
  * payload. **Sync entry point — handles the nine types whose
@@ -168,6 +181,9 @@ export const translateColumnValue = (inputs) => {
168
181
  payload: { format: 'rich', value: parsed.payload },
169
182
  resolvedFrom: parsed.resolvedFrom,
170
183
  peopleResolution: null,
184
+ tagResolution: null,
185
+ relationResolution: null,
186
+ translatorResolution: null,
171
187
  };
172
188
  }
173
189
  case 'link': {
@@ -184,6 +200,9 @@ export const translateColumnValue = (inputs) => {
184
200
  payload: { format: 'rich', value: parsed },
185
201
  resolvedFrom: null,
186
202
  peopleResolution: null,
203
+ tagResolution: null,
204
+ relationResolution: null,
205
+ translatorResolution: null,
187
206
  };
188
207
  }
189
208
  case 'email': {
@@ -195,6 +214,9 @@ export const translateColumnValue = (inputs) => {
195
214
  payload: { format: 'rich', value: parsed },
196
215
  resolvedFrom: null,
197
216
  peopleResolution: null,
217
+ tagResolution: null,
218
+ relationResolution: null,
219
+ translatorResolution: null,
198
220
  };
199
221
  }
200
222
  case 'phone': {
@@ -206,6 +228,9 @@ export const translateColumnValue = (inputs) => {
206
228
  payload: { format: 'rich', value: parsed },
207
229
  resolvedFrom: null,
208
230
  peopleResolution: null,
231
+ tagResolution: null,
232
+ relationResolution: null,
233
+ translatorResolution: null,
209
234
  };
210
235
  }
211
236
  case 'people':
@@ -224,6 +249,36 @@ export const translateColumnValue = (inputs) => {
224
249
  hint: 'use translateColumnValueAsync from src/api/column-values.ts',
225
250
  },
226
251
  });
252
+ case 'tags':
253
+ // Tag translation is async (tag-name→tag-id resolution hits
254
+ // the per-account directory cache or the `account.tags`
255
+ // GraphQL endpoint). Surface as `internal_error` for the same
256
+ // reason as `people` — a future contributor who accidentally
257
+ // routes a tags column through the sync entry point sees a
258
+ // loud programmer-error message rather than a silent payload
259
+ // corruption.
260
+ throw new ApiError('internal_error', `translateColumnValue (sync) called on tags column "${column.id}". ` +
261
+ `Tag resolution is async — use translateColumnValueAsync.`, {
262
+ details: {
263
+ column_id: column.id,
264
+ column_type: column.type,
265
+ hint: 'use translateColumnValueAsync from src/api/column-values.ts',
266
+ },
267
+ });
268
+ case 'board_relation':
269
+ case 'dependency':
270
+ // Relation translation is async (the validator hits live
271
+ // `items(ids: [...])` against Monday). Same programmer-error
272
+ // shape as people / tags. board_relation lands at Commit 3,
273
+ // dependency at Commit 4 — both share the same sync guard.
274
+ throw new ApiError('internal_error', `translateColumnValue (sync) called on ${column.type} column "${column.id}". ` +
275
+ `Relation validation is async — use translateColumnValueAsync.`, {
276
+ details: {
277
+ column_id: column.id,
278
+ column_type: column.type,
279
+ hint: 'use translateColumnValueAsync from src/api/column-values.ts',
280
+ },
281
+ });
227
282
  }
228
283
  };
229
284
  /**
@@ -287,6 +342,9 @@ export const translateColumnClear = (column) => {
287
342
  payload: { format: 'simple', value: '' },
288
343
  resolvedFrom: null,
289
344
  peopleResolution: null,
345
+ tagResolution: null,
346
+ relationResolution: null,
347
+ translatorResolution: null,
290
348
  };
291
349
  case 'status':
292
350
  case 'dropdown':
@@ -295,10 +353,14 @@ export const translateColumnClear = (column) => {
295
353
  case 'link':
296
354
  case 'email':
297
355
  case 'phone':
356
+ case 'tags':
357
+ case 'board_relation':
358
+ case 'dependency':
298
359
  // Rich types clear to `{}` via change_column_value per
299
360
  // cli-design §5.3 "Clearing column values" table. M8 firm row
300
- // (link / email / phone) extends the table verbatim same
301
- // payload, same mutation, same dispatch.
361
+ // (link / email / phone) and M19 row (tags / board_relation /
362
+ // dependency) extend the table verbatim — same payload, same
363
+ // mutation, same dispatch.
302
364
  return {
303
365
  columnId: column.id,
304
366
  columnType: column.type,
@@ -306,13 +368,28 @@ export const translateColumnClear = (column) => {
306
368
  payload: { format: 'rich', value: {} },
307
369
  resolvedFrom: null,
308
370
  peopleResolution: null,
371
+ tagResolution: null,
372
+ relationResolution: null,
373
+ translatorResolution: null,
309
374
  };
310
375
  }
311
376
  };
312
377
  export const translateColumnValueAsync = async (inputs) => {
313
- if (inputs.column.type !== 'people') {
314
- return translateColumnValue(inputs);
378
+ if (inputs.column.type === 'people') {
379
+ return translatePeople(inputs);
315
380
  }
381
+ if (inputs.column.type === 'tags') {
382
+ return translateTags(inputs);
383
+ }
384
+ if (inputs.column.type === 'board_relation') {
385
+ return translateRelation(inputs, 'board_relation');
386
+ }
387
+ if (inputs.column.type === 'dependency') {
388
+ return translateRelation(inputs, 'dependency');
389
+ }
390
+ return translateColumnValue(inputs);
391
+ };
392
+ const translatePeople = async (inputs) => {
316
393
  const { peopleResolution } = inputs;
317
394
  if (peopleResolution === undefined) {
318
395
  throw new ApiError('internal_error', `translateColumnValueAsync requires a peopleResolution context for ` +
@@ -347,18 +424,348 @@ export const translateColumnValueAsync = async (inputs) => {
347
424
  },
348
425
  resolvedFrom: null,
349
426
  peopleResolution: parsed.resolution,
427
+ tagResolution: null,
428
+ relationResolution: null,
429
+ // M19→M20 cleanup-window parity fix: thread the people
430
+ // resolution's aggregated source/age into translatorResolution
431
+ // so envelope-level meta.source reflects cache-hit email
432
+ // lookups. Pre-fix this slot was `null` and cache hits silently
433
+ // dropped from the aggregate (v0.3-plan §11 post-mortem).
434
+ translatorResolution: {
435
+ source: parsed.source,
436
+ cacheAgeSeconds: parsed.cacheAgeSeconds,
437
+ },
438
+ };
439
+ };
440
+ /**
441
+ * Async translator for the M19 `tags` column type. Resolves a
442
+ * comma-split tag-name list against the per-account directory
443
+ * (cache-then-live via `tagResolution.resolveTags`), surfaces the
444
+ * wire payload `{ tag_ids: [N1, N2] }`, populates the per-tag
445
+ * `tagResolution` echo for dry-run rendering, and threads
446
+ * source/cache-age provenance through `translatorResolution` for
447
+ * envelope-level aggregation.
448
+ *
449
+ * **Empty input rejected** — mirrors the dropdown / people empty-
450
+ * input contract per cli-design §5.3 lines 2375–2386 (`--set
451
+ * <col>=""` is value-shaping, not clear-intent; `monday item clear`
452
+ * is the dedicated clear surface). Surfaces `usage_error` with
453
+ * `details.hint` pointing at `monday item clear`.
454
+ *
455
+ * **Misses surface as `tag_not_found`** — single error envelope
456
+ * with `details: { tags: misses[] }` per cli-design §6.5 +
457
+ * Decision 1 (`4c652d5`). Multi-miss `--set tags=foo,bar,baz` where
458
+ * two tags are absent surfaces ONE error with `tags: ["foo", "bar"]`,
459
+ * NOT two separate errors.
460
+ */
461
+ const translateTags = async (inputs) => {
462
+ const { tagResolution } = inputs;
463
+ if (tagResolution === undefined) {
464
+ throw new ApiError('internal_error', `translateColumnValueAsync requires a tagResolution context for tags ` +
465
+ `column "${inputs.column.id}". M19's command layer wires resolveTags ` +
466
+ `through this slot via buildResolutionContexts.`, {
467
+ details: {
468
+ column_id: inputs.column.id,
469
+ column_type: 'tags',
470
+ hint: 'pass { tagResolution: { resolveTags } } when calling ' +
471
+ 'translateColumnValueAsync. The resolveTags callback closes ' +
472
+ 'over MondayClient + env + noCache.',
473
+ },
474
+ });
475
+ }
476
+ // Empty input boundary: split + trim + filter — if nothing is left
477
+ // after the split, the user passed `--set tags=""` or `--set
478
+ // tags=" , "`. Reject with usage_error pointing at `monday item
479
+ // clear` (mirror dropdown/people empty-input contract).
480
+ const tokens = inputs.value
481
+ .split(',')
482
+ .map((segment) => segment.trim())
483
+ .filter((segment) => segment.length > 0);
484
+ if (tokens.length === 0) {
485
+ throw new UsageError(`Tags column "${inputs.column.id}" needs at least one tag name. ` +
486
+ `Got "${inputs.value}". To clear a tags column, use ` +
487
+ `\`monday item clear <iid> ${inputs.column.id} [--board <bid>]\` instead.`, {
488
+ details: {
489
+ column_id: inputs.column.id,
490
+ column_type: 'tags',
491
+ raw_input: inputs.value,
492
+ hint: 'pass a comma-separated list of tag names (e.g. --set ' +
493
+ `${inputs.column.id}=launch,priority). To clear, use ` +
494
+ '`monday item clear` — `--set tags=""` is value-shaping, ' +
495
+ 'not clear-intent (cli-design §5.3 lines 2375–2386).',
496
+ },
497
+ });
498
+ }
499
+ const resolved = await tagResolution.resolveTags(inputs.value);
500
+ if (resolved.misses.length > 0) {
501
+ const missList = resolved.misses.map((m) => JSON.stringify(m)).join(', ');
502
+ const noun = resolved.misses.length === 1 ? 'tag' : 'tags';
503
+ throw new ApiError('tag_not_found', `${resolved.misses.length.toString()} ${noun} not in the account directory: ${missList}`, {
504
+ details: {
505
+ tags: resolved.misses,
506
+ hint: 'Run `monday account tags` to list available tags.',
507
+ },
508
+ });
509
+ }
510
+ // Build the per-token echo. resolveTags returns ids in input-token
511
+ // order (post-dedup); zip with the dedup'd token list to surface
512
+ // the verbatim input alongside each resolved id.
513
+ const dedup = [];
514
+ const seen = new Set();
515
+ for (const token of tokens) {
516
+ const key = token
517
+ .normalize('NFC')
518
+ .trim()
519
+ .replace(/\s+/gu, ' ')
520
+ .toLocaleLowerCase('und');
521
+ if (seen.has(key))
522
+ continue;
523
+ seen.add(key);
524
+ dedup.push(token);
525
+ }
526
+ const echoTokens = dedup.map((token, i) => ({
527
+ input: token,
528
+ /* c8 ignore next 5 — defensive: resolveTags returns ids parallel
529
+ to the dedup'd input order (length-matched), so `id` is always
530
+ present at index `i`. The String() guard exists for
531
+ noUncheckedIndexedAccess narrowing only. */
532
+ resolved_id: String(resolved.ids[i] ?? ''),
533
+ }));
534
+ return {
535
+ columnId: inputs.column.id,
536
+ columnType: 'tags',
537
+ rawInput: inputs.value,
538
+ payload: {
539
+ format: 'rich',
540
+ value: { tag_ids: [...resolved.ids] },
541
+ },
542
+ resolvedFrom: null,
543
+ peopleResolution: null,
544
+ tagResolution: { tokens: echoTokens },
545
+ relationResolution: null,
546
+ translatorResolution: {
547
+ source: resolved.source,
548
+ cacheAgeSeconds: resolved.cacheAgeSeconds,
549
+ },
550
+ };
551
+ };
552
+ /**
553
+ * Async translator for the M19 `board_relation` and `dependency`
554
+ * column types. Both share the same wire shape
555
+ * (`{ item_ids: [N1, N2] }`) and the same per-item allowed-boards
556
+ * validator; the divergence is the settings field the per-translator
557
+ * arm reads (`column.settings.boardIds` for `board_relation` /
558
+ * `column.settings.dependencyBoards` for `dependency`).
559
+ *
560
+ * **Five-step resolution.**
561
+ *
562
+ * 1. Require `relationResolution` context (programmer-error guard
563
+ * mirroring `tags` / `people`).
564
+ * 2. Require `column.settingsStr` (the field the resolver-pass
565
+ * threads through). Surfacing this as `internal_error` rather
566
+ * than `usage_error` because the resolver-pass always supplies
567
+ * the field; reaching this branch is a wiring bug.
568
+ * 3. Parse `parseRelationItemIds(value, columnId, context)` for
569
+ * input validation — empty / over-cap / non-decimal /
570
+ * unsafe-integer / duplicate inputs reject pre-network.
571
+ * 4. Derive `allowedBoards` from the parsed settings shape per
572
+ * `context` discriminant. Empty `allowedBoards` (no boards
573
+ * configured on the column) surfaces `usage_error` — the
574
+ * validator can't validate against an empty allowed set.
575
+ * 5. Call `relationResolution.validateItems({ ... })`. On
576
+ * mismatch, surface `usage_error` with per-item details. On
577
+ * success, build the wire payload + per-item echo.
578
+ *
579
+ * **`translatorResolution`** carries `{ source: 'live',
580
+ * cacheAgeSeconds: null }` for symmetry with the tags translator's
581
+ * cache-aware path. The relation validator is always live (item
582
+ * board membership can change cross-call), but threading the slot
583
+ * keeps the post-translate aggregation pass's shape uniform.
584
+ */
585
+ const translateRelation = async (inputs, context) => {
586
+ const { relationResolution } = inputs;
587
+ if (relationResolution === undefined) {
588
+ throw new ApiError('internal_error', `translateColumnValueAsync requires a relationResolution context for ` +
589
+ `${context} column "${inputs.column.id}". M19's command layer wires ` +
590
+ `validateItems through this slot via buildResolutionContexts.`, {
591
+ details: {
592
+ column_id: inputs.column.id,
593
+ column_type: context,
594
+ hint: 'pass { relationResolution: { validateItems } } when calling ' +
595
+ 'translateColumnValueAsync. The validateItems callback closes ' +
596
+ 'over MondayClient.',
597
+ },
598
+ });
599
+ }
600
+ if (inputs.column.settingsStr === undefined ||
601
+ inputs.column.settingsStr === null) {
602
+ throw new ApiError('internal_error', `translateColumnValueAsync requires column.settingsStr for ${context} ` +
603
+ `column "${inputs.column.id}" — the translator reads ` +
604
+ `${context === 'board_relation' ? 'boardIds' : 'dependencyBoards'} from settings to derive allowed boards.`, {
605
+ details: {
606
+ column_id: inputs.column.id,
607
+ column_type: context,
608
+ hint: 'the resolver-pass threads settings_str through ResolvedSet; ' +
609
+ 'verify the call site passes column.settingsStr (R20 lift, ' +
610
+ 'M19 widening).',
611
+ },
612
+ });
613
+ }
614
+ const itemIds = parseRelationItemIds(inputs.value, inputs.column.id, context);
615
+ const settings = parseColumnSettings(inputs.column.settingsStr);
616
+ const allowedBoards = deriveAllowedBoards(settings, context);
617
+ if (allowedBoards.length === 0) {
618
+ throw new UsageError(`${context === 'board_relation' ? 'Board-relation' : 'Dependency'} column "${inputs.column.id}" has no ${context === 'board_relation' ? 'allowed boards' : 'dependency boards'} configured. Configure the column's linked-board list in Monday's ` +
619
+ `UI before linking items via --set, or use --set-raw with the ` +
620
+ `literal Monday wire shape.`, {
621
+ details: {
622
+ column_id: inputs.column.id,
623
+ column_type: context,
624
+ raw_input: inputs.value,
625
+ hint: `${context === 'board_relation' ? 'board_relation' : 'dependency'} columns scope item links to a configured set of boards; the ` +
626
+ `translator can't validate item membership against an empty ` +
627
+ `allowed set.`,
628
+ },
629
+ });
630
+ }
631
+ const result = await relationResolution.validateItems({
632
+ itemIds,
633
+ allowedBoards,
634
+ columnId: inputs.column.id,
635
+ context,
636
+ });
637
+ if (!result.ok) {
638
+ throw new UsageError(buildRelationMismatchMessage(inputs.column.id, context, result.mismatches), {
639
+ details: {
640
+ column_id: inputs.column.id,
641
+ column_type: context,
642
+ raw_input: inputs.value,
643
+ allowed_boards: allowedBoards,
644
+ mismatches: result.mismatches.map((m) => ({
645
+ item_id: m.itemId,
646
+ actual_board: m.actualBoard,
647
+ })),
648
+ hint: `each item must belong to one of the column's allowed boards ` +
649
+ `[${allowedBoards.join(', ')}]. Items missing from the response ` +
650
+ `(actual_board: null) were not visible to the caller's token, ` +
651
+ `archived, or deleted.`,
652
+ },
653
+ });
654
+ }
655
+ // Build per-item echo from the validator's items array. The
656
+ // validator preserves input-token order (parseRelationItemIds
657
+ // rejects duplicates so order-preservation is straightforward).
658
+ const echoItems = result.items.map((item) => ({
659
+ input: item.itemId.toString(),
660
+ /* c8 ignore next 5 — defensive: validateItems only returns items
661
+ in result.items when the per-item check passes (boardId is
662
+ present + allowed). String() guard for noUncheckedIndexedAccess
663
+ narrowing. */
664
+ resolved_board_id: item.boardId === null ? '' : item.boardId.toString(),
665
+ }));
666
+ return {
667
+ columnId: inputs.column.id,
668
+ // Type-cast: at Commit 3 only `'board_relation'` is in
669
+ // WRITABLE_COLUMN_TYPES; Commit 4 adds `'dependency'` and the
670
+ // cast becomes structurally identity. The dispatcher only
671
+ // routes the matching column types here, so the cast is safe.
672
+ columnType: context,
673
+ rawInput: inputs.value,
674
+ payload: {
675
+ format: 'rich',
676
+ value: { item_ids: [...itemIds] },
677
+ },
678
+ resolvedFrom: null,
679
+ peopleResolution: null,
680
+ tagResolution: null,
681
+ relationResolution: {
682
+ context,
683
+ allowed_boards: allowedBoards,
684
+ items: echoItems,
685
+ },
686
+ translatorResolution: {
687
+ source: 'live',
688
+ cacheAgeSeconds: null,
689
+ },
350
690
  };
351
691
  };
692
+ /**
693
+ * Derives the column's allowed-board list from its parsed
694
+ * `settings_str`. `board_relation` reads `settings.boardIds`
695
+ * (falling back to `[settings.boardId]` for legacy single-target
696
+ * shape Monday occasionally returns); `dependency` reads
697
+ * `settings.dependencyBoards` per Monday's distinct settings shape.
698
+ *
699
+ * Returns `readonly number[]` after filtering to safe integers — a
700
+ * malformed settings entry surfaces as an empty list, which the
701
+ * caller branches on via the no-allowed-boards usage_error.
702
+ */
703
+ const deriveAllowedBoards = (settings, context) => {
704
+ if (settings === null || typeof settings !== 'object')
705
+ return [];
706
+ const obj = settings;
707
+ let candidates = [];
708
+ if (context === 'board_relation') {
709
+ if (Array.isArray(obj.boardIds)) {
710
+ candidates = obj.boardIds;
711
+ }
712
+ else if (obj.boardId !== undefined) {
713
+ // Codex post-Commit-5 P1-2 fix: legacy singular `boardId` may
714
+ // be a decimal string (Monday occasionally returns string IDs
715
+ // in legacy boards) — route through the same parse path as the
716
+ // array entries below rather than gating on `typeof === number`.
717
+ // The shared filter below tolerates non-matching shapes.
718
+ candidates = [obj.boardId];
719
+ }
720
+ }
721
+ else if (Array.isArray(obj.dependencyBoards)) {
722
+ candidates = obj.dependencyBoards;
723
+ }
724
+ const out = [];
725
+ for (const candidate of candidates) {
726
+ if (typeof candidate === 'number' && Number.isSafeInteger(candidate)) {
727
+ out.push(candidate);
728
+ }
729
+ else if (typeof candidate === 'string' &&
730
+ /^(?:0|[1-9]\d*)$/u.test(candidate)) {
731
+ const parsed = Number(candidate);
732
+ if (Number.isSafeInteger(parsed))
733
+ out.push(parsed);
734
+ }
735
+ }
736
+ return out;
737
+ };
738
+ /**
739
+ * Builds the human-readable `usage_error` message for one or more
740
+ * relation mismatches. Mirrors the per-noun wording the
741
+ * `parseRelationItemIds` errors use ("Board-relation column…",
742
+ * "Dependency column…") so an agent reading two consecutive errors
743
+ * sees consistent wording.
744
+ */
745
+ const buildRelationMismatchMessage = (columnId, context, mismatches) => {
746
+ const titled = context === 'board_relation' ? 'Board-relation' : 'Dependency';
747
+ const noun = mismatches.length === 1 ? 'item' : 'items';
748
+ const detail = mismatches
749
+ .map((m) => m.actualBoard === null
750
+ ? `${m.itemId.toString()} (not visible / deleted)`
751
+ : `${m.itemId.toString()} (board ${m.actualBoard.toString()})`)
752
+ .join(', ');
753
+ return (`${titled} column "${columnId}" rejected ${mismatches.length.toString()} ` +
754
+ `${noun} not in the column's allowed-board set: ${detail}.`);
755
+ };
352
756
  const simple = (columnId, columnType, rawInput) => ({
353
757
  columnId,
354
758
  columnType,
355
759
  payload: { format: 'simple', value: rawInput },
356
760
  rawInput,
357
- // Only the date / people translators populate resolution echoes;
358
- // every other type emits null so the dry-run engine has one shape
359
- // to read per slot.
761
+ // Only the date / people / tags / relation translators populate
762
+ // resolution echoes; every other type emits null so the dry-run
763
+ // engine has one shape to read per slot.
360
764
  resolvedFrom: null,
361
765
  peopleResolution: null,
766
+ tagResolution: null,
767
+ relationResolution: null,
768
+ translatorResolution: null,
362
769
  });
363
770
  const rich = (columnId, columnType, rawInput, value) => ({
364
771
  columnId,
@@ -367,6 +774,9 @@ const rich = (columnId, columnType, rawInput, value) => ({
367
774
  rawInput,
368
775
  resolvedFrom: null,
369
776
  peopleResolution: null,
777
+ tagResolution: null,
778
+ relationResolution: null,
779
+ translatorResolution: null,
370
780
  });
371
781
  /**
372
782
  * Status payload per `cli-design.md` §5.3 step 3:
@@ -663,133 +1073,150 @@ export const bundleColumnValues = (translated) => {
663
1073
  * agents get accurate guidance instead of a blanket "wait for the
664
1074
  * next version" hint.
665
1075
  *
666
- * Three categories per `column-types.ts getColumnRoadmapCategory`:
1076
+ * **5-way classifier** (M19 fold of v0.2-plan §22 / v0.3-plan §22
1077
+ * non-R-class quality refactor — collapses the prior 5-branch
1078
+ * if/else chain into a single category-table dispatch).
1079
+ * Categories, in precedence order:
667
1080
  *
668
- * - **v0.3 writer-expansion candidates** (`tags` / `board_relation`
669
- * / `dependency` — slipped from v0.2 tentative at M18 close)
670
- * get `deferred_to: "v0.3"`. The M8 firm row (`link` / `email`
671
- * / `phone`) shipped friendly translators in v0.2 and goes
672
- * through the writable-allowlist branch, not this error path.
673
1081
  * - **read-only forever** (`mirror` / `formula` / `auto_number` /
674
- * `creation_log` / `last_updated` / `item_id`) Monday-computed
675
- * columns that are not writable via the API regardless of CLI
676
- * version. `read_only: true`, hint points at the underlying
677
- * source column. cli-design.md §5.3 writer-expansion roadmap
678
- * "read-only forever" row says this explicitly.
679
- * - **future** (anything else) — `deferred_to: "future"`, generic
680
- * message. Examples include `battery`, `item_assignees`,
681
- * `time_tracking`, `files`, `rating`. The roadmap doesn't
682
- * promise these for v0.2 or v0.3, so over-promising would be
683
- * the same drift Codex M5b cleanup re-review caught.
1082
+ * `creation_log` / `last_updated` / `item_id` / `item_assignees`)
1083
+ * — Monday-computed columns that are not writable via the API
1084
+ * regardless of CLI version. Carry `read_only: true` (no
1085
+ * `deferred_to`); hint points at the underlying source column.
1086
+ * cli-design.md §5.3 writer-expansion roadmap "read-only forever"
1087
+ * row says this explicitly.
1088
+ * - **v0.2 writer-expansion** (`tags` / `board_relation` /
1089
+ * `dependency` slipped from v0.2 tentative at M18 close;
1090
+ * graduated into the friendly allowlist at M19 close so this
1091
+ * row is unreachable post-M19 but stays as documented dead code
1092
+ * for stability + future tentative-row revival). Carry
1093
+ * `deferred_to: "v0.3"`; hint nudges agents at `--set-raw`.
1094
+ * - **`files`-shaped** (currently `file` only) — Monday writes via
1095
+ * `add_file_to_column` (multipart upload) rather than
1096
+ * `change_column_value`, so neither friendly translator nor
1097
+ * `--set-raw` can reach the wire surface. Carry
1098
+ * `deferred_to: "v0.4"`; hint flags the multipart-upload nature.
1099
+ * - **`time_tracking`** — verb-shaped extension (start/stop, not
1100
+ * value writes); v0.3-deferred. Carry `deferred_to: "v0.3"`;
1101
+ * hint points at the upcoming verb surface.
1102
+ * - **future** (anything else — `battery`, `rating`, etc.) —
1103
+ * `deferred_to: "future"`, generic message pointing at
1104
+ * `--set-raw` provided the type accepts `change_column_value`.
684
1105
  *
685
1106
  * Exported for unit coverage.
686
1107
  */
687
1108
  export const unsupportedColumnTypeError = (columnId, type) => {
688
- const category = getColumnRoadmapCategory(type);
689
- if (category === 'read_only_forever') {
690
- return new ApiError('unsupported_column_type', `Column "${columnId}" has type "${type}", which Monday computes ` +
1109
+ const category = classifyUnsupported(type);
1110
+ const row = UNSUPPORTED_TABLE[category];
1111
+ return new ApiError('unsupported_column_type', row.message(columnId, type), {
1112
+ details: {
1113
+ column_id: columnId,
1114
+ type,
1115
+ ...row.details(columnId),
1116
+ },
1117
+ });
1118
+ };
1119
+ const classifyUnsupported = (type) => {
1120
+ if (isReadOnlyForeverType(type))
1121
+ return 'read_only_forever';
1122
+ if (isV0_2WriterExpansionType(type))
1123
+ return 'v0_2_writer_expansion';
1124
+ if (isFilesShapedType(type))
1125
+ return 'files_shaped';
1126
+ if (type === 'time_tracking')
1127
+ return 'time_tracking';
1128
+ return 'future';
1129
+ };
1130
+ const UNSUPPORTED_TABLE = {
1131
+ read_only_forever: {
1132
+ message: (columnId, type) => `Column "${columnId}" has type "${type}", which Monday computes ` +
691
1133
  `server-side and does not make writable via the API. This is ` +
692
1134
  `not a v0.1 limitation — Monday's API rejects write attempts ` +
693
1135
  `against this type regardless of CLI version, so no future ` +
694
1136
  `release will lift the restriction. Set the underlying source ` +
695
1137
  `column instead (e.g. for a mirror column, write to the column ` +
696
- `the mirror reflects on the linked board).`, {
697
- details: {
698
- column_id: columnId,
699
- type,
700
- read_only: true,
701
- hint: 'this column type is computed by Monday and is permanently ' +
702
- 'read-only via the API. Do not attempt --set / --set-raw ' +
703
- 'identify the underlying source column (the column the ' +
704
- 'mirror / formula / auto_number / etc. reflects) and write ' +
705
- 'to that instead. See cli-design.md §5.3 writer-expansion ' +
706
- 'roadmap (read-only-forever row) for the full type list.',
707
- },
708
- });
709
- }
710
- if (category === 'v0_2_writer_expansion') {
711
- return new ApiError('unsupported_column_type', `Column "${columnId}" has type "${type}", which is not yet in the ` +
1138
+ `the mirror reflects on the linked board).`,
1139
+ details: () => ({
1140
+ read_only: true,
1141
+ hint: 'this column type is computed by Monday and is permanently ' +
1142
+ 'read-only via the API. Do not attempt --set / --set-raw — ' +
1143
+ 'identify the underlying source column (the column the ' +
1144
+ 'mirror / formula / auto_number / etc. reflects) and write ' +
1145
+ 'to that instead. See cli-design.md §5.3 writer-expansion ' +
1146
+ 'roadmap (read-only-forever row) for the full type list.',
1147
+ }),
1148
+ },
1149
+ v0_2_writer_expansion: {
1150
+ message: (columnId, type) => `Column "${columnId}" has type "${type}", which is not yet in the ` +
712
1151
  `friendly --set translator allowlist. The v0.2 writer-expansion ` +
713
1152
  `tentative row (tags / board_relation / dependency) slipped to ` +
714
1153
  `v0.3 at M18 close — friendly translators land then once the ` +
715
1154
  `per-account directory + linked-board enumeration design clears. ` +
716
1155
  `Use --set-raw <col>=<json> with the documented Monday wire shape ` +
717
- `in the meantime.`, {
718
- details: {
719
- column_id: columnId,
720
- type,
721
- deferred_to: 'v0.3',
722
- hint: `use --set-raw <col>=<json> with the Monday wire shape (e.g. ` +
723
- `--set-raw ${columnId}='{"tag_ids":[1,2]}' for tags). ` +
724
- `See https://developer.monday.com/api-reference/reference/` +
725
- `column-types-reference for per-type wire shapes.`,
726
- },
727
- });
728
- }
729
- // category === 'future'
730
- // Files-shaped types are pinned to `deferred_to: "v0.4"` per
731
- // cli-design.md §5.3 writer-expansion roadmap (the "files" row).
732
- // Monday writes these via `add_file_to_column` (multipart upload)
733
- // rather than `change_column_value`, so the friendly translator
734
- // can't translate them at all and `--set-raw` also rejects them
735
- // (different code path; raw-write.ts emits the same v0.4
736
- // deferral). Without this branch, files-shaped types would fall
737
- // through to the generic `future` branch and contradict the
738
- // contract — Codex M18 round-2 P2.
739
- if (isFilesShapedType(type)) {
740
- return new ApiError('unsupported_column_type', `Column "${columnId}" has type "${type}", which Monday writes ` +
1156
+ `in the meantime.`,
1157
+ details: (columnId) => ({
1158
+ deferred_to: 'v0.3',
1159
+ hint: `use --set-raw <col>=<json> with the Monday wire shape (e.g. ` +
1160
+ `--set-raw ${columnId}='{"tag_ids":[1,2]}' for tags). ` +
1161
+ `See https://developer.monday.com/api-reference/reference/` +
1162
+ `column-types-reference for per-type wire shapes.`,
1163
+ }),
1164
+ },
1165
+ files_shaped: {
1166
+ message: (columnId, type) => `Column "${columnId}" has type "${type}", which Monday writes ` +
741
1167
  `via add_file_to_column (multipart upload) rather than ` +
742
1168
  `change_column_value. The friendly --set translator can't ` +
743
1169
  `reach this surface; --set-raw <col>=<json> can't either. ` +
744
- `Asset upload is pinned to v0.4 per cli-design.md §13.`, {
745
- details: {
746
- column_id: columnId,
747
- type,
748
- deferred_to: 'v0.4',
749
- hint: 'asset upload is a v0.4 deferral; the underlying mutation ' +
750
- '(add_file_to_column) requires multipart wire shape that ' +
751
- 'the column-value path does not model.',
752
- },
753
- });
754
- }
755
- // `time_tracking` is pinned to `deferred_to: "v0.3"` per
756
- // cli-design.md §5.3 writer-expansion roadmap row. It's a v0.3
757
- // deferral because the semantics are start/stop verbs (not value
758
- // writes), so the friendly translator can't represent it without
759
- // a verb-shaped extension. `--set-raw` rejects similarly.
760
- if (type === 'time_tracking') {
761
- return new ApiError('unsupported_column_type', `Column "${columnId}" has type "time_tracking", which Monday ` +
1170
+ `Asset upload is pinned to v0.4 per cli-design.md §13.`,
1171
+ details: () => ({
1172
+ deferred_to: 'v0.4',
1173
+ hint: 'asset upload is a v0.4 deferral; the underlying mutation ' +
1174
+ '(add_file_to_column) requires multipart wire shape that ' +
1175
+ 'the column-value path does not model.',
1176
+ }),
1177
+ },
1178
+ time_tracking: {
1179
+ message: (columnId) => `Column "${columnId}" has type "time_tracking", which Monday ` +
762
1180
  `mutates via start/stop verbs rather than column-value writes. ` +
763
1181
  `The friendly --set translator and --set-raw both target ` +
764
- `change_column_value-shaped types; time_tracking needs a ` +
765
- `verb-shaped extension pinned for v0.3.`, {
766
- details: {
767
- column_id: columnId,
768
- type,
769
- deferred_to: 'v0.3',
770
- hint: 'time_tracking uses start/stop verbs, not column-value ' +
771
- 'writes. v0.3 plans a dedicated surface; until then there ' +
772
- 'is no friendly or raw write path.',
773
- },
774
- });
775
- }
776
- return new ApiError('unsupported_column_type', `Column "${columnId}" has type "${type}", which is not in the ` +
777
- `friendly --set translator allowlist (text, long_text, numbers, ` +
778
- `status, dropdown, date, people, link, email, phone) and is not ` +
779
- `pinned to a specific roadmap version. Try --set-raw <col>=<json> ` +
780
- `with the documented Monday wire shape that path accepts any ` +
781
- `type Monday writes via change_column_value. Files-shaped types ` +
782
- `(file) and read-only-forever types (mirror / formula / etc.) are ` +
783
- `the exception; --set-raw rejects those at column-resolution time.`, {
784
- details: {
785
- column_id: columnId,
786
- type,
1182
+ `change_column_value-shaped types; time_tracking surfaces ` +
1183
+ `as the verb-shaped \`monday item time-track start/stop\` ` +
1184
+ `pair (v0.3 M20, cli-design §5.2 carve-out 2).`,
1185
+ details: () => ({
1186
+ // v0.3 ships the verb names as documentation-only — empirical
1187
+ // probe (2026-05-10, API version 2026-01) confirmed Monday's
1188
+ // public API does not currently support time_tracking writes
1189
+ // via either change_simple_column_value or change_column_value.
1190
+ // The `deferred_to` slot tracks the milestone the verb pair
1191
+ // landed at, not the milestone the wire mutation will ship at
1192
+ // (which is on Monday's roadmap, not ours).
1193
+ deferred_to: 'v0.3',
1194
+ hint: 'time_tracking uses start/stop verbs, not column-value ' +
1195
+ 'writes. The verbs `monday item time-track start <iid>` / ' +
1196
+ '`monday item time-track stop <iid>` are registered for ' +
1197
+ 'forward-compatibility but currently throw `usage_error` ' +
1198
+ "Monday's public API does not yet expose a write path for " +
1199
+ 'time_tracking columns (probed 2026-05-10). Use Monday\'s ' +
1200
+ 'UI to start/stop time-tracking sessions until API support ' +
1201
+ 'ships.',
1202
+ }),
1203
+ },
1204
+ future: {
1205
+ message: (columnId, type) => `Column "${columnId}" has type "${type}", which is not in the ` +
1206
+ `friendly --set translator allowlist (text, long_text, numbers, ` +
1207
+ `status, dropdown, date, people, link, email, phone) and is not ` +
1208
+ `pinned to a specific roadmap version. Try --set-raw <col>=<json> ` +
1209
+ `with the documented Monday wire shape — that path accepts any ` +
1210
+ `type Monday writes via change_column_value. Files-shaped types ` +
1211
+ `(file) and read-only-forever types (mirror / formula / etc.) are ` +
1212
+ `the exception; --set-raw rejects those at column-resolution time.`,
1213
+ details: () => ({
787
1214
  deferred_to: 'future',
788
1215
  hint: 'use --set-raw <col>=<json> with the Monday wire shape if the ' +
789
1216
  'type accepts change_column_value. Examples in this bucket ' +
790
1217
  '(battery, rating) are not yet scoped on the writer-expansion ' +
791
1218
  'roadmap. See cli-design.md §5.3.',
792
- },
793
- });
1219
+ }),
1220
+ },
794
1221
  };
795
1222
  //# sourceMappingURL=column-values.js.map