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,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update-mutation projection + GraphQL field-fragment, lifted from
|
|
3
|
+
* five M13 mutation verbs and two M3 / M5b read-or-write call sites
|
|
4
|
+
* (v0.2-plan §20 R37 + R38).
|
|
5
|
+
*
|
|
6
|
+
* **R37 — `projectMutationUpdate`.** Every M13 mutation verb (`update
|
|
7
|
+
* reply` / `edit` / `delete` plus the four toggle verbs `like` /
|
|
8
|
+
* `unlike` / `pin` / `unpin`) returns the post-mutation `Update` and
|
|
9
|
+
* guards a null payload with the same shape: a typed throw carrying
|
|
10
|
+
* `details.update_id` (or `parent_id` for reply, which keys errors
|
|
11
|
+
* off the parent the agent passed on argv), then a strict zod parse
|
|
12
|
+
* to surface the §6.4 mutation envelope's `data: <projected
|
|
13
|
+
* snapshot>`. Mirrors R28's `projectMutationItem` exactly with
|
|
14
|
+
* `Update` substituted for `Item`.
|
|
15
|
+
*
|
|
16
|
+
* Lifted from five sites — see v0.2-plan §20 R37:
|
|
17
|
+
* - `commands/update/reply.ts` (M13 — local `projectReply`,
|
|
18
|
+
* `idKey: 'parent_id'` because the argv input is the parent,
|
|
19
|
+
* not the new update).
|
|
20
|
+
* - `commands/update/edit.ts` (M13 — local `projectEdited`).
|
|
21
|
+
* - `commands/update/delete.ts` (M13 — local `projectDeleted`).
|
|
22
|
+
* - `commands/update/toggle.ts` (M13 — local `projectToggle`,
|
|
23
|
+
* consumed by four toggle verbs via per-verb `mutationName`).
|
|
24
|
+
* - `commands/update/clear-all.ts` (M13 — uses the null-check-only
|
|
25
|
+
* variant; see "Why two exports" below).
|
|
26
|
+
*
|
|
27
|
+
* **Why two exports.** Four of the five lift sites parse the wire
|
|
28
|
+
* payload against the full `updateProjectionSchema`. Clear-all's
|
|
29
|
+
* `DELETE_UPDATE_MUTATION` deliberately selects only `{ id }` (per-
|
|
30
|
+
* target round-trip; no projection is emitted in `data.results[i]`),
|
|
31
|
+
* so the strict schema would fail on every successful delete. The
|
|
32
|
+
* lift therefore exposes two seams:
|
|
33
|
+
*
|
|
34
|
+
* - `projectMutationUpdate({raw, updateId, mutationName, idKey?})`
|
|
35
|
+
* — null-check + strict parse + projection. Used by reply / edit
|
|
36
|
+
* / delete / toggle.
|
|
37
|
+
* - `assertUpdateMutationPresent({raw, updateId, mutationName,
|
|
38
|
+
* idKey?})` — null-check + typed throw, no projection. Used by
|
|
39
|
+
* clear-all's per-target dispatch.
|
|
40
|
+
*
|
|
41
|
+
* Both share `buildNotFoundError` so the typed throw's shape (code,
|
|
42
|
+
* message format, `details.<idKey>`) is identical across all five
|
|
43
|
+
* sites — agents key off `error.code` + `error.details.update_id`
|
|
44
|
+
* (or `parent_id`) without caring which verb threw.
|
|
45
|
+
*
|
|
46
|
+
* **R38 — `UPDATE_FIELDS_FRAGMENT`.** The GraphQL selection set every
|
|
47
|
+
* Update-shape mutation + the M3 `update get` read share. Mirrors
|
|
48
|
+
* `ITEM_FIELDS_FRAGMENT` (M5b lift in `item-helpers.ts`); a future
|
|
49
|
+
* §6.4 wire-shape addition is a one-touch fragment edit instead of
|
|
50
|
+
* a six-touch sweep across `update create` / `reply` / `edit` /
|
|
51
|
+
* `delete` / `toggle` / `get`. Indentation matches the 6-space
|
|
52
|
+
* continuation each consumer interpolates at, so rendered query
|
|
53
|
+
* bytes are unchanged post-lift.
|
|
54
|
+
*
|
|
55
|
+
* **What stays at the call site.** Reply's `parent_id` echo from
|
|
56
|
+
* argv (`{...projected, parent_id: parentId}`) is a caller-side
|
|
57
|
+
* extension — the helper returns the base `UpdateProjection` and
|
|
58
|
+
* reply spreads onto it before emit. Mirrors R28's handling of
|
|
59
|
+
* `item duplicate`'s `duplicated_from_id` extension. `update get`'s
|
|
60
|
+
* extra `edited_at` + `replies` slots are likewise composed at the
|
|
61
|
+
* call site (`${UPDATE_FIELDS_FRAGMENT}\n edited_at\n replies
|
|
62
|
+
* {...}`); the fragment is the shared subset, callers compose extras
|
|
63
|
+
* on top — same shape `item subitems` uses against
|
|
64
|
+
* `ITEM_FIELDS_FRAGMENT`.
|
|
65
|
+
*/
|
|
66
|
+
import { z } from 'zod';
|
|
67
|
+
import { ApiError } from '../utils/errors.js';
|
|
68
|
+
import { unwrapOrThrow } from '../utils/parse-boundary.js';
|
|
69
|
+
import { ItemIdSchema, UpdateIdSchema } from '../types/ids.js';
|
|
70
|
+
/**
|
|
71
|
+
* Shared GraphQL selection set for the Update shape — every M13
|
|
72
|
+
* mutation verb plus M5b's `update create` and M3's `update get`
|
|
73
|
+
* select these fields. 6-space continuation indent matches the
|
|
74
|
+
* column every consumer interpolates `${UPDATE_FIELDS_FRAGMENT}` at,
|
|
75
|
+
* so rendered query bytes are unchanged post-lift.
|
|
76
|
+
*/
|
|
77
|
+
export const UPDATE_FIELDS_FRAGMENT = `id
|
|
78
|
+
body
|
|
79
|
+
text_body
|
|
80
|
+
creator_id
|
|
81
|
+
creator { id name email }
|
|
82
|
+
item_id
|
|
83
|
+
created_at
|
|
84
|
+
updated_at`;
|
|
85
|
+
const creatorSchema = z
|
|
86
|
+
.object({
|
|
87
|
+
id: z.string().min(1),
|
|
88
|
+
name: z.string(),
|
|
89
|
+
email: z.string(),
|
|
90
|
+
})
|
|
91
|
+
.strict();
|
|
92
|
+
/**
|
|
93
|
+
* Strict zod schema for the post-mutation `Update` projection — the
|
|
94
|
+
* exact shape `UPDATE_FIELDS_FRAGMENT` selects from the wire. Reply's
|
|
95
|
+
* output extends this with `parent_id` at the call site.
|
|
96
|
+
*/
|
|
97
|
+
export const updateProjectionSchema = z
|
|
98
|
+
.object({
|
|
99
|
+
id: UpdateIdSchema,
|
|
100
|
+
body: z.string(),
|
|
101
|
+
text_body: z.string().nullable(),
|
|
102
|
+
creator_id: z.string().nullable(),
|
|
103
|
+
creator: creatorSchema.nullable(),
|
|
104
|
+
item_id: ItemIdSchema.nullable(),
|
|
105
|
+
created_at: z.string().nullable(),
|
|
106
|
+
updated_at: z.string().nullable(),
|
|
107
|
+
})
|
|
108
|
+
.strict();
|
|
109
|
+
const buildNotFoundError = (mutationName, updateId, idKey) => new ApiError('not_found', `Monday returned no update from ${mutationName} for id ${updateId}`, { details: { [idKey]: updateId } });
|
|
110
|
+
/**
|
|
111
|
+
* Null-check-only variant for sites whose GraphQL selection is too
|
|
112
|
+
* narrow to parse against `updateProjectionSchema` (currently just
|
|
113
|
+
* `update clear-all`'s per-target `delete_update` round-trip, which
|
|
114
|
+
* selects only `{ id }`). Throws the same typed `not_found` shape
|
|
115
|
+
* the projecting helper does so agents see one error contract across
|
|
116
|
+
* every M13 mutation verb.
|
|
117
|
+
*/
|
|
118
|
+
export const assertUpdateMutationPresent = (raw, ctx) => {
|
|
119
|
+
if (raw === null || raw === undefined) {
|
|
120
|
+
throw buildNotFoundError(ctx.mutationName, ctx.updateId, ctx.idKey ?? 'update_id');
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Parses + projects a post-mutation `Update` payload, throwing the
|
|
125
|
+
* typed `not_found` on null/undefined and `internal_error` (via the
|
|
126
|
+
* R18 parse-boundary wrap) on a malformed shape. The helper owns
|
|
127
|
+
* both error envelopes; callers compose post-projection extras
|
|
128
|
+
* (reply's `parent_id` echo) at the call site.
|
|
129
|
+
*
|
|
130
|
+
* `details: { <idKey>: updateId }` is supplied by the helper so
|
|
131
|
+
* every consumer carries the same envelope shape — agents key off
|
|
132
|
+
* `details.update_id` (or `details.parent_id` for reply's not_found
|
|
133
|
+
* path) regardless of which mutation verb threw.
|
|
134
|
+
*/
|
|
135
|
+
export const projectMutationUpdate = (inputs) => {
|
|
136
|
+
const idKey = inputs.idKey ?? 'update_id';
|
|
137
|
+
if (inputs.raw === null || inputs.raw === undefined) {
|
|
138
|
+
throw buildNotFoundError(inputs.mutationName, inputs.updateId, idKey);
|
|
139
|
+
}
|
|
140
|
+
return unwrapOrThrow(updateProjectionSchema.safeParse(inputs.raw), {
|
|
141
|
+
context: `Monday returned a malformed update payload for id ${inputs.updateId}`,
|
|
142
|
+
details: { [idKey]: inputs.updateId },
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=update-mutation-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-mutation-result.js","sourceRoot":"","sources":["../../src/api/update-mutation-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;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,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,IAAI,WAAW,CAAC,CAAC;IACrF,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAmC,EACjB,EAAE;IACpB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC;IAC1C,IAAI,MAAM,CAAC,GAAG,KAAK,IAAI,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QACpD,MAAM,kBAAkB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,aAAa,CAAC,sBAAsB,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;QACjE,OAAO,EAAE,qDAAqD,MAAM,CAAC,QAAQ,EAAE;QAC/E,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolver-fronted partial-success fan-out for the `--users <list>`
|
|
3
|
+
* family — three M14 / M15 verbs share ~250 LOC of action body
|
|
4
|
+
* (`v0.2-plan.md` §22 R40 lift).
|
|
5
|
+
*
|
|
6
|
+
* **Used by:**
|
|
7
|
+
* - `commands/workspace/add-users.ts` → `add_users_to_workspace`
|
|
8
|
+
* - `commands/workspace/remove-users.ts` → `delete_users_from_workspace`
|
|
9
|
+
* - `commands/board/add-users.ts` → `add_users_to_board`
|
|
10
|
+
*
|
|
11
|
+
* **What's lifted.** The token parser (`parseUsersArg`), the
|
|
12
|
+
* resolver loop (`resolveTokens`), the per-target dispatch loop
|
|
13
|
+
* (`dispatchSequential` callback wrapping
|
|
14
|
+
* `assertResponseFieldPresent`), the dry-run path, the live-path
|
|
15
|
+
* envelope assembly, and the partial-success / whole-call boundary
|
|
16
|
+
* all live here. Each call site collapses from ~200 LOC of action
|
|
17
|
+
* body to a single `await dispatchUsersFanOut({...})` call plus the
|
|
18
|
+
* surrounding `parseArgv` + `parseUsersArg` + `resolveClient`
|
|
19
|
+
* plumbing the caller already needs for error-precedence reasons
|
|
20
|
+
* (a malformed `--users` must surface as `usage_error` BEFORE
|
|
21
|
+
* `resolveClient`'s missing-token check fires its `config_error`).
|
|
22
|
+
*
|
|
23
|
+
* **Per-verb divergence — six parameters:**
|
|
24
|
+
* - `mutation.{query, operationName, rootKey}` — the GraphQL
|
|
25
|
+
* string, the PascalCase operationName for `client.raw`, and
|
|
26
|
+
* the snake_case mutation root field.
|
|
27
|
+
* - `dataOperation` — the literal echoed in `data.operation`
|
|
28
|
+
* (matches `mutation.rootKey` in the M14 / M15 family but
|
|
29
|
+
* stays a separate parameter for forward-compat).
|
|
30
|
+
* - `scope.{id, key, variableKey}` — `'workspace_id'` /
|
|
31
|
+
* `'board_id'` / actual id / `'workspaceId'` / `'boardId'`.
|
|
32
|
+
* - `verbDescription` — for the whole-call `user_not_found`
|
|
33
|
+
* message (`'workspace add-users'` etc.).
|
|
34
|
+
*
|
|
35
|
+
* Everything else is identical: the partial-success envelope,
|
|
36
|
+
* `meta.source` aggregation rule (cli-design §6.4 — dry-run only
|
|
37
|
+
* sees resolver legs; live folds in dispatch legs), the per-record
|
|
38
|
+
* `{user_id, ok, error?}` shape, and the whole-call boundary
|
|
39
|
+
* (`user_not_found` exit 2 when no dispatchable id remains).
|
|
40
|
+
*
|
|
41
|
+
* **Why the caller pre-parses tokens via `parseUsersArg` first.**
|
|
42
|
+
* The original three call sites enforce a `parseArgv` →
|
|
43
|
+
* `parseUsersArg` → `resolveClient` order so a malformed `--users`
|
|
44
|
+
* token surfaces as `usage_error` (exit 1) BEFORE `resolveClient`'s
|
|
45
|
+
* missing-token check fires `config_error` (exit 3). The helper
|
|
46
|
+
* preserves that precedence by taking already-parsed tokens — the
|
|
47
|
+
* caller runs `parseArgv` then `parseUsersArg` (both pure, both
|
|
48
|
+
* throw `UsageError` on bad input) then `resolveClient`, then this
|
|
49
|
+
* helper. Mirrors M5b's pattern: argv-shape validation runs first,
|
|
50
|
+
* then config validation, then network.
|
|
51
|
+
*
|
|
52
|
+
* **`internal_error` re-throw escape hatch.** `dispatchSequential`
|
|
53
|
+
* re-throws `internal_error` (M14 round-2 F1 / round-3 F1) so
|
|
54
|
+
* schema-drift in the response surfaces as whole-call rather than
|
|
55
|
+
* per-record. This helper inherits that behaviour by calling
|
|
56
|
+
* `assertResponseFieldPresent` (R41 helper) inside the dispatch
|
|
57
|
+
* callback — missing-root-key throws `internal_error` (re-thrown
|
|
58
|
+
* by `dispatchSequential`), null-value throws `not_found` (lands
|
|
59
|
+
* in `results[i].error`).
|
|
60
|
+
*/
|
|
61
|
+
import { z } from 'zod';
|
|
62
|
+
import type { MondayClient, MondayResponse } from './client.js';
|
|
63
|
+
import type { RunContext } from '../cli/run.js';
|
|
64
|
+
import type { GlobalFlags } from '../types/global-flags.js';
|
|
65
|
+
import type { EmitFromNetworkResult } from './resolve-client.js';
|
|
66
|
+
export interface UsersFanOutToken {
|
|
67
|
+
readonly raw: string;
|
|
68
|
+
readonly kind: 'numeric' | 'email';
|
|
69
|
+
}
|
|
70
|
+
export interface UsersFanOutResultRecord {
|
|
71
|
+
/** Branded numeric Monday user id when resolution succeeded; the
|
|
72
|
+
* input token verbatim (numeric string OR email) when it failed.
|
|
73
|
+
* Always non-empty. */
|
|
74
|
+
readonly user_id: string;
|
|
75
|
+
readonly ok: boolean;
|
|
76
|
+
readonly error?: {
|
|
77
|
+
readonly code: string;
|
|
78
|
+
readonly message: string;
|
|
79
|
+
} | undefined;
|
|
80
|
+
}
|
|
81
|
+
export interface UsersFanOutEnvelope<Op extends string = string> {
|
|
82
|
+
readonly operation: Op;
|
|
83
|
+
readonly results: readonly UsersFanOutResultRecord[];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Parses a comma-separated `--users` argument into typed tokens.
|
|
87
|
+
* Throws `UsageError` (exit 1) on malformed input — the caller
|
|
88
|
+
* runs this BEFORE `resolveClient` so a malformed `--users`
|
|
89
|
+
* surfaces ahead of `config_error` (see file-comment rationale).
|
|
90
|
+
*/
|
|
91
|
+
export declare const parseUsersArg: (raw: string) => readonly UsersFanOutToken[];
|
|
92
|
+
export interface UsersFanOutScope {
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly key: 'workspace_id' | 'board_id';
|
|
95
|
+
readonly variableKey: 'workspaceId' | 'boardId';
|
|
96
|
+
}
|
|
97
|
+
export interface UsersFanOutMutation {
|
|
98
|
+
readonly query: string;
|
|
99
|
+
readonly operationName: string;
|
|
100
|
+
readonly rootKey: string;
|
|
101
|
+
}
|
|
102
|
+
export interface DispatchUsersFanOutInputs<Output extends UsersFanOutEnvelope<Op>, Op extends string = Output['operation']> {
|
|
103
|
+
readonly client: MondayClient;
|
|
104
|
+
readonly ctx: RunContext;
|
|
105
|
+
readonly programOpts: unknown;
|
|
106
|
+
readonly globalFlags: GlobalFlags;
|
|
107
|
+
readonly apiVersion: string;
|
|
108
|
+
readonly toEmit: <T>(response: MondayResponse<T>) => EmitFromNetworkResult;
|
|
109
|
+
readonly tokens: readonly UsersFanOutToken[];
|
|
110
|
+
readonly scope: UsersFanOutScope;
|
|
111
|
+
readonly mutation: UsersFanOutMutation;
|
|
112
|
+
readonly dataOperation: Op;
|
|
113
|
+
readonly verbDescription: string;
|
|
114
|
+
readonly outputSchema: z.ZodType<Output>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Drives the resolver → dispatch → emit pipeline shared by the
|
|
118
|
+
* three `--users <list>` partial-success verbs. Returns void —
|
|
119
|
+
* the helper owns emit (both dry-run and live envelopes) so the
|
|
120
|
+
* call site collapses to argv-parse + scope/mutation config + this
|
|
121
|
+
* call.
|
|
122
|
+
*/
|
|
123
|
+
export declare const dispatchUsersFanOut: <Output extends UsersFanOutEnvelope<Op>, Op extends string = Output["operation"]>(inputs: DispatchUsersFanOutInputs<Output, Op>) => Promise<void>;
|
|
124
|
+
//# sourceMappingURL=users-fan-out-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users-fan-out-mutation.d.ts","sourceRoot":"","sources":["../../src/api/users-fan-out-mutation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAYjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,uBAAuB;IACtC;;2BAEuB;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IAMrB,QAAQ,CAAC,KAAK,CAAC,EACX;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GACnD,SAAS,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM;IAC7D,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACt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GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,SAAS,mBAAmB,CAAC,EAAE,CAAC,EACtC,EAAE,SAAS,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,EAEvC,QAAQ,yBAAyB,CAAC,MAAM,EAAE,EAAE,CAAC,KAC5C,OAAO,CAAC,IAAI,CAiLd,CAAC"}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolver-fronted partial-success fan-out for the `--users <list>`
|
|
3
|
+
* family — three M14 / M15 verbs share ~250 LOC of action body
|
|
4
|
+
* (`v0.2-plan.md` §22 R40 lift).
|
|
5
|
+
*
|
|
6
|
+
* **Used by:**
|
|
7
|
+
* - `commands/workspace/add-users.ts` → `add_users_to_workspace`
|
|
8
|
+
* - `commands/workspace/remove-users.ts` → `delete_users_from_workspace`
|
|
9
|
+
* - `commands/board/add-users.ts` → `add_users_to_board`
|
|
10
|
+
*
|
|
11
|
+
* **What's lifted.** The token parser (`parseUsersArg`), the
|
|
12
|
+
* resolver loop (`resolveTokens`), the per-target dispatch loop
|
|
13
|
+
* (`dispatchSequential` callback wrapping
|
|
14
|
+
* `assertResponseFieldPresent`), the dry-run path, the live-path
|
|
15
|
+
* envelope assembly, and the partial-success / whole-call boundary
|
|
16
|
+
* all live here. Each call site collapses from ~200 LOC of action
|
|
17
|
+
* body to a single `await dispatchUsersFanOut({...})` call plus the
|
|
18
|
+
* surrounding `parseArgv` + `parseUsersArg` + `resolveClient`
|
|
19
|
+
* plumbing the caller already needs for error-precedence reasons
|
|
20
|
+
* (a malformed `--users` must surface as `usage_error` BEFORE
|
|
21
|
+
* `resolveClient`'s missing-token check fires its `config_error`).
|
|
22
|
+
*
|
|
23
|
+
* **Per-verb divergence — six parameters:**
|
|
24
|
+
* - `mutation.{query, operationName, rootKey}` — the GraphQL
|
|
25
|
+
* string, the PascalCase operationName for `client.raw`, and
|
|
26
|
+
* the snake_case mutation root field.
|
|
27
|
+
* - `dataOperation` — the literal echoed in `data.operation`
|
|
28
|
+
* (matches `mutation.rootKey` in the M14 / M15 family but
|
|
29
|
+
* stays a separate parameter for forward-compat).
|
|
30
|
+
* - `scope.{id, key, variableKey}` — `'workspace_id'` /
|
|
31
|
+
* `'board_id'` / actual id / `'workspaceId'` / `'boardId'`.
|
|
32
|
+
* - `verbDescription` — for the whole-call `user_not_found`
|
|
33
|
+
* message (`'workspace add-users'` etc.).
|
|
34
|
+
*
|
|
35
|
+
* Everything else is identical: the partial-success envelope,
|
|
36
|
+
* `meta.source` aggregation rule (cli-design §6.4 — dry-run only
|
|
37
|
+
* sees resolver legs; live folds in dispatch legs), the per-record
|
|
38
|
+
* `{user_id, ok, error?}` shape, and the whole-call boundary
|
|
39
|
+
* (`user_not_found` exit 2 when no dispatchable id remains).
|
|
40
|
+
*
|
|
41
|
+
* **Why the caller pre-parses tokens via `parseUsersArg` first.**
|
|
42
|
+
* The original three call sites enforce a `parseArgv` →
|
|
43
|
+
* `parseUsersArg` → `resolveClient` order so a malformed `--users`
|
|
44
|
+
* token surfaces as `usage_error` (exit 1) BEFORE `resolveClient`'s
|
|
45
|
+
* missing-token check fires `config_error` (exit 3). The helper
|
|
46
|
+
* preserves that precedence by taking already-parsed tokens — the
|
|
47
|
+
* caller runs `parseArgv` then `parseUsersArg` (both pure, both
|
|
48
|
+
* throw `UsageError` on bad input) then `resolveClient`, then this
|
|
49
|
+
* helper. Mirrors M5b's pattern: argv-shape validation runs first,
|
|
50
|
+
* then config validation, then network.
|
|
51
|
+
*
|
|
52
|
+
* **`internal_error` re-throw escape hatch.** `dispatchSequential`
|
|
53
|
+
* re-throws `internal_error` (M14 round-2 F1 / round-3 F1) so
|
|
54
|
+
* schema-drift in the response surfaces as whole-call rather than
|
|
55
|
+
* per-record. This helper inherits that behaviour by calling
|
|
56
|
+
* `assertResponseFieldPresent` (R41 helper) inside the dispatch
|
|
57
|
+
* callback — missing-root-key throws `internal_error` (re-thrown
|
|
58
|
+
* by `dispatchSequential`), null-value throws `not_found` (lands
|
|
59
|
+
* in `results[i].error`).
|
|
60
|
+
*/
|
|
61
|
+
import { z } from 'zod';
|
|
62
|
+
import { ApiError, UsageError } from '../utils/errors.js';
|
|
63
|
+
import { unwrapOrThrow } from '../utils/parse-boundary.js';
|
|
64
|
+
import { dispatchSequential } from './partial-success-mutation.js';
|
|
65
|
+
import { assertResponseFieldPresent } from './response-root.js';
|
|
66
|
+
import { SourceAggregator } from './source-aggregator.js';
|
|
67
|
+
import { userByEmail } from './resolvers.js';
|
|
68
|
+
import { emitDryRun, emitMutation } from '../commands/emit.js';
|
|
69
|
+
// `--users` token validation. Numeric matches the same regex the
|
|
70
|
+
// branded `UserId` schema uses (`/^\d+$/`); email is a deliberately
|
|
71
|
+
// permissive shape (presence of `@` after a non-empty local-part —
|
|
72
|
+
// Monday's `users(emails:)` will reject anything malformed at the
|
|
73
|
+
// directory level, and we only need to distinguish "lookup this"
|
|
74
|
+
// from "send this id verbatim").
|
|
75
|
+
const NUMERIC_TOKEN_PATTERN = /^\d+$/u;
|
|
76
|
+
const EMAIL_TOKEN_PATTERN = /^[^@\s]+@[^@\s]+$/u;
|
|
77
|
+
/**
|
|
78
|
+
* Parses a comma-separated `--users` argument into typed tokens.
|
|
79
|
+
* Throws `UsageError` (exit 1) on malformed input — the caller
|
|
80
|
+
* runs this BEFORE `resolveClient` so a malformed `--users`
|
|
81
|
+
* surfaces ahead of `config_error` (see file-comment rationale).
|
|
82
|
+
*/
|
|
83
|
+
export const parseUsersArg = (raw) => {
|
|
84
|
+
const split = raw.split(',').map((t) => t.trim());
|
|
85
|
+
const malformed = [];
|
|
86
|
+
const tokens = [];
|
|
87
|
+
for (const token of split) {
|
|
88
|
+
if (token.length === 0) {
|
|
89
|
+
malformed.push(token);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (NUMERIC_TOKEN_PATTERN.test(token)) {
|
|
93
|
+
tokens.push({ raw: token, kind: 'numeric' });
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (EMAIL_TOKEN_PATTERN.test(token)) {
|
|
97
|
+
tokens.push({ raw: token, kind: 'email' });
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
malformed.push(token);
|
|
101
|
+
}
|
|
102
|
+
if (malformed.length > 0) {
|
|
103
|
+
throw new UsageError(`--users contains malformed tokens: ${malformed.map((t) => JSON.stringify(t)).join(', ')}. Each token must be a numeric Monday user id or an email.`, { details: { malformed_tokens: malformed } });
|
|
104
|
+
}
|
|
105
|
+
// Defensive: unreachable in practice. Per-command
|
|
106
|
+
// `inputSchema.users.min(1)` rejects empty `--users` strings,
|
|
107
|
+
// and any all-empty split (e.g. ",,,") fills `malformed[]`
|
|
108
|
+
// first which throws above.
|
|
109
|
+
/* c8 ignore next 3 */
|
|
110
|
+
if (tokens.length === 0) {
|
|
111
|
+
throw new UsageError('--users must contain at least one numeric id or email');
|
|
112
|
+
}
|
|
113
|
+
return tokens;
|
|
114
|
+
};
|
|
115
|
+
const resolveTokens = async (client, tokens, env, noCache) => {
|
|
116
|
+
const records = [];
|
|
117
|
+
const dispatchableIds = [];
|
|
118
|
+
const dispatchableIndices = [];
|
|
119
|
+
const failedTokens = [];
|
|
120
|
+
const aggregator = new SourceAggregator();
|
|
121
|
+
let anyResolverLegFired = false;
|
|
122
|
+
for (const token of tokens) {
|
|
123
|
+
if (token.kind === 'numeric') {
|
|
124
|
+
const idx = records.length;
|
|
125
|
+
records.push({ user_id: token.raw, ok: true });
|
|
126
|
+
dispatchableIds.push(token.raw);
|
|
127
|
+
dispatchableIndices.push(idx);
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
// Email — flows through userByEmail. Catch resolution failure
|
|
131
|
+
// per-token rather than aborting (partial-success contract).
|
|
132
|
+
try {
|
|
133
|
+
const resolved = await userByEmail({
|
|
134
|
+
client,
|
|
135
|
+
email: token.raw,
|
|
136
|
+
env,
|
|
137
|
+
noCache,
|
|
138
|
+
});
|
|
139
|
+
anyResolverLegFired = true;
|
|
140
|
+
aggregator.record(resolved.source, resolved.cacheAgeSeconds);
|
|
141
|
+
const idx = records.length;
|
|
142
|
+
records.push({ user_id: resolved.user.id, ok: true });
|
|
143
|
+
dispatchableIds.push(resolved.user.id);
|
|
144
|
+
dispatchableIndices.push(idx);
|
|
145
|
+
}
|
|
146
|
+
catch (err) {
|
|
147
|
+
anyResolverLegFired = true;
|
|
148
|
+
// userByEmail records the live `users(emails:)` lookup as
|
|
149
|
+
// 'live' — we lost the source signal in the throw path, but
|
|
150
|
+
// a resolver leg DID fire, so reflect it in the aggregate.
|
|
151
|
+
aggregator.record('live', null);
|
|
152
|
+
if (err instanceof ApiError && err.code === 'user_not_found') {
|
|
153
|
+
records.push({
|
|
154
|
+
user_id: token.raw,
|
|
155
|
+
ok: false,
|
|
156
|
+
error: { code: err.code, message: err.message },
|
|
157
|
+
});
|
|
158
|
+
failedTokens.push(token.raw);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
// Non-`user_not_found` ApiError (e.g. `internal_error` on a
|
|
162
|
+
// malformed Monday response) is a whole-call failure that
|
|
163
|
+
// shouldn't be swallowed into a per-record slot — re-throw.
|
|
164
|
+
/* c8 ignore next */
|
|
165
|
+
throw err;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
records,
|
|
170
|
+
dispatchableIds,
|
|
171
|
+
dispatchableIndices,
|
|
172
|
+
failedTokens,
|
|
173
|
+
resolverAggregator: aggregator,
|
|
174
|
+
anyResolverLegFired,
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
// Schema for the wire response shape. Keys aren't required at the
|
|
178
|
+
// schema level — `assertResponseFieldPresent` enforces the per-verb
|
|
179
|
+
// `mutation.rootKey` check downstream. Equivalent at runtime to the
|
|
180
|
+
// per-verb `z.object({ <rootKey>: z.unknown() }).loose()` shape each
|
|
181
|
+
// pre-lift call site used (zod treats `z.unknown()` keys as
|
|
182
|
+
// runtime-optional, so both schemas accept the same inputs).
|
|
183
|
+
const wireResponseSchema = z.object({}).loose();
|
|
184
|
+
/**
|
|
185
|
+
* Drives the resolver → dispatch → emit pipeline shared by the
|
|
186
|
+
* three `--users <list>` partial-success verbs. Returns void —
|
|
187
|
+
* the helper owns emit (both dry-run and live envelopes) so the
|
|
188
|
+
* call site collapses to argv-parse + scope/mutation config + this
|
|
189
|
+
* call.
|
|
190
|
+
*/
|
|
191
|
+
export const dispatchUsersFanOut = async (inputs) => {
|
|
192
|
+
const { client, ctx, programOpts, globalFlags, apiVersion, toEmit, tokens, scope, mutation, dataOperation, verbDescription, outputSchema, } = inputs;
|
|
193
|
+
// Phase 1: per-token resolution (numeric IDs are argv-derived;
|
|
194
|
+
// emails flow through `userByEmail`). Failures land per-record
|
|
195
|
+
// rather than aborting the loop. `--no-cache` plumbs through so
|
|
196
|
+
// the directory cache is bypassed when the agent asked.
|
|
197
|
+
const resolution = await resolveTokens(client, tokens, ctx.env, globalFlags.noCache);
|
|
198
|
+
// Whole-call boundary — no dispatchable user_id remains.
|
|
199
|
+
// Per cli-design §6.4 partial-success per-token-resolution-
|
|
200
|
+
// failures: surface as top-level `user_not_found` (NOT
|
|
201
|
+
// `usage_error` — directory miss is actionable distinct from
|
|
202
|
+
// malformed argv) carrying `details.failed_tokens`.
|
|
203
|
+
if (resolution.dispatchableIds.length === 0) {
|
|
204
|
+
throw new ApiError('user_not_found', `No dispatchable user_id remains for ${verbDescription} — every --users token failed lookup.`, {
|
|
205
|
+
details: {
|
|
206
|
+
[scope.key]: scope.id,
|
|
207
|
+
failed_tokens: resolution.failedTokens,
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
if (globalFlags.dryRun) {
|
|
212
|
+
// Dry-run: only resolver legs count toward `meta.source`.
|
|
213
|
+
// Numeric-only `--users` fires zero resolver legs → 'none'.
|
|
214
|
+
const source = resolution.anyResolverLegFired
|
|
215
|
+
? resolution.resolverAggregator.result().source
|
|
216
|
+
: 'none';
|
|
217
|
+
const cacheAgeSeconds = resolution.anyResolverLegFired
|
|
218
|
+
? resolution.resolverAggregator.result().cacheAgeSeconds
|
|
219
|
+
: null;
|
|
220
|
+
// Per-record dry-run shape: `{user_id, would_apply, error?}`.
|
|
221
|
+
// Mirrors the live record shape minus the `ok` rename.
|
|
222
|
+
const dryResults = resolution.records.map((r) => ({
|
|
223
|
+
user_id: r.user_id,
|
|
224
|
+
would_apply: r.ok,
|
|
225
|
+
...(r.error === undefined ? {} : { error: r.error }),
|
|
226
|
+
}));
|
|
227
|
+
emitDryRun({
|
|
228
|
+
ctx,
|
|
229
|
+
programOpts,
|
|
230
|
+
plannedChanges: [
|
|
231
|
+
{
|
|
232
|
+
operation: dataOperation,
|
|
233
|
+
[scope.key]: scope.id,
|
|
234
|
+
results: dryResults,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
source,
|
|
238
|
+
cacheAgeSeconds,
|
|
239
|
+
warnings: [],
|
|
240
|
+
apiVersion,
|
|
241
|
+
});
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
// Phase 2: live dispatch — one wire call per dispatchable user.
|
|
245
|
+
// Per-target failures captured into `results[i].error` by
|
|
246
|
+
// `dispatchSequential`. Aggregator folds in dispatch legs
|
|
247
|
+
// (always live) on top of resolver legs.
|
|
248
|
+
const liveAggregator = resolution.resolverAggregator;
|
|
249
|
+
let lastResponse;
|
|
250
|
+
const dispatchResults = await dispatchSequential(resolution.dispatchableIds, 'user_id', async ({ targetId }) => {
|
|
251
|
+
// Record the dispatch leg as 'live' BEFORE the wire call —
|
|
252
|
+
// M14 round-1 F1: per-target dispatch failures must still
|
|
253
|
+
// count toward `meta.source` because the call DID fire.
|
|
254
|
+
// Without this, an all-email cache + dispatch-fails scenario
|
|
255
|
+
// would emit `source: "cache"` even though a live mutation
|
|
256
|
+
// was attempted.
|
|
257
|
+
liveAggregator.record('live', null);
|
|
258
|
+
const response = await client.raw(mutation.query, {
|
|
259
|
+
[scope.variableKey]: scope.id,
|
|
260
|
+
userIds: [targetId],
|
|
261
|
+
}, { operationName: mutation.operationName });
|
|
262
|
+
lastResponse = response;
|
|
263
|
+
// M14 round-1 F2: a 200 with `data.<rootKey>: null` and no
|
|
264
|
+
// `errors[]` is NOT a per-target success — it's a null
|
|
265
|
+
// payload Monday returns when the membership can't be
|
|
266
|
+
// applied (rare server-side path). Throw a typed ApiError
|
|
267
|
+
// so dispatchSequential lands it in `results[i].error`
|
|
268
|
+
// rather than reporting an illusory ok: true.
|
|
269
|
+
const data = unwrapOrThrow(wireResponseSchema.safeParse(response.data), {
|
|
270
|
+
context: `Monday returned a malformed ${mutation.operationName} response`,
|
|
271
|
+
details: {
|
|
272
|
+
[scope.key]: scope.id,
|
|
273
|
+
user_id: targetId,
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
// R41 lift (api/response-root.ts): distinguishes missing-
|
|
277
|
+
// root-key (internal_error, whole-call re-thrown by
|
|
278
|
+
// dispatchSequential) from null payload (not_found, per-
|
|
279
|
+
// record).
|
|
280
|
+
assertResponseFieldPresent({
|
|
281
|
+
data,
|
|
282
|
+
key: mutation.rootKey,
|
|
283
|
+
operationLabel: mutation.operationName,
|
|
284
|
+
scopeKey: scope.key,
|
|
285
|
+
scopeId: scope.id,
|
|
286
|
+
targetKey: 'user_id',
|
|
287
|
+
targetId,
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
// Merge dispatch outcomes back into the resolution records.
|
|
291
|
+
// Pre-loop resolution failures stay as-is; dispatchable records
|
|
292
|
+
// pick up the dispatch result (which may have flipped
|
|
293
|
+
// `ok: true` → `ok: false` on a Monday-side error).
|
|
294
|
+
const finalResults = [...resolution.records];
|
|
295
|
+
for (let i = 0; i < resolution.dispatchableIndices.length; i++) {
|
|
296
|
+
const idx = resolution.dispatchableIndices[i];
|
|
297
|
+
const dispatchResult = dispatchResults[i];
|
|
298
|
+
if (idx === undefined || dispatchResult === undefined)
|
|
299
|
+
continue;
|
|
300
|
+
// dispatchSequential builds a record with our id-field
|
|
301
|
+
// (`user_id`) plus `ok` + optional `error`. Lift the
|
|
302
|
+
// success/error info onto the resolution slot.
|
|
303
|
+
finalResults[idx] = {
|
|
304
|
+
user_id: resolution.records[idx]?.user_id ?? '',
|
|
305
|
+
ok: dispatchResult.ok,
|
|
306
|
+
...(dispatchResult.error === undefined
|
|
307
|
+
? {}
|
|
308
|
+
: { error: dispatchResult.error }),
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
emitMutation({
|
|
312
|
+
ctx,
|
|
313
|
+
// The cast widens through `unknown` because Output is a
|
|
314
|
+
// subtype-bounded generic (`Output extends UsersFanOutEnvelope
|
|
315
|
+
// <Op>`) — TS can't prove the literal matches an unknown
|
|
316
|
+
// subtype, but the schema's runtime parse inside emitMutation
|
|
317
|
+
// is the authoritative check.
|
|
318
|
+
data: {
|
|
319
|
+
operation: dataOperation,
|
|
320
|
+
results: finalResults,
|
|
321
|
+
},
|
|
322
|
+
schema: outputSchema,
|
|
323
|
+
programOpts,
|
|
324
|
+
warnings: [],
|
|
325
|
+
...(lastResponse === undefined
|
|
326
|
+
? { apiVersion }
|
|
327
|
+
: toEmit(lastResponse)),
|
|
328
|
+
...liveAggregator.result(),
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
//# sourceMappingURL=users-fan-out-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users-fan-out-mutation.js","sourceRoot":"","sources":["../../src/api/users-fan-out-mutation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,k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