wezard 2.8.8 → 3.0.1
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/.claude-plugin/plugin.json +0 -6
- package/CLAUDE.md +36 -16
- package/README.md +41 -54
- package/cli/wezard.sh +3 -0
- package/config.example.jsonc +6 -8
- package/dist/cli/codex-hook.js +20 -4
- package/dist/cli/codex-hook.js.map +1 -1
- package/dist/cli/init.js +45 -8
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/skills.js +113 -0
- package/dist/cli/skills.js.map +1 -0
- package/dist/cli/sync.js +32 -112
- package/dist/cli/sync.js.map +1 -1
- package/dist/daemon/apprentice.js +75 -0
- package/dist/daemon/apprentice.js.map +1 -0
- package/dist/daemon/approval.js +78 -20
- package/dist/daemon/approval.js.map +1 -1
- package/dist/daemon/channel-context.js +69 -0
- package/dist/daemon/channel-context.js.map +1 -0
- package/dist/daemon/channel-posts.js +53 -0
- package/dist/daemon/channel-posts.js.map +1 -0
- package/dist/daemon/channel-store.js +96 -0
- package/dist/daemon/channel-store.js.map +1 -0
- package/dist/daemon/channel.js +805 -0
- package/dist/daemon/channel.js.map +1 -0
- package/dist/daemon/chat-name.js +24 -161
- package/dist/daemon/chat-name.js.map +1 -1
- package/dist/daemon/classes.js +418 -0
- package/dist/daemon/classes.js.map +1 -0
- package/dist/daemon/config-api.js +11 -3
- package/dist/daemon/config-api.js.map +1 -1
- package/dist/daemon/danger.js +24 -205
- package/dist/daemon/danger.js.map +1 -1
- package/dist/daemon/detail.js +14 -8
- package/dist/daemon/detail.js.map +1 -1
- package/dist/daemon/handoff.js +266 -50
- package/dist/daemon/handoff.js.map +1 -1
- package/dist/daemon/http.js +25 -18
- package/dist/daemon/http.js.map +1 -1
- package/dist/daemon/idle-reap.js +30 -0
- package/dist/daemon/idle-reap.js.map +1 -0
- package/dist/daemon/inbound.js +366 -143
- package/dist/daemon/inbound.js.map +1 -1
- package/dist/daemon/index.js +2232 -2616
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/last-response.js +44 -9
- package/dist/daemon/last-response.js.map +1 -1
- package/dist/daemon/memory-steward.js +1 -1
- package/dist/daemon/memory-steward.js.map +1 -1
- package/dist/daemon/message-format.js +10 -2
- package/dist/daemon/message-format.js.map +1 -1
- package/dist/daemon/mirror-bridge.js +714 -485
- package/dist/daemon/mirror-bridge.js.map +1 -1
- package/dist/daemon/mirror-store.js +24 -0
- package/dist/daemon/mirror-store.js.map +1 -1
- package/dist/daemon/notices.js +2 -2
- package/dist/daemon/notices.js.map +1 -1
- package/dist/daemon/onboarding.js +384 -0
- package/dist/daemon/onboarding.js.map +1 -0
- package/dist/daemon/outbound.js +21 -11
- package/dist/daemon/outbound.js.map +1 -1
- package/dist/daemon/peers.js +38 -230
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/pending.js +7 -5
- package/dist/daemon/pending.js.map +1 -1
- package/dist/daemon/picker-policy.js +27 -12
- package/dist/daemon/picker-policy.js.map +1 -1
- package/dist/daemon/plans.js.map +1 -1
- package/dist/daemon/room-auto-adhoc.js +18 -0
- package/dist/daemon/room-auto-adhoc.js.map +1 -0
- package/dist/daemon/room-facts.js +35 -0
- package/dist/daemon/room-facts.js.map +1 -0
- package/dist/daemon/room-hub.js +430 -0
- package/dist/daemon/room-hub.js.map +1 -0
- package/dist/daemon/room-overdue.js +98 -0
- package/dist/daemon/room-overdue.js.map +1 -0
- package/dist/daemon/room-prune.js +74 -0
- package/dist/daemon/room-prune.js.map +1 -0
- package/dist/daemon/room-spawn.js +20 -0
- package/dist/daemon/room-spawn.js.map +1 -0
- package/dist/daemon/room-watchdog.js +153 -0
- package/dist/daemon/room-watchdog.js.map +1 -0
- package/dist/daemon/rooms.js +107 -0
- package/dist/daemon/rooms.js.map +1 -0
- package/dist/daemon/route.js +7 -18
- package/dist/daemon/route.js.map +1 -1
- package/dist/daemon/spawn-tmux.js +171 -55
- package/dist/daemon/spawn-tmux.js.map +1 -1
- package/dist/daemon/steward-guard.js +2 -2
- package/dist/daemon/steward.js +132 -0
- package/dist/daemon/steward.js.map +1 -0
- package/dist/daemon/tasks.js +4 -14
- package/dist/daemon/tasks.js.map +1 -1
- package/dist/daemon/turn-opening.js +25 -0
- package/dist/daemon/turn-opening.js.map +1 -0
- package/dist/daemon/wake-tail.js +55 -0
- package/dist/daemon/wake-tail.js.map +1 -0
- package/dist/daemon/weixin-cmd.js +10 -14
- package/dist/daemon/weixin-cmd.js.map +1 -1
- package/dist/daemon/wezard-session.js +7 -2
- package/dist/daemon/wezard-session.js.map +1 -1
- package/dist/daemon/wizard-names.js +0 -22
- package/dist/daemon/wizard-names.js.map +1 -1
- package/dist/daemon/wizard.js +589 -145
- package/dist/daemon/wizard.js.map +1 -1
- package/dist/mcp/output.js +6 -5
- package/dist/mcp/output.js.map +1 -1
- package/dist/mcp/tools.js +258 -236
- package/dist/mcp/tools.js.map +1 -1
- package/dist/shared/allow-rules.js +32 -8
- package/dist/shared/allow-rules.js.map +1 -1
- package/dist/shared/charter-rearm.js +179 -0
- package/dist/shared/charter-rearm.js.map +1 -0
- package/dist/shared/chat-http.js +374 -459
- package/dist/shared/chat-http.js.map +1 -1
- package/dist/shared/chat-record.js +55 -0
- package/dist/shared/chat-record.js.map +1 -0
- package/dist/shared/chat-render.js +7 -4
- package/dist/shared/chat-render.js.map +1 -1
- package/dist/shared/chat-view.js +2 -41
- package/dist/shared/chat-view.js.map +1 -1
- package/dist/shared/cli-backends.js +27 -5
- package/dist/shared/cli-backends.js.map +1 -1
- package/dist/shared/config.js +122 -38
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/detail-render.js +104 -21
- package/dist/shared/detail-render.js.map +1 -1
- package/dist/shared/detail-store.js.map +1 -1
- package/dist/shared/group-members.js +35 -0
- package/dist/shared/group-members.js.map +1 -0
- package/dist/shared/inject-view.js +105 -0
- package/dist/shared/inject-view.js.map +1 -0
- package/dist/shared/json-map-store.js +23 -6
- package/dist/shared/json-map-store.js.map +1 -1
- package/dist/shared/legacy-routes.js +199 -0
- package/dist/shared/legacy-routes.js.map +1 -0
- package/dist/shared/mem-guard.js +32 -0
- package/dist/shared/mem-guard.js.map +1 -0
- package/dist/shared/message-footer.js +4 -3
- package/dist/shared/message-footer.js.map +1 -1
- package/dist/shared/pricing.js +5 -0
- package/dist/shared/pricing.js.map +1 -1
- package/dist/shared/reminder.js +30 -38
- package/dist/shared/reminder.js.map +1 -1
- package/dist/shared/repl-script.js +114 -26
- package/dist/shared/repl-script.js.map +1 -1
- package/dist/shared/role-render.js +209 -210
- package/dist/shared/role-render.js.map +1 -1
- package/dist/shared/role-view.js +61 -299
- package/dist/shared/role-view.js.map +1 -1
- package/dist/shared/room-label.js +13 -0
- package/dist/shared/room-label.js.map +1 -0
- package/dist/shared/room-migrate.js +404 -0
- package/dist/shared/room-migrate.js.map +1 -0
- package/dist/shared/room-overdue.js +81 -0
- package/dist/shared/room-overdue.js.map +1 -0
- package/dist/shared/room-search.js +102 -0
- package/dist/shared/room-search.js.map +1 -0
- package/dist/shared/room-view.js +261 -0
- package/dist/shared/room-view.js.map +1 -0
- package/dist/shared/room.js +610 -0
- package/dist/shared/room.js.map +1 -0
- package/dist/shared/session-hooks.js +58 -0
- package/dist/shared/session-hooks.js.map +1 -0
- package/dist/shared/session-label.js +80 -60
- package/dist/shared/session-label.js.map +1 -1
- package/dist/shared/session-mcp.js +77 -0
- package/dist/shared/session-mcp.js.map +1 -0
- package/dist/shared/session-skills.js +63 -0
- package/dist/shared/session-skills.js.map +1 -0
- package/dist/shared/skill-sync.js +229 -0
- package/dist/shared/skill-sync.js.map +1 -0
- package/dist/shared/smarts.js +39 -0
- package/dist/shared/smarts.js.map +1 -0
- package/dist/shared/stream-page.js +22 -0
- package/dist/shared/stream-page.js.map +1 -0
- package/dist/shared/task-file.js +0 -5
- package/dist/shared/task-file.js.map +1 -1
- package/dist/shared/task-template.js +1 -1
- package/dist/shared/task-template.js.map +1 -1
- package/dist/shared/tool-hints.js +76 -17
- package/dist/shared/tool-hints.js.map +1 -1
- package/dist/shared/workspace-trust.js +8 -0
- package/dist/shared/workspace-trust.js.map +1 -1
- package/dist/shared/world.js +101 -166
- package/dist/shared/world.js.map +1 -1
- package/dist/svr/facts-store.js +26 -0
- package/dist/svr/facts-store.js.map +1 -0
- package/dist/svr/index.js +62 -6
- package/dist/svr/index.js.map +1 -1
- package/hooks/pre-tool-use.sh +18 -0
- package/hooks/stop.sh +26 -0
- package/package.json +7 -3
- package/scripts/install.sh +11 -0
- package/skills/LICENSE.wecom-unified.txt +21 -0
- package/skills/wecom-unified/SKILL.md +151 -0
- package/skills/wecom-unified/assets/templates/broadside/DESIGN.preset.md +172 -0
- package/skills/wecom-unified/assets/templates/broadside/shell/content.jsx +31 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/01_cover.slide +48 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/02_section.slide +58 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/03_cards.slide +53 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/04_image.slide +64 -0
- package/skills/wecom-unified/assets/templates/cartesian/DESIGN.preset.md +139 -0
- package/skills/wecom-unified/assets/templates/cartesian/shell/content.jsx +28 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/01_cover.slide +44 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/02_compare.slide +79 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/03_table.slide +79 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/DESIGN.preset.md +118 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/shell/content.jsx +24 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/01_cover.slide +61 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/02_structure.slide +85 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/03_data.slide +60 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/DESIGN.preset.md +135 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/shell/content.jsx +19 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/01_cover.slide +29 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/02_cards.slide +60 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/03_data.slide +49 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/04_image.slide +46 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/DESIGN.preset.md +119 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/01_cover.slide +36 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/02_section.slide +39 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/03_data.slide +79 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/04_steps.slide +53 -0
- package/skills/wecom-unified/assets/templates/grove/DESIGN.preset.md +159 -0
- package/skills/wecom-unified/assets/templates/grove/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/grove/shell/content_light.jsx +18 -0
- package/skills/wecom-unified/assets/templates/grove/slides/01_cover.slide +26 -0
- package/skills/wecom-unified/assets/templates/grove/slides/02_compare.slide +92 -0
- package/skills/wecom-unified/assets/templates/grove/slides/03_table.slide +68 -0
- package/skills/wecom-unified/assets/templates/index.json +280 -0
- package/skills/wecom-unified/assets/templates/long-table/DESIGN.preset.md +135 -0
- package/skills/wecom-unified/assets/templates/long-table/shell/content.jsx +36 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/01_cover.slide +71 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/02_cards.slide +72 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/03_timeline.slide +81 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/04_image.slide +60 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/DESIGN.preset.md +121 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/shell/content.jsx +13 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/01_cover.slide +54 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/02_products.slide +134 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/03_section.slide +30 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/04_schedule.slide +65 -0
- package/skills/wecom-unified/assets/templates/signal/DESIGN.preset.md +121 -0
- package/skills/wecom-unified/assets/templates/signal/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/signal/shell/content_dark.jsx +23 -0
- package/skills/wecom-unified/assets/templates/signal/slides/01_cover.slide +48 -0
- package/skills/wecom-unified/assets/templates/signal/slides/02_cards.slide +67 -0
- package/skills/wecom-unified/assets/templates/signal/slides/03_data.slide +68 -0
- package/skills/wecom-unified/references/wecomcli-calendar-agenda.md +227 -0
- package/skills/wecom-unified/references/wecomcli-calendar-cancel.md +108 -0
- package/skills/wecom-unified/references/wecomcli-calendar-create.md +238 -0
- package/skills/wecom-unified/references/wecomcli-calendar-freebusy.md +207 -0
- package/skills/wecom-unified/references/wecomcli-calendar-meeting-room.md +170 -0
- package/skills/wecom-unified/references/wecomcli-calendar-search.md +209 -0
- package/skills/wecom-unified/references/wecomcli-calendar-update.md +272 -0
- package/skills/wecom-unified/references/wecomcli-calendar.md +296 -0
- package/skills/wecom-unified/references/wecomcli-contact.md +48 -0
- package/skills/wecom-unified/references/wecomcli-disk.md +380 -0
- package/skills/wecom-unified/references/wecomcli-doc-contents-append.md +20 -0
- package/skills/wecom-unified/references/wecomcli-doc-contents-overwrite.md +27 -0
- package/skills/wecom-unified/references/wecomcli-doc-create.md +162 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-members-update.md +24 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-names-update.md +20 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-rules-update.md +22 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage.md +127 -0
- package/skills/wecom-unified/references/wecomcli-doc.md +135 -0
- package/skills/wecom-unified/references/wecomcli-email-forward-mail.md +131 -0
- package/skills/wecom-unified/references/wecomcli-email-get-mail.md +187 -0
- package/skills/wecom-unified/references/wecomcli-email-reply-mail.md +138 -0
- package/skills/wecom-unified/references/wecomcli-email-search-mail.md +114 -0
- package/skills/wecom-unified/references/wecomcli-email-security.md +52 -0
- package/skills/wecom-unified/references/wecomcli-email-send-mail.md +186 -0
- package/skills/wecom-unified/references/wecomcli-email-send-schedule.md +83 -0
- package/skills/wecom-unified/references/wecomcli-email.md +206 -0
- package/skills/wecom-unified/references/wecomcli-media.md +89 -0
- package/skills/wecom-unified/references/wecomcli-meeting-cancel.md +113 -0
- package/skills/wecom-unified/references/wecomcli-meeting-create.md +167 -0
- package/skills/wecom-unified/references/wecomcli-meeting-list.md +228 -0
- package/skills/wecom-unified/references/wecomcli-meeting-original-get.md +101 -0
- package/skills/wecom-unified/references/wecomcli-meeting-search.md +176 -0
- package/skills/wecom-unified/references/wecomcli-meeting-update.md +217 -0
- package/skills/wecom-unified/references/wecomcli-meeting.md +366 -0
- package/skills/wecom-unified/references/wecomcli-message.md +190 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-animation.md +62 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-box.md +102 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-chart.md +261 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-codeblock.md +70 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-diagram.md +54 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-faicon.md +71 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-hyperlink.md +55 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-image.md +107 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-math.md +65 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-qrcode.md +22 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-slide.md +74 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-svg.md +95 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-table.md +72 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-text.md +96 -0
- package/skills/wecom-unified/references/wecomcli-pptx-content-contract.md +73 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-material.md +67 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-scratch.md +178 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-template.md +123 -0
- package/skills/wecom-unified/references/wecomcli-pptx-design-principle.md +65 -0
- package/skills/wecom-unified/references/wecomcli-pptx-government-contract.md +40 -0
- package/skills/wecom-unified/references/wecomcli-pptx-human-alignment.md +140 -0
- package/skills/wecom-unified/references/wecomcli-pptx-pptx-api.md +161 -0
- package/skills/wecom-unified/references/wecomcli-pptx-pptx-edit.md +37 -0
- package/skills/wecom-unified/references/wecomcli-pptx-story-principle.md +184 -0
- package/skills/wecom-unified/references/wecomcli-pptx-templates-README.md +165 -0
- package/skills/wecom-unified/references/wecomcli-pptx-templates-anti-ai-slop.md +52 -0
- package/skills/wecom-unified/references/wecomcli-pptx.md +158 -0
- package/skills/wecom-unified/references/wecomcli-sheet-conditional-formatting.md +203 -0
- package/skills/wecom-unified/references/wecomcli-sheet-filter.md +179 -0
- package/skills/wecom-unified/references/wecomcli-sheet-float-image.md +235 -0
- package/skills/wecom-unified/references/wecomcli-sheet-formulas.md +71 -0
- package/skills/wecom-unified/references/wecomcli-sheet-history.md +118 -0
- package/skills/wecom-unified/references/wecomcli-sheet-protection.md +170 -0
- package/skills/wecom-unified/references/wecomcli-sheet-range-operations.md +306 -0
- package/skills/wecom-unified/references/wecomcli-sheet-read-data.md +151 -0
- package/skills/wecom-unified/references/wecomcli-sheet-search-replace.md +121 -0
- package/skills/wecom-unified/references/wecomcli-sheet-structure-operations.md +394 -0
- package/skills/wecom-unified/references/wecomcli-sheet-style.md +246 -0
- package/skills/wecom-unified/references/wecomcli-sheet-table-style.md +199 -0
- package/skills/wecom-unified/references/wecomcli-sheet-validation.md +217 -0
- package/skills/wecom-unified/references/wecomcli-sheet-visual-standards.md +166 -0
- package/skills/wecom-unified/references/wecomcli-sheet-workbook.md +264 -0
- package/skills/wecom-unified/references/wecomcli-sheet-write-cells.md +320 -0
- package/skills/wecom-unified/references/wecomcli-sheet-xlsx-process.md +324 -0
- package/skills/wecom-unified/references/wecomcli-sheet.md +96 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-data-driven-pages.md +50 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-edit.md +526 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-arraylist.md +369 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-datetime.md +283 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-logic.md +247 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-math.md +362 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-operators.md +246 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-pageblock.md +76 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-reference.md +192 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-templates.md +410 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-text.md +377 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-user.md +22 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-mdx-syntax.md +739 -0
- package/skills/wecom-unified/references/wecomcli-smartpage.md +179 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-chart-types.md +95 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-common.md +160 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-edit.md +609 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-field-types.md +438 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-formula.md +845 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-read.md +411 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-record-values.md +218 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-ai_efficiency.md +709 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-connect_to_app.md +380 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-financial_accounting.md +369 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-hr_and_administration.md +475 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-ledger_records.md +156 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-manufacturing.md +395 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-marketing.md +186 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-office_essentials.md +299 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-personal_efficiency.md +70 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-procurement_logistics.md +325 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-project_management.md +564 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_customer.md +222 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_ops.md +105 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_project.md +109 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_research.md +92 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-sales_and_operations.md +446 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-store_management.md +431 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-team_tasks.md +274 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-wechat_customer.md +384 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-work_report.md +100 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-templates.md +53 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-view-types.md +373 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-webhook-examples.md +176 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-webhook.md +186 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet.md +147 -0
- package/skills/wecom-unified/references/wecomcli-todo-create.md +137 -0
- package/skills/wecom-unified/references/wecomcli-todo-delete.md +63 -0
- package/skills/wecom-unified/references/wecomcli-todo-finish.md +72 -0
- package/skills/wecom-unified/references/wecomcli-todo-get.md +69 -0
- package/skills/wecom-unified/references/wecomcli-todo-list.md +136 -0
- package/skills/wecom-unified/references/wecomcli-todo-update.md +112 -0
- package/skills/wecom-unified/references/wecomcli-todo.md +68 -0
- package/skills/wecom-unified/scripts/build_docx.py +1274 -0
- package/skills/wecom-unified/scripts/build_page.py +2449 -0
- package/skills/wecom-unified/scripts/collect.py +868 -0
- package/skills/wecom-unified/scripts/doc_image_extractor.py +498 -0
- package/skills/wecom-unified/scripts/pptx2image.py +268 -0
- package/skills/wecom-unified/scripts/recalc.py +403 -0
- package/systemd/wezard.service.template +6 -0
- package/web/chat.css +70 -273
- package/web/chat.js +2228 -2190
- package/dist/daemon/chat-log.js +0 -130
- package/dist/daemon/chat-log.js.map +0 -1
- package/dist/daemon/dispatch.js +0 -6
- package/dist/daemon/dispatch.js.map +0 -1
- package/dist/daemon/idle-nudge.js +0 -69
- package/dist/daemon/idle-nudge.js.map +0 -1
- package/dist/daemon/message-events.js +0 -1083
- package/dist/daemon/message-events.js.map +0 -1
- package/dist/daemon/pending-items.js +0 -160
- package/dist/daemon/pending-items.js.map +0 -1
- package/dist/daemon/router.js +0 -742
- package/dist/daemon/router.js.map +0 -1
- package/dist/daemon/tips.js +0 -25
- package/dist/daemon/tips.js.map +0 -1
- package/dist/daemon/wedoc.js +0 -210
- package/dist/daemon/wedoc.js.map +0 -1
- package/dist/shared/role-search.js +0 -100
- package/dist/shared/role-search.js.map +0 -1
- package/dist/shared/startup-notice.js +0 -21
- package/dist/shared/startup-notice.js.map +0 -1
- package/dist/shared/turn-state.js +0 -27
- package/dist/shared/turn-state.js.map +0 -1
- package/hooks/hooks.json +0 -16
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# 表格样式操作
|
|
2
|
+
|
|
3
|
+
对指定 A1 区域设置或清除单元格样式、边框与自动换行。
|
|
4
|
+
|
|
5
|
+
## 使用场景
|
|
6
|
+
|
|
7
|
+
| 操作需求 | CLI | 说明 |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| 设置单元格样式 | `sheet style set` | "表头加粗居中"、"金额列两位小数"、"标题字号 14" |
|
|
10
|
+
| 还原默认样式 | `sheet style clear` | "清掉这块的格式"、"恢复默认样式" |
|
|
11
|
+
| 设置区域边框 | `sheet border set` | "加全框"、"只加外边框"、"加内部横线" |
|
|
12
|
+
| 清除区域边框 | `sheet border clear` | "去掉边框" |
|
|
13
|
+
| 设置自动换行 | `sheet autotab set` | "让这块内容自动换行" |
|
|
14
|
+
| 取消自动换行 | `sheet autotab delete` | "取消这块的自动换行" |
|
|
15
|
+
|
|
16
|
+
## 设置单元格样式
|
|
17
|
+
|
|
18
|
+
对 A1 区域应用字体 / 颜色 / 对齐 / 数字格式等样式。
|
|
19
|
+
|
|
20
|
+
### 命令
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
wecom-cli sheet style set --json '<JSON>'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 入参
|
|
27
|
+
|
|
28
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
29
|
+
| --- | --- | --- |----------------------------------------------------------------------------------------------------|
|
|
30
|
+
| `docid` | `string` | 是 | 在线表格 ID |
|
|
31
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
32
|
+
| `range` | `string` | 是 | 设置的 A1 区域 |
|
|
33
|
+
| `font_family` | `string` | 否 | 字体名 |
|
|
34
|
+
| `font_size` | `int` | 否 | 字号 pt |
|
|
35
|
+
| `bold` | `bool` | 否 | 粗体 |
|
|
36
|
+
| `italic` | `bool` | 否 | 斜体 |
|
|
37
|
+
| `underline` | `string` | 否 | `none` / `single` / `double` / `single_accounting` / `double_accounting` |
|
|
38
|
+
| `strike` | `bool` | 否 | 删除线 |
|
|
39
|
+
| `font_color` | `string` | 否 | 字体色 ARGB hex |
|
|
40
|
+
| `bg_color` | `string` | 否 | 背景色 ARGB hex |
|
|
41
|
+
| `horizontal_align` | `string` | 否 | `general` / `left` / `center` / `right` / `fill` / `justify` / `center_continuous` / `distributed` |
|
|
42
|
+
| `vertical_align` | `string` | 否 | `top` / `center` / `bottom` / `justify` / `distributed` |
|
|
43
|
+
| `wrap` | `bool` | 否 | 自动换行 |
|
|
44
|
+
| `number_format` | `string` | 否 | Excel Number Format Code,如 `0.00%` / `#,##0` / `yyyy-mm-dd`。传 `""` 清除格式,不传保持原值 |
|
|
45
|
+
| `dry_run` | `bool` | 否 | 预览不执行 |
|
|
46
|
+
|
|
47
|
+
### 出参
|
|
48
|
+
|
|
49
|
+
| 字段 | 类型 | 说明 |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `affected_range` | `string` | 应用样式区域 A1 |
|
|
52
|
+
| `style_count` | `int` | 应用样式的单元格数 |
|
|
53
|
+
|
|
54
|
+
**示例:**
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# 表头加粗居中、黄底黑字
|
|
58
|
+
wecom-cli sheet style set --json '{
|
|
59
|
+
"docid": "e3_ABC123",
|
|
60
|
+
"sheet": "销售",
|
|
61
|
+
"range": "A1:B1",
|
|
62
|
+
"font_family": "Microsoft YaHei",
|
|
63
|
+
"font_size": 12,
|
|
64
|
+
"bold": true,
|
|
65
|
+
"font_color": "FF000000",
|
|
66
|
+
"bg_color": "FFFFFF00",
|
|
67
|
+
"horizontal_align": "center"
|
|
68
|
+
}'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 使用规则
|
|
72
|
+
|
|
73
|
+
- **未传即保持原值**:所有可选样式字段只传要改的;`number_format` 传 `""` 清除格式,不传保持原值。不需要构造完整样式对象整体下发。
|
|
74
|
+
- **颜色 ARGB hex**:`font_color` / `bg_color` 用 8 位 ARGB(前 2 位 alpha),如 `FFFF0000` 不透明红、`FFFFFF00` 不透明黄。
|
|
75
|
+
|
|
76
|
+
## 清除区域单元格样式
|
|
77
|
+
|
|
78
|
+
破坏性操作,必须传 `yes` 确认;建议先 `dry_run` 预览,确认后带 `yes` 执行。
|
|
79
|
+
|
|
80
|
+
### 命令
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
wecom-cli sheet style clear --json '<JSON>'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 入参
|
|
87
|
+
|
|
88
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
89
|
+
| --- | --- | --- |------------|
|
|
90
|
+
| `docid` | `string` | 是 | 表格 ID |
|
|
91
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
92
|
+
| `range` | `string` | 是 | 纯 A1 区域 |
|
|
93
|
+
| `yes` | `bool` | 是 | 确认执行(缺省拒绝) |
|
|
94
|
+
| `dry_run` | `bool` | 否 | 预览不执行 |
|
|
95
|
+
|
|
96
|
+
### 出参
|
|
97
|
+
|
|
98
|
+
| 字段 | 类型 | 说明 |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| `cleared_range` | `string` | 清除样式区域 A1 |
|
|
101
|
+
| `cleared_count` | `int` | 清除样式的单元格数 |
|
|
102
|
+
|
|
103
|
+
## 设置单元格边框
|
|
104
|
+
|
|
105
|
+
可同时设外框 + 内部线,也可只设外框或只设内部线。
|
|
106
|
+
|
|
107
|
+
### 命令
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
wecom-cli sheet border set --json '<JSON>'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 入参
|
|
114
|
+
|
|
115
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
116
|
+
| --- | --- | --- | --- |
|
|
117
|
+
| `docid` | `string` | 是 | 表格 ID |
|
|
118
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
119
|
+
| `range` | `string` | 是 | 纯 A1 区域 |
|
|
120
|
+
| `positions` | `string[]` | 否 | 边框方位:`outer` / `top` / `bottom` / `left` / `right` / `inner_horizontal` / `inner_vertical` / `diagonal_up` / `diagonal_down`。`outer` 一次设置区域四个方向外边框,等价于 `top` + `bottom` + `left` + `right`;**缺省四边外框** |
|
|
121
|
+
| `style` | `string` | 否 | 线型:`none` / `thin` / `medium` / `dashed` / `dotted` / `thick` / `double` / `hair`,默认 `thin` |
|
|
122
|
+
| `color` | `string` | 否 | 边框色 ARGB hex,默认黑色 |
|
|
123
|
+
| `dry_run` | `bool` | 否 | 预览不执行 |
|
|
124
|
+
|
|
125
|
+
### 出参
|
|
126
|
+
|
|
127
|
+
| 字段 | 类型 | 说明 |
|
|
128
|
+
| --- | --- | --- |
|
|
129
|
+
| `affected_range` | `string` | 应用边框区域 A1 |
|
|
130
|
+
| `positions` | `string[]` | 实际生效的方位集合 |
|
|
131
|
+
| `style` | `string` | 实际生效的线型 |
|
|
132
|
+
|
|
133
|
+
**示例:**
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# 只给 A1:F20 加四个方向外边框
|
|
137
|
+
wecom-cli sheet border set --json '{
|
|
138
|
+
"docid": "e3_ABC123",
|
|
139
|
+
"sheet": "销售",
|
|
140
|
+
"range": "A1:F20",
|
|
141
|
+
"positions": ["outer"],
|
|
142
|
+
"style": "thin",
|
|
143
|
+
"color": "FF85888C"
|
|
144
|
+
}'
|
|
145
|
+
|
|
146
|
+
# 给 A1:F20 加全框(四边外框 + 内部横竖线)
|
|
147
|
+
wecom-cli sheet border set --json '{
|
|
148
|
+
"docid": "e3_ABC123",
|
|
149
|
+
"sheet": "销售",
|
|
150
|
+
"range": "A1:F20",
|
|
151
|
+
"positions": ["outer", "inner_horizontal", "inner_vertical"],
|
|
152
|
+
"style": "thin",
|
|
153
|
+
"color": "FF000000"
|
|
154
|
+
}'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### 使用规则
|
|
158
|
+
|
|
159
|
+
- **外边框优先用 `outer`**:需要整块区域四边外框时传 `["outer"]`,不要逐个列出 `top` / `bottom` / `left` / `right`;`outer` 只作用于区域外围,不产生内部横竖线。
|
|
160
|
+
- **按需组合内部线**:需要内部线时在 `outer` 基础上追加 `inner_horizontal` / `inner_vertical`。
|
|
161
|
+
|
|
162
|
+
## 清除单元格边框
|
|
163
|
+
|
|
164
|
+
破坏性操作,必须传 `yes` 确认;不传 `positions` 即清除全部方位,传 `positions` 只清指定方位。
|
|
165
|
+
|
|
166
|
+
### 命令
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
wecom-cli sheet border clear --json '<JSON>'
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 入参
|
|
173
|
+
|
|
174
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
175
|
+
| --- | --- | --- | --- |
|
|
176
|
+
| `docid` | `string` | 是 | 表格 ID |
|
|
177
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
178
|
+
| `range` | `string` | 是 | 纯 A1 区域 |
|
|
179
|
+
| `positions` | `string[]` | 否 | 要清除的方位集合(方位取值同 `border set`),**缺省清除全部方位** |
|
|
180
|
+
| `yes` | `bool` | 是 | 确认执行(缺省拒绝) |
|
|
181
|
+
| `dry_run` | `bool` | 否 | 预览不执行 |
|
|
182
|
+
|
|
183
|
+
### 出参
|
|
184
|
+
|
|
185
|
+
| 字段 | 类型 | 说明 |
|
|
186
|
+
| --- | --- | --- |
|
|
187
|
+
| `cleared_range` | `string` | 清除边框区域 A1 |
|
|
188
|
+
| `positions` | `string[]` | 实际清除的方位集合 |
|
|
189
|
+
|
|
190
|
+
**示例:**
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# 清除全部边框
|
|
194
|
+
wecom-cli sheet border clear --json '{
|
|
195
|
+
"docid": "e3_ABC123",
|
|
196
|
+
"sheet": "销售",
|
|
197
|
+
"range": "A1:F20",
|
|
198
|
+
"yes": true
|
|
199
|
+
}'
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## 设置自动换行
|
|
203
|
+
|
|
204
|
+
### 命令
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
wecom-cli sheet autotab set --json '<JSON>'
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 入参
|
|
211
|
+
|
|
212
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
213
|
+
| --- | --- | --- | --- |
|
|
214
|
+
| `docid` | `string` | 是 | 表格 ID |
|
|
215
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
216
|
+
| `range` | `string` | 是 | 设置自动换行的纯 A1 区域 |
|
|
217
|
+
|
|
218
|
+
### 出参
|
|
219
|
+
|
|
220
|
+
| 字段 | 类型 | 说明 |
|
|
221
|
+
| --- | --- | --- |
|
|
222
|
+
| `affected_range` | `string` | 实际设置自动换行的区域 A1 |
|
|
223
|
+
| `style_count` | `int` | 应用样式的单元格数 |
|
|
224
|
+
|
|
225
|
+
## 取消单元格自动换行
|
|
226
|
+
|
|
227
|
+
### 命令
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
wecom-cli sheet autotab delete --json '<JSON>'
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### 入参
|
|
234
|
+
|
|
235
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
236
|
+
| --- | --- | --- | --- |
|
|
237
|
+
| `docid` | `string` | 是 | 表格 ID |
|
|
238
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
239
|
+
| `range` | `string` | 是 | 取消自动换行的纯 A1 区域 |
|
|
240
|
+
|
|
241
|
+
### 出参
|
|
242
|
+
|
|
243
|
+
| 字段 | 类型 | 说明 |
|
|
244
|
+
| --- | --- | --- |
|
|
245
|
+
| `affected_range` | `string` | 实际取消自动换行的区域 A1 |
|
|
246
|
+
| `style_count` | `int32` | 应用样式的单元格数 |
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# 表格样式 — `wecom-cli sheet table style add` / `update` / `delete` / `list`
|
|
2
|
+
|
|
3
|
+
对**在线表格**中的连续 A1 区域套用、修改、删除或查询内置表格样式。表格样式是独立对象,包含标题行、首列 / 末列强调、筛选按钮及各部位颜色等配置;它不同于 `sheet style set` 的普通单元格字体 / 填充 / 对齐,也不同于条件格式规则。
|
|
4
|
+
|
|
5
|
+
> **依赖关系**:`sheet` 使用子表 ID 或名称;`range` 一律使用纯 A1,不包含子表名。创建前先定位真实数据区域,避免把空白尾行尾列纳入表格样式范围。
|
|
6
|
+
|
|
7
|
+
## 使用场景
|
|
8
|
+
|
|
9
|
+
| 操作需求 | CLI | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| 给一块数据套用内置表格样式 | `sheet table style add` | 如“给 A1:D10 套用蓝色隔行填充,保留标题行和筛选按钮” |
|
|
12
|
+
| 修改已有表格样式 | `sheet table style update` | 按 `tab_style_id` 修改标题行、首末列强调、筛选按钮或各部位颜色 |
|
|
13
|
+
| 删除已有表格样式 | `sheet table style delete` | 可选择是否保留单元格当前呈现出来的格式 |
|
|
14
|
+
| 查询表格样式 | `sheet table style list` | 按子表、区域查询已有表格样式|
|
|
15
|
+
|
|
16
|
+
## 定位前置检查
|
|
17
|
+
|
|
18
|
+
1. 先用 `wecomcli-sheet-workbook.md` 或 `wecomcli-sheet-read-data.md` 确认目标子表和真实数据范围。
|
|
19
|
+
2. 用户按“表头”“数据区”“整张表”描述时,先读取数据确定精确 A1 区域,再调用 `table style add`。
|
|
20
|
+
3. 更新或删除时优先通过 `table style list` 获取稳定 `tab_style_id`,不要按返回顺序或外观盲选。
|
|
21
|
+
4. 表格样式和普通单元格样式可以并存。用户要求“套用表格格式”时用本文件;只改字体、底色、边框时用 `wecomcli-sheet-style.md`。
|
|
22
|
+
|
|
23
|
+
## 自定义颜色
|
|
24
|
+
|
|
25
|
+
创建和更新时可按部位覆盖表格样式颜色:`header_fill_color`、`band_fill_color`、`second_band_fill_color`、`row_band_border_color`、`column_band_border_color`、`first_column_fill_color`、`outer_border_color`。颜色统一使用 `#RRGGBB`,同时兼容不透明 ARGB `FFRRGGBB`;未传时使用接口默认颜色。第一、第二条纹填充色交替作用于正文条纹,隔行线和隔列线颜色分别控制行间横线和列间竖线。
|
|
26
|
+
|
|
27
|
+
## 新增表格样式 — `wecom-cli sheet table style add`
|
|
28
|
+
|
|
29
|
+
### 命令
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
wecom-cli sheet table style add --json '<JSON 参数>'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 参数
|
|
36
|
+
|
|
37
|
+
| 字段 | 类型 | 必填 | 默认值 | 语义 |
|
|
38
|
+
|---|---|---|---|---|
|
|
39
|
+
| `docid` | string | 是 | — | 在线表格 ID / URL,仅支持 sheet 类型文档 |
|
|
40
|
+
| `sheet` | string | 是 | — | 子表 ID 或名称 |
|
|
41
|
+
| `range` | string | 是 | — | 要套用表格样式的目标区域,纯 A1,如 `A1:D10`;区域至少包含标题行和一行数据 |
|
|
42
|
+
| `header_row` | bool | 否 | `true` | 是否把首行作为标题行 |
|
|
43
|
+
| `filter_button` | bool | 否 | `true` | 是否显示标题行筛选按钮 |
|
|
44
|
+
| `dry_run` | bool | 否 | `false` | 是否仅预览结果、不落盘 |
|
|
45
|
+
| `header_fill_color` | string | 否 | 接口默认颜色 | 标题行填充色,格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
46
|
+
| `band_fill_color` | string | 否 | 接口默认颜色 | 第一条纹填充色,与 `second_band_fill_color` 交替作用于正文条纹;格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
47
|
+
| `second_band_fill_color` | string | 否 | 接口默认颜色 | 第二条纹填充色,与 `band_fill_color` 交替作用于正文条纹;格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
48
|
+
| `row_band_border_color` | string | 否 | 接口默认颜色 | 隔行线色(行间横线),格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
49
|
+
| `column_band_border_color` | string | 否 | 接口默认颜色 | 隔列线色(列间竖线),格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
50
|
+
| `first_column_fill_color` | string | 否 | 接口默认颜色 | 标题列(首列强调)填充色,格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
51
|
+
| `outer_border_color` | string | 否 | 接口默认颜色 | 表格外边框色,格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
52
|
+
|
|
53
|
+
### 返回
|
|
54
|
+
|
|
55
|
+
| 字段 | 类型 | 说明 |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `tab_style_id` | string | 新建表格样式 ID,后续更新 / 删除使用 |
|
|
58
|
+
| `range` | string | 实际生效区域,纯 A1 |
|
|
59
|
+
| `header_fill_color` | string | 实际生效的标题行填充色;非自定义颜色时不返回 |
|
|
60
|
+
| `band_fill_color` | string | 实际生效的第一条纹填充色;非自定义颜色时不返回 |
|
|
61
|
+
| `second_band_fill_color` | string | 实际生效的第二条纹填充色;非自定义颜色时不返回 |
|
|
62
|
+
| `row_band_border_color` | string | 实际生效的隔行线色;非自定义颜色时不返回 |
|
|
63
|
+
| `column_band_border_color` | string | 实际生效的隔列线色;非自定义颜色时不返回 |
|
|
64
|
+
| `first_column_fill_color` | string | 实际生效的标题列(首列强调)填充色;非自定义颜色时不返回 |
|
|
65
|
+
| `outer_border_color` | string | 实际生效的表格外边框色;非自定义颜色时不返回 |
|
|
66
|
+
|
|
67
|
+
### 示例
|
|
68
|
+
|
|
69
|
+
创建带自定义标题行、双色条纹和边框颜色的表格样式,保留标题行和筛选按钮,不强调首列或末列:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
wecom-cli sheet table style add --json '{"docid":"REAL_SHEET_DOCID","sheet":"Sheet1","range":"A1:D10","header_row":true,"first_column":false,"last_column":false,"filter_button":true,"dry_run":false,"header_fill_color":"#D4E5FC","band_fill_color":"#FFFFFF","second_band_fill_color":"#E4F9FE","row_band_border_color":"#DCE3ED","column_band_border_color":"#DCE3ED","outer_border_color":"#BAC8DA"}'
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 使用规则
|
|
76
|
+
|
|
77
|
+
- **区域要先定位**:不要直接把子表已用范围全部套样式,除非用户明确要求整张已用区域。
|
|
78
|
+
- **创建后保存 ID**:后续修改或删除必须使用 `tab_style_id`;同一子表中可以有多个表格样式对象。
|
|
79
|
+
- **标题行语义**:`header_row=true` 时区域首行会作为表头参与样式和筛选按钮逻辑;不应把标题外的说明行纳入 `range`。
|
|
80
|
+
- **自定义颜色按部位覆盖**:仅传需要覆盖的颜色字段;未传字段使用接口默认颜色。`band_fill_color` 与 `second_band_fill_color` 交替作用于正文条纹;`row_band_border_color` 控制行间横线,`column_band_border_color` 控制列间竖线。
|
|
81
|
+
- **预览后落盘**:需要先确认效果时传 `dry_run=true`;确认后用同一组参数改为 `dry_run=false` 正式创建。
|
|
82
|
+
|
|
83
|
+
## 修改表格样式 — `wecom-cli sheet table style update`
|
|
84
|
+
|
|
85
|
+
### 命令
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
wecom-cli sheet table style update --json '<JSON 参数>'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 参数
|
|
92
|
+
|
|
93
|
+
| 字段 | 类型 | 必填 | 默认值 | 语义 |
|
|
94
|
+
|---|---|---|---|---|
|
|
95
|
+
| `docid` | string | 是 | — | 在线表格 ID / URL,仅支持 sheet 类型文档 |
|
|
96
|
+
| `sheet` | string | 是 | — | 子表 ID 或名称 |
|
|
97
|
+
| `tab_style_id` | string | 是 | — | 表格样式 ID;由 `table style add` 或 `table style list` 获得 |
|
|
98
|
+
| `header_row` | bool | 否 | 沿用当前状态 | 是否把首行作为标题行 |
|
|
99
|
+
| `first_column` | bool | 否 | `false` | 是否强调首列 |
|
|
100
|
+
| `last_column` | bool | 否 | `false` | 是否强调末列 |
|
|
101
|
+
| `filter_button` | bool | 否 | `true` | 是否显示标题行筛选按钮 |
|
|
102
|
+
| `dry_run` | bool | 否 | `false` | 是否仅预览结果、不落盘 |
|
|
103
|
+
| `header_fill_color` | string | 否 | 接口默认颜色 | 标题行填充色,格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
104
|
+
| `band_fill_color` | string | 否 | 接口默认颜色 | 第一条纹填充色,与 `second_band_fill_color` 交替作用于正文条纹;格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
105
|
+
| `second_band_fill_color` | string | 否 | 接口默认颜色 | 第二条纹填充色,与 `band_fill_color` 交替作用于正文条纹;格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
106
|
+
| `row_band_border_color` | string | 否 | 接口默认颜色 | 隔行线色(行间横线),格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
107
|
+
| `column_band_border_color` | string | 否 | 接口默认颜色 | 隔列线色(列间竖线),格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
108
|
+
| `first_column_fill_color` | string | 否 | 接口默认颜色 | 标题列(首列强调)填充色,格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
109
|
+
| `outer_border_color` | string | 否 | 接口默认颜色 | 表格外边框色,格式为 `#RRGGBB`,兼容不透明 ARGB `FFRRGGBB` |
|
|
110
|
+
|
|
111
|
+
### 返回
|
|
112
|
+
|
|
113
|
+
| 字段 | 类型 | 说明 |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `tab_style_id` | string | 被修改的表格样式 ID |
|
|
116
|
+
| `range` | string | 表格当前区域,纯 A1 |
|
|
117
|
+
|
|
118
|
+
### 示例
|
|
119
|
+
|
|
120
|
+
将已有对象更新为绿色主题的自定义标题行、双色条纹和边框颜色,保留标题行,不强调首列或末列:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
wecom-cli sheet table style update --json '{"docid":"REAL_SHEET_DOCID","sheet":"Sheet1","tab_style_id":"table_style_abc123","header_row":true,"first_column":false,"last_column":false,"filter_button":true,"dry_run":false,"header_fill_color":"#D2EED8","band_fill_color":"#FFFFFF","second_band_fill_color":"#F4FCF6","row_band_border_color":"#DCE8E0","column_band_border_color":"#DCE8E0","outer_border_color":"#B9D1C1"}'
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 使用规则
|
|
127
|
+
|
|
128
|
+
- **先查后改**:调用前先用 `table style list` 确认 `tab_style_id` 和当前区域。
|
|
129
|
+
- **传最终期望状态**:建议显式传入 `first_column`、`last_column`、`filter_button` 以及所需颜色字段的最终期望值;除 `header_row` 省略时沿用当前状态外,其余配置字段省略时均使用默认值,不会沿用原配置。
|
|
130
|
+
- **自定义颜色按部位覆盖**:仅传需要覆盖的颜色字段;未传字段使用接口默认颜色。`band_fill_color` 与 `second_band_fill_color` 交替作用于正文条纹;`row_band_border_color` 控制行间横线,`column_band_border_color` 控制列间竖线。
|
|
131
|
+
- **预览后落盘**:需要先确认效果时传 `dry_run=true`;确认后用同一组参数改为 `dry_run=false` 正式更新。
|
|
132
|
+
- **原地修改**:修改标题行、首末列强调、筛选按钮或各部位颜色时使用 update,不要删除后重建,以免丢失对象 ID 或影响用户已建立的引用。
|
|
133
|
+
|
|
134
|
+
## 删除表格样式 — `wecom-cli sheet table style delete`
|
|
135
|
+
|
|
136
|
+
### 命令
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
wecom-cli sheet table style delete --json '<JSON 参数>'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 参数
|
|
143
|
+
|
|
144
|
+
| 字段 | 类型 | 必填 | 默认值 | 语义 |
|
|
145
|
+
|---|---|---|---|---|
|
|
146
|
+
| `docid` | string | 是 | — | 在线表格 ID / URL,仅支持 sheet 类型文档 |
|
|
147
|
+
| `sheet` | string | 是 | — | 子表 ID 或名称 |
|
|
148
|
+
| `tab_style_id` | string | 是 | — | 要删除的表格样式 ID |
|
|
149
|
+
| `keep_cell_style` | bool | 否 | — | 删除表格样式对象后是否保留当前呈现出的单元格视觉格式;`true` 保留字体 / 底色 / 条纹等显示效果,`false` 移除表格样式带来的视觉格式 |
|
|
150
|
+
| `yes` | bool | 是 | — | 删除确认;必须显式传 `true` |
|
|
151
|
+
|
|
152
|
+
### 返回
|
|
153
|
+
|
|
154
|
+
| 字段 | 类型 | 说明 |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `tab_style_id` | string | 已删除的表格样式 ID |
|
|
157
|
+
|
|
158
|
+
### 示例
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
wecom-cli sheet table style delete --json '{"docid":"REAL_SHEET_DOCID","sheet":"Sheet1","tab_style_id":"table_style_abc123","keep_cell_style":true,"yes":true}'
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 使用规则
|
|
165
|
+
|
|
166
|
+
- **删除前先定位**:先 `table style list` 核对 `tab_style_id` 和区域,避免误删相邻表格对象。
|
|
167
|
+
- **删除对象不删数据**:删除的是表格样式对象及其结构化样式效果,不删除区域内的单元格值。
|
|
168
|
+
|
|
169
|
+
## 查询表格样式 — `wecom-cli sheet table style list`
|
|
170
|
+
|
|
171
|
+
### 命令
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
wecom-cli sheet table style list --json '<JSON 参数>'
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 参数
|
|
178
|
+
|
|
179
|
+
| 字段 | 类型 | 必填 | 默认值 | 语义 |
|
|
180
|
+
|---|---|---|---|---|
|
|
181
|
+
| `docid` | string | 是 | — | 在线表格 ID / URL,仅支持 sheet 类型文档 |
|
|
182
|
+
| `sheet` | string | 是 | — | 子表 ID 或名称 |
|
|
183
|
+
| `ranges` | array<string> | 否 | — | 查询区域列表,元素为纯 A1,如 `["A1:D10"]`|
|
|
184
|
+
|
|
185
|
+
### 返回
|
|
186
|
+
|
|
187
|
+
| 字段 | 类型 | 说明 |
|
|
188
|
+
|---|---|---|
|
|
189
|
+
| `items` | array | 表格样式列表 |
|
|
190
|
+
| `items[].tab_style_id` | string | 表格样式 ID |
|
|
191
|
+
| `items[].range` | string | 表格当前区域,纯 A1 |
|
|
192
|
+
| `items[].has_header` | bool | 是否包含标题行 |
|
|
193
|
+
| `items[].first_column` | bool | 是否强调首列 |
|
|
194
|
+
| `items[].last_column` | bool | 是否强调末列 |
|
|
195
|
+
| `items[].column_count` | int | 表格样式区域的列数 |
|
|
196
|
+
|
|
197
|
+
### 使用规则
|
|
198
|
+
|
|
199
|
+
- **查询用于定位 ID**:更新 / 删除前必须先拿到稳定 `tab_style_id`。
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# 表格数据验证管理
|
|
2
|
+
|
|
3
|
+
读取、设置、更新或清除指定区域的数据验证规则。数据验证用于限制单元格可输入的值,例如单选下拉、多选下拉、整数范围、日期范围、时间范围或文本长度。
|
|
4
|
+
|
|
5
|
+
## 使用场景
|
|
6
|
+
|
|
7
|
+
| 操作需求 | CLI | 说明 |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| 读取数据验证 | `sheet validation list` | 查询指定区域现有的数据验证设置 |
|
|
10
|
+
| 首次设置或清除数据验证 | `sheet validation set` | 给没有规则的区域创建规则,或用 `validation_type=none` 清除规则 |
|
|
11
|
+
| 修改已有数据验证 | `sheet validation update` | 仅在目标区域已有数据验证规则时使用 |
|
|
12
|
+
| 删除数据验证 | `sheet validation delete` | 兼容删除指定区域的数据验证规则;清除规则优先用 `validation set` |
|
|
13
|
+
|
|
14
|
+
## 执行路径
|
|
15
|
+
|
|
16
|
+
1. 先用 `validation list` 查看目标区域是否已有数据验证规则。
|
|
17
|
+
2. 没有规则时,用 `validation set` 首次设置。
|
|
18
|
+
3. 已有规则时,用 `validation update` 修改类型、条件或选项。
|
|
19
|
+
4. 用户要求清除数据验证、去掉下拉时,用 `validation set` 并传 `validation_type=none`。
|
|
20
|
+
|
|
21
|
+
## `wecom-cli sheet validation list`
|
|
22
|
+
|
|
23
|
+
读取指定区域的数据验证设置。
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
wecom-cli sheet validation list --json '<JSON>'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 入参
|
|
30
|
+
|
|
31
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
32
|
+
| --- | --- | --- | --- |
|
|
33
|
+
| `docid` | `string` | 是 | 工作簿定位,支持文档 URL 或 docid |
|
|
34
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
35
|
+
| `range` | `string` | 是 | 要查询数据验证的带行号 A1 区域,如 `A2:A100`;不支持只写列字母 |
|
|
36
|
+
|
|
37
|
+
### 出参
|
|
38
|
+
|
|
39
|
+
| 字段 | 类型 | 说明 |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `items` | `ValidationItem[]` | 数据验证规则列表;无规则时为空数组 |
|
|
42
|
+
|
|
43
|
+
**`ValidationItem` 结构:**
|
|
44
|
+
|
|
45
|
+
| 字段 | 类型 | 说明 |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| `validation_type` | `string` | 数据验证类型,如 `list` / `multiple_list` / `whole` |
|
|
48
|
+
| `ranges` | `string[]` | 应用该规则的 A1 区域列表 |
|
|
49
|
+
| `cell_count` | `int32` | 应用该规则的单元格数 |
|
|
50
|
+
| `styled_options` | `string[]` | 下拉类数据验证的字段;条件类规则没有该字段 |
|
|
51
|
+
| `has_unreadable_condition` | `bool` | 条件类规则通常为 `true`,表示条件存在但不可从 list 回包读出 |
|
|
52
|
+
|
|
53
|
+
## `wecom-cli sheet validation set`
|
|
54
|
+
|
|
55
|
+
首次设置或清除指定区域的数据验证规则。目标区域没有数据验证规则时,必须用本命令创建规则;不要直接调用 `validation update`。
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
wecom-cli sheet validation set --json '<JSON>'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 入参
|
|
62
|
+
|
|
63
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
64
|
+
| --- | --- | --- | --- |
|
|
65
|
+
| `docid` | `string` | 是 | 工作簿定位,支持文档 URL 或 docid |
|
|
66
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
67
|
+
| `range` | `string` | 是 | 目标区域;区域模式写 `B2:B100`,整列模式写 `A` |
|
|
68
|
+
| `validation_type` | `string` | 是 | 数据验证类型;见下方类型表。清除规则时传 `none` |
|
|
69
|
+
| `styled_options` | `object[]` | 下拉类必填 | 下拉选项;用于 `list` / `multiple_list`,每项可只填文本,也可带颜色 |
|
|
70
|
+
| `op` | `string` | 条件类必填 | 比较运算符;用于 `whole` / `decimal` / `date` / `time` / `text_length` |
|
|
71
|
+
| `formula1` | `string` | 条件类必填 | 第一个比较值,只接受字面量,不支持公式或单元格引用 |
|
|
72
|
+
| `formula2` | `string` | 范围比较必填 | 第二个比较值;仅 `op=btw` / `op=not_btw` 时使用 |
|
|
73
|
+
| `ignore_rows` | `int32` | 否 | 整列模式下忽略表头前 N 行,如 `1` 表示跳过第 1 行;区域模式不用传 |
|
|
74
|
+
| `dry_run` | `bool` | 否 | 预览不落盘,返回 `applied=false` |
|
|
75
|
+
|
|
76
|
+
**`styled_options` 元素结构:**
|
|
77
|
+
|
|
78
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
79
|
+
| --- | --- | --- | --- |
|
|
80
|
+
| `text` | `string` | 是 | 选项文本 |
|
|
81
|
+
| `bg_color` | `string` | 否 | 选项背景色,格式 `#RRGGBB` |
|
|
82
|
+
| `text_color` | `string` | 否 | 选项文本颜色,格式 `#RRGGBB` |
|
|
83
|
+
|
|
84
|
+
### 支持的 `validation_type`
|
|
85
|
+
|
|
86
|
+
| 类型 | 含义 | 必填字段 | 禁止字段 |
|
|
87
|
+
| --- | --- | --- | --- |
|
|
88
|
+
| `list` | 单选下拉 | 非空 `styled_options` | `op` / `formula1` / `formula2` |
|
|
89
|
+
| `multiple_list` | 多选下拉 | 非空 `styled_options` | `op` / `formula1` / `formula2` |
|
|
90
|
+
| `whole` | 整数校验 | `op` / `formula1`,范围比较还要 `formula2` | `styled_options` |
|
|
91
|
+
| `decimal` | 小数校验 | `op` / `formula1`,范围比较还要 `formula2` | `styled_options` |
|
|
92
|
+
| `date` | 日期校验 | `op` / `formula1`,范围比较还要 `formula2` | `styled_options` |
|
|
93
|
+
| `time` | 时间校验 | `op` / `formula1`,范围比较还要 `formula2` | `styled_options` |
|
|
94
|
+
| `text_length` | 文本长度校验 | `op` / `formula1`,范围比较还要 `formula2` | `styled_options` |
|
|
95
|
+
| `none` | 清除数据验证 | 无 | `styled_options` / `strict` / `op` / `formula1` / `formula2` |
|
|
96
|
+
|
|
97
|
+
### 支持的 `op`
|
|
98
|
+
|
|
99
|
+
| `op` | 含义 | 参数要求 |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| `btw` | 在范围内 | 必须传 `formula1` 和 `formula2` |
|
|
102
|
+
| `not_btw` | 不在范围内 | 必须传 `formula1` 和 `formula2` |
|
|
103
|
+
| `eq` | 等于 | 只传 `formula1` |
|
|
104
|
+
| `ne` | 不等于 | 只传 `formula1` |
|
|
105
|
+
| `gt` | 大于 | 只传 `formula1` |
|
|
106
|
+
| `lt` | 小于 | 只传 `formula1` |
|
|
107
|
+
| `gte` | 大于等于 | 只传 `formula1` |
|
|
108
|
+
| `lte` | 小于等于 | 只传 `formula1` |
|
|
109
|
+
|
|
110
|
+
### 出参
|
|
111
|
+
|
|
112
|
+
| 字段 | 类型 | 说明 |
|
|
113
|
+
| --- | --- | --- |
|
|
114
|
+
| `range` | `string` | 实际应用的区域;区域模式如 `B2:B100`,整列模式如 `A` |
|
|
115
|
+
| `applied` | `bool` | 是否已落盘执行;`dry_run=true` 时为 `false` |
|
|
116
|
+
| `validation_type` | `string` | 实际生效的数据验证类型 |
|
|
117
|
+
|
|
118
|
+
### 示例:设置单选下拉
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
wecom-cli sheet validation set --json '{
|
|
122
|
+
"docid": "e3_ABC123",
|
|
123
|
+
"sheet": "销售",
|
|
124
|
+
"range": "A2:A100",
|
|
125
|
+
"validation_type": "list",
|
|
126
|
+
"styled_options": [
|
|
127
|
+
{"text": "待处理"},
|
|
128
|
+
{"text": "进行中"},
|
|
129
|
+
{"text": "已完成"}
|
|
130
|
+
]
|
|
131
|
+
}'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 示例:设置整数范围
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
wecom-cli sheet validation set --json '{
|
|
138
|
+
"docid": "e3_ABC123",
|
|
139
|
+
"sheet": "销售",
|
|
140
|
+
"range": "D2:D100",
|
|
141
|
+
"validation_type": "whole",
|
|
142
|
+
"op": "btw",
|
|
143
|
+
"formula1": "60",
|
|
144
|
+
"formula2": "90"
|
|
145
|
+
}'
|
|
146
|
+
```
|
|
147
|
+
## `wecom-cli sheet validation update`
|
|
148
|
+
|
|
149
|
+
修改已有区域的数据验证规则。调用前必须确认目标区域已经存在数据验证规则;如果 `validation list` 查不到规则,先用 `validation set` 创建。
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
wecom-cli sheet validation update --json '<JSON>'
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 入参
|
|
156
|
+
|
|
157
|
+
`validation update` 的入参和 `validation set` 基本一致,但清除规则不要用 `update`,应改用 `validation set` 且传 `validation_type=none`。
|
|
158
|
+
|
|
159
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
160
|
+
| --- | --- | --- | --- |
|
|
161
|
+
| `docid` | `string` | 是 | 工作簿定位,支持文档 URL 或 docid |
|
|
162
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
163
|
+
| `range` | `string` | 是 | 目标区域;区域模式写 `B2:B100`,整列模式写 `A` |
|
|
164
|
+
| `validation_type` | `string` | 是 | 新数据验证类型,见 `validation set` 的类型表;不要传 `none` |
|
|
165
|
+
| `styled_options` | `object[]` | 否 | 下拉选项;用于 `list` / `multiple_list`,每项可只填文本,也可带颜色 |
|
|
166
|
+
| `op` | `string` | 条件类必填 | 比较运算符;用于 `whole` / `decimal` / `date` / `time` / `text_length` |
|
|
167
|
+
| `formula1` | `string` | 条件类必填 | 第一个比较值,只接受字面量,不支持公式或单元格引用 |
|
|
168
|
+
| `formula2` | `string` | 范围比较必填 | 第二个比较值;仅 `op=btw` / `op=not_btw` 时使用 |
|
|
169
|
+
| `ignore_rows` | `int32` | 否 | 整列模式下忽略表头前 N 行,如 `1` 表示跳过第 1 行;区域模式不用传 |
|
|
170
|
+
| `dry_run` | `bool` | 否 | 预览不落盘,返回 `applied=false` |
|
|
171
|
+
| `yes` | `bool` | 落盘时必填 | 确认执行更新;`dry_run=true` 时不用传 |
|
|
172
|
+
|
|
173
|
+
### 出参
|
|
174
|
+
|
|
175
|
+
| 字段 | 类型 | 说明 |
|
|
176
|
+
| --- | --- | --- |
|
|
177
|
+
| `range` | `string` | 实际更新的区域;区域模式如 `B2:B100`,整列模式如 `A` |
|
|
178
|
+
| `applied` | `bool` | 是否已落盘执行;`dry_run=true` 时为 `false` |
|
|
179
|
+
| `validation_type` | `string` | 实际应用的数据验证类型 |
|
|
180
|
+
|
|
181
|
+
## `wecom-cli sheet validation delete`
|
|
182
|
+
|
|
183
|
+
删除指定区域的数据验证规则。清除下拉或清除普通数据验证时,优先使用 `validation set` 并传 `validation_type=none`。
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
wecom-cli sheet validation delete --json '<JSON>'
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 入参
|
|
190
|
+
|
|
191
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
192
|
+
| --- | --- | --- | --- |
|
|
193
|
+
| `docid` | `string` | 是 | 工作簿定位,支持文档 URL 或 docid |
|
|
194
|
+
| `sheet` | `string` | 是 | 子表 ID 或名称 |
|
|
195
|
+
| `range` | `string` | 是 | 要删除数据验证的 A1 区域,如 `A2:A100` |
|
|
196
|
+
| `yes` | `bool` | 否 | 确认执行删除;兼容旧调用时可省略 |
|
|
197
|
+
|
|
198
|
+
### 出参
|
|
199
|
+
|
|
200
|
+
| 字段 | 类型 | 说明 |
|
|
201
|
+
| --- | --- | --- |
|
|
202
|
+
| `range` | `string` | 实际操作的区域 A1 |
|
|
203
|
+
| `applied` | `bool` | 是否成功应用删除操作 |
|
|
204
|
+
|
|
205
|
+
## 使用约束
|
|
206
|
+
|
|
207
|
+
- 执行设置、更新或清除前,优先用 `validation list` 查看目标区域现有规则。
|
|
208
|
+
- 目标区域没有数据验证规则时,用 `validation set`;目标区域已有规则且要修改时,用 `validation update`。直接对无规则区域调用 `validation update` 会报错,提示改用 set。
|
|
209
|
+
- 清除数据验证规则时,优先用 `validation set` 并传 `validation_type=none`;`validation delete` 也能删除规则,但返回中没有 `validation_type`。
|
|
210
|
+
- `range` 使用纯 A1 写法,不带子表名;子表通过 `sheet` 单独定位。
|
|
211
|
+
- `validation set` / `validation update` 的区域模式用于精确单元格范围,如 `B2:B100`;整列模式用于让新增行继承规则,如 `B`。
|
|
212
|
+
- `validation list` 只接受带行号区域;整列设置后如需复查,用实际数据区域查询,如 `B2:B100`。
|
|
213
|
+
- 整列模式需要跳过表头时传 `ignore_rows`;区域模式直接把起始行写进 `range`,不用传 `ignore_rows`。
|
|
214
|
+
- `list` / `multiple_list` 必须提供非空 `styled_options`;不要在设置或更新时传 `options`。
|
|
215
|
+
- 条件类规则必须显式提供完整条件:`op`、`formula1`,以及范围比较所需的 `formula2`。条件类规则的 `validation list` 回包不返回 `op` / `formula1` / `formula2`,只能看到 `has_unreadable_condition=true`。
|
|
216
|
+
- `formula1` / `formula2` 只写字面量;不要写公式、单元格引用或命名区域。
|
|
217
|
+
- 单边比较如 `gt` / `lt` / `gte` / `lte` / `eq` / `ne` 不要传 `formula2`。
|