From 9cde6c0c7d206dd7da585537ea2dfe953a4bef92 Mon Sep 17 00:00:00 2001 From: xieyuanxiang <124608760@qq.com> Date: Fri, 10 Apr 2026 19:26:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=A8=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=8A=80=E8=83=BD=E7=BC=BA=E5=A4=B1=E7=9A=84?= =?UTF-8?q?=20API=EF=BC=88=E9=99=84=E4=BB=B6=E4=B8=8B=E8=BD=BD=E3=80=81?= =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=A1=E7=90=86=E3=80=81Gmail=20=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills/mail-operations/SKILL.md | 42 ++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/skills/mail-operations/SKILL.md b/skills/mail-operations/SKILL.md index 7616113..ecf7731 100644 --- a/skills/mail-operations/SKILL.md +++ b/skills/mail-operations/SKILL.md @@ -97,8 +97,8 @@ market: | Provider 路径 | `/gmail/` | `/outlook/` | `/imap/` | | 邮件详情 | 路径参数 `/{id}` | 查询参数 `?id={id}` | UID `/{uid}?folder=` | | 搜索 | 支持 | 不支持 | 不支持 | -| 草稿 | 支持 | 不支持 | 不支持 | -| 附件下载 | 支持 | 不支持 | 不支持 | +| 草稿 | 支持(含列表/详情) | 支持(创建/发送) | 支持(创建/发送) | +| 附件下载 | 支持 | 支持 | 支持 | | 标签/分类 | 原生标签 | Categories | 仅本地标签 | | 自动规则 | 支持 | 支持 | 支持 | @@ -199,15 +199,21 @@ market: | `isUnread` | true/false | | `offset` / `limit` | 分页 | -### 6. 附件下载(仅 Gmail) +### 6. 附件下载 -`POST /api/gmail/messages/{messageId}/attachment` — body: `{"email": "...", "attachmentId": "..."}` +| Provider | 方法 | 端点 | Body | +|----------|------|------|------| +| Gmail | POST | `/gmail/messages/{messageId}/attachment` | `{email, attachmentId}` | +| Outlook | POST | `/outlook/attachment` | `{email, messageId, attachmentId}` | +| IMAP | POST | `/imap/attachment` | `{email, uid, folder, partId}` | 响应 `result.data` 为 base64 编码,解码后保存文件。 -> 使用 POST 因为 Gmail attachmentId 可能超出 URL 长度限制。 +> Gmail 使用 POST 因为 attachmentId 可能超出 URL 长度限制。 -### 7. 草稿管理(仅 Gmail) +### 7. 草稿管理 + +**Gmail**: | 操作 | 方法 | 端点 | |------|------|------| @@ -217,6 +223,24 @@ market: | 更新草稿 | PUT | `/gmail/drafts/{draftId}` — body 同创建 | | 删除草稿 | DELETE | `/gmail/drafts/{draftId}?email=` | +**Outlook**: + +| 操作 | 方法 | 端点 | +|------|------|------| +| 创建草稿 | POST | `/outlook/drafts` — body: `{email, toRecipients, subject, body, contentType}` | +| 更新草稿 | PUT | `/outlook/drafts?id={draftId}&email=` — body 同创建 | +| 删除草稿 | DELETE | `/outlook/drafts?id={draftId}&email=` | +| 发送草稿 | POST | `/outlook/drafts/send?id={draftId}&email=` | + +**IMAP**: + +| 操作 | 方法 | 端点 | +|------|------|------| +| 创建草稿 | POST | `/imap/drafts` — body: `{email, toRecipients, subject, body, contentType}` | +| 更新草稿 | PUT | `/imap/drafts/{uid}` — body: `{email, folder, toRecipients, subject, body, contentType}` | +| 删除草稿 | DELETE | `/imap/drafts/{uid}?email=&folder=` | +| 发送草稿 | POST | `/imap/drafts/{uid}/send` — body: `{email, folder}` | + ### 8. 标签管理(统一接口) | 操作 | 方法 | 端点 | @@ -232,8 +256,10 @@ market: | 移除邮件标签 | DELETE | `/mails/{p}/{email}/labels?mailId=&labelId=` | | 获取标签下邮件 | GET | `/labels/{labelId}/mails?provider=&email=&limit=&offset=` | -**Gmail 原生标签**:`POST /api/gmail/messages/{id}/labels` — body: `{email, addLabelIds, removeLabelIds}` -**Gmail 标签同步**:`POST /api/gmail/labels/sync?email=` +**Gmail 原生标签**: +- 获取标签列表:`GET /api/gmail/labels?email=` +- 修改邮件标签:`POST /api/gmail/messages/{id}/labels` — body: `{email, addLabelIds, removeLabelIds}` +- 同步远程标签:`POST /api/gmail/labels/sync?email=` ### 9. Outlook 分类