docs: document --json shorthand for triage, watch and record-list

This commit is contained in:
zhaojunlin.0405
2026-07-02 18:23:49 +08:00
parent 12a1c156ca
commit bb3b82ef65
3 changed files with 7 additions and 0 deletions

View File

@@ -428,6 +428,8 @@ value 使用预定义关键字机制,第一个元素为字符串常量名称
5. 若候选记录包含 link 字段,提取关联 `record_id` 后到关联表用 `+record-get` 批量读取展示字段。
6. 最终回答业务字段,不要把内部 `record_id` 当作用户可读答案。
> **回查命令的输出格式**`+record-list` 支持 `--json` 作为 `--format json` 的简写(与 `--format` 同时显式指定时以 `--format` 为准)。该简写**仅** `+record-list` 可用——`+record-search` / `+record-get` 的 `--json` 是请求体 JSON 参数,不是输出格式简写,这两个命令的 JSON 输出仍用 `--format json`。
不要把 `data-query pagination.limit` 理解为分页扫描;它只限制 Base 云端查询服务返回的聚合结果行数,不支持 offset。需要全量原始记录导出时回到 data analysis SOP 的 `+record-list` 分页规则。
## 坑点

View File

@@ -34,6 +34,9 @@ lark-cli mail +triage --filter '{"label":"重要邮件"}'
# json/data 格式可配合 jq 处理
lark-cli mail +triage --format json | jq '.messages[].subject'
# --json 是 --format json 的简写
lark-cli mail +triage --json --max 20
# 分页:先取 10 条,再用 page_token 翻页
lark-cli mail +triage --max 10 --format json
# 输出中包含 page_token传入下一次请求
@@ -50,6 +53,7 @@ lark-cli mail +triage --page-size 10
| `--filter <json>` | — | 筛选条件(见下方字段说明) |
| `--query <text>` | — | 全文搜索关键词 |
| `--format <mode>` | `table` | `table` / `json` / `data``json``data` 均输出含分页信息的对象) |
| `--json` | — | `--format json` 的简写;与 `--format` 同时显式指定时以 `--format` 为准 |
| `--max <n>` | `20` | 最大返回条数1-400内部自动分页拉取 |
| `--page-size <n>` | — | `--max` 的别名,两者含义相同;同时指定时 `--page-size` 优先 |
| `--page-token <token>` | — | 上一次响应返回的分页令牌,传入后从该位置继续拉取。令牌带 `search:``list:` 前缀,标识来源路径,不可混用 |

View File

@@ -48,6 +48,7 @@ lark-cli mail +watch --print-output-schema
| `--mailbox <id>` | `me` | 订阅目标邮箱 |
| `--msg-format <mode>` | `metadata` | 输出模式:`metadata` / `minimal` / `plain_text_full` / `full` / `event` |
| `--format <mode>` | `table` | 输出样式:`table` / `json` / `data` |
| `--json` | — | `--format json` 的简写;与 `--format` 同时显式指定时以 `--format` 为准 |
| `--folder-ids <json-array>` | — | 文件夹 ID 过滤,如 `["INBOX","SENT"]` |
| `--folders <json-array>` | — | 文件夹名称过滤(与 `--folder-ids` 取并集) |
| `--label-ids <json-array>` | — | 标签 ID 过滤,如 `["FLAGGED","IMPORTANT"]` |