node-easywechat 2.6.10 → 2.8.0
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 +26 -3
- package/dist/BaseService/ContentSecurity/ContentSecurityClient.d.ts +5 -3
- package/dist/BaseService/ContentSecurity/ContentSecurityClient.js +2 -2
- package/dist/BaseService/Jssdk/JssdkClient.d.ts +15 -15
- package/dist/BaseService/Jssdk/JssdkClient.js +15 -15
- package/dist/BaseService/Media/MediaClient.d.ts +22 -20
- package/dist/BaseService/Media/MediaClient.js +14 -14
- package/dist/BaseService/Url/UrlClient.d.ts +1 -1
- package/dist/Core/AES.d.ts +46 -0
- package/dist/Core/AES.js +95 -0
- package/dist/Core/Encryptor.d.ts +2 -14
- package/dist/Core/Encryptor.js +9 -39
- package/dist/Core/Http/Request.js +2 -6
- package/dist/Core/Messages/Message.js +2 -16
- package/dist/Core/PKCS.d.ts +15 -0
- package/dist/Core/PKCS.js +44 -0
- package/dist/Core/RSA.d.ts +59 -0
- package/dist/Core/RSA.js +99 -0
- package/dist/Core/ServerGuard.d.ts +1 -1
- package/dist/Core/ServerGuard.js +5 -33
- package/dist/Core/Types.d.ts +24 -4
- package/dist/Core/Utils.d.ts +8 -2
- package/dist/Core/Utils.js +61 -20
- package/dist/MicroMerchant/Application.d.ts +27 -0
- package/dist/MicroMerchant/Application.js +105 -0
- package/dist/MicroMerchant/Base/MicroMerchantBase.d.ts +7 -0
- package/dist/MicroMerchant/Base/MicroMerchantBase.js +52 -0
- package/dist/MicroMerchant/Certficates/CertficatesClient.d.ts +5 -0
- package/dist/MicroMerchant/Certficates/CertficatesClient.js +52 -0
- package/dist/MicroMerchant/Core/BaseClient.d.ts +9 -0
- package/dist/MicroMerchant/Core/BaseClient.js +106 -0
- package/dist/MicroMerchant/Media/MediaClient.d.ts +6 -0
- package/dist/MicroMerchant/Media/MediaClient.js +33 -0
- package/dist/MicroMerchant/MerchantConfig/MerchantConfigClient.d.ts +8 -0
- package/dist/MicroMerchant/MerchantConfig/MerchantConfigClient.js +49 -0
- package/dist/MicroMerchant/Meterial/MeterialClient.d.ts +5 -0
- package/dist/MicroMerchant/Meterial/MeterialClient.js +30 -0
- package/dist/MicroMerchant/Withdraw/WithdrawClient.d.ts +5 -0
- package/dist/MicroMerchant/Withdraw/WithdrawClient.js +28 -0
- package/dist/MiniProgram/Application.d.ts +4 -0
- package/dist/MiniProgram/Application.js +10 -0
- package/dist/MiniProgram/Encryptor.js +2 -6
- package/dist/MiniProgram/PhoneNumber/PhoneNumberClient.d.ts +10 -0
- package/dist/MiniProgram/PhoneNumber/PhoneNumberClient.js +20 -0
- package/dist/MiniProgram/Union/UnionClient.d.ts +3 -0
- package/dist/MiniProgram/Union/UnionClient.js +9 -0
- package/dist/MiniProgram/UrlLink/UrlLinkClient.d.ts +4 -0
- package/dist/MiniProgram/UrlLink/UrlLinkClient.js +12 -0
- package/dist/Payment/Bill/BillClient.js +1 -1
- package/dist/Payment/Core/BaseClient.d.ts +0 -1
- package/dist/Payment/Core/BaseClient.js +2 -20
- package/dist/Payment/Jssdk/JssdkClient.d.ts +12 -0
- package/dist/Payment/Jssdk/JssdkClient.js +32 -0
- package/dist/Payment/Notify/Handler.js +3 -11
- package/dist/Payment/Notify/Refunded.d.ts +0 -1
- package/dist/Payment/Notify/Refunded.js +1 -11
- package/dist/Payment/Transfer/TransferClient.js +4 -3
- package/dist/Work/ExternalContact/Client.d.ts +146 -3
- package/dist/Work/ExternalContact/Client.js +156 -6
- package/dist/Work/ExternalContact/MessageClient.d.ts +45 -0
- package/dist/Work/ExternalContact/MessageClient.js +86 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2 -0
- package/node-easywechat.file_cache.easywechat.kernel.access_token.8a9684b45da7de42a06a70ba01a7005a.cache +1 -1
- package/node-easywechat.file_cache.easywechat.kernel.access_token.c3d06edaf326aad75d32f31348df787a.cache +1 -1
- package/package.json +4 -5
|
@@ -10,4 +10,7 @@ export default class UnionClient extends BaseClient {
|
|
|
10
10
|
getOrderInfo(orderIdList: string[]): Promise<any>;
|
|
11
11
|
searchOrder(page?: number, startTimestamp?: string, endTimestamp?: string, commissionStatus?: string): Promise<any>;
|
|
12
12
|
getFeaturedProducts(params: object): Promise<any>;
|
|
13
|
+
getTargetPlanInfo(params: object): Promise<any>;
|
|
14
|
+
applyJoinTargetPlan(params: object): Promise<any>;
|
|
15
|
+
getTargetPlanStatus(params: object): Promise<any>;
|
|
13
16
|
}
|
|
@@ -56,5 +56,14 @@ class UnionClient extends BaseClient_1.default {
|
|
|
56
56
|
getFeaturedProducts(params) {
|
|
57
57
|
return this.httpGet('union/promoter/product/select', params);
|
|
58
58
|
}
|
|
59
|
+
getTargetPlanInfo(params) {
|
|
60
|
+
return this.httpGet('union/promoter/target/plan_info', params);
|
|
61
|
+
}
|
|
62
|
+
applyJoinTargetPlan(params) {
|
|
63
|
+
return this.httpPostJson('union/promoter/target/apply_target', params);
|
|
64
|
+
}
|
|
65
|
+
getTargetPlanStatus(params) {
|
|
66
|
+
return this.httpGet('union/promoter/target/apply_status', params);
|
|
67
|
+
}
|
|
59
68
|
}
|
|
60
69
|
exports.default = UnionClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const BaseClient_1 = __importDefault(require("../../Core/BaseClient"));
|
|
7
|
+
class UrlLink extends BaseClient_1.default {
|
|
8
|
+
generate(params = {}) {
|
|
9
|
+
return this.httpPostJson('wxa/generate_urllink', params);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.default = UrlLink;
|
|
@@ -34,7 +34,7 @@ class BillClient extends BaseClient_1.default {
|
|
|
34
34
|
let res = yield this.requestRaw(this.wrap('pay/downloadbill'), params);
|
|
35
35
|
let content = res.getContent().toString();
|
|
36
36
|
if (content && content.indexOf('<xml>') === 0) {
|
|
37
|
-
return yield
|
|
37
|
+
return yield Utils_1.parseXml(content);
|
|
38
38
|
}
|
|
39
39
|
return StreamResponse_1.default.buildFromResponse(res);
|
|
40
40
|
});
|
|
@@ -7,7 +7,6 @@ declare class BaseClient implements HttpMixin {
|
|
|
7
7
|
constructor(app: BaseApplication);
|
|
8
8
|
protected prepends(): {};
|
|
9
9
|
protected request(endpoint: string, params?: object, method?: string, options?: AxiosRequestConfig, returnResponse?: boolean): Promise<AxiosResponse<any>>;
|
|
10
|
-
parseXml(xml: string): Promise<any>;
|
|
11
10
|
protected safeRequest(endpoint: string, params?: object, method?: string, options?: AxiosRequestConfig): Promise<any>;
|
|
12
11
|
protected requestRaw(endpoint: string, params?: object, method?: string, options?: AxiosRequestConfig): Promise<any>;
|
|
13
12
|
protected wrap(endpoint: string): string;
|
|
@@ -14,7 +14,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const HttpMixin_1 = __importDefault(require("../../Core/Mixins/HttpMixin"));
|
|
16
16
|
const Utils_1 = require("../../Core/Utils");
|
|
17
|
-
const xml2js_1 = __importDefault(require("xml2js"));
|
|
18
17
|
const fs_1 = __importDefault(require("fs"));
|
|
19
18
|
const Response_1 = __importDefault(require("../../Core/Http/Response"));
|
|
20
19
|
const https_1 = __importDefault(require("https"));
|
|
@@ -42,19 +41,11 @@ class BaseClient {
|
|
|
42
41
|
let localParams = Utils_1.merge(Utils_1.merge(base, this.prepends()), params);
|
|
43
42
|
let secretKey = yield this.app.getKey(endpoint);
|
|
44
43
|
localParams['sign'] = Utils_1.makeSignature(localParams, secretKey, localParams['sign_type'] || 'MD5');
|
|
45
|
-
let XmlBuilder = new xml2js_1.default.Builder({
|
|
46
|
-
cdata: true,
|
|
47
|
-
renderOpts: {
|
|
48
|
-
pretty: false,
|
|
49
|
-
indent: '',
|
|
50
|
-
newline: '',
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
44
|
let payload = Utils_1.merge(Utils_1.merge({}, options), {
|
|
54
45
|
url: endpoint,
|
|
55
46
|
method,
|
|
56
47
|
responseType: 'text',
|
|
57
|
-
data:
|
|
48
|
+
data: Utils_1.buildXml(localParams)
|
|
58
49
|
});
|
|
59
50
|
let response = yield this.doRequest(payload);
|
|
60
51
|
if (returnResponse) {
|
|
@@ -63,22 +54,13 @@ class BaseClient {
|
|
|
63
54
|
else {
|
|
64
55
|
let body = response.data;
|
|
65
56
|
try {
|
|
66
|
-
body = yield
|
|
57
|
+
body = yield Utils_1.parseXml(body);
|
|
67
58
|
}
|
|
68
59
|
catch (e) { }
|
|
69
60
|
return body;
|
|
70
61
|
}
|
|
71
62
|
});
|
|
72
63
|
}
|
|
73
|
-
parseXml(xml) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
let res = yield xml2js_1.default.parseStringPromise(xml);
|
|
76
|
-
res = Utils_1.singleItem(res);
|
|
77
|
-
if (res['xml'])
|
|
78
|
-
res = res['xml'];
|
|
79
|
-
return res;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
64
|
safeRequest(endpoint, params = {}, method = 'post', options = {}) {
|
|
83
65
|
options = Utils_1.merge(Utils_1.merge({}, options), {
|
|
84
66
|
httpsAgent: new https_1.default.Agent({
|
|
@@ -23,4 +23,16 @@ export default class JssdkClient extends BaseClient {
|
|
|
23
23
|
* @param json 是否返回json字符串,默认:true
|
|
24
24
|
*/
|
|
25
25
|
shareAddressConfig(accessToken: string | AccessToken, json?: Boolean): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* 生成联系人配置
|
|
28
|
+
* @param params
|
|
29
|
+
* @param json 是否返回JSON字符串,默认:false
|
|
30
|
+
*/
|
|
31
|
+
contractConfig(params: object, json?: Boolean): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* 生成小程序红包配置
|
|
34
|
+
* @param pkg
|
|
35
|
+
* @param json 是否返回JSON字符串,默认:false
|
|
36
|
+
*/
|
|
37
|
+
miniprogramRedpackConfig(pkg: string, json?: Boolean): Promise<any>;
|
|
26
38
|
}
|
|
@@ -86,5 +86,37 @@ class JssdkClient extends JssdkClient_1.default {
|
|
|
86
86
|
return json ? JSON.stringify(params) : params;
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* 生成联系人配置
|
|
91
|
+
* @param params
|
|
92
|
+
* @param json 是否返回JSON字符串,默认:false
|
|
93
|
+
*/
|
|
94
|
+
contractConfig(params, json = false) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
params['appid'] = this.app.config.app_id;
|
|
97
|
+
params['timestamp'] = Utils_1.getTimestamp() + '';
|
|
98
|
+
params['sign'] = Utils_1.makeSignature(params, this.app.config.key, 'md5');
|
|
99
|
+
return json ? JSON.stringify(params) : params;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 生成小程序红包配置
|
|
104
|
+
* @param pkg
|
|
105
|
+
* @param json 是否返回JSON字符串,默认:false
|
|
106
|
+
*/
|
|
107
|
+
miniprogramRedpackConfig(pkg, json = false) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
let params = {
|
|
110
|
+
appId: this.app.config.app_id,
|
|
111
|
+
timeStamp: Utils_1.getTimestamp() + '',
|
|
112
|
+
nonceStr: Utils_1.randomString(16),
|
|
113
|
+
package: pkg,
|
|
114
|
+
};
|
|
115
|
+
params['paySign'] = Utils_1.makeSignature(params, '', 'md5');
|
|
116
|
+
params['signType'] = 'MD5';
|
|
117
|
+
delete params.appId;
|
|
118
|
+
return json ? JSON.stringify(params) : params;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
89
121
|
}
|
|
90
122
|
exports.default = JssdkClient;
|
|
@@ -12,9 +12,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const xml2js_1 = __importDefault(require("xml2js"));
|
|
16
15
|
const Utils_1 = require("../../Core/Utils");
|
|
17
16
|
const Response_1 = __importDefault(require("../../Core/Http/Response"));
|
|
17
|
+
const AES_1 = require("../../Core/AES");
|
|
18
18
|
class Handler {
|
|
19
19
|
constructor(app) {
|
|
20
20
|
this.SUCCESS = 'SUCCESS';
|
|
@@ -54,15 +54,7 @@ class Handler {
|
|
|
54
54
|
if (this.sign) {
|
|
55
55
|
attributes['sign'] = Utils_1.makeSignature(attributes, yield this.app.getKey());
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
cdata: true,
|
|
59
|
-
renderOpts: {
|
|
60
|
-
pretty: false,
|
|
61
|
-
indent: '',
|
|
62
|
-
newline: '',
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
return new Response_1.default(XmlBuilder.buildObject(attributes));
|
|
57
|
+
return new Response_1.default(Buffer.from(Utils_1.buildXml(attributes)));
|
|
66
58
|
});
|
|
67
59
|
}
|
|
68
60
|
getMessage() {
|
|
@@ -84,7 +76,7 @@ class Handler {
|
|
|
84
76
|
if (!message[key]) {
|
|
85
77
|
return null;
|
|
86
78
|
}
|
|
87
|
-
return
|
|
79
|
+
return AES_1.AES.decrypt(Buffer.from(message[key], 'base64'), Utils_1.createHash(this.app.config.key, 'md5'), '', true, 'aes-256-ecb').toString();
|
|
88
80
|
});
|
|
89
81
|
}
|
|
90
82
|
validate(message) {
|
|
@@ -13,7 +13,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const Handler_1 = __importDefault(require("./Handler"));
|
|
16
|
-
const xml2js_1 = __importDefault(require("xml2js"));
|
|
17
16
|
const Utils_1 = require("../../Core/Utils");
|
|
18
17
|
class RefundedHandler extends Handler_1.default {
|
|
19
18
|
handle(closure) {
|
|
@@ -33,16 +32,7 @@ class RefundedHandler extends Handler_1.default {
|
|
|
33
32
|
}
|
|
34
33
|
reqInfo() {
|
|
35
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return yield
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
parseXml(xml) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
let res = yield xml2js_1.default.parseStringPromise(xml);
|
|
42
|
-
res = Utils_1.singleItem(res);
|
|
43
|
-
if (res['xml'])
|
|
44
|
-
res = res['xml'];
|
|
45
|
-
return res;
|
|
35
|
+
return yield Utils_1.parseXml(yield this.decryptMessage('req_info'));
|
|
46
36
|
});
|
|
47
37
|
}
|
|
48
38
|
}
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const BaseClient_1 = __importDefault(require("../Core/BaseClient"));
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
|
-
const
|
|
17
|
+
const RSA_1 = __importDefault(require("../../Core/RSA"));
|
|
18
18
|
const Utils_1 = require("../../Core/Utils");
|
|
19
19
|
class TransferClient extends BaseClient_1.default {
|
|
20
20
|
/**
|
|
@@ -67,8 +67,9 @@ class TransferClient extends BaseClient_1.default {
|
|
|
67
67
|
throw new Error(`${key} is required.`);
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
let publicKey = fs_1.default.readFileSync(this.app.config.rsa_public_key_path)
|
|
71
|
-
let rsa = new
|
|
70
|
+
let publicKey = fs_1.default.readFileSync(this.app.config.rsa_public_key_path);
|
|
71
|
+
let rsa = new RSA_1.default;
|
|
72
|
+
rsa.setPublicKey(publicKey);
|
|
72
73
|
params['enc_bank_no'] = rsa.encrypt(params['enc_bank_no'], 'hex');
|
|
73
74
|
params['enc_true_name'] = rsa.encrypt(params['enc_true_name'], 'hex');
|
|
74
75
|
return this.safeRequest('mmpaymkttransfers/pay_bank', params);
|
|
@@ -1,23 +1,166 @@
|
|
|
1
1
|
import BaseClient from '../../Core/BaseClient';
|
|
2
2
|
export default class ExternalContactClient extends BaseClient {
|
|
3
|
+
/**
|
|
4
|
+
* 获取配置了客户联系功能的成员列表
|
|
5
|
+
* @see https://work.weixin.qq.com/api/doc#90000/90135/91554
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
3
8
|
getFollowUsers(): Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* 获取外部联系人列表
|
|
11
|
+
* @see https://work.weixin.qq.com/api/doc#90000/90135/91555
|
|
12
|
+
* @param userId
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
4
15
|
list(userId: string): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* 获取外部联系人详情
|
|
18
|
+
* @see https://work.weixin.qq.com/api/doc#90000/90135/91556
|
|
19
|
+
* @param externalUserId
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
5
22
|
get(externalUserId: string): Promise<any>;
|
|
6
|
-
|
|
7
|
-
|
|
23
|
+
/**
|
|
24
|
+
* 批量获取客户详情
|
|
25
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92994
|
|
26
|
+
* @param userIdList
|
|
27
|
+
* @param cursor
|
|
28
|
+
* @param limit
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
batchGet(userIdList: string[], cursor?: string, limit?: number): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* 批量获取外部联系人详情
|
|
34
|
+
* @see https://work.weixin.qq.com/api/doc/90001/90143/93010
|
|
35
|
+
* @param userIdList
|
|
36
|
+
* @param cursor
|
|
37
|
+
* @param limit
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
batchGetByUser(userIdList: string[], cursor?: string, limit?: number): Promise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* 修改客户备注信息
|
|
43
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92115
|
|
44
|
+
* @param data
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
8
47
|
remark(data: object): Promise<any>;
|
|
48
|
+
/**
|
|
49
|
+
* 获取离职成员的客户列表
|
|
50
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92124
|
|
51
|
+
* @param pageId
|
|
52
|
+
* @param pageSize
|
|
53
|
+
* @param cursor
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
9
56
|
getUnassigned(pageId?: number, pageSize?: number, cursor?: string): Promise<any>;
|
|
57
|
+
/**
|
|
58
|
+
* 离职成员的外部联系人再分配
|
|
59
|
+
* @see https://work.weixin.qq.com/api/doc#90000/90135/91564
|
|
60
|
+
* @param externalUserId
|
|
61
|
+
* @param handoverUserId
|
|
62
|
+
* @param takeoverUserId
|
|
63
|
+
* @param transferSuccessMessage
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
10
66
|
transfer(externalUserId: string, handoverUserId: string, takeoverUserId: string, transferSuccessMessage: string): Promise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* 分配在职成员的客户
|
|
69
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92125
|
|
70
|
+
* @param externalUserId
|
|
71
|
+
* @param handoverUserId
|
|
72
|
+
* @param takeoverUserId
|
|
73
|
+
* @param transferSuccessMessage
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
11
76
|
transferCustomer(externalUserId: string, handoverUserId: string, takeoverUserId: string, transferSuccessMessage: string): Promise<any>;
|
|
77
|
+
/**
|
|
78
|
+
* 分配离职成员的客户
|
|
79
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/94081
|
|
80
|
+
* @param externalUserId
|
|
81
|
+
* @param handoverUserId
|
|
82
|
+
* @param takeoverUserId
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
12
85
|
resignedTransferCustomer(externalUserId: string, handoverUserId: string, takeoverUserId: string): Promise<any>;
|
|
86
|
+
/**
|
|
87
|
+
* 离职成员的群再分配
|
|
88
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92127
|
|
89
|
+
* @param chatIds
|
|
90
|
+
* @param newOwner
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
13
93
|
transferGroupChat(chatIds: string[], newOwner: string): Promise<any>;
|
|
94
|
+
/**
|
|
95
|
+
* 查询客户接替状态
|
|
96
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/94082
|
|
97
|
+
* @param handoverUserId
|
|
98
|
+
* @param takeoverUserId
|
|
99
|
+
* @param cursor
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
14
102
|
transferResult(handoverUserId: string, takeoverUserId: string, cursor?: string): Promise<any>;
|
|
103
|
+
/**
|
|
104
|
+
* 查询客户接替结果
|
|
105
|
+
* @see https://work.weixin.qq.com/api/doc/90001/90143/93009
|
|
106
|
+
* @param externalUserId
|
|
107
|
+
* @param handoverUserId
|
|
108
|
+
* @param takeoverUserId
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
15
111
|
getTransferResult(externalUserId: string, handoverUserId: string, takeoverUserId: string): Promise<any>;
|
|
112
|
+
/**
|
|
113
|
+
* 获取客户群列表
|
|
114
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92120
|
|
115
|
+
* @param data
|
|
116
|
+
* @returns
|
|
117
|
+
*/
|
|
16
118
|
getGroupChats(data: object): Promise<any>;
|
|
17
|
-
|
|
119
|
+
/**
|
|
120
|
+
* 获取客户群详情
|
|
121
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92122
|
|
122
|
+
* @param chatId
|
|
123
|
+
* @param needName
|
|
124
|
+
* @returns
|
|
125
|
+
*/
|
|
126
|
+
getGroupChat(chatId: string, needName?: number): Promise<any>;
|
|
127
|
+
/**
|
|
128
|
+
* 获取企业标签库
|
|
129
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92117#获取企业标签库
|
|
130
|
+
* @param tagIds
|
|
131
|
+
* @param groupIds
|
|
132
|
+
* @returns
|
|
133
|
+
*/
|
|
18
134
|
getCorpTags(tagIds: string[], groupIds: string[]): Promise<any>;
|
|
135
|
+
/**
|
|
136
|
+
* 添加企业客户标签
|
|
137
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92117#添加企业客户标签
|
|
138
|
+
* @param data
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
19
141
|
addCorpTag(data: object): Promise<any>;
|
|
142
|
+
/**
|
|
143
|
+
* 编辑企业客户标签
|
|
144
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92117#编辑企业客户标签
|
|
145
|
+
* @param id
|
|
146
|
+
* @param name
|
|
147
|
+
* @param order
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
20
150
|
updateCorpTag(id: string, name?: string, order?: number): Promise<any>;
|
|
151
|
+
/**
|
|
152
|
+
* 删除企业客户标签
|
|
153
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92117#删除企业客户标签
|
|
154
|
+
* @param tagId
|
|
155
|
+
* @param groupId
|
|
156
|
+
* @returns
|
|
157
|
+
*/
|
|
21
158
|
deleteCorpTag(tagId: string[], groupId: string[]): Promise<any>;
|
|
159
|
+
/**
|
|
160
|
+
* 编辑客户企业标签
|
|
161
|
+
* @see https://work.weixin.qq.com/api/doc/90000/90135/92118
|
|
162
|
+
* @param data
|
|
163
|
+
* @returns
|
|
164
|
+
*/
|
|
22
165
|
markTags(data: object): Promise<any>;
|
|
23
166
|
}
|