@jiexiaoyin/wecom-api 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/wecom-api/SKILL.md +6 -17
- package/skills/wecom-api/index.js +0 -28
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# WeCom API Skill
|
|
2
2
|
|
|
3
|
-
企业微信 API
|
|
3
|
+
企业微信 API 调用技能,支持客户管理、审批、会议、打卡、通讯录、素材等操作。
|
|
4
|
+
|
|
5
|
+
> 💡 注意:消息发送统一由 @sunnoy/wecom 通道处理,本技能不暴露发送消息相关动作。
|
|
4
6
|
|
|
5
7
|
## 触发方式
|
|
6
8
|
|
|
7
|
-
当用户提到企业微信相关操作时自动触发,如"
|
|
9
|
+
当用户提到企业微信相关操作时自动触发,如"查询客户"、"创建会议"、"查打卡记录"等。
|
|
8
10
|
|
|
9
11
|
## 参数说明
|
|
10
12
|
|
|
@@ -24,20 +26,6 @@
|
|
|
24
26
|
|
|
25
27
|
## 支持的动作
|
|
26
28
|
|
|
27
|
-
### 💬 消息发送
|
|
28
|
-
|
|
29
|
-
| 动作 | 说明 |
|
|
30
|
-
|------|------|
|
|
31
|
-
| `send_message` | 发送文本消息(兼容旧名) |
|
|
32
|
-
| `send_text` | 发送文本消息 |
|
|
33
|
-
| `send_text_card` | 发送文本卡片 |
|
|
34
|
-
| `send_markdown` | 发送 Markdown 消息 |
|
|
35
|
-
| `send_template_card` | 发送模板卡片 |
|
|
36
|
-
| `send_image` | 发送图片消息 |
|
|
37
|
-
| `send_file` | 发送文件消息 |
|
|
38
|
-
| `send_video` | 发送视频消息 |
|
|
39
|
-
| `send_news` | 发送图文消息 |
|
|
40
|
-
|
|
41
29
|
### 👥 客户联系
|
|
42
30
|
|
|
43
31
|
| 动作 | 说明 |
|
|
@@ -152,7 +140,6 @@
|
|
|
152
140
|
## 使用示例
|
|
153
141
|
|
|
154
142
|
```
|
|
155
|
-
发送消息给张三,内容是测试
|
|
156
143
|
查一下张三的客户列表
|
|
157
144
|
查询昨天的打卡记录
|
|
158
145
|
创建一个会议,主题是周会,时间是明天下午2点
|
|
@@ -161,4 +148,6 @@
|
|
|
161
148
|
获取审批列表,3月1日到3月7日
|
|
162
149
|
给李四添加客户备注
|
|
163
150
|
查一下客户群列表
|
|
151
|
+
获取假期余额
|
|
152
|
+
查一下客户流失统计
|
|
164
153
|
```
|
|
@@ -234,34 +234,6 @@ async function executeAction(action, params) {
|
|
|
234
234
|
try {
|
|
235
235
|
switch (action) {
|
|
236
236
|
|
|
237
|
-
// ========== 消息发送 ==========
|
|
238
|
-
case 'send_message':
|
|
239
|
-
return await wecom.message.sendText(args.userId, args.content, args.agentId);
|
|
240
|
-
|
|
241
|
-
case 'send_text':
|
|
242
|
-
return await wecom.message.sendText(args.toUser, args.content, args.agentId);
|
|
243
|
-
|
|
244
|
-
case 'send_text_card':
|
|
245
|
-
return await wecom.message.sendTextCard(args.toUser, args.title, args.content, args.agentId);
|
|
246
|
-
|
|
247
|
-
case 'send_markdown':
|
|
248
|
-
return await wecom.message.sendMarkdown(args.toUser, args.content, args.agentId);
|
|
249
|
-
|
|
250
|
-
case 'send_template_card':
|
|
251
|
-
return await wecom.message.sendTemplateCard(args.toUser, args.templateCard, args.agentId);
|
|
252
|
-
|
|
253
|
-
case 'send_image':
|
|
254
|
-
return await wecom.message.sendImage(args.toUser, args.mediaId, args.agentId);
|
|
255
|
-
|
|
256
|
-
case 'send_file':
|
|
257
|
-
return await wecom.message.sendFile(args.toUser, args.mediaId, args.agentId);
|
|
258
|
-
|
|
259
|
-
case 'send_video':
|
|
260
|
-
return await wecom.message.sendVideo(args.toUser, args.mediaId, args.agentId);
|
|
261
|
-
|
|
262
|
-
case 'send_news':
|
|
263
|
-
return await wecom.message.sendNews(args.toUser, args.articles, args.agentId);
|
|
264
|
-
|
|
265
237
|
// ========== 客户联系 ==========
|
|
266
238
|
case 'get_customer_list':
|
|
267
239
|
return await wecom.contact.getCustomerList(args.userId, args.cursor);
|