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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live-mutation null-result projection for the M16 column lifecycle
|
|
3
|
+
* cluster (`v0.2-plan.md` §22 R45 lift).
|
|
4
|
+
*
|
|
5
|
+
* Three M16 verbs share a near-verbatim shape: null-check the wire
|
|
6
|
+
* payload, throw a typed ApiError on null carrying both
|
|
7
|
+
* `details.board_id` and `details.column_id` (the column-mutation
|
|
8
|
+
* wire signature is two-tuple — `create_column` carries
|
|
9
|
+
* `board_id` only pre-id, but the read-side projection always pairs
|
|
10
|
+
* the two), then parse through `columnProjectionSchema` to surface
|
|
11
|
+
* the §6.4 mutation envelope's `data: <projected snapshot>`.
|
|
12
|
+
*
|
|
13
|
+
* Lifted alongside the first M16 column verb commit (mirroring R39's
|
|
14
|
+
* "ship the projection helper alongside the first new mutation
|
|
15
|
+
* rather than as a follow-up R-class" precedent — the three M16
|
|
16
|
+
* verbs land in the same milestone, so adopting the helper from day
|
|
17
|
+
* one avoids three parallel inline implementations of the same
|
|
18
|
+
* shape). cf. R28 (`projectMutationItem`), R37 (`projectMutationUpdate`),
|
|
19
|
+
* R43 (`projectMutationBoard`); R45 ships the fourth per-noun
|
|
20
|
+
* helper at the same 3-consumer threshold.
|
|
21
|
+
*
|
|
22
|
+
* **Why parameterised on `errorCode` + `errorMessage`.** Like R28 /
|
|
23
|
+
* R37 / R43, the M16 verbs diverge in error semantics:
|
|
24
|
+
* - `column-create` chose `internal_error` (every successful call
|
|
25
|
+
* returns a Column — a null payload means Monday glitched server-
|
|
26
|
+
* side, abnormal); the `details` carry `board_id` + `title` (no
|
|
27
|
+
* column_id yet).
|
|
28
|
+
* - `column-update` and `column-delete` chose `not_found`
|
|
29
|
+
* (Monday's idiomatic null-for-missing-or-no-access response —
|
|
30
|
+
* a typed agent-recovery story); both carry `board_id` +
|
|
31
|
+
* `column_id`.
|
|
32
|
+
* The helper owns the boilerplate (null check, `details: { board_id,
|
|
33
|
+
* [columnIdKey]: columnIdValue }` envelope, the `unwrapOrThrow`
|
|
34
|
+
* schema parse); each call site supplies its own typed error parts.
|
|
35
|
+
*
|
|
36
|
+
* **`COLUMN_FIELDS_FRAGMENT` + `columnProjectionSchema` co-ship.**
|
|
37
|
+
* Mirrors R39's `WORKSPACE_FIELDS_FRAGMENT` + `workspaceProjection
|
|
38
|
+
* Schema` and R43's `BOARD_FIELDS_FRAGMENT` + `boardProjectionSchema`
|
|
39
|
+
* pattern. The schema mirrors the `columnSchema` already in
|
|
40
|
+
* `src/api/board-metadata.ts` (the read-side cache projection) but
|
|
41
|
+
* exists as an exported strict projection schema so M16's three
|
|
42
|
+
* mutation verbs share one source of truth for the on-the-wire
|
|
43
|
+
* Column shape.
|
|
44
|
+
*
|
|
45
|
+
* **What stays at the call site.** The wire-shape parse of the full
|
|
46
|
+
* mutation response (`responseSchema.safeParse(response.data)`) stays
|
|
47
|
+
* inline because each verb's response root key (`create_column` /
|
|
48
|
+
* `change_column_title` / `change_column_metadata` / `delete_column`)
|
|
49
|
+
* is per-verb. The missing-root-key check (schema-drift →
|
|
50
|
+
* `internal_error` with a `hint`) stays inline too — that's Codex
|
|
51
|
+
* M15 implementation round-2 F1's distinction between schema-drift
|
|
52
|
+
* and null-payload, deliberately preserved at each site. R42 would
|
|
53
|
+
* unify the missing-root-key check across all pre-M14 mutation verbs
|
|
54
|
+
* once scheduled.
|
|
55
|
+
*/
|
|
56
|
+
import { z } from 'zod';
|
|
57
|
+
import { ApiError } from '../utils/errors.js';
|
|
58
|
+
import { unwrapOrThrow } from '../utils/parse-boundary.js';
|
|
59
|
+
/**
|
|
60
|
+
* Shared GraphQL selection set for the M16 column projection. 6-space
|
|
61
|
+
* continuation indent matches the column every consumer interpolates
|
|
62
|
+
* `${COLUMN_FIELDS_FRAGMENT}` at, so rendered query bytes stay
|
|
63
|
+
* stable across consumers. Mirrors `BOARD_FIELDS_FRAGMENT` (R43) and
|
|
64
|
+
* `WORKSPACE_FIELDS_FRAGMENT` (R39).
|
|
65
|
+
*
|
|
66
|
+
* Field set tracks `boardMetadataSchema.columns[*]` (the read-side
|
|
67
|
+
* cache projection) so a `board describe` after a successful column
|
|
68
|
+
* mutation returns the same JSON shape the mutation envelope did.
|
|
69
|
+
*/
|
|
70
|
+
export const COLUMN_FIELDS_FRAGMENT = `id
|
|
71
|
+
title
|
|
72
|
+
type
|
|
73
|
+
description
|
|
74
|
+
archived
|
|
75
|
+
settings_str
|
|
76
|
+
width`;
|
|
77
|
+
/**
|
|
78
|
+
* Strict zod schema for the column projection — the exact shape
|
|
79
|
+
* `COLUMN_FIELDS_FRAGMENT` selects from the wire. Shared by
|
|
80
|
+
* M16's `column-create` / `column-update` / `column-delete`; each
|
|
81
|
+
* verb's `CommandModule.outputSchema` aliases this so the schema-
|
|
82
|
+
* export pipeline emits one canonical shape.
|
|
83
|
+
*
|
|
84
|
+
* Mirrors `boardMetadataSchema.columns[*]` in `board-metadata.ts`
|
|
85
|
+
* verbatim — same fields, same nullability — so a `board describe`
|
|
86
|
+
* after a successful column mutation reads the same JSON shape the
|
|
87
|
+
* mutation envelope wrote.
|
|
88
|
+
*/
|
|
89
|
+
export const columnProjectionSchema = z
|
|
90
|
+
.object({
|
|
91
|
+
id: z.string().min(1),
|
|
92
|
+
title: z.string(),
|
|
93
|
+
type: z.string().min(1),
|
|
94
|
+
description: z.string().nullable(),
|
|
95
|
+
archived: z.boolean().nullable(),
|
|
96
|
+
settings_str: z.string().nullable(),
|
|
97
|
+
width: z.number().nullable(),
|
|
98
|
+
})
|
|
99
|
+
.strict();
|
|
100
|
+
/**
|
|
101
|
+
* Parses + projects a live-mutation `Column` payload, throwing the
|
|
102
|
+
* supplied typed error on null/undefined. Caller owns the error code
|
|
103
|
+
* + message so create's `internal_error` / "no column payload from
|
|
104
|
+
* create_column for board <X> title <Y>" and update's / delete's
|
|
105
|
+
* `not_found` / "no column payload from <op> for board <X> column
|
|
106
|
+
* <Y>" both survive the lift byte-for-byte.
|
|
107
|
+
*
|
|
108
|
+
* `details: { board_id, [columnIdKey]: columnIdValue }` is supplied
|
|
109
|
+
* by the helper so every consumer carries the same envelope shape —
|
|
110
|
+
* agents key off `details.board_id` + `details.column_id` (or
|
|
111
|
+
* `details.title` on create's pre-id path) regardless of which verb
|
|
112
|
+
* threw (cli-design §6.5).
|
|
113
|
+
*/
|
|
114
|
+
export const projectMutationColumn = ({ raw, errorCode, errorMessage, boardId, columnIdKey, columnIdValue, }) => {
|
|
115
|
+
const details = {
|
|
116
|
+
board_id: boardId,
|
|
117
|
+
[columnIdKey]: columnIdValue,
|
|
118
|
+
};
|
|
119
|
+
if (raw === null || raw === undefined) {
|
|
120
|
+
throw new ApiError(errorCode, errorMessage, { details });
|
|
121
|
+
}
|
|
122
|
+
const subjectPhrase = columnIdKey === 'title'
|
|
123
|
+
? `board ${boardId} title ${JSON.stringify(columnIdValue)}`
|
|
124
|
+
: `board ${boardId} column ${columnIdValue}`;
|
|
125
|
+
return unwrapOrThrow(columnProjectionSchema.safeParse(raw), {
|
|
126
|
+
context: `Monday returned a malformed column payload for ${subjectPhrase}`,
|
|
127
|
+
details,
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=column-mutation-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-mutation-result.js","sourceRoot":"","sources":["../../src/api/column-mutation-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAkB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;YAM1B,CAAC;AAEb;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC;KACD,MAAM,EAAE,CAAC;AAmCZ;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,GAAG,EACH,SAAS,EACT,YAAY,EACZ,OAAO,EACP,WAAW,EACX,aAAa,GACe,EAAoB,EAAE;IAClD,MAAM,OAAO,GAAsC;QACjD,QAAQ,EAAE,OAAO;QACjB,CAAC,WAAW,CAAC,EAAE,aAAa;KAC7B,CAAC;IACF,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,IAAI,QAAQ,CAAC,SAAS,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM,aAAa,GACjB,WAAW,KAAK,OAAO;QACrB,CAAC,CAAC,SAAS,OAAO,UAAU,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE;QAC3D,CAAC,CAAC,SAAS,OAAO,WAAW,aAAa,EAAE,CAAC;IACjD,OAAO,aAAa,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;QAC1D,OAAO,EAAE,kDAAkD,aAAa,EAAE;QAC1E,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v0.1 column-type allowlist + a defensive `settings_str` parser
|
|
3
|
+
* (`cli-design.md` §5.3 step 3 + step 4, `v0.1-plan.md` §3 M5a).
|
|
4
|
+
*
|
|
5
|
+
* Two consumers share this surface:
|
|
6
|
+
* - `commands/board/describe.ts` — populates `writable: bool` and
|
|
7
|
+
* `example_set: string[] | null` on every column it surfaces, so
|
|
8
|
+
* an agent reading one `board describe` payload knows exactly
|
|
9
|
+
* which columns `--set` will accept.
|
|
10
|
+
* - `api/column-values.ts` (M5a writer) — gates the friendly
|
|
11
|
+
* translation paths and surfaces `unsupported_column_type` for
|
|
12
|
+
* anything else.
|
|
13
|
+
*
|
|
14
|
+
* Owning the allowlist here (not in either consumer) means the
|
|
15
|
+
* "writable types contract" has one source of truth: the v0.2 author
|
|
16
|
+
* who wants to add `world_clock` flips one entry and both `describe`
|
|
17
|
+
* and the writer pick it up. R8 in `v0.1-plan.md` §15 / §17.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Writable column types per `cli-design.md` §5.3.3 + the v0.2 writer-
|
|
21
|
+
* expansion roadmap (M8). Order is frozen — not because Sets are
|
|
22
|
+
* ordered, but because tests iterate the array form and the snapshot
|
|
23
|
+
* is part of the contract surface. v0.1 entries appear first (they
|
|
24
|
+
* shipped first); M8 firm additions follow in roadmap order.
|
|
25
|
+
*
|
|
26
|
+
* Categories baked into the same allowlist:
|
|
27
|
+
* - **simple** (`text` / `long_text` / `numbers`) — translate to a
|
|
28
|
+
* bare string and use `change_simple_column_value`.
|
|
29
|
+
* - **rich (v0.1)** (`status` / `dropdown` / `date` / `people`) —
|
|
30
|
+
* translate to a JSON object and use `change_column_value` /
|
|
31
|
+
* `change_multiple_column_values`.
|
|
32
|
+
* - **rich (v0.2 firm)** (`link` / `email` / `phone`) — pipe-form
|
|
33
|
+
* `<value>|<text>` parsers in `links.ts` / `emails.ts` /
|
|
34
|
+
* `phones.ts`; same `change_column_value` wire path.
|
|
35
|
+
*
|
|
36
|
+
* The split lives in `column-values.ts`; here we just enumerate the
|
|
37
|
+
* full allowlist. Tentative v0.2 types (`tags` / `board_relation` /
|
|
38
|
+
* `dependency`) stay in `V0_2_WRITER_EXPANSION_TYPES` until their
|
|
39
|
+
* fixture work clears — they ship firm via the same array's expansion
|
|
40
|
+
* once translators land, or slip to v0.3 in the M8 post-mortem.
|
|
41
|
+
*/
|
|
42
|
+
export declare const WRITABLE_COLUMN_TYPES: readonly ["text", "long_text", "numbers", "status", "dropdown", "date", "people", "link", "email", "phone"];
|
|
43
|
+
export type WritableColumnType = (typeof WRITABLE_COLUMN_TYPES)[number];
|
|
44
|
+
/**
|
|
45
|
+
* Membership test for the v0.1 writable allowlist. Narrows the input
|
|
46
|
+
* type to `WritableColumnType` so downstream switches don't need to
|
|
47
|
+
* re-cast.
|
|
48
|
+
*/
|
|
49
|
+
export declare const isWritableColumnType: (type: string) => type is WritableColumnType;
|
|
50
|
+
/**
|
|
51
|
+
* Defensive parse for Monday's `settings_str` field. Monday returns
|
|
52
|
+
* a JSON-encoded string for status / dropdown / etc. column settings,
|
|
53
|
+
* but the value can be `null`, an empty string, or a malformed blob
|
|
54
|
+
* on legacy boards. Callers want a parsed object or `null` — never a
|
|
55
|
+
* thrown `SyntaxError`.
|
|
56
|
+
*
|
|
57
|
+
* Returns `null` when the input is missing / empty / unparseable.
|
|
58
|
+
* Returns the parsed value (typed `unknown` — caller validates the
|
|
59
|
+
* shape) when JSON.parse succeeds. The caller is the boundary that
|
|
60
|
+
* narrows the result to a typed shape.
|
|
61
|
+
*/
|
|
62
|
+
export declare const parseColumnSettings: (raw: string | null) => unknown;
|
|
63
|
+
/**
|
|
64
|
+
* Column types still pending in the v0.2 writer-expansion milestone
|
|
65
|
+
* (`cli-design.md` §5.3 writer-expansion roadmap table). M8 shipped
|
|
66
|
+
* `link` / `email` / `phone` firm — those moved to
|
|
67
|
+
* `WRITABLE_COLUMN_TYPES` and are no longer surfaced here. The
|
|
68
|
+
* remaining three are M8's tentative row; their fixture work decides
|
|
69
|
+
* whether they ship firm in v0.2 (move to `WRITABLE_COLUMN_TYPES`) or
|
|
70
|
+
* slip to v0.3 (move to a v0.3 deferral surfaced via the same
|
|
71
|
+
* roadmap-category branch).
|
|
72
|
+
*
|
|
73
|
+
* Source-of-truth alongside `WRITABLE_COLUMN_TYPES` so the
|
|
74
|
+
* `unsupported_column_type` error builder can give per-type-accurate
|
|
75
|
+
* guidance instead of blanket-deferring every non-allowlisted type.
|
|
76
|
+
*/
|
|
77
|
+
export declare const V0_2_WRITER_EXPANSION_TYPES: readonly ["tags", "board_relation", "dependency"];
|
|
78
|
+
export type V0_2WriterExpansionType = (typeof V0_2_WRITER_EXPANSION_TYPES)[number];
|
|
79
|
+
/**
|
|
80
|
+
* Column types Monday computes server-side and **never makes
|
|
81
|
+
* writable via the API** (`cli-design.md` §5.3 writer-expansion
|
|
82
|
+
* roadmap table — "read-only forever" row). cli-design says
|
|
83
|
+
* explicitly:
|
|
84
|
+
*
|
|
85
|
+
* > The "read-only forever" row matters for agents: trying `--set`
|
|
86
|
+
* > on a mirror/formula/etc. surfaces `unsupported_column_type`
|
|
87
|
+
* > and will *always* surface that, regardless of version. The
|
|
88
|
+
* > hint should point at the underlying source column, not at
|
|
89
|
+
* > `--set-raw`.
|
|
90
|
+
*
|
|
91
|
+
* The error builder branches on this set to emit `read_only: true`
|
|
92
|
+
* (no `deferred_to`) and a hint that names the underlying-source
|
|
93
|
+
* pattern instead of advertising a future flag.
|
|
94
|
+
*/
|
|
95
|
+
export declare const READ_ONLY_FOREVER_TYPES: readonly ["mirror", "formula", "auto_number", "creation_log", "last_updated", "item_id", "item_assignees"];
|
|
96
|
+
export type ReadOnlyForeverType = (typeof READ_ONLY_FOREVER_TYPES)[number];
|
|
97
|
+
/**
|
|
98
|
+
* Membership test for the read-only-forever row. Used by `--set-raw`
|
|
99
|
+
* (M8) to reject these types post-resolution per cli-design §5.3
|
|
100
|
+
* escape-hatch contract — Monday's API never makes them writable
|
|
101
|
+
* regardless of payload, so accepting a raw payload would just shift
|
|
102
|
+
* the failure from CLI-time to Monday-time.
|
|
103
|
+
*/
|
|
104
|
+
export declare const isReadOnlyForeverType: (type: string) => type is ReadOnlyForeverType;
|
|
105
|
+
/**
|
|
106
|
+
* Column types Monday writes via `add_file_to_column` (file upload
|
|
107
|
+
* via multipart) rather than `change_column_value` / `change_multiple_
|
|
108
|
+
* column_values` (`cli-design.md` §5.3 writer-expansion roadmap "files"
|
|
109
|
+
* row + the escape-hatch contract).
|
|
110
|
+
*
|
|
111
|
+
* The friendly translator and `--set-raw` both go through
|
|
112
|
+
* `change_column_value` / `change_multiple_column_values`, so a
|
|
113
|
+
* `--set-raw` raw payload cannot reach the right wire surface for
|
|
114
|
+
* these types — `--set-raw` rejects them with `unsupported_column_
|
|
115
|
+
* type` carrying `deferred_to: "v0.4"` (asset upload pinned to v0.4
|
|
116
|
+
* per cli-design §13).
|
|
117
|
+
*
|
|
118
|
+
* Currently one entry (`file`); the slot is plural because Monday may
|
|
119
|
+
* surface other multipart-upload-shaped types in future API versions
|
|
120
|
+
* and the contract should accommodate adding rows without touching
|
|
121
|
+
* the consumer.
|
|
122
|
+
*/
|
|
123
|
+
export declare const FILES_SHAPED_TYPES: readonly ["file"];
|
|
124
|
+
export type FilesShapedType = (typeof FILES_SHAPED_TYPES)[number];
|
|
125
|
+
/**
|
|
126
|
+
* Membership test for the files-shaped row. Used by `--set-raw` (M8)
|
|
127
|
+
* to reject these types post-resolution per cli-design §5.3 escape-
|
|
128
|
+
* hatch contract — the underlying mutation isn't `change_column_value`
|
|
129
|
+
* so a raw payload can't reach the right wire surface.
|
|
130
|
+
*/
|
|
131
|
+
export declare const isFilesShapedType: (type: string) => type is FilesShapedType;
|
|
132
|
+
/**
|
|
133
|
+
* Roadmap category for an unsupported column type. The
|
|
134
|
+
* `unsupported_column_type` error builder uses this to pick a
|
|
135
|
+
* per-category message + details slot.
|
|
136
|
+
*
|
|
137
|
+
* - `'v0_2_writer_expansion'` — tentative-row writer-expansion
|
|
138
|
+
* types (`tags` / `board_relation` / `dependency`) that
|
|
139
|
+
* **slipped from v0.2 to v0.3 at M18 close**. Surfaces
|
|
140
|
+
* `deferred_to: "v0.3"` and points at the v0.3 writer-expansion
|
|
141
|
+
* work. The category constant name retains its M8-era spelling
|
|
142
|
+
* for stability — renaming would churn every consumer with no
|
|
143
|
+
* wire-shape change. M8 shipped `link` / `email` / `phone`
|
|
144
|
+
* firm so the branch no longer fires for those types — they
|
|
145
|
+
* resolve through the friendly translator.
|
|
146
|
+
* - `'read_only_forever'` — Monday-computed columns (mirror /
|
|
147
|
+
* formula / auto_number / creation_log / last_updated /
|
|
148
|
+
* item_id). Surfaces `read_only: true` and points at the
|
|
149
|
+
* underlying source column. `--set-raw` rejects these too —
|
|
150
|
+
* the read-only-forever check fires after column resolution
|
|
151
|
+
* but before mutation.
|
|
152
|
+
* - `'future'` — any other unsupported type (battery /
|
|
153
|
+
* item_assignees / time_tracking / rating / files / etc.).
|
|
154
|
+
* Surfaces `deferred_to: "future"` with a generic message that
|
|
155
|
+
* doesn't commit to a specific version. The friendly translator
|
|
156
|
+
* rejects; `--set-raw` accepts when the underlying mutation is
|
|
157
|
+
* `change_column_value` (files-shaped types like `file` are a
|
|
158
|
+
* v0.4 deferral and `--set-raw` rejects them too).
|
|
159
|
+
*
|
|
160
|
+
* Codex M5b cleanup re-review #1: pre-fix `unsupportedColumnType
|
|
161
|
+
* Error` blanket-deferred every non-allowlisted type to v0.2, which
|
|
162
|
+
* over-promised for the read-only-forever row and the v0.3+ rows.
|
|
163
|
+
* Codex M18 pre-flight P2-4: tentative row slipped to v0.3 at M18
|
|
164
|
+
* close per cli-design §13 + §5.3 line 2172 — runtime + tests +
|
|
165
|
+
* comments aligned.
|
|
166
|
+
*/
|
|
167
|
+
export type ColumnRoadmapCategory = 'v0_2_writer_expansion' | 'read_only_forever' | 'future';
|
|
168
|
+
export declare const getColumnRoadmapCategory: (type: string) => ColumnRoadmapCategory;
|
|
169
|
+
/**
|
|
170
|
+
* Categorisation for the M16 `column-create` `noncanonical_column_
|
|
171
|
+
* type` warning (cli-design §4.3 column-create + §6 stable warning-
|
|
172
|
+
* code registry). Distinct from `getColumnRoadmapCategory` (which
|
|
173
|
+
* powers the `unsupported_column_type` write-time error builder)
|
|
174
|
+
* because the warning's audience is "agent created a column of a
|
|
175
|
+
* non-canonical type — here's how to write to it later", not
|
|
176
|
+
* "agent tried to write and Monday rejected it".
|
|
177
|
+
*
|
|
178
|
+
* The three categories — chosen to match the §6 warning shape's
|
|
179
|
+
* `category` enum verbatim — are:
|
|
180
|
+
* - `'raw_writable'`: Monday accepts `change_column_value` against
|
|
181
|
+
* the type, but the v0.2 friendly translator (§5.3) doesn't
|
|
182
|
+
* model it. Agents reach for the `--set-raw <col>=<json>`
|
|
183
|
+
* escape hatch. Default for any non-writable, non-read-only-
|
|
184
|
+
* forever, non-files-shaped type (covers `country`, `hour`,
|
|
185
|
+
* `timeline`, `tags`, `board_relation`, `dependency`, etc.).
|
|
186
|
+
* - `'read_only_forever'`: Monday computes the type server-side
|
|
187
|
+
* and never makes it writable via the API. `suggested_write_
|
|
188
|
+
* path` is `null` (agents can't write at all; the column
|
|
189
|
+
* exists for read-side display / mirror sources only).
|
|
190
|
+
* - `'files_shaped'`: Monday writes the type via `add_file_to_
|
|
191
|
+
* column` (multipart upload), pinned to v0.4 (asset upload).
|
|
192
|
+
* Currently `file` only.
|
|
193
|
+
*
|
|
194
|
+
* Returns `null` for canonical types (membership in `WRITABLE_COLUMN_
|
|
195
|
+
* TYPES`) — `column-create` skips emitting the warning when the type
|
|
196
|
+
* is canonical.
|
|
197
|
+
*
|
|
198
|
+
* The `category` enum value is part of the §6 stable warning-code
|
|
199
|
+
* registry — adding a category is SemVer-minor; removing or renaming
|
|
200
|
+
* is SemVer-major.
|
|
201
|
+
*/
|
|
202
|
+
export type NoncanonicalColumnTypeCategory = 'raw_writable' | 'read_only_forever' | 'files_shaped';
|
|
203
|
+
export interface NoncanonicalColumnTypeDetails {
|
|
204
|
+
readonly category: NoncanonicalColumnTypeCategory;
|
|
205
|
+
/**
|
|
206
|
+
* The path agents should use to write to the column post-creation,
|
|
207
|
+
* matching cli-design §5.3 escape-hatch contract — `--set-raw
|
|
208
|
+
* <col>=<json>` for raw-writable types, `add_file_to_column
|
|
209
|
+
* (deferred to v0.4)` for files-shaped types, `null` for read-
|
|
210
|
+
* only-forever types (no write path exists).
|
|
211
|
+
*/
|
|
212
|
+
readonly suggestedWritePath: string | null;
|
|
213
|
+
}
|
|
214
|
+
export declare const categorizeNoncanonicalColumnType: (type: string) => NoncanonicalColumnTypeDetails | null;
|
|
215
|
+
//# sourceMappingURL=column-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-types.d.ts","sourceRoot":"","sources":["../../src/api/column-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,6GAWxB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAIxE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,kBAC/B,CAAC;AAE9B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,GAAG,IAAI,KAAG,OAOxD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,mDAI9B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAM/C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,4GAe1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAM3E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,mBAC5B,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB,mBAAoB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMlE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,eAC7B,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,qBAAqB,GAC7B,uBAAuB,GACvB,mBAAmB,GACnB,QAAQ,CAAC;AAEb,eAAO,MAAM,wBAAwB,GACnC,MAAM,MAAM,KACX,qBAIF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,MAAM,8BAA8B,GACtC,cAAc,GACd,mBAAmB,GACnB,cAAc,CAAC;AAEnB,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,QAAQ,EAAE,8BAA8B,CAAC;IAClD;;;;;;OAMG;IACH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,gCAAgC,GAC3C,MAAM,MAAM,KACX,6BAA6B,GAAG,IAelC,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v0.1 column-type allowlist + a defensive `settings_str` parser
|
|
3
|
+
* (`cli-design.md` §5.3 step 3 + step 4, `v0.1-plan.md` §3 M5a).
|
|
4
|
+
*
|
|
5
|
+
* Two consumers share this surface:
|
|
6
|
+
* - `commands/board/describe.ts` — populates `writable: bool` and
|
|
7
|
+
* `example_set: string[] | null` on every column it surfaces, so
|
|
8
|
+
* an agent reading one `board describe` payload knows exactly
|
|
9
|
+
* which columns `--set` will accept.
|
|
10
|
+
* - `api/column-values.ts` (M5a writer) — gates the friendly
|
|
11
|
+
* translation paths and surfaces `unsupported_column_type` for
|
|
12
|
+
* anything else.
|
|
13
|
+
*
|
|
14
|
+
* Owning the allowlist here (not in either consumer) means the
|
|
15
|
+
* "writable types contract" has one source of truth: the v0.2 author
|
|
16
|
+
* who wants to add `world_clock` flips one entry and both `describe`
|
|
17
|
+
* and the writer pick it up. R8 in `v0.1-plan.md` §15 / §17.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Writable column types per `cli-design.md` §5.3.3 + the v0.2 writer-
|
|
21
|
+
* expansion roadmap (M8). Order is frozen — not because Sets are
|
|
22
|
+
* ordered, but because tests iterate the array form and the snapshot
|
|
23
|
+
* is part of the contract surface. v0.1 entries appear first (they
|
|
24
|
+
* shipped first); M8 firm additions follow in roadmap order.
|
|
25
|
+
*
|
|
26
|
+
* Categories baked into the same allowlist:
|
|
27
|
+
* - **simple** (`text` / `long_text` / `numbers`) — translate to a
|
|
28
|
+
* bare string and use `change_simple_column_value`.
|
|
29
|
+
* - **rich (v0.1)** (`status` / `dropdown` / `date` / `people`) —
|
|
30
|
+
* translate to a JSON object and use `change_column_value` /
|
|
31
|
+
* `change_multiple_column_values`.
|
|
32
|
+
* - **rich (v0.2 firm)** (`link` / `email` / `phone`) — pipe-form
|
|
33
|
+
* `<value>|<text>` parsers in `links.ts` / `emails.ts` /
|
|
34
|
+
* `phones.ts`; same `change_column_value` wire path.
|
|
35
|
+
*
|
|
36
|
+
* The split lives in `column-values.ts`; here we just enumerate the
|
|
37
|
+
* full allowlist. Tentative v0.2 types (`tags` / `board_relation` /
|
|
38
|
+
* `dependency`) stay in `V0_2_WRITER_EXPANSION_TYPES` until their
|
|
39
|
+
* fixture work clears — they ship firm via the same array's expansion
|
|
40
|
+
* once translators land, or slip to v0.3 in the M8 post-mortem.
|
|
41
|
+
*/
|
|
42
|
+
export const WRITABLE_COLUMN_TYPES = [
|
|
43
|
+
'text',
|
|
44
|
+
'long_text',
|
|
45
|
+
'numbers',
|
|
46
|
+
'status',
|
|
47
|
+
'dropdown',
|
|
48
|
+
'date',
|
|
49
|
+
'people',
|
|
50
|
+
'link',
|
|
51
|
+
'email',
|
|
52
|
+
'phone',
|
|
53
|
+
];
|
|
54
|
+
const WRITABLE_TYPE_SET = new Set(WRITABLE_COLUMN_TYPES);
|
|
55
|
+
/**
|
|
56
|
+
* Membership test for the v0.1 writable allowlist. Narrows the input
|
|
57
|
+
* type to `WritableColumnType` so downstream switches don't need to
|
|
58
|
+
* re-cast.
|
|
59
|
+
*/
|
|
60
|
+
export const isWritableColumnType = (type) => WRITABLE_TYPE_SET.has(type);
|
|
61
|
+
/**
|
|
62
|
+
* Defensive parse for Monday's `settings_str` field. Monday returns
|
|
63
|
+
* a JSON-encoded string for status / dropdown / etc. column settings,
|
|
64
|
+
* but the value can be `null`, an empty string, or a malformed blob
|
|
65
|
+
* on legacy boards. Callers want a parsed object or `null` — never a
|
|
66
|
+
* thrown `SyntaxError`.
|
|
67
|
+
*
|
|
68
|
+
* Returns `null` when the input is missing / empty / unparseable.
|
|
69
|
+
* Returns the parsed value (typed `unknown` — caller validates the
|
|
70
|
+
* shape) when JSON.parse succeeds. The caller is the boundary that
|
|
71
|
+
* narrows the result to a typed shape.
|
|
72
|
+
*/
|
|
73
|
+
export const parseColumnSettings = (raw) => {
|
|
74
|
+
if (raw === null || raw.length === 0)
|
|
75
|
+
return null;
|
|
76
|
+
try {
|
|
77
|
+
return JSON.parse(raw);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Column types still pending in the v0.2 writer-expansion milestone
|
|
85
|
+
* (`cli-design.md` §5.3 writer-expansion roadmap table). M8 shipped
|
|
86
|
+
* `link` / `email` / `phone` firm — those moved to
|
|
87
|
+
* `WRITABLE_COLUMN_TYPES` and are no longer surfaced here. The
|
|
88
|
+
* remaining three are M8's tentative row; their fixture work decides
|
|
89
|
+
* whether they ship firm in v0.2 (move to `WRITABLE_COLUMN_TYPES`) or
|
|
90
|
+
* slip to v0.3 (move to a v0.3 deferral surfaced via the same
|
|
91
|
+
* roadmap-category branch).
|
|
92
|
+
*
|
|
93
|
+
* Source-of-truth alongside `WRITABLE_COLUMN_TYPES` so the
|
|
94
|
+
* `unsupported_column_type` error builder can give per-type-accurate
|
|
95
|
+
* guidance instead of blanket-deferring every non-allowlisted type.
|
|
96
|
+
*/
|
|
97
|
+
export const V0_2_WRITER_EXPANSION_TYPES = [
|
|
98
|
+
'tags',
|
|
99
|
+
'board_relation',
|
|
100
|
+
'dependency',
|
|
101
|
+
];
|
|
102
|
+
const V0_2_WRITER_EXPANSION_SET = new Set(V0_2_WRITER_EXPANSION_TYPES);
|
|
103
|
+
/**
|
|
104
|
+
* Column types Monday computes server-side and **never makes
|
|
105
|
+
* writable via the API** (`cli-design.md` §5.3 writer-expansion
|
|
106
|
+
* roadmap table — "read-only forever" row). cli-design says
|
|
107
|
+
* explicitly:
|
|
108
|
+
*
|
|
109
|
+
* > The "read-only forever" row matters for agents: trying `--set`
|
|
110
|
+
* > on a mirror/formula/etc. surfaces `unsupported_column_type`
|
|
111
|
+
* > and will *always* surface that, regardless of version. The
|
|
112
|
+
* > hint should point at the underlying source column, not at
|
|
113
|
+
* > `--set-raw`.
|
|
114
|
+
*
|
|
115
|
+
* The error builder branches on this set to emit `read_only: true`
|
|
116
|
+
* (no `deferred_to`) and a hint that names the underlying-source
|
|
117
|
+
* pattern instead of advertising a future flag.
|
|
118
|
+
*/
|
|
119
|
+
export const READ_ONLY_FOREVER_TYPES = [
|
|
120
|
+
'mirror',
|
|
121
|
+
'formula',
|
|
122
|
+
'auto_number',
|
|
123
|
+
'creation_log',
|
|
124
|
+
'last_updated',
|
|
125
|
+
'item_id',
|
|
126
|
+
// M16 pre-flight pin (cli-design §4.3 column-create): item_assignees
|
|
127
|
+
// is computed server-side from the board's people columns and has
|
|
128
|
+
// no direct write surface. M16 column-create's noncanonical_column_
|
|
129
|
+
// type warning categorises it as `read_only_forever`; the same
|
|
130
|
+
// membership check gates `--set-raw item_assignees=<json>` so the
|
|
131
|
+
// CLI rejects it ahead of Monday's server-side rejection rather
|
|
132
|
+
// than waiting for `validation_failed` to come back.
|
|
133
|
+
'item_assignees',
|
|
134
|
+
];
|
|
135
|
+
const READ_ONLY_FOREVER_SET = new Set(READ_ONLY_FOREVER_TYPES);
|
|
136
|
+
/**
|
|
137
|
+
* Membership test for the read-only-forever row. Used by `--set-raw`
|
|
138
|
+
* (M8) to reject these types post-resolution per cli-design §5.3
|
|
139
|
+
* escape-hatch contract — Monday's API never makes them writable
|
|
140
|
+
* regardless of payload, so accepting a raw payload would just shift
|
|
141
|
+
* the failure from CLI-time to Monday-time.
|
|
142
|
+
*/
|
|
143
|
+
export const isReadOnlyForeverType = (type) => READ_ONLY_FOREVER_SET.has(type);
|
|
144
|
+
/**
|
|
145
|
+
* Column types Monday writes via `add_file_to_column` (file upload
|
|
146
|
+
* via multipart) rather than `change_column_value` / `change_multiple_
|
|
147
|
+
* column_values` (`cli-design.md` §5.3 writer-expansion roadmap "files"
|
|
148
|
+
* row + the escape-hatch contract).
|
|
149
|
+
*
|
|
150
|
+
* The friendly translator and `--set-raw` both go through
|
|
151
|
+
* `change_column_value` / `change_multiple_column_values`, so a
|
|
152
|
+
* `--set-raw` raw payload cannot reach the right wire surface for
|
|
153
|
+
* these types — `--set-raw` rejects them with `unsupported_column_
|
|
154
|
+
* type` carrying `deferred_to: "v0.4"` (asset upload pinned to v0.4
|
|
155
|
+
* per cli-design §13).
|
|
156
|
+
*
|
|
157
|
+
* Currently one entry (`file`); the slot is plural because Monday may
|
|
158
|
+
* surface other multipart-upload-shaped types in future API versions
|
|
159
|
+
* and the contract should accommodate adding rows without touching
|
|
160
|
+
* the consumer.
|
|
161
|
+
*/
|
|
162
|
+
export const FILES_SHAPED_TYPES = ['file'];
|
|
163
|
+
const FILES_SHAPED_SET = new Set(FILES_SHAPED_TYPES);
|
|
164
|
+
/**
|
|
165
|
+
* Membership test for the files-shaped row. Used by `--set-raw` (M8)
|
|
166
|
+
* to reject these types post-resolution per cli-design §5.3 escape-
|
|
167
|
+
* hatch contract — the underlying mutation isn't `change_column_value`
|
|
168
|
+
* so a raw payload can't reach the right wire surface.
|
|
169
|
+
*/
|
|
170
|
+
export const isFilesShapedType = (type) => FILES_SHAPED_SET.has(type);
|
|
171
|
+
export const getColumnRoadmapCategory = (type) => {
|
|
172
|
+
if (V0_2_WRITER_EXPANSION_SET.has(type))
|
|
173
|
+
return 'v0_2_writer_expansion';
|
|
174
|
+
if (READ_ONLY_FOREVER_SET.has(type))
|
|
175
|
+
return 'read_only_forever';
|
|
176
|
+
return 'future';
|
|
177
|
+
};
|
|
178
|
+
export const categorizeNoncanonicalColumnType = (type) => {
|
|
179
|
+
if (isWritableColumnType(type))
|
|
180
|
+
return null;
|
|
181
|
+
if (isReadOnlyForeverType(type)) {
|
|
182
|
+
return { category: 'read_only_forever', suggestedWritePath: null };
|
|
183
|
+
}
|
|
184
|
+
if (isFilesShapedType(type)) {
|
|
185
|
+
return {
|
|
186
|
+
category: 'files_shaped',
|
|
187
|
+
suggestedWritePath: 'add_file_to_column (deferred to v0.4)',
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
return {
|
|
191
|
+
category: 'raw_writable',
|
|
192
|
+
suggestedWritePath: '--set-raw <col>=<json>',
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
//# sourceMappingURL=column-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-types.js","sourceRoot":"","sources":["../../src/api/column-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM;IACN,WAAW;IACX,SAAS;IACT,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;CACC,CAAC;AAIX,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAS,qBAAqB,CAAC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAA8B,EAAE,CAC/E,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAE9B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAkB,EAAW,EAAE;IACjE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAClD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,MAAM;IACN,gBAAgB;IAChB,YAAY;CACJ,CAAC;AAKX,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAC5D,2BAA2B,CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ;IACR,SAAS;IACT,aAAa;IACb,cAAc;IACd,cAAc;IACd,SAAS;IACT,qEAAqE;IACrE,kEAAkE;IAClE,oEAAoE;IACpE,+DAA+D;IAC/D,kEAAkE;IAClE,gEAAgE;IAChE,qDAAqD;IACrD,gBAAgB;CACR,CAAC;AAIX,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CACxD,uBAAuB,CACxB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAA+B,EAAE,CACjF,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAElC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,CAAU,CAAC;AAIpD,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CACnD,kBAAkB,CACnB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAA2B,EAAE,CACzE,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AA0C7B,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,IAAY,EACW,EAAE;IACzB,IAAI,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,uBAAuB,CAAC;IACxE,IAAI,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,mBAAmB,CAAC;IAChE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAoDF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,IAAY,EAC0B,EAAE;IACxC,IAAI,oBAAoB,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5C,IAAI,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,OAAO;YACL,QAAQ,EAAE,cAAc;YACxB,kBAAkB,EAAE,uCAAuC;SAC5D,CAAC;IACJ,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,cAAc;QACxB,kBAAkB,EAAE,wBAAwB;KAC7C,CAAC;AACJ,CAAC,CAAC"}
|