n8n-nodes-wecom 0.1.1

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.
Files changed (122) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +89 -0
  3. package/dist/credentials/WeComApi.credentials.d.ts +10 -0
  4. package/dist/credentials/WeComApi.credentials.js +58 -0
  5. package/dist/credentials/WeComApi.credentials.js.map +1 -0
  6. package/dist/icons/wecom.dark.png +0 -0
  7. package/dist/icons/wecom.png +0 -0
  8. package/dist/nodes/WeCom/WeCom.node.d.ts +15 -0
  9. package/dist/nodes/WeCom/WeCom.node.js +156 -0
  10. package/dist/nodes/WeCom/WeCom.node.js.map +1 -0
  11. package/dist/nodes/WeCom/WeCom.node.json +19 -0
  12. package/dist/nodes/WeCom/resources/contact/convertToOpenid.d.ts +2 -0
  13. package/dist/nodes/WeCom/resources/contact/convertToOpenid.js +24 -0
  14. package/dist/nodes/WeCom/resources/contact/convertToOpenid.js.map +1 -0
  15. package/dist/nodes/WeCom/resources/contact/convertToUserid.d.ts +2 -0
  16. package/dist/nodes/WeCom/resources/contact/convertToUserid.js +21 -0
  17. package/dist/nodes/WeCom/resources/contact/convertToUserid.js.map +1 -0
  18. package/dist/nodes/WeCom/resources/contact/execute.d.ts +2 -0
  19. package/dist/nodes/WeCom/resources/contact/execute.js +89 -0
  20. package/dist/nodes/WeCom/resources/contact/execute.js.map +1 -0
  21. package/dist/nodes/WeCom/resources/contact/getDepartment.d.ts +2 -0
  22. package/dist/nodes/WeCom/resources/contact/getDepartment.js +23 -0
  23. package/dist/nodes/WeCom/resources/contact/getDepartment.js.map +1 -0
  24. package/dist/nodes/WeCom/resources/contact/getTag.d.ts +2 -0
  25. package/dist/nodes/WeCom/resources/contact/getTag.js +24 -0
  26. package/dist/nodes/WeCom/resources/contact/getTag.js.map +1 -0
  27. package/dist/nodes/WeCom/resources/contact/getTagList.d.ts +2 -0
  28. package/dist/nodes/WeCom/resources/contact/getTagList.js +34 -0
  29. package/dist/nodes/WeCom/resources/contact/getTagList.js.map +1 -0
  30. package/dist/nodes/WeCom/resources/contact/getUser.d.ts +2 -0
  31. package/dist/nodes/WeCom/resources/contact/getUser.js +24 -0
  32. package/dist/nodes/WeCom/resources/contact/getUser.js.map +1 -0
  33. package/dist/nodes/WeCom/resources/contact/index.d.ts +2 -0
  34. package/dist/nodes/WeCom/resources/contact/index.js +93 -0
  35. package/dist/nodes/WeCom/resources/contact/index.js.map +1 -0
  36. package/dist/nodes/WeCom/resources/contact/listUserIds.d.ts +2 -0
  37. package/dist/nodes/WeCom/resources/contact/listUserIds.js +35 -0
  38. package/dist/nodes/WeCom/resources/contact/listUserIds.js.map +1 -0
  39. package/dist/nodes/WeCom/resources/contact/listUsers.d.ts +2 -0
  40. package/dist/nodes/WeCom/resources/contact/listUsers.js +34 -0
  41. package/dist/nodes/WeCom/resources/contact/listUsers.js.map +1 -0
  42. package/dist/nodes/WeCom/resources/contact/listUsersDetail.d.ts +2 -0
  43. package/dist/nodes/WeCom/resources/contact/listUsersDetail.js +34 -0
  44. package/dist/nodes/WeCom/resources/contact/listUsersDetail.js.map +1 -0
  45. package/dist/nodes/WeCom/resources/material/execute.d.ts +2 -0
  46. package/dist/nodes/WeCom/resources/material/execute.js +129 -0
  47. package/dist/nodes/WeCom/resources/material/execute.js.map +1 -0
  48. package/dist/nodes/WeCom/resources/material/getPermanent.d.ts +2 -0
  49. package/dist/nodes/WeCom/resources/material/getPermanent.js +31 -0
  50. package/dist/nodes/WeCom/resources/material/getPermanent.js.map +1 -0
  51. package/dist/nodes/WeCom/resources/material/getTemp.d.ts +2 -0
  52. package/dist/nodes/WeCom/resources/material/getTemp.js +31 -0
  53. package/dist/nodes/WeCom/resources/material/getTemp.js.map +1 -0
  54. package/dist/nodes/WeCom/resources/material/index.d.ts +2 -0
  55. package/dist/nodes/WeCom/resources/material/index.js +52 -0
  56. package/dist/nodes/WeCom/resources/material/index.js.map +1 -0
  57. package/dist/nodes/WeCom/resources/material/uploadPermanent.d.ts +2 -0
  58. package/dist/nodes/WeCom/resources/material/uploadPermanent.js +49 -0
  59. package/dist/nodes/WeCom/resources/material/uploadPermanent.js.map +1 -0
  60. package/dist/nodes/WeCom/resources/material/uploadTemp.d.ts +2 -0
  61. package/dist/nodes/WeCom/resources/material/uploadTemp.js +49 -0
  62. package/dist/nodes/WeCom/resources/material/uploadTemp.js.map +1 -0
  63. package/dist/nodes/WeCom/resources/message/commonFields.d.ts +7 -0
  64. package/dist/nodes/WeCom/resources/message/commonFields.js +155 -0
  65. package/dist/nodes/WeCom/resources/message/commonFields.js.map +1 -0
  66. package/dist/nodes/WeCom/resources/message/execute.d.ts +2 -0
  67. package/dist/nodes/WeCom/resources/message/execute.js +615 -0
  68. package/dist/nodes/WeCom/resources/message/execute.js.map +1 -0
  69. package/dist/nodes/WeCom/resources/message/index.d.ts +2 -0
  70. package/dist/nodes/WeCom/resources/message/index.js +133 -0
  71. package/dist/nodes/WeCom/resources/message/index.js.map +1 -0
  72. package/dist/nodes/WeCom/resources/message/recallMessage.d.ts +2 -0
  73. package/dist/nodes/WeCom/resources/message/recallMessage.js +21 -0
  74. package/dist/nodes/WeCom/resources/message/recallMessage.js.map +1 -0
  75. package/dist/nodes/WeCom/resources/message/sendFile.d.ts +2 -0
  76. package/dist/nodes/WeCom/resources/message/sendFile.js +62 -0
  77. package/dist/nodes/WeCom/resources/message/sendFile.js.map +1 -0
  78. package/dist/nodes/WeCom/resources/message/sendImage.d.ts +2 -0
  79. package/dist/nodes/WeCom/resources/message/sendImage.js +62 -0
  80. package/dist/nodes/WeCom/resources/message/sendImage.js.map +1 -0
  81. package/dist/nodes/WeCom/resources/message/sendMarkdown.d.ts +2 -0
  82. package/dist/nodes/WeCom/resources/message/sendMarkdown.js +26 -0
  83. package/dist/nodes/WeCom/resources/message/sendMarkdown.js.map +1 -0
  84. package/dist/nodes/WeCom/resources/message/sendMiniprogramNotice.d.ts +2 -0
  85. package/dist/nodes/WeCom/resources/message/sendMiniprogramNotice.js +138 -0
  86. package/dist/nodes/WeCom/resources/message/sendMiniprogramNotice.js.map +1 -0
  87. package/dist/nodes/WeCom/resources/message/sendMpNews.d.ts +2 -0
  88. package/dist/nodes/WeCom/resources/message/sendMpNews.js +122 -0
  89. package/dist/nodes/WeCom/resources/message/sendMpNews.js.map +1 -0
  90. package/dist/nodes/WeCom/resources/message/sendNews.d.ts +2 -0
  91. package/dist/nodes/WeCom/resources/message/sendNews.js +101 -0
  92. package/dist/nodes/WeCom/resources/message/sendNews.js.map +1 -0
  93. package/dist/nodes/WeCom/resources/message/sendTaskCard.d.ts +2 -0
  94. package/dist/nodes/WeCom/resources/message/sendTaskCard.js +160 -0
  95. package/dist/nodes/WeCom/resources/message/sendTaskCard.js.map +1 -0
  96. package/dist/nodes/WeCom/resources/message/sendTemplateCard.d.ts +2 -0
  97. package/dist/nodes/WeCom/resources/message/sendTemplateCard.js +298 -0
  98. package/dist/nodes/WeCom/resources/message/sendTemplateCard.js.map +1 -0
  99. package/dist/nodes/WeCom/resources/message/sendText.d.ts +2 -0
  100. package/dist/nodes/WeCom/resources/message/sendText.js +69 -0
  101. package/dist/nodes/WeCom/resources/message/sendText.js.map +1 -0
  102. package/dist/nodes/WeCom/resources/message/sendTextCard.d.ts +2 -0
  103. package/dist/nodes/WeCom/resources/message/sendTextCard.js +91 -0
  104. package/dist/nodes/WeCom/resources/message/sendTextCard.js.map +1 -0
  105. package/dist/nodes/WeCom/resources/message/sendVideo.d.ts +2 -0
  106. package/dist/nodes/WeCom/resources/message/sendVideo.js +126 -0
  107. package/dist/nodes/WeCom/resources/message/sendVideo.js.map +1 -0
  108. package/dist/nodes/WeCom/resources/message/sendVoice.d.ts +2 -0
  109. package/dist/nodes/WeCom/resources/message/sendVoice.js +103 -0
  110. package/dist/nodes/WeCom/resources/message/sendVoice.js.map +1 -0
  111. package/dist/nodes/WeCom/resources/message/updateTemplateCard.d.ts +2 -0
  112. package/dist/nodes/WeCom/resources/message/updateTemplateCard.js +286 -0
  113. package/dist/nodes/WeCom/resources/message/updateTemplateCard.js.map +1 -0
  114. package/dist/nodes/WeCom/shared/transport.d.ts +6 -0
  115. package/dist/nodes/WeCom/shared/transport.js +150 -0
  116. package/dist/nodes/WeCom/shared/transport.js.map +1 -0
  117. package/dist/nodes/WeCom/shared/types.d.ts +21 -0
  118. package/dist/nodes/WeCom/shared/types.js +3 -0
  119. package/dist/nodes/WeCom/shared/types.js.map +1 -0
  120. package/dist/package.json +56 -0
  121. package/dist/tsconfig.tsbuildinfo +1 -0
  122. package/package.json +56 -0
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTagListDescription = void 0;
4
+ const showOnlyGetTagList = {
5
+ resource: ['contact'],
6
+ operation: ['getTagList'],
7
+ };
8
+ exports.getTagListDescription = [
9
+ {
10
+ displayName: '标签类型',
11
+ name: 'tag_type',
12
+ type: 'options',
13
+ options: [
14
+ {
15
+ name: '全部标签',
16
+ value: '',
17
+ },
18
+ {
19
+ name: '个人标签',
20
+ value: 'person',
21
+ },
22
+ {
23
+ name: '部门标签',
24
+ value: 'department',
25
+ },
26
+ ],
27
+ default: '',
28
+ displayOptions: {
29
+ show: showOnlyGetTagList,
30
+ },
31
+ description: '标签类型:不填则获取全部标签,person-个人标签,department-部门标签',
32
+ },
33
+ ];
34
+ //# sourceMappingURL=getTagList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTagList.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/contact/getTagList.ts"],"names":[],"mappings":";;;AAEA,MAAM,kBAAkB,GAAG;IAC1B,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,YAAY,CAAC;CACzB,CAAC;AAEW,QAAA,qBAAqB,GAAsB;IACvD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,EAAE;aACT;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,QAAQ;aACf;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,YAAY;aACnB;SACD;QACD,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,kBAAkB;SACxB;QACD,WAAW,EAAE,4CAA4C;KACzD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const getUserDescription: INodeProperties[];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getUserDescription = void 0;
4
+ const showOnlyGetUser = {
5
+ resource: ['contact'],
6
+ operation: ['getUser'],
7
+ };
8
+ exports.getUserDescription = [
9
+ {
10
+ displayName: '成员 Name or ID',
11
+ name: 'userid',
12
+ type: 'options',
13
+ typeOptions: {
14
+ loadOptionsMethod: 'getAllUsers',
15
+ },
16
+ required: true,
17
+ default: '',
18
+ displayOptions: {
19
+ show: showOnlyGetUser,
20
+ },
21
+ description: '成员UserID。对应管理端的账号,企业内必须唯一. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
22
+ },
23
+ ];
24
+ //# sourceMappingURL=getUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUser.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/contact/getUser.ts"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAG;IACvB,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,SAAS,CAAC;CACtB,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,aAAa;SAChC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,eAAe;SACrB;QACD,WAAW,EAAE,4IAA4I;KACzJ;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const contactDescription: INodeProperties[];
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contactDescription = void 0;
4
+ const getUser_1 = require("./getUser");
5
+ const listUsers_1 = require("./listUsers");
6
+ const listUsersDetail_1 = require("./listUsersDetail");
7
+ const listUserIds_1 = require("./listUserIds");
8
+ const getDepartment_1 = require("./getDepartment");
9
+ const convertToOpenid_1 = require("./convertToOpenid");
10
+ const convertToUserid_1 = require("./convertToUserid");
11
+ const getTagList_1 = require("./getTagList");
12
+ const getTag_1 = require("./getTag");
13
+ const showOnlyForContact = {
14
+ resource: ['contact'],
15
+ };
16
+ exports.contactDescription = [
17
+ {
18
+ displayName: '操作',
19
+ name: 'operation',
20
+ type: 'options',
21
+ noDataExpression: true,
22
+ displayOptions: {
23
+ show: showOnlyForContact,
24
+ },
25
+ options: [
26
+ {
27
+ name: 'OpenID转UserID',
28
+ value: 'convertToUserid',
29
+ action: 'Open id userid',
30
+ description: '将 openid 转换为企业成员的 userid',
31
+ },
32
+ {
33
+ name: 'UserID转OpenID',
34
+ value: 'convertToOpenid',
35
+ action: 'Userid open id',
36
+ description: '将企业成员的 userid 转换为 openid',
37
+ },
38
+ {
39
+ name: '获取成员ID列表',
40
+ value: 'listUserIds',
41
+ action: '获取成员ID列表',
42
+ description: '获取企业所有成员的UserID列表,支持分页',
43
+ },
44
+ {
45
+ name: '获取成员信息',
46
+ value: 'getUser',
47
+ action: '获取成员信息',
48
+ description: '读取成员详细信息',
49
+ },
50
+ {
51
+ name: '获取标签列表',
52
+ value: 'getTagList',
53
+ action: '获取标签列表',
54
+ description: '获取企业标签列表',
55
+ },
56
+ {
57
+ name: '获取标签成员',
58
+ value: 'getTag',
59
+ action: '获取标签成员',
60
+ description: '获取标签成员列表',
61
+ },
62
+ {
63
+ name: '获取部门信息',
64
+ value: 'getDepartment',
65
+ action: '获取部门信息',
66
+ description: '获取部门列表',
67
+ },
68
+ {
69
+ name: '获取部门成员列表',
70
+ value: 'listUsers',
71
+ action: '获取部门成员列表',
72
+ description: '获取部门成员列表(仅包含基本信息)',
73
+ },
74
+ {
75
+ name: '获取部门成员详情',
76
+ value: 'listUsersDetail',
77
+ action: '获取部门成员详情列表',
78
+ description: '获取部门成员列表(包含完整信息)',
79
+ },
80
+ ],
81
+ default: 'getUser',
82
+ },
83
+ ...getUser_1.getUserDescription,
84
+ ...listUsers_1.listUsersDescription,
85
+ ...listUsersDetail_1.listUsersDetailDescription,
86
+ ...listUserIds_1.listUserIdsDescription,
87
+ ...getDepartment_1.getDepartmentDescription,
88
+ ...convertToOpenid_1.convertToOpenidDescription,
89
+ ...convertToUserid_1.convertToUseridDescription,
90
+ ...getTagList_1.getTagListDescription,
91
+ ...getTag_1.getTagDescription,
92
+ ];
93
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/contact/index.ts"],"names":[],"mappings":";;;AACA,uCAA+C;AAC/C,2CAAmD;AACnD,uDAA+D;AAC/D,+CAAuD;AACvD,mDAA2D;AAC3D,uDAA+D;AAC/D,uDAA+D;AAC/D,6CAAqD;AACrD,qCAA6C;AAE7C,MAAM,kBAAkB,GAAG;IAC1B,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,kBAAkB;SACxB;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,eAAe;gBAC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@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const listUserIdsDescription: INodeProperties[];
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listUserIdsDescription = void 0;
4
+ const showOnlyListUserIds = {
5
+ resource: ['contact'],
6
+ operation: ['listUserIds'],
7
+ };
8
+ exports.listUserIdsDescription = [
9
+ {
10
+ displayName: '游标',
11
+ name: 'cursor',
12
+ type: 'string',
13
+ default: '',
14
+ displayOptions: {
15
+ show: showOnlyListUserIds,
16
+ },
17
+ description: '分页查询的游标,首次调用不填,后续调用填上次调用返回的 next_cursor 值',
18
+ },
19
+ {
20
+ displayName: '每页数量',
21
+ name: 'limit',
22
+ type: 'number',
23
+ default: 50,
24
+ displayOptions: {
25
+ show: showOnlyListUserIds,
26
+ },
27
+ hint: '每次拉取的数据量,默认值50,最大值1000',
28
+ description: 'Max number of results to return',
29
+ typeOptions: {
30
+ minValue: 1,
31
+ maxValue: 1000,
32
+ },
33
+ },
34
+ ];
35
+ //# sourceMappingURL=listUserIds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listUserIds.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/contact/listUserIds.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAG;IAC3B,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;QACD,WAAW,EAAE,2CAA2C;KACxD;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;QACD,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,IAAI;SACd;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const listUsersDescription: INodeProperties[];
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listUsersDescription = void 0;
4
+ const showOnlyListUsers = {
5
+ resource: ['contact'],
6
+ operation: ['listUsers'],
7
+ };
8
+ exports.listUsersDescription = [
9
+ {
10
+ displayName: '部门 Name or ID',
11
+ name: 'department_id',
12
+ type: 'options',
13
+ typeOptions: {
14
+ loadOptionsMethod: 'getDepartments',
15
+ },
16
+ required: true,
17
+ default: '',
18
+ displayOptions: {
19
+ show: showOnlyListUsers,
20
+ },
21
+ description: '获取的部门ID,默认为根部门. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
22
+ },
23
+ {
24
+ displayName: '是否递归获取',
25
+ name: 'fetch_child',
26
+ type: 'boolean',
27
+ default: false,
28
+ displayOptions: {
29
+ show: showOnlyListUsers,
30
+ },
31
+ description: 'Whether to recursively fetch members from sub-departments: 1 - fetch recursively, 0 - fetch only from this department',
32
+ },
33
+ ];
34
+ //# sourceMappingURL=listUsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listUsers.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/contact/listUsers.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,WAAW,CAAC;CACxB,CAAC;AAEW,QAAA,oBAAoB,GAAsB;IACtD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,WAAW,EAAE,iIAAiI;KAC9I;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,WAAW,EAAE,uHAAuH;KACpI;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const listUsersDetailDescription: INodeProperties[];
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listUsersDetailDescription = void 0;
4
+ const showOnlyListUsersDetail = {
5
+ resource: ['contact'],
6
+ operation: ['listUsersDetail'],
7
+ };
8
+ exports.listUsersDetailDescription = [
9
+ {
10
+ displayName: '部门 Name or ID',
11
+ name: 'department_id',
12
+ type: 'options',
13
+ typeOptions: {
14
+ loadOptionsMethod: 'getDepartments',
15
+ },
16
+ required: true,
17
+ default: '',
18
+ displayOptions: {
19
+ show: showOnlyListUsersDetail,
20
+ },
21
+ description: '获取的部门ID,默认为根部门. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
22
+ },
23
+ {
24
+ displayName: '是否递归获取',
25
+ name: 'fetch_child',
26
+ type: 'boolean',
27
+ default: false,
28
+ displayOptions: {
29
+ show: showOnlyListUsersDetail,
30
+ },
31
+ description: 'Whether to recursively get members from sub-departments',
32
+ },
33
+ ];
34
+ //# sourceMappingURL=listUsersDetail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listUsersDetail.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/contact/listUsersDetail.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,iBAAiB,CAAC;CAC9B,CAAC;AAEW,QAAA,0BAA0B,GAAsB;IAC5D;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,gBAAgB;SACnC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,WAAW,EAAE,iIAAiI;KAC9I;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;QACD,WAAW,EAAE,yDAAyD;KACtE;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeMaterial(this: IExecuteFunctions, operation: string, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeMaterial = executeMaterial;
4
+ const transport_1 = require("../../shared/transport");
5
+ async function executeMaterial(operation, items) {
6
+ const returnData = [];
7
+ for (let i = 0; i < items.length; i++) {
8
+ try {
9
+ let response;
10
+ if (operation === 'uploadTemp') {
11
+ const type = this.getNodeParameter('type', i);
12
+ const binaryPropertyName = this.getNodeParameter('binaryProperty', i);
13
+ const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
14
+ const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
15
+ const formData = {
16
+ media: {
17
+ value: dataBuffer,
18
+ options: {
19
+ filename: binaryData.fileName || 'file',
20
+ contentType: binaryData.mimeType,
21
+ },
22
+ },
23
+ };
24
+ response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/media/upload', {}, { type }, {}, { formData });
25
+ }
26
+ else if (operation === 'getTemp') {
27
+ const media_id = this.getNodeParameter('media_id', i);
28
+ const binaryPropertyName = this.getNodeParameter('binaryProperty', i);
29
+ const responseData = await transport_1.weComApiRequest.call(this, 'GET', '/cgi-bin/media/get', {}, { media_id }, {}, { encoding: null, resolveWithFullResponse: true });
30
+ let buffer;
31
+ let filename = 'file';
32
+ if (Buffer.isBuffer(responseData.body)) {
33
+ buffer = responseData.body;
34
+ }
35
+ else {
36
+ buffer = Buffer.from(responseData.body);
37
+ }
38
+ if (responseData.headers) {
39
+ const headers = responseData.headers;
40
+ const contentDisposition = headers['content-disposition'];
41
+ if (typeof contentDisposition === 'string') {
42
+ const match = contentDisposition.match(/filename="?(.+?)"?$/);
43
+ if (match) {
44
+ filename = match[1];
45
+ }
46
+ }
47
+ }
48
+ const binaryData = await this.helpers.prepareBinaryData(buffer, filename);
49
+ returnData.push({
50
+ json: { media_id },
51
+ binary: {
52
+ [binaryPropertyName]: binaryData,
53
+ },
54
+ pairedItem: { item: i },
55
+ });
56
+ continue;
57
+ }
58
+ else if (operation === 'uploadPermanent') {
59
+ const type = this.getNodeParameter('type', i);
60
+ const binaryPropertyName = this.getNodeParameter('binaryProperty', i);
61
+ const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
62
+ const dataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
63
+ const formData = {
64
+ media: {
65
+ value: dataBuffer,
66
+ options: {
67
+ filename: binaryData.fileName || 'file',
68
+ contentType: binaryData.mimeType,
69
+ },
70
+ },
71
+ };
72
+ response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/material/add_material', {}, { type }, {}, { formData });
73
+ }
74
+ else if (operation === 'getPermanent') {
75
+ const media_id = this.getNodeParameter('media_id', i);
76
+ const binaryPropertyName = this.getNodeParameter('binaryProperty', i);
77
+ const responseData = await transport_1.weComApiRequest.call(this, 'GET', '/cgi-bin/material/get', {}, { media_id }, {}, { encoding: null, resolveWithFullResponse: true });
78
+ let buffer;
79
+ let filename = 'file';
80
+ if (Buffer.isBuffer(responseData.body)) {
81
+ buffer = responseData.body;
82
+ }
83
+ else {
84
+ buffer = Buffer.from(responseData.body);
85
+ }
86
+ if (responseData.headers) {
87
+ const headers = responseData.headers;
88
+ const contentDisposition = headers['content-disposition'];
89
+ if (typeof contentDisposition === 'string') {
90
+ const match = contentDisposition.match(/filename="?(.+?)"?$/);
91
+ if (match) {
92
+ filename = match[1];
93
+ }
94
+ }
95
+ }
96
+ const binaryData = await this.helpers.prepareBinaryData(buffer, filename);
97
+ returnData.push({
98
+ json: { media_id },
99
+ binary: {
100
+ [binaryPropertyName]: binaryData,
101
+ },
102
+ pairedItem: { item: i },
103
+ });
104
+ continue;
105
+ }
106
+ else {
107
+ response = {};
108
+ }
109
+ returnData.push({
110
+ json: response,
111
+ pairedItem: { item: i },
112
+ });
113
+ }
114
+ catch (error) {
115
+ if (this.continueOnFail()) {
116
+ returnData.push({
117
+ json: {
118
+ error: error.message,
119
+ },
120
+ pairedItem: { item: i },
121
+ });
122
+ continue;
123
+ }
124
+ throw error;
125
+ }
126
+ }
127
+ return returnData;
128
+ }
129
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/material/execute.ts"],"names":[],"mappings":";;AAGA,0CAoLC;AAtLD,sDAAyD;AAElD,KAAK,UAAU,eAAe,CAEpC,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,QAAqB,CAAC;YAE1B,IAAI,SAAS,KAAK,YAAY,EAAE,CAAC;gBAChC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AC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const getPermanentDescription: INodeProperties[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPermanentDescription = void 0;
4
+ const showOnlyGetPermanent = {
5
+ resource: ['material'],
6
+ operation: ['getPermanent'],
7
+ };
8
+ exports.getPermanentDescription = [
9
+ {
10
+ displayName: '素材ID',
11
+ name: 'media_id',
12
+ type: 'string',
13
+ default: '',
14
+ required: true,
15
+ displayOptions: {
16
+ show: showOnlyGetPermanent,
17
+ },
18
+ description: '永久素材的media_id',
19
+ },
20
+ {
21
+ displayName: '下载到二进制属性',
22
+ name: 'binaryProperty',
23
+ type: 'string',
24
+ default: 'data',
25
+ displayOptions: {
26
+ show: showOnlyGetPermanent,
27
+ },
28
+ description: '将下载的文件存储到的二进制属性名称',
29
+ },
30
+ ];
31
+ //# sourceMappingURL=getPermanent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPermanent.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/material/getPermanent.ts"],"names":[],"mappings":";;;AAEA,MAAM,oBAAoB,GAAG;IAC5B,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,cAAc,CAAC;CAC3B,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,oBAAoB;SAC1B;QACD,WAAW,EAAE,eAAe;KAC5B;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,MAAM;QACf,cAAc,EAAE;YACf,IAAI,EAAE,oBAAoB;SAC1B;QACD,WAAW,EAAE,mBAAmB;KAChC;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const getTempDescription: INodeProperties[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTempDescription = void 0;
4
+ const showOnlyGetTemp = {
5
+ resource: ['material'],
6
+ operation: ['getTemp'],
7
+ };
8
+ exports.getTempDescription = [
9
+ {
10
+ displayName: '素材ID',
11
+ name: 'media_id',
12
+ type: 'string',
13
+ default: '',
14
+ required: true,
15
+ displayOptions: {
16
+ show: showOnlyGetTemp,
17
+ },
18
+ description: '临时素材的media_id',
19
+ },
20
+ {
21
+ displayName: '下载到二进制属性',
22
+ name: 'binaryProperty',
23
+ type: 'string',
24
+ default: 'data',
25
+ displayOptions: {
26
+ show: showOnlyGetTemp,
27
+ },
28
+ description: '将下载的文件存储到的二进制属性名称',
29
+ },
30
+ ];
31
+ //# sourceMappingURL=getTemp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTemp.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/material/getTemp.ts"],"names":[],"mappings":";;;AAEA,MAAM,eAAe,GAAG;IACvB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,SAAS,CAAC;CACtB,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,eAAe;SACrB;QACD,WAAW,EAAE,eAAe;KAC5B;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,MAAM;QACf,cAAc,EAAE;YACf,IAAI,EAAE,eAAe;SACrB;QACD,WAAW,EAAE,mBAAmB;KAChC;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const materialDescription: INodeProperties[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.materialDescription = void 0;
4
+ const uploadTemp_1 = require("./uploadTemp");
5
+ const getTemp_1 = require("./getTemp");
6
+ const uploadPermanent_1 = require("./uploadPermanent");
7
+ const getPermanent_1 = require("./getPermanent");
8
+ const showOnlyForMaterial = {
9
+ resource: ['material'],
10
+ };
11
+ exports.materialDescription = [
12
+ {
13
+ displayName: '操作',
14
+ name: 'operation',
15
+ type: 'options',
16
+ noDataExpression: true,
17
+ displayOptions: {
18
+ show: showOnlyForMaterial,
19
+ },
20
+ options: [
21
+ {
22
+ name: '上传临时素材',
23
+ value: 'uploadTemp',
24
+ action: '上传临时素材',
25
+ description: '上传临时素材(3天有效期)',
26
+ },
27
+ {
28
+ name: '获取临时素材',
29
+ value: 'getTemp',
30
+ action: '获取临时素材',
31
+ description: '获取临时素材文件',
32
+ },
33
+ {
34
+ name: '上传永久素材',
35
+ value: 'uploadPermanent',
36
+ action: '上传永久素材',
37
+ },
38
+ {
39
+ name: '获取永久素材',
40
+ value: 'getPermanent',
41
+ action: '获取永久素材',
42
+ description: '获取永久素材文件',
43
+ },
44
+ ],
45
+ default: 'uploadTemp',
46
+ },
47
+ ...uploadTemp_1.uploadTempDescription,
48
+ ...getTemp_1.getTempDescription,
49
+ ...uploadPermanent_1.uploadPermanentDescription,
50
+ ...getPermanent_1.getPermanentDescription,
51
+ ];
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/material/index.ts"],"names":[],"mappings":";;;AACA,6CAAqD;AACrD,uCAA+C;AAC/C,uDAA+D;AAC/D,iDAAyD;AAEzD,MAAM,mBAAmB,GAAG;IAC3B,QAAQ,EAAE,CAAC,UAAU,CAAC;CACtB,CAAC;AAEW,QAAA,mBAAmB,GAAsB;IACrD;QACC,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,mBAAmB;SACzB;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,YAAY;gBACnB,MAAM,EAAE,QAAQ;gBAChB,WAAW,EAAE,eAAe;aAC5B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,QAAQ;gBAChB,WAAW,EAAE,UAAU;aACvB;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,iBAAiB;gBACxB,MAAM,EAAE,QAAQ;aAChB;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,cAAc;gBACrB,MAAM,EAAE,QAAQ;gBAChB,WAAW,EAAE,UAAU;aACvB;SACD;QACD,OAAO,EAAE,YAAY;KACrB;IACD,GAAG,kCAAqB;IACxB,GAAG,4BAAkB;IACrB,GAAG,4CAA0B;IAC7B,GAAG,sCAAuB;CAC1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const uploadPermanentDescription: INodeProperties[];
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadPermanentDescription = void 0;
4
+ const showOnlyUploadPermanent = {
5
+ resource: ['material'],
6
+ operation: ['uploadPermanent'],
7
+ };
8
+ exports.uploadPermanentDescription = [
9
+ {
10
+ displayName: '素材类型',
11
+ name: 'type',
12
+ type: 'options',
13
+ options: [
14
+ {
15
+ name: '图片',
16
+ value: 'image',
17
+ },
18
+ {
19
+ name: '语音',
20
+ value: 'voice',
21
+ },
22
+ {
23
+ name: '视频',
24
+ value: 'video',
25
+ },
26
+ {
27
+ name: '文件',
28
+ value: 'file',
29
+ },
30
+ ],
31
+ default: 'image',
32
+ required: true,
33
+ displayOptions: {
34
+ show: showOnlyUploadPermanent,
35
+ },
36
+ },
37
+ {
38
+ displayName: '文件',
39
+ name: 'binaryProperty',
40
+ type: 'string',
41
+ default: 'data',
42
+ required: true,
43
+ displayOptions: {
44
+ show: showOnlyUploadPermanent,
45
+ },
46
+ description: '要上传的二进制文件属性名称',
47
+ },
48
+ ];
49
+ //# sourceMappingURL=uploadPermanent.js.map