n8n-nodes-wecom 0.3.10 → 0.3.12
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/LICENSE.md +19 -19
- package/README.md +762 -774
- package/dist/nodes/WeComBase/WeComBase.node.js +0 -20
- package/dist/nodes/WeComBase/WeComBase.node.js.map +1 -1
- package/dist/nodes/WeComPassiveTrigger/WeComPassiveTrigger.node.js +3 -4
- package/dist/nodes/WeComPassiveTrigger/WeComPassiveTrigger.node.js.map +1 -1
- package/dist/nodes/WeComPassiveTrigger/WeComReply.node.d.ts +5 -0
- package/dist/nodes/WeComPassiveTrigger/WeComReply.node.js +269 -0
- package/dist/nodes/WeComPassiveTrigger/WeComReply.node.js.map +1 -0
- package/dist/nodes/WeComTrigger/WeComTrigger.node.js +2 -2
- package/dist/nodes/WeComTrigger/WeComTrigger.node.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +76 -75
- package/dist/nodes/WeCom/resources/passiveReply/execute.d.ts +0 -2
- package/dist/nodes/WeCom/resources/passiveReply/execute.js +0 -101
- package/dist/nodes/WeCom/resources/passiveReply/execute.js.map +0 -1
- package/dist/nodes/WeCom/resources/passiveReply/index.d.ts +0 -2
- package/dist/nodes/WeCom/resources/passiveReply/index.js +0 -205
- package/dist/nodes/WeCom/resources/passiveReply/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "n8n-nodes-wecom",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Complete n8n integration for WeCom (企业微信/WeChat Work). Send messages, manage contacts, departments, customer relations, meetings, documents, email, calendar, approvals, and more. Full-featured enterprise WeChat automation node.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"homepage": "https://github.com/funcodingdev/n8n-nodes-wecom",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"n8n-community-node-package",
|
|
9
|
-
"wecom",
|
|
10
|
-
"wechat work",
|
|
11
|
-
"enterprise wechat",
|
|
12
|
-
"企业微信",
|
|
13
|
-
"weixin",
|
|
14
|
-
"qyweixin",
|
|
15
|
-
"wechat",
|
|
16
|
-
"messaging",
|
|
17
|
-
"contacts",
|
|
18
|
-
"crm",
|
|
19
|
-
"automation",
|
|
20
|
-
"workflow",
|
|
21
|
-
"china",
|
|
22
|
-
"business",
|
|
23
|
-
"communication",
|
|
24
|
-
"notification",
|
|
25
|
-
"webhook",
|
|
26
|
-
"trigger"
|
|
27
|
-
],
|
|
28
|
-
"author": {
|
|
29
|
-
"name": "funcodingdev",
|
|
30
|
-
"email": "funcodingdev@foxmail.com"
|
|
31
|
-
},
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/funcodingdev/n8n-nodes-wecom.git"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"build": "n8n-node build",
|
|
38
|
-
"build:watch": "tsc --watch",
|
|
39
|
-
"dev": "n8n-node dev",
|
|
40
|
-
"lint": "n8n-node lint",
|
|
41
|
-
"lint:fix": "n8n-node lint --fix",
|
|
42
|
-
"release": "n8n-node release",
|
|
43
|
-
"prepublishOnly": "n8n-node prerelease"
|
|
44
|
-
},
|
|
45
|
-
"files": [
|
|
46
|
-
"dist"
|
|
47
|
-
],
|
|
48
|
-
"n8n": {
|
|
49
|
-
"n8nNodesApiVersion": 1,
|
|
50
|
-
"strict": false,
|
|
51
|
-
"credentials": [
|
|
52
|
-
"dist/credentials/WeComApi.credentials.js",
|
|
53
|
-
"dist/credentials/WeComWebhookApi.credentials.js",
|
|
54
|
-
"dist/credentials/WeComReceiveApi.credentials.js"
|
|
55
|
-
],
|
|
56
|
-
"nodes": [
|
|
57
|
-
"dist/nodes/WeComBase/WeComBase.node.js",
|
|
58
|
-
"dist/nodes/WeComOffice/WeComOffice.node.js",
|
|
59
|
-
"dist/nodes/WeComPassiveTrigger/WeComPassiveTrigger.node.js",
|
|
60
|
-
"dist/nodes/
|
|
61
|
-
"dist/nodes/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"@
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-wecom",
|
|
3
|
+
"version": "0.3.12",
|
|
4
|
+
"description": "Complete n8n integration for WeCom (企业微信/WeChat Work). Send messages, manage contacts, departments, customer relations, meetings, documents, email, calendar, approvals, and more. Full-featured enterprise WeChat automation node.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/funcodingdev/n8n-nodes-wecom",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"n8n-community-node-package",
|
|
9
|
+
"wecom",
|
|
10
|
+
"wechat work",
|
|
11
|
+
"enterprise wechat",
|
|
12
|
+
"企业微信",
|
|
13
|
+
"weixin",
|
|
14
|
+
"qyweixin",
|
|
15
|
+
"wechat",
|
|
16
|
+
"messaging",
|
|
17
|
+
"contacts",
|
|
18
|
+
"crm",
|
|
19
|
+
"automation",
|
|
20
|
+
"workflow",
|
|
21
|
+
"china",
|
|
22
|
+
"business",
|
|
23
|
+
"communication",
|
|
24
|
+
"notification",
|
|
25
|
+
"webhook",
|
|
26
|
+
"trigger"
|
|
27
|
+
],
|
|
28
|
+
"author": {
|
|
29
|
+
"name": "funcodingdev",
|
|
30
|
+
"email": "funcodingdev@foxmail.com"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/funcodingdev/n8n-nodes-wecom.git"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "n8n-node build",
|
|
38
|
+
"build:watch": "tsc --watch",
|
|
39
|
+
"dev": "n8n-node dev",
|
|
40
|
+
"lint": "n8n-node lint",
|
|
41
|
+
"lint:fix": "n8n-node lint --fix",
|
|
42
|
+
"release": "n8n-node release",
|
|
43
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist"
|
|
47
|
+
],
|
|
48
|
+
"n8n": {
|
|
49
|
+
"n8nNodesApiVersion": 1,
|
|
50
|
+
"strict": false,
|
|
51
|
+
"credentials": [
|
|
52
|
+
"dist/credentials/WeComApi.credentials.js",
|
|
53
|
+
"dist/credentials/WeComWebhookApi.credentials.js",
|
|
54
|
+
"dist/credentials/WeComReceiveApi.credentials.js"
|
|
55
|
+
],
|
|
56
|
+
"nodes": [
|
|
57
|
+
"dist/nodes/WeComBase/WeComBase.node.js",
|
|
58
|
+
"dist/nodes/WeComOffice/WeComOffice.node.js",
|
|
59
|
+
"dist/nodes/WeComPassiveTrigger/WeComPassiveTrigger.node.js",
|
|
60
|
+
"dist/nodes/WeComPassiveTrigger/WeComReply.node.js",
|
|
61
|
+
"dist/nodes/WeComTrigger/WeComTrigger.node.js",
|
|
62
|
+
"dist/nodes/WeComWechat/WeComWechat.node.js"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@n8n/node-cli": "*",
|
|
67
|
+
"@types/node": "^24.9.1",
|
|
68
|
+
"eslint": "9.32.0",
|
|
69
|
+
"prettier": "3.6.2",
|
|
70
|
+
"release-it": "^19.0.4",
|
|
71
|
+
"typescript": "5.9.2"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"n8n-workflow": "*"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.executePassiveReply = executePassiveReply;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const crypto_1 = require("../../shared/crypto");
|
|
6
|
-
async function executePassiveReply(operation, items) {
|
|
7
|
-
const returnData = [];
|
|
8
|
-
for (let i = 0; i < items.length; i++) {
|
|
9
|
-
try {
|
|
10
|
-
if (operation === 'reply') {
|
|
11
|
-
const item = items[i];
|
|
12
|
-
const wecomCrypto = item.json._wecomCrypto;
|
|
13
|
-
if (!wecomCrypto || !wecomCrypto.token || !wecomCrypto.encodingAESKey || !wecomCrypto.corpId) {
|
|
14
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '缺少企业微信加密信息,请确保此节点连接到「企业微信消息接收(被动回复)触发器」节点之后', { itemIndex: i });
|
|
15
|
-
}
|
|
16
|
-
const fromUserName = item.json.FromUserName;
|
|
17
|
-
const toUserName = item.json.ToUserName;
|
|
18
|
-
if (!fromUserName || !toUserName) {
|
|
19
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '缺少消息发送者或接收者信息,请确保输入数据来自「企业微信消息接收(被动回复)触发器」', { itemIndex: i });
|
|
20
|
-
}
|
|
21
|
-
const replyType = this.getNodeParameter('replyType', i);
|
|
22
|
-
let replyContent = {};
|
|
23
|
-
switch (replyType) {
|
|
24
|
-
case 'text': {
|
|
25
|
-
const textContent = this.getNodeParameter('textContent', i);
|
|
26
|
-
if (!textContent) {
|
|
27
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '文本内容不能为空', { itemIndex: i });
|
|
28
|
-
}
|
|
29
|
-
replyContent = { Content: textContent };
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
case 'image':
|
|
33
|
-
case 'voice':
|
|
34
|
-
case 'video': {
|
|
35
|
-
const mediaId = this.getNodeParameter('mediaId', i);
|
|
36
|
-
if (!mediaId) {
|
|
37
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '媒体ID不能为空', { itemIndex: i });
|
|
38
|
-
}
|
|
39
|
-
replyContent = { MediaId: mediaId };
|
|
40
|
-
if (replyType === 'video') {
|
|
41
|
-
const videoTitle = this.getNodeParameter('videoTitle', i, '');
|
|
42
|
-
const videoDescription = this.getNodeParameter('videoDescription', i, '');
|
|
43
|
-
if (videoTitle)
|
|
44
|
-
replyContent.Title = videoTitle;
|
|
45
|
-
if (videoDescription)
|
|
46
|
-
replyContent.Description = videoDescription;
|
|
47
|
-
}
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
case 'news': {
|
|
51
|
-
const articlesData = this.getNodeParameter('articles', i);
|
|
52
|
-
const articles = articlesData.article || [];
|
|
53
|
-
if (articles.length === 0) {
|
|
54
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '至少需要添加一篇图文消息', { itemIndex: i });
|
|
55
|
-
}
|
|
56
|
-
const formattedArticles = articles.map(article => ({
|
|
57
|
-
Title: article.title,
|
|
58
|
-
Description: article.description || '',
|
|
59
|
-
Url: article.url,
|
|
60
|
-
PicUrl: article.picUrl || '',
|
|
61
|
-
}));
|
|
62
|
-
replyContent = { Articles: formattedArticles };
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const crypto = new crypto_1.WeComCrypto(wecomCrypto.encodingAESKey, wecomCrypto.corpId);
|
|
67
|
-
const replyMessageXML = (0, crypto_1.generateReplyMessageXML)(fromUserName, toUserName, replyType, replyContent);
|
|
68
|
-
const encryptedResponseXML = (0, crypto_1.generateEncryptedResponseXML)(crypto, wecomCrypto.token, replyMessageXML, this.getNode());
|
|
69
|
-
returnData.push({
|
|
70
|
-
json: {
|
|
71
|
-
body: encryptedResponseXML,
|
|
72
|
-
headers: {
|
|
73
|
-
'content-type': 'application/xml; charset=utf-8',
|
|
74
|
-
},
|
|
75
|
-
statusCode: 200,
|
|
76
|
-
_debug: {
|
|
77
|
-
fromUserName,
|
|
78
|
-
toUserName,
|
|
79
|
-
replyType,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
pairedItem: { item: i },
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
if (this.continueOnFail()) {
|
|
88
|
-
returnData.push({
|
|
89
|
-
json: {
|
|
90
|
-
error: error.message,
|
|
91
|
-
},
|
|
92
|
-
pairedItem: { item: i },
|
|
93
|
-
});
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
throw error;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
return returnData;
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/passiveReply/execute.ts"],"names":[],"mappings":";;AAQA,kDAuKC;AA9KD,+CAAkD;AAClD,gDAI6B;AAEtB,KAAK,UAAU,mBAAmB,CAExC,SAAiB,EACjB,KAA2B;IAE3B,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,IAAI,CAAC;YACJ,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;gBAC3B,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBAGtB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,YAI7B,CAAC;gBAEF,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,cAAc,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;oBAC9F,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,6CAA6C,EAC7C,EAAE,SAAS,EAAE,CAAC,EAAE,CAChB,CAAC;gBACH,CAAC;gBAGD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,YAAsB,CAAC;gBACtD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAoB,CAAC;gBAElD,IAAI,CAAC,YAAY,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EACxD,MAAM,EACN,WAAW,CAAC,KAAK,EACjB,eAAe,EACf,IAAI,CAAC,OAAO,EAAE,CACd,CAAC;gBAIF,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE;wBACL,IAAI,EAAE,oBAAoB;wBAC1B,OAAO,EAAE;4BACR,cAAc,EAAE,gCAAgC;yBAChD;wBACD,UAAU,EAAE,GAAG;wBAEf,MAAM,EAAE;4BACP,YAAY;4BACZ,UAAU;4BACV,SAAS;yBACT;qBACc;oBAChB,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;iBACvB,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE;wBACL,KAAK,EAAG,KAAe,CAAC,OAAO;qBAC/B;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"}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.passiveReplyDescription = void 0;
|
|
4
|
-
const showOnlyForPassiveReply = {
|
|
5
|
-
resource: ['passiveReply'],
|
|
6
|
-
};
|
|
7
|
-
exports.passiveReplyDescription = [
|
|
8
|
-
{
|
|
9
|
-
displayName: '操作',
|
|
10
|
-
name: 'operation',
|
|
11
|
-
type: 'options',
|
|
12
|
-
noDataExpression: true,
|
|
13
|
-
displayOptions: {
|
|
14
|
-
show: showOnlyForPassiveReply,
|
|
15
|
-
},
|
|
16
|
-
options: [
|
|
17
|
-
{
|
|
18
|
-
name: '被动回复消息',
|
|
19
|
-
value: 'reply',
|
|
20
|
-
action: '被动回复企业微信消息',
|
|
21
|
-
description: '被动回复企业微信消息(需配合「企业微信消息接收(被动回复)触发器」使用)',
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
default: 'reply',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
displayName: '回复消息类型',
|
|
28
|
-
name: 'replyType',
|
|
29
|
-
type: 'options',
|
|
30
|
-
displayOptions: {
|
|
31
|
-
show: {
|
|
32
|
-
...showOnlyForPassiveReply,
|
|
33
|
-
operation: ['reply'],
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
options: [
|
|
37
|
-
{
|
|
38
|
-
name: '文本消息',
|
|
39
|
-
value: 'text',
|
|
40
|
-
description: '回复文本消息',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: '图片消息',
|
|
44
|
-
value: 'image',
|
|
45
|
-
description: '回复图片消息',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: '语音消息',
|
|
49
|
-
value: 'voice',
|
|
50
|
-
description: '回复语音消息',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: '视频消息',
|
|
54
|
-
value: 'video',
|
|
55
|
-
description: '回复视频消息',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: '图文消息',
|
|
59
|
-
value: 'news',
|
|
60
|
-
description: '回复图文消息',
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
default: 'text',
|
|
64
|
-
description: '被动回复的消息类型',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
displayName: '文本内容',
|
|
68
|
-
name: 'textContent',
|
|
69
|
-
type: 'string',
|
|
70
|
-
typeOptions: {
|
|
71
|
-
rows: 4,
|
|
72
|
-
},
|
|
73
|
-
displayOptions: {
|
|
74
|
-
show: {
|
|
75
|
-
...showOnlyForPassiveReply,
|
|
76
|
-
operation: ['reply'],
|
|
77
|
-
replyType: ['text'],
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
default: '',
|
|
81
|
-
required: true,
|
|
82
|
-
description: '回复的文本内容',
|
|
83
|
-
placeholder: '感谢您的消息!',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
displayName: '媒体ID',
|
|
87
|
-
name: 'mediaId',
|
|
88
|
-
type: 'string',
|
|
89
|
-
displayOptions: {
|
|
90
|
-
show: {
|
|
91
|
-
...showOnlyForPassiveReply,
|
|
92
|
-
operation: ['reply'],
|
|
93
|
-
replyType: ['image', 'voice', 'video'],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
default: '',
|
|
97
|
-
required: true,
|
|
98
|
-
description: '媒体文件ID(需先通过素材管理接口上传获得)',
|
|
99
|
-
hint: '可以使用表达式从前面节点获取,如:{{$json.media_id}}',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
displayName: '视频标题',
|
|
103
|
-
name: 'videoTitle',
|
|
104
|
-
type: 'string',
|
|
105
|
-
displayOptions: {
|
|
106
|
-
show: {
|
|
107
|
-
...showOnlyForPassiveReply,
|
|
108
|
-
operation: ['reply'],
|
|
109
|
-
replyType: ['video'],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
default: '',
|
|
113
|
-
description: '视频标题(可选)',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
displayName: '视频描述',
|
|
117
|
-
name: 'videoDescription',
|
|
118
|
-
type: 'string',
|
|
119
|
-
typeOptions: {
|
|
120
|
-
rows: 2,
|
|
121
|
-
},
|
|
122
|
-
displayOptions: {
|
|
123
|
-
show: {
|
|
124
|
-
...showOnlyForPassiveReply,
|
|
125
|
-
operation: ['reply'],
|
|
126
|
-
replyType: ['video'],
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
default: '',
|
|
130
|
-
description: '视频描述(可选)',
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
displayName: '图文消息',
|
|
134
|
-
name: 'articles',
|
|
135
|
-
type: 'fixedCollection',
|
|
136
|
-
typeOptions: {
|
|
137
|
-
multipleValues: true,
|
|
138
|
-
},
|
|
139
|
-
displayOptions: {
|
|
140
|
-
show: {
|
|
141
|
-
...showOnlyForPassiveReply,
|
|
142
|
-
operation: ['reply'],
|
|
143
|
-
replyType: ['news'],
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
default: {},
|
|
147
|
-
placeholder: '添加图文',
|
|
148
|
-
options: [
|
|
149
|
-
{
|
|
150
|
-
name: 'article',
|
|
151
|
-
displayName: '图文',
|
|
152
|
-
values: [
|
|
153
|
-
{
|
|
154
|
-
displayName: '标题',
|
|
155
|
-
name: 'title',
|
|
156
|
-
type: 'string',
|
|
157
|
-
default: '',
|
|
158
|
-
required: true,
|
|
159
|
-
description: '图文标题',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
displayName: '描述',
|
|
163
|
-
name: 'description',
|
|
164
|
-
type: 'string',
|
|
165
|
-
typeOptions: {
|
|
166
|
-
rows: 2,
|
|
167
|
-
},
|
|
168
|
-
default: '',
|
|
169
|
-
description: '图文描述',
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
displayName: '链接',
|
|
173
|
-
name: 'url',
|
|
174
|
-
type: 'string',
|
|
175
|
-
default: '',
|
|
176
|
-
required: true,
|
|
177
|
-
description: '点击后跳转的链接',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
displayName: '封面图片链接',
|
|
181
|
-
name: 'picUrl',
|
|
182
|
-
type: 'string',
|
|
183
|
-
default: '',
|
|
184
|
-
description: '图文封面图片URL',
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
|
-
description: '图文消息列表',
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
displayName: '使用说明',
|
|
193
|
-
name: 'passiveReplyNotice',
|
|
194
|
-
type: 'notice',
|
|
195
|
-
displayOptions: {
|
|
196
|
-
show: {
|
|
197
|
-
...showOnlyForPassiveReply,
|
|
198
|
-
operation: ['reply'],
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
default: '',
|
|
202
|
-
description: '此节点生成并返回加密的XML响应。使用步骤:连接「企业微信消息接收(被动回复)触发器」→ 中间处理节点(可选)→ 本节点。本节点必须是工作流的最后一个节点。',
|
|
203
|
-
},
|
|
204
|
-
];
|
|
205
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/passiveReply/index.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,cAAc,CAAC;CAC1B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,YAAY;gBACpB,WAAW,EAAE,sCAAsC;aACnD;SACD;QACD,OAAO,EAAE,OAAO;KAChB;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,GAAG,uBAAuB;gBAC1B,SAAS,EAAE,CAAC,OAAO,CAAC;aACpB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,QAAQ;aACrB;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,QAAQ;aACrB;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,QAAQ;aACrB;YACD;gBACC,IAA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