* docs(devapp): add image-upload recipe + "discovering commands" to dingtalk-dev skill The dingtalk-dev skill could set an app/robot icon via --icon-media-id but never documented where a mediaId comes from: the dev command set has no upload command, so a mediaId must be fetched from DingTalk's OpenAPI. Agents had to guess the flow. The per-resource refs also lacked a uniform pointer to self-discover commands and params, so they leaned on memory instead of --help / schema. recipes.md: new "上传图片拿 mediaId" recipe — credentials get -> gettoken -> OpenAPI /media/upload (multipart field `media`, type=image) -> robot config / app update --icon-media-id -> read back. Includes a curl example and notes the token TTL (~7200s, rate-limited) and a square-icon hint. references/*.md: append a Chinese "发现命令" block to each of the 10 product refs (app, credentials, webapp, permission, member, security, robot, version, event, connect). Each block shows that group's own `--help` plus `dws schema dev.app.<group>.<method>` (connect uses `dws schema dev.connect`), mirroring SKILL.md's MUST DO. Verified end-to-end on a real app (unifiedAppId via dws dev): uploaded a PNG through /media/upload, set the robot icon with the returned mediaId, and `robot get` reflected the new iconMediaId with robotStatus=ONLINE. All 10 `--help` targets and the 9 `dws schema dev.app.*` paths + `dws schema dev.connect` resolve. * docs(changelog): note dingtalk-dev mediaId recipe + command discovery (#508) --------- Co-authored-by: 修雨 <47820304+PeterGuy326@users.noreply.github.com>
1010 B
1010 B
应用凭证读取
凭证=应用调 OpenAPI 的身份(appKey=clientId / appSecret=clientSecret);见 SKILL.md 概念地图。
dws dev app credentials get --unified-app-id <id> 读取应用凭证。参数查 dws schema dev.app.credentials.get。
返回字段:clientId/appKey(同值)、clientSecret/appSecret(同值)、currentSecretStatus、hasPendingExpireTask、unifiedAppId 等。
规则:
- 该命令只需
--unified-app-id。 - 返回里
clientSecret/appSecret是明文密钥,按敏感凭证处理,不写进回答文本。 - 不能用
dev app get代替;dev app get也会带密钥,同样只用于内部判断并脱敏,不向用户展开。
发现命令
调用任何方法前先查清楚再敲:
# 浏览命令组下的子命令与 flag
dws dev app credentials --help
# 查某方法的必填参数、类型、默认值
dws schema dev.app.credentials.get
按 dws schema 输出构造 --flag(flag 名 = schema 参数名)。