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.
- package/CHANGELOG.md +439 -0
- package/LICENSE +21 -0
- package/README.md +431 -0
- package/dist/api/board-child-finder.d.ts +95 -0
- package/dist/api/board-child-finder.d.ts.map +1 -0
- package/dist/api/board-child-finder.js +89 -0
- package/dist/api/board-child-finder.js.map +1 -0
- package/dist/api/board-metadata.d.ts +162 -0
- package/dist/api/board-metadata.d.ts.map +1 -0
- package/dist/api/board-metadata.js +238 -0
- package/dist/api/board-metadata.js.map +1 -0
- package/dist/api/board-mutation-invalidation.d.ts +153 -0
- package/dist/api/board-mutation-invalidation.d.ts.map +1 -0
- package/dist/api/board-mutation-invalidation.js +136 -0
- package/dist/api/board-mutation-invalidation.js.map +1 -0
- package/dist/api/board-mutation-result.d.ts +97 -0
- package/dist/api/board-mutation-result.d.ts.map +1 -0
- package/dist/api/board-mutation-result.js +99 -0
- package/dist/api/board-mutation-result.js.map +1 -0
- package/dist/api/board-projection.d.ts +68 -0
- package/dist/api/board-projection.d.ts.map +1 -0
- package/dist/api/board-projection.js +79 -0
- package/dist/api/board-projection.js.map +1 -0
- package/dist/api/cache.d.ts +150 -0
- package/dist/api/cache.d.ts.map +1 -0
- package/dist/api/cache.js +418 -0
- package/dist/api/cache.js.map +1 -0
- package/dist/api/client.d.ts +162 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +205 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/column-mapping.d.ts +68 -0
- package/dist/api/column-mapping.d.ts.map +1 -0
- package/dist/api/column-mapping.js +117 -0
- package/dist/api/column-mapping.js.map +1 -0
- package/dist/api/column-mutation-result.d.ts +136 -0
- package/dist/api/column-mutation-result.d.ts.map +1 -0
- package/dist/api/column-mutation-result.js +130 -0
- package/dist/api/column-mutation-result.js.map +1 -0
- package/dist/api/column-types.d.ts +215 -0
- package/dist/api/column-types.d.ts.map +1 -0
- package/dist/api/column-types.js +195 -0
- package/dist/api/column-types.js.map +1 -0
- package/dist/api/column-values.d.ts +446 -0
- package/dist/api/column-values.d.ts.map +1 -0
- package/dist/api/column-values.js +795 -0
- package/dist/api/column-values.js.map +1 -0
- package/dist/api/columns.d.ts +205 -0
- package/dist/api/columns.d.ts.map +1 -0
- package/dist/api/columns.js +343 -0
- package/dist/api/columns.js.map +1 -0
- package/dist/api/complexity.d.ts +90 -0
- package/dist/api/complexity.d.ts.map +1 -0
- package/dist/api/complexity.js +194 -0
- package/dist/api/complexity.js.map +1 -0
- package/dist/api/dates.d.ts +150 -0
- package/dist/api/dates.d.ts.map +1 -0
- package/dist/api/dates.js +490 -0
- package/dist/api/dates.js.map +1 -0
- package/dist/api/destructive-gate.d.ts +107 -0
- package/dist/api/destructive-gate.d.ts.map +1 -0
- package/dist/api/destructive-gate.js +19 -0
- package/dist/api/destructive-gate.js.map +1 -0
- package/dist/api/dry-run.d.ts +338 -0
- package/dist/api/dry-run.d.ts.map +1 -0
- package/dist/api/dry-run.js +607 -0
- package/dist/api/dry-run.js.map +1 -0
- package/dist/api/emails.d.ts +60 -0
- package/dist/api/emails.d.ts.map +1 -0
- package/dist/api/emails.js +113 -0
- package/dist/api/emails.js.map +1 -0
- package/dist/api/errors.d.ts +82 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +434 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/filters.d.ts +198 -0
- package/dist/api/filters.d.ts.map +1 -0
- package/dist/api/filters.js +328 -0
- package/dist/api/filters.js.map +1 -0
- package/dist/api/group-color.d.ts +33 -0
- package/dist/api/group-color.d.ts.map +1 -0
- package/dist/api/group-color.js +80 -0
- package/dist/api/group-color.js.map +1 -0
- package/dist/api/group-mutation-result.d.ts +150 -0
- package/dist/api/group-mutation-result.d.ts.map +1 -0
- package/dist/api/group-mutation-result.js +141 -0
- package/dist/api/group-mutation-result.js.map +1 -0
- package/dist/api/iso-country-codes.d.ts +45 -0
- package/dist/api/iso-country-codes.d.ts.map +1 -0
- package/dist/api/iso-country-codes.js +71 -0
- package/dist/api/iso-country-codes.js.map +1 -0
- package/dist/api/item-board-lookup.d.ts +86 -0
- package/dist/api/item-board-lookup.d.ts.map +1 -0
- package/dist/api/item-board-lookup.js +140 -0
- package/dist/api/item-board-lookup.js.map +1 -0
- package/dist/api/item-helpers.d.ts +133 -0
- package/dist/api/item-helpers.d.ts.map +1 -0
- package/dist/api/item-helpers.js +139 -0
- package/dist/api/item-helpers.js.map +1 -0
- package/dist/api/item-mutation-result.d.ts +60 -0
- package/dist/api/item-mutation-result.d.ts.map +1 -0
- package/dist/api/item-mutation-result.js +63 -0
- package/dist/api/item-mutation-result.js.map +1 -0
- package/dist/api/item-projection.d.ts +165 -0
- package/dist/api/item-projection.d.ts.map +1 -0
- package/dist/api/item-projection.js +235 -0
- package/dist/api/item-projection.js.map +1 -0
- package/dist/api/item-source-read.d.ts +45 -0
- package/dist/api/item-source-read.d.ts.map +1 -0
- package/dist/api/item-source-read.js +57 -0
- package/dist/api/item-source-read.js.map +1 -0
- package/dist/api/items-page-walker.d.ts +126 -0
- package/dist/api/items-page-walker.d.ts.map +1 -0
- package/dist/api/items-page-walker.js +256 -0
- package/dist/api/items-page-walker.js.map +1 -0
- package/dist/api/links.d.ts +70 -0
- package/dist/api/links.d.ts.map +1 -0
- package/dist/api/links.js +128 -0
- package/dist/api/links.js.map +1 -0
- package/dist/api/me-token.d.ts +52 -0
- package/dist/api/me-token.d.ts.map +1 -0
- package/dist/api/me-token.js +55 -0
- package/dist/api/me-token.js.map +1 -0
- package/dist/api/pagination.d.ts +201 -0
- package/dist/api/pagination.d.ts.map +1 -0
- package/dist/api/pagination.js +223 -0
- package/dist/api/pagination.js.map +1 -0
- package/dist/api/partial-success-mutation.d.ts +28 -0
- package/dist/api/partial-success-mutation.d.ts.map +1 -0
- package/dist/api/partial-success-mutation.js +68 -0
- package/dist/api/partial-success-mutation.js.map +1 -0
- package/dist/api/people.d.ts +182 -0
- package/dist/api/people.d.ts.map +1 -0
- package/dist/api/people.js +260 -0
- package/dist/api/people.js.map +1 -0
- package/dist/api/phones.d.ts +74 -0
- package/dist/api/phones.d.ts.map +1 -0
- package/dist/api/phones.js +167 -0
- package/dist/api/phones.js.map +1 -0
- package/dist/api/raw-document.d.ts +53 -0
- package/dist/api/raw-document.d.ts.map +1 -0
- package/dist/api/raw-document.js +177 -0
- package/dist/api/raw-document.js.map +1 -0
- package/dist/api/raw-write.d.ts +127 -0
- package/dist/api/raw-write.d.ts.map +1 -0
- package/dist/api/raw-write.js +233 -0
- package/dist/api/raw-write.js.map +1 -0
- package/dist/api/resolution-context.d.ts +32 -0
- package/dist/api/resolution-context.d.ts.map +1 -0
- package/dist/api/resolution-context.js +42 -0
- package/dist/api/resolution-context.js.map +1 -0
- package/dist/api/resolution-pass.d.ts +163 -0
- package/dist/api/resolution-pass.d.ts.map +1 -0
- package/dist/api/resolution-pass.js +254 -0
- package/dist/api/resolution-pass.js.map +1 -0
- package/dist/api/resolve-client.d.ts +69 -0
- package/dist/api/resolve-client.d.ts.map +1 -0
- package/dist/api/resolve-client.js +70 -0
- package/dist/api/resolve-client.js.map +1 -0
- package/dist/api/resolver-error-fold.d.ts +176 -0
- package/dist/api/resolver-error-fold.d.ts.map +1 -0
- package/dist/api/resolver-error-fold.js +230 -0
- package/dist/api/resolver-error-fold.js.map +1 -0
- package/dist/api/resolvers.d.ts +131 -0
- package/dist/api/resolvers.d.ts.map +1 -0
- package/dist/api/resolvers.js +262 -0
- package/dist/api/resolvers.js.map +1 -0
- package/dist/api/response-root.d.ts +65 -0
- package/dist/api/response-root.d.ts.map +1 -0
- package/dist/api/response-root.js +61 -0
- package/dist/api/response-root.js.map +1 -0
- package/dist/api/retry.d.ts +112 -0
- package/dist/api/retry.d.ts.map +1 -0
- package/dist/api/retry.js +181 -0
- package/dist/api/retry.js.map +1 -0
- package/dist/api/set-expression.d.ts +23 -0
- package/dist/api/set-expression.d.ts.map +1 -0
- package/dist/api/set-expression.js +31 -0
- package/dist/api/set-expression.js.map +1 -0
- package/dist/api/sort.d.ts +59 -0
- package/dist/api/sort.d.ts.map +1 -0
- package/dist/api/sort.js +73 -0
- package/dist/api/sort.js.map +1 -0
- package/dist/api/source-aggregator.d.ts +94 -0
- package/dist/api/source-aggregator.d.ts.map +1 -0
- package/dist/api/source-aggregator.js +111 -0
- package/dist/api/source-aggregator.js.map +1 -0
- package/dist/api/transport.d.ts +58 -0
- package/dist/api/transport.d.ts.map +1 -0
- package/dist/api/transport.js +190 -0
- package/dist/api/transport.js.map +1 -0
- package/dist/api/update-mutation-result.d.ts +133 -0
- package/dist/api/update-mutation-result.d.ts.map +1 -0
- package/dist/api/update-mutation-result.js +145 -0
- package/dist/api/update-mutation-result.js.map +1 -0
- package/dist/api/users-fan-out-mutation.d.ts +124 -0
- package/dist/api/users-fan-out-mutation.d.ts.map +1 -0
- package/dist/api/users-fan-out-mutation.js +331 -0
- package/dist/api/users-fan-out-mutation.js.map +1 -0
- package/dist/api/walk-pages.d.ts +91 -0
- package/dist/api/walk-pages.d.ts.map +1 -0
- package/dist/api/walk-pages.js +84 -0
- package/dist/api/walk-pages.js.map +1 -0
- package/dist/api/workspace-projection.d.ts +64 -0
- package/dist/api/workspace-projection.d.ts.map +1 -0
- package/dist/api/workspace-projection.js +83 -0
- package/dist/api/workspace-projection.js.map +1 -0
- package/dist/cli/envelope-out.d.ts +128 -0
- package/dist/cli/envelope-out.d.ts.map +1 -0
- package/dist/cli/envelope-out.js +146 -0
- package/dist/cli/envelope-out.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +27 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/program.d.ts +29 -0
- package/dist/cli/program.d.ts.map +1 -0
- package/dist/cli/program.js +109 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/run.d.ts +108 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +105 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/commands/account/client-helper.d.ts +37 -0
- package/dist/commands/account/client-helper.d.ts.map +1 -0
- package/dist/commands/account/client-helper.js +55 -0
- package/dist/commands/account/client-helper.js.map +1 -0
- package/dist/commands/account/complexity.d.ts +29 -0
- package/dist/commands/account/complexity.d.ts.map +1 -0
- package/dist/commands/account/complexity.js +70 -0
- package/dist/commands/account/complexity.js.map +1 -0
- package/dist/commands/account/info.d.ts +36 -0
- package/dist/commands/account/info.d.ts.map +1 -0
- package/dist/commands/account/info.js +74 -0
- package/dist/commands/account/info.js.map +1 -0
- package/dist/commands/account/version.d.ts +44 -0
- package/dist/commands/account/version.d.ts.map +1 -0
- package/dist/commands/account/version.js +98 -0
- package/dist/commands/account/version.js.map +1 -0
- package/dist/commands/account/whoami.d.ts +34 -0
- package/dist/commands/account/whoami.d.ts.map +1 -0
- package/dist/commands/account/whoami.js +77 -0
- package/dist/commands/account/whoami.js.map +1 -0
- package/dist/commands/board/add-users.d.ts +60 -0
- package/dist/commands/board/add-users.d.ts.map +1 -0
- package/dist/commands/board/add-users.js +133 -0
- package/dist/commands/board/add-users.js.map +1 -0
- package/dist/commands/board/archive.d.ts +64 -0
- package/dist/commands/board/archive.d.ts.map +1 -0
- package/dist/commands/board/archive.js +226 -0
- package/dist/commands/board/archive.js.map +1 -0
- package/dist/commands/board/column-create.d.ts +146 -0
- package/dist/commands/board/column-create.d.ts.map +1 -0
- package/dist/commands/board/column-create.js +564 -0
- package/dist/commands/board/column-create.js.map +1 -0
- package/dist/commands/board/column-delete.d.ts +76 -0
- package/dist/commands/board/column-delete.d.ts.map +1 -0
- package/dist/commands/board/column-delete.js +224 -0
- package/dist/commands/board/column-delete.js.map +1 -0
- package/dist/commands/board/column-update.d.ts +92 -0
- package/dist/commands/board/column-update.d.ts.map +1 -0
- package/dist/commands/board/column-update.js +364 -0
- package/dist/commands/board/column-update.js.map +1 -0
- package/dist/commands/board/columns.d.ts +30 -0
- package/dist/commands/board/columns.d.ts.map +1 -0
- package/dist/commands/board/columns.js +102 -0
- package/dist/commands/board/columns.js.map +1 -0
- package/dist/commands/board/create.d.ts +67 -0
- package/dist/commands/board/create.d.ts.map +1 -0
- package/dist/commands/board/create.js +226 -0
- package/dist/commands/board/create.js.map +1 -0
- package/dist/commands/board/delete.d.ts +60 -0
- package/dist/commands/board/delete.d.ts.map +1 -0
- package/dist/commands/board/delete.js +192 -0
- package/dist/commands/board/delete.js.map +1 -0
- package/dist/commands/board/describe.d.ts +68 -0
- package/dist/commands/board/describe.d.ts.map +1 -0
- package/dist/commands/board/describe.js +241 -0
- package/dist/commands/board/describe.js.map +1 -0
- package/dist/commands/board/doctor.d.ts +108 -0
- package/dist/commands/board/doctor.d.ts.map +1 -0
- package/dist/commands/board/doctor.js +417 -0
- package/dist/commands/board/doctor.js.map +1 -0
- package/dist/commands/board/duplicate.d.ts +85 -0
- package/dist/commands/board/duplicate.d.ts.map +1 -0
- package/dist/commands/board/duplicate.js +281 -0
- package/dist/commands/board/duplicate.js.map +1 -0
- package/dist/commands/board/find.d.ts +47 -0
- package/dist/commands/board/find.d.ts.map +1 -0
- package/dist/commands/board/find.js +153 -0
- package/dist/commands/board/find.js.map +1 -0
- package/dist/commands/board/get.d.ts +41 -0
- package/dist/commands/board/get.d.ts.map +1 -0
- package/dist/commands/board/get.js +66 -0
- package/dist/commands/board/get.js.map +1 -0
- package/dist/commands/board/group-archive.d.ts +83 -0
- package/dist/commands/board/group-archive.d.ts.map +1 -0
- package/dist/commands/board/group-archive.js +264 -0
- package/dist/commands/board/group-archive.js.map +1 -0
- package/dist/commands/board/group-create.d.ts +118 -0
- package/dist/commands/board/group-create.d.ts.map +1 -0
- package/dist/commands/board/group-create.js +239 -0
- package/dist/commands/board/group-create.js.map +1 -0
- package/dist/commands/board/group-delete.d.ts +79 -0
- package/dist/commands/board/group-delete.d.ts.map +1 -0
- package/dist/commands/board/group-delete.js +222 -0
- package/dist/commands/board/group-delete.js.map +1 -0
- package/dist/commands/board/group-duplicate.d.ts +70 -0
- package/dist/commands/board/group-duplicate.d.ts.map +1 -0
- package/dist/commands/board/group-duplicate.js +219 -0
- package/dist/commands/board/group-duplicate.js.map +1 -0
- package/dist/commands/board/group-update.d.ts +145 -0
- package/dist/commands/board/group-update.d.ts.map +1 -0
- package/dist/commands/board/group-update.js +341 -0
- package/dist/commands/board/group-update.js.map +1 -0
- package/dist/commands/board/groups.d.ts +28 -0
- package/dist/commands/board/groups.d.ts.map +1 -0
- package/dist/commands/board/groups.js +85 -0
- package/dist/commands/board/groups.js.map +1 -0
- package/dist/commands/board/list.d.ts +39 -0
- package/dist/commands/board/list.d.ts.map +1 -0
- package/dist/commands/board/list.js +135 -0
- package/dist/commands/board/list.js.map +1 -0
- package/dist/commands/board/subscribers.d.ts +24 -0
- package/dist/commands/board/subscribers.d.ts.map +1 -0
- package/dist/commands/board/subscribers.js +89 -0
- package/dist/commands/board/subscribers.js.map +1 -0
- package/dist/commands/board/update.d.ts +82 -0
- package/dist/commands/board/update.d.ts.map +1 -0
- package/dist/commands/board/update.js +328 -0
- package/dist/commands/board/update.js.map +1 -0
- package/dist/commands/cache/clear.d.ts +34 -0
- package/dist/commands/cache/clear.d.ts.map +1 -0
- package/dist/commands/cache/clear.js +113 -0
- package/dist/commands/cache/clear.js.map +1 -0
- package/dist/commands/cache/list.d.ts +50 -0
- package/dist/commands/cache/list.d.ts.map +1 -0
- package/dist/commands/cache/list.js +77 -0
- package/dist/commands/cache/list.js.map +1 -0
- package/dist/commands/cache/stats.d.ts +22 -0
- package/dist/commands/cache/stats.d.ts.map +1 -0
- package/dist/commands/cache/stats.js +56 -0
- package/dist/commands/cache/stats.js.map +1 -0
- package/dist/commands/config/path.d.ts +22 -0
- package/dist/commands/config/path.d.ts.map +1 -0
- package/dist/commands/config/path.js +74 -0
- package/dist/commands/config/path.js.map +1 -0
- package/dist/commands/config/show.d.ts +61 -0
- package/dist/commands/config/show.d.ts.map +1 -0
- package/dist/commands/config/show.js +137 -0
- package/dist/commands/config/show.js.map +1 -0
- package/dist/commands/emit.d.ts +156 -0
- package/dist/commands/emit.d.ts.map +1 -0
- package/dist/commands/emit.js +212 -0
- package/dist/commands/emit.js.map +1 -0
- package/dist/commands/index.d.ts +5 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +195 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/item/archive.d.ts +81 -0
- package/dist/commands/item/archive.d.ts.map +1 -0
- package/dist/commands/item/archive.js +187 -0
- package/dist/commands/item/archive.js.map +1 -0
- package/dist/commands/item/clear.d.ts +140 -0
- package/dist/commands/item/clear.d.ts.map +1 -0
- package/dist/commands/item/clear.js +748 -0
- package/dist/commands/item/clear.js.map +1 -0
- package/dist/commands/item/create.d.ts +77 -0
- package/dist/commands/item/create.d.ts.map +1 -0
- package/dist/commands/item/create.js +802 -0
- package/dist/commands/item/create.js.map +1 -0
- package/dist/commands/item/delete.d.ts +82 -0
- package/dist/commands/item/delete.d.ts.map +1 -0
- package/dist/commands/item/delete.js +179 -0
- package/dist/commands/item/delete.js.map +1 -0
- package/dist/commands/item/duplicate.d.ts +117 -0
- package/dist/commands/item/duplicate.d.ts.map +1 -0
- package/dist/commands/item/duplicate.js +238 -0
- package/dist/commands/item/duplicate.js.map +1 -0
- package/dist/commands/item/find.d.ts +55 -0
- package/dist/commands/item/find.d.ts.map +1 -0
- package/dist/commands/item/find.js +231 -0
- package/dist/commands/item/find.js.map +1 -0
- package/dist/commands/item/get.d.ts +47 -0
- package/dist/commands/item/get.d.ts.map +1 -0
- package/dist/commands/item/get.js +66 -0
- package/dist/commands/item/get.js.map +1 -0
- package/dist/commands/item/list.d.ts +73 -0
- package/dist/commands/item/list.d.ts.map +1 -0
- package/dist/commands/item/list.js +284 -0
- package/dist/commands/item/list.js.map +1 -0
- package/dist/commands/item/move.d.ts +181 -0
- package/dist/commands/item/move.d.ts.map +1 -0
- package/dist/commands/item/move.js +560 -0
- package/dist/commands/item/move.js.map +1 -0
- package/dist/commands/item/search.d.ts +67 -0
- package/dist/commands/item/search.d.ts.map +1 -0
- package/dist/commands/item/search.js +322 -0
- package/dist/commands/item/search.js.map +1 -0
- package/dist/commands/item/set.d.ts +88 -0
- package/dist/commands/item/set.d.ts.map +1 -0
- package/dist/commands/item/set.js +387 -0
- package/dist/commands/item/set.js.map +1 -0
- package/dist/commands/item/subitems.d.ts +50 -0
- package/dist/commands/item/subitems.d.ts.map +1 -0
- package/dist/commands/item/subitems.js +86 -0
- package/dist/commands/item/subitems.js.map +1 -0
- package/dist/commands/item/update.d.ts +99 -0
- package/dist/commands/item/update.d.ts.map +1 -0
- package/dist/commands/item/update.js +884 -0
- package/dist/commands/item/update.js.map +1 -0
- package/dist/commands/item/upsert.d.ts +105 -0
- package/dist/commands/item/upsert.d.ts.map +1 -0
- package/dist/commands/item/upsert.js +998 -0
- package/dist/commands/item/upsert.js.map +1 -0
- package/dist/commands/parse-argv.d.ts +20 -0
- package/dist/commands/parse-argv.d.ts.map +1 -0
- package/dist/commands/parse-argv.js +40 -0
- package/dist/commands/parse-argv.js.map +1 -0
- package/dist/commands/raw/index.d.ts +23 -0
- package/dist/commands/raw/index.d.ts.map +1 -0
- package/dist/commands/raw/index.js +416 -0
- package/dist/commands/raw/index.js.map +1 -0
- package/dist/commands/run-by-id-lookup.d.ts +72 -0
- package/dist/commands/run-by-id-lookup.d.ts.map +1 -0
- package/dist/commands/run-by-id-lookup.js +58 -0
- package/dist/commands/run-by-id-lookup.js.map +1 -0
- package/dist/commands/schema/index.d.ts +104 -0
- package/dist/commands/schema/index.d.ts.map +1 -0
- package/dist/commands/schema/index.js +183 -0
- package/dist/commands/schema/index.js.map +1 -0
- package/dist/commands/types.d.ts +66 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +15 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/update/body-source.d.ts +38 -0
- package/dist/commands/update/body-source.d.ts.map +1 -0
- package/dist/commands/update/body-source.js +80 -0
- package/dist/commands/update/body-source.js.map +1 -0
- package/dist/commands/update/clear-all.d.ts +67 -0
- package/dist/commands/update/clear-all.d.ts.map +1 -0
- package/dist/commands/update/clear-all.js +281 -0
- package/dist/commands/update/clear-all.js.map +1 -0
- package/dist/commands/update/create.d.ts +51 -0
- package/dist/commands/update/create.d.ts.map +1 -0
- package/dist/commands/update/create.js +167 -0
- package/dist/commands/update/create.js.map +1 -0
- package/dist/commands/update/delete.d.ts +53 -0
- package/dist/commands/update/delete.d.ts.map +1 -0
- package/dist/commands/update/delete.js +148 -0
- package/dist/commands/update/delete.js.map +1 -0
- package/dist/commands/update/edit.d.ts +37 -0
- package/dist/commands/update/edit.d.ts.map +1 -0
- package/dist/commands/update/edit.js +129 -0
- package/dist/commands/update/edit.js.map +1 -0
- package/dist/commands/update/get.d.ts +37 -0
- package/dist/commands/update/get.d.ts.map +1 -0
- package/dist/commands/update/get.js +92 -0
- package/dist/commands/update/get.js.map +1 -0
- package/dist/commands/update/like.d.ts +17 -0
- package/dist/commands/update/like.d.ts.map +1 -0
- package/dist/commands/update/like.js +23 -0
- package/dist/commands/update/like.js.map +1 -0
- package/dist/commands/update/list.d.ts +58 -0
- package/dist/commands/update/list.d.ts.map +1 -0
- package/dist/commands/update/list.js +322 -0
- package/dist/commands/update/list.js.map +1 -0
- package/dist/commands/update/pin.d.ts +17 -0
- package/dist/commands/update/pin.d.ts.map +1 -0
- package/dist/commands/update/pin.js +23 -0
- package/dist/commands/update/pin.js.map +1 -0
- package/dist/commands/update/reply.d.ts +47 -0
- package/dist/commands/update/reply.d.ts.map +1 -0
- package/dist/commands/update/reply.js +149 -0
- package/dist/commands/update/reply.js.map +1 -0
- package/dist/commands/update/toggle.d.ts +70 -0
- package/dist/commands/update/toggle.d.ts.map +1 -0
- package/dist/commands/update/toggle.js +118 -0
- package/dist/commands/update/toggle.js.map +1 -0
- package/dist/commands/update/unlike.d.ts +17 -0
- package/dist/commands/update/unlike.d.ts.map +1 -0
- package/dist/commands/update/unlike.js +22 -0
- package/dist/commands/update/unlike.js.map +1 -0
- package/dist/commands/update/unpin.d.ts +17 -0
- package/dist/commands/update/unpin.d.ts.map +1 -0
- package/dist/commands/update/unpin.js +21 -0
- package/dist/commands/update/unpin.js.map +1 -0
- package/dist/commands/user/get.d.ts +31 -0
- package/dist/commands/user/get.d.ts.map +1 -0
- package/dist/commands/user/get.js +81 -0
- package/dist/commands/user/get.js.map +1 -0
- package/dist/commands/user/list.d.ts +61 -0
- package/dist/commands/user/list.d.ts.map +1 -0
- package/dist/commands/user/list.js +148 -0
- package/dist/commands/user/list.js.map +1 -0
- package/dist/commands/user/me.d.ts +17 -0
- package/dist/commands/user/me.d.ts.map +1 -0
- package/dist/commands/user/me.js +49 -0
- package/dist/commands/user/me.js.map +1 -0
- package/dist/commands/workspace/add-users.d.ts +76 -0
- package/dist/commands/workspace/add-users.d.ts.map +1 -0
- package/dist/commands/workspace/add-users.js +154 -0
- package/dist/commands/workspace/add-users.js.map +1 -0
- package/dist/commands/workspace/create.d.ts +59 -0
- package/dist/commands/workspace/create.d.ts.map +1 -0
- package/dist/commands/workspace/create.js +163 -0
- package/dist/commands/workspace/create.js.map +1 -0
- package/dist/commands/workspace/delete.d.ts +67 -0
- package/dist/commands/workspace/delete.d.ts.map +1 -0
- package/dist/commands/workspace/delete.js +182 -0
- package/dist/commands/workspace/delete.js.map +1 -0
- package/dist/commands/workspace/folders.d.ts +40 -0
- package/dist/commands/workspace/folders.d.ts.map +1 -0
- package/dist/commands/workspace/folders.js +124 -0
- package/dist/commands/workspace/folders.js.map +1 -0
- package/dist/commands/workspace/get.d.ts +35 -0
- package/dist/commands/workspace/get.d.ts.map +1 -0
- package/dist/commands/workspace/get.js +62 -0
- package/dist/commands/workspace/get.js.map +1 -0
- package/dist/commands/workspace/list.d.ts +57 -0
- package/dist/commands/workspace/list.d.ts.map +1 -0
- package/dist/commands/workspace/list.js +125 -0
- package/dist/commands/workspace/list.js.map +1 -0
- package/dist/commands/workspace/remove-users.d.ts +47 -0
- package/dist/commands/workspace/remove-users.d.ts.map +1 -0
- package/dist/commands/workspace/remove-users.js +122 -0
- package/dist/commands/workspace/remove-users.js.map +1 -0
- package/dist/commands/workspace/update.d.ts +68 -0
- package/dist/commands/workspace/update.d.ts.map +1 -0
- package/dist/commands/workspace/update.js +237 -0
- package/dist/commands/workspace/update.js.map +1 -0
- package/dist/config/load.d.ts +33 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +81 -0
- package/dist/config/load.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/types/global-flags.d.ts +69 -0
- package/dist/types/global-flags.d.ts.map +1 -0
- package/dist/types/global-flags.js +170 -0
- package/dist/types/global-flags.js.map +1 -0
- package/dist/types/ids.d.ts +38 -0
- package/dist/types/ids.d.ts.map +1 -0
- package/dist/types/ids.js +51 -0
- package/dist/types/ids.js.map +1 -0
- package/dist/types/json.d.ts +60 -0
- package/dist/types/json.d.ts.map +1 -0
- package/dist/types/json.js +33 -0
- package/dist/types/json.js.map +1 -0
- package/dist/utils/errors.d.ts +121 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +264 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +39 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +49 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/output/envelope.d.ts +140 -0
- package/dist/utils/output/envelope.d.ts.map +1 -0
- package/dist/utils/output/envelope.js +120 -0
- package/dist/utils/output/envelope.js.map +1 -0
- package/dist/utils/output/json.d.ts +10 -0
- package/dist/utils/output/json.d.ts.map +1 -0
- package/dist/utils/output/json.js +12 -0
- package/dist/utils/output/json.js.map +1 -0
- package/dist/utils/output/ndjson.d.ts +92 -0
- package/dist/utils/output/ndjson.d.ts.map +1 -0
- package/dist/utils/output/ndjson.js +33 -0
- package/dist/utils/output/ndjson.js.map +1 -0
- package/dist/utils/output/select.d.ts +22 -0
- package/dist/utils/output/select.d.ts.map +1 -0
- package/dist/utils/output/select.js +47 -0
- package/dist/utils/output/select.js.map +1 -0
- package/dist/utils/output/table.d.ts +32 -0
- package/dist/utils/output/table.d.ts.map +1 -0
- package/dist/utils/output/table.js +133 -0
- package/dist/utils/output/table.js.map +1 -0
- package/dist/utils/output/text.d.ts +5 -0
- package/dist/utils/output/text.d.ts.map +1 -0
- package/dist/utils/output/text.js +32 -0
- package/dist/utils/output/text.js.map +1 -0
- package/dist/utils/parse-boundary.d.ts +53 -0
- package/dist/utils/parse-boundary.d.ts.map +1 -0
- package/dist/utils/parse-boundary.js +62 -0
- package/dist/utils/parse-boundary.js.map +1 -0
- package/dist/utils/redact.d.ts +54 -0
- package/dist/utils/redact.d.ts.map +1 -0
- package/dist/utils/redact.js +154 -0
- package/dist/utils/redact.js.map +1 -0
- package/dist/utils/request-id.d.ts +17 -0
- package/dist/utils/request-id.d.ts.map +1 -0
- package/dist/utils/request-id.js +26 -0
- package/dist/utils/request-id.js.map +1 -0
- package/package.json +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# monday-cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/monday-cli)
|
|
4
|
+
[](https://github.com/Firer/monday-cli/actions/workflows/ci.yml)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
|
|
8
|
+
> An agent-first CLI for [Monday.com](https://monday.com). Pull tasks,
|
|
9
|
+
> file backlog items, transition statuses, and post comments from the
|
|
10
|
+
> terminal — designed for AI coding agents (Claude Code, Codex,
|
|
11
|
+
> Aider) with humans as a welcome second audience.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Why
|
|
16
|
+
|
|
17
|
+
AI coding agents need to operate on real tickets. Monday.com has a
|
|
18
|
+
GraphQL API, but each agent learning that schema from scratch is
|
|
19
|
+
wasteful — and the API is sharp-edged (40+ column types, idiosyncratic
|
|
20
|
+
mutation shapes, complex pagination). `monday-cli` is the abstraction:
|
|
21
|
+
**one stable contract** (universal envelope, 27 stable error codes,
|
|
22
|
+
JSON Schema introspection) that every agent can target.
|
|
23
|
+
|
|
24
|
+
- **Agent-first ergonomics.** `--json` everywhere, stable
|
|
25
|
+
`error.code`, deterministic `meta`, no interactive prompts.
|
|
26
|
+
- **`monday board describe`** emits paste-ready `--set <token>=<value>`
|
|
27
|
+
examples for every writable column — agents discover board
|
|
28
|
+
structure without reading external docs.
|
|
29
|
+
- **`monday schema --json`** dumps every command's input flags and
|
|
30
|
+
output shape as JSON Schema 2020-12 — no `--help` scraping.
|
|
31
|
+
- **`--dry-run`** on every mutation; **`confirmation_required`** for
|
|
32
|
+
destructive bulk ops (no surprise deletes).
|
|
33
|
+
- **Two-layer token redaction** scrubs the API token from every
|
|
34
|
+
emitted byte (logs, error messages, stack traces). Hardened
|
|
35
|
+
against an adversarial fixture suite.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g monday-cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Requires **Node.js ≥ 22**.
|
|
44
|
+
|
|
45
|
+
## Quick start
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# 1. Set your Monday API token (admin or member; guests can't mint one).
|
|
49
|
+
# Get one at https://<your-org>.monday.com/admin/integrations/api
|
|
50
|
+
export MONDAY_API_TOKEN="<your-token>"
|
|
51
|
+
|
|
52
|
+
# 2. Smoke test
|
|
53
|
+
monday account whoami --json
|
|
54
|
+
|
|
55
|
+
# 3. List a board's items (replace 12345 with your board ID)
|
|
56
|
+
monday item list --board 12345 --json
|
|
57
|
+
|
|
58
|
+
# 4. File a new task (v0.2)
|
|
59
|
+
monday item create --board 12345 --name "Refactor login" \
|
|
60
|
+
--set status=Backlog --set 'Due date'=+1w --json
|
|
61
|
+
|
|
62
|
+
# 5. Find-or-create with idempotent matching (v0.2)
|
|
63
|
+
# Re-running with the same args is safe — 0/1/2+ matches route to
|
|
64
|
+
# create / update / `ambiguous_match` (the 27th stable error code).
|
|
65
|
+
monday item upsert --board 12345 --name "Refactor login" \
|
|
66
|
+
--match-by name --set status='Working on it' --json
|
|
67
|
+
|
|
68
|
+
# 6. Move a ticket forward
|
|
69
|
+
monday item set 67890 status=Done --json
|
|
70
|
+
|
|
71
|
+
# 7. Comment on it
|
|
72
|
+
monday update create 67890 --body "Shipped in PR #1234" --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
The CLI follows a `monday <noun> <verb>` shape:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Discovery
|
|
81
|
+
monday account whoami
|
|
82
|
+
monday board list
|
|
83
|
+
monday board describe <board-id> # full board schema with column types
|
|
84
|
+
|
|
85
|
+
# Reading items
|
|
86
|
+
monday item list --board <board-id>
|
|
87
|
+
monday item list --board <board-id> --where status=Backlog --where owner=me
|
|
88
|
+
monday item list --board <board-id> --all --output ndjson | jq '...'
|
|
89
|
+
monday item get <item-id>
|
|
90
|
+
monday item find "Refactor login" --board <board-id>
|
|
91
|
+
monday item search --board <board-id> --where status=Done
|
|
92
|
+
monday item subitems <item-id>
|
|
93
|
+
|
|
94
|
+
# Updating items
|
|
95
|
+
monday item set <item-id> status=Done
|
|
96
|
+
monday item update <item-id> --set status=Done --set 'Due date'=+1w
|
|
97
|
+
monday item clear <item-id> status
|
|
98
|
+
|
|
99
|
+
# Comments (Monday "updates")
|
|
100
|
+
monday update list <item-id>
|
|
101
|
+
monday update create <item-id> --body "Shipped in PR #1234"
|
|
102
|
+
|
|
103
|
+
# Schemas (the agent's discovery hammer)
|
|
104
|
+
monday schema # full registry as JSON Schema 2020-12
|
|
105
|
+
monday schema item.set # one command's schema (dotted name)
|
|
106
|
+
|
|
107
|
+
# Diagnostics + escape hatch
|
|
108
|
+
monday board doctor <board-id> # flag duplicate titles, non-writable
|
|
109
|
+
# column types, broken board_relations
|
|
110
|
+
monday raw '{ me { id name email } }' # GraphQL escape hatch
|
|
111
|
+
monday raw 'mutation { ... }' --allow-mutation --dry-run
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For worked agent walkthroughs (pick up a backlog item → mark
|
|
115
|
+
in-progress → leave a comment → mark done), filter DSL syntax,
|
|
116
|
+
dry-run shapes, and error handling, see
|
|
117
|
+
[`docs/examples.md`](./docs/examples.md).
|
|
118
|
+
|
|
119
|
+
## Output format
|
|
120
|
+
|
|
121
|
+
- **TTY (you in a terminal):** human-friendly tables, truncated to fit
|
|
122
|
+
the terminal width.
|
|
123
|
+
- **Pipe / redirect:** JSON, no flags needed — `monday item list | jq`
|
|
124
|
+
works.
|
|
125
|
+
- **Agent in a pseudo-TTY:** pass `--json` (alias for `--output json`)
|
|
126
|
+
to force JSON regardless of terminal detection. JSON output is
|
|
127
|
+
never truncated.
|
|
128
|
+
|
|
129
|
+
Every JSON response uses the same universal envelope:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"ok": true,
|
|
134
|
+
"data": ...,
|
|
135
|
+
"meta": {
|
|
136
|
+
"schema_version": "1",
|
|
137
|
+
"api_version": "2026-01",
|
|
138
|
+
"cli_version": "0.2.0",
|
|
139
|
+
"request_id": "0e6f1a7b-...",
|
|
140
|
+
"source": "live",
|
|
141
|
+
"cache_age_seconds": null,
|
|
142
|
+
"retrieved_at": "2026-05-01T10:00:00Z",
|
|
143
|
+
"complexity": null
|
|
144
|
+
},
|
|
145
|
+
"warnings": []
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Errors carry a stable `error.code` — agents key off the code,
|
|
150
|
+
never the English message:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"ok": false,
|
|
155
|
+
"error": {
|
|
156
|
+
"code": "rate_limited",
|
|
157
|
+
"message": "...",
|
|
158
|
+
"retryable": true,
|
|
159
|
+
"retry_after_seconds": 30,
|
|
160
|
+
"details": { "...": "..." }
|
|
161
|
+
},
|
|
162
|
+
"meta": { "..." }
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The full envelope and error-code contract live in
|
|
167
|
+
[`docs/cli-design.md`](./docs/cli-design.md) §6 (binding) and
|
|
168
|
+
[`docs/output-shapes.md`](./docs/output-shapes.md) (per-command
|
|
169
|
+
reference).
|
|
170
|
+
|
|
171
|
+
## Exit codes
|
|
172
|
+
|
|
173
|
+
| Code | Meaning |
|
|
174
|
+
|------|---------|
|
|
175
|
+
| 0 | Success |
|
|
176
|
+
| 1 | Usage error (bad args, `confirmation_required`) |
|
|
177
|
+
| 2 | API or network error |
|
|
178
|
+
| 3 | Config error (missing token, etc.) |
|
|
179
|
+
| 130 | SIGINT (Ctrl-C) |
|
|
180
|
+
|
|
181
|
+
## Agent quickstart
|
|
182
|
+
|
|
183
|
+
If you're an AI coding agent driving this CLI:
|
|
184
|
+
|
|
185
|
+
1. **Always pass `--json`.** Pseudo-TTY detection isn't reliable
|
|
186
|
+
inside an agent harness. `--json` is an alias for
|
|
187
|
+
`--output json` and forces JSON on every command. JSON is
|
|
188
|
+
never truncated; tables are.
|
|
189
|
+
2. **Branch on `error.code`, not `error.message`.** The 27 stable
|
|
190
|
+
codes (`not_found`, `confirmation_required`, `column_archived`,
|
|
191
|
+
`unsupported_column_type`, `rate_limited`, `stale_cursor`,
|
|
192
|
+
`ambiguous_match`, …) are part of the contract. Messages are not.
|
|
193
|
+
3. **Read `meta.source`** to know whether the data is
|
|
194
|
+
`"live"` / `"cache"` / `"mixed"` / `"none"`. `"mixed"` means
|
|
195
|
+
board metadata came from cache while the rest hit live —
|
|
196
|
+
non-trivial for writes because Monday's column state may have
|
|
197
|
+
drifted. `cache_age_seconds` tells you how stale the cached
|
|
198
|
+
portion is.
|
|
199
|
+
4. **Discover commands** via `monday schema --json`. Every
|
|
200
|
+
command's input flags + output `data` shape are
|
|
201
|
+
introspectable as JSON Schema 2020-12 — no `--help` scraping.
|
|
202
|
+
5. **Discover board structure** via
|
|
203
|
+
`monday board describe <board-id> --json`. Each writable column
|
|
204
|
+
carries `example_set`, paste-ready `--set <token>=<value>`
|
|
205
|
+
strings the agent can use without external Monday docs.
|
|
206
|
+
6. **Use `--dry-run`** on any mutation to preview the change as a
|
|
207
|
+
`planned_changes[]` envelope before committing. Bulk ops
|
|
208
|
+
without `--yes` return `confirmation_required` (exit 1) by
|
|
209
|
+
default.
|
|
210
|
+
7. **Per-command output reference** lives in
|
|
211
|
+
[`docs/output-shapes.md`](./docs/output-shapes.md) — what `data`
|
|
212
|
+
looks like for every shipped command. Worked agent sessions in
|
|
213
|
+
[`docs/examples.md`](./docs/examples.md).
|
|
214
|
+
|
|
215
|
+
## Configuration
|
|
216
|
+
|
|
217
|
+
The CLI reads configuration from environment variables. Source
|
|
218
|
+
priority (first match wins):
|
|
219
|
+
|
|
220
|
+
1. `MONDAY_API_TOKEN` in `process.env` (current shell).
|
|
221
|
+
2. `MONDAY_API_TOKEN=...` in a `.env` file in the working directory.
|
|
222
|
+
|
|
223
|
+
`--token <value>` is **not** a supported flag — tokens passed on the
|
|
224
|
+
command line leak via `ps`, shell history, and crash dumps. If you
|
|
225
|
+
must pass one inline, prefer `MONDAY_API_TOKEN=... monday ...` so
|
|
226
|
+
the token stays in the process env only.
|
|
227
|
+
|
|
228
|
+
The CLI sends `Authorization: <token>` (no `Bearer ` prefix).
|
|
229
|
+
Monday's API rejects the `Bearer ` form.
|
|
230
|
+
|
|
231
|
+
See [`.env.example`](./.env.example) for all supported variables
|
|
232
|
+
(API URL override, API-Version pin, request timeout, etc.).
|
|
233
|
+
|
|
234
|
+
## Scope
|
|
235
|
+
|
|
236
|
+
**v0.2.0 (published) ships:** the v0.1 read-only core +
|
|
237
|
+
safe-mutations surface PLUS the full mutation surface (item
|
|
238
|
+
lifecycle, update mutations, workspace lifecycle, board
|
|
239
|
+
lifecycle, board columns + groups). Built incrementally across
|
|
240
|
+
M8–M18; one breaking change vs v0.1 (see
|
|
241
|
+
[CHANGELOG.md](./CHANGELOG.md) for the full upgrade guide).
|
|
242
|
+
|
|
243
|
+
**v0.1.0 (published) shipped:** read-only core (account, workspace,
|
|
244
|
+
board, user, update, item) + safe mutations (`item set` /
|
|
245
|
+
`item clear` / `item update` single + bulk, `update create`) +
|
|
246
|
+
diagnostics (`board doctor`) + GraphQL escape hatch (`raw`) +
|
|
247
|
+
filter DSL (`--where` + `--filter-json`) + cursor pagination with
|
|
248
|
+
stale-cursor fail-fast + NDJSON streaming + local cache.
|
|
249
|
+
|
|
250
|
+
**What v0.2 added:**
|
|
251
|
+
|
|
252
|
+
- **M8** added the `--set-raw <col>=<json>` escape hatch (bypasses
|
|
253
|
+
the friendly translator; gated against read-only-forever and
|
|
254
|
+
files-shaped types) and the `link` / `email` / `phone` firm-row
|
|
255
|
+
friendly translators.
|
|
256
|
+
- **M9** added `monday item create` — top-level + classic-only
|
|
257
|
+
subitem creation with single round-trip semantics, optional
|
|
258
|
+
positional placement (`--position before|after --relative-to
|
|
259
|
+
<iid>`), and the same `--set` / `--set-raw` surface as
|
|
260
|
+
`item update`.
|
|
261
|
+
- **M10** closed the item-lifecycle cluster — `monday item archive`
|
|
262
|
+
/ `delete` / `duplicate`. The two destructive verbs share the
|
|
263
|
+
`--yes` confirmation gate (`--dry-run` exempts) and read the
|
|
264
|
+
source item for the dry-run preview; `archive` is wire-level
|
|
265
|
+
idempotent, `delete` non-idempotent (re-running after an interim
|
|
266
|
+
`create` would target the new item). `duplicate` is creative
|
|
267
|
+
(no `--yes`), runs two-leg live (board lookup + mutation —
|
|
268
|
+
Monday requires `board_id`), takes `--with-updates` to copy the
|
|
269
|
+
source's comments, and extends the live envelope's `data` with
|
|
270
|
+
`duplicated_from_id` so an agent has the source-ID echo handy.
|
|
271
|
+
- **M11** closed the four-verb lifecycle set with `monday item
|
|
272
|
+
move` — same-board (`--to-group <gid>`) via `move_item_to_group`
|
|
273
|
+
or cross-board (`--to-group <gid> --to-board <bid>`) via
|
|
274
|
+
`move_item_to_board`. Cross-board moves use
|
|
275
|
+
`--columns-mapping '{<src>: <target>}'` to bridge columns whose
|
|
276
|
+
IDs differ between source and target; the strict default
|
|
277
|
+
rejects unmatched columns pre-mutation with
|
|
278
|
+
`details.unmatched` + `details.example_mapping` (agents
|
|
279
|
+
copy-paste the seed into their retry) rather than letting
|
|
280
|
+
Monday silently drop them. `--columns-mapping {}` is the
|
|
281
|
+
explicit "drop everything (Monday's permissive default)"
|
|
282
|
+
opt-in. `--to-group` is required for both forms because
|
|
283
|
+
Monday's `move_item_to_board(group_id: ID!)` is mandatory.
|
|
284
|
+
Value-overrides on cross-board mappings deferred to v0.3
|
|
285
|
+
(Monday's `ColumnMappingInput` carries no value slot —
|
|
286
|
+
agents fire `monday item set` post-move when they need
|
|
287
|
+
overrides).
|
|
288
|
+
- **M12** ships the idempotency cluster — `monday item upsert`
|
|
289
|
+
+ bulk `monday item clear --where`. Upsert takes
|
|
290
|
+
`--match-by <col>[,<col>...]` plus `--name` / `--set` and
|
|
291
|
+
routes 0 / 1 / 2+ matches to `create_item` / `update_item` /
|
|
292
|
+
`ambiguous_match` (the 27th stable error code). Sequential-
|
|
293
|
+
retry idempotent — re-running with the same args from the
|
|
294
|
+
same agent is safe; concurrent agents are NOT a uniqueness
|
|
295
|
+
guarantee (agents should pick a stable hidden key column for
|
|
296
|
+
`--match-by` so race-induced duplicates surface as
|
|
297
|
+
`ambiguous_match` on the next call). The match-by safe-list is
|
|
298
|
+
intentionally narrow in v0.2: `name` / `text` / `long_text` /
|
|
299
|
+
`numbers` / external_id-shaped hidden text round-trip
|
|
300
|
+
verbatim; `status` / `dropdown` round-trip via label-text;
|
|
301
|
+
`people` is restricted to `me`; `date` / `link` / `email` /
|
|
302
|
+
`phone` are NOT v0.2-safe (the lookup-leg vs mutation-leg
|
|
303
|
+
grammars don't reconverge at the wire — see cli-design §5.8
|
|
304
|
+
for the per-kind breakdown). Bulk `clear --where` extends
|
|
305
|
+
M5b's per-item clear with the same cursor walk + `--yes`
|
|
306
|
+
gate + per-item failure decoration as bulk `update --where`.
|
|
307
|
+
|
|
308
|
+
**Writer allowlist** (other types return `unsupported_column_type`
|
|
309
|
+
with per-category guidance):
|
|
310
|
+
`status`, `text`, `long_text`, `numbers`, `dropdown`, `date`,
|
|
311
|
+
`people`, plus M8 firm row `link`, `email`, `phone`.
|
|
312
|
+
|
|
313
|
+
- **M13** ships the full update mutation surface — `monday update
|
|
314
|
+
reply` / `edit` / `delete` / `like` / `unlike` / `pin` / `unpin`
|
|
315
|
+
/ `clear-all`. The eight new verbs introduce the **partial-
|
|
316
|
+
success envelope** (`update clear-all` returns `ok: true` with
|
|
317
|
+
per-target outcomes in `data.results: [...]`); the envelope is
|
|
318
|
+
`ok: true` whenever the dispatch ran, with per-target failures
|
|
319
|
+
surfacing as `data.results[i].error: { code, message }` rather
|
|
320
|
+
than top-level `ok: false`. M13 also flips `update list`'s
|
|
321
|
+
default-replies behaviour (now empty unless `--with-replies`
|
|
322
|
+
is set — the one breaking change in v0.2).
|
|
323
|
+
- **M14** ships the workspace lifecycle — `monday workspace
|
|
324
|
+
create` / `update` / `delete` / `add-users` / `remove-users`.
|
|
325
|
+
`add-users` / `remove-users` reuse M13's partial-success
|
|
326
|
+
envelope and add resolver-fronted dispatch (mixed numeric IDs
|
|
327
|
+
+ emails through `userByEmail`); per-token resolution failures
|
|
328
|
+
land as records inside `data.results` with the input token
|
|
329
|
+
echoed verbatim.
|
|
330
|
+
- **M15** ships the board lifecycle — `monday board create` /
|
|
331
|
+
`update` / `archive` / `delete` / `duplicate` / `add-users`.
|
|
332
|
+
`board duplicate` introduces the **wrapped envelope** shape
|
|
333
|
+
(`data: { board: <projection>, is_async }`) because Monday's
|
|
334
|
+
`BoardDuplication` carries an `is_async` slot the projection
|
|
335
|
+
doesn't model. `board update` is per-attribute fan-out across
|
|
336
|
+
Monday's `update_board(board_attribute, new_value)` surface
|
|
337
|
+
with a force-live final read leg (Monday's per-attribute calls
|
|
338
|
+
return only the changed slice).
|
|
339
|
+
- **M16** ships board column lifecycle + the §8 eager-
|
|
340
|
+
invalidation contract — `monday board column-create` /
|
|
341
|
+
`column-update` / `column-delete`. Every board-structure
|
|
342
|
+
mutation calls `invalidateBoard(boardId)` post-success so a
|
|
343
|
+
same-process `board describe` sees fresh state without TTL
|
|
344
|
+
eviction. `column-create` adds the
|
|
345
|
+
`noncanonical_column_type` warning for non-allowlisted column
|
|
346
|
+
types with per-category `suggested_write_path` (raw_writable /
|
|
347
|
+
read_only_forever / files_shaped). M16 retrofitted `board
|
|
348
|
+
update` / `archive` / `delete` to participate in the §8
|
|
349
|
+
contract.
|
|
350
|
+
- **M17** ships board group lifecycle — `monday board group-
|
|
351
|
+
create` / `group-update` / `group-archive` / `group-duplicate`
|
|
352
|
+
/ `group-delete`. Group-update is per-attribute fan-out across
|
|
353
|
+
Monday's single `update_group(group_attribute, new_value)`
|
|
354
|
+
surface with NO force-live read leg (Monday's `update_group`
|
|
355
|
+
returns the full Group projection post-mutation, distinguishing
|
|
356
|
+
group-update from board-update). Group-create + group-update
|
|
357
|
+
validate `--color` against the pinned Monday-supported palette
|
|
358
|
+
in `src/api/group-color.ts`. Group-archive carries a snapshot-
|
|
359
|
+
bearing dry-run from cached board metadata; group-delete is
|
|
360
|
+
destructive-no-read minimal.
|
|
361
|
+
|
|
362
|
+
- **M18** closed v0.2 with NDJSON streaming for `item search` +
|
|
363
|
+
`update list` (the missing pair vs M7's `item list` streaming
|
|
364
|
+
pin), envelope-snapshots refresh (60 → 92), `output-shapes.md`
|
|
365
|
+
audit, README quickstart with `item create` + `item upsert`
|
|
366
|
+
examples, this CHANGELOG, and the version bump to `0.2.0`.
|
|
367
|
+
|
|
368
|
+
**Deferred to v0.3+:** `tags` / `board_relation` / `dependency`
|
|
369
|
+
friendly translators (slipped from v0.2 tentative at M18 close
|
|
370
|
+
per cli-design §13 + §5.3; usable today via `--set-raw`),
|
|
371
|
+
`monday dev` workflow shortcuts, multi-level subitem creation.
|
|
372
|
+
**v0.4:** `monday item watch`, `--concurrency`, asset uploads.
|
|
373
|
+
See [`docs/cli-design.md`](./docs/cli-design.md) §13 for the
|
|
374
|
+
full roadmap and [`docs/v0.2-plan.md`](./docs/v0.2-plan.md) for
|
|
375
|
+
the v0.2 milestone history.
|
|
376
|
+
|
|
377
|
+
See [CHANGELOG.md](./CHANGELOG.md) for the per-release contract.
|
|
378
|
+
|
|
379
|
+
## Documentation
|
|
380
|
+
|
|
381
|
+
- **[`docs/cli-design.md`](./docs/cli-design.md)** — canonical CLI
|
|
382
|
+
contract. **Start here** if you want to understand the full
|
|
383
|
+
surface, the JSON envelope, error codes, or the v0.1 vs v0.2
|
|
384
|
+
split.
|
|
385
|
+
- [`docs/output-shapes.md`](./docs/output-shapes.md) — per-command
|
|
386
|
+
output reference with concrete examples.
|
|
387
|
+
- [`docs/examples.md`](./docs/examples.md) — worked agent sessions.
|
|
388
|
+
- [`docs/architecture.md`](./docs/architecture.md) — module
|
|
389
|
+
boundaries (commands → api → SDK).
|
|
390
|
+
- [`docs/api-reference.md`](./docs/api-reference.md) — Monday
|
|
391
|
+
concepts cheat sheet.
|
|
392
|
+
- [`docs/development.md`](./docs/development.md) — local dev
|
|
393
|
+
workflow, adding a new command.
|
|
394
|
+
- [`CLAUDE.md`](./CLAUDE.md) — agent-facing project context and
|
|
395
|
+
conventions.
|
|
396
|
+
|
|
397
|
+
## Development
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
git clone https://github.com/Firer/monday-cli.git
|
|
401
|
+
cd monday-cli
|
|
402
|
+
npm install # `prepare` hook auto-builds dist/
|
|
403
|
+
npm run dev -- account whoami --json # tsx-based dev runner
|
|
404
|
+
|
|
405
|
+
# Quality gates (all must pass before merge):
|
|
406
|
+
npm run typecheck
|
|
407
|
+
npm run lint
|
|
408
|
+
npm test
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
The full dev workflow + how to add a new command is in
|
|
412
|
+
[`docs/development.md`](./docs/development.md). Conventions:
|
|
413
|
+
|
|
414
|
+
- **Strictest TypeScript** (`exactOptionalPropertyTypes`,
|
|
415
|
+
`noUncheckedIndexedAccess`, `verbatimModuleSyntax`).
|
|
416
|
+
- **No `any`** (lint-enforced).
|
|
417
|
+
- **Parse at every boundary** with zod.
|
|
418
|
+
- **Mock at the network boundary, not internal modules.**
|
|
419
|
+
- **Branch coverage 94%+ floor.**
|
|
420
|
+
- **Atomic commits, Conventional Commits.**
|
|
421
|
+
|
|
422
|
+
## Contributing
|
|
423
|
+
|
|
424
|
+
PRs welcome. Read [`docs/cli-design.md`](./docs/cli-design.md) for
|
|
425
|
+
the contract before writing code — anything that changes the
|
|
426
|
+
output envelope or error codes is a major-version bump and
|
|
427
|
+
requires explicit doc revision.
|
|
428
|
+
|
|
429
|
+
## License
|
|
430
|
+
|
|
431
|
+
[MIT](./LICENSE) © Nick Webster
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Board-child lookup helper (`v0.2-plan.md` §22 R51 lift).
|
|
3
|
+
*
|
|
4
|
+
* Three M16/M17 dry-run preflight sites share a near-verbatim shape:
|
|
5
|
+
* load `boardMetadataSchema` via `loadBoardMetadata`, find a child
|
|
6
|
+
* entity by ID inside the `columns: [...]` or `groups: [...]` array,
|
|
7
|
+
* and throw `not_found` with `details: { board_id, [<kind>_id]: id }`
|
|
8
|
+
* if the child isn't present. Pre-lift each site was 14 lines (find
|
|
9
|
+
* + undefined-guard + throw + detail-object literal); post-lift each
|
|
10
|
+
* site is one helper call. Pure boilerplate consolidation — the
|
|
11
|
+
* helper preserves the `Monday returned no <noun> with id <id> on
|
|
12
|
+
* board <boardId>` phrasing AND the `not_found` error code AND the
|
|
13
|
+
* `details` object shape byte-identical to the inline form so every
|
|
14
|
+
* existing integration test stays green without modification.
|
|
15
|
+
*
|
|
16
|
+
* **Sites at R51 lift time (3, M17 close):**
|
|
17
|
+
* - `column-update` (M16) — finds column by id; details.column_id.
|
|
18
|
+
* - `group-update` (M17) — finds group by id; details.group_id.
|
|
19
|
+
* - `group-archive` (M17) — finds group by id; details.group_id.
|
|
20
|
+
*
|
|
21
|
+
* The `kind: K` parameter doubles as (a) the `metadata[kind]` array
|
|
22
|
+
* lookup (`columns` / `groups`); (b) the singular noun for the
|
|
23
|
+
* error-message phrasing (`column` / `group`); (c) the
|
|
24
|
+
* `<kind-singular>_id` detail-key suffix (`column_id` / `group_id`).
|
|
25
|
+
* Singular = plural with the trailing `s` stripped — Monday's two
|
|
26
|
+
* board-child entities both spell their detail-key suffix that way
|
|
27
|
+
* and the per-noun divergence (column_id vs group_id) is the only
|
|
28
|
+
* shape difference between the three call sites.
|
|
29
|
+
*
|
|
30
|
+
* **Discriminated return type via `K extends 'columns' | 'groups'`.**
|
|
31
|
+
* Each call site reads field-set-specific properties of the returned
|
|
32
|
+
* child — column-update reads `current.title` + `current.description`;
|
|
33
|
+
* group-update reads `current.title` + `current.color`; group-archive
|
|
34
|
+
* reads all six `BoardGroup` fields for its snapshot projection. The
|
|
35
|
+
* conditional return type (`K extends 'columns' ? BoardColumn :
|
|
36
|
+
* BoardGroup`) preserves type-narrowing at every call site without
|
|
37
|
+
* `as` casts.
|
|
38
|
+
*
|
|
39
|
+
* **Why not parameterised on `errorCode` / `errorMessage`** (cf. R28 /
|
|
40
|
+
* R37 / R43 / R45 / R48). All three current consumers surface
|
|
41
|
+
* `not_found` on missing children — the per-noun divergence is the
|
|
42
|
+
* detail-key suffix, not the error code. Adding `errorCode` would
|
|
43
|
+
* scope-creep into the R28-shaped configurability the trigger
|
|
44
|
+
* doesn't justify (mutation projection has both `internal_error` for
|
|
45
|
+
* create's pre-id null + `not_found` for everything else; finding
|
|
46
|
+
* children in cached metadata is uniformly `not_found`). If a future
|
|
47
|
+
* consumer needs a different code, the parameter can land then —
|
|
48
|
+
* the trigger lineage shows R-class helpers grow parameters as new
|
|
49
|
+
* consumers surface, not pre-emptively.
|
|
50
|
+
*
|
|
51
|
+
* **Future-proofing.** When v0.3 surfaces a fourth child kind (e.g.
|
|
52
|
+
* board subscribers / board permissions), the helper extends
|
|
53
|
+
* cleanly — `kind: K` widens to include the new collection name,
|
|
54
|
+
* the conditional return type extends accordingly, and the noun
|
|
55
|
+
* derivation stays mechanical (`kind.slice(0, -1)`). No call-site
|
|
56
|
+
* breakage.
|
|
57
|
+
*/
|
|
58
|
+
import type { BoardColumn, BoardGroup, BoardMetadata } from './board-metadata.js';
|
|
59
|
+
/**
|
|
60
|
+
* Map from the `kind` discriminator to the returned child type. The
|
|
61
|
+
* conditional return is expressed via this lookup so call sites
|
|
62
|
+
* receive `BoardColumn` for `kind: 'columns'` and `BoardGroup` for
|
|
63
|
+
* `kind: 'groups'` without an `as` cast.
|
|
64
|
+
*/
|
|
65
|
+
type BoardChildOf<K extends 'columns' | 'groups'> = K extends 'columns' ? BoardColumn : BoardGroup;
|
|
66
|
+
export interface FindBoardChildOrThrowInputs<K extends 'columns' | 'groups'> {
|
|
67
|
+
readonly metadata: BoardMetadata;
|
|
68
|
+
/**
|
|
69
|
+
* Which `BoardMetadata` collection to search and which detail-key
|
|
70
|
+
* suffix to surface on the thrown error. `'columns'` → searches
|
|
71
|
+
* `metadata.columns`, error noun `column`, detail-key `column_id`.
|
|
72
|
+
* `'groups'` → searches `metadata.groups`, error noun `group`,
|
|
73
|
+
* detail-key `group_id`.
|
|
74
|
+
*/
|
|
75
|
+
readonly kind: K;
|
|
76
|
+
readonly id: string;
|
|
77
|
+
readonly boardId: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Finds a child entity (column or group) by ID inside a loaded
|
|
81
|
+
* `BoardMetadata`; throws `ApiError('not_found', ...)` with
|
|
82
|
+
* `details: { board_id, [<kind-singular>_id]: id }` if absent.
|
|
83
|
+
*
|
|
84
|
+
* Caller-supplied IDs that don't correspond to anything on the
|
|
85
|
+
* loaded board surface as `not_found` with both `details.board_id`
|
|
86
|
+
* AND `details.<kind-singular>_id` populated — agents distinguish
|
|
87
|
+
* "wrong board id" (the board fetch itself returned empty;
|
|
88
|
+
* surfaced upstream by `loadBoardMetadata`) from "wrong child id"
|
|
89
|
+
* (this helper's path) without re-reading.
|
|
90
|
+
*
|
|
91
|
+
* Pure projection — never mutates `metadata`.
|
|
92
|
+
*/
|
|
93
|
+
export declare const findBoardChildOrThrow: <K extends "columns" | "groups">(inputs: FindBoardChildOrThrowInputs<K>) => BoardChildOf<K>;
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=board-child-finder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-child-finder.d.ts","sourceRoot":"","sources":["../../src/api/board-child-finder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElF;;;;;GAKG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,QAAQ,IAAI,CAAC,SAAS,SAAS,GACnE,WAAW,GACX,UAAU,CAAC;AAEf,MAAM,WAAW,2BAA2B,CAAC,CAAC,SAAS,SAAS,GAAG,QAAQ;IACzE,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,SAAS,GAAG,QAAQ,EAClE,QAAQ,2BAA2B,CAAC,CAAC,CAAC,KACrC,YAAY,CAAC,CAAC,CAoBhB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Board-child lookup helper (`v0.2-plan.md` §22 R51 lift).
|
|
3
|
+
*
|
|
4
|
+
* Three M16/M17 dry-run preflight sites share a near-verbatim shape:
|
|
5
|
+
* load `boardMetadataSchema` via `loadBoardMetadata`, find a child
|
|
6
|
+
* entity by ID inside the `columns: [...]` or `groups: [...]` array,
|
|
7
|
+
* and throw `not_found` with `details: { board_id, [<kind>_id]: id }`
|
|
8
|
+
* if the child isn't present. Pre-lift each site was 14 lines (find
|
|
9
|
+
* + undefined-guard + throw + detail-object literal); post-lift each
|
|
10
|
+
* site is one helper call. Pure boilerplate consolidation — the
|
|
11
|
+
* helper preserves the `Monday returned no <noun> with id <id> on
|
|
12
|
+
* board <boardId>` phrasing AND the `not_found` error code AND the
|
|
13
|
+
* `details` object shape byte-identical to the inline form so every
|
|
14
|
+
* existing integration test stays green without modification.
|
|
15
|
+
*
|
|
16
|
+
* **Sites at R51 lift time (3, M17 close):**
|
|
17
|
+
* - `column-update` (M16) — finds column by id; details.column_id.
|
|
18
|
+
* - `group-update` (M17) — finds group by id; details.group_id.
|
|
19
|
+
* - `group-archive` (M17) — finds group by id; details.group_id.
|
|
20
|
+
*
|
|
21
|
+
* The `kind: K` parameter doubles as (a) the `metadata[kind]` array
|
|
22
|
+
* lookup (`columns` / `groups`); (b) the singular noun for the
|
|
23
|
+
* error-message phrasing (`column` / `group`); (c) the
|
|
24
|
+
* `<kind-singular>_id` detail-key suffix (`column_id` / `group_id`).
|
|
25
|
+
* Singular = plural with the trailing `s` stripped — Monday's two
|
|
26
|
+
* board-child entities both spell their detail-key suffix that way
|
|
27
|
+
* and the per-noun divergence (column_id vs group_id) is the only
|
|
28
|
+
* shape difference between the three call sites.
|
|
29
|
+
*
|
|
30
|
+
* **Discriminated return type via `K extends 'columns' | 'groups'`.**
|
|
31
|
+
* Each call site reads field-set-specific properties of the returned
|
|
32
|
+
* child — column-update reads `current.title` + `current.description`;
|
|
33
|
+
* group-update reads `current.title` + `current.color`; group-archive
|
|
34
|
+
* reads all six `BoardGroup` fields for its snapshot projection. The
|
|
35
|
+
* conditional return type (`K extends 'columns' ? BoardColumn :
|
|
36
|
+
* BoardGroup`) preserves type-narrowing at every call site without
|
|
37
|
+
* `as` casts.
|
|
38
|
+
*
|
|
39
|
+
* **Why not parameterised on `errorCode` / `errorMessage`** (cf. R28 /
|
|
40
|
+
* R37 / R43 / R45 / R48). All three current consumers surface
|
|
41
|
+
* `not_found` on missing children — the per-noun divergence is the
|
|
42
|
+
* detail-key suffix, not the error code. Adding `errorCode` would
|
|
43
|
+
* scope-creep into the R28-shaped configurability the trigger
|
|
44
|
+
* doesn't justify (mutation projection has both `internal_error` for
|
|
45
|
+
* create's pre-id null + `not_found` for everything else; finding
|
|
46
|
+
* children in cached metadata is uniformly `not_found`). If a future
|
|
47
|
+
* consumer needs a different code, the parameter can land then —
|
|
48
|
+
* the trigger lineage shows R-class helpers grow parameters as new
|
|
49
|
+
* consumers surface, not pre-emptively.
|
|
50
|
+
*
|
|
51
|
+
* **Future-proofing.** When v0.3 surfaces a fourth child kind (e.g.
|
|
52
|
+
* board subscribers / board permissions), the helper extends
|
|
53
|
+
* cleanly — `kind: K` widens to include the new collection name,
|
|
54
|
+
* the conditional return type extends accordingly, and the noun
|
|
55
|
+
* derivation stays mechanical (`kind.slice(0, -1)`). No call-site
|
|
56
|
+
* breakage.
|
|
57
|
+
*/
|
|
58
|
+
import { ApiError } from '../utils/errors.js';
|
|
59
|
+
/**
|
|
60
|
+
* Finds a child entity (column or group) by ID inside a loaded
|
|
61
|
+
* `BoardMetadata`; throws `ApiError('not_found', ...)` with
|
|
62
|
+
* `details: { board_id, [<kind-singular>_id]: id }` if absent.
|
|
63
|
+
*
|
|
64
|
+
* Caller-supplied IDs that don't correspond to anything on the
|
|
65
|
+
* loaded board surface as `not_found` with both `details.board_id`
|
|
66
|
+
* AND `details.<kind-singular>_id` populated — agents distinguish
|
|
67
|
+
* "wrong board id" (the board fetch itself returned empty;
|
|
68
|
+
* surfaced upstream by `loadBoardMetadata`) from "wrong child id"
|
|
69
|
+
* (this helper's path) without re-reading.
|
|
70
|
+
*
|
|
71
|
+
* Pure projection — never mutates `metadata`.
|
|
72
|
+
*/
|
|
73
|
+
export const findBoardChildOrThrow = (inputs) => {
|
|
74
|
+
const { metadata, kind, id, boardId } = inputs;
|
|
75
|
+
const noun = kind === 'columns' ? 'column' : 'group';
|
|
76
|
+
const detailKey = `${noun}_id`;
|
|
77
|
+
const collection = kind === 'columns' ? metadata.columns : metadata.groups;
|
|
78
|
+
const found = collection.find((child) => child.id === id);
|
|
79
|
+
if (found === undefined) {
|
|
80
|
+
throw new ApiError('not_found', `Monday returned no ${noun} with id ${id} on board ${boardId}`, {
|
|
81
|
+
details: {
|
|
82
|
+
board_id: boardId,
|
|
83
|
+
[detailKey]: id,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return found;
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=board-child-finder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-child-finder.js","sourceRoot":"","sources":["../../src/api/board-child-finder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AA2B9C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAsC,EACrB,EAAE;IACnB,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAC/C,MAAM,IAAI,GAAG,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;IACrD,MAAM,SAAS,GAAG,GAAG,IAAI,KAAK,CAAC;IAC/B,MAAM,UAAU,GACd,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC1D,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,QAAQ,CAChB,WAAW,EACX,sBAAsB,IAAI,YAAY,EAAE,aAAa,OAAO,EAAE,EAC9D;YACE,OAAO,EAAE;gBACP,QAAQ,EAAE,OAAO;gBACjB,CAAC,SAAS,CAAC,EAAE,EAAE;aAChB;SACF,CACF,CAAC;IACJ,CAAC;IACD,OAAO,KAAwB,CAAC;AAClC,CAAC,CAAC"}
|