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,434 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monday API → CLI error code mapper (`v0.1-plan.md` §3 M2,
|
|
3
|
+
* `cli-design.md` §2.5 / §6.5).
|
|
4
|
+
*
|
|
5
|
+
* The transport layer (`src/api/transport.ts`) already maps the
|
|
6
|
+
* lowest-level failures it sees: `fetch` exceptions → `network_error`,
|
|
7
|
+
* `AbortSignal.timeout` → `timeout`, malformed JSON →
|
|
8
|
+
* `network_error`. Everything else — HTTP status codes, GraphQL
|
|
9
|
+
* `errors[]` payloads, Monday's own application-level codes that
|
|
10
|
+
* arrive on `200 OK` — is interpreted *here* against the response
|
|
11
|
+
* body the transport hands back.
|
|
12
|
+
*
|
|
13
|
+
* Two consumers:
|
|
14
|
+
*
|
|
15
|
+
* - `api/client.ts` calls `mapResponse(transportResponse)` on every
|
|
16
|
+
* request. A non-error response returns `{ ok: true, data }`; an
|
|
17
|
+
* error becomes `ApiError(<code>, ..., { httpStatus, mondayCode,
|
|
18
|
+
* retryAfterSeconds, details })` for the retry layer to inspect.
|
|
19
|
+
* - The retry layer (`api/retry.ts`) reads `error.retryable` and
|
|
20
|
+
* `error.retryAfterSeconds` to decide.
|
|
21
|
+
*
|
|
22
|
+
* **No English-message keying.** Monday's error code dictionary is
|
|
23
|
+
* unstable across API versions; we extract the structured signals
|
|
24
|
+
* (`extensions.code`, `extensions.error_code`, HTTP status,
|
|
25
|
+
* `retry_in_seconds` / `Retry-After` headers) and ignore the prose.
|
|
26
|
+
*/
|
|
27
|
+
import { ApiError } from '../utils/errors.js';
|
|
28
|
+
/**
|
|
29
|
+
* Reads the `Retry-After` header per RFC 7231 — either delta-seconds
|
|
30
|
+
* (an integer) or an HTTP-date. We accept the integer form only;
|
|
31
|
+
* date-form retries are rare in practice and computing the delta
|
|
32
|
+
* client-side hides clock-skew bugs.
|
|
33
|
+
*/
|
|
34
|
+
const parseRetryAfterHeader = (headers) => {
|
|
35
|
+
const lower = {};
|
|
36
|
+
for (const [k, v] of Object.entries(headers)) {
|
|
37
|
+
lower[k.toLowerCase()] = v;
|
|
38
|
+
}
|
|
39
|
+
const raw = lower['retry-after'];
|
|
40
|
+
if (raw === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const n = Number.parseInt(raw, 10);
|
|
44
|
+
if (Number.isFinite(n) && n >= 0) {
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
};
|
|
49
|
+
const extractRetryInSeconds = (err) => {
|
|
50
|
+
if (err === undefined) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
const ext = err.extensions ?? {};
|
|
54
|
+
// Monday spells this several ways across versions.
|
|
55
|
+
const candidates = [
|
|
56
|
+
'retry_in_seconds',
|
|
57
|
+
'retryInSeconds',
|
|
58
|
+
'reset_in_seconds',
|
|
59
|
+
'resetInSeconds',
|
|
60
|
+
];
|
|
61
|
+
for (const key of candidates) {
|
|
62
|
+
const v = ext[key];
|
|
63
|
+
if (typeof v === 'number' && Number.isFinite(v) && v >= 0) {
|
|
64
|
+
return v;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return undefined;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Reads the `extensions.code` (preferred) or `extensions.error_code`
|
|
71
|
+
* field as a string, lower-casing for case-insensitive comparison.
|
|
72
|
+
* Returns undefined when the GraphQL error doesn't carry one.
|
|
73
|
+
*/
|
|
74
|
+
const extractMondayCode = (err) => {
|
|
75
|
+
if (err === undefined) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
const ext = err.extensions ?? {};
|
|
79
|
+
for (const key of ['code', 'error_code', 'errorCode']) {
|
|
80
|
+
const v = ext[key];
|
|
81
|
+
if (typeof v === 'string' && v.length > 0) {
|
|
82
|
+
return v;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return undefined;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Heuristic match of a single GraphQL error against Monday's
|
|
89
|
+
* documented application-level codes. The mapping intentionally
|
|
90
|
+
* looks at:
|
|
91
|
+
* - `extensions.code` (Monday's structured channel)
|
|
92
|
+
* - the bare error message (substring, case-insensitive) as a
|
|
93
|
+
* fallback for older API versions or proxies that strip
|
|
94
|
+
* extensions
|
|
95
|
+
*
|
|
96
|
+
* Returns `undefined` when no specific code matches; the caller
|
|
97
|
+
* decides whether to fall back to `validation_failed` /
|
|
98
|
+
* `internal_error`.
|
|
99
|
+
*/
|
|
100
|
+
const matchKnownGraphqlCode = (err) => {
|
|
101
|
+
const code = extractMondayCode(err)?.toUpperCase() ?? '';
|
|
102
|
+
const message = err.message.toLowerCase();
|
|
103
|
+
if (code === 'COMPLEXITYEXCEPTION' ||
|
|
104
|
+
message.includes('complexity budget exhausted') ||
|
|
105
|
+
message.includes('query has complexity')) {
|
|
106
|
+
return 'complexity_exceeded';
|
|
107
|
+
}
|
|
108
|
+
if (code === 'RATE_LIMIT_EXCEEDED' ||
|
|
109
|
+
code === 'MINUTE_LIMIT_EXCEEDED' ||
|
|
110
|
+
message.includes('minute limit rate exceeded')) {
|
|
111
|
+
return 'rate_limited';
|
|
112
|
+
}
|
|
113
|
+
if (code === 'DAILY_LIMIT_EXCEEDED' ||
|
|
114
|
+
message.includes('daily limit')) {
|
|
115
|
+
return 'daily_limit_exceeded';
|
|
116
|
+
}
|
|
117
|
+
if (code === 'CONCURRENCY_LIMIT_EXCEEDED' ||
|
|
118
|
+
code === 'CONCURRENCYLIMITEXCEEDED' ||
|
|
119
|
+
message.includes('concurrency limit')) {
|
|
120
|
+
return 'concurrency_exceeded';
|
|
121
|
+
}
|
|
122
|
+
if (code === 'IP_RATE_LIMIT_EXCEEDED' ||
|
|
123
|
+
message.includes('ip rate limit')) {
|
|
124
|
+
return 'ip_rate_limited';
|
|
125
|
+
}
|
|
126
|
+
if (code === 'UNAUTHORIZED' ||
|
|
127
|
+
code === 'AUTHENTICATION_ERROR' ||
|
|
128
|
+
message.includes('not authenticated') ||
|
|
129
|
+
message.includes('invalid token') ||
|
|
130
|
+
message.includes('invalid api token')) {
|
|
131
|
+
return 'unauthorized';
|
|
132
|
+
}
|
|
133
|
+
if (code === 'FORBIDDEN' ||
|
|
134
|
+
code === 'PERMISSION_DENIED' ||
|
|
135
|
+
code === 'NOT_AUTHORIZED' ||
|
|
136
|
+
message.includes('permission denied') ||
|
|
137
|
+
message.includes('not allowed')) {
|
|
138
|
+
return 'forbidden';
|
|
139
|
+
}
|
|
140
|
+
if (code === 'RESOURCE_NOT_FOUND' ||
|
|
141
|
+
code === 'NOT_FOUND' ||
|
|
142
|
+
code === 'INVALIDBOARDIDEXCEPTION' ||
|
|
143
|
+
code === 'INVALIDITEMIDEXCEPTION') {
|
|
144
|
+
return 'not_found';
|
|
145
|
+
}
|
|
146
|
+
if (code === 'RESOURCE_LOCKED' ||
|
|
147
|
+
code === 'INUSE') {
|
|
148
|
+
return 'resource_locked';
|
|
149
|
+
}
|
|
150
|
+
if (code === 'INVALID_CURSOR_EXCEPTION' ||
|
|
151
|
+
code === 'CURSOREXPIREDEXCEPTION' ||
|
|
152
|
+
message.includes('cursor expired') ||
|
|
153
|
+
message.includes('invalid cursor')) {
|
|
154
|
+
return 'stale_cursor';
|
|
155
|
+
}
|
|
156
|
+
if (code === 'COLUMNVALUEEXCEPTION' ||
|
|
157
|
+
code === 'INVALIDARGUMENTEXCEPTION' ||
|
|
158
|
+
code === 'INVALIDCOLUMNIDEXCEPTION' ||
|
|
159
|
+
code === 'VALIDATION_ERROR' ||
|
|
160
|
+
code === 'BAD_USER_INPUT') {
|
|
161
|
+
return 'validation_failed';
|
|
162
|
+
}
|
|
163
|
+
return undefined;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Default human-readable message per CLI code, used when the upstream
|
|
167
|
+
* error body has nothing prose-worthy to say. Frozen so a stray
|
|
168
|
+
* mutation can't reshape the surface mid-process.
|
|
169
|
+
*/
|
|
170
|
+
const DEFAULT_MESSAGE_FOR_CODE = Object.freeze({
|
|
171
|
+
unauthorized: 'Monday rejected the API token (unauthorized)',
|
|
172
|
+
forbidden: 'Monday refused the request (forbidden)',
|
|
173
|
+
rate_limited: 'Monday rate-limit hit — wait before retrying',
|
|
174
|
+
complexity_exceeded: 'Monday complexity budget exceeded — wait before retrying',
|
|
175
|
+
daily_limit_exceeded: 'Monday daily call limit exceeded',
|
|
176
|
+
concurrency_exceeded: 'Monday concurrency limit exceeded — too many in-flight requests',
|
|
177
|
+
ip_rate_limited: 'Monday IP rate-limit hit — wait before retrying',
|
|
178
|
+
resource_locked: 'Monday reported the resource is locked (HTTP 423)',
|
|
179
|
+
validation_failed: 'Monday rejected the request payload as invalid',
|
|
180
|
+
not_found: 'Monday could not find the requested resource',
|
|
181
|
+
stale_cursor: 'Pagination cursor expired (60-minute lifetime)',
|
|
182
|
+
});
|
|
183
|
+
const messageForCode = (code, err) => {
|
|
184
|
+
if (err !== undefined) {
|
|
185
|
+
return err.message;
|
|
186
|
+
}
|
|
187
|
+
return DEFAULT_MESSAGE_FOR_CODE[code] ?? 'Monday API error';
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Maps Monday's top-level `error_code` (present on some non-200
|
|
191
|
+
* responses, parallel to `extensions.code` on the GraphQL path) to
|
|
192
|
+
* a CLI code. Used as a higher-priority signal than the bare HTTP
|
|
193
|
+
* status — a 429 carrying `error_code: "IP_RATE_LIMIT_EXCEEDED"`
|
|
194
|
+
* is `ip_rate_limited`, not the generic `rate_limited` the status
|
|
195
|
+
* alone would suggest. (Codex M2 review §3.)
|
|
196
|
+
*/
|
|
197
|
+
const mapTopLevelErrorCode = (code) => {
|
|
198
|
+
if (code === undefined)
|
|
199
|
+
return undefined;
|
|
200
|
+
const upper = code.toUpperCase();
|
|
201
|
+
if (upper === 'IP_RATE_LIMIT_EXCEEDED')
|
|
202
|
+
return 'ip_rate_limited';
|
|
203
|
+
if (upper === 'RATE_LIMIT_EXCEEDED' || upper === 'MINUTE_LIMIT_EXCEEDED') {
|
|
204
|
+
return 'rate_limited';
|
|
205
|
+
}
|
|
206
|
+
if (upper === 'DAILY_LIMIT_EXCEEDED')
|
|
207
|
+
return 'daily_limit_exceeded';
|
|
208
|
+
if (upper === 'CONCURRENCY_LIMIT_EXCEEDED')
|
|
209
|
+
return 'concurrency_exceeded';
|
|
210
|
+
if (upper === 'COMPLEXITYEXCEPTION')
|
|
211
|
+
return 'complexity_exceeded';
|
|
212
|
+
if (upper === 'UNAUTHORIZED' || upper === 'AUTHENTICATION_ERROR') {
|
|
213
|
+
return 'unauthorized';
|
|
214
|
+
}
|
|
215
|
+
if (upper === 'FORBIDDEN' || upper === 'PERMISSION_DENIED') {
|
|
216
|
+
return 'forbidden';
|
|
217
|
+
}
|
|
218
|
+
return undefined;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Maps an HTTP status (with no usable GraphQL `errors`) to a CLI
|
|
222
|
+
* error code. Used when Monday returns a non-200 with no structured
|
|
223
|
+
* payload — usually proxies or load balancers between us and the
|
|
224
|
+
* GraphQL server.
|
|
225
|
+
*/
|
|
226
|
+
const mapHttpStatus = (status) => {
|
|
227
|
+
if (status === 401)
|
|
228
|
+
return 'unauthorized';
|
|
229
|
+
if (status === 403)
|
|
230
|
+
return 'forbidden';
|
|
231
|
+
if (status === 404)
|
|
232
|
+
return 'not_found';
|
|
233
|
+
if (status === 423)
|
|
234
|
+
return 'resource_locked';
|
|
235
|
+
if (status === 429)
|
|
236
|
+
return 'rate_limited';
|
|
237
|
+
if (status >= 500 && status < 600)
|
|
238
|
+
return 'network_error';
|
|
239
|
+
if (status >= 400 && status < 500)
|
|
240
|
+
return 'validation_failed';
|
|
241
|
+
return undefined;
|
|
242
|
+
};
|
|
243
|
+
const isObject = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
244
|
+
const asGraphQlBody = (body) => {
|
|
245
|
+
if (!isObject(body)) {
|
|
246
|
+
return undefined;
|
|
247
|
+
}
|
|
248
|
+
// Structural read: the consumer reads `data` / `errors` / `extensions`
|
|
249
|
+
// / top-level `error_*` slots; nothing here is asserted past
|
|
250
|
+
// `unknown` until the per-field guards downstream.
|
|
251
|
+
return body;
|
|
252
|
+
};
|
|
253
|
+
const collectGraphqlErrors = (body) => {
|
|
254
|
+
if (body === undefined)
|
|
255
|
+
return [];
|
|
256
|
+
if (!Array.isArray(body.errors))
|
|
257
|
+
return [];
|
|
258
|
+
const out = [];
|
|
259
|
+
for (const item of body.errors) {
|
|
260
|
+
if (!isObject(item))
|
|
261
|
+
continue;
|
|
262
|
+
const message = typeof item.message === 'string' ? item.message : '';
|
|
263
|
+
const extensions = isObject(item.extensions) ? item.extensions : undefined;
|
|
264
|
+
const path = Array.isArray(item.path)
|
|
265
|
+
? item.path.filter((p) => typeof p === 'string' || typeof p === 'number')
|
|
266
|
+
: undefined;
|
|
267
|
+
out.push({
|
|
268
|
+
message,
|
|
269
|
+
...(extensions === undefined ? {} : { extensions }),
|
|
270
|
+
...(path === undefined ? {} : { path }),
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
return out;
|
|
274
|
+
};
|
|
275
|
+
const detailsForGraphqlError = (err) => {
|
|
276
|
+
const details = {};
|
|
277
|
+
if (err.extensions !== undefined) {
|
|
278
|
+
details.extensions = err.extensions;
|
|
279
|
+
}
|
|
280
|
+
if (err.path !== undefined && err.path.length > 0) {
|
|
281
|
+
details.path = err.path;
|
|
282
|
+
}
|
|
283
|
+
return details;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Maps a transport response to either a parsed `data` payload or an
|
|
287
|
+
* `ApiError`. The caller (`api/client.ts`) typically destructures:
|
|
288
|
+
*
|
|
289
|
+
* const result = mapResponse<MyShape>(resp);
|
|
290
|
+
* if (!result.ok) throw result.error;
|
|
291
|
+
* return result.data;
|
|
292
|
+
*
|
|
293
|
+
* Throwing here would force every caller to have its own try/catch;
|
|
294
|
+
* returning a tagged result keeps the retry layer's loop linear.
|
|
295
|
+
*/
|
|
296
|
+
export const mapResponse = (input) => {
|
|
297
|
+
const body = asGraphQlBody(input.body);
|
|
298
|
+
const errors = collectGraphqlErrors(body);
|
|
299
|
+
const httpRetryAfter = parseRetryAfterHeader(input.headers);
|
|
300
|
+
// 1. HTTP 423 always maps to resource_locked (Monday's documented
|
|
301
|
+
// contract — `cli-design.md` §2.5). This wins over any GraphQL
|
|
302
|
+
// error array because 423 is a load-balancer / coordination
|
|
303
|
+
// signal, not an application-level failure.
|
|
304
|
+
if (input.status === 423) {
|
|
305
|
+
const firstErr = errors[0];
|
|
306
|
+
const lockOpts = {
|
|
307
|
+
httpStatus: input.status,
|
|
308
|
+
details: {
|
|
309
|
+
...(firstErr === undefined ? {} : detailsForGraphqlError(firstErr)),
|
|
310
|
+
...(httpRetryAfter === undefined ? {} : { retry_after_seconds: httpRetryAfter }),
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
const lockMondayCode = firstErr === undefined ? undefined : extractMondayCode(firstErr);
|
|
314
|
+
if (lockMondayCode !== undefined) {
|
|
315
|
+
lockOpts.mondayCode = lockMondayCode;
|
|
316
|
+
}
|
|
317
|
+
if (httpRetryAfter !== undefined) {
|
|
318
|
+
lockOpts.retryAfterSeconds = httpRetryAfter;
|
|
319
|
+
}
|
|
320
|
+
return {
|
|
321
|
+
ok: false,
|
|
322
|
+
error: new ApiError('resource_locked', firstErr?.message ?? 'Monday reported the resource is locked (HTTP 423)', lockOpts),
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
// 2. GraphQL `errors[]` — present on most Monday application
|
|
326
|
+
// failures, including ones that arrive on HTTP 200.
|
|
327
|
+
const [first] = errors;
|
|
328
|
+
if (first !== undefined) {
|
|
329
|
+
const matched = matchKnownGraphqlCode(first);
|
|
330
|
+
let code;
|
|
331
|
+
if (matched !== undefined) {
|
|
332
|
+
code = matched;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
// Last-resort fallback. Most unmapped Monday errors are
|
|
336
|
+
// user-input validation failures (bad column id, missing
|
|
337
|
+
// argument). Validation surfaces as exit 2 / non-retryable,
|
|
338
|
+
// matching the §6.5 contract.
|
|
339
|
+
code = 'validation_failed';
|
|
340
|
+
}
|
|
341
|
+
const retryInSeconds = extractRetryInSeconds(first) ?? httpRetryAfter;
|
|
342
|
+
const mondayCode = extractMondayCode(first);
|
|
343
|
+
const details = {
|
|
344
|
+
...detailsForGraphqlError(first),
|
|
345
|
+
};
|
|
346
|
+
if (errors.length > 1) {
|
|
347
|
+
details.additional_errors = errors.slice(1).map((e) => ({
|
|
348
|
+
message: e.message,
|
|
349
|
+
...(e.extensions === undefined ? {} : { extensions: e.extensions }),
|
|
350
|
+
...(e.path === undefined || e.path.length === 0 ? {} : { path: e.path }),
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
353
|
+
if (retryInSeconds !== undefined) {
|
|
354
|
+
details.retry_after_seconds = retryInSeconds;
|
|
355
|
+
}
|
|
356
|
+
return {
|
|
357
|
+
ok: false,
|
|
358
|
+
error: new ApiError(code, messageForCode(code, first), {
|
|
359
|
+
httpStatus: input.status,
|
|
360
|
+
...(mondayCode === undefined ? {} : { mondayCode }),
|
|
361
|
+
...(retryInSeconds === undefined ? {} : { retryAfterSeconds: retryInSeconds }),
|
|
362
|
+
details,
|
|
363
|
+
}),
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
// 3. Non-success HTTP without GraphQL errors. Treat the body as
|
|
367
|
+
// opaque (it might be an HTML error page from a proxy).
|
|
368
|
+
if (input.status < 200 || input.status >= 300) {
|
|
369
|
+
// The body's top-level `error_code` is more specific than the
|
|
370
|
+
// HTTP status — a 429 carrying `IP_RATE_LIMIT_EXCEEDED` is
|
|
371
|
+
// `ip_rate_limited`, not `rate_limited` (Codex M2 review §3).
|
|
372
|
+
// Fall back to the status when the body has no error_code or
|
|
373
|
+
// it doesn't match a known signal.
|
|
374
|
+
const topLevelErrorCode = typeof body?.error_code === 'string' ? body.error_code : undefined;
|
|
375
|
+
const fallback = mapTopLevelErrorCode(topLevelErrorCode) ??
|
|
376
|
+
mapHttpStatus(input.status) ??
|
|
377
|
+
'network_error';
|
|
378
|
+
const details = {};
|
|
379
|
+
// Monday occasionally returns top-level `error_code` /
|
|
380
|
+
// `error_message` for non-200s.
|
|
381
|
+
if (body?.error_code !== undefined) {
|
|
382
|
+
details.error_code = body.error_code;
|
|
383
|
+
}
|
|
384
|
+
if (body?.error_message !== undefined) {
|
|
385
|
+
details.error_message = body.error_message;
|
|
386
|
+
}
|
|
387
|
+
if (httpRetryAfter !== undefined) {
|
|
388
|
+
details.retry_after_seconds = httpRetryAfter;
|
|
389
|
+
}
|
|
390
|
+
const errOpts = {
|
|
391
|
+
httpStatus: input.status,
|
|
392
|
+
details,
|
|
393
|
+
};
|
|
394
|
+
if (httpRetryAfter !== undefined) {
|
|
395
|
+
errOpts.retryAfterSeconds = httpRetryAfter;
|
|
396
|
+
}
|
|
397
|
+
if (typeof body?.error_code === 'string' && body.error_code.length > 0) {
|
|
398
|
+
errOpts.mondayCode = body.error_code;
|
|
399
|
+
}
|
|
400
|
+
return {
|
|
401
|
+
ok: false,
|
|
402
|
+
error: new ApiError(fallback, body?.error_message !== undefined && body.error_message.length > 0
|
|
403
|
+
? body.error_message
|
|
404
|
+
: `Monday API returned HTTP ${String(input.status)}`, errOpts),
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
// 4. Success path. `body.data` may legitimately be `null` (Monday
|
|
408
|
+
// returns `null` for missing-by-id queries with no errors); we
|
|
409
|
+
// pass it through and the command-level zod parser is the next
|
|
410
|
+
// line of defence.
|
|
411
|
+
const data = (body?.data ?? null);
|
|
412
|
+
return {
|
|
413
|
+
ok: true,
|
|
414
|
+
data,
|
|
415
|
+
...(body?.extensions === undefined ? { extensions: undefined } : { extensions: body.extensions }),
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* Re-maps an unknown error caught around a transport call to a typed
|
|
420
|
+
* `MondayCliError`. The transport already throws `ApiError` for
|
|
421
|
+
* network/timeout failures; anything else (a bug in the SDK, a
|
|
422
|
+
* malformed cassette, a future SDK retry layer leaking a custom
|
|
423
|
+
* error type) falls through to `internal_error` so the runner's
|
|
424
|
+
* envelope still carries something agents can act on.
|
|
425
|
+
*/
|
|
426
|
+
export const wrapTransportError = (err) => {
|
|
427
|
+
if (err instanceof ApiError) {
|
|
428
|
+
return err;
|
|
429
|
+
}
|
|
430
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
431
|
+
const opts = { cause: err };
|
|
432
|
+
return new ApiError('internal_error', `unexpected transport error: ${message}`, opts);
|
|
433
|
+
};
|
|
434
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"err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AAC,4BAA4B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EACtD,OAAO,CACR;SACF,CAAC;IACJ,CAAC;IAED,kEAAkE;IAClE,kEAAkE;IAClE,kEAAkE;IAClE,sBAAsB;IACtB,MAAM,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,CAAM,CAAC;IACvC,OAAO;QACL,EAAE,EAAE,IAAI;QACR,IAAI;QACJ,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;KAClG,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAY,EAAY,EAAE;IAC3D,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC;IACb,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,MAAM,IAAI,GAAuB,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IAChD,OAAO,IAAI,QAAQ,CAAC,gBAAgB,EAAE,+BAA+B,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;AACxF,CAAC,CAAC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter DSL parser (`cli-design.md` §5.5, `v0.1-plan.md` §3 M4).
|
|
3
|
+
*
|
|
4
|
+
* Two surfaces, one for each `monday item list` knob:
|
|
5
|
+
*
|
|
6
|
+
* - `--where <token><op><val>` (repeatable) → parsed against §5.5's
|
|
7
|
+
* allowlist (`=`, `!=`, `~=`, `<`, `<=`, `>`, `>=`, `:is_empty`,
|
|
8
|
+
* `:is_not_empty`) and emitted as a Monday `query_params.rules`
|
|
9
|
+
* object. Multiple `--where` flags are AND'd. Token resolution
|
|
10
|
+
* reuses the M3 column read-resolver (`api/columns.ts`) so the
|
|
11
|
+
* same NFC + case-fold rules apply across read and write surfaces.
|
|
12
|
+
*
|
|
13
|
+
* - `--filter-json <json>` is the literal Monday `query_params`
|
|
14
|
+
* object — never re-parsed. Power users / agents needing OR /
|
|
15
|
+
* nested groups / `within_last(7d)` use this. v0.1's `--where`
|
|
16
|
+
* surface is intentionally narrow; `--filter-json` is the escape
|
|
17
|
+
* hatch.
|
|
18
|
+
*
|
|
19
|
+
* `--where` and `--filter-json` are **mutually exclusive**. Combining
|
|
20
|
+
* them would either force a merge rule (extra contract surface) or
|
|
21
|
+
* silently let one win — both are worse than failing fast with a
|
|
22
|
+
* `usage_error` and asking the agent to pick.
|
|
23
|
+
*
|
|
24
|
+
* **Operator-in-title trap.** When a column title contains an
|
|
25
|
+
* operator (`Plan A=B`), the implicit-resolution path can't
|
|
26
|
+
* disambiguate — `--where Plan A=B=approved` splits on the *first*
|
|
27
|
+
* `=` per §5.3 step 2.b, so the token resolves as `Plan A` and the
|
|
28
|
+
* value is `B=approved`. This is documented behaviour, not a bug.
|
|
29
|
+
* The `title:`/`id:` prefix doesn't help here either — `parseWhereSyntax`
|
|
30
|
+
* splits on the first operator before `parseColumnTokenPrefix`
|
|
31
|
+
* sees the token, so `title:Plan A=B=approved` still cleaves at
|
|
32
|
+
* the first `=`. The supported escape hatch for operator-in-title
|
|
33
|
+
* columns is `--filter-json`, where the agent passes the literal
|
|
34
|
+
* Monday `query_params` JSON; the rule's `column_id` is unambiguous
|
|
35
|
+
* and the value carries through verbatim. Codex M4 pass-2 §4
|
|
36
|
+
* surfaced this as a documentation backfill item — logged in
|
|
37
|
+
* v0.1-plan.md §3 M4 spec-gaps. The unit suite asserts the
|
|
38
|
+
* documented split verbatim so a future "be clever about it"
|
|
39
|
+
* patch fails loudly.
|
|
40
|
+
*
|
|
41
|
+
* **`me` sugar.** Per §5.5 + §5.3, `--where owner=me` against a
|
|
42
|
+
* `people` column resolves through the directory cache to the
|
|
43
|
+
* current user's ID. The resolution is a separate `whoami` query
|
|
44
|
+
* the parser issues on demand; tests inject a stub via the
|
|
45
|
+
* `resolveMe` callback so the pure-syntax layer stays
|
|
46
|
+
* unit-testable.
|
|
47
|
+
*
|
|
48
|
+
* **Result-type meta surface (§14 M3 prophylactic).** Even though
|
|
49
|
+
* filter parsing produces no network-derived data of its own
|
|
50
|
+
* (resolution is delegated to columns.ts + a `me`-resolver
|
|
51
|
+
* callback), the result type carries `warnings` from day one. The
|
|
52
|
+
* meta-source / cache-age / complexity slots travel through the
|
|
53
|
+
* board-metadata loader the caller has already opened — surfacing
|
|
54
|
+
* them again here would be redundant.
|
|
55
|
+
*/
|
|
56
|
+
import type { BoardMetadata } from './board-metadata.js';
|
|
57
|
+
import type { Warning } from '../utils/output/envelope.js';
|
|
58
|
+
/**
|
|
59
|
+
* Full set of `--where` operators per §5.5. The string is the source
|
|
60
|
+
* literal the user types; the kind is the AST tag downstream code
|
|
61
|
+
* consumes.
|
|
62
|
+
*/
|
|
63
|
+
export type FilterOperatorKind = 'equals' | 'not_equals' | 'contains_text' | 'lower_than' | 'lower_than_or_equals' | 'greater_than' | 'greater_than_or_equals' | 'is_empty' | 'is_not_empty';
|
|
64
|
+
export interface FilterOperator {
|
|
65
|
+
readonly kind: FilterOperatorKind;
|
|
66
|
+
/** The literal operator string the user typed. */
|
|
67
|
+
readonly literal: string;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the operator carries a value (`=`, `!=`, `~=`, `<`, `<=`,
|
|
70
|
+
* `>`, `>=`) or is a unary suffix (`:is_empty`, `:is_not_empty`).
|
|
71
|
+
* Drives the parser's value-extraction step.
|
|
72
|
+
*/
|
|
73
|
+
readonly arity: 'unary' | 'binary';
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Result of parsing one `--where` argument's *syntax*: the column
|
|
77
|
+
* token, operator, and (optional) value. No semantic resolution
|
|
78
|
+
* happens here — that's `buildFilterRules`'s job. Pure / synchronous
|
|
79
|
+
* by design so the unit suite can drive every adversarial input
|
|
80
|
+
* without a network mock.
|
|
81
|
+
*/
|
|
82
|
+
export interface WhereClause {
|
|
83
|
+
readonly token: string;
|
|
84
|
+
readonly operator: FilterOperator;
|
|
85
|
+
readonly value: string | undefined;
|
|
86
|
+
/** The original raw `--where` argument, kept for error messages. */
|
|
87
|
+
readonly raw: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Splits one raw `--where` argument into a {@link WhereClause}.
|
|
91
|
+
*
|
|
92
|
+
* Algorithm (left-to-right, longest-match-at-position):
|
|
93
|
+
*
|
|
94
|
+
* 1. Match `:is_not_empty` / `:is_empty` suffix on the right (with
|
|
95
|
+
* `:is_not_empty` checked first so it doesn't get truncated to
|
|
96
|
+
* the shorter form).
|
|
97
|
+
* 2. Otherwise scan position-by-position from index 1 (token must
|
|
98
|
+
* be non-empty), trying each binary operator at that position.
|
|
99
|
+
* The first match wins — earliest-leftmost-with-longest-tie-break.
|
|
100
|
+
* 3. If no operator is found, raise `UsageError`.
|
|
101
|
+
*
|
|
102
|
+
* Per §5.3 step 2.b, the split happens on the *first* operator
|
|
103
|
+
* occurrence — a column title containing an operator (`Plan A=B`)
|
|
104
|
+
* needs the explicit `title:` prefix or `--filter-json` to round-trip.
|
|
105
|
+
*/
|
|
106
|
+
export declare const parseWhereSyntax: (raw: string) => WhereClause;
|
|
107
|
+
/**
|
|
108
|
+
* Filter rule emitted to Monday's `query_params.rules` array. The
|
|
109
|
+
* rule shape is intentionally weak (`compare_value: unknown`) — the
|
|
110
|
+
* v0.1 surface only types what we actually check; future operators
|
|
111
|
+
* (between, within_last) ride through `--filter-json` until M5b
|
|
112
|
+
* needs them.
|
|
113
|
+
*/
|
|
114
|
+
export interface FilterRule {
|
|
115
|
+
readonly column_id: string;
|
|
116
|
+
readonly operator: string;
|
|
117
|
+
readonly compare_value?: unknown;
|
|
118
|
+
}
|
|
119
|
+
export interface QueryParams {
|
|
120
|
+
readonly rules: readonly FilterRule[];
|
|
121
|
+
}
|
|
122
|
+
export interface BuildFilterRulesInputs {
|
|
123
|
+
readonly metadata: BoardMetadata;
|
|
124
|
+
/**
|
|
125
|
+
* Resolves the `me` token to the current user's ID. Async because
|
|
126
|
+
* the production path issues a `me { id }` query; tests stub it
|
|
127
|
+
* synchronously. Called at most once per build call regardless of
|
|
128
|
+
* how many `me` tokens appear in the clauses.
|
|
129
|
+
*/
|
|
130
|
+
readonly resolveMe: () => Promise<string>;
|
|
131
|
+
readonly clauses: readonly WhereClause[];
|
|
132
|
+
/**
|
|
133
|
+
* Optional cache-miss refresh callback — when provided, the parser
|
|
134
|
+
* fires it once on the first `column_not_found` to retry the
|
|
135
|
+
* resolution against fresh metadata (Codex M4 §1: filters must
|
|
136
|
+
* honour §5.3 step 5). Caller should plumb `refreshBoardMetadata`
|
|
137
|
+
* here when the metadata came from cache; pass `undefined` when
|
|
138
|
+
* the metadata was already live (no refresh would help).
|
|
139
|
+
*/
|
|
140
|
+
readonly onColumnNotFound?: () => Promise<BoardMetadata>;
|
|
141
|
+
}
|
|
142
|
+
export interface BuildFilterRulesResult {
|
|
143
|
+
readonly queryParams: QueryParams | undefined;
|
|
144
|
+
readonly warnings: readonly Warning[];
|
|
145
|
+
/**
|
|
146
|
+
* `true` when `onColumnNotFound` fired — caller flips
|
|
147
|
+
* `meta.source` to `'mixed'` and emits a `stale_cache_refreshed`
|
|
148
|
+
* warning per §5.3 step 5.
|
|
149
|
+
*/
|
|
150
|
+
readonly refreshed: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Resolves each parsed `WhereClause` against the board metadata and
|
|
154
|
+
* emits the Monday `query_params` payload. Empty `clauses` →
|
|
155
|
+
* `queryParams: undefined` (caller omits the variable from the
|
|
156
|
+
* GraphQL request). Multiple clauses are AND'd by Monday's default
|
|
157
|
+
* rule-array semantics — no nested groups in v0.1.
|
|
158
|
+
*
|
|
159
|
+
* Throws `ApiError` (`column_not_found` / `ambiguous_column`) when
|
|
160
|
+
* column resolution fails — same shape `--set` will surface in M5b
|
|
161
|
+
* so agents key off the same code regardless of the read vs write
|
|
162
|
+
* channel.
|
|
163
|
+
*/
|
|
164
|
+
export declare const buildFilterRules: (inputs: BuildFilterRulesInputs) => Promise<BuildFilterRulesResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Validates a raw `--filter-json` string into a `query_params`-shaped
|
|
167
|
+
* object. Per §5.5, the payload is "never parsed; passed through as
|
|
168
|
+
* the GraphQL var" — the JSON.parse here is just a syntax check so a
|
|
169
|
+
* malformed input produces `usage_error` instead of a server-side
|
|
170
|
+
* parse error. Field-level shape validation stays on Monday's side.
|
|
171
|
+
*/
|
|
172
|
+
export declare const parseFilterJson: (raw: string) => Readonly<Record<string, unknown>>;
|
|
173
|
+
/**
|
|
174
|
+
* Top-level helper for command actions. Consumes the two raw inputs
|
|
175
|
+
* (repeatable `--where` strings + optional `--filter-json` string)
|
|
176
|
+
* and returns a single `queryParams` object suitable for splatting
|
|
177
|
+
* into the GraphQL variables.
|
|
178
|
+
*
|
|
179
|
+
* The two inputs are mutually exclusive: passing both raises
|
|
180
|
+
* `usage_error`. Either one can be empty / undefined; both empty →
|
|
181
|
+
* `queryParams: undefined`.
|
|
182
|
+
*/
|
|
183
|
+
export interface BuildQueryParamsInputs {
|
|
184
|
+
readonly metadata: BoardMetadata;
|
|
185
|
+
readonly resolveMe: () => Promise<string>;
|
|
186
|
+
readonly whereClauses: readonly string[];
|
|
187
|
+
readonly filterJson: string | undefined;
|
|
188
|
+
/** Forwarded to `buildFilterRules` — see that interface. */
|
|
189
|
+
readonly onColumnNotFound?: () => Promise<BoardMetadata>;
|
|
190
|
+
}
|
|
191
|
+
export interface BuildQueryParamsResult {
|
|
192
|
+
readonly queryParams: Readonly<Record<string, unknown>> | undefined;
|
|
193
|
+
readonly warnings: readonly Warning[];
|
|
194
|
+
/** Forwarded from `buildFilterRules`. */
|
|
195
|
+
readonly refreshed: boolean;
|
|
196
|
+
}
|
|
197
|
+
export declare const buildQueryParams: (inputs: BuildQueryParamsInputs) => Promise<BuildQueryParamsResult>;
|
|
198
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../src/api/filters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAMH,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,sBAAsB,GACtB,cAAc,GACd,wBAAwB,GACxB,UAAU,GACV,cAAc,CAAC;AAEnB,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,kDAAkD;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC;AAgCD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,WA6D9C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CA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