@larksuiteoapi/node-sdk 1.13.1 → 1.14.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/es/index.js +696 -178
- package/lib/index.js +696 -178
- package/package.json +1 -1
- package/types/index.d.ts +1124 -56
package/es/index.js
CHANGED
|
@@ -570,7 +570,7 @@ class Client$1 {
|
|
|
570
570
|
},
|
|
571
571
|
};
|
|
572
572
|
/**
|
|
573
|
-
*
|
|
573
|
+
* 管理后台-密码
|
|
574
574
|
*/
|
|
575
575
|
this.admin = {
|
|
576
576
|
/**
|
|
@@ -1491,78 +1491,6 @@ class Client$1 {
|
|
|
1491
1491
|
throw e;
|
|
1492
1492
|
});
|
|
1493
1493
|
}),
|
|
1494
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1495
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1496
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
1497
|
-
const res = yield this.httpInstance
|
|
1498
|
-
.request({
|
|
1499
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals`, path),
|
|
1500
|
-
method: "GET",
|
|
1501
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
1502
|
-
params: pickBy(innerPayload.params, identity),
|
|
1503
|
-
})
|
|
1504
|
-
.catch((e) => {
|
|
1505
|
-
this.logger.error(formatErrors(e));
|
|
1506
|
-
});
|
|
1507
|
-
return res;
|
|
1508
|
-
});
|
|
1509
|
-
const Iterable = {
|
|
1510
|
-
[Symbol.asyncIterator]() {
|
|
1511
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
1512
|
-
let hasMore = true;
|
|
1513
|
-
let pageToken;
|
|
1514
|
-
while (hasMore) {
|
|
1515
|
-
try {
|
|
1516
|
-
const res = yield __await(sendRequest({
|
|
1517
|
-
headers,
|
|
1518
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
1519
|
-
data,
|
|
1520
|
-
}));
|
|
1521
|
-
const _b = get(res, "data") || {}, {
|
|
1522
|
-
// @ts-ignore
|
|
1523
|
-
has_more,
|
|
1524
|
-
// @ts-ignore
|
|
1525
|
-
page_token,
|
|
1526
|
-
// @ts-ignore
|
|
1527
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
1528
|
-
yield yield __await(rest);
|
|
1529
|
-
hasMore = Boolean(has_more);
|
|
1530
|
-
pageToken = page_token || next_page_token;
|
|
1531
|
-
}
|
|
1532
|
-
catch (e) {
|
|
1533
|
-
yield yield __await(null);
|
|
1534
|
-
break;
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
});
|
|
1538
|
-
},
|
|
1539
|
-
};
|
|
1540
|
-
return Iterable;
|
|
1541
|
-
}),
|
|
1542
|
-
/**
|
|
1543
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=list&version=v4 click to debug }
|
|
1544
|
-
*
|
|
1545
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/list document }
|
|
1546
|
-
*
|
|
1547
|
-
* 查询审批定义列表
|
|
1548
|
-
*
|
|
1549
|
-
* 查询当前用户可发起的审批定义列表。
|
|
1550
|
-
*/
|
|
1551
|
-
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1552
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1553
|
-
return this.httpInstance
|
|
1554
|
-
.request({
|
|
1555
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals`, path),
|
|
1556
|
-
method: "GET",
|
|
1557
|
-
data,
|
|
1558
|
-
params,
|
|
1559
|
-
headers,
|
|
1560
|
-
})
|
|
1561
|
-
.catch((e) => {
|
|
1562
|
-
this.logger.error(formatErrors(e));
|
|
1563
|
-
throw e;
|
|
1564
|
-
});
|
|
1565
|
-
}),
|
|
1566
1494
|
/**
|
|
1567
1495
|
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=subscribe&version=v4 click to debug }
|
|
1568
1496
|
*
|
|
@@ -7507,6 +7435,224 @@ class Client$1 {
|
|
|
7507
7435
|
});
|
|
7508
7436
|
}),
|
|
7509
7437
|
},
|
|
7438
|
+
/**
|
|
7439
|
+
* functional_role
|
|
7440
|
+
*/
|
|
7441
|
+
functionalRole: {
|
|
7442
|
+
/**
|
|
7443
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=create&version=v3 click to debug }
|
|
7444
|
+
*
|
|
7445
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=functional_role&version=v3 document }
|
|
7446
|
+
*/
|
|
7447
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7448
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7449
|
+
return this.httpInstance
|
|
7450
|
+
.request({
|
|
7451
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles`, path),
|
|
7452
|
+
method: "POST",
|
|
7453
|
+
data,
|
|
7454
|
+
params,
|
|
7455
|
+
headers,
|
|
7456
|
+
})
|
|
7457
|
+
.catch((e) => {
|
|
7458
|
+
this.logger.error(formatErrors(e));
|
|
7459
|
+
throw e;
|
|
7460
|
+
});
|
|
7461
|
+
}),
|
|
7462
|
+
/**
|
|
7463
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=delete&version=v3 click to debug }
|
|
7464
|
+
*
|
|
7465
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=functional_role&version=v3 document }
|
|
7466
|
+
*/
|
|
7467
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7468
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7469
|
+
return this.httpInstance
|
|
7470
|
+
.request({
|
|
7471
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path),
|
|
7472
|
+
method: "DELETE",
|
|
7473
|
+
data,
|
|
7474
|
+
params,
|
|
7475
|
+
headers,
|
|
7476
|
+
})
|
|
7477
|
+
.catch((e) => {
|
|
7478
|
+
this.logger.error(formatErrors(e));
|
|
7479
|
+
throw e;
|
|
7480
|
+
});
|
|
7481
|
+
}),
|
|
7482
|
+
/**
|
|
7483
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=update&version=v3 click to debug }
|
|
7484
|
+
*
|
|
7485
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=functional_role&version=v3 document }
|
|
7486
|
+
*/
|
|
7487
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7488
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7489
|
+
return this.httpInstance
|
|
7490
|
+
.request({
|
|
7491
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path),
|
|
7492
|
+
method: "PUT",
|
|
7493
|
+
data,
|
|
7494
|
+
params,
|
|
7495
|
+
headers,
|
|
7496
|
+
})
|
|
7497
|
+
.catch((e) => {
|
|
7498
|
+
this.logger.error(formatErrors(e));
|
|
7499
|
+
throw e;
|
|
7500
|
+
});
|
|
7501
|
+
}),
|
|
7502
|
+
},
|
|
7503
|
+
/**
|
|
7504
|
+
* functional_role.member
|
|
7505
|
+
*/
|
|
7506
|
+
functionalRoleMember: {
|
|
7507
|
+
/**
|
|
7508
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_create&version=v3 click to debug }
|
|
7509
|
+
*
|
|
7510
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=contact&resource=functional_role.member&version=v3 document }
|
|
7511
|
+
*/
|
|
7512
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7513
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7514
|
+
return this.httpInstance
|
|
7515
|
+
.request({
|
|
7516
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`, path),
|
|
7517
|
+
method: "POST",
|
|
7518
|
+
data,
|
|
7519
|
+
params,
|
|
7520
|
+
headers,
|
|
7521
|
+
})
|
|
7522
|
+
.catch((e) => {
|
|
7523
|
+
this.logger.error(formatErrors(e));
|
|
7524
|
+
throw e;
|
|
7525
|
+
});
|
|
7526
|
+
}),
|
|
7527
|
+
/**
|
|
7528
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_delete&version=v3 click to debug }
|
|
7529
|
+
*
|
|
7530
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=contact&resource=functional_role.member&version=v3 document }
|
|
7531
|
+
*/
|
|
7532
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7533
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7534
|
+
return this.httpInstance
|
|
7535
|
+
.request({
|
|
7536
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`, path),
|
|
7537
|
+
method: "PATCH",
|
|
7538
|
+
data,
|
|
7539
|
+
params,
|
|
7540
|
+
headers,
|
|
7541
|
+
})
|
|
7542
|
+
.catch((e) => {
|
|
7543
|
+
this.logger.error(formatErrors(e));
|
|
7544
|
+
throw e;
|
|
7545
|
+
});
|
|
7546
|
+
}),
|
|
7547
|
+
/**
|
|
7548
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=get&version=v3 click to debug }
|
|
7549
|
+
*
|
|
7550
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=functional_role.member&version=v3 document }
|
|
7551
|
+
*/
|
|
7552
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7553
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7554
|
+
return this.httpInstance
|
|
7555
|
+
.request({
|
|
7556
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`, path),
|
|
7557
|
+
method: "GET",
|
|
7558
|
+
data,
|
|
7559
|
+
params,
|
|
7560
|
+
headers,
|
|
7561
|
+
})
|
|
7562
|
+
.catch((e) => {
|
|
7563
|
+
this.logger.error(formatErrors(e));
|
|
7564
|
+
throw e;
|
|
7565
|
+
});
|
|
7566
|
+
}),
|
|
7567
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7568
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7569
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7570
|
+
const res = yield this.httpInstance
|
|
7571
|
+
.request({
|
|
7572
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path),
|
|
7573
|
+
method: "GET",
|
|
7574
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
7575
|
+
params: pickBy(innerPayload.params, identity),
|
|
7576
|
+
})
|
|
7577
|
+
.catch((e) => {
|
|
7578
|
+
this.logger.error(formatErrors(e));
|
|
7579
|
+
});
|
|
7580
|
+
return res;
|
|
7581
|
+
});
|
|
7582
|
+
const Iterable = {
|
|
7583
|
+
[Symbol.asyncIterator]() {
|
|
7584
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
7585
|
+
let hasMore = true;
|
|
7586
|
+
let pageToken;
|
|
7587
|
+
while (hasMore) {
|
|
7588
|
+
try {
|
|
7589
|
+
const res = yield __await(sendRequest({
|
|
7590
|
+
headers,
|
|
7591
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
7592
|
+
data,
|
|
7593
|
+
}));
|
|
7594
|
+
const _b = get(res, "data") || {}, {
|
|
7595
|
+
// @ts-ignore
|
|
7596
|
+
has_more,
|
|
7597
|
+
// @ts-ignore
|
|
7598
|
+
page_token,
|
|
7599
|
+
// @ts-ignore
|
|
7600
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
7601
|
+
yield yield __await(rest);
|
|
7602
|
+
hasMore = Boolean(has_more);
|
|
7603
|
+
pageToken = page_token || next_page_token;
|
|
7604
|
+
}
|
|
7605
|
+
catch (e) {
|
|
7606
|
+
yield yield __await(null);
|
|
7607
|
+
break;
|
|
7608
|
+
}
|
|
7609
|
+
}
|
|
7610
|
+
});
|
|
7611
|
+
},
|
|
7612
|
+
};
|
|
7613
|
+
return Iterable;
|
|
7614
|
+
}),
|
|
7615
|
+
/**
|
|
7616
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=list&version=v3 click to debug }
|
|
7617
|
+
*
|
|
7618
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=functional_role.member&version=v3 document }
|
|
7619
|
+
*/
|
|
7620
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7621
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7622
|
+
return this.httpInstance
|
|
7623
|
+
.request({
|
|
7624
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path),
|
|
7625
|
+
method: "GET",
|
|
7626
|
+
data,
|
|
7627
|
+
params,
|
|
7628
|
+
headers,
|
|
7629
|
+
})
|
|
7630
|
+
.catch((e) => {
|
|
7631
|
+
this.logger.error(formatErrors(e));
|
|
7632
|
+
throw e;
|
|
7633
|
+
});
|
|
7634
|
+
}),
|
|
7635
|
+
/**
|
|
7636
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=scopes&version=v3 click to debug }
|
|
7637
|
+
*
|
|
7638
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=scopes&project=contact&resource=functional_role.member&version=v3 document }
|
|
7639
|
+
*/
|
|
7640
|
+
scopes: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7641
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7642
|
+
return this.httpInstance
|
|
7643
|
+
.request({
|
|
7644
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`, path),
|
|
7645
|
+
method: "PATCH",
|
|
7646
|
+
data,
|
|
7647
|
+
params,
|
|
7648
|
+
headers,
|
|
7649
|
+
})
|
|
7650
|
+
.catch((e) => {
|
|
7651
|
+
this.logger.error(formatErrors(e));
|
|
7652
|
+
throw e;
|
|
7653
|
+
});
|
|
7654
|
+
}),
|
|
7655
|
+
},
|
|
7510
7656
|
/**
|
|
7511
7657
|
* 用户组
|
|
7512
7658
|
*/
|
|
@@ -7518,13 +7664,286 @@ class Client$1 {
|
|
|
7518
7664
|
*
|
|
7519
7665
|
* 创建用户组
|
|
7520
7666
|
*
|
|
7521
|
-
* 使用该接口创建用户组,请注意创建用户组时应用的通讯录权限范围需为“全部员工”,否则会创建失败,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7667
|
+
* 使用该接口创建用户组,请注意创建用户组时应用的通讯录权限范围需为“全部员工”,否则会创建失败,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7668
|
+
*/
|
|
7669
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7670
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7671
|
+
return this.httpInstance
|
|
7672
|
+
.request({
|
|
7673
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group`, path),
|
|
7674
|
+
method: "POST",
|
|
7675
|
+
data,
|
|
7676
|
+
params,
|
|
7677
|
+
headers,
|
|
7678
|
+
})
|
|
7679
|
+
.catch((e) => {
|
|
7680
|
+
this.logger.error(formatErrors(e));
|
|
7681
|
+
throw e;
|
|
7682
|
+
});
|
|
7683
|
+
}),
|
|
7684
|
+
/**
|
|
7685
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=delete&version=v3 click to debug }
|
|
7686
|
+
*
|
|
7687
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/delete document }
|
|
7688
|
+
*
|
|
7689
|
+
* 删除用户组
|
|
7690
|
+
*
|
|
7691
|
+
* 通过该接口可删除企业中的用户组,请注意删除用户组时应用的通讯录权限范围需为“全部员工”,否则会删除失败,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7692
|
+
*/
|
|
7693
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7694
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7695
|
+
return this.httpInstance
|
|
7696
|
+
.request({
|
|
7697
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7698
|
+
method: "DELETE",
|
|
7699
|
+
data,
|
|
7700
|
+
params,
|
|
7701
|
+
headers,
|
|
7702
|
+
})
|
|
7703
|
+
.catch((e) => {
|
|
7704
|
+
this.logger.error(formatErrors(e));
|
|
7705
|
+
throw e;
|
|
7706
|
+
});
|
|
7707
|
+
}),
|
|
7708
|
+
/**
|
|
7709
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=get&version=v3 click to debug }
|
|
7710
|
+
*
|
|
7711
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/get document }
|
|
7712
|
+
*
|
|
7713
|
+
* 查询用户组
|
|
7714
|
+
*
|
|
7715
|
+
* 根据用户组 ID 查询某个用户组的基本信息,支持查询普通用户组和动态用户组。请确保应用的通讯录权限范围里包括该用户组或者是“全部员工”,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7716
|
+
*/
|
|
7717
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7718
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7719
|
+
return this.httpInstance
|
|
7720
|
+
.request({
|
|
7721
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7722
|
+
method: "GET",
|
|
7723
|
+
data,
|
|
7724
|
+
params,
|
|
7725
|
+
headers,
|
|
7726
|
+
})
|
|
7727
|
+
.catch((e) => {
|
|
7728
|
+
this.logger.error(formatErrors(e));
|
|
7729
|
+
throw e;
|
|
7730
|
+
});
|
|
7731
|
+
}),
|
|
7732
|
+
/**
|
|
7733
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=member_belong&version=v3 click to debug }
|
|
7734
|
+
*
|
|
7735
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong document }
|
|
7736
|
+
*
|
|
7737
|
+
* 查询用户所属用户组
|
|
7738
|
+
*
|
|
7739
|
+
* 通过该接口可查询该用户所属的用户组列表,可分别查询普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”,则可获取该员工所属的全部用户组列表。如果应用的通讯录权限范围不是“全部员工”,则仅可获取通讯录权限范围内该员工所属的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7740
|
+
*/
|
|
7741
|
+
memberBelong: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7742
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7743
|
+
return this.httpInstance
|
|
7744
|
+
.request({
|
|
7745
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/member_belong`, path),
|
|
7746
|
+
method: "GET",
|
|
7747
|
+
data,
|
|
7748
|
+
params,
|
|
7749
|
+
headers,
|
|
7750
|
+
})
|
|
7751
|
+
.catch((e) => {
|
|
7752
|
+
this.logger.error(formatErrors(e));
|
|
7753
|
+
throw e;
|
|
7754
|
+
});
|
|
7755
|
+
}),
|
|
7756
|
+
/**
|
|
7757
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=patch&version=v3 click to debug }
|
|
7758
|
+
*
|
|
7759
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/patch document }
|
|
7760
|
+
*
|
|
7761
|
+
* 更新用户组
|
|
7762
|
+
*
|
|
7763
|
+
* 使用该接口更新用户组信息,请注意更新用户组时应用的通讯录权限范围需为“全部员工”,否则会更新失败。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7764
|
+
*/
|
|
7765
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7766
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7767
|
+
return this.httpInstance
|
|
7768
|
+
.request({
|
|
7769
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7770
|
+
method: "PATCH",
|
|
7771
|
+
data,
|
|
7772
|
+
params,
|
|
7773
|
+
headers,
|
|
7774
|
+
})
|
|
7775
|
+
.catch((e) => {
|
|
7776
|
+
this.logger.error(formatErrors(e));
|
|
7777
|
+
throw e;
|
|
7778
|
+
});
|
|
7779
|
+
}),
|
|
7780
|
+
simplelistWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7781
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7782
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7783
|
+
const res = yield this.httpInstance
|
|
7784
|
+
.request({
|
|
7785
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path),
|
|
7786
|
+
method: "GET",
|
|
7787
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
7788
|
+
params: pickBy(innerPayload.params, identity),
|
|
7789
|
+
})
|
|
7790
|
+
.catch((e) => {
|
|
7791
|
+
this.logger.error(formatErrors(e));
|
|
7792
|
+
});
|
|
7793
|
+
return res;
|
|
7794
|
+
});
|
|
7795
|
+
const Iterable = {
|
|
7796
|
+
[Symbol.asyncIterator]() {
|
|
7797
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
7798
|
+
let hasMore = true;
|
|
7799
|
+
let pageToken;
|
|
7800
|
+
while (hasMore) {
|
|
7801
|
+
try {
|
|
7802
|
+
const res = yield __await(sendRequest({
|
|
7803
|
+
headers,
|
|
7804
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
7805
|
+
data,
|
|
7806
|
+
}));
|
|
7807
|
+
const _b = get(res, "data") || {}, {
|
|
7808
|
+
// @ts-ignore
|
|
7809
|
+
has_more,
|
|
7810
|
+
// @ts-ignore
|
|
7811
|
+
page_token,
|
|
7812
|
+
// @ts-ignore
|
|
7813
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
7814
|
+
yield yield __await(rest);
|
|
7815
|
+
hasMore = Boolean(has_more);
|
|
7816
|
+
pageToken = page_token || next_page_token;
|
|
7817
|
+
}
|
|
7818
|
+
catch (e) {
|
|
7819
|
+
yield yield __await(null);
|
|
7820
|
+
break;
|
|
7821
|
+
}
|
|
7822
|
+
}
|
|
7823
|
+
});
|
|
7824
|
+
},
|
|
7825
|
+
};
|
|
7826
|
+
return Iterable;
|
|
7827
|
+
}),
|
|
7828
|
+
/**
|
|
7829
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=simplelist&version=v3 click to debug }
|
|
7830
|
+
*
|
|
7831
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist document }
|
|
7832
|
+
*
|
|
7833
|
+
* 查询用户组列表
|
|
7834
|
+
*
|
|
7835
|
+
* 通过该接口可查询企业的用户组列表,可分别查询普通用户组或动态用户组。如果应用的通讯录权限范围是“全部员工”,则可获取企业全部用户组列表。如果应用的通讯录权限范围不是“全部员工”,则仅可获取通讯录权限范围内的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7836
|
+
*/
|
|
7837
|
+
simplelist: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7838
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7839
|
+
return this.httpInstance
|
|
7840
|
+
.request({
|
|
7841
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path),
|
|
7842
|
+
method: "GET",
|
|
7843
|
+
data,
|
|
7844
|
+
params,
|
|
7845
|
+
headers,
|
|
7846
|
+
})
|
|
7847
|
+
.catch((e) => {
|
|
7848
|
+
this.logger.error(formatErrors(e));
|
|
7849
|
+
throw e;
|
|
7850
|
+
});
|
|
7851
|
+
}),
|
|
7852
|
+
},
|
|
7853
|
+
/**
|
|
7854
|
+
* 用户组成员
|
|
7855
|
+
*/
|
|
7856
|
+
groupMember: {
|
|
7857
|
+
/**
|
|
7858
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=add&version=v3 click to debug }
|
|
7859
|
+
*
|
|
7860
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/add document }
|
|
7861
|
+
*
|
|
7862
|
+
* 添加用户组成员
|
|
7863
|
+
*
|
|
7864
|
+
* 向用户组中添加成员(目前成员仅支持用户,未来会支持部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7865
|
+
*/
|
|
7866
|
+
add: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7867
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7868
|
+
return this.httpInstance
|
|
7869
|
+
.request({
|
|
7870
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`, path),
|
|
7871
|
+
method: "POST",
|
|
7872
|
+
data,
|
|
7873
|
+
params,
|
|
7874
|
+
headers,
|
|
7875
|
+
})
|
|
7876
|
+
.catch((e) => {
|
|
7877
|
+
this.logger.error(formatErrors(e));
|
|
7878
|
+
throw e;
|
|
7879
|
+
});
|
|
7880
|
+
}),
|
|
7881
|
+
/**
|
|
7882
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_add&version=v3 click to debug }
|
|
7883
|
+
*
|
|
7884
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_add document }
|
|
7885
|
+
*
|
|
7886
|
+
* 批量添加用户组成员
|
|
7887
|
+
*
|
|
7888
|
+
* 向普通用户组中批量添加成员(目前仅支持添加用户,暂不支持添加部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7889
|
+
*
|
|
7890
|
+
* 请求体中的member_type,目前仅支持user, 未来将支持department。
|
|
7891
|
+
*/
|
|
7892
|
+
batchAdd: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7893
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7894
|
+
return this.httpInstance
|
|
7895
|
+
.request({
|
|
7896
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`, path),
|
|
7897
|
+
method: "POST",
|
|
7898
|
+
data,
|
|
7899
|
+
params,
|
|
7900
|
+
headers,
|
|
7901
|
+
})
|
|
7902
|
+
.catch((e) => {
|
|
7903
|
+
this.logger.error(formatErrors(e));
|
|
7904
|
+
throw e;
|
|
7905
|
+
});
|
|
7906
|
+
}),
|
|
7907
|
+
/**
|
|
7908
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_remove&version=v3 click to debug }
|
|
7909
|
+
*
|
|
7910
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_remove document }
|
|
7911
|
+
*
|
|
7912
|
+
* 批量移除用户组成员
|
|
7913
|
+
*
|
|
7914
|
+
* 从普通用户组中批量移除成员 (目前仅支持移除用户,暂不支持移除部门)。如果应用的通讯录权限范围是“全部员工”,则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除, [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7915
|
+
*
|
|
7916
|
+
* 请求体中的member_type,目前仅支持user, 未来将支持department。
|
|
7917
|
+
*/
|
|
7918
|
+
batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7919
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7920
|
+
return this.httpInstance
|
|
7921
|
+
.request({
|
|
7922
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`, path),
|
|
7923
|
+
method: "POST",
|
|
7924
|
+
data,
|
|
7925
|
+
params,
|
|
7926
|
+
headers,
|
|
7927
|
+
})
|
|
7928
|
+
.catch((e) => {
|
|
7929
|
+
this.logger.error(formatErrors(e));
|
|
7930
|
+
throw e;
|
|
7931
|
+
});
|
|
7932
|
+
}),
|
|
7933
|
+
/**
|
|
7934
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=remove&version=v3 click to debug }
|
|
7935
|
+
*
|
|
7936
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove document }
|
|
7937
|
+
*
|
|
7938
|
+
* 移除用户组成员
|
|
7939
|
+
*
|
|
7940
|
+
* 从用户组中移除成员 (目前成员仅支持用户,未来会支持部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除, [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7522
7941
|
*/
|
|
7523
|
-
|
|
7942
|
+
remove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7524
7943
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7525
7944
|
return this.httpInstance
|
|
7526
7945
|
.request({
|
|
7527
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group`, path),
|
|
7946
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`, path),
|
|
7528
7947
|
method: "POST",
|
|
7529
7948
|
data,
|
|
7530
7949
|
params,
|
|
@@ -7536,20 +7955,20 @@ class Client$1 {
|
|
|
7536
7955
|
});
|
|
7537
7956
|
}),
|
|
7538
7957
|
/**
|
|
7539
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=
|
|
7958
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=simplelist&version=v3 click to debug }
|
|
7540
7959
|
*
|
|
7541
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/
|
|
7960
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist document }
|
|
7542
7961
|
*
|
|
7543
|
-
*
|
|
7962
|
+
* 查询用户组成员列表
|
|
7544
7963
|
*
|
|
7545
|
-
*
|
|
7964
|
+
* 通过该接口可查询某个用户组的成员列表(支持查询成员中的用户和部门), 本接口支持普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”,则可查询企业内任何用户组的成员列表。如果应用的通讯录权限范围不是“全部员工”,则仅可查询通讯录权限范围中的用户组的成员列表,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7546
7965
|
*/
|
|
7547
|
-
|
|
7966
|
+
simplelist: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7548
7967
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7549
7968
|
return this.httpInstance
|
|
7550
7969
|
.request({
|
|
7551
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7552
|
-
method: "
|
|
7970
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`, path),
|
|
7971
|
+
method: "GET",
|
|
7553
7972
|
data,
|
|
7554
7973
|
params,
|
|
7555
7974
|
headers,
|
|
@@ -7559,21 +7978,22 @@ class Client$1 {
|
|
|
7559
7978
|
throw e;
|
|
7560
7979
|
});
|
|
7561
7980
|
}),
|
|
7981
|
+
},
|
|
7982
|
+
/**
|
|
7983
|
+
* job_family
|
|
7984
|
+
*/
|
|
7985
|
+
jobFamily: {
|
|
7562
7986
|
/**
|
|
7563
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7564
|
-
*
|
|
7565
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/get document }
|
|
7566
|
-
*
|
|
7567
|
-
* 查询用户组
|
|
7987
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=create&version=v3 click to debug }
|
|
7568
7988
|
*
|
|
7569
|
-
*
|
|
7989
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_family&version=v3 document }
|
|
7570
7990
|
*/
|
|
7571
|
-
|
|
7991
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7572
7992
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7573
7993
|
return this.httpInstance
|
|
7574
7994
|
.request({
|
|
7575
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7576
|
-
method: "
|
|
7995
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path),
|
|
7996
|
+
method: "POST",
|
|
7577
7997
|
data,
|
|
7578
7998
|
params,
|
|
7579
7999
|
headers,
|
|
@@ -7584,20 +8004,16 @@ class Client$1 {
|
|
|
7584
8004
|
});
|
|
7585
8005
|
}),
|
|
7586
8006
|
/**
|
|
7587
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7588
|
-
*
|
|
7589
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong document }
|
|
7590
|
-
*
|
|
7591
|
-
* 查询用户所属用户组
|
|
8007
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=delete&version=v3 click to debug }
|
|
7592
8008
|
*
|
|
7593
|
-
*
|
|
8009
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_family&version=v3 document }
|
|
7594
8010
|
*/
|
|
7595
|
-
|
|
8011
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7596
8012
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7597
8013
|
return this.httpInstance
|
|
7598
8014
|
.request({
|
|
7599
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7600
|
-
method: "
|
|
8015
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path),
|
|
8016
|
+
method: "DELETE",
|
|
7601
8017
|
data,
|
|
7602
8018
|
params,
|
|
7603
8019
|
headers,
|
|
@@ -7608,20 +8024,16 @@ class Client$1 {
|
|
|
7608
8024
|
});
|
|
7609
8025
|
}),
|
|
7610
8026
|
/**
|
|
7611
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7612
|
-
*
|
|
7613
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/patch document }
|
|
7614
|
-
*
|
|
7615
|
-
* 更新用户组
|
|
8027
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=get&version=v3 click to debug }
|
|
7616
8028
|
*
|
|
7617
|
-
*
|
|
8029
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_family&version=v3 document }
|
|
7618
8030
|
*/
|
|
7619
|
-
|
|
8031
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7620
8032
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7621
8033
|
return this.httpInstance
|
|
7622
8034
|
.request({
|
|
7623
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7624
|
-
method: "
|
|
8035
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path),
|
|
8036
|
+
method: "GET",
|
|
7625
8037
|
data,
|
|
7626
8038
|
params,
|
|
7627
8039
|
headers,
|
|
@@ -7631,12 +8043,12 @@ class Client$1 {
|
|
|
7631
8043
|
throw e;
|
|
7632
8044
|
});
|
|
7633
8045
|
}),
|
|
7634
|
-
|
|
8046
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7635
8047
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7636
8048
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7637
8049
|
const res = yield this.httpInstance
|
|
7638
8050
|
.request({
|
|
7639
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
8051
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path),
|
|
7640
8052
|
method: "GET",
|
|
7641
8053
|
headers: pickBy(innerPayload.headers, identity),
|
|
7642
8054
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -7680,19 +8092,15 @@ class Client$1 {
|
|
|
7680
8092
|
return Iterable;
|
|
7681
8093
|
}),
|
|
7682
8094
|
/**
|
|
7683
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7684
|
-
*
|
|
7685
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist document }
|
|
7686
|
-
*
|
|
7687
|
-
* 查询用户组列表
|
|
8095
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=list&version=v3 click to debug }
|
|
7688
8096
|
*
|
|
7689
|
-
*
|
|
8097
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_family&version=v3 document }
|
|
7690
8098
|
*/
|
|
7691
|
-
|
|
8099
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7692
8100
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7693
8101
|
return this.httpInstance
|
|
7694
8102
|
.request({
|
|
7695
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
8103
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path),
|
|
7696
8104
|
method: "GET",
|
|
7697
8105
|
data,
|
|
7698
8106
|
params,
|
|
@@ -7703,25 +8111,41 @@ class Client$1 {
|
|
|
7703
8111
|
throw e;
|
|
7704
8112
|
});
|
|
7705
8113
|
}),
|
|
8114
|
+
/**
|
|
8115
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=update&version=v3 click to debug }
|
|
8116
|
+
*
|
|
8117
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_family&version=v3 document }
|
|
8118
|
+
*/
|
|
8119
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
8120
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
8121
|
+
return this.httpInstance
|
|
8122
|
+
.request({
|
|
8123
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path),
|
|
8124
|
+
method: "PUT",
|
|
8125
|
+
data,
|
|
8126
|
+
params,
|
|
8127
|
+
headers,
|
|
8128
|
+
})
|
|
8129
|
+
.catch((e) => {
|
|
8130
|
+
this.logger.error(formatErrors(e));
|
|
8131
|
+
throw e;
|
|
8132
|
+
});
|
|
8133
|
+
}),
|
|
7706
8134
|
},
|
|
7707
8135
|
/**
|
|
7708
|
-
*
|
|
8136
|
+
* job_level
|
|
7709
8137
|
*/
|
|
7710
|
-
|
|
8138
|
+
jobLevel: {
|
|
7711
8139
|
/**
|
|
7712
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7713
|
-
*
|
|
7714
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/add document }
|
|
7715
|
-
*
|
|
7716
|
-
* 添加用户组成员
|
|
8140
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=create&version=v3 click to debug }
|
|
7717
8141
|
*
|
|
7718
|
-
*
|
|
8142
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_level&version=v3 document }
|
|
7719
8143
|
*/
|
|
7720
|
-
|
|
8144
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7721
8145
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7722
8146
|
return this.httpInstance
|
|
7723
8147
|
.request({
|
|
7724
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
8148
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path),
|
|
7725
8149
|
method: "POST",
|
|
7726
8150
|
data,
|
|
7727
8151
|
params,
|
|
@@ -7733,22 +8157,16 @@ class Client$1 {
|
|
|
7733
8157
|
});
|
|
7734
8158
|
}),
|
|
7735
8159
|
/**
|
|
7736
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7737
|
-
*
|
|
7738
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_add document }
|
|
7739
|
-
*
|
|
7740
|
-
* 批量添加用户组成员
|
|
7741
|
-
*
|
|
7742
|
-
* 向普通用户组中批量添加成员(目前仅支持添加用户,暂不支持添加部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
8160
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=delete&version=v3 click to debug }
|
|
7743
8161
|
*
|
|
7744
|
-
*
|
|
8162
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_level&version=v3 document }
|
|
7745
8163
|
*/
|
|
7746
|
-
|
|
8164
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7747
8165
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7748
8166
|
return this.httpInstance
|
|
7749
8167
|
.request({
|
|
7750
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7751
|
-
method: "
|
|
8168
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path),
|
|
8169
|
+
method: "DELETE",
|
|
7752
8170
|
data,
|
|
7753
8171
|
params,
|
|
7754
8172
|
headers,
|
|
@@ -7759,22 +8177,16 @@ class Client$1 {
|
|
|
7759
8177
|
});
|
|
7760
8178
|
}),
|
|
7761
8179
|
/**
|
|
7762
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7763
|
-
*
|
|
7764
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_remove document }
|
|
7765
|
-
*
|
|
7766
|
-
* 批量移除用户组成员
|
|
7767
|
-
*
|
|
7768
|
-
* 从普通用户组中批量移除成员 (目前仅支持移除用户,暂不支持移除部门)。如果应用的通讯录权限范围是“全部员工”,则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除, [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
8180
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=get&version=v3 click to debug }
|
|
7769
8181
|
*
|
|
7770
|
-
*
|
|
8182
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_level&version=v3 document }
|
|
7771
8183
|
*/
|
|
7772
|
-
|
|
8184
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7773
8185
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7774
8186
|
return this.httpInstance
|
|
7775
8187
|
.request({
|
|
7776
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7777
|
-
method: "
|
|
8188
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path),
|
|
8189
|
+
method: "GET",
|
|
7778
8190
|
data,
|
|
7779
8191
|
params,
|
|
7780
8192
|
headers,
|
|
@@ -7784,21 +8196,65 @@ class Client$1 {
|
|
|
7784
8196
|
throw e;
|
|
7785
8197
|
});
|
|
7786
8198
|
}),
|
|
8199
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
8200
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
8201
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
8202
|
+
const res = yield this.httpInstance
|
|
8203
|
+
.request({
|
|
8204
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path),
|
|
8205
|
+
method: "GET",
|
|
8206
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
8207
|
+
params: pickBy(innerPayload.params, identity),
|
|
8208
|
+
})
|
|
8209
|
+
.catch((e) => {
|
|
8210
|
+
this.logger.error(formatErrors(e));
|
|
8211
|
+
});
|
|
8212
|
+
return res;
|
|
8213
|
+
});
|
|
8214
|
+
const Iterable = {
|
|
8215
|
+
[Symbol.asyncIterator]() {
|
|
8216
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
8217
|
+
let hasMore = true;
|
|
8218
|
+
let pageToken;
|
|
8219
|
+
while (hasMore) {
|
|
8220
|
+
try {
|
|
8221
|
+
const res = yield __await(sendRequest({
|
|
8222
|
+
headers,
|
|
8223
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
8224
|
+
data,
|
|
8225
|
+
}));
|
|
8226
|
+
const _b = get(res, "data") || {}, {
|
|
8227
|
+
// @ts-ignore
|
|
8228
|
+
has_more,
|
|
8229
|
+
// @ts-ignore
|
|
8230
|
+
page_token,
|
|
8231
|
+
// @ts-ignore
|
|
8232
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
8233
|
+
yield yield __await(rest);
|
|
8234
|
+
hasMore = Boolean(has_more);
|
|
8235
|
+
pageToken = page_token || next_page_token;
|
|
8236
|
+
}
|
|
8237
|
+
catch (e) {
|
|
8238
|
+
yield yield __await(null);
|
|
8239
|
+
break;
|
|
8240
|
+
}
|
|
8241
|
+
}
|
|
8242
|
+
});
|
|
8243
|
+
},
|
|
8244
|
+
};
|
|
8245
|
+
return Iterable;
|
|
8246
|
+
}),
|
|
7787
8247
|
/**
|
|
7788
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7789
|
-
*
|
|
7790
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove document }
|
|
7791
|
-
*
|
|
7792
|
-
* 移除用户组成员
|
|
8248
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=list&version=v3 click to debug }
|
|
7793
8249
|
*
|
|
7794
|
-
*
|
|
8250
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_level&version=v3 document }
|
|
7795
8251
|
*/
|
|
7796
|
-
|
|
8252
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7797
8253
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7798
8254
|
return this.httpInstance
|
|
7799
8255
|
.request({
|
|
7800
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7801
|
-
method: "
|
|
8256
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path),
|
|
8257
|
+
method: "GET",
|
|
7802
8258
|
data,
|
|
7803
8259
|
params,
|
|
7804
8260
|
headers,
|
|
@@ -7809,20 +8265,16 @@ class Client$1 {
|
|
|
7809
8265
|
});
|
|
7810
8266
|
}),
|
|
7811
8267
|
/**
|
|
7812
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7813
|
-
*
|
|
7814
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist document }
|
|
8268
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=update&version=v3 click to debug }
|
|
7815
8269
|
*
|
|
7816
|
-
*
|
|
7817
|
-
*
|
|
7818
|
-
* 通过该接口可查询某个用户组的成员列表(支持查询成员中的用户和部门), 本接口支持普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”,则可查询企业内任何用户组的成员列表。如果应用的通讯录权限范围不是“全部员工”,则仅可查询通讯录权限范围中的用户组的成员列表,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
8270
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_level&version=v3 document }
|
|
7819
8271
|
*/
|
|
7820
|
-
|
|
8272
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7821
8273
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7822
8274
|
return this.httpInstance
|
|
7823
8275
|
.request({
|
|
7824
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7825
|
-
method: "
|
|
8276
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path),
|
|
8277
|
+
method: "PUT",
|
|
7826
8278
|
data,
|
|
7827
8279
|
params,
|
|
7828
8280
|
headers,
|
|
@@ -9148,7 +9600,7 @@ class Client$1 {
|
|
|
9148
9600
|
}),
|
|
9149
9601
|
},
|
|
9150
9602
|
/**
|
|
9151
|
-
*
|
|
9603
|
+
* 分片上传
|
|
9152
9604
|
*/
|
|
9153
9605
|
file: {
|
|
9154
9606
|
/**
|
|
@@ -9884,7 +10336,7 @@ class Client$1 {
|
|
|
9884
10336
|
}),
|
|
9885
10337
|
},
|
|
9886
10338
|
/**
|
|
9887
|
-
*
|
|
10339
|
+
* 素材
|
|
9888
10340
|
*/
|
|
9889
10341
|
media: {
|
|
9890
10342
|
/**
|
|
@@ -12092,7 +12544,7 @@ class Client$1 {
|
|
|
12092
12544
|
*/
|
|
12093
12545
|
this.hire = {
|
|
12094
12546
|
/**
|
|
12095
|
-
*
|
|
12547
|
+
* 投递
|
|
12096
12548
|
*/
|
|
12097
12549
|
application: {
|
|
12098
12550
|
/**
|
|
@@ -16614,10 +17066,6 @@ class Client$1 {
|
|
|
16614
17066
|
|
|
16615
17067
|
*/
|
|
16616
17068
|
this.people_bytedance = {};
|
|
16617
|
-
/**
|
|
16618
|
-
|
|
16619
|
-
*/
|
|
16620
|
-
this.performance = {};
|
|
16621
17069
|
/**
|
|
16622
17070
|
|
|
16623
17071
|
*/
|
|
@@ -17435,7 +17883,7 @@ class Client$1 {
|
|
|
17435
17883
|
}),
|
|
17436
17884
|
},
|
|
17437
17885
|
/**
|
|
17438
|
-
*
|
|
17886
|
+
* 单元格
|
|
17439
17887
|
*/
|
|
17440
17888
|
spreadsheetSheet: {
|
|
17441
17889
|
/**
|
|
@@ -18589,6 +19037,31 @@ class Client$1 {
|
|
|
18589
19037
|
* 企业信息
|
|
18590
19038
|
*/
|
|
18591
19039
|
this.tenant = {
|
|
19040
|
+
/**
|
|
19041
|
+
* tenant.product_assign_info
|
|
19042
|
+
*/
|
|
19043
|
+
tenantProductAssignInfo: {
|
|
19044
|
+
/**
|
|
19045
|
+
* {@link https://open.feishu.cn/api-explorer?project=tenant&resource=tenant.product_assign_info&apiName=query&version=v2 click to debug }
|
|
19046
|
+
*
|
|
19047
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=tenant&resource=tenant.product_assign_info&version=v2 document }
|
|
19048
|
+
*/
|
|
19049
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19050
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19051
|
+
return this.httpInstance
|
|
19052
|
+
.request({
|
|
19053
|
+
url: fillApiPath(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`, path),
|
|
19054
|
+
method: "GET",
|
|
19055
|
+
data,
|
|
19056
|
+
params,
|
|
19057
|
+
headers,
|
|
19058
|
+
})
|
|
19059
|
+
.catch((e) => {
|
|
19060
|
+
this.logger.error(formatErrors(e));
|
|
19061
|
+
throw e;
|
|
19062
|
+
});
|
|
19063
|
+
}),
|
|
19064
|
+
},
|
|
18592
19065
|
/**
|
|
18593
19066
|
* 企业信息
|
|
18594
19067
|
*/
|
|
@@ -19625,6 +20098,51 @@ class Client$1 {
|
|
|
19625
20098
|
});
|
|
19626
20099
|
}),
|
|
19627
20100
|
},
|
|
20101
|
+
/**
|
|
20102
|
+
* reserve_config.form
|
|
20103
|
+
*/
|
|
20104
|
+
reserveConfigForm: {
|
|
20105
|
+
/**
|
|
20106
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=get&version=v1 click to debug }
|
|
20107
|
+
*
|
|
20108
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.form&version=v1 document }
|
|
20109
|
+
*/
|
|
20110
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20111
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20112
|
+
return this.httpInstance
|
|
20113
|
+
.request({
|
|
20114
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path),
|
|
20115
|
+
method: "GET",
|
|
20116
|
+
data,
|
|
20117
|
+
params,
|
|
20118
|
+
headers,
|
|
20119
|
+
})
|
|
20120
|
+
.catch((e) => {
|
|
20121
|
+
this.logger.error(formatErrors(e));
|
|
20122
|
+
throw e;
|
|
20123
|
+
});
|
|
20124
|
+
}),
|
|
20125
|
+
/**
|
|
20126
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=patch&version=v1 click to debug }
|
|
20127
|
+
*
|
|
20128
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.form&version=v1 document }
|
|
20129
|
+
*/
|
|
20130
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20131
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20132
|
+
return this.httpInstance
|
|
20133
|
+
.request({
|
|
20134
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path),
|
|
20135
|
+
method: "PATCH",
|
|
20136
|
+
data,
|
|
20137
|
+
params,
|
|
20138
|
+
headers,
|
|
20139
|
+
})
|
|
20140
|
+
.catch((e) => {
|
|
20141
|
+
this.logger.error(formatErrors(e));
|
|
20142
|
+
throw e;
|
|
20143
|
+
});
|
|
20144
|
+
}),
|
|
20145
|
+
},
|
|
19628
20146
|
/**
|
|
19629
20147
|
* reserve_config
|
|
19630
20148
|
*/
|