n8n-nodes-wecom 0.1.21 → 0.1.22
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/README.md +56 -0
- package/dist/nodes/WeCom/resources/kf/addKfAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/addKfAccount.js +32 -0
- package/dist/nodes/WeCom/resources/kf/addKfAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/addServicer.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/addServicer.js +32 -0
- package/dist/nodes/WeCom/resources/kf/addServicer.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/delKfAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/delKfAccount.js +21 -0
- package/dist/nodes/WeCom/resources/kf/delKfAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/delServicer.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/delServicer.js +32 -0
- package/dist/nodes/WeCom/resources/kf/delServicer.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/execute.js +242 -0
- package/dist/nodes/WeCom/resources/kf/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/getCorpStatistic.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/getCorpStatistic.js +43 -0
- package/dist/nodes/WeCom/resources/kf/getCorpStatistic.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/getCustomerInfo.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/getCustomerInfo.js +32 -0
- package/dist/nodes/WeCom/resources/kf/getCustomerInfo.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/getKfAccountLink.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/getKfAccountLink.js +31 -0
- package/dist/nodes/WeCom/resources/kf/getKfAccountLink.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/getServicerStatistic.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/getServicerStatistic.js +54 -0
- package/dist/nodes/WeCom/resources/kf/getServicerStatistic.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/index.js +140 -0
- package/dist/nodes/WeCom/resources/kf/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/listKfAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/listKfAccount.js +34 -0
- package/dist/nodes/WeCom/resources/kf/listKfAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/listServicer.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/listServicer.js +21 -0
- package/dist/nodes/WeCom/resources/kf/listServicer.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/manageKnowledgeGroup.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/manageKnowledgeGroup.js +49 -0
- package/dist/nodes/WeCom/resources/kf/manageKnowledgeGroup.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/manageKnowledgeIntent.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/manageKnowledgeIntent.js +49 -0
- package/dist/nodes/WeCom/resources/kf/manageKnowledgeIntent.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/sendKfEventMsg.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/sendKfEventMsg.js +53 -0
- package/dist/nodes/WeCom/resources/kf/sendKfEventMsg.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/sendKfMsg.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/sendKfMsg.js +92 -0
- package/dist/nodes/WeCom/resources/kf/sendKfMsg.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/setUpgradeService.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/setUpgradeService.js +32 -0
- package/dist/nodes/WeCom/resources/kf/setUpgradeService.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/transServiceState.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/transServiceState.js +75 -0
- package/dist/nodes/WeCom/resources/kf/transServiceState.js.map +1 -0
- package/dist/nodes/WeCom/resources/kf/updateKfAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/kf/updateKfAccount.js +41 -0
- package/dist/nodes/WeCom/resources/kf/updateKfAccount.js.map +1 -0
- package/dist/nodes/WeComWechat/WeComWechat.node.d.ts +5 -0
- package/dist/nodes/WeComWechat/WeComWechat.node.js +67 -0
- package/dist/nodes/WeComWechat/WeComWechat.node.js.map +1 -0
- package/dist/nodes/WeComWechat/WeComWechat.node.json +18 -0
- package/dist/package.json +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
### 2. 企业微信-办公
|
|
21
21
|
|
|
22
22
|
包含企业微信的协同办公功能:
|
|
23
|
+
|
|
23
24
|
- **邮件管理** - 企业邮箱、邮件群组、公共邮箱
|
|
24
25
|
- **文档管理** - 在线文档、表格、智能表格
|
|
25
26
|
- **微盘管理** - 微盘空间和文件管理
|
|
@@ -28,6 +29,12 @@
|
|
|
28
29
|
|
|
29
30
|
接收企业微信的消息和事件推送
|
|
30
31
|
|
|
32
|
+
### 4. 企业微信-连接微信
|
|
33
|
+
|
|
34
|
+
包含企业微信连接微信的功能:
|
|
35
|
+
|
|
36
|
+
- **微信客服** - 客服账号、接待人员、消息收发、统计管理
|
|
37
|
+
|
|
31
38
|
## 隐私与安全
|
|
32
39
|
|
|
33
40
|
**本插件完全基于企业微信官方 API 开发,直连企业微信服务器,不经过任何第三方服务器。**
|
|
@@ -100,6 +107,13 @@ npm install n8n-nodes-wecom
|
|
|
100
107
|
3. 选择"创建新凭证 - 企业微信 API"
|
|
101
108
|
4. 填入企业凭证信息(同上)
|
|
102
109
|
|
|
110
|
+
#### 企业微信-连接微信 节点
|
|
111
|
+
|
|
112
|
+
1. 添加"企业微信-连接微信"节点到工作流
|
|
113
|
+
2. 点击"Credential to connect with"
|
|
114
|
+
3. 选择"创建新凭证 - 企业微信 API"
|
|
115
|
+
4. 填入企业凭证信息(同上)
|
|
116
|
+
|
|
103
117
|
#### 企业微信消息接收 Trigger 节点
|
|
104
118
|
|
|
105
119
|
1. 添加"企业微信消息接收"触发器节点
|
|
@@ -461,6 +475,48 @@ npm install n8n-nodes-wecom
|
|
|
461
475
|
- ✅ [获取文件权限信息](https://developer.work.weixin.qq.com/document/path/97979)
|
|
462
476
|
- ✅ [文件安全设置](https://developer.work.weixin.qq.com/document/path/97980)
|
|
463
477
|
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## 三、连接微信功能(企业微信-连接微信 节点)
|
|
481
|
+
|
|
482
|
+
### 📱 微信客服
|
|
483
|
+
|
|
484
|
+
> 📖 [官方文档:微信客服](https://developer.work.weixin.qq.com/document/path/94638)
|
|
485
|
+
|
|
486
|
+
#### 客服账号管理
|
|
487
|
+
|
|
488
|
+
- ✅ [添加客服账号](https://developer.work.weixin.qq.com/document/path/94662)
|
|
489
|
+
- ✅ [删除客服账号](https://developer.work.weixin.qq.com/document/path/94663)
|
|
490
|
+
- ✅ [修改客服账号](https://developer.work.weixin.qq.com/document/path/94664)
|
|
491
|
+
- ✅ [获取客服账号列表](https://developer.work.weixin.qq.com/document/path/94661)
|
|
492
|
+
- ✅ [获取客服账号链接](https://developer.work.weixin.qq.com/document/path/94665)
|
|
493
|
+
|
|
494
|
+
#### 接待人员管理
|
|
495
|
+
|
|
496
|
+
- ✅ [添加接待人员](https://developer.work.weixin.qq.com/document/path/94646)
|
|
497
|
+
- ✅ [删除接待人员](https://developer.work.weixin.qq.com/document/path/94647)
|
|
498
|
+
- ✅ [获取接待人员列表](https://developer.work.weixin.qq.com/document/path/94645)
|
|
499
|
+
|
|
500
|
+
#### 会话分配与消息收发
|
|
501
|
+
|
|
502
|
+
- ✅ [分配客服会话](https://developer.work.weixin.qq.com/document/path/94669)
|
|
503
|
+
- ✅ [发送消息](https://developer.work.weixin.qq.com/document/path/94677)
|
|
504
|
+
- ✅ [发送欢迎语等事件响应消息](https://developer.work.weixin.qq.com/document/path/95122)
|
|
505
|
+
- ✅ [「升级服务」配置](https://developer.work.weixin.qq.com/document/path/94674)
|
|
506
|
+
- ✅ [获取客户基础信息](https://developer.work.weixin.qq.com/document/path/95159)
|
|
507
|
+
|
|
508
|
+
#### 统计管理
|
|
509
|
+
|
|
510
|
+
- ✅ [获取「客户数据统计」企业汇总数据](https://developer.work.weixin.qq.com/document/path/95489)
|
|
511
|
+
- ✅ [获取「客户数据统计」接待人员明细数据](https://developer.work.weixin.qq.com/document/path/95490)
|
|
512
|
+
|
|
513
|
+
#### 机器人管理
|
|
514
|
+
|
|
515
|
+
- ✅ [知识库分组管理](https://developer.work.weixin.qq.com/document/path/95971)
|
|
516
|
+
- ✅ [知识库问答管理](https://developer.work.weixin.qq.com/document/path/95972)
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
464
520
|
## 参考资源
|
|
465
521
|
|
|
466
522
|
- [企业微信开发文档](https://developer.work.weixin.qq.com/document/)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addKfAccountDescription = void 0;
|
|
4
|
+
const showOnlyForAddKfAccount = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['addKfAccount'],
|
|
7
|
+
};
|
|
8
|
+
exports.addKfAccountDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服名称',
|
|
11
|
+
name: 'name',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForAddKfAccount,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服名称,不多于16个字',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: '客服头像',
|
|
22
|
+
name: 'media_id',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: true,
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForAddKfAccount,
|
|
27
|
+
},
|
|
28
|
+
default: '',
|
|
29
|
+
hint: '客服头像临时素材,media_id必须是本企业上传的',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=addKfAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addKfAccount.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/addKfAccount.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,cAAc;KACpB;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,4BAA4B;KAClC;CACD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addServicerDescription = void 0;
|
|
4
|
+
const showOnlyForAddServicer = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['addServicer'],
|
|
7
|
+
};
|
|
8
|
+
exports.addServicerDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服账号ID',
|
|
11
|
+
name: 'open_kfid',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForAddServicer,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服账号ID',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: '接待人员列表',
|
|
22
|
+
name: 'userid_list',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: true,
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForAddServicer,
|
|
27
|
+
},
|
|
28
|
+
default: '',
|
|
29
|
+
hint: '接待人员userid列表,用逗号分隔',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=addServicer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addServicer.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/addServicer.ts"],"names":[],"mappings":";;;AAEA,MAAM,sBAAsB,GAAG;IAC9B,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,sBAAsB;SAC5B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACd;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,sBAAsB;SAC5B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,oBAAoB;KAC1B;CACD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.delKfAccountDescription = void 0;
|
|
4
|
+
const showOnlyForDelKfAccount = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['delKfAccount'],
|
|
7
|
+
};
|
|
8
|
+
exports.delKfAccountDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服账号ID',
|
|
11
|
+
name: 'open_kfid',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForDelKfAccount,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服账号ID',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
//# sourceMappingURL=delKfAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delKfAccount.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/delKfAccount.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.delServicerDescription = void 0;
|
|
4
|
+
const showOnlyForDelServicer = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['delServicer'],
|
|
7
|
+
};
|
|
8
|
+
exports.delServicerDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服账号ID',
|
|
11
|
+
name: 'open_kfid',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForDelServicer,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服账号ID',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: '接待人员列表',
|
|
22
|
+
name: 'userid_list',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: true,
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForDelServicer,
|
|
27
|
+
},
|
|
28
|
+
default: '',
|
|
29
|
+
hint: '要删除的接待人员userid列表,用逗号分隔',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=delServicer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delServicer.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/delServicer.ts"],"names":[],"mappings":";;;AAEA,MAAM,sBAAsB,GAAG;IAC9B,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,sBAAsB;SAC5B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACd;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,sBAAsB;SAC5B;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,wBAAwB;KAC9B;CACD,CAAC"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeKf = executeKf;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const transport_1 = require("../../shared/transport");
|
|
6
|
+
async function executeKf(operation, items) {
|
|
7
|
+
const returnData = [];
|
|
8
|
+
for (let i = 0; i < items.length; i++) {
|
|
9
|
+
try {
|
|
10
|
+
let response;
|
|
11
|
+
if (operation === 'addKfAccount') {
|
|
12
|
+
const name = this.getNodeParameter('name', i);
|
|
13
|
+
const media_id = this.getNodeParameter('media_id', i);
|
|
14
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/account/add', {
|
|
15
|
+
name,
|
|
16
|
+
media_id,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
else if (operation === 'delKfAccount') {
|
|
20
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
21
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/account/del', {
|
|
22
|
+
open_kfid,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else if (operation === 'updateKfAccount') {
|
|
26
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
27
|
+
const name = this.getNodeParameter('name', i, '');
|
|
28
|
+
const media_id = this.getNodeParameter('media_id', i, '');
|
|
29
|
+
const body = { open_kfid };
|
|
30
|
+
if (name)
|
|
31
|
+
body.name = name;
|
|
32
|
+
if (media_id)
|
|
33
|
+
body.media_id = media_id;
|
|
34
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/account/update', body);
|
|
35
|
+
}
|
|
36
|
+
else if (operation === 'listKfAccount') {
|
|
37
|
+
const limit = this.getNodeParameter('limit', i, 50);
|
|
38
|
+
const cursor = this.getNodeParameter('cursor', i, '');
|
|
39
|
+
const body = { limit };
|
|
40
|
+
if (cursor)
|
|
41
|
+
body.cursor = cursor;
|
|
42
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/account/list', body);
|
|
43
|
+
}
|
|
44
|
+
else if (operation === 'getKfAccountLink') {
|
|
45
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
46
|
+
const scene = this.getNodeParameter('scene', i, '');
|
|
47
|
+
const body = { open_kfid };
|
|
48
|
+
if (scene)
|
|
49
|
+
body.scene = scene;
|
|
50
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/add_contact_way', body);
|
|
51
|
+
}
|
|
52
|
+
else if (operation === 'addServicer') {
|
|
53
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
54
|
+
const userid_list = this.getNodeParameter('userid_list', i);
|
|
55
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/servicer/add', {
|
|
56
|
+
open_kfid,
|
|
57
|
+
userid_list: userid_list.split(',').map((id) => id.trim()),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
else if (operation === 'delServicer') {
|
|
61
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
62
|
+
const userid_list = this.getNodeParameter('userid_list', i);
|
|
63
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/servicer/del', {
|
|
64
|
+
open_kfid,
|
|
65
|
+
userid_list: userid_list.split(',').map((id) => id.trim()),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
else if (operation === 'listServicer') {
|
|
69
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
70
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/servicer/list', {
|
|
71
|
+
open_kfid,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else if (operation === 'transServiceState') {
|
|
75
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
76
|
+
const external_userid = this.getNodeParameter('external_userid', i);
|
|
77
|
+
const service_state = this.getNodeParameter('service_state', i);
|
|
78
|
+
const servicer_userid = this.getNodeParameter('servicer_userid', i, '');
|
|
79
|
+
const body = {
|
|
80
|
+
open_kfid,
|
|
81
|
+
external_userid,
|
|
82
|
+
service_state,
|
|
83
|
+
};
|
|
84
|
+
if (servicer_userid)
|
|
85
|
+
body.servicer_userid = servicer_userid;
|
|
86
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/service_state/trans', body);
|
|
87
|
+
}
|
|
88
|
+
else if (operation === 'sendKfMsg') {
|
|
89
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
90
|
+
const touser = this.getNodeParameter('touser', i);
|
|
91
|
+
const msgtype = this.getNodeParameter('msgtype', i);
|
|
92
|
+
const content = this.getNodeParameter('content', i);
|
|
93
|
+
let parsedContent;
|
|
94
|
+
try {
|
|
95
|
+
parsedContent = JSON.parse(content);
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `content 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
99
|
+
}
|
|
100
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/send_msg', {
|
|
101
|
+
touser,
|
|
102
|
+
open_kfid,
|
|
103
|
+
msgtype,
|
|
104
|
+
[msgtype]: parsedContent,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else if (operation === 'sendKfEventMsg') {
|
|
108
|
+
const code = this.getNodeParameter('code', i);
|
|
109
|
+
const msgtype = this.getNodeParameter('msgtype', i);
|
|
110
|
+
const content = this.getNodeParameter('content', i);
|
|
111
|
+
let parsedContent;
|
|
112
|
+
try {
|
|
113
|
+
parsedContent = JSON.parse(content);
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `content 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
117
|
+
}
|
|
118
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/send_msg_on_event', {
|
|
119
|
+
code,
|
|
120
|
+
msgtype,
|
|
121
|
+
[msgtype]: parsedContent,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
else if (operation === 'setUpgradeService') {
|
|
125
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
126
|
+
const upgrade_config = this.getNodeParameter('upgrade_config', i);
|
|
127
|
+
let parsedConfig;
|
|
128
|
+
try {
|
|
129
|
+
parsedConfig = JSON.parse(upgrade_config);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `upgrade_config 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
133
|
+
}
|
|
134
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/customer/upgrade_service_config', {
|
|
135
|
+
open_kfid,
|
|
136
|
+
upgrade_config: parsedConfig,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
else if (operation === 'getCustomerInfo') {
|
|
140
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
141
|
+
const external_userid = this.getNodeParameter('external_userid', i);
|
|
142
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/customer/get_upgrade_service_config', {
|
|
143
|
+
open_kfid,
|
|
144
|
+
external_userid,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
else if (operation === 'getCorpStatistic') {
|
|
148
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
149
|
+
const start_time = this.getNodeParameter('start_time', i);
|
|
150
|
+
const end_time = this.getNodeParameter('end_time', i);
|
|
151
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/get_corp_statistic', {
|
|
152
|
+
open_kfid,
|
|
153
|
+
start_time,
|
|
154
|
+
end_time,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
else if (operation === 'getServicerStatistic') {
|
|
158
|
+
const open_kfid = this.getNodeParameter('open_kfid', i);
|
|
159
|
+
const servicer_userid = this.getNodeParameter('servicer_userid', i);
|
|
160
|
+
const start_time = this.getNodeParameter('start_time', i);
|
|
161
|
+
const end_time = this.getNodeParameter('end_time', i);
|
|
162
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/kf/get_servicer_statistic', {
|
|
163
|
+
open_kfid,
|
|
164
|
+
servicer_userid,
|
|
165
|
+
start_time,
|
|
166
|
+
end_time,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
else if (operation === 'manageKnowledgeGroup') {
|
|
170
|
+
const action_type = this.getNodeParameter('action_type', i);
|
|
171
|
+
const params = this.getNodeParameter('params', i, '{}');
|
|
172
|
+
let parsedParams;
|
|
173
|
+
try {
|
|
174
|
+
parsedParams = JSON.parse(params);
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `params 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
178
|
+
}
|
|
179
|
+
let endpoint = '';
|
|
180
|
+
if (action_type === 'add') {
|
|
181
|
+
endpoint = '/cgi-bin/kf/knowledge/add_group';
|
|
182
|
+
}
|
|
183
|
+
else if (action_type === 'del') {
|
|
184
|
+
endpoint = '/cgi-bin/kf/knowledge/del_group';
|
|
185
|
+
}
|
|
186
|
+
else if (action_type === 'mod') {
|
|
187
|
+
endpoint = '/cgi-bin/kf/knowledge/mod_group';
|
|
188
|
+
}
|
|
189
|
+
else if (action_type === 'list') {
|
|
190
|
+
endpoint = '/cgi-bin/kf/knowledge/list_group';
|
|
191
|
+
}
|
|
192
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', endpoint, parsedParams);
|
|
193
|
+
}
|
|
194
|
+
else if (operation === 'manageKnowledgeIntent') {
|
|
195
|
+
const action_type = this.getNodeParameter('action_type', i);
|
|
196
|
+
const params = this.getNodeParameter('params', i, '{}');
|
|
197
|
+
let parsedParams;
|
|
198
|
+
try {
|
|
199
|
+
parsedParams = JSON.parse(params);
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `params 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
203
|
+
}
|
|
204
|
+
let endpoint = '';
|
|
205
|
+
if (action_type === 'add') {
|
|
206
|
+
endpoint = '/cgi-bin/kf/knowledge/add_intent';
|
|
207
|
+
}
|
|
208
|
+
else if (action_type === 'del') {
|
|
209
|
+
endpoint = '/cgi-bin/kf/knowledge/del_intent';
|
|
210
|
+
}
|
|
211
|
+
else if (action_type === 'mod') {
|
|
212
|
+
endpoint = '/cgi-bin/kf/knowledge/mod_intent';
|
|
213
|
+
}
|
|
214
|
+
else if (action_type === 'list') {
|
|
215
|
+
endpoint = '/cgi-bin/kf/knowledge/list_intent';
|
|
216
|
+
}
|
|
217
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', endpoint, parsedParams);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
response = {};
|
|
221
|
+
}
|
|
222
|
+
returnData.push({
|
|
223
|
+
json: response,
|
|
224
|
+
pairedItem: { item: i },
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
if (this.continueOnFail()) {
|
|
229
|
+
returnData.push({
|
|
230
|
+
json: {
|
|
231
|
+
error: error.message,
|
|
232
|
+
},
|
|
233
|
+
pairedItem: { item: i },
|
|
234
|
+
});
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
throw error;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return returnData;
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/execute.ts"],"names":[],"mappings":";;AAIA,8BAyPC;AA5PD,+CAAkD;AAClD,sDAAyD;AAElD,KAAK,UAAU,SAAS,CAE9B,SAAiB,EACjB,KAA2B;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WAAW,KAAK,MAAM,EAAE,CAAC;oBACnC,QAAQ,GAAG,mCAAmC,CAAC;gBAChD,CAAC;gBAED,QAAQ,GAAG,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;YAC7E,CAAC;iBAAM,CAAC;gBACP,QAAQ,GAAG,EAAE,CAAC;YACf,CAAC;YAED,UAAU,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;aACvB,CAAC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE;wBACL,KAAK,EAAE,KAAK,CAAC,OAAO;qBACpB;oBACD,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;iBACvB,CAAC,CAAC;gBACH,SAAS;YACV,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCorpStatisticDescription = void 0;
|
|
4
|
+
const showOnlyForGetCorpStatistic = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['getCorpStatistic'],
|
|
7
|
+
};
|
|
8
|
+
exports.getCorpStatisticDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服账号ID',
|
|
11
|
+
name: 'open_kfid',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForGetCorpStatistic,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服账号ID',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: '起始日期',
|
|
22
|
+
name: 'start_time',
|
|
23
|
+
type: 'number',
|
|
24
|
+
required: true,
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForGetCorpStatistic,
|
|
27
|
+
},
|
|
28
|
+
default: 0,
|
|
29
|
+
hint: '起始日期的时间戳',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: '结束日期',
|
|
33
|
+
name: 'end_time',
|
|
34
|
+
type: 'number',
|
|
35
|
+
required: true,
|
|
36
|
+
displayOptions: {
|
|
37
|
+
show: showOnlyForGetCorpStatistic,
|
|
38
|
+
},
|
|
39
|
+
default: 0,
|
|
40
|
+
hint: '结束日期的时间戳',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
//# sourceMappingURL=getCorpStatistic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCorpStatistic.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/getCorpStatistic.ts"],"names":[],"mappings":";;;AAEA,MAAM,2BAA2B,GAAG;IACnC,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,kBAAkB,CAAC;CAC/B,CAAC;AAEW,QAAA,2BAA2B,GAAsB;IAC7D;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,2BAA2B;SACjC;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACd;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,2BAA2B;SACjC;QACD,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,UAAU;KAChB;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,2BAA2B;SACjC;QACD,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,UAAU;KAChB;CACD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomerInfoDescription = void 0;
|
|
4
|
+
const showOnlyForGetCustomerInfo = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['getCustomerInfo'],
|
|
7
|
+
};
|
|
8
|
+
exports.getCustomerInfoDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服账号ID',
|
|
11
|
+
name: 'open_kfid',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForGetCustomerInfo,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服账号ID',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: '外部联系人ID',
|
|
22
|
+
name: 'external_userid',
|
|
23
|
+
type: 'string',
|
|
24
|
+
required: true,
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForGetCustomerInfo,
|
|
27
|
+
},
|
|
28
|
+
default: '',
|
|
29
|
+
hint: '客户UserID',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=getCustomerInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomerInfo.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/getCustomerInfo.ts"],"names":[],"mappings":";;;AAEA,MAAM,0BAA0B,GAAG;IAClC,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,iBAAiB,CAAC;CAC9B,CAAC;AAEW,QAAA,0BAA0B,GAAsB;IAC5D;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,0BAA0B;SAChC;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACd;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,0BAA0B;SAChC;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,UAAU;KAChB;CACD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getKfAccountLinkDescription = void 0;
|
|
4
|
+
const showOnlyForGetKfAccountLink = {
|
|
5
|
+
resource: ['kf'],
|
|
6
|
+
operation: ['getKfAccountLink'],
|
|
7
|
+
};
|
|
8
|
+
exports.getKfAccountLinkDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '客服账号ID',
|
|
11
|
+
name: 'open_kfid',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForGetKfAccountLink,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
hint: '客服账号ID',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: '场景值',
|
|
22
|
+
name: 'scene',
|
|
23
|
+
type: 'string',
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: showOnlyForGetKfAccountLink,
|
|
26
|
+
},
|
|
27
|
+
default: '',
|
|
28
|
+
hint: '场景值,字符串类型,由开发者自定义(可选)',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
//# sourceMappingURL=getKfAccountLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getKfAccountLink.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/kf/getKfAccountLink.ts"],"names":[],"mappings":";;;AAEA,MAAM,2BAA2B,GAAG;IACnC,QAAQ,EAAE,CAAC,IAAI,CAAC;IAChB,SAAS,EAAE,CAAC,kBAAkB,CAAC;CAC/B,CAAC;AAEW,QAAA,2BAA2B,GAAsB;IAC7D;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,2BAA2B;SACjC;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,QAAQ;KACd;IACD;QACC,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,2BAA2B;SACjC;QACD,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,uBAAuB;KAC7B;CACD,CAAC"}
|