monday-cli 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +324 -2
- package/README.md +128 -30
- package/dist/api/board-favorites.d.ts +329 -0
- package/dist/api/board-favorites.d.ts.map +1 -0
- package/dist/api/board-favorites.js +353 -0
- package/dist/api/board-favorites.js.map +1 -0
- package/dist/api/board-mutation-result.d.ts +9 -5
- package/dist/api/board-mutation-result.d.ts.map +1 -1
- package/dist/api/board-mutation-result.js +9 -5
- package/dist/api/board-mutation-result.js.map +1 -1
- package/dist/api/board-relation-validation.d.ts +161 -0
- package/dist/api/board-relation-validation.d.ts.map +1 -0
- package/dist/api/board-relation-validation.js +317 -0
- package/dist/api/board-relation-validation.js.map +1 -0
- package/dist/api/cache.d.ts +14 -5
- package/dist/api/cache.d.ts.map +1 -1
- package/dist/api/cache.js +8 -10
- package/dist/api/cache.js.map +1 -1
- package/dist/api/column-mapping.js +2 -2
- package/dist/api/column-mapping.js.map +1 -1
- package/dist/api/column-mutation-result.d.ts +9 -5
- package/dist/api/column-mutation-result.d.ts.map +1 -1
- package/dist/api/column-mutation-result.js +9 -5
- package/dist/api/column-mutation-result.js.map +1 -1
- package/dist/api/column-types.d.ts +26 -7
- package/dist/api/column-types.d.ts.map +1 -1
- package/dist/api/column-types.js +42 -3
- package/dist/api/column-types.js.map +1 -1
- package/dist/api/column-values.d.ts +228 -31
- package/dist/api/column-values.d.ts.map +1 -1
- package/dist/api/column-values.js +551 -124
- package/dist/api/column-values.js.map +1 -1
- package/dist/api/cross-board-search.d.ts +501 -0
- package/dist/api/cross-board-search.d.ts.map +1 -0
- package/dist/api/cross-board-search.js +547 -0
- package/dist/api/cross-board-search.js.map +1 -0
- package/dist/api/dev-conventions.d.ts +1038 -0
- package/dist/api/dev-conventions.d.ts.map +1 -0
- package/dist/api/dev-conventions.js +1556 -0
- package/dist/api/dev-conventions.js.map +1 -0
- package/dist/api/dry-run.d.ts +32 -5
- package/dist/api/dry-run.d.ts.map +1 -1
- package/dist/api/dry-run.js +149 -32
- package/dist/api/dry-run.js.map +1 -1
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +28 -7
- package/dist/api/errors.js.map +1 -1
- package/dist/api/group-mutation-result.d.ts +9 -5
- package/dist/api/group-mutation-result.d.ts.map +1 -1
- package/dist/api/group-mutation-result.js +9 -5
- package/dist/api/group-mutation-result.js.map +1 -1
- package/dist/api/item-history-projection.d.ts +919 -0
- package/dist/api/item-history-projection.d.ts.map +1 -0
- package/dist/api/item-history-projection.js +1104 -0
- package/dist/api/item-history-projection.js.map +1 -0
- package/dist/api/item-mutation-execute.d.ts +82 -0
- package/dist/api/item-mutation-execute.d.ts.map +1 -0
- package/dist/api/item-mutation-execute.js +199 -0
- package/dist/api/item-mutation-execute.js.map +1 -0
- package/dist/api/notifications.d.ts +156 -0
- package/dist/api/notifications.d.ts.map +1 -0
- package/dist/api/notifications.js +215 -0
- package/dist/api/notifications.js.map +1 -0
- package/dist/api/oauth-test-helper.d.ts +64 -0
- package/dist/api/oauth-test-helper.d.ts.map +1 -0
- package/dist/api/oauth-test-helper.js +179 -0
- package/dist/api/oauth-test-helper.js.map +1 -0
- package/dist/api/oauth.d.ts +198 -0
- package/dist/api/oauth.d.ts.map +1 -0
- package/dist/api/oauth.js +471 -0
- package/dist/api/oauth.js.map +1 -0
- package/dist/api/partial-success-bulk.d.ts +422 -0
- package/dist/api/partial-success-bulk.d.ts.map +1 -0
- package/dist/api/partial-success-bulk.js +378 -0
- package/dist/api/partial-success-bulk.js.map +1 -0
- package/dist/api/people.d.ts +54 -1
- package/dist/api/people.d.ts.map +1 -1
- package/dist/api/people.js +27 -3
- package/dist/api/people.js.map +1 -1
- package/dist/api/probes.d.ts +487 -0
- package/dist/api/probes.d.ts.map +1 -0
- package/dist/api/probes.js +881 -0
- package/dist/api/probes.js.map +1 -0
- package/dist/api/raw-document.d.ts.map +1 -1
- package/dist/api/raw-document.js +2 -2
- package/dist/api/raw-document.js.map +1 -1
- package/dist/api/raw-write.d.ts.map +1 -1
- package/dist/api/raw-write.js +11 -3
- package/dist/api/raw-write.js.map +1 -1
- package/dist/api/resolution-context.d.ts +23 -11
- package/dist/api/resolution-context.d.ts.map +1 -1
- package/dist/api/resolution-context.js +53 -12
- package/dist/api/resolution-context.js.map +1 -1
- package/dist/api/resolution-pass.d.ts +30 -1
- package/dist/api/resolution-pass.d.ts.map +1 -1
- package/dist/api/resolution-pass.js +36 -1
- package/dist/api/resolution-pass.js.map +1 -1
- package/dist/api/resolve-client.d.ts +11 -0
- package/dist/api/resolve-client.d.ts.map +1 -1
- package/dist/api/resolve-client.js +1 -1
- package/dist/api/resolve-client.js.map +1 -1
- package/dist/api/response-root.d.ts +92 -46
- package/dist/api/response-root.d.ts.map +1 -1
- package/dist/api/response-root.js +93 -41
- package/dist/api/response-root.js.map +1 -1
- package/dist/api/tag-directory.d.ts +154 -0
- package/dist/api/tag-directory.d.ts.map +1 -0
- package/dist/api/tag-directory.js +325 -0
- package/dist/api/tag-directory.js.map +1 -0
- package/dist/api/time-tracking.d.ts +165 -0
- package/dist/api/time-tracking.d.ts.map +1 -0
- package/dist/api/time-tracking.js +135 -0
- package/dist/api/time-tracking.js.map +1 -0
- package/dist/api/transport.js +3 -3
- package/dist/api/transport.js.map +1 -1
- package/dist/api/usage.d.ts +190 -0
- package/dist/api/usage.d.ts.map +1 -0
- package/dist/api/usage.js +194 -0
- package/dist/api/usage.js.map +1 -0
- package/dist/api/users-fan-out-mutation.d.ts.map +1 -1
- package/dist/api/users-fan-out-mutation.js +10 -5
- package/dist/api/users-fan-out-mutation.js.map +1 -1
- package/dist/api/webhooks.d.ts +357 -0
- package/dist/api/webhooks.d.ts.map +1 -0
- package/dist/api/webhooks.js +333 -0
- package/dist/api/webhooks.js.map +1 -0
- package/dist/cli/envelope-out.d.ts +18 -1
- package/dist/cli/envelope-out.d.ts.map +1 -1
- package/dist/cli/envelope-out.js +16 -2
- package/dist/cli/envelope-out.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +120 -1
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/run.d.ts +12 -0
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +2 -0
- package/dist/cli/run.js.map +1 -1
- package/dist/commands/account/tags.d.ts +37 -0
- package/dist/commands/account/tags.d.ts.map +1 -0
- package/dist/commands/account/tags.js +84 -0
- package/dist/commands/account/tags.js.map +1 -0
- package/dist/commands/auth/login.d.ts +14 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +314 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +28 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +94 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/board/archive.d.ts.map +1 -1
- package/dist/commands/board/archive.js +14 -14
- package/dist/commands/board/archive.js.map +1 -1
- package/dist/commands/board/column-create.d.ts +3 -3
- package/dist/commands/board/column-create.d.ts.map +1 -1
- package/dist/commands/board/column-create.js +52 -45
- package/dist/commands/board/column-create.js.map +1 -1
- package/dist/commands/board/column-delete.d.ts.map +1 -1
- package/dist/commands/board/column-delete.js +15 -16
- package/dist/commands/board/column-delete.js.map +1 -1
- package/dist/commands/board/column-update.d.ts.map +1 -1
- package/dist/commands/board/column-update.js +23 -22
- package/dist/commands/board/column-update.js.map +1 -1
- package/dist/commands/board/create.d.ts.map +1 -1
- package/dist/commands/board/create.js +14 -17
- package/dist/commands/board/create.js.map +1 -1
- package/dist/commands/board/delete.d.ts.map +1 -1
- package/dist/commands/board/delete.js +12 -15
- package/dist/commands/board/delete.js.map +1 -1
- package/dist/commands/board/describe.d.ts.map +1 -1
- package/dist/commands/board/describe.js +30 -0
- package/dist/commands/board/describe.js.map +1 -1
- package/dist/commands/board/duplicate.d.ts.map +1 -1
- package/dist/commands/board/duplicate.js +12 -13
- package/dist/commands/board/duplicate.js.map +1 -1
- package/dist/commands/board/favorites.d.ts +33 -0
- package/dist/commands/board/favorites.d.ts.map +1 -0
- package/dist/commands/board/favorites.js +74 -0
- package/dist/commands/board/favorites.js.map +1 -0
- package/dist/commands/board/find.d.ts +1 -1
- package/dist/commands/board/group-archive.d.ts.map +1 -1
- package/dist/commands/board/group-archive.js +12 -16
- package/dist/commands/board/group-archive.js.map +1 -1
- package/dist/commands/board/group-create.d.ts.map +1 -1
- package/dist/commands/board/group-create.js +9 -19
- package/dist/commands/board/group-create.js.map +1 -1
- package/dist/commands/board/group-delete.d.ts.map +1 -1
- package/dist/commands/board/group-delete.js +12 -16
- package/dist/commands/board/group-delete.js.map +1 -1
- package/dist/commands/board/group-duplicate.d.ts.map +1 -1
- package/dist/commands/board/group-duplicate.js +12 -16
- package/dist/commands/board/group-duplicate.js.map +1 -1
- package/dist/commands/board/group-update.d.ts.map +1 -1
- package/dist/commands/board/group-update.js +12 -11
- package/dist/commands/board/group-update.js.map +1 -1
- package/dist/commands/board/list.d.ts +1 -1
- package/dist/commands/board/update.d.ts.map +1 -1
- package/dist/commands/board/update.js +16 -11
- package/dist/commands/board/update.js.map +1 -1
- package/dist/commands/cache/list.d.ts +2 -0
- package/dist/commands/cache/list.d.ts.map +1 -1
- package/dist/commands/cache/list.js +2 -2
- package/dist/commands/cache/list.js.map +1 -1
- package/dist/commands/dev/_shared.d.ts +40 -0
- package/dist/commands/dev/_shared.d.ts.map +1 -0
- package/dist/commands/dev/_shared.js +104 -0
- package/dist/commands/dev/_shared.js.map +1 -0
- package/dist/commands/dev/configure.d.ts +36 -0
- package/dist/commands/dev/configure.d.ts.map +1 -0
- package/dist/commands/dev/configure.js +145 -0
- package/dist/commands/dev/configure.js.map +1 -0
- package/dist/commands/dev/discover.d.ts +34 -0
- package/dist/commands/dev/discover.d.ts.map +1 -0
- package/dist/commands/dev/discover.js +117 -0
- package/dist/commands/dev/discover.js.map +1 -0
- package/dist/commands/dev/doctor.d.ts +39 -0
- package/dist/commands/dev/doctor.d.ts.map +1 -0
- package/dist/commands/dev/doctor.js +91 -0
- package/dist/commands/dev/doctor.js.map +1 -0
- package/dist/commands/dev/epic/items.d.ts +24 -0
- package/dist/commands/dev/epic/items.d.ts.map +1 -0
- package/dist/commands/dev/epic/items.js +103 -0
- package/dist/commands/dev/epic/items.js.map +1 -0
- package/dist/commands/dev/epic/list.d.ts +36 -0
- package/dist/commands/dev/epic/list.d.ts.map +1 -0
- package/dist/commands/dev/epic/list.js +120 -0
- package/dist/commands/dev/epic/list.js.map +1 -0
- package/dist/commands/dev/release/list.d.ts +21 -0
- package/dist/commands/dev/release/list.d.ts.map +1 -0
- package/dist/commands/dev/release/list.js +73 -0
- package/dist/commands/dev/release/list.js.map +1 -0
- package/dist/commands/dev/sprint/current.d.ts +24 -0
- package/dist/commands/dev/sprint/current.d.ts.map +1 -0
- package/dist/commands/dev/sprint/current.js +90 -0
- package/dist/commands/dev/sprint/current.js.map +1 -0
- package/dist/commands/dev/sprint/items.d.ts +34 -0
- package/dist/commands/dev/sprint/items.d.ts.map +1 -0
- package/dist/commands/dev/sprint/items.js +118 -0
- package/dist/commands/dev/sprint/items.js.map +1 -0
- package/dist/commands/dev/sprint/list.d.ts +41 -0
- package/dist/commands/dev/sprint/list.d.ts.map +1 -0
- package/dist/commands/dev/sprint/list.js +104 -0
- package/dist/commands/dev/sprint/list.js.map +1 -0
- package/dist/commands/dev/task/block.d.ts +29 -0
- package/dist/commands/dev/task/block.d.ts.map +1 -0
- package/dist/commands/dev/task/block.js +106 -0
- package/dist/commands/dev/task/block.js.map +1 -0
- package/dist/commands/dev/task/done.d.ts +30 -0
- package/dist/commands/dev/task/done.d.ts.map +1 -0
- package/dist/commands/dev/task/done.js +113 -0
- package/dist/commands/dev/task/done.js.map +1 -0
- package/dist/commands/dev/task/list.d.ts +42 -0
- package/dist/commands/dev/task/list.d.ts.map +1 -0
- package/dist/commands/dev/task/list.js +227 -0
- package/dist/commands/dev/task/list.js.map +1 -0
- package/dist/commands/dev/task/start.d.ts +29 -0
- package/dist/commands/dev/task/start.d.ts.map +1 -0
- package/dist/commands/dev/task/start.js +90 -0
- package/dist/commands/dev/task/start.js.map +1 -0
- package/dist/commands/emit.d.ts.map +1 -1
- package/dist/commands/emit.js +5 -3
- package/dist/commands/emit.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +95 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/item/archive.d.ts.map +1 -1
- package/dist/commands/item/archive.js +11 -0
- package/dist/commands/item/archive.js.map +1 -1
- package/dist/commands/item/clear.d.ts.map +1 -1
- package/dist/commands/item/clear.js +15 -0
- package/dist/commands/item/clear.js.map +1 -1
- package/dist/commands/item/create.d.ts.map +1 -1
- package/dist/commands/item/create.js +41 -8
- package/dist/commands/item/create.js.map +1 -1
- package/dist/commands/item/delete.d.ts.map +1 -1
- package/dist/commands/item/delete.js +11 -0
- package/dist/commands/item/delete.js.map +1 -1
- package/dist/commands/item/duplicate.d.ts.map +1 -1
- package/dist/commands/item/duplicate.js +12 -0
- package/dist/commands/item/duplicate.js.map +1 -1
- package/dist/commands/item/history.d.ts +60 -0
- package/dist/commands/item/history.d.ts.map +1 -0
- package/dist/commands/item/history.js +309 -0
- package/dist/commands/item/history.js.map +1 -0
- package/dist/commands/item/list.d.ts.map +1 -1
- package/dist/commands/item/list.js +16 -13
- package/dist/commands/item/list.js.map +1 -1
- package/dist/commands/item/move.d.ts.map +1 -1
- package/dist/commands/item/move.js +41 -7
- package/dist/commands/item/move.js.map +1 -1
- package/dist/commands/item/search.d.ts +99 -15
- package/dist/commands/item/search.d.ts.map +1 -1
- package/dist/commands/item/search.js +480 -36
- package/dist/commands/item/search.js.map +1 -1
- package/dist/commands/item/set.d.ts.map +1 -1
- package/dist/commands/item/set.js +52 -8
- package/dist/commands/item/set.js.map +1 -1
- package/dist/commands/item/time-track/start.d.ts +61 -0
- package/dist/commands/item/time-track/start.d.ts.map +1 -0
- package/dist/commands/item/time-track/start.js +138 -0
- package/dist/commands/item/time-track/start.js.map +1 -0
- package/dist/commands/item/time-track/stop.d.ts +32 -0
- package/dist/commands/item/time-track/stop.d.ts.map +1 -0
- package/dist/commands/item/time-track/stop.js +97 -0
- package/dist/commands/item/time-track/stop.js.map +1 -0
- package/dist/commands/item/update.d.ts +1 -0
- package/dist/commands/item/update.d.ts.map +1 -1
- package/dist/commands/item/update.js +103 -113
- package/dist/commands/item/update.js.map +1 -1
- package/dist/commands/item/upsert.d.ts.map +1 -1
- package/dist/commands/item/upsert.js +48 -1
- package/dist/commands/item/upsert.js.map +1 -1
- package/dist/commands/notification/send.d.ts +60 -0
- package/dist/commands/notification/send.d.ts.map +1 -0
- package/dist/commands/notification/send.js +147 -0
- package/dist/commands/notification/send.js.map +1 -0
- package/dist/commands/parse-argv.d.ts.map +1 -1
- package/dist/commands/parse-argv.js +14 -4
- package/dist/commands/parse-argv.js.map +1 -1
- package/dist/commands/raw/index.d.ts.map +1 -1
- package/dist/commands/raw/index.js +13 -15
- package/dist/commands/raw/index.js.map +1 -1
- package/dist/commands/run-by-id-lookup.d.ts.map +1 -1
- package/dist/commands/run-by-id-lookup.js +2 -2
- package/dist/commands/run-by-id-lookup.js.map +1 -1
- package/dist/commands/schema/index.d.ts +2 -0
- package/dist/commands/schema/index.d.ts.map +1 -1
- package/dist/commands/status.d.ts +120 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +365 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/update/body-source.d.ts.map +1 -1
- package/dist/commands/update/body-source.js +2 -2
- package/dist/commands/update/body-source.js.map +1 -1
- package/dist/commands/update/create.d.ts +2 -3
- package/dist/commands/update/create.d.ts.map +1 -1
- package/dist/commands/update/create.js +15 -3
- package/dist/commands/update/create.js.map +1 -1
- package/dist/commands/update/delete.d.ts.map +1 -1
- package/dist/commands/update/delete.js +11 -0
- package/dist/commands/update/delete.js.map +1 -1
- package/dist/commands/update/edit.d.ts.map +1 -1
- package/dist/commands/update/edit.js +11 -0
- package/dist/commands/update/edit.js.map +1 -1
- package/dist/commands/update/list.d.ts.map +1 -1
- package/dist/commands/update/list.js +15 -12
- package/dist/commands/update/list.js.map +1 -1
- package/dist/commands/update/reply.d.ts.map +1 -1
- package/dist/commands/update/reply.js +11 -0
- package/dist/commands/update/reply.js.map +1 -1
- package/dist/commands/update/toggle.d.ts.map +1 -1
- package/dist/commands/update/toggle.js +13 -0
- package/dist/commands/update/toggle.js.map +1 -1
- package/dist/commands/usage.d.ts +58 -0
- package/dist/commands/usage.d.ts.map +1 -0
- package/dist/commands/usage.js +94 -0
- package/dist/commands/usage.js.map +1 -0
- package/dist/commands/webhook/create.d.ts +74 -0
- package/dist/commands/webhook/create.d.ts.map +1 -0
- package/dist/commands/webhook/create.js +150 -0
- package/dist/commands/webhook/create.js.map +1 -0
- package/dist/commands/webhook/delete.d.ts +46 -0
- package/dist/commands/webhook/delete.d.ts.map +1 -0
- package/dist/commands/webhook/delete.js +141 -0
- package/dist/commands/webhook/delete.js.map +1 -0
- package/dist/commands/webhook/list.d.ts +23 -0
- package/dist/commands/webhook/list.d.ts.map +1 -0
- package/dist/commands/webhook/list.js +68 -0
- package/dist/commands/webhook/list.js.map +1 -0
- package/dist/commands/workspace/create.d.ts.map +1 -1
- package/dist/commands/workspace/create.js +16 -0
- package/dist/commands/workspace/create.js.map +1 -1
- package/dist/commands/workspace/delete.d.ts.map +1 -1
- package/dist/commands/workspace/delete.js +13 -13
- package/dist/commands/workspace/delete.js.map +1 -1
- package/dist/commands/workspace/list.d.ts +1 -1
- package/dist/commands/workspace/update.d.ts.map +1 -1
- package/dist/commands/workspace/update.js +15 -15
- package/dist/commands/workspace/update.js.map +1 -1
- package/dist/config/credentials.d.ts +189 -0
- package/dist/config/credentials.d.ts.map +1 -0
- package/dist/config/credentials.js +300 -0
- package/dist/config/credentials.js.map +1 -0
- package/dist/config/profiles.d.ts +125 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/profiles.js +227 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/types/global-flags.d.ts +1 -1
- package/dist/types/global-flags.d.ts.map +1 -1
- package/dist/types/global-flags.js +28 -16
- package/dist/types/global-flags.js.map +1 -1
- package/dist/types/ids.d.ts +2 -0
- package/dist/types/ids.d.ts.map +1 -1
- package/dist/types/ids.js +5 -3
- package/dist/types/ids.js.map +1 -1
- package/dist/utils/errors.d.ts +57 -3
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +69 -2
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/fs.d.ts +35 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +36 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/json.d.ts +60 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +86 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/output/ndjson.d.ts +65 -3
- package/dist/utils/output/ndjson.d.ts.map +1 -1
- package/dist/utils/output/ndjson.js +21 -0
- package/dist/utils/output/ndjson.js.map +1 -1
- package/dist/utils/redact.d.ts.map +1 -1
- package/dist/utils/redact.js +31 -0
- package/dist/utils/redact.js.map +1 -1
- package/package.json +2 -1
- package/dist/commands/account/client-helper.d.ts +0 -37
- package/dist/commands/account/client-helper.d.ts.map +0 -1
- package/dist/commands/account/client-helper.js +0 -55
- package/dist/commands/account/client-helper.js.map +0 -1
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bulk per-item partial-success path for the v0.3-M25
|
|
3
|
+
* `item update --continue-on-error` flag (`cli-design.md` §6.4
|
|
4
|
+
* "Bulk per-item partial-success" sub-section).
|
|
5
|
+
*
|
|
6
|
+
* **What this module owns.** A thin wrapper around
|
|
7
|
+
* {@link dispatchSequential} from
|
|
8
|
+
* `src/api/partial-success-mutation.ts` that drives the matched-
|
|
9
|
+
* item-ID list through one wire call per item, capturing per-
|
|
10
|
+
* item failures into the result records rather than aborting
|
|
11
|
+
* the loop. The wrapper sits BETWEEN the bulk command-action
|
|
12
|
+
* orchestrator (`src/commands/item/update.ts:runBulk`) and the
|
|
13
|
+
* shared `dispatchSequential` helper — the action body owns the
|
|
14
|
+
* matched-item-walk + column-resolution pre-pass + confirmation
|
|
15
|
+
* gate, then hands the resolved `SelectedMutation` + matched-
|
|
16
|
+
* item IDs to this wrapper, which fans them out + projects the
|
|
17
|
+
* partial-success envelope's `data.results[]` records.
|
|
18
|
+
*
|
|
19
|
+
* **Why a separate module rather than folding into update.ts.**
|
|
20
|
+
* Three reasons:
|
|
21
|
+
*
|
|
22
|
+
* 1. **Single-source-of-truth for the partial-success contract
|
|
23
|
+
* surface.** M13 `update clear-all`, M14 `workspace
|
|
24
|
+
* add-users` / `remove-users`, M15 `board add-users`, and
|
|
25
|
+
* M25 `item update --continue-on-error` all share the
|
|
26
|
+
* `{<id_field>, ok, error?}` per-record shape backed by
|
|
27
|
+
* `dispatchSequential`. Keeping M25's wrapper next to its
|
|
28
|
+
* family in `src/api/` (rather than buried in a command
|
|
29
|
+
* file) keeps the family discoverable + makes future M27
|
|
30
|
+
* bulk-write extensions (notification fan-out?) lift
|
|
31
|
+
* cleanly into the same module.
|
|
32
|
+
*
|
|
33
|
+
* 2. **Action-body size budget.** `src/commands/item/update.ts`
|
|
34
|
+
* already runs ~1100 LOC carrying both single-item +
|
|
35
|
+
* v0.1 fail-fast bulk paths; adding the partial-success
|
|
36
|
+
* branch inline would push it past 1300 and bury the
|
|
37
|
+
* `dispatchSequential` integration. The action layer
|
|
38
|
+
* branches on `parsed.continueOnError` and dispatches into
|
|
39
|
+
* this module's `runPartialSuccessBulkUpdate` instead.
|
|
40
|
+
*
|
|
41
|
+
* 3. **Test surface ergonomics.** Per-item partial-success
|
|
42
|
+
* tests (mock `client.raw` with a routing predicate that
|
|
43
|
+
* flips success/failure per item-ID) read cleaner against
|
|
44
|
+
* the wrapper's seam than against the action body's
|
|
45
|
+
* branched control flow.
|
|
46
|
+
*
|
|
47
|
+
* **What stays at the action layer.** Argv-parse, column
|
|
48
|
+
* resolution, items_page walk, confirmation gate, dry-run path,
|
|
49
|
+
* source aggregation seed, and the universal-partial-success
|
|
50
|
+
* `ok: true` envelope assembly (via `emitMutation`). The
|
|
51
|
+
* wrapper returns the `data.results[]` array + the per-item
|
|
52
|
+
* source-leg fold; the action body wires that into the
|
|
53
|
+
* envelope it would have emitted on the v0.1 fail-fast bulk
|
|
54
|
+
* path's success branch.
|
|
55
|
+
*
|
|
56
|
+
* **Shipped at M25 IMPL (`fe15181`).** Pre-flight contract
|
|
57
|
+
* diff (`d5839a9`) pinned the module signatures + per-item
|
|
58
|
+
* result schema + pure-helper bodies; the M25 IMPL feat fills
|
|
59
|
+
* the runtime body of `runPartialSuccessBulkUpdate` + drops
|
|
60
|
+
* the `c8 ignore start/stop` block-wraps that surrounded both
|
|
61
|
+
* the wrapper body and the action-body routing branch at
|
|
62
|
+
* `src/commands/item/update.ts:runBulk`. The `executeMutation`
|
|
63
|
+
* lift to `src/api/item-mutation-execute.ts` (renamed
|
|
64
|
+
* `executeItemMutation`) shipped ahead at `78889df` (R-NEW-29
|
|
65
|
+
* 3-consumer trigger: single-item + fail-fast bulk + M25
|
|
66
|
+
* partial-success bulk).
|
|
67
|
+
*
|
|
68
|
+
* **Per-item dispatch wiring.** Runtime body loops
|
|
69
|
+
* {@link dispatchSequential} over `matchedItemIds` with
|
|
70
|
+
* id-field `'item_id'`. The per-item dispatch callback fires
|
|
71
|
+
* one `executeItemMutation` call. Successes populate
|
|
72
|
+
* `results[i].item` with the `ProjectedItem` via a side-map
|
|
73
|
+
* fold; failures land in `results[i].error: {code, message}`
|
|
74
|
+
* via `dispatchSequential`'s built-in error decoration.
|
|
75
|
+
* `internal_error` codes re-throw as whole-call (M14 round-2
|
|
76
|
+
* F1 precedent — schema-drift in the response MUST NOT be
|
|
77
|
+
* papered over as a per-item failure).
|
|
78
|
+
*
|
|
79
|
+
* **`data.summary.failed_count` invariant.** The action body
|
|
80
|
+
* derives `failed_count` from the result records
|
|
81
|
+
* (`results.filter((r) => !r.ok).length`); the wrapper does
|
|
82
|
+
* NOT compute it directly because the summary slot also
|
|
83
|
+
* carries `matched_count` + `applied_count` + `board_id` —
|
|
84
|
+
* shapes the action body already owns from the walker + the
|
|
85
|
+
* matched-item-walk + the argv. Keeping the summary
|
|
86
|
+
* assembly at the action layer prevents wrapper-vs-action
|
|
87
|
+
* drift on the partial-success contract's per-summary shape.
|
|
88
|
+
*/
|
|
89
|
+
import { z } from 'zod';
|
|
90
|
+
import { type ProjectedItem } from './item-projection.js';
|
|
91
|
+
import { type PartialSuccessResult } from './partial-success-mutation.js';
|
|
92
|
+
import type { ResolverWarning } from './columns.js';
|
|
93
|
+
import type { SelectedMutation } from './column-values.js';
|
|
94
|
+
import type { MondayClient } from './client.js';
|
|
95
|
+
import type { EnvelopeSource } from './source-aggregator.js';
|
|
96
|
+
/**
|
|
97
|
+
* Per-item result schema for the partial-success bulk envelope's
|
|
98
|
+
* `data.results[]` slot. Each record carries `item_id` + `ok` +
|
|
99
|
+
* either `item` (on success) or `error` (on failure). The two
|
|
100
|
+
* branches share the discriminator `ok: boolean` — agents read
|
|
101
|
+
* `r.ok ? r.item : r.error` to dispatch on outcome.
|
|
102
|
+
*
|
|
103
|
+
* The `item` slot on success records is the §6.2 `ProjectedItem`
|
|
104
|
+
* shape (same projection single-item `item update` emits as
|
|
105
|
+
* `data`). The `error` slot on failure records carries
|
|
106
|
+
* `{code, message}` populated from
|
|
107
|
+
* `dispatchSequential`'s per-target error decoration.
|
|
108
|
+
*
|
|
109
|
+
* `z.discriminatedUnion` would be the natural shape but
|
|
110
|
+
* `dispatchSequential`'s result records carry a dynamic
|
|
111
|
+
* id-field key (`{item_id: ..., ok, error?}`) — modelling that
|
|
112
|
+
* as a per-record union complicates the schema and downstream
|
|
113
|
+
* consumers' type-narrowing. The flatter shape below carries
|
|
114
|
+
* `item` + `error` as optionals; the action body's projection
|
|
115
|
+
* + the wrapper's per-item dispatch enforce the
|
|
116
|
+
* mutual-exclusion invariant at runtime.
|
|
117
|
+
*/
|
|
118
|
+
export declare const partialSuccessBulkUpdateResultSchema: z.ZodObject<{
|
|
119
|
+
item_id: z.ZodString;
|
|
120
|
+
ok: z.ZodBoolean;
|
|
121
|
+
item: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
board_id: z.ZodNullable<z.ZodString>;
|
|
125
|
+
group_id: z.ZodNullable<z.ZodString>;
|
|
126
|
+
parent_item_id: z.ZodNullable<z.ZodString>;
|
|
127
|
+
state: z.ZodNullable<z.ZodString>;
|
|
128
|
+
url: z.ZodNullable<z.ZodString>;
|
|
129
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
130
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
131
|
+
columns: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
type: z.ZodString;
|
|
134
|
+
title: z.ZodOptional<z.ZodString>;
|
|
135
|
+
text: z.ZodNullable<z.ZodString>;
|
|
136
|
+
value: z.ZodUnknown;
|
|
137
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
139
|
+
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
people: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
}, z.core.$loose>>>;
|
|
145
|
+
}, z.core.$loose>>;
|
|
146
|
+
}, z.core.$strict>>;
|
|
147
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
code: z.ZodString;
|
|
149
|
+
message: z.ZodString;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export type PartialSuccessBulkUpdateResult = z.infer<typeof partialSuccessBulkUpdateResultSchema>;
|
|
153
|
+
/**
|
|
154
|
+
* Output `data` shape for the partial-success bulk envelope.
|
|
155
|
+
* `data.operation` is the literal `"item_update"` (mirrors M14's
|
|
156
|
+
* add-users / remove-users discriminator at `data.operation`;
|
|
157
|
+
* agents switch on it to confirm which verb produced the
|
|
158
|
+
* envelope).
|
|
159
|
+
*
|
|
160
|
+
* `data.summary` extends the v0.1 fail-fast bulk-summary with
|
|
161
|
+
* `failed_count` — items whose per-item dispatch failed under
|
|
162
|
+
* the `--continue-on-error` path. The invariant
|
|
163
|
+
* `matched_count === applied_count + failed_count` holds for
|
|
164
|
+
* every M25 success envelope.
|
|
165
|
+
*/
|
|
166
|
+
export declare const partialSuccessBulkUpdateDataSchema: z.ZodObject<{
|
|
167
|
+
operation: z.ZodLiteral<"item_update">;
|
|
168
|
+
summary: z.ZodObject<{
|
|
169
|
+
matched_count: z.ZodNumber;
|
|
170
|
+
applied_count: z.ZodNumber;
|
|
171
|
+
failed_count: z.ZodNumber;
|
|
172
|
+
board_id: z.ZodString;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
results: z.ZodArray<z.ZodObject<{
|
|
175
|
+
item_id: z.ZodString;
|
|
176
|
+
ok: z.ZodBoolean;
|
|
177
|
+
item: z.ZodOptional<z.ZodObject<{
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
board_id: z.ZodNullable<z.ZodString>;
|
|
181
|
+
group_id: z.ZodNullable<z.ZodString>;
|
|
182
|
+
parent_item_id: z.ZodNullable<z.ZodString>;
|
|
183
|
+
state: z.ZodNullable<z.ZodString>;
|
|
184
|
+
url: z.ZodNullable<z.ZodString>;
|
|
185
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
186
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
187
|
+
columns: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
188
|
+
id: z.ZodString;
|
|
189
|
+
type: z.ZodString;
|
|
190
|
+
title: z.ZodOptional<z.ZodString>;
|
|
191
|
+
text: z.ZodNullable<z.ZodString>;
|
|
192
|
+
value: z.ZodUnknown;
|
|
193
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
|
+
index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
195
|
+
date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
time: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
+
people: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
198
|
+
id: z.ZodString;
|
|
199
|
+
kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
200
|
+
}, z.core.$loose>>>;
|
|
201
|
+
}, z.core.$loose>>;
|
|
202
|
+
}, z.core.$strict>>;
|
|
203
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
code: z.ZodString;
|
|
205
|
+
message: z.ZodString;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
export type PartialSuccessBulkUpdateData = z.infer<typeof partialSuccessBulkUpdateDataSchema>;
|
|
210
|
+
/**
|
|
211
|
+
* Inputs for the partial-success bulk dispatch helper.
|
|
212
|
+
*
|
|
213
|
+
* - `client` — the `MondayClient` (or test-double) the wrapper
|
|
214
|
+
* calls `client.raw` against. Action layer hands this in
|
|
215
|
+
* after `resolveClient` has run.
|
|
216
|
+
* - `boardId` — the board the matched items live on. Threaded
|
|
217
|
+
* through to the per-item `executeMutation` call AND to the
|
|
218
|
+
* per-item `foldAndRemap` archived-column probe.
|
|
219
|
+
* - `matchedItemIds` — IDs from the items_page walker; non-
|
|
220
|
+
* empty (action layer's empty-match branch emits a clean
|
|
221
|
+
* no-op envelope before reaching this helper).
|
|
222
|
+
* - `mutation` — the pre-resolved `SelectedMutation` (one of
|
|
223
|
+
* `change_simple_column_value` / `change_column_value` /
|
|
224
|
+
* `change_multiple_column_values`). Column resolution + the
|
|
225
|
+
* synthetic-name fold run ONCE at the action layer, BEFORE
|
|
226
|
+
* the per-item dispatch — this helper sees the resolved
|
|
227
|
+
* `SelectedMutation` and fans it out.
|
|
228
|
+
* - `createLabelsIfMissing` — Monday's
|
|
229
|
+
* `change_*_column_value.create_labels_if_missing` flag.
|
|
230
|
+
* Threaded through to every per-item dispatch.
|
|
231
|
+
*
|
|
232
|
+
* **Codex round-1 P1-1 fix.** Per-item failures must inherit
|
|
233
|
+
* the SAME error-code remap the v0.1 fail-fast bulk path
|
|
234
|
+
* applies — a stale-cache `validation_failed` remaps to the
|
|
235
|
+
* stable `column_archived` code agents key off (cli-design
|
|
236
|
+
* §6.5). The wrapper's per-item dispatch callback fires
|
|
237
|
+
* `foldAndRemap` BEFORE throwing into `dispatchSequential` so
|
|
238
|
+
* the per-record `error.code` in `data.results[]` matches the
|
|
239
|
+
* shape the fail-fast path would have surfaced as the
|
|
240
|
+
* top-level `error.code`. That requires the same context the
|
|
241
|
+
* fail-fast remap needs:
|
|
242
|
+
*
|
|
243
|
+
* - `resolverWarnings` — folded into the remapped error's
|
|
244
|
+
* `details.resolver_warnings` slot. Same shape the fail-fast
|
|
245
|
+
* path carries via `foldResolverWarningsIntoError`.
|
|
246
|
+
* - `remapColumnIds` — every translated column ID. The remap
|
|
247
|
+
* probe scans them in order and remaps to the first
|
|
248
|
+
* archived one. Single-column callers pass a one-element
|
|
249
|
+
* array; multi-column callers pass every column they tried
|
|
250
|
+
* to write (Codex M5b finding #3 precedent).
|
|
251
|
+
* - `env` — process env for the `refreshBoardMetadata` cache
|
|
252
|
+
* call inside the remap probe.
|
|
253
|
+
* - `noCache` — flag pass-through to the remap probe.
|
|
254
|
+
* - `resolutionSource` — `'live' | 'cache' | 'mixed'`. The
|
|
255
|
+
* remap probe fires ONLY when the original resolution was
|
|
256
|
+
* cache-sourced; a `live` resolution already saw the live
|
|
257
|
+
* archived flag, so a `validation_failed` after live
|
|
258
|
+
* resolution is genuine.
|
|
259
|
+
*
|
|
260
|
+
* The helper returns `{ results }`. The action layer:
|
|
261
|
+
* 1. derives `failed_count` from `results.filter(r => !r.ok)`,
|
|
262
|
+
* 2. folds the dispatch source signal (always `'live'`) into
|
|
263
|
+
* the `SourceAggregator` via
|
|
264
|
+
* `sourceAgg.record(PARTIAL_SUCCESS_BULK_DISPATCH_SOURCE,
|
|
265
|
+
* null)` — exported constant rather than a bare literal,
|
|
266
|
+
* 3. assembles the `data.summary` slot with
|
|
267
|
+
* `matched_count` / `applied_count` / `failed_count` /
|
|
268
|
+
* `board_id`,
|
|
269
|
+
* 4. emits the partial-success envelope via `emitMutation`,
|
|
270
|
+
* passing `apiVersion` only (no `lastResponse` capture —
|
|
271
|
+
* per-item `request_id`s aren't a useful aggregate
|
|
272
|
+
* signal; the partial-success envelope carries per-item
|
|
273
|
+
* outcomes inside `data.results[]` instead).
|
|
274
|
+
*/
|
|
275
|
+
export interface RunPartialSuccessBulkUpdateInputs {
|
|
276
|
+
readonly client: MondayClient;
|
|
277
|
+
readonly boardId: string;
|
|
278
|
+
readonly matchedItemIds: readonly string[];
|
|
279
|
+
readonly mutation: SelectedMutation;
|
|
280
|
+
readonly createLabelsIfMissing: boolean | undefined;
|
|
281
|
+
readonly resolverWarnings: readonly ResolverWarning[];
|
|
282
|
+
readonly remapColumnIds: readonly string[];
|
|
283
|
+
readonly env: NodeJS.ProcessEnv;
|
|
284
|
+
readonly noCache: boolean;
|
|
285
|
+
readonly resolutionSource: 'live' | 'cache' | 'mixed';
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Result returned by {@link runPartialSuccessBulkUpdate} to the
|
|
289
|
+
* action layer.
|
|
290
|
+
*
|
|
291
|
+
* - `results` — the array of per-item records the helper built
|
|
292
|
+
* via `dispatchSequential` + the per-item projection
|
|
293
|
+
* callback. Direct mirror of `data.results[]` in the §6.4
|
|
294
|
+
* envelope. **Mutable array** so the action layer can pass
|
|
295
|
+
* it directly to `partialSuccessBulkUpdateDataSchema.parse`
|
|
296
|
+
* (zod's `z.array(...)` infers a mutable array — wrapping
|
|
297
|
+
* `readonly` would force a spread at the call site).
|
|
298
|
+
*
|
|
299
|
+
* The wrapper does NOT return the last wire response — mirrors
|
|
300
|
+
* the v0.1 fail-fast bulk path's `emitMutation` call which
|
|
301
|
+
* passes only `apiVersion` (the per-item `request_id`s aren't
|
|
302
|
+
* a useful aggregate signal; the partial-success envelope
|
|
303
|
+
* carries per-item outcomes inside `data.results[]` instead).
|
|
304
|
+
*
|
|
305
|
+
* The dispatch source signal (always `'live'` post-dispatch
|
|
306
|
+
* — every Monday mutation counts as a `live` leg per
|
|
307
|
+
* `SourceAggregator`'s precedent) is folded into the action
|
|
308
|
+
* layer's `SourceAggregator` via
|
|
309
|
+
* `sourceAgg.record(PARTIAL_SUCCESS_BULK_DISPATCH_SOURCE, null)`
|
|
310
|
+
* rather than returned from the wrapper. The constant is
|
|
311
|
+
* exported for the call site to read against a named symbol
|
|
312
|
+
* rather than a bare string literal.
|
|
313
|
+
*/
|
|
314
|
+
export interface RunPartialSuccessBulkUpdateResult {
|
|
315
|
+
readonly results: PartialSuccessBulkUpdateResult[];
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Constant source signal the partial-success bulk dispatch
|
|
319
|
+
* contributes to the action layer's `SourceAggregator`. Always
|
|
320
|
+
* `'live'` post-dispatch — every Monday mutation counts as a
|
|
321
|
+
* `live` leg. Exported so the action layer's
|
|
322
|
+
* `sourceAgg.record(...)` call site reads against a named
|
|
323
|
+
* constant rather than a bare string literal.
|
|
324
|
+
*/
|
|
325
|
+
export declare const PARTIAL_SUCCESS_BULK_DISPATCH_SOURCE: EnvelopeSource;
|
|
326
|
+
/**
|
|
327
|
+
* Drives the per-item dispatch loop under `--continue-on-error`.
|
|
328
|
+
*
|
|
329
|
+
* Implementation (M25 impl `78889df` refactor + this commit):
|
|
330
|
+
*
|
|
331
|
+
* 1. Loop {@link dispatchSequential} over `matchedItemIds`
|
|
332
|
+
* with id-field `'item_id'`.
|
|
333
|
+
* 2. Per-item dispatch callback fires
|
|
334
|
+
* {@link executeItemMutation} against the resolved
|
|
335
|
+
* `SelectedMutation`. On a {@link MondayCliError} catch,
|
|
336
|
+
* run {@link foldAndRemap} with `resolverWarnings` +
|
|
337
|
+
* `remapColumnIds` + `env` + `noCache` + `resolutionSource`
|
|
338
|
+
* from the inputs BEFORE re-throwing into
|
|
339
|
+
* `dispatchSequential`. This makes the per-record
|
|
340
|
+
* `error.code` in `data.results[]` carry the SAME stable
|
|
341
|
+
* code (`column_archived` after a stale-cache
|
|
342
|
+
* `validation_failed` remap) that the v0.1 fail-fast
|
|
343
|
+
* path would have surfaced at the top level — Codex
|
|
344
|
+
* round-1 P1-1 contract requirement (cli-design §6.5
|
|
345
|
+
* stable-code rule applies uniformly across the bulk
|
|
346
|
+
* fail-modes).
|
|
347
|
+
* 3. On success, capture the `ProjectedItem` into a side
|
|
348
|
+
* map keyed by `item_id`.
|
|
349
|
+
* 4. After the loop, walk the `dispatchSequential` results
|
|
350
|
+
* and fold the per-item `ProjectedItem` from the side
|
|
351
|
+
* map into each `results[i].item` slot via
|
|
352
|
+
* {@link foldPartialSuccessBulkResult}. Failure records
|
|
353
|
+
* already carry `error: {code, message}` (with the
|
|
354
|
+
* foldAndRemap-applied code) via
|
|
355
|
+
* `dispatchSequential`'s built-in error decoration.
|
|
356
|
+
* 5. Return `{results}` — the action layer folds the
|
|
357
|
+
* constant `'live'` dispatch source via
|
|
358
|
+
* `sourceAgg.record(PARTIAL_SUCCESS_BULK_DISPATCH_SOURCE,
|
|
359
|
+
* null)` and emits the envelope.
|
|
360
|
+
*
|
|
361
|
+
* **`internal_error` re-throw escape hatch.** Per M14 round-2
|
|
362
|
+
* F1 / round-3 F1, `dispatchSequential` re-throws
|
|
363
|
+
* `internal_error` so schema-drift in the response surfaces
|
|
364
|
+
* as whole-call (top-level `ok: false`) rather than per-record
|
|
365
|
+
* — papering over `internal_error` would hide the malformed-
|
|
366
|
+
* response signal agents need to know about. The M25 wrapper
|
|
367
|
+
* inherits this behaviour by NOT wrapping the
|
|
368
|
+
* `dispatchSequential` re-throw — `foldAndRemap` only ever
|
|
369
|
+
* runs against {@link MondayCliError} instances, and it
|
|
370
|
+
* NEVER converts a non-internal_error into internal_error,
|
|
371
|
+
* so the re-throw path through dispatchSequential remains
|
|
372
|
+
* the canonical schema-drift surface.
|
|
373
|
+
*
|
|
374
|
+
* **Non-`MondayCliError` re-throw.** Programmer-bug exceptions
|
|
375
|
+
* (TypeError, RangeError, etc.) raised by the executor or by
|
|
376
|
+
* `foldAndRemap`'s refresh probe propagate through
|
|
377
|
+
* `dispatchSequential`'s non-CliError re-throw branch unchanged,
|
|
378
|
+
* surfacing as whole-call `internal_error` via the runner's
|
|
379
|
+
* catch-all (mirrors M14's pattern at
|
|
380
|
+
* `users-fan-out-mutation.ts` and the documented behaviour at
|
|
381
|
+
* `partial-success-mutation.ts:93`).
|
|
382
|
+
*/
|
|
383
|
+
export declare const runPartialSuccessBulkUpdate: (inputs: RunPartialSuccessBulkUpdateInputs) => Promise<RunPartialSuccessBulkUpdateResult>;
|
|
384
|
+
/**
|
|
385
|
+
* Pure helper — folds a `dispatchSequential` result row + a
|
|
386
|
+
* `ProjectedItem` side-map entry into the partial-success-bulk
|
|
387
|
+
* per-item record shape this module emits to the action layer.
|
|
388
|
+
*
|
|
389
|
+
* The helper is **shipped as a real implementation** (not a
|
|
390
|
+
* stub) so the pre-flight Codex review can verify the
|
|
391
|
+
* projection shape against the contract pinned in cli-design
|
|
392
|
+
* §6.4 inline. M25 implementation reuses the helper unchanged.
|
|
393
|
+
*
|
|
394
|
+
* `record` is the row produced by `dispatchSequential` with
|
|
395
|
+
* id-field `'item_id'` — carries `{item_id, ok, error?}` per
|
|
396
|
+
* the partial-success contract. `projectedItem` is the
|
|
397
|
+
* `ProjectedItem` the per-item dispatch callback captured on
|
|
398
|
+
* success (`undefined` on failure).
|
|
399
|
+
*
|
|
400
|
+
* Returns the per-item shape with `item` populated only when
|
|
401
|
+
* the dispatch succeeded; `error` populated only when it
|
|
402
|
+
* failed. The mutual-exclusion invariant is enforced at the
|
|
403
|
+
* boundary: success records never carry `error`, failure
|
|
404
|
+
* records never carry `item`.
|
|
405
|
+
*/
|
|
406
|
+
export declare const foldPartialSuccessBulkResult: (record: PartialSuccessResult, projectedItem: ProjectedItem | undefined) => PartialSuccessBulkUpdateResult;
|
|
407
|
+
/**
|
|
408
|
+
* Pure helper — derives the `data.summary` slot from the
|
|
409
|
+
* matched-item count + the per-item results array. The
|
|
410
|
+
* `matched_count === applied_count + failed_count` invariant
|
|
411
|
+
* is enforced here; a mismatch throws `internal_error` since
|
|
412
|
+
* it would indicate a wrapper-layer bug (some matched item
|
|
413
|
+
* neither succeeded nor failed). Shipped as a real
|
|
414
|
+
* implementation so the pre-flight Codex review can verify the
|
|
415
|
+
* shape against cli-design §6.4 inline.
|
|
416
|
+
*/
|
|
417
|
+
export declare const buildPartialSuccessBulkSummary: ({ matchedCount, boardId, results, }: {
|
|
418
|
+
readonly matchedCount: number;
|
|
419
|
+
readonly boardId: string;
|
|
420
|
+
readonly results: readonly PartialSuccessBulkUpdateResult[];
|
|
421
|
+
}) => PartialSuccessBulkUpdateData["summary"];
|
|
422
|
+
//# sourceMappingURL=partial-success-bulk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-success-bulk.d.ts","sourceRoot":"","sources":["../../src/api/partial-success-bulk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU/C,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,kCAAkC,CAC1C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;IACtD,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,OAAO,EAAE,8BAA8B,EAAE,CAAC;CACpD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,EAAE,cAAuB,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,eAAO,MAAM,2BAA2B,GACtC,QAAQ,iCAAiC,KACxC,OAAO,CAAC,iCAAiC,CAgF3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,oBAAoB,EAC5B,eAAe,aAAa,GAAG,SAAS,KACvC,8BA4DF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,GAAI,qCAI5C;IACD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,8BAA8B,EAAE,CAAC;CAC7D,KAAG,4BAA4B,CAAC,SAAS,CAuBzC,CAAC"}
|