* 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>
844 B
844 B
网页应用配置
网页应用=应用的能力扩展之一,钉钉内打开的 H5;见 SKILL.md 概念地图。
dws dev app webapp get 查配置,webapp config 配移动端/PC 首页和管理后台地址。参数查 dws schema dev.app.webapp.<get|config>,config 至少给一个配置字段。
- 未配置网页应用前,
get返回空对象{}。拿到{}就是还没配过,走webapp config首次配置。 h5PageType未显式传入时不要假设固定默认值;配置后以webapp get回读为准。
发现命令
调用任何方法前先查清楚再敲:
# 浏览命令组下的子命令与 flag
dws dev app webapp --help
# 查某方法的必填参数、类型、默认值
dws schema dev.app.webapp.<method>
按 dws schema 输出构造 --flag(flag 名 = schema 参数名)。