node-easywechat 2.7.1 → 2.8.2

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 (110) hide show
  1. package/dist/BaseService/Jssdk/JssdkClient.js +5 -5
  2. package/dist/BaseService/Media/MediaClient.js +1 -1
  3. package/dist/Core/AES.d.ts +1 -1
  4. package/dist/Core/AES.js +4 -4
  5. package/dist/Core/BaseAccessToken.js +2 -2
  6. package/dist/Core/BaseApplication.js +4 -4
  7. package/dist/Core/BaseClient.js +2 -2
  8. package/dist/Core/Cache/FileCache.js +3 -3
  9. package/dist/Core/Encryptor.js +3 -3
  10. package/dist/Core/Http/Request.js +11 -11
  11. package/dist/Core/Http/StreamResponse.js +1 -1
  12. package/dist/Core/Messages/Media.js +2 -2
  13. package/dist/Core/Messages/Message.js +7 -9
  14. package/dist/Core/Mixins/HttpMixin.js +4 -4
  15. package/dist/Core/ServerGuard.d.ts +1 -0
  16. package/dist/Core/ServerGuard.js +8 -5
  17. package/dist/Core/Utils.js +18 -18
  18. package/dist/MicroMerchant/Application.js +1 -1
  19. package/dist/MicroMerchant/Base/MicroMerchantBase.js +6 -6
  20. package/dist/MicroMerchant/Certficates/CertficatesClient.js +1 -1
  21. package/dist/MicroMerchant/Core/BaseClient.js +8 -8
  22. package/dist/MicroMerchant/Media/MediaClient.js +1 -1
  23. package/dist/MicroMerchant/MerchantConfig/MerchantConfigClient.js +1 -1
  24. package/dist/MicroMerchant/Meterial/MeterialClient.js +4 -4
  25. package/dist/MicroMerchant/Withdraw/WithdrawClient.js +2 -2
  26. package/dist/MiniProgram/ActivityMessage/ActivityMessageClient.js +3 -3
  27. package/dist/MiniProgram/AppCode/AppCodeClient.js +2 -2
  28. package/dist/MiniProgram/Application.d.ts +6 -0
  29. package/dist/MiniProgram/Application.js +15 -0
  30. package/dist/MiniProgram/Base/MiniProgramBase.js +1 -1
  31. package/dist/MiniProgram/NearbyPoi/NearbyPoiClient.js +3 -3
  32. package/dist/MiniProgram/OpenData/OpenDataClient.js +2 -2
  33. package/dist/MiniProgram/PhoneNumber/PhoneNumberClient.d.ts +10 -0
  34. package/dist/MiniProgram/PhoneNumber/PhoneNumberClient.js +20 -0
  35. package/dist/MiniProgram/RealtimeLog/RealtimeLogClient.js +1 -1
  36. package/dist/MiniProgram/ShortLink/ShortLinkClient.d.ts +11 -0
  37. package/dist/MiniProgram/ShortLink/ShortLinkClient.js +23 -0
  38. package/dist/MiniProgram/SubscribeMessage/SubscribeMessageClient.js +5 -5
  39. package/dist/MiniProgram/UniformMessage/UniformMessageClient.js +3 -3
  40. package/dist/MiniProgram/Union/UnionClient.d.ts +3 -0
  41. package/dist/MiniProgram/Union/UnionClient.js +9 -0
  42. package/dist/MiniProgram/UrlLink/UrlLinkClient.d.ts +9 -0
  43. package/dist/MiniProgram/UrlLink/UrlLinkClient.js +17 -0
  44. package/dist/OfficialAccount/Base/OfficialAccountBase.js +2 -2
  45. package/dist/OfficialAccount/Broadcasting/BroadcastingClient.js +2 -2
  46. package/dist/OfficialAccount/Broadcasting/MessageBuilder.js +1 -1
  47. package/dist/OfficialAccount/Card/Client.js +1 -1
  48. package/dist/OfficialAccount/Card/JssdkClient.js +2 -2
  49. package/dist/OfficialAccount/Card/MemberCardClient.js +1 -1
  50. package/dist/OfficialAccount/CustomerService/CustomerServiceClient.js +2 -2
  51. package/dist/OfficialAccount/CustomerService/Messenger.js +1 -1
  52. package/dist/OfficialAccount/DataCube/DataCubeClient.js +1 -1
  53. package/dist/OfficialAccount/Material/MaterialClient.js +2 -2
  54. package/dist/OfficialAccount/OCR/OCRClient.js +1 -1
  55. package/dist/OfficialAccount/Semantic/SemanticClient.js +1 -1
  56. package/dist/OfficialAccount/SubscribeMessage/SubscribeMessageClient.js +4 -4
  57. package/dist/OfficialAccount/TemplateMessage/TemplateMessageClient.js +4 -4
  58. package/dist/OpenPlatform/Application.js +7 -7
  59. package/dist/OpenPlatform/Authorizer/Auth/AccessToken.js +1 -1
  60. package/dist/OpenPlatform/Authorizer/OfficialAccount/Account/Client.js +1 -1
  61. package/dist/Payment/Application.js +4 -4
  62. package/dist/Payment/Bill/BillClient.js +2 -2
  63. package/dist/Payment/Core/BaseClient.js +8 -8
  64. package/dist/Payment/Jssdk/JssdkClient.d.ts +12 -0
  65. package/dist/Payment/Jssdk/JssdkClient.js +41 -9
  66. package/dist/Payment/Merchant/MerchantClient.js +1 -1
  67. package/dist/Payment/Notify/Handler.js +5 -5
  68. package/dist/Payment/Notify/Refunded.js +1 -1
  69. package/dist/Payment/Notify/Scanned.js +2 -2
  70. package/dist/Payment/Order/OrderClient.js +1 -1
  71. package/dist/Payment/Redpack/RedpackClient.js +5 -5
  72. package/dist/Payment/Refund/RefundClient.js +3 -3
  73. package/dist/Payment/Sandbox/SandboxClient.js +1 -1
  74. package/dist/Payment/Transfer/TransferClient.js +1 -1
  75. package/dist/Work/Agent/AgentClient.js +1 -1
  76. package/dist/Work/Agent/WorkbenchClient.d.ts +24 -0
  77. package/dist/Work/Agent/WorkbenchClient.js +39 -0
  78. package/dist/Work/Application.d.ts +8 -0
  79. package/dist/Work/Application.js +20 -0
  80. package/dist/Work/Calendar/CalendarClient.js +1 -1
  81. package/dist/Work/Chat/ChatClient.js +1 -1
  82. package/dist/Work/CorpGroup/CorpGroupClient.d.ts +34 -0
  83. package/dist/Work/CorpGroup/CorpGroupClient.js +42 -0
  84. package/dist/Work/Department/DepartmentClient.js +1 -1
  85. package/dist/Work/ExternalContact/Client.d.ts +202 -3
  86. package/dist/Work/ExternalContact/Client.js +244 -6
  87. package/dist/Work/ExternalContact/ContactWayClient.d.ts +37 -0
  88. package/dist/Work/ExternalContact/ContactWayClient.js +51 -2
  89. package/dist/Work/ExternalContact/MessageClient.d.ts +45 -0
  90. package/dist/Work/ExternalContact/MessageClient.js +90 -4
  91. package/dist/Work/ExternalContact/MessageTemplateClient.js +3 -3
  92. package/dist/Work/ExternalContact/MomentClient.d.ts +56 -3
  93. package/dist/Work/ExternalContact/MomentClient.js +62 -3
  94. package/dist/Work/ExternalContact/StatisticsClient.d.ts +24 -0
  95. package/dist/Work/ExternalContact/StatisticsClient.js +35 -0
  96. package/dist/Work/Jssdk/JssdkClient.js +3 -3
  97. package/dist/Work/Kf/KfAccountClient.d.ts +41 -0
  98. package/dist/Work/Kf/KfAccountClient.js +71 -0
  99. package/dist/Work/Kf/KfMessageClient.d.ts +44 -0
  100. package/dist/Work/Kf/KfMessageClient.js +73 -0
  101. package/dist/Work/Kf/KfServicerClient.d.ts +26 -0
  102. package/dist/Work/Kf/KfServicerClient.js +47 -0
  103. package/dist/Work/Media/MediaClient.js +1 -1
  104. package/dist/Work/Message/Messenger.js +2 -2
  105. package/dist/Work/Schedule/ScheduleClient.js +1 -1
  106. package/dist/Work/User/UserClient.js +3 -3
  107. package/dist/index.js +1 -1
  108. package/node-easywechat.file_cache.easywechat.kernel.access_token.8a9684b45da7de42a06a70ba01a7005a.cache +1 -1
  109. package/node-easywechat.file_cache.easywechat.kernel.access_token.c3d06edaf326aad75d32f31348df787a.cache +1 -1
  110. package/package.json +11 -11
@@ -17,6 +17,7 @@ const WorkBase_1 = __importDefault(require("./Base/WorkBase"));
17
17
  const OAClient_1 = __importDefault(require("./OA/OAClient"));
18
18
  const AccessToken_1 = __importDefault(require("./Auth/AccessToken"));
19
19
  const AgentClient_1 = __importDefault(require("./Agent/AgentClient"));
20
+ const WorkbenchClient_1 = __importDefault(require("./Agent/WorkbenchClient"));
20
21
  const CalendarClient_1 = __importDefault(require("./Calendar/CalendarClient"));
21
22
  const ChatClient_1 = __importDefault(require("./Chat/ChatClient"));
22
23
  const DepartmentClient_1 = __importDefault(require("./Department/DepartmentClient"));
@@ -24,6 +25,9 @@ const GroupRobotClient_1 = __importDefault(require("./GroupRobot/GroupRobotClien
24
25
  const Messenger_1 = __importDefault(require("./GroupRobot/Messenger"));
25
26
  const InvoiceClient_1 = __importDefault(require("./Invoice/InvoiceClient"));
26
27
  const JssdkClient_1 = __importDefault(require("./Jssdk/JssdkClient"));
28
+ const KfAccountClient_1 = __importDefault(require("./Kf/KfAccountClient"));
29
+ const KfMessageClient_1 = __importDefault(require("./Kf/KfMessageClient"));
30
+ const KfServicerClient_1 = __importDefault(require("./Kf/KfServicerClient"));
27
31
  const LiveClient_1 = __importDefault(require("./Live/LiveClient"));
28
32
  const MediaClient_1 = __importDefault(require("./Media/MediaClient"));
29
33
  const MenuClient_1 = __importDefault(require("./Menu/MenuClient"));
@@ -56,6 +60,7 @@ class Work extends BaseApplication_1.default {
56
60
  this.oa = null;
57
61
  this.access_token = null;
58
62
  this.agent = null;
63
+ this.agent_workbench = null;
59
64
  this.base = null;
60
65
  this.calendar = null;
61
66
  this.chat = null;
@@ -72,6 +77,9 @@ class Work extends BaseApplication_1.default {
72
77
  this.group_robot_messenger = null;
73
78
  this.invoice = null;
74
79
  this.jssdk = null;
80
+ this.kf_account = null;
81
+ this.kf_message = null;
82
+ this.kf_servicer = null;
75
83
  this.live = null;
76
84
  this.media = null;
77
85
  this.menu = null;
@@ -101,6 +109,9 @@ class Work extends BaseApplication_1.default {
101
109
  this.offsetSet('agent', function (app) {
102
110
  return new AgentClient_1.default(app);
103
111
  });
112
+ this.offsetSet('agent_workbench', function (app) {
113
+ return new WorkbenchClient_1.default(app);
114
+ });
104
115
  this.offsetSet('calendar', function (app) {
105
116
  return new CalendarClient_1.default(app);
106
117
  });
@@ -146,6 +157,15 @@ class Work extends BaseApplication_1.default {
146
157
  this.offsetSet('jssdk', function (app) {
147
158
  return new JssdkClient_1.default(app);
148
159
  });
160
+ this.offsetSet('kf_account', function (app) {
161
+ return new KfAccountClient_1.default(app);
162
+ });
163
+ this.offsetSet('kf_message', function (app) {
164
+ return new KfMessageClient_1.default(app);
165
+ });
166
+ this.offsetSet('kf_servicer', function (app) {
167
+ return new KfServicerClient_1.default(app);
168
+ });
149
169
  this.offsetSet('live', function (app) {
150
170
  return new LiveClient_1.default(app);
151
171
  });
@@ -13,7 +13,7 @@ class CalendarClient extends BaseClient_1.default {
13
13
  return this.httpPostJson('cgi-bin/oa/calendar/add', params);
14
14
  }
15
15
  update(id, calendar) {
16
- let params = Utils_1.merge({
16
+ let params = (0, Utils_1.merge)({
17
17
  cal_id: id,
18
18
  }, calendar);
19
19
  return this.httpPostJson('cgi-bin/oa/calendar/update', params);
@@ -15,7 +15,7 @@ class ChatClient extends BaseClient_1.default {
15
15
  return this.httpPostJson('cgi-bin/appchat/create', data);
16
16
  }
17
17
  update(chatId, data) {
18
- let params = Utils_1.merge({
18
+ let params = (0, Utils_1.merge)({
19
19
  chatid: chatId,
20
20
  }, data);
21
21
  return this.httpPostJson('cgi-bin/appchat/update', params);
@@ -1,6 +1,40 @@
1
1
  import BaseClient from '../../Core/BaseClient';
2
2
  export default class CorpGroupClient extends BaseClient {
3
+ /**
4
+ * 获取应用共享信息
5
+ * @see https://open.work.weixin.qq.com/api/doc/90000/90135/93403
6
+ * @param agentId
7
+ * @returns
8
+ */
3
9
  getAppShareInfo(agentId: number): Promise<any>;
10
+ /**
11
+ * 获取下级企业的access_token
12
+ * @see https://open.work.weixin.qq.com/api/doc/90000/90135/93359
13
+ * @param corpId
14
+ * @param agentId
15
+ * @returns
16
+ */
4
17
  getToken(corpId: string, agentId: number): Promise<any>;
18
+ /**
19
+ * 获取下级企业的小程序session
20
+ * @see https://open.work.weixin.qq.com/api/doc/90000/90135/93355
21
+ * @param userId
22
+ * @param sessionKey
23
+ * @returns
24
+ */
5
25
  getMiniProgramTransferSession(userId: string, sessionKey: number): Promise<any>;
26
+ /**
27
+ * 将明文corpid转换为第三方应用获取的corpid(仅限第三方服务商,转换已获授权企业的corpid)
28
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#1.4%20corpid%E8%BD%AC%E6%8D%A2
29
+ * @param corpId
30
+ * @returns
31
+ */
32
+ getOpenCorpid(corpId: string): Promise<any>;
33
+ /**
34
+ * 将自建应用获取的userid转换为第三方应用获取的userid(仅代开发自建应用或第三方应用可调用)
35
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#2.4%20userid%E7%9A%84%E8%BD%AC%E6%8D%A2
36
+ * @param useridList
37
+ * @returns
38
+ */
39
+ batchUseridToOpenUserid(useridList: string[]): Promise<any>;
6
40
  }
@@ -5,22 +5,64 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
7
7
  class CorpGroupClient extends BaseClient_1.default {
8
+ /**
9
+ * 获取应用共享信息
10
+ * @see https://open.work.weixin.qq.com/api/doc/90000/90135/93403
11
+ * @param agentId
12
+ * @returns
13
+ */
8
14
  getAppShareInfo(agentId) {
9
15
  return this.httpPostJson('cgi-bin/corpgroup/corp/list_app_share_info', {
10
16
  agentid: agentId,
11
17
  });
12
18
  }
19
+ /**
20
+ * 获取下级企业的access_token
21
+ * @see https://open.work.weixin.qq.com/api/doc/90000/90135/93359
22
+ * @param corpId
23
+ * @param agentId
24
+ * @returns
25
+ */
13
26
  getToken(corpId, agentId) {
14
27
  return this.httpPostJson('cgi-bin/corpgroup/corp/gettoken', {
15
28
  corpid: corpId,
16
29
  agentid: agentId,
17
30
  });
18
31
  }
32
+ /**
33
+ * 获取下级企业的小程序session
34
+ * @see https://open.work.weixin.qq.com/api/doc/90000/90135/93355
35
+ * @param userId
36
+ * @param sessionKey
37
+ * @returns
38
+ */
19
39
  getMiniProgramTransferSession(userId, sessionKey) {
20
40
  return this.httpPostJson('cgi-bin/miniprogram/transfer_session', {
21
41
  userid: userId,
22
42
  session_key: sessionKey,
23
43
  });
24
44
  }
45
+ /**
46
+ * 将明文corpid转换为第三方应用获取的corpid(仅限第三方服务商,转换已获授权企业的corpid)
47
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#1.4%20corpid%E8%BD%AC%E6%8D%A2
48
+ * @param corpId
49
+ * @returns
50
+ */
51
+ getOpenCorpid(corpId) {
52
+ return this.httpPostJson('cgi-bin/corp/to_open_corpid', {
53
+ corpid: corpId,
54
+ });
55
+ }
56
+ /**
57
+ * 将自建应用获取的userid转换为第三方应用获取的userid(仅代开发自建应用或第三方应用可调用)
58
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#2.4%20userid%E7%9A%84%E8%BD%AC%E6%8D%A2
59
+ * @param useridList
60
+ * @returns
61
+ */
62
+ batchUseridToOpenUserid(useridList) {
63
+ return this.httpPostJson('cgi-bin/batch/userid_to_openuserid', {
64
+ userid_list: useridList,
65
+ });
66
+ }
25
67
  }
26
68
  exports.default = CorpGroupClient;
@@ -10,7 +10,7 @@ class DepartmentClient extends BaseClient_1.default {
10
10
  return this.httpPostJson('cgi-bin/department/create', data);
11
11
  }
12
12
  update(id, data) {
13
- let params = Utils_1.merge({
13
+ let params = (0, Utils_1.merge)({
14
14
  id: id,
15
15
  }, data);
16
16
  return this.httpPostJson('cgi-bin/department/update', params);
@@ -1,23 +1,222 @@
1
+ /// <reference types="node" />
1
2
  import BaseClient from '../../Core/BaseClient';
3
+ import Stream from 'stream';
2
4
  export default class ExternalContactClient extends BaseClient {
5
+ /**
6
+ * 获取配置了客户联系功能的成员列表
7
+ * @see https://work.weixin.qq.com/api/doc#90000/90135/91554
8
+ * @returns
9
+ */
3
10
  getFollowUsers(): Promise<any>;
11
+ /**
12
+ * 获取外部联系人列表
13
+ * @see https://work.weixin.qq.com/api/doc#90000/90135/91555
14
+ * @param userId
15
+ * @returns
16
+ */
4
17
  list(userId: string): Promise<any>;
18
+ /**
19
+ * 获取外部联系人详情
20
+ * @see https://work.weixin.qq.com/api/doc#90000/90135/91556
21
+ * @param externalUserId
22
+ * @returns
23
+ */
5
24
  get(externalUserId: string): Promise<any>;
6
- batchGet(userId: string, cursor?: string, limit?: number): Promise<any>;
7
- batchGetByUser(userId: string, cursor?: string, limit?: number): Promise<any>;
25
+ /**
26
+ * 批量获取客户详情
27
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92994
28
+ * @param userIdList
29
+ * @param cursor
30
+ * @param limit
31
+ * @returns
32
+ */
33
+ batchGet(userIdList: string[], cursor?: string, limit?: number): Promise<any>;
34
+ /**
35
+ * 批量获取外部联系人详情
36
+ * @see https://work.weixin.qq.com/api/doc/90001/90143/93010
37
+ * @param userIdList
38
+ * @param cursor
39
+ * @param limit
40
+ * @returns
41
+ */
42
+ batchGetByUser(userIdList: string[], cursor?: string, limit?: number): Promise<any>;
43
+ /**
44
+ * 修改客户备注信息
45
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92115
46
+ * @param data
47
+ * @returns
48
+ */
8
49
  remark(data: object): Promise<any>;
50
+ /**
51
+ * 获取离职成员的客户列表
52
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92124
53
+ * @param pageId
54
+ * @param pageSize
55
+ * @param cursor
56
+ * @returns
57
+ */
9
58
  getUnassigned(pageId?: number, pageSize?: number, cursor?: string): Promise<any>;
59
+ /**
60
+ * 离职成员的外部联系人再分配
61
+ * @see https://work.weixin.qq.com/api/doc#90000/90135/91564
62
+ * @param externalUserId
63
+ * @param handoverUserId
64
+ * @param takeoverUserId
65
+ * @param transferSuccessMessage
66
+ * @returns
67
+ */
10
68
  transfer(externalUserId: string, handoverUserId: string, takeoverUserId: string, transferSuccessMessage: string): Promise<any>;
69
+ /**
70
+ * 分配在职成员的客户
71
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92125
72
+ * @param externalUserId
73
+ * @param handoverUserId
74
+ * @param takeoverUserId
75
+ * @param transferSuccessMessage
76
+ * @returns
77
+ */
11
78
  transferCustomer(externalUserId: string, handoverUserId: string, takeoverUserId: string, transferSuccessMessage: string): Promise<any>;
79
+ /**
80
+ * 分配离职成员的客户
81
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/94081
82
+ * @param externalUserId
83
+ * @param handoverUserId
84
+ * @param takeoverUserId
85
+ * @returns
86
+ */
12
87
  resignedTransferCustomer(externalUserId: string, handoverUserId: string, takeoverUserId: string): Promise<any>;
88
+ /**
89
+ * 离职成员的群再分配
90
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92127
91
+ * @param chatIds
92
+ * @param newOwner
93
+ * @returns
94
+ */
13
95
  transferGroupChat(chatIds: string[], newOwner: string): Promise<any>;
96
+ /**
97
+ * 查询客户接替状态
98
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/94082
99
+ * @param handoverUserId
100
+ * @param takeoverUserId
101
+ * @param cursor
102
+ * @returns
103
+ */
14
104
  transferResult(handoverUserId: string, takeoverUserId: string, cursor?: string): Promise<any>;
105
+ /**
106
+ * 查询客户接替结果
107
+ * @see https://work.weixin.qq.com/api/doc/90001/90143/93009
108
+ * @param externalUserId
109
+ * @param handoverUserId
110
+ * @param takeoverUserId
111
+ * @returns
112
+ */
15
113
  getTransferResult(externalUserId: string, handoverUserId: string, takeoverUserId: string): Promise<any>;
114
+ /**
115
+ * 获取客户群列表
116
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92120
117
+ * @param data
118
+ * @returns
119
+ */
16
120
  getGroupChats(data: object): Promise<any>;
17
- getGroupChat(chatId: string): Promise<any>;
121
+ /**
122
+ * 获取客户群详情
123
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92122
124
+ * @param chatId
125
+ * @param needName
126
+ * @returns
127
+ */
128
+ getGroupChat(chatId: string, needName?: number): Promise<any>;
129
+ /**
130
+ * 获取企业标签库
131
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#获取企业标签库
132
+ * @param tagIds
133
+ * @param groupIds
134
+ * @returns
135
+ */
18
136
  getCorpTags(tagIds: string[], groupIds: string[]): Promise<any>;
137
+ /**
138
+ * 添加企业客户标签
139
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#添加企业客户标签
140
+ * @param data
141
+ * @returns
142
+ */
19
143
  addCorpTag(data: object): Promise<any>;
144
+ /**
145
+ * 编辑企业客户标签
146
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#编辑企业客户标签
147
+ * @param id
148
+ * @param name
149
+ * @param order
150
+ * @returns
151
+ */
20
152
  updateCorpTag(id: string, name?: string, order?: number): Promise<any>;
153
+ /**
154
+ * 删除企业客户标签
155
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#删除企业客户标签
156
+ * @param tagId
157
+ * @param groupId
158
+ * @returns
159
+ */
21
160
  deleteCorpTag(tagId: string[], groupId: string[]): Promise<any>;
161
+ /**
162
+ * 编辑客户企业标签
163
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/92118
164
+ * @param data
165
+ * @returns
166
+ */
22
167
  markTags(data: object): Promise<any>;
168
+ /**
169
+ * 外部联系人unionid转换
170
+ * @see https://work.weixin.qq.com/api/doc/90001/90143/93274
171
+ * @param unionid 微信客户的unionid
172
+ * @param openid 微信客户的openid
173
+ * @returns
174
+ */
175
+ unionidToExternalUserid(unionid?: string, openid?: string): Promise<any>;
176
+ /**
177
+ * 代开发应用external_userid转换
178
+ * @see https://work.weixin.qq.com/api/doc/90001/90143/95195
179
+ * @param unionid 微信客户的unionid
180
+ * @returns
181
+ */
182
+ toServiceExternalUserid(externalUserid: string): Promise<any>;
183
+ /**
184
+ * 转换external_userid
185
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#%E8%BD%AC%E6%8D%A2external_userid
186
+ * @param externalUserIds
187
+ * @returns
188
+ */
189
+ getNewExternalUserid(externalUserIds: string[]): Promise<any>;
190
+ /**
191
+ * 设置迁移完成
192
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#%E8%AE%BE%E7%BD%AE%E8%BF%81%E7%A7%BB%E5%AE%8C%E6%88%90
193
+ * @param corpid
194
+ * @returns
195
+ */
196
+ finishExternalUseridMigration(corpid: string): Promise<any>;
197
+ /**
198
+ * unionid查询external_userid
199
+ * @see https://open.work.weixin.qq.com/api/doc/90001/90143/95327#4.2%20unionid%E6%9F%A5%E8%AF%A2external_userid
200
+ * @param unionid
201
+ * @param openid
202
+ * @param corpid
203
+ * @returns
204
+ */
205
+ unionidToexternalUserid3rd(unionid: string, openid: string, corpid?: string): Promise<any>;
206
+ /**
207
+ * 客户群opengid转换
208
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/94822
209
+ * @param opengid
210
+ * @returns
211
+ */
212
+ opengidToChatid(opengid: string): Promise<any>;
213
+ /**
214
+ * 上传附件资源
215
+ * @see https://work.weixin.qq.com/api/doc/90000/90135/95098
216
+ * @param path
217
+ * @param mediaType
218
+ * @param attachmentType
219
+ * @returns
220
+ */
221
+ uploadAttachment(path: string | Stream.Readable, mediaType: string, attachmentType: string): Promise<any>;
23
222
  }