monday-cli 0.2.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 (596) hide show
  1. package/CHANGELOG.md +439 -0
  2. package/LICENSE +21 -0
  3. package/README.md +431 -0
  4. package/dist/api/board-child-finder.d.ts +95 -0
  5. package/dist/api/board-child-finder.d.ts.map +1 -0
  6. package/dist/api/board-child-finder.js +89 -0
  7. package/dist/api/board-child-finder.js.map +1 -0
  8. package/dist/api/board-metadata.d.ts +162 -0
  9. package/dist/api/board-metadata.d.ts.map +1 -0
  10. package/dist/api/board-metadata.js +238 -0
  11. package/dist/api/board-metadata.js.map +1 -0
  12. package/dist/api/board-mutation-invalidation.d.ts +153 -0
  13. package/dist/api/board-mutation-invalidation.d.ts.map +1 -0
  14. package/dist/api/board-mutation-invalidation.js +136 -0
  15. package/dist/api/board-mutation-invalidation.js.map +1 -0
  16. package/dist/api/board-mutation-result.d.ts +97 -0
  17. package/dist/api/board-mutation-result.d.ts.map +1 -0
  18. package/dist/api/board-mutation-result.js +99 -0
  19. package/dist/api/board-mutation-result.js.map +1 -0
  20. package/dist/api/board-projection.d.ts +68 -0
  21. package/dist/api/board-projection.d.ts.map +1 -0
  22. package/dist/api/board-projection.js +79 -0
  23. package/dist/api/board-projection.js.map +1 -0
  24. package/dist/api/cache.d.ts +150 -0
  25. package/dist/api/cache.d.ts.map +1 -0
  26. package/dist/api/cache.js +418 -0
  27. package/dist/api/cache.js.map +1 -0
  28. package/dist/api/client.d.ts +162 -0
  29. package/dist/api/client.d.ts.map +1 -0
  30. package/dist/api/client.js +205 -0
  31. package/dist/api/client.js.map +1 -0
  32. package/dist/api/column-mapping.d.ts +68 -0
  33. package/dist/api/column-mapping.d.ts.map +1 -0
  34. package/dist/api/column-mapping.js +117 -0
  35. package/dist/api/column-mapping.js.map +1 -0
  36. package/dist/api/column-mutation-result.d.ts +136 -0
  37. package/dist/api/column-mutation-result.d.ts.map +1 -0
  38. package/dist/api/column-mutation-result.js +130 -0
  39. package/dist/api/column-mutation-result.js.map +1 -0
  40. package/dist/api/column-types.d.ts +215 -0
  41. package/dist/api/column-types.d.ts.map +1 -0
  42. package/dist/api/column-types.js +195 -0
  43. package/dist/api/column-types.js.map +1 -0
  44. package/dist/api/column-values.d.ts +446 -0
  45. package/dist/api/column-values.d.ts.map +1 -0
  46. package/dist/api/column-values.js +795 -0
  47. package/dist/api/column-values.js.map +1 -0
  48. package/dist/api/columns.d.ts +205 -0
  49. package/dist/api/columns.d.ts.map +1 -0
  50. package/dist/api/columns.js +343 -0
  51. package/dist/api/columns.js.map +1 -0
  52. package/dist/api/complexity.d.ts +90 -0
  53. package/dist/api/complexity.d.ts.map +1 -0
  54. package/dist/api/complexity.js +194 -0
  55. package/dist/api/complexity.js.map +1 -0
  56. package/dist/api/dates.d.ts +150 -0
  57. package/dist/api/dates.d.ts.map +1 -0
  58. package/dist/api/dates.js +490 -0
  59. package/dist/api/dates.js.map +1 -0
  60. package/dist/api/destructive-gate.d.ts +107 -0
  61. package/dist/api/destructive-gate.d.ts.map +1 -0
  62. package/dist/api/destructive-gate.js +19 -0
  63. package/dist/api/destructive-gate.js.map +1 -0
  64. package/dist/api/dry-run.d.ts +338 -0
  65. package/dist/api/dry-run.d.ts.map +1 -0
  66. package/dist/api/dry-run.js +607 -0
  67. package/dist/api/dry-run.js.map +1 -0
  68. package/dist/api/emails.d.ts +60 -0
  69. package/dist/api/emails.d.ts.map +1 -0
  70. package/dist/api/emails.js +113 -0
  71. package/dist/api/emails.js.map +1 -0
  72. package/dist/api/errors.d.ts +82 -0
  73. package/dist/api/errors.d.ts.map +1 -0
  74. package/dist/api/errors.js +434 -0
  75. package/dist/api/errors.js.map +1 -0
  76. package/dist/api/filters.d.ts +198 -0
  77. package/dist/api/filters.d.ts.map +1 -0
  78. package/dist/api/filters.js +328 -0
  79. package/dist/api/filters.js.map +1 -0
  80. package/dist/api/group-color.d.ts +33 -0
  81. package/dist/api/group-color.d.ts.map +1 -0
  82. package/dist/api/group-color.js +80 -0
  83. package/dist/api/group-color.js.map +1 -0
  84. package/dist/api/group-mutation-result.d.ts +150 -0
  85. package/dist/api/group-mutation-result.d.ts.map +1 -0
  86. package/dist/api/group-mutation-result.js +141 -0
  87. package/dist/api/group-mutation-result.js.map +1 -0
  88. package/dist/api/iso-country-codes.d.ts +45 -0
  89. package/dist/api/iso-country-codes.d.ts.map +1 -0
  90. package/dist/api/iso-country-codes.js +71 -0
  91. package/dist/api/iso-country-codes.js.map +1 -0
  92. package/dist/api/item-board-lookup.d.ts +86 -0
  93. package/dist/api/item-board-lookup.d.ts.map +1 -0
  94. package/dist/api/item-board-lookup.js +140 -0
  95. package/dist/api/item-board-lookup.js.map +1 -0
  96. package/dist/api/item-helpers.d.ts +133 -0
  97. package/dist/api/item-helpers.d.ts.map +1 -0
  98. package/dist/api/item-helpers.js +139 -0
  99. package/dist/api/item-helpers.js.map +1 -0
  100. package/dist/api/item-mutation-result.d.ts +60 -0
  101. package/dist/api/item-mutation-result.d.ts.map +1 -0
  102. package/dist/api/item-mutation-result.js +63 -0
  103. package/dist/api/item-mutation-result.js.map +1 -0
  104. package/dist/api/item-projection.d.ts +165 -0
  105. package/dist/api/item-projection.d.ts.map +1 -0
  106. package/dist/api/item-projection.js +235 -0
  107. package/dist/api/item-projection.js.map +1 -0
  108. package/dist/api/item-source-read.d.ts +45 -0
  109. package/dist/api/item-source-read.d.ts.map +1 -0
  110. package/dist/api/item-source-read.js +57 -0
  111. package/dist/api/item-source-read.js.map +1 -0
  112. package/dist/api/items-page-walker.d.ts +126 -0
  113. package/dist/api/items-page-walker.d.ts.map +1 -0
  114. package/dist/api/items-page-walker.js +256 -0
  115. package/dist/api/items-page-walker.js.map +1 -0
  116. package/dist/api/links.d.ts +70 -0
  117. package/dist/api/links.d.ts.map +1 -0
  118. package/dist/api/links.js +128 -0
  119. package/dist/api/links.js.map +1 -0
  120. package/dist/api/me-token.d.ts +52 -0
  121. package/dist/api/me-token.d.ts.map +1 -0
  122. package/dist/api/me-token.js +55 -0
  123. package/dist/api/me-token.js.map +1 -0
  124. package/dist/api/pagination.d.ts +201 -0
  125. package/dist/api/pagination.d.ts.map +1 -0
  126. package/dist/api/pagination.js +223 -0
  127. package/dist/api/pagination.js.map +1 -0
  128. package/dist/api/partial-success-mutation.d.ts +28 -0
  129. package/dist/api/partial-success-mutation.d.ts.map +1 -0
  130. package/dist/api/partial-success-mutation.js +68 -0
  131. package/dist/api/partial-success-mutation.js.map +1 -0
  132. package/dist/api/people.d.ts +182 -0
  133. package/dist/api/people.d.ts.map +1 -0
  134. package/dist/api/people.js +260 -0
  135. package/dist/api/people.js.map +1 -0
  136. package/dist/api/phones.d.ts +74 -0
  137. package/dist/api/phones.d.ts.map +1 -0
  138. package/dist/api/phones.js +167 -0
  139. package/dist/api/phones.js.map +1 -0
  140. package/dist/api/raw-document.d.ts +53 -0
  141. package/dist/api/raw-document.d.ts.map +1 -0
  142. package/dist/api/raw-document.js +177 -0
  143. package/dist/api/raw-document.js.map +1 -0
  144. package/dist/api/raw-write.d.ts +127 -0
  145. package/dist/api/raw-write.d.ts.map +1 -0
  146. package/dist/api/raw-write.js +233 -0
  147. package/dist/api/raw-write.js.map +1 -0
  148. package/dist/api/resolution-context.d.ts +32 -0
  149. package/dist/api/resolution-context.d.ts.map +1 -0
  150. package/dist/api/resolution-context.js +42 -0
  151. package/dist/api/resolution-context.js.map +1 -0
  152. package/dist/api/resolution-pass.d.ts +163 -0
  153. package/dist/api/resolution-pass.d.ts.map +1 -0
  154. package/dist/api/resolution-pass.js +254 -0
  155. package/dist/api/resolution-pass.js.map +1 -0
  156. package/dist/api/resolve-client.d.ts +69 -0
  157. package/dist/api/resolve-client.d.ts.map +1 -0
  158. package/dist/api/resolve-client.js +70 -0
  159. package/dist/api/resolve-client.js.map +1 -0
  160. package/dist/api/resolver-error-fold.d.ts +176 -0
  161. package/dist/api/resolver-error-fold.d.ts.map +1 -0
  162. package/dist/api/resolver-error-fold.js +230 -0
  163. package/dist/api/resolver-error-fold.js.map +1 -0
  164. package/dist/api/resolvers.d.ts +131 -0
  165. package/dist/api/resolvers.d.ts.map +1 -0
  166. package/dist/api/resolvers.js +262 -0
  167. package/dist/api/resolvers.js.map +1 -0
  168. package/dist/api/response-root.d.ts +65 -0
  169. package/dist/api/response-root.d.ts.map +1 -0
  170. package/dist/api/response-root.js +61 -0
  171. package/dist/api/response-root.js.map +1 -0
  172. package/dist/api/retry.d.ts +112 -0
  173. package/dist/api/retry.d.ts.map +1 -0
  174. package/dist/api/retry.js +181 -0
  175. package/dist/api/retry.js.map +1 -0
  176. package/dist/api/set-expression.d.ts +23 -0
  177. package/dist/api/set-expression.d.ts.map +1 -0
  178. package/dist/api/set-expression.js +31 -0
  179. package/dist/api/set-expression.js.map +1 -0
  180. package/dist/api/sort.d.ts +59 -0
  181. package/dist/api/sort.d.ts.map +1 -0
  182. package/dist/api/sort.js +73 -0
  183. package/dist/api/sort.js.map +1 -0
  184. package/dist/api/source-aggregator.d.ts +94 -0
  185. package/dist/api/source-aggregator.d.ts.map +1 -0
  186. package/dist/api/source-aggregator.js +111 -0
  187. package/dist/api/source-aggregator.js.map +1 -0
  188. package/dist/api/transport.d.ts +58 -0
  189. package/dist/api/transport.d.ts.map +1 -0
  190. package/dist/api/transport.js +190 -0
  191. package/dist/api/transport.js.map +1 -0
  192. package/dist/api/update-mutation-result.d.ts +133 -0
  193. package/dist/api/update-mutation-result.d.ts.map +1 -0
  194. package/dist/api/update-mutation-result.js +145 -0
  195. package/dist/api/update-mutation-result.js.map +1 -0
  196. package/dist/api/users-fan-out-mutation.d.ts +124 -0
  197. package/dist/api/users-fan-out-mutation.d.ts.map +1 -0
  198. package/dist/api/users-fan-out-mutation.js +331 -0
  199. package/dist/api/users-fan-out-mutation.js.map +1 -0
  200. package/dist/api/walk-pages.d.ts +91 -0
  201. package/dist/api/walk-pages.d.ts.map +1 -0
  202. package/dist/api/walk-pages.js +84 -0
  203. package/dist/api/walk-pages.js.map +1 -0
  204. package/dist/api/workspace-projection.d.ts +64 -0
  205. package/dist/api/workspace-projection.d.ts.map +1 -0
  206. package/dist/api/workspace-projection.js +83 -0
  207. package/dist/api/workspace-projection.js.map +1 -0
  208. package/dist/cli/envelope-out.d.ts +128 -0
  209. package/dist/cli/envelope-out.d.ts.map +1 -0
  210. package/dist/cli/envelope-out.js +146 -0
  211. package/dist/cli/envelope-out.js.map +1 -0
  212. package/dist/cli/index.d.ts +3 -0
  213. package/dist/cli/index.d.ts.map +1 -0
  214. package/dist/cli/index.js +27 -0
  215. package/dist/cli/index.js.map +1 -0
  216. package/dist/cli/program.d.ts +29 -0
  217. package/dist/cli/program.d.ts.map +1 -0
  218. package/dist/cli/program.js +109 -0
  219. package/dist/cli/program.js.map +1 -0
  220. package/dist/cli/run.d.ts +108 -0
  221. package/dist/cli/run.d.ts.map +1 -0
  222. package/dist/cli/run.js +105 -0
  223. package/dist/cli/run.js.map +1 -0
  224. package/dist/commands/account/client-helper.d.ts +37 -0
  225. package/dist/commands/account/client-helper.d.ts.map +1 -0
  226. package/dist/commands/account/client-helper.js +55 -0
  227. package/dist/commands/account/client-helper.js.map +1 -0
  228. package/dist/commands/account/complexity.d.ts +29 -0
  229. package/dist/commands/account/complexity.d.ts.map +1 -0
  230. package/dist/commands/account/complexity.js +70 -0
  231. package/dist/commands/account/complexity.js.map +1 -0
  232. package/dist/commands/account/info.d.ts +36 -0
  233. package/dist/commands/account/info.d.ts.map +1 -0
  234. package/dist/commands/account/info.js +74 -0
  235. package/dist/commands/account/info.js.map +1 -0
  236. package/dist/commands/account/version.d.ts +44 -0
  237. package/dist/commands/account/version.d.ts.map +1 -0
  238. package/dist/commands/account/version.js +98 -0
  239. package/dist/commands/account/version.js.map +1 -0
  240. package/dist/commands/account/whoami.d.ts +34 -0
  241. package/dist/commands/account/whoami.d.ts.map +1 -0
  242. package/dist/commands/account/whoami.js +77 -0
  243. package/dist/commands/account/whoami.js.map +1 -0
  244. package/dist/commands/board/add-users.d.ts +60 -0
  245. package/dist/commands/board/add-users.d.ts.map +1 -0
  246. package/dist/commands/board/add-users.js +133 -0
  247. package/dist/commands/board/add-users.js.map +1 -0
  248. package/dist/commands/board/archive.d.ts +64 -0
  249. package/dist/commands/board/archive.d.ts.map +1 -0
  250. package/dist/commands/board/archive.js +226 -0
  251. package/dist/commands/board/archive.js.map +1 -0
  252. package/dist/commands/board/column-create.d.ts +146 -0
  253. package/dist/commands/board/column-create.d.ts.map +1 -0
  254. package/dist/commands/board/column-create.js +564 -0
  255. package/dist/commands/board/column-create.js.map +1 -0
  256. package/dist/commands/board/column-delete.d.ts +76 -0
  257. package/dist/commands/board/column-delete.d.ts.map +1 -0
  258. package/dist/commands/board/column-delete.js +224 -0
  259. package/dist/commands/board/column-delete.js.map +1 -0
  260. package/dist/commands/board/column-update.d.ts +92 -0
  261. package/dist/commands/board/column-update.d.ts.map +1 -0
  262. package/dist/commands/board/column-update.js +364 -0
  263. package/dist/commands/board/column-update.js.map +1 -0
  264. package/dist/commands/board/columns.d.ts +30 -0
  265. package/dist/commands/board/columns.d.ts.map +1 -0
  266. package/dist/commands/board/columns.js +102 -0
  267. package/dist/commands/board/columns.js.map +1 -0
  268. package/dist/commands/board/create.d.ts +67 -0
  269. package/dist/commands/board/create.d.ts.map +1 -0
  270. package/dist/commands/board/create.js +226 -0
  271. package/dist/commands/board/create.js.map +1 -0
  272. package/dist/commands/board/delete.d.ts +60 -0
  273. package/dist/commands/board/delete.d.ts.map +1 -0
  274. package/dist/commands/board/delete.js +192 -0
  275. package/dist/commands/board/delete.js.map +1 -0
  276. package/dist/commands/board/describe.d.ts +68 -0
  277. package/dist/commands/board/describe.d.ts.map +1 -0
  278. package/dist/commands/board/describe.js +241 -0
  279. package/dist/commands/board/describe.js.map +1 -0
  280. package/dist/commands/board/doctor.d.ts +108 -0
  281. package/dist/commands/board/doctor.d.ts.map +1 -0
  282. package/dist/commands/board/doctor.js +417 -0
  283. package/dist/commands/board/doctor.js.map +1 -0
  284. package/dist/commands/board/duplicate.d.ts +85 -0
  285. package/dist/commands/board/duplicate.d.ts.map +1 -0
  286. package/dist/commands/board/duplicate.js +281 -0
  287. package/dist/commands/board/duplicate.js.map +1 -0
  288. package/dist/commands/board/find.d.ts +47 -0
  289. package/dist/commands/board/find.d.ts.map +1 -0
  290. package/dist/commands/board/find.js +153 -0
  291. package/dist/commands/board/find.js.map +1 -0
  292. package/dist/commands/board/get.d.ts +41 -0
  293. package/dist/commands/board/get.d.ts.map +1 -0
  294. package/dist/commands/board/get.js +66 -0
  295. package/dist/commands/board/get.js.map +1 -0
  296. package/dist/commands/board/group-archive.d.ts +83 -0
  297. package/dist/commands/board/group-archive.d.ts.map +1 -0
  298. package/dist/commands/board/group-archive.js +264 -0
  299. package/dist/commands/board/group-archive.js.map +1 -0
  300. package/dist/commands/board/group-create.d.ts +118 -0
  301. package/dist/commands/board/group-create.d.ts.map +1 -0
  302. package/dist/commands/board/group-create.js +239 -0
  303. package/dist/commands/board/group-create.js.map +1 -0
  304. package/dist/commands/board/group-delete.d.ts +79 -0
  305. package/dist/commands/board/group-delete.d.ts.map +1 -0
  306. package/dist/commands/board/group-delete.js +222 -0
  307. package/dist/commands/board/group-delete.js.map +1 -0
  308. package/dist/commands/board/group-duplicate.d.ts +70 -0
  309. package/dist/commands/board/group-duplicate.d.ts.map +1 -0
  310. package/dist/commands/board/group-duplicate.js +219 -0
  311. package/dist/commands/board/group-duplicate.js.map +1 -0
  312. package/dist/commands/board/group-update.d.ts +145 -0
  313. package/dist/commands/board/group-update.d.ts.map +1 -0
  314. package/dist/commands/board/group-update.js +341 -0
  315. package/dist/commands/board/group-update.js.map +1 -0
  316. package/dist/commands/board/groups.d.ts +28 -0
  317. package/dist/commands/board/groups.d.ts.map +1 -0
  318. package/dist/commands/board/groups.js +85 -0
  319. package/dist/commands/board/groups.js.map +1 -0
  320. package/dist/commands/board/list.d.ts +39 -0
  321. package/dist/commands/board/list.d.ts.map +1 -0
  322. package/dist/commands/board/list.js +135 -0
  323. package/dist/commands/board/list.js.map +1 -0
  324. package/dist/commands/board/subscribers.d.ts +24 -0
  325. package/dist/commands/board/subscribers.d.ts.map +1 -0
  326. package/dist/commands/board/subscribers.js +89 -0
  327. package/dist/commands/board/subscribers.js.map +1 -0
  328. package/dist/commands/board/update.d.ts +82 -0
  329. package/dist/commands/board/update.d.ts.map +1 -0
  330. package/dist/commands/board/update.js +328 -0
  331. package/dist/commands/board/update.js.map +1 -0
  332. package/dist/commands/cache/clear.d.ts +34 -0
  333. package/dist/commands/cache/clear.d.ts.map +1 -0
  334. package/dist/commands/cache/clear.js +113 -0
  335. package/dist/commands/cache/clear.js.map +1 -0
  336. package/dist/commands/cache/list.d.ts +50 -0
  337. package/dist/commands/cache/list.d.ts.map +1 -0
  338. package/dist/commands/cache/list.js +77 -0
  339. package/dist/commands/cache/list.js.map +1 -0
  340. package/dist/commands/cache/stats.d.ts +22 -0
  341. package/dist/commands/cache/stats.d.ts.map +1 -0
  342. package/dist/commands/cache/stats.js +56 -0
  343. package/dist/commands/cache/stats.js.map +1 -0
  344. package/dist/commands/config/path.d.ts +22 -0
  345. package/dist/commands/config/path.d.ts.map +1 -0
  346. package/dist/commands/config/path.js +74 -0
  347. package/dist/commands/config/path.js.map +1 -0
  348. package/dist/commands/config/show.d.ts +61 -0
  349. package/dist/commands/config/show.d.ts.map +1 -0
  350. package/dist/commands/config/show.js +137 -0
  351. package/dist/commands/config/show.js.map +1 -0
  352. package/dist/commands/emit.d.ts +156 -0
  353. package/dist/commands/emit.d.ts.map +1 -0
  354. package/dist/commands/emit.js +212 -0
  355. package/dist/commands/emit.js.map +1 -0
  356. package/dist/commands/index.d.ts +5 -0
  357. package/dist/commands/index.d.ts.map +1 -0
  358. package/dist/commands/index.js +195 -0
  359. package/dist/commands/index.js.map +1 -0
  360. package/dist/commands/item/archive.d.ts +81 -0
  361. package/dist/commands/item/archive.d.ts.map +1 -0
  362. package/dist/commands/item/archive.js +187 -0
  363. package/dist/commands/item/archive.js.map +1 -0
  364. package/dist/commands/item/clear.d.ts +140 -0
  365. package/dist/commands/item/clear.d.ts.map +1 -0
  366. package/dist/commands/item/clear.js +748 -0
  367. package/dist/commands/item/clear.js.map +1 -0
  368. package/dist/commands/item/create.d.ts +77 -0
  369. package/dist/commands/item/create.d.ts.map +1 -0
  370. package/dist/commands/item/create.js +802 -0
  371. package/dist/commands/item/create.js.map +1 -0
  372. package/dist/commands/item/delete.d.ts +82 -0
  373. package/dist/commands/item/delete.d.ts.map +1 -0
  374. package/dist/commands/item/delete.js +179 -0
  375. package/dist/commands/item/delete.js.map +1 -0
  376. package/dist/commands/item/duplicate.d.ts +117 -0
  377. package/dist/commands/item/duplicate.d.ts.map +1 -0
  378. package/dist/commands/item/duplicate.js +238 -0
  379. package/dist/commands/item/duplicate.js.map +1 -0
  380. package/dist/commands/item/find.d.ts +55 -0
  381. package/dist/commands/item/find.d.ts.map +1 -0
  382. package/dist/commands/item/find.js +231 -0
  383. package/dist/commands/item/find.js.map +1 -0
  384. package/dist/commands/item/get.d.ts +47 -0
  385. package/dist/commands/item/get.d.ts.map +1 -0
  386. package/dist/commands/item/get.js +66 -0
  387. package/dist/commands/item/get.js.map +1 -0
  388. package/dist/commands/item/list.d.ts +73 -0
  389. package/dist/commands/item/list.d.ts.map +1 -0
  390. package/dist/commands/item/list.js +284 -0
  391. package/dist/commands/item/list.js.map +1 -0
  392. package/dist/commands/item/move.d.ts +181 -0
  393. package/dist/commands/item/move.d.ts.map +1 -0
  394. package/dist/commands/item/move.js +560 -0
  395. package/dist/commands/item/move.js.map +1 -0
  396. package/dist/commands/item/search.d.ts +67 -0
  397. package/dist/commands/item/search.d.ts.map +1 -0
  398. package/dist/commands/item/search.js +322 -0
  399. package/dist/commands/item/search.js.map +1 -0
  400. package/dist/commands/item/set.d.ts +88 -0
  401. package/dist/commands/item/set.d.ts.map +1 -0
  402. package/dist/commands/item/set.js +387 -0
  403. package/dist/commands/item/set.js.map +1 -0
  404. package/dist/commands/item/subitems.d.ts +50 -0
  405. package/dist/commands/item/subitems.d.ts.map +1 -0
  406. package/dist/commands/item/subitems.js +86 -0
  407. package/dist/commands/item/subitems.js.map +1 -0
  408. package/dist/commands/item/update.d.ts +99 -0
  409. package/dist/commands/item/update.d.ts.map +1 -0
  410. package/dist/commands/item/update.js +884 -0
  411. package/dist/commands/item/update.js.map +1 -0
  412. package/dist/commands/item/upsert.d.ts +105 -0
  413. package/dist/commands/item/upsert.d.ts.map +1 -0
  414. package/dist/commands/item/upsert.js +998 -0
  415. package/dist/commands/item/upsert.js.map +1 -0
  416. package/dist/commands/parse-argv.d.ts +20 -0
  417. package/dist/commands/parse-argv.d.ts.map +1 -0
  418. package/dist/commands/parse-argv.js +40 -0
  419. package/dist/commands/parse-argv.js.map +1 -0
  420. package/dist/commands/raw/index.d.ts +23 -0
  421. package/dist/commands/raw/index.d.ts.map +1 -0
  422. package/dist/commands/raw/index.js +416 -0
  423. package/dist/commands/raw/index.js.map +1 -0
  424. package/dist/commands/run-by-id-lookup.d.ts +72 -0
  425. package/dist/commands/run-by-id-lookup.d.ts.map +1 -0
  426. package/dist/commands/run-by-id-lookup.js +58 -0
  427. package/dist/commands/run-by-id-lookup.js.map +1 -0
  428. package/dist/commands/schema/index.d.ts +104 -0
  429. package/dist/commands/schema/index.d.ts.map +1 -0
  430. package/dist/commands/schema/index.js +183 -0
  431. package/dist/commands/schema/index.js.map +1 -0
  432. package/dist/commands/types.d.ts +66 -0
  433. package/dist/commands/types.d.ts.map +1 -0
  434. package/dist/commands/types.js +15 -0
  435. package/dist/commands/types.js.map +1 -0
  436. package/dist/commands/update/body-source.d.ts +38 -0
  437. package/dist/commands/update/body-source.d.ts.map +1 -0
  438. package/dist/commands/update/body-source.js +80 -0
  439. package/dist/commands/update/body-source.js.map +1 -0
  440. package/dist/commands/update/clear-all.d.ts +67 -0
  441. package/dist/commands/update/clear-all.d.ts.map +1 -0
  442. package/dist/commands/update/clear-all.js +281 -0
  443. package/dist/commands/update/clear-all.js.map +1 -0
  444. package/dist/commands/update/create.d.ts +51 -0
  445. package/dist/commands/update/create.d.ts.map +1 -0
  446. package/dist/commands/update/create.js +167 -0
  447. package/dist/commands/update/create.js.map +1 -0
  448. package/dist/commands/update/delete.d.ts +53 -0
  449. package/dist/commands/update/delete.d.ts.map +1 -0
  450. package/dist/commands/update/delete.js +148 -0
  451. package/dist/commands/update/delete.js.map +1 -0
  452. package/dist/commands/update/edit.d.ts +37 -0
  453. package/dist/commands/update/edit.d.ts.map +1 -0
  454. package/dist/commands/update/edit.js +129 -0
  455. package/dist/commands/update/edit.js.map +1 -0
  456. package/dist/commands/update/get.d.ts +37 -0
  457. package/dist/commands/update/get.d.ts.map +1 -0
  458. package/dist/commands/update/get.js +92 -0
  459. package/dist/commands/update/get.js.map +1 -0
  460. package/dist/commands/update/like.d.ts +17 -0
  461. package/dist/commands/update/like.d.ts.map +1 -0
  462. package/dist/commands/update/like.js +23 -0
  463. package/dist/commands/update/like.js.map +1 -0
  464. package/dist/commands/update/list.d.ts +58 -0
  465. package/dist/commands/update/list.d.ts.map +1 -0
  466. package/dist/commands/update/list.js +322 -0
  467. package/dist/commands/update/list.js.map +1 -0
  468. package/dist/commands/update/pin.d.ts +17 -0
  469. package/dist/commands/update/pin.d.ts.map +1 -0
  470. package/dist/commands/update/pin.js +23 -0
  471. package/dist/commands/update/pin.js.map +1 -0
  472. package/dist/commands/update/reply.d.ts +47 -0
  473. package/dist/commands/update/reply.d.ts.map +1 -0
  474. package/dist/commands/update/reply.js +149 -0
  475. package/dist/commands/update/reply.js.map +1 -0
  476. package/dist/commands/update/toggle.d.ts +70 -0
  477. package/dist/commands/update/toggle.d.ts.map +1 -0
  478. package/dist/commands/update/toggle.js +118 -0
  479. package/dist/commands/update/toggle.js.map +1 -0
  480. package/dist/commands/update/unlike.d.ts +17 -0
  481. package/dist/commands/update/unlike.d.ts.map +1 -0
  482. package/dist/commands/update/unlike.js +22 -0
  483. package/dist/commands/update/unlike.js.map +1 -0
  484. package/dist/commands/update/unpin.d.ts +17 -0
  485. package/dist/commands/update/unpin.d.ts.map +1 -0
  486. package/dist/commands/update/unpin.js +21 -0
  487. package/dist/commands/update/unpin.js.map +1 -0
  488. package/dist/commands/user/get.d.ts +31 -0
  489. package/dist/commands/user/get.d.ts.map +1 -0
  490. package/dist/commands/user/get.js +81 -0
  491. package/dist/commands/user/get.js.map +1 -0
  492. package/dist/commands/user/list.d.ts +61 -0
  493. package/dist/commands/user/list.d.ts.map +1 -0
  494. package/dist/commands/user/list.js +148 -0
  495. package/dist/commands/user/list.js.map +1 -0
  496. package/dist/commands/user/me.d.ts +17 -0
  497. package/dist/commands/user/me.d.ts.map +1 -0
  498. package/dist/commands/user/me.js +49 -0
  499. package/dist/commands/user/me.js.map +1 -0
  500. package/dist/commands/workspace/add-users.d.ts +76 -0
  501. package/dist/commands/workspace/add-users.d.ts.map +1 -0
  502. package/dist/commands/workspace/add-users.js +154 -0
  503. package/dist/commands/workspace/add-users.js.map +1 -0
  504. package/dist/commands/workspace/create.d.ts +59 -0
  505. package/dist/commands/workspace/create.d.ts.map +1 -0
  506. package/dist/commands/workspace/create.js +163 -0
  507. package/dist/commands/workspace/create.js.map +1 -0
  508. package/dist/commands/workspace/delete.d.ts +67 -0
  509. package/dist/commands/workspace/delete.d.ts.map +1 -0
  510. package/dist/commands/workspace/delete.js +182 -0
  511. package/dist/commands/workspace/delete.js.map +1 -0
  512. package/dist/commands/workspace/folders.d.ts +40 -0
  513. package/dist/commands/workspace/folders.d.ts.map +1 -0
  514. package/dist/commands/workspace/folders.js +124 -0
  515. package/dist/commands/workspace/folders.js.map +1 -0
  516. package/dist/commands/workspace/get.d.ts +35 -0
  517. package/dist/commands/workspace/get.d.ts.map +1 -0
  518. package/dist/commands/workspace/get.js +62 -0
  519. package/dist/commands/workspace/get.js.map +1 -0
  520. package/dist/commands/workspace/list.d.ts +57 -0
  521. package/dist/commands/workspace/list.d.ts.map +1 -0
  522. package/dist/commands/workspace/list.js +125 -0
  523. package/dist/commands/workspace/list.js.map +1 -0
  524. package/dist/commands/workspace/remove-users.d.ts +47 -0
  525. package/dist/commands/workspace/remove-users.d.ts.map +1 -0
  526. package/dist/commands/workspace/remove-users.js +122 -0
  527. package/dist/commands/workspace/remove-users.js.map +1 -0
  528. package/dist/commands/workspace/update.d.ts +68 -0
  529. package/dist/commands/workspace/update.d.ts.map +1 -0
  530. package/dist/commands/workspace/update.js +237 -0
  531. package/dist/commands/workspace/update.js.map +1 -0
  532. package/dist/config/load.d.ts +33 -0
  533. package/dist/config/load.d.ts.map +1 -0
  534. package/dist/config/load.js +81 -0
  535. package/dist/config/load.js.map +1 -0
  536. package/dist/index.d.ts +3 -0
  537. package/dist/index.d.ts.map +1 -0
  538. package/dist/index.js +4 -0
  539. package/dist/index.js.map +1 -0
  540. package/dist/types/global-flags.d.ts +69 -0
  541. package/dist/types/global-flags.d.ts.map +1 -0
  542. package/dist/types/global-flags.js +170 -0
  543. package/dist/types/global-flags.js.map +1 -0
  544. package/dist/types/ids.d.ts +38 -0
  545. package/dist/types/ids.d.ts.map +1 -0
  546. package/dist/types/ids.js +51 -0
  547. package/dist/types/ids.js.map +1 -0
  548. package/dist/types/json.d.ts +60 -0
  549. package/dist/types/json.d.ts.map +1 -0
  550. package/dist/types/json.js +33 -0
  551. package/dist/types/json.js.map +1 -0
  552. package/dist/utils/errors.d.ts +121 -0
  553. package/dist/utils/errors.d.ts.map +1 -0
  554. package/dist/utils/errors.js +264 -0
  555. package/dist/utils/errors.js.map +1 -0
  556. package/dist/utils/logger.d.ts +39 -0
  557. package/dist/utils/logger.d.ts.map +1 -0
  558. package/dist/utils/logger.js +49 -0
  559. package/dist/utils/logger.js.map +1 -0
  560. package/dist/utils/output/envelope.d.ts +140 -0
  561. package/dist/utils/output/envelope.d.ts.map +1 -0
  562. package/dist/utils/output/envelope.js +120 -0
  563. package/dist/utils/output/envelope.js.map +1 -0
  564. package/dist/utils/output/json.d.ts +10 -0
  565. package/dist/utils/output/json.d.ts.map +1 -0
  566. package/dist/utils/output/json.js +12 -0
  567. package/dist/utils/output/json.js.map +1 -0
  568. package/dist/utils/output/ndjson.d.ts +92 -0
  569. package/dist/utils/output/ndjson.d.ts.map +1 -0
  570. package/dist/utils/output/ndjson.js +33 -0
  571. package/dist/utils/output/ndjson.js.map +1 -0
  572. package/dist/utils/output/select.d.ts +22 -0
  573. package/dist/utils/output/select.d.ts.map +1 -0
  574. package/dist/utils/output/select.js +47 -0
  575. package/dist/utils/output/select.js.map +1 -0
  576. package/dist/utils/output/table.d.ts +32 -0
  577. package/dist/utils/output/table.d.ts.map +1 -0
  578. package/dist/utils/output/table.js +133 -0
  579. package/dist/utils/output/table.js.map +1 -0
  580. package/dist/utils/output/text.d.ts +5 -0
  581. package/dist/utils/output/text.d.ts.map +1 -0
  582. package/dist/utils/output/text.js +32 -0
  583. package/dist/utils/output/text.js.map +1 -0
  584. package/dist/utils/parse-boundary.d.ts +53 -0
  585. package/dist/utils/parse-boundary.d.ts.map +1 -0
  586. package/dist/utils/parse-boundary.js +62 -0
  587. package/dist/utils/parse-boundary.js.map +1 -0
  588. package/dist/utils/redact.d.ts +54 -0
  589. package/dist/utils/redact.d.ts.map +1 -0
  590. package/dist/utils/redact.js +154 -0
  591. package/dist/utils/redact.js.map +1 -0
  592. package/dist/utils/request-id.d.ts +17 -0
  593. package/dist/utils/request-id.d.ts.map +1 -0
  594. package/dist/utils/request-id.js +26 -0
  595. package/dist/utils/request-id.js.map +1 -0
  596. package/package.json +87 -0
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Shared item-command helpers (R9, surfaced post-M4 in
3
+ * `v0.1-plan.md` §17; lifted as the M5b opening move).
4
+ *
5
+ * The five M4 item-read commands (`get` / `list` / `find` / `search`
6
+ * / `subitems`) and M5a's dry-run engine all spell the same item
7
+ * GraphQL projection and the same per-command scaffolding:
8
+ *
9
+ * - The `column_values { id type text value column { title } }`
10
+ * selection appeared 10× across the five item commands plus once
11
+ * in `api/dry-run.ts`. A future contract change (a new column-
12
+ * side field landing on `cli-design.md` §6.2) would otherwise
13
+ * require a 12-touch sweep.
14
+ * - The full item-shape selection (id / name / state / url /
15
+ * created_at / updated_at / board { id } / group { id title } /
16
+ * parent_item { id } / column_values { ... }) appears in `get`,
17
+ * `list` (3×), `find` (3×), `search` (2×), `subitems`, and
18
+ * `dry-run.ts`. Same one-touch contract argument.
19
+ * - `resolveMeFactory`, `collectColumnHeads`, `titleMap`, and the
20
+ * parse-then-project closure for collection commands were each
21
+ * duplicated verbatim across `list.ts` and `search.ts`.
22
+ *
23
+ * Lifting them here gives M5b's mutation surface (`item set` / `item
24
+ * clear` / `item update`) and any future bulk path one place to
25
+ * import from instead of copy-pasting from `commands/item/list.ts`.
26
+ *
27
+ * **Contract surface.** Adding a field to `COLUMN_VALUES_FRAGMENT`
28
+ * (or `ITEM_FIELDS_FRAGMENT`) widens what `cli-design.md` §6.2 /
29
+ * §6.3 surface — bumps the envelope shape across every consumer in
30
+ * lockstep, which is the point. Do not introduce per-command
31
+ * divergence; if a single command needs more fields, extend the
32
+ * fragment and accept the cross-consumer change.
33
+ */
34
+ import type { ColumnHead } from '../utils/output/envelope.js';
35
+ import { type ProjectedItem, type RawItem } from './item-projection.js';
36
+ import type { MondayClient } from './client.js';
37
+ /**
38
+ * The `column_values { ... }` selection Monday returns under every
39
+ * item shape in the v0.1 read surface. Inlined as a string because
40
+ * Monday's GraphQL surface accepts only inline expansion at the
41
+ * points the v0.1 commands use it (no `fragment ... on Item`
42
+ * registration is necessary).
43
+ *
44
+ * Indentation matches the spots every existing consumer interpolated
45
+ * — keeping the rendered query bytes identical post-lift means
46
+ * cassettes that hash on the query text continue to match without
47
+ * re-recording.
48
+ */
49
+ export declare const COLUMN_VALUES_FRAGMENT = "column_values {\n id\n type\n text\n value\n column { title }\n }";
50
+ /**
51
+ * The full item-shape selection — every scalar field the v0.1
52
+ * `cli-design.md` §6.2 contract surfaces, plus the
53
+ * `COLUMN_VALUES_FRAGMENT` expansion. Used by `item get` / `list` /
54
+ * `find` / `search` / `subitems` and by the M5a dry-run engine.
55
+ *
56
+ * Indentation lands at the column the hand-rolled queries used so
57
+ * cassette / query-text diffs stay clean post-lift.
58
+ */
59
+ export declare const ITEM_FIELDS_FRAGMENT = "id\n name\n state\n url\n created_at\n updated_at\n board { id }\n group { id title }\n parent_item { id }\n column_values {\n id\n type\n text\n value\n column { title }\n }";
60
+ /**
61
+ * Builds the `meta.columns` consolidation slot per `cli-design.md`
62
+ * §6.3 from board metadata. Same shape every collection-list
63
+ * command emits — the per-row `title` lands in the consolidated
64
+ * map, so per-cell title repeats drop from each row.
65
+ *
66
+ * Pure / synchronous; no I/O.
67
+ */
68
+ export declare const collectColumnHeads: (metadata: {
69
+ readonly columns: readonly {
70
+ readonly id: string;
71
+ readonly type: string;
72
+ readonly title: string;
73
+ }[];
74
+ }) => Readonly<Record<string, ColumnHead>>;
75
+ /**
76
+ * Builds a title-by-id map for the `projectItem` projector — the
77
+ * canonical fallback when `column.title` on the wire could drift
78
+ * (M3 metadata loader's NFC + cache rules are the source of truth).
79
+ *
80
+ * Pure / synchronous; no I/O.
81
+ */
82
+ export declare const titleMap: (metadata: {
83
+ readonly columns: readonly {
84
+ readonly id: string;
85
+ readonly title: string;
86
+ }[];
87
+ }) => ReadonlyMap<string, string>;
88
+ /**
89
+ * Builds the `me`-token resolver every people-aware filter / search
90
+ * command needs. The factory closes over the client; the returned
91
+ * function fires `client.whoami()` on demand. Callers memo-cache the
92
+ * resolved ID per build call to keep `--where Owner=me` cheap.
93
+ *
94
+ * Throws `UsageError` when the token is not associated with a
95
+ * Monday user (guest token, etc.). Defensive — the transport layer
96
+ * surfaces token-association failures as `unauthorized` before this
97
+ * resolver runs.
98
+ */
99
+ export declare const resolveMeFactory: (client: MondayClient) => (() => Promise<string>);
100
+ /**
101
+ * Parses a raw GraphQL item-shape into a `RawItem` with the R18
102
+ * parse-boundary wrap: malformed payloads surface as
103
+ * `ApiError(internal_error)` with `details.issues` rather than a
104
+ * bare ZodError that loses the failing field path.
105
+ *
106
+ * Per `validation.md` "Never bubble raw ZodError out of a parse
107
+ * boundary". Mirrors the dry-run engine's per-id wrap (`api/dry-
108
+ * run.ts fetchItem`) and `userByEmail` (`api/resolvers.ts`) — same
109
+ * pattern across every parse boundary.
110
+ *
111
+ * Optional `details` are merged into the error envelope (e.g.
112
+ * `{ item_id: '123' }`) so consumers in `item get` / `find` /
113
+ * `subitems` can scope the failure to the specific item being
114
+ * parsed.
115
+ */
116
+ export declare const parseRawItem: (raw: unknown, details?: Readonly<Record<string, unknown>>) => RawItem;
117
+ /**
118
+ * Parses one raw GraphQL item-shape and projects it into the §6.2 /
119
+ * §6.3 `ProjectedItem`. A thin wrapper around
120
+ * `parseRawItem + projectItem` so the collection commands (`list`,
121
+ * `search`) spell the same call once.
122
+ *
123
+ * `omitColumnTitles: true` is the §6.3 same-board-collection rule —
124
+ * per-cell `title` drops out of each column entry (consolidated
125
+ * into `meta.columns`). Single-resource paths (`item get`) skip
126
+ * this helper because they keep titles inline (`item-projection.ts`
127
+ * `projectItem` directly).
128
+ */
129
+ export declare const projectFromRaw: (raw: unknown, titles: ReadonlyMap<string, string>, options: {
130
+ readonly omitColumnTitles: boolean;
131
+ }) => ProjectedItem;
132
+ export type { RawItem, ProjectedItem };
133
+ //# sourceMappingURL=item-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-helpers.d.ts","sourceRoot":"","sources":["../../src/api/item-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,OAAO,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,sIAMvB,CAAC;AAEb;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,oUASG,CAAC;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU;IACR,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACrG,KACA,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAMrC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GACnB,UAAU;IACR,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9E,KACA,WAAW,CAAC,MAAM,EAAE,MAAM,CAM5B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,YAAY,KACnB,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAexB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GACvB,KAAK,OAAO,EACZ,UAAU,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KAC1C,OAQC,CAAC;AAEL;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GACzB,KAAK,OAAO,EACZ,QAAQ,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,SAAS;IAAE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;CAAE,KAC9C,aAOF,CAAC;AAEF,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,139 @@
1
+ import { UsageError } from '../utils/errors.js';
2
+ import { unwrapOrThrow } from '../utils/parse-boundary.js';
3
+ import { projectItem, rawItemSchema, } from './item-projection.js';
4
+ /**
5
+ * The `column_values { ... }` selection Monday returns under every
6
+ * item shape in the v0.1 read surface. Inlined as a string because
7
+ * Monday's GraphQL surface accepts only inline expansion at the
8
+ * points the v0.1 commands use it (no `fragment ... on Item`
9
+ * registration is necessary).
10
+ *
11
+ * Indentation matches the spots every existing consumer interpolated
12
+ * — keeping the rendered query bytes identical post-lift means
13
+ * cassettes that hash on the query text continue to match without
14
+ * re-recording.
15
+ */
16
+ export const COLUMN_VALUES_FRAGMENT = `column_values {
17
+ id
18
+ type
19
+ text
20
+ value
21
+ column { title }
22
+ }`;
23
+ /**
24
+ * The full item-shape selection — every scalar field the v0.1
25
+ * `cli-design.md` §6.2 contract surfaces, plus the
26
+ * `COLUMN_VALUES_FRAGMENT` expansion. Used by `item get` / `list` /
27
+ * `find` / `search` / `subitems` and by the M5a dry-run engine.
28
+ *
29
+ * Indentation lands at the column the hand-rolled queries used so
30
+ * cassette / query-text diffs stay clean post-lift.
31
+ */
32
+ export const ITEM_FIELDS_FRAGMENT = `id
33
+ name
34
+ state
35
+ url
36
+ created_at
37
+ updated_at
38
+ board { id }
39
+ group { id title }
40
+ parent_item { id }
41
+ ${COLUMN_VALUES_FRAGMENT}`;
42
+ /**
43
+ * Builds the `meta.columns` consolidation slot per `cli-design.md`
44
+ * §6.3 from board metadata. Same shape every collection-list
45
+ * command emits — the per-row `title` lands in the consolidated
46
+ * map, so per-cell title repeats drop from each row.
47
+ *
48
+ * Pure / synchronous; no I/O.
49
+ */
50
+ export const collectColumnHeads = (metadata) => {
51
+ const out = {};
52
+ for (const c of metadata.columns) {
53
+ out[c.id] = { id: c.id, type: c.type, title: c.title };
54
+ }
55
+ return out;
56
+ };
57
+ /**
58
+ * Builds a title-by-id map for the `projectItem` projector — the
59
+ * canonical fallback when `column.title` on the wire could drift
60
+ * (M3 metadata loader's NFC + cache rules are the source of truth).
61
+ *
62
+ * Pure / synchronous; no I/O.
63
+ */
64
+ export const titleMap = (metadata) => {
65
+ const out = new Map();
66
+ for (const c of metadata.columns) {
67
+ out.set(c.id, c.title);
68
+ }
69
+ return out;
70
+ };
71
+ /**
72
+ * Builds the `me`-token resolver every people-aware filter / search
73
+ * command needs. The factory closes over the client; the returned
74
+ * function fires `client.whoami()` on demand. Callers memo-cache the
75
+ * resolved ID per build call to keep `--where Owner=me` cheap.
76
+ *
77
+ * Throws `UsageError` when the token is not associated with a
78
+ * Monday user (guest token, etc.). Defensive — the transport layer
79
+ * surfaces token-association failures as `unauthorized` before this
80
+ * resolver runs.
81
+ */
82
+ export const resolveMeFactory = (client) => {
83
+ return async () => {
84
+ const response = await client.whoami();
85
+ const me = response.data.me;
86
+ /* c8 ignore next 5 — defensive: Monday's me field is null only
87
+ when the token is invalid / belongs to a guest, which the
88
+ transport layer surfaces as `unauthorized` before this
89
+ resolver runs. The guard exists for type narrowing. */
90
+ if (me === null) {
91
+ throw new UsageError('cannot resolve `me` — token is not associated with a Monday user');
92
+ }
93
+ return me.id;
94
+ };
95
+ };
96
+ /**
97
+ * Parses a raw GraphQL item-shape into a `RawItem` with the R18
98
+ * parse-boundary wrap: malformed payloads surface as
99
+ * `ApiError(internal_error)` with `details.issues` rather than a
100
+ * bare ZodError that loses the failing field path.
101
+ *
102
+ * Per `validation.md` "Never bubble raw ZodError out of a parse
103
+ * boundary". Mirrors the dry-run engine's per-id wrap (`api/dry-
104
+ * run.ts fetchItem`) and `userByEmail` (`api/resolvers.ts`) — same
105
+ * pattern across every parse boundary.
106
+ *
107
+ * Optional `details` are merged into the error envelope (e.g.
108
+ * `{ item_id: '123' }`) so consumers in `item get` / `find` /
109
+ * `subitems` can scope the failure to the specific item being
110
+ * parsed.
111
+ */
112
+ export const parseRawItem = (raw, details) => unwrapOrThrow(rawItemSchema.safeParse(raw), {
113
+ context: 'Monday returned a malformed item response',
114
+ ...(details === undefined ? {} : { details }),
115
+ hint: 'this is a data-integrity error in Monday\'s response (or a ' +
116
+ 'rawItemSchema drift); verify the response shape and update ' +
117
+ 'the schema if Monday\'s contract has changed.',
118
+ });
119
+ /**
120
+ * Parses one raw GraphQL item-shape and projects it into the §6.2 /
121
+ * §6.3 `ProjectedItem`. A thin wrapper around
122
+ * `parseRawItem + projectItem` so the collection commands (`list`,
123
+ * `search`) spell the same call once.
124
+ *
125
+ * `omitColumnTitles: true` is the §6.3 same-board-collection rule —
126
+ * per-cell `title` drops out of each column entry (consolidated
127
+ * into `meta.columns`). Single-resource paths (`item get`) skip
128
+ * this helper because they keep titles inline (`item-projection.ts`
129
+ * `projectItem` directly).
130
+ */
131
+ export const projectFromRaw = (raw, titles, options) => {
132
+ const parsed = parseRawItem(raw);
133
+ return projectItem({
134
+ raw: parsed,
135
+ columnTitles: titles,
136
+ omitColumnTitles: options.omitColumnTitles,
137
+ });
138
+ };
139
+ //# sourceMappingURL=item-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-helpers.js","sourceRoot":"","sources":["../../src/api/item-helpers.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,aAAa,GAGd,MAAM,sBAAsB,CAAC;AAG9B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;YAM1B,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;YASxB,sBAAsB,EAAE,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,QAEC,EACqC,EAAE;IACxC,MAAM,GAAG,GAA+B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IACzD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,QAEC,EAC4B,EAAE;IAC/B,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QACjC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,MAAoB,EACK,EAAE;IAC3B,OAAO,KAAK,IAAI,EAAE;QAChB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;QACvC,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B;;;iEAGyD;QACzD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;YAChB,MAAM,IAAI,UAAU,CAClB,kEAAkE,CACnE,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,CAAC,EAAE,CAAC;IACf,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,GAAY,EACZ,OAA2C,EAClC,EAAE,CACX,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;IAC1C,OAAO,EAAE,2CAA2C;IACpD,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;IAC7C,IAAI,EACF,6DAA6D;QAC7D,6DAA6D;QAC7D,+CAA+C;CAClD,CAAC,CAAC;AAEL;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,GAAY,EACZ,MAAmC,EACnC,OAA+C,EAChC,EAAE;IACjB,MAAM,MAAM,GAAY,YAAY,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,WAAW,CAAC;QACjB,GAAG,EAAE,MAAM;QACX,YAAY,EAAE,MAAM;QACpB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC3C,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Live-mutation null-result projection — every item-shaped mutation
3
+ * (M5b's `change_simple_column_value` / `change_column_value` /
4
+ * `change_multiple_column_values` plus M10's `archive_item` /
5
+ * `delete_item` / `duplicate_item`) returns the post-mutation `Item`
6
+ * directly, and every consumer guards against a null result with the
7
+ * same shape: a typed throw carrying `details.item_id`, then
8
+ * `parseRawItem + projectItem` to surface the §6.4 mutation
9
+ * envelope's `data: <projected snapshot>`.
10
+ *
11
+ * Lifted from six sites — see v0.2-plan §14 R28:
12
+ * - `commands/item/set.ts` (M5b — local `projectMutationItem`)
13
+ * - `commands/item/clear.ts` (M5b — local `projectMutationItem`)
14
+ * - `commands/item/update.ts` (M5b — local `projectMutationItem`)
15
+ * - `commands/item/archive.ts` (M10 — inline)
16
+ * - `commands/item/delete.ts` (M10 — inline)
17
+ * - `commands/item/duplicate.ts` (M10 — inline)
18
+ *
19
+ * **Why parameterised on `errorCode` + `errorMessage`.** The two
20
+ * cohorts diverge in error semantics. M5b chose `internal_error` with
21
+ * "Monday returned no item payload from the mutation for id ..."
22
+ * (the mutation succeeded server-side but Monday returned an empty
23
+ * payload — server-side glitch, abnormal). M10 chose `not_found` with
24
+ * "Monday returned no item from <op_name> for id ..." (Monday's
25
+ * idiomatic null-for-missing-or-no-access response — a typed agent-
26
+ * recovery story). Both are correct for their semantics, both are
27
+ * pinned by integration tests, and both must survive the lift
28
+ * byte-for-byte. The helper owns the boilerplate (null check,
29
+ * `details: { item_id }` envelope, `parseRawItem + projectItem` chain);
30
+ * each call site supplies its own typed error parts.
31
+ *
32
+ * **What stays at the call site.** The post-projection error
33
+ * decoration (resolver-warning fold, validation_failed → column_
34
+ * archived remap, bulk `applied_count` / `applied_to` /
35
+ * `failed_at_item` attachment in update.ts's bulk path) lives at the
36
+ * call site. The helper's null-throw bubbles into the surrounding
37
+ * try/catch unchanged; callers compose the helper with their own
38
+ * `foldAndRemap` arms exactly as before. M11's `item move` + M14/M15
39
+ * board archive / delete will inherit this seam too.
40
+ */
41
+ import { type ErrorCode } from '../utils/errors.js';
42
+ import { type ProjectedItem } from './item-projection.js';
43
+ /**
44
+ * Parses + projects a live-mutation `Item` payload, throwing the
45
+ * supplied typed error on null/undefined. Caller owns the error code +
46
+ * message so M5b's `internal_error` / "no item payload" and M10's
47
+ * `not_found` / "no item from <op_name>" both survive the lift
48
+ * byte-for-byte.
49
+ *
50
+ * `details: { item_id }` is supplied by the helper so every consumer
51
+ * carries the same envelope shape — agents key off `details.item_id`
52
+ * regardless of which verb threw (cli-design §6.5).
53
+ */
54
+ export declare const projectMutationItem: ({ raw, itemId, errorCode, errorMessage, }: {
55
+ readonly raw: unknown;
56
+ readonly itemId: string;
57
+ readonly errorCode: ErrorCode;
58
+ readonly errorMessage: string;
59
+ }) => ProjectedItem;
60
+ //# sourceMappingURL=item-mutation-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-mutation-result.d.ts","sourceRoot":"","sources":["../../src/api/item-mutation-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAI,2CAKjC;IACD,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,KAAG,aAOH,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Live-mutation null-result projection — every item-shaped mutation
3
+ * (M5b's `change_simple_column_value` / `change_column_value` /
4
+ * `change_multiple_column_values` plus M10's `archive_item` /
5
+ * `delete_item` / `duplicate_item`) returns the post-mutation `Item`
6
+ * directly, and every consumer guards against a null result with the
7
+ * same shape: a typed throw carrying `details.item_id`, then
8
+ * `parseRawItem + projectItem` to surface the §6.4 mutation
9
+ * envelope's `data: <projected snapshot>`.
10
+ *
11
+ * Lifted from six sites — see v0.2-plan §14 R28:
12
+ * - `commands/item/set.ts` (M5b — local `projectMutationItem`)
13
+ * - `commands/item/clear.ts` (M5b — local `projectMutationItem`)
14
+ * - `commands/item/update.ts` (M5b — local `projectMutationItem`)
15
+ * - `commands/item/archive.ts` (M10 — inline)
16
+ * - `commands/item/delete.ts` (M10 — inline)
17
+ * - `commands/item/duplicate.ts` (M10 — inline)
18
+ *
19
+ * **Why parameterised on `errorCode` + `errorMessage`.** The two
20
+ * cohorts diverge in error semantics. M5b chose `internal_error` with
21
+ * "Monday returned no item payload from the mutation for id ..."
22
+ * (the mutation succeeded server-side but Monday returned an empty
23
+ * payload — server-side glitch, abnormal). M10 chose `not_found` with
24
+ * "Monday returned no item from <op_name> for id ..." (Monday's
25
+ * idiomatic null-for-missing-or-no-access response — a typed agent-
26
+ * recovery story). Both are correct for their semantics, both are
27
+ * pinned by integration tests, and both must survive the lift
28
+ * byte-for-byte. The helper owns the boilerplate (null check,
29
+ * `details: { item_id }` envelope, `parseRawItem + projectItem` chain);
30
+ * each call site supplies its own typed error parts.
31
+ *
32
+ * **What stays at the call site.** The post-projection error
33
+ * decoration (resolver-warning fold, validation_failed → column_
34
+ * archived remap, bulk `applied_count` / `applied_to` /
35
+ * `failed_at_item` attachment in update.ts's bulk path) lives at the
36
+ * call site. The helper's null-throw bubbles into the surrounding
37
+ * try/catch unchanged; callers compose the helper with their own
38
+ * `foldAndRemap` arms exactly as before. M11's `item move` + M14/M15
39
+ * board archive / delete will inherit this seam too.
40
+ */
41
+ import { ApiError } from '../utils/errors.js';
42
+ import { parseRawItem } from './item-helpers.js';
43
+ import { projectItem } from './item-projection.js';
44
+ /**
45
+ * Parses + projects a live-mutation `Item` payload, throwing the
46
+ * supplied typed error on null/undefined. Caller owns the error code +
47
+ * message so M5b's `internal_error` / "no item payload" and M10's
48
+ * `not_found` / "no item from <op_name>" both survive the lift
49
+ * byte-for-byte.
50
+ *
51
+ * `details: { item_id }` is supplied by the helper so every consumer
52
+ * carries the same envelope shape — agents key off `details.item_id`
53
+ * regardless of which verb threw (cli-design §6.5).
54
+ */
55
+ export const projectMutationItem = ({ raw, itemId, errorCode, errorMessage, }) => {
56
+ if (raw === null || raw === undefined) {
57
+ throw new ApiError(errorCode, errorMessage, {
58
+ details: { item_id: itemId },
59
+ });
60
+ }
61
+ return projectItem({ raw: parseRawItem(raw, { item_id: itemId }) });
62
+ };
63
+ //# sourceMappingURL=item-mutation-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-mutation-result.js","sourceRoot":"","sources":["../../src/api/item-mutation-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,QAAQ,EAAkB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAsB,MAAM,sBAAsB,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,GAAG,EACH,MAAM,EACN,SAAS,EACT,YAAY,GAMb,EAAiB,EAAE;IAClB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,IAAI,QAAQ,CAAC,SAAS,EAAE,YAAY,EAAE;YAC1C,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;SAC7B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,WAAW,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AACtE,CAAC,CAAC"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Shared item projection helpers (`v0.1-plan.md` §3 M4,
3
+ * `cli-design.md` §6.2).
4
+ *
5
+ * Every M4 read command (`item get` / `list` / `find` / `search` /
6
+ * `subitems`) emits the same single-resource Item shape. Centralising
7
+ * here means the projection lives in one file and the per-command
8
+ * action body stays focused on the GraphQL call + envelope mapping.
9
+ *
10
+ * Column-value projection notes:
11
+ *
12
+ * - Each column carries `{id, type, title, text, value}` per §6.2.
13
+ * `value` is the *parsed* JSON Monday stored — Monday returns it
14
+ * as a JSON-encoded string on the wire and we decode at this
15
+ * boundary so JSON consumers can read structured payloads
16
+ * without re-parsing.
17
+ * - For known-write column types (status / date / people), a
18
+ * handful of *typed* fields are surfaced inline (matching the
19
+ * §6.2 worked example). Unknown / read-only types only carry
20
+ * the base shape; agents inspect `value` for structured access.
21
+ * - The richer per-type projection is deferred to M5a's
22
+ * `column-values.ts` (the writer needs the same shape and the
23
+ * reader can reuse it). Until then, this module hosts the
24
+ * read-only inline projection so the v0.1 contract surface is
25
+ * stable.
26
+ */
27
+ import { z } from 'zod';
28
+ export declare const rawColumnValueSchema: z.ZodObject<{
29
+ id: z.ZodString;
30
+ type: z.ZodString;
31
+ text: z.ZodNullable<z.ZodString>;
32
+ value: z.ZodNullable<z.ZodString>;
33
+ column: z.ZodOptional<z.ZodNullable<z.ZodObject<{
34
+ title: z.ZodString;
35
+ }, z.core.$strip>>>;
36
+ }, z.core.$strict>;
37
+ export type RawColumnValue = z.infer<typeof rawColumnValueSchema>;
38
+ export declare const rawItemSchema: z.ZodObject<{
39
+ id: z.ZodString;
40
+ name: z.ZodString;
41
+ state: z.ZodNullable<z.ZodString>;
42
+ url: z.ZodNullable<z.ZodString>;
43
+ created_at: z.ZodNullable<z.ZodString>;
44
+ updated_at: z.ZodNullable<z.ZodString>;
45
+ board: z.ZodNullable<z.ZodObject<{
46
+ id: z.ZodString;
47
+ }, z.core.$strip>>;
48
+ group: z.ZodOptional<z.ZodNullable<z.ZodObject<{
49
+ id: z.ZodString;
50
+ title: z.ZodNullable<z.ZodString>;
51
+ }, z.core.$strip>>>;
52
+ parent_item: z.ZodOptional<z.ZodNullable<z.ZodObject<{
53
+ id: z.ZodString;
54
+ }, z.core.$strip>>>;
55
+ creator_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ column_values: z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ type: z.ZodString;
59
+ text: z.ZodNullable<z.ZodString>;
60
+ value: z.ZodNullable<z.ZodString>;
61
+ column: z.ZodOptional<z.ZodNullable<z.ZodObject<{
62
+ title: z.ZodString;
63
+ }, z.core.$strip>>>;
64
+ }, z.core.$strict>>;
65
+ }, z.core.$strict>;
66
+ export type RawItem = z.infer<typeof rawItemSchema>;
67
+ /**
68
+ * Single-column projected shape per §6.2. Carries the base shape
69
+ * (`id, type, title, text, value`) plus a few typed fields for the
70
+ * v0.1-writable status / date / people types. Mirror / formula /
71
+ * dependency columns surface as the base shape — `text` is the
72
+ * source of truth there because the typed payload isn't writable
73
+ * and Monday's wire shape varies.
74
+ */
75
+ export declare const projectedColumnSchema: z.ZodObject<{
76
+ id: z.ZodString;
77
+ type: z.ZodString;
78
+ title: z.ZodOptional<z.ZodString>;
79
+ text: z.ZodNullable<z.ZodString>;
80
+ value: z.ZodUnknown;
81
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
83
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
+ time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
+ people: z.ZodOptional<z.ZodArray<z.ZodObject<{
86
+ id: z.ZodString;
87
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ }, z.core.$loose>>>;
89
+ }, z.core.$loose>;
90
+ export type ProjectedColumn = z.infer<typeof projectedColumnSchema>;
91
+ export declare const projectedItemSchema: z.ZodObject<{
92
+ id: z.ZodString;
93
+ name: z.ZodString;
94
+ board_id: z.ZodNullable<z.ZodString>;
95
+ group_id: z.ZodNullable<z.ZodString>;
96
+ parent_item_id: z.ZodNullable<z.ZodString>;
97
+ state: z.ZodNullable<z.ZodString>;
98
+ url: z.ZodNullable<z.ZodString>;
99
+ created_at: z.ZodNullable<z.ZodString>;
100
+ updated_at: z.ZodNullable<z.ZodString>;
101
+ columns: z.ZodRecord<z.ZodString, z.ZodObject<{
102
+ id: z.ZodString;
103
+ type: z.ZodString;
104
+ title: z.ZodOptional<z.ZodString>;
105
+ text: z.ZodNullable<z.ZodString>;
106
+ value: z.ZodUnknown;
107
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
109
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ people: z.ZodOptional<z.ZodArray<z.ZodObject<{
112
+ id: z.ZodString;
113
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
+ }, z.core.$loose>>>;
115
+ }, z.core.$loose>>;
116
+ }, z.core.$strict>;
117
+ export type ProjectedItem = z.infer<typeof projectedItemSchema>;
118
+ /**
119
+ * Parses a Monday `value` string. Monday encodes structured column
120
+ * values as JSON strings; the projector decodes once at the boundary
121
+ * so consumers can read the structured field without re-parsing.
122
+ *
123
+ * Errors are swallowed: a malformed JSON string surfaces as `null`
124
+ * (with `text` still carrying the human form). Defensive — Monday
125
+ * occasionally returns an unparseable string for read-only column
126
+ * types, and we don't want one weird column to fail the whole emit.
127
+ */
128
+ export declare const parseColumnValue: (raw: string | null) => unknown;
129
+ /**
130
+ * Projects one column-value into the §6.2 shape. Pure — no I/O.
131
+ * The board-metadata `title` is preferred over the wire-side
132
+ * `column.title` because the metadata loader's NFC + cache rules
133
+ * are the canonical source; `column.title` is only the fallback for
134
+ * cross-board lists where a single board metadata isn't loaded.
135
+ */
136
+ export declare const projectColumnValue: (raw: RawColumnValue, fallbackTitle: string | undefined) => ProjectedColumn;
137
+ /**
138
+ * Reads `id` off a raw GraphQL item shape — the cursor walker
139
+ * needs a string for the per-page sort. Production cassettes always
140
+ * carry a string id (Monday's schema guarantees it); the
141
+ * structural-typing read keeps the walker honest if a future
142
+ * fixture drifts.
143
+ */
144
+ export declare const idFromRawItem: (item: unknown) => string;
145
+ export interface ProjectItemInputs {
146
+ readonly raw: RawItem;
147
+ /**
148
+ * Per-board column titles, keyed by column ID. When supplied, the
149
+ * projector uses these in preference to the wire-side
150
+ * `column.title` (per §6.3 — the per-board view is canonical).
151
+ * Cross-board lists (`item find` walking multiple boards in
152
+ * theory) leave this undefined and fall back to the wire title.
153
+ */
154
+ readonly columnTitles?: ReadonlyMap<string, string>;
155
+ /**
156
+ * §6.3 title de-duplication for same-board collections. When
157
+ * `true`, per-cell `title` is dropped from each column-value
158
+ * payload — the caller carries the canonical titles in
159
+ * `meta.columns` instead. Default `false` so single-resource calls
160
+ * (`item get`) keep titles inline (§6.2).
161
+ */
162
+ readonly omitColumnTitles?: boolean;
163
+ }
164
+ export declare const projectItem: (inputs: ProjectItemInputs) => ProjectedItem;
165
+ //# sourceMappingURL=item-projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-projection.d.ts","sourceRoot":"","sources":["../../src/api/item-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;kBAWtB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBf,CAAC;AAEZ,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBA0BxB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;kBAarB,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,GAAG,IAAI,KAAG,OAOrD,CAAC;AAsCF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,cAAc,EACnB,eAAe,MAAM,GAAG,SAAS,KAChC,eAqBF,CAAC;AAEF;;;;;;GAMG;AAIH,eAAO,MAAM,aAAa,GAAI,MAAM,OAAO,KAAG,MAI7C,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,WAAW,GAAI,QAAQ,iBAAiB,KAAG,aA0BvD,CAAC"}