UNPKG

dingtalk-mcp

Version:

DingTalk MCP Server - A TypeScript-based MCP server for DingTalk integration

18 lines (16 loc) 4.17 kB
# 记录值格式 该文档介绍AI表格中记录值的读写格式。 不同字段类型所使用的格式请参考下表: | 字段名 | 类型 (type) | 设置值(新增/更新记录时使用的格式) | 返回值(返回记录值时返回的格式) | | --- | --- |------------------------------------------------------------------------------------|-------------------------------------------------------| | 文本 | text | `"TextString" // 字符串` | `"TextString" // 字符串` | | 数字 | number | `123 // 支持整数/浮点数/字符串` | `"123" // 数字值,以字符串形式返回` | | 单选 | singleSelect | `"optionName1" // 单选选项名` | `{ "id": "id", // 选项ID "name": "optionName1" // 选项名 }` | | 多选 | multipleSelect | `["optionName1", "optionName2"] // 多选选项名` | `[ { "id": "id1", // 选项ID "name": "optionName1" // 选项名 }, { "id": "id2", // 选项ID "name": "optionName2" // 选项名 } ]` | | 日期 | date | `1688601600000 // 时间戳 "2023-12-20 03:00" // 或者 ISO 8601字符串` | `1688601600000 // 时间戳` | | 人员 | user | `[ { unionId: "xxx" } ]` | `[ { "unionId": "xxx" }, {"unionId": "yyy" } ]` | | 部门 | department | `[ { deptId: "xxx" } ]` | `[ { "deptId": "xxx" } ]` | | 附件 | attachment | 具体请参考[上传附件](https://open.dingtalk.com/document/orgapp/notable-upload-attachment) 。 | `[ { "filename": "image.xlsx", "size": 92250, "type": "xls", "url": "xxx" } ]`<br> <br><br>**说明**<br><br>url是附件访问链接。<br><br>* 当附件是在线文档时,其是在线文档链接,该链接没有访问时效。<br> <br>* 当附件是其它文件时,是一个有**访问时效** 的下载链接,一段时间后该链接将无法访问。 | | 单向关联 | unidirectionalLink | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` | `{ "linkedRecordIds": [ "xxx", "yyy" ] }`<br> <br><br>**说明**<br><br>field property中包含关联的sheetId,配合这里返回的recordId,可以通过调用[获取记录](/document/orgapp/api-getrecord#) 接口去获取关联记录的值。 | | 双向关联 | bidirectionalLink | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` | `{ "linkedRecordIds": [ "xxx", "yyy" ] }` | | 链接 | url | `{ "text": "Dingtalk", "link": "https://dingtalk.com" }` | `{ "text": "Dingtalk", "link": "https://dingtalk.com" }` |