n8n-nodes-wecom 0.1.2 → 0.1.4
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 +37 -7
- package/dist/nodes/WeCom/WeCom.node.js +25 -9
- package/dist/nodes/WeCom/WeCom.node.js.map +1 -1
- package/dist/nodes/WeCom/resources/material/execute.js +40 -14
- package/dist/nodes/WeCom/resources/material/execute.js.map +1 -1
- package/dist/nodes/WeCom/resources/pushMessage/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/pushMessage/execute.js +144 -0
- package/dist/nodes/WeCom/resources/pushMessage/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/pushMessage/index.js +77 -0
- package/dist/nodes/WeCom/resources/pushMessage/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveEvent.d.ts +94 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveEvent.js +105 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveEvent.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveImage.d.ts +12 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveImage.js +22 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveImage.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveLink.d.ts +14 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveLink.js +22 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveLink.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveLocation.d.ts +15 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveLocation.js +22 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveLocation.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveText.d.ts +11 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveText.js +22 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveText.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveVideo.d.ts +12 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveVideo.js +22 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveVideo.js.map +1 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveVoice.d.ts +12 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveVoice.js +22 -0
- package/dist/nodes/WeCom/resources/pushMessage/receiveVoice.js.map +1 -0
- package/dist/nodes/WeCom/shared/transport.js +18 -5
- package/dist/nodes/WeCom/shared/transport.js.map +1 -1
- package/dist/nodes/WeCom/shared/types.d.ts +57 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveEventDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveEvent = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveEvent'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveEventDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '事件类型',
|
|
11
|
+
name: 'eventType',
|
|
12
|
+
type: 'options',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveEvent,
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: '上报地理位置事件',
|
|
19
|
+
value: 'location',
|
|
20
|
+
description: '用户上报地理位置的事件推送',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: '弹出地理位置选择器事件',
|
|
24
|
+
value: 'location_select',
|
|
25
|
+
description: '用户选择地理位置的事件推送',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: '弹出微信相册发图器事件',
|
|
29
|
+
value: 'pic_weixin',
|
|
30
|
+
description: '用户从微信相册选图的事件推送',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: '弹出拍照或者相册发图事件',
|
|
34
|
+
value: 'pic_photo_or_album',
|
|
35
|
+
description: '用户拍照或从相册选图的事件推送',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: '弹出系统拍照发图事件',
|
|
39
|
+
value: 'pic_sysphoto',
|
|
40
|
+
description: '用户使用系统拍照发图的事件推送',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: '成员变更事件',
|
|
44
|
+
value: 'change_contact',
|
|
45
|
+
description: '通讯录成员的增删改事件',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: '扫码推事件',
|
|
49
|
+
value: 'scancode_push',
|
|
50
|
+
description: '用户扫码后的事件推送',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: '扫码推事件且弹出"消息接收中"提示框',
|
|
54
|
+
value: 'scancode_waitmsg',
|
|
55
|
+
description: '用户扫码后等待消息的事件推送',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: '批量任务完成事件',
|
|
59
|
+
value: 'batch_job_result',
|
|
60
|
+
description: '异步任务完成的事件推送',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: '标签变更事件',
|
|
64
|
+
value: 'change_contact_tag',
|
|
65
|
+
description: '通讯录标签的增删改事件',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: '点击菜单拉取消息事件',
|
|
69
|
+
value: 'click',
|
|
70
|
+
description: '用户点击自定义菜单后的事件推送',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: '点击菜单跳转链接事件',
|
|
74
|
+
value: 'view',
|
|
75
|
+
description: '用户点击菜单跳转链接的事件推送',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: '进入应用事件',
|
|
79
|
+
value: 'enter_agent',
|
|
80
|
+
description: '用户进入应用的事件推送',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: '部门变更事件',
|
|
84
|
+
value: 'change_contact_party',
|
|
85
|
+
description: '通讯录部门的增删改事件',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
default: 'change_contact',
|
|
89
|
+
description: '选择要处理的事件类型',
|
|
90
|
+
hint: '不同事件类型对应不同的数据结构',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
displayName: '事件内容',
|
|
94
|
+
name: 'eventData',
|
|
95
|
+
type: 'json',
|
|
96
|
+
displayOptions: {
|
|
97
|
+
show: showOnlyForReceiveEvent,
|
|
98
|
+
},
|
|
99
|
+
default: '{}',
|
|
100
|
+
description: '接收到的事件数据(JSON格式)',
|
|
101
|
+
hint: '包含Event、ChangeType等字段的事件体,具体字段根据事件类型不同而不同',
|
|
102
|
+
required: true,
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
//# sourceMappingURL=receiveEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveEvent.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveEvent.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,eAAe;aAC5B;YACD;gBACC,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,eAAe;aAC5B;YACD;gBACC,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,gBAAgB;aAC7B;YACD;gBACC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;QAC/B,IAAI,EAAE,2CAA2C;QACjD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const receiveImageDescription: INodeProperties[];
|
|
3
|
+
export interface IReceiveImageMessage {
|
|
4
|
+
ToUserName: string;
|
|
5
|
+
FromUserName: string;
|
|
6
|
+
CreateTime: number;
|
|
7
|
+
MsgType: 'image';
|
|
8
|
+
PicUrl: string;
|
|
9
|
+
MediaId: string;
|
|
10
|
+
MsgId: string;
|
|
11
|
+
AgentID: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveImageDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveImage = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveImage'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveImageDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '消息内容',
|
|
11
|
+
name: 'messageData',
|
|
12
|
+
type: 'json',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveImage,
|
|
15
|
+
},
|
|
16
|
+
default: '{}',
|
|
17
|
+
description: '接收到的图片消息数据(JSON格式)',
|
|
18
|
+
hint: '包含FromUserName、ToUserName、PicUrl、MediaId等字段的消息体',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=receiveImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveImage.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveImage.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,iDAAiD;QACvD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const receiveLinkDescription: INodeProperties[];
|
|
3
|
+
export interface IReceiveLinkMessage {
|
|
4
|
+
ToUserName: string;
|
|
5
|
+
FromUserName: string;
|
|
6
|
+
CreateTime: number;
|
|
7
|
+
MsgType: 'link';
|
|
8
|
+
Title: string;
|
|
9
|
+
Description: string;
|
|
10
|
+
Url: string;
|
|
11
|
+
PicUrl: string;
|
|
12
|
+
MsgId: string;
|
|
13
|
+
AgentID: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveLinkDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveLink = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveLink'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveLinkDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '消息内容',
|
|
11
|
+
name: 'messageData',
|
|
12
|
+
type: 'json',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveLink,
|
|
15
|
+
},
|
|
16
|
+
default: '{}',
|
|
17
|
+
description: '接收到的链接消息数据(JSON格式)',
|
|
18
|
+
hint: '包含FromUserName、ToUserName、Title、Description、Url等字段的消息体',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=receiveLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveLink.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveLink.ts"],"names":[],"mappings":";;;AAEA,MAAM,sBAAsB,GAAG;IAC9B,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,sBAAsB;SAC5B;QACD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,wDAAwD;QAC9D,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const receiveLocationDescription: INodeProperties[];
|
|
3
|
+
export interface IReceiveLocationMessage {
|
|
4
|
+
ToUserName: string;
|
|
5
|
+
FromUserName: string;
|
|
6
|
+
CreateTime: number;
|
|
7
|
+
MsgType: 'location';
|
|
8
|
+
Location_X: number;
|
|
9
|
+
Location_Y: number;
|
|
10
|
+
Scale: number;
|
|
11
|
+
Label: string;
|
|
12
|
+
MsgId: string;
|
|
13
|
+
AgentID: number;
|
|
14
|
+
AppType: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveLocationDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveLocation = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveLocation'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveLocationDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '消息内容',
|
|
11
|
+
name: 'messageData',
|
|
12
|
+
type: 'json',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveLocation,
|
|
15
|
+
},
|
|
16
|
+
default: '{}',
|
|
17
|
+
description: '接收到的位置消息数据(JSON格式)',
|
|
18
|
+
hint: '包含FromUserName、ToUserName、Location_X、Location_Y、Label等字段的消息体',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=receiveLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveLocation.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveLocation.ts"],"names":[],"mappings":";;;AAEA,MAAM,0BAA0B,GAAG;IAClC,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,iBAAiB,CAAC;CAC9B,CAAC;AAEW,QAAA,0BAA0B,GAAsB;IAC5D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,0BAA0B;SAChC;QACD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,8DAA8D;QACpE,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const receiveTextDescription: INodeProperties[];
|
|
3
|
+
export interface IReceiveTextMessage {
|
|
4
|
+
ToUserName: string;
|
|
5
|
+
FromUserName: string;
|
|
6
|
+
CreateTime: number;
|
|
7
|
+
MsgType: 'text';
|
|
8
|
+
Content: string;
|
|
9
|
+
MsgId: string;
|
|
10
|
+
AgentID: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveTextDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveText = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveText'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveTextDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '消息内容',
|
|
11
|
+
name: 'messageData',
|
|
12
|
+
type: 'json',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveText,
|
|
15
|
+
},
|
|
16
|
+
default: '{}',
|
|
17
|
+
description: '接收到的文本消息数据(JSON格式)',
|
|
18
|
+
hint: '包含FromUserName、ToUserName、Content等字段的消息体',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=receiveText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveText.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveText.ts"],"names":[],"mappings":";;;AAEA,MAAM,sBAAsB,GAAG;IAC9B,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,sBAAsB;SAC5B;QACD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,0CAA0C;QAChD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const receiveVideoDescription: INodeProperties[];
|
|
3
|
+
export interface IReceiveVideoMessage {
|
|
4
|
+
ToUserName: string;
|
|
5
|
+
FromUserName: string;
|
|
6
|
+
CreateTime: number;
|
|
7
|
+
MsgType: 'video';
|
|
8
|
+
MediaId: string;
|
|
9
|
+
ThumbMediaId: string;
|
|
10
|
+
MsgId: string;
|
|
11
|
+
AgentID: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveVideoDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveVideo = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveVideo'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveVideoDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '消息内容',
|
|
11
|
+
name: 'messageData',
|
|
12
|
+
type: 'json',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveVideo,
|
|
15
|
+
},
|
|
16
|
+
default: '{}',
|
|
17
|
+
description: '接收到的视频消息数据(JSON格式)',
|
|
18
|
+
hint: '包含FromUserName、ToUserName、MediaId、ThumbMediaId等字段的消息体',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=receiveVideo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveVideo.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveVideo.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,uDAAuD;QAC7D,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const receiveVoiceDescription: INodeProperties[];
|
|
3
|
+
export interface IReceiveVoiceMessage {
|
|
4
|
+
ToUserName: string;
|
|
5
|
+
FromUserName: string;
|
|
6
|
+
CreateTime: number;
|
|
7
|
+
MsgType: 'voice';
|
|
8
|
+
MediaId: string;
|
|
9
|
+
Format: string;
|
|
10
|
+
MsgId: string;
|
|
11
|
+
AgentID: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiveVoiceDescription = void 0;
|
|
4
|
+
const showOnlyForReceiveVoice = {
|
|
5
|
+
resource: ['pushMessage'],
|
|
6
|
+
operation: ['receiveVoice'],
|
|
7
|
+
};
|
|
8
|
+
exports.receiveVoiceDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '消息内容',
|
|
11
|
+
name: 'messageData',
|
|
12
|
+
type: 'json',
|
|
13
|
+
displayOptions: {
|
|
14
|
+
show: showOnlyForReceiveVoice,
|
|
15
|
+
},
|
|
16
|
+
default: '{}',
|
|
17
|
+
description: '接收到的语音消息数据(JSON格式)',
|
|
18
|
+
hint: '包含FromUserName、ToUserName、MediaId、Format等字段的消息体',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=receiveVoice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receiveVoice.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/pushMessage/receiveVoice.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,iDAAiD;QACvD,QAAQ,EAAE,IAAI;KACd;CACD,CAAC"}
|
|
@@ -6,6 +6,19 @@ exports.weComApiRequest = weComApiRequest;
|
|
|
6
6
|
exports.uploadMedia = uploadMedia;
|
|
7
7
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
8
8
|
const accessTokenCache = new Map();
|
|
9
|
+
const MAX_CACHE_AGE = 3 * 60 * 60 * 1000;
|
|
10
|
+
const CLEANUP_THRESHOLD = 50;
|
|
11
|
+
function cleanupExpiredCache() {
|
|
12
|
+
if (accessTokenCache.size <= CLEANUP_THRESHOLD) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const now = Date.now();
|
|
16
|
+
for (const [key, cache] of accessTokenCache.entries()) {
|
|
17
|
+
if (cache.expiresAt < now || now - cache.lastAccess > MAX_CACHE_AGE) {
|
|
18
|
+
accessTokenCache.delete(key);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
9
22
|
function getCacheKey(credentials) {
|
|
10
23
|
return `${credentials.corpId}-${credentials.corpSecret}`;
|
|
11
24
|
}
|
|
@@ -16,11 +29,13 @@ function clearAccessTokenCache(credentials) {
|
|
|
16
29
|
async function getAccessToken() {
|
|
17
30
|
const credentials = (await this.getCredentials('weComApi'));
|
|
18
31
|
const cacheKey = getCacheKey(credentials);
|
|
32
|
+
cleanupExpiredCache();
|
|
19
33
|
const cached = accessTokenCache.get(cacheKey);
|
|
20
34
|
if (cached === null || cached === void 0 ? void 0 : cached.pending) {
|
|
21
35
|
return await cached.pending;
|
|
22
36
|
}
|
|
23
37
|
if (cached && cached.expiresAt > Date.now()) {
|
|
38
|
+
cached.lastAccess = Date.now();
|
|
24
39
|
return cached.token;
|
|
25
40
|
}
|
|
26
41
|
const tokenPromise = fetchAccessToken.call(this, credentials, cacheKey);
|
|
@@ -28,6 +43,7 @@ async function getAccessToken() {
|
|
|
28
43
|
token: '',
|
|
29
44
|
expiresAt: 0,
|
|
30
45
|
pending: tokenPromise,
|
|
46
|
+
lastAccess: Date.now(),
|
|
31
47
|
});
|
|
32
48
|
try {
|
|
33
49
|
const token = await tokenPromise;
|
|
@@ -56,6 +72,7 @@ async function fetchAccessToken(credentials, cacheKey) {
|
|
|
56
72
|
accessTokenCache.set(cacheKey, {
|
|
57
73
|
token: response.access_token,
|
|
58
74
|
expiresAt: Date.now() + (expiresIn - 300) * 1000,
|
|
75
|
+
lastAccess: Date.now(),
|
|
59
76
|
});
|
|
60
77
|
return response.access_token;
|
|
61
78
|
}
|
|
@@ -71,11 +88,7 @@ async function weComApiRequest(method, resource, body = {}, qs = {}, headers = {
|
|
|
71
88
|
json: true,
|
|
72
89
|
...option,
|
|
73
90
|
};
|
|
74
|
-
if (
|
|
75
|
-
options.body = option.formData;
|
|
76
|
-
delete options.json;
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
91
|
+
if (Object.keys(body).length > 0) {
|
|
79
92
|
options.body = body;
|
|
80
93
|
}
|
|
81
94
|
if (Object.keys(headers).length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../nodes/WeCom/shared/transport.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../nodes/WeCom/shared/transport.ts"],"names":[],"mappings":";;AA8DA,sDAGC;AAUD,wCA0CC;AA+CD,0CAiEC;AAKD,kCAqCC;AAxQD,+CAAkD;AAoBlD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAsB,CAAC;AAGvD,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACzC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AA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E;gBACN,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE;oBACR,QAAQ;oBACR,WAAW,EAAE,cAAc,CAAC,QAAQ,CAAC;iBACrC;aACD;SACD;QACD,IAAI,EAAE,IAAI;KACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAgB,CAAC;IAE1E,IAAK,QAAQ,CAAC,OAAkB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC9D,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,aAAa,QAAQ,CAAC,MAAM,UAAU,QAAQ,CAAC,OAAO,GAAG,CACzD,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC,QAAkB,CAAC;AACpC,CAAC;AAED,SAAS,cAAc,CAAC,QAAgB;;IACvC,MAAM,GAAG,GAAG,MAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,0CAAE,WAAW,EAAE,CAAC;IACrD,MAAM,SAAS,GAA8B;QAC5C,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,YAAY;QACjB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,iBAAiB;QACtB,GAAG,EAAE,oBAAoB;QACzB,IAAI,EAAE,yEAAyE;QAC/E,GAAG,EAAE,0BAA0B;QAC/B,IAAI,EAAE,mEAAmE;KACzE,CAAC;IACF,OAAO,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,0BAA0B,CAAC;AAC3D,CAAC"}
|
|
@@ -19,3 +19,60 @@ export interface IWeComMessageResponse {
|
|
|
19
19
|
response_code?: string;
|
|
20
20
|
}
|
|
21
21
|
export type MessageType = 'text' | 'image' | 'voice' | 'video' | 'file' | 'textcard' | 'news' | 'mpnews' | 'markdown';
|
|
22
|
+
export type PushMessageType = 'text' | 'image' | 'voice' | 'video' | 'location' | 'link' | 'event';
|
|
23
|
+
export type EventType = 'change_contact' | 'change_contact_party' | 'change_contact_tag' | 'click' | 'view' | 'scancode_push' | 'scancode_waitmsg' | 'pic_sysphoto' | 'pic_photo_or_album' | 'pic_weixin' | 'location_select' | 'location' | 'enter_agent' | 'batch_job_result';
|
|
24
|
+
export type ChangeType = 'create_user' | 'update_user' | 'delete_user' | 'create_party' | 'update_party' | 'delete_party' | 'create_tag' | 'update_tag' | 'delete_tag' | 'update_tag_user';
|
|
25
|
+
export interface IBasePushMessage {
|
|
26
|
+
ToUserName: string;
|
|
27
|
+
FromUserName: string;
|
|
28
|
+
CreateTime: number;
|
|
29
|
+
MsgType: string;
|
|
30
|
+
AgentID?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface IPushTextMessage extends IBasePushMessage {
|
|
33
|
+
MsgType: 'text';
|
|
34
|
+
Content: string;
|
|
35
|
+
MsgId: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IPushImageMessage extends IBasePushMessage {
|
|
38
|
+
MsgType: 'image';
|
|
39
|
+
PicUrl: string;
|
|
40
|
+
MediaId: string;
|
|
41
|
+
MsgId: string;
|
|
42
|
+
}
|
|
43
|
+
export interface IPushVoiceMessage extends IBasePushMessage {
|
|
44
|
+
MsgType: 'voice';
|
|
45
|
+
MediaId: string;
|
|
46
|
+
Format: string;
|
|
47
|
+
MsgId: string;
|
|
48
|
+
}
|
|
49
|
+
export interface IPushVideoMessage extends IBasePushMessage {
|
|
50
|
+
MsgType: 'video';
|
|
51
|
+
MediaId: string;
|
|
52
|
+
ThumbMediaId: string;
|
|
53
|
+
MsgId: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IPushLocationMessage extends IBasePushMessage {
|
|
56
|
+
MsgType: 'location';
|
|
57
|
+
Location_X: number;
|
|
58
|
+
Location_Y: number;
|
|
59
|
+
Scale: number;
|
|
60
|
+
Label: string;
|
|
61
|
+
MsgId: string;
|
|
62
|
+
AppType: string;
|
|
63
|
+
}
|
|
64
|
+
export interface IPushLinkMessage extends IBasePushMessage {
|
|
65
|
+
MsgType: 'link';
|
|
66
|
+
Title: string;
|
|
67
|
+
Description: string;
|
|
68
|
+
Url: string;
|
|
69
|
+
PicUrl: string;
|
|
70
|
+
MsgId: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IPushEventMessage extends IBasePushMessage {
|
|
73
|
+
MsgType: 'event';
|
|
74
|
+
Event: string;
|
|
75
|
+
ChangeType?: string;
|
|
76
|
+
EventKey?: string;
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-wecom",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "n8n community node for WeCom (WeChat Work) integration. Send messages and manage contacts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/funcodingdev/n8n-nodes-wecom",
|