@larksuiteoapi/node-sdk 1.13.0 → 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 +1125 -57
package/lib/index.js
CHANGED
|
@@ -585,7 +585,7 @@ class Client$1 {
|
|
|
585
585
|
},
|
|
586
586
|
};
|
|
587
587
|
/**
|
|
588
|
-
*
|
|
588
|
+
* 管理后台-密码
|
|
589
589
|
*/
|
|
590
590
|
this.admin = {
|
|
591
591
|
/**
|
|
@@ -1506,78 +1506,6 @@ class Client$1 {
|
|
|
1506
1506
|
throw e;
|
|
1507
1507
|
});
|
|
1508
1508
|
}),
|
|
1509
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1510
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1511
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
1512
|
-
const res = yield this.httpInstance
|
|
1513
|
-
.request({
|
|
1514
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals`, path),
|
|
1515
|
-
method: "GET",
|
|
1516
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
1517
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
1518
|
-
})
|
|
1519
|
-
.catch((e) => {
|
|
1520
|
-
this.logger.error(formatErrors(e));
|
|
1521
|
-
});
|
|
1522
|
-
return res;
|
|
1523
|
-
});
|
|
1524
|
-
const Iterable = {
|
|
1525
|
-
[Symbol.asyncIterator]() {
|
|
1526
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
1527
|
-
let hasMore = true;
|
|
1528
|
-
let pageToken;
|
|
1529
|
-
while (hasMore) {
|
|
1530
|
-
try {
|
|
1531
|
-
const res = yield __await(sendRequest({
|
|
1532
|
-
headers,
|
|
1533
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
1534
|
-
data,
|
|
1535
|
-
}));
|
|
1536
|
-
const _b = get__default["default"](res, "data") || {}, {
|
|
1537
|
-
// @ts-ignore
|
|
1538
|
-
has_more,
|
|
1539
|
-
// @ts-ignore
|
|
1540
|
-
page_token,
|
|
1541
|
-
// @ts-ignore
|
|
1542
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
1543
|
-
yield yield __await(rest);
|
|
1544
|
-
hasMore = Boolean(has_more);
|
|
1545
|
-
pageToken = page_token || next_page_token;
|
|
1546
|
-
}
|
|
1547
|
-
catch (e) {
|
|
1548
|
-
yield yield __await(null);
|
|
1549
|
-
break;
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
});
|
|
1553
|
-
},
|
|
1554
|
-
};
|
|
1555
|
-
return Iterable;
|
|
1556
|
-
}),
|
|
1557
|
-
/**
|
|
1558
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=list&version=v4 click to debug }
|
|
1559
|
-
*
|
|
1560
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/list document }
|
|
1561
|
-
*
|
|
1562
|
-
* 查询审批定义列表
|
|
1563
|
-
*
|
|
1564
|
-
* 查询当前用户可发起的审批定义列表。
|
|
1565
|
-
*/
|
|
1566
|
-
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1567
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1568
|
-
return this.httpInstance
|
|
1569
|
-
.request({
|
|
1570
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/approvals`, path),
|
|
1571
|
-
method: "GET",
|
|
1572
|
-
data,
|
|
1573
|
-
params,
|
|
1574
|
-
headers,
|
|
1575
|
-
})
|
|
1576
|
-
.catch((e) => {
|
|
1577
|
-
this.logger.error(formatErrors(e));
|
|
1578
|
-
throw e;
|
|
1579
|
-
});
|
|
1580
|
-
}),
|
|
1581
1509
|
/**
|
|
1582
1510
|
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=approval&apiName=subscribe&version=v4 click to debug }
|
|
1583
1511
|
*
|
|
@@ -7522,6 +7450,224 @@ class Client$1 {
|
|
|
7522
7450
|
});
|
|
7523
7451
|
}),
|
|
7524
7452
|
},
|
|
7453
|
+
/**
|
|
7454
|
+
* functional_role
|
|
7455
|
+
*/
|
|
7456
|
+
functionalRole: {
|
|
7457
|
+
/**
|
|
7458
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=create&version=v3 click to debug }
|
|
7459
|
+
*
|
|
7460
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=functional_role&version=v3 document }
|
|
7461
|
+
*/
|
|
7462
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7463
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7464
|
+
return this.httpInstance
|
|
7465
|
+
.request({
|
|
7466
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles`, path),
|
|
7467
|
+
method: "POST",
|
|
7468
|
+
data,
|
|
7469
|
+
params,
|
|
7470
|
+
headers,
|
|
7471
|
+
})
|
|
7472
|
+
.catch((e) => {
|
|
7473
|
+
this.logger.error(formatErrors(e));
|
|
7474
|
+
throw e;
|
|
7475
|
+
});
|
|
7476
|
+
}),
|
|
7477
|
+
/**
|
|
7478
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=delete&version=v3 click to debug }
|
|
7479
|
+
*
|
|
7480
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=functional_role&version=v3 document }
|
|
7481
|
+
*/
|
|
7482
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7483
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7484
|
+
return this.httpInstance
|
|
7485
|
+
.request({
|
|
7486
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path),
|
|
7487
|
+
method: "DELETE",
|
|
7488
|
+
data,
|
|
7489
|
+
params,
|
|
7490
|
+
headers,
|
|
7491
|
+
})
|
|
7492
|
+
.catch((e) => {
|
|
7493
|
+
this.logger.error(formatErrors(e));
|
|
7494
|
+
throw e;
|
|
7495
|
+
});
|
|
7496
|
+
}),
|
|
7497
|
+
/**
|
|
7498
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role&apiName=update&version=v3 click to debug }
|
|
7499
|
+
*
|
|
7500
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=functional_role&version=v3 document }
|
|
7501
|
+
*/
|
|
7502
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7503
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7504
|
+
return this.httpInstance
|
|
7505
|
+
.request({
|
|
7506
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id`, path),
|
|
7507
|
+
method: "PUT",
|
|
7508
|
+
data,
|
|
7509
|
+
params,
|
|
7510
|
+
headers,
|
|
7511
|
+
})
|
|
7512
|
+
.catch((e) => {
|
|
7513
|
+
this.logger.error(formatErrors(e));
|
|
7514
|
+
throw e;
|
|
7515
|
+
});
|
|
7516
|
+
}),
|
|
7517
|
+
},
|
|
7518
|
+
/**
|
|
7519
|
+
* functional_role.member
|
|
7520
|
+
*/
|
|
7521
|
+
functionalRoleMember: {
|
|
7522
|
+
/**
|
|
7523
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_create&version=v3 click to debug }
|
|
7524
|
+
*
|
|
7525
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=contact&resource=functional_role.member&version=v3 document }
|
|
7526
|
+
*/
|
|
7527
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7528
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7529
|
+
return this.httpInstance
|
|
7530
|
+
.request({
|
|
7531
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_create`, path),
|
|
7532
|
+
method: "POST",
|
|
7533
|
+
data,
|
|
7534
|
+
params,
|
|
7535
|
+
headers,
|
|
7536
|
+
})
|
|
7537
|
+
.catch((e) => {
|
|
7538
|
+
this.logger.error(formatErrors(e));
|
|
7539
|
+
throw e;
|
|
7540
|
+
});
|
|
7541
|
+
}),
|
|
7542
|
+
/**
|
|
7543
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=batch_delete&version=v3 click to debug }
|
|
7544
|
+
*
|
|
7545
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=contact&resource=functional_role.member&version=v3 document }
|
|
7546
|
+
*/
|
|
7547
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7548
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7549
|
+
return this.httpInstance
|
|
7550
|
+
.request({
|
|
7551
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/batch_delete`, path),
|
|
7552
|
+
method: "PATCH",
|
|
7553
|
+
data,
|
|
7554
|
+
params,
|
|
7555
|
+
headers,
|
|
7556
|
+
})
|
|
7557
|
+
.catch((e) => {
|
|
7558
|
+
this.logger.error(formatErrors(e));
|
|
7559
|
+
throw e;
|
|
7560
|
+
});
|
|
7561
|
+
}),
|
|
7562
|
+
/**
|
|
7563
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=get&version=v3 click to debug }
|
|
7564
|
+
*
|
|
7565
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=functional_role.member&version=v3 document }
|
|
7566
|
+
*/
|
|
7567
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7568
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7569
|
+
return this.httpInstance
|
|
7570
|
+
.request({
|
|
7571
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/:member_id`, path),
|
|
7572
|
+
method: "GET",
|
|
7573
|
+
data,
|
|
7574
|
+
params,
|
|
7575
|
+
headers,
|
|
7576
|
+
})
|
|
7577
|
+
.catch((e) => {
|
|
7578
|
+
this.logger.error(formatErrors(e));
|
|
7579
|
+
throw e;
|
|
7580
|
+
});
|
|
7581
|
+
}),
|
|
7582
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7583
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7584
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7585
|
+
const res = yield this.httpInstance
|
|
7586
|
+
.request({
|
|
7587
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path),
|
|
7588
|
+
method: "GET",
|
|
7589
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
7590
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
7591
|
+
})
|
|
7592
|
+
.catch((e) => {
|
|
7593
|
+
this.logger.error(formatErrors(e));
|
|
7594
|
+
});
|
|
7595
|
+
return res;
|
|
7596
|
+
});
|
|
7597
|
+
const Iterable = {
|
|
7598
|
+
[Symbol.asyncIterator]() {
|
|
7599
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
7600
|
+
let hasMore = true;
|
|
7601
|
+
let pageToken;
|
|
7602
|
+
while (hasMore) {
|
|
7603
|
+
try {
|
|
7604
|
+
const res = yield __await(sendRequest({
|
|
7605
|
+
headers,
|
|
7606
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
7607
|
+
data,
|
|
7608
|
+
}));
|
|
7609
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
7610
|
+
// @ts-ignore
|
|
7611
|
+
has_more,
|
|
7612
|
+
// @ts-ignore
|
|
7613
|
+
page_token,
|
|
7614
|
+
// @ts-ignore
|
|
7615
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
7616
|
+
yield yield __await(rest);
|
|
7617
|
+
hasMore = Boolean(has_more);
|
|
7618
|
+
pageToken = page_token || next_page_token;
|
|
7619
|
+
}
|
|
7620
|
+
catch (e) {
|
|
7621
|
+
yield yield __await(null);
|
|
7622
|
+
break;
|
|
7623
|
+
}
|
|
7624
|
+
}
|
|
7625
|
+
});
|
|
7626
|
+
},
|
|
7627
|
+
};
|
|
7628
|
+
return Iterable;
|
|
7629
|
+
}),
|
|
7630
|
+
/**
|
|
7631
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=list&version=v3 click to debug }
|
|
7632
|
+
*
|
|
7633
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=functional_role.member&version=v3 document }
|
|
7634
|
+
*/
|
|
7635
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7636
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7637
|
+
return this.httpInstance
|
|
7638
|
+
.request({
|
|
7639
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members`, path),
|
|
7640
|
+
method: "GET",
|
|
7641
|
+
data,
|
|
7642
|
+
params,
|
|
7643
|
+
headers,
|
|
7644
|
+
})
|
|
7645
|
+
.catch((e) => {
|
|
7646
|
+
this.logger.error(formatErrors(e));
|
|
7647
|
+
throw e;
|
|
7648
|
+
});
|
|
7649
|
+
}),
|
|
7650
|
+
/**
|
|
7651
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=functional_role.member&apiName=scopes&version=v3 click to debug }
|
|
7652
|
+
*
|
|
7653
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=scopes&project=contact&resource=functional_role.member&version=v3 document }
|
|
7654
|
+
*/
|
|
7655
|
+
scopes: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7656
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7657
|
+
return this.httpInstance
|
|
7658
|
+
.request({
|
|
7659
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/functional_roles/:role_id/members/scopes`, path),
|
|
7660
|
+
method: "PATCH",
|
|
7661
|
+
data,
|
|
7662
|
+
params,
|
|
7663
|
+
headers,
|
|
7664
|
+
})
|
|
7665
|
+
.catch((e) => {
|
|
7666
|
+
this.logger.error(formatErrors(e));
|
|
7667
|
+
throw e;
|
|
7668
|
+
});
|
|
7669
|
+
}),
|
|
7670
|
+
},
|
|
7525
7671
|
/**
|
|
7526
7672
|
* 用户组
|
|
7527
7673
|
*/
|
|
@@ -7533,13 +7679,286 @@ class Client$1 {
|
|
|
7533
7679
|
*
|
|
7534
7680
|
* 创建用户组
|
|
7535
7681
|
*
|
|
7536
|
-
* 使用该接口创建用户组,请注意创建用户组时应用的通讯录权限范围需为“全部员工”,否则会创建失败,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7682
|
+
* 使用该接口创建用户组,请注意创建用户组时应用的通讯录权限范围需为“全部员工”,否则会创建失败,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7683
|
+
*/
|
|
7684
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7685
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7686
|
+
return this.httpInstance
|
|
7687
|
+
.request({
|
|
7688
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group`, path),
|
|
7689
|
+
method: "POST",
|
|
7690
|
+
data,
|
|
7691
|
+
params,
|
|
7692
|
+
headers,
|
|
7693
|
+
})
|
|
7694
|
+
.catch((e) => {
|
|
7695
|
+
this.logger.error(formatErrors(e));
|
|
7696
|
+
throw e;
|
|
7697
|
+
});
|
|
7698
|
+
}),
|
|
7699
|
+
/**
|
|
7700
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=delete&version=v3 click to debug }
|
|
7701
|
+
*
|
|
7702
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/delete document }
|
|
7703
|
+
*
|
|
7704
|
+
* 删除用户组
|
|
7705
|
+
*
|
|
7706
|
+
* 通过该接口可删除企业中的用户组,请注意删除用户组时应用的通讯录权限范围需为“全部员工”,否则会删除失败,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7707
|
+
*/
|
|
7708
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7709
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7710
|
+
return this.httpInstance
|
|
7711
|
+
.request({
|
|
7712
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7713
|
+
method: "DELETE",
|
|
7714
|
+
data,
|
|
7715
|
+
params,
|
|
7716
|
+
headers,
|
|
7717
|
+
})
|
|
7718
|
+
.catch((e) => {
|
|
7719
|
+
this.logger.error(formatErrors(e));
|
|
7720
|
+
throw e;
|
|
7721
|
+
});
|
|
7722
|
+
}),
|
|
7723
|
+
/**
|
|
7724
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=get&version=v3 click to debug }
|
|
7725
|
+
*
|
|
7726
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/get document }
|
|
7727
|
+
*
|
|
7728
|
+
* 查询用户组
|
|
7729
|
+
*
|
|
7730
|
+
* 根据用户组 ID 查询某个用户组的基本信息,支持查询普通用户组和动态用户组。请确保应用的通讯录权限范围里包括该用户组或者是“全部员工”,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7731
|
+
*/
|
|
7732
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7733
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7734
|
+
return this.httpInstance
|
|
7735
|
+
.request({
|
|
7736
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7737
|
+
method: "GET",
|
|
7738
|
+
data,
|
|
7739
|
+
params,
|
|
7740
|
+
headers,
|
|
7741
|
+
})
|
|
7742
|
+
.catch((e) => {
|
|
7743
|
+
this.logger.error(formatErrors(e));
|
|
7744
|
+
throw e;
|
|
7745
|
+
});
|
|
7746
|
+
}),
|
|
7747
|
+
/**
|
|
7748
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=member_belong&version=v3 click to debug }
|
|
7749
|
+
*
|
|
7750
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong document }
|
|
7751
|
+
*
|
|
7752
|
+
* 查询用户所属用户组
|
|
7753
|
+
*
|
|
7754
|
+
* 通过该接口可查询该用户所属的用户组列表,可分别查询普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”,则可获取该员工所属的全部用户组列表。如果应用的通讯录权限范围不是“全部员工”,则仅可获取通讯录权限范围内该员工所属的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7755
|
+
*/
|
|
7756
|
+
memberBelong: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7757
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7758
|
+
return this.httpInstance
|
|
7759
|
+
.request({
|
|
7760
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/member_belong`, path),
|
|
7761
|
+
method: "GET",
|
|
7762
|
+
data,
|
|
7763
|
+
params,
|
|
7764
|
+
headers,
|
|
7765
|
+
})
|
|
7766
|
+
.catch((e) => {
|
|
7767
|
+
this.logger.error(formatErrors(e));
|
|
7768
|
+
throw e;
|
|
7769
|
+
});
|
|
7770
|
+
}),
|
|
7771
|
+
/**
|
|
7772
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=patch&version=v3 click to debug }
|
|
7773
|
+
*
|
|
7774
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/patch document }
|
|
7775
|
+
*
|
|
7776
|
+
* 更新用户组
|
|
7777
|
+
*
|
|
7778
|
+
* 使用该接口更新用户组信息,请注意更新用户组时应用的通讯录权限范围需为“全部员工”,否则会更新失败。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7779
|
+
*/
|
|
7780
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7781
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7782
|
+
return this.httpInstance
|
|
7783
|
+
.request({
|
|
7784
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7785
|
+
method: "PATCH",
|
|
7786
|
+
data,
|
|
7787
|
+
params,
|
|
7788
|
+
headers,
|
|
7789
|
+
})
|
|
7790
|
+
.catch((e) => {
|
|
7791
|
+
this.logger.error(formatErrors(e));
|
|
7792
|
+
throw e;
|
|
7793
|
+
});
|
|
7794
|
+
}),
|
|
7795
|
+
simplelistWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7796
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7797
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7798
|
+
const res = yield this.httpInstance
|
|
7799
|
+
.request({
|
|
7800
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path),
|
|
7801
|
+
method: "GET",
|
|
7802
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
7803
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
7804
|
+
})
|
|
7805
|
+
.catch((e) => {
|
|
7806
|
+
this.logger.error(formatErrors(e));
|
|
7807
|
+
});
|
|
7808
|
+
return res;
|
|
7809
|
+
});
|
|
7810
|
+
const Iterable = {
|
|
7811
|
+
[Symbol.asyncIterator]() {
|
|
7812
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
7813
|
+
let hasMore = true;
|
|
7814
|
+
let pageToken;
|
|
7815
|
+
while (hasMore) {
|
|
7816
|
+
try {
|
|
7817
|
+
const res = yield __await(sendRequest({
|
|
7818
|
+
headers,
|
|
7819
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
7820
|
+
data,
|
|
7821
|
+
}));
|
|
7822
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
7823
|
+
// @ts-ignore
|
|
7824
|
+
has_more,
|
|
7825
|
+
// @ts-ignore
|
|
7826
|
+
page_token,
|
|
7827
|
+
// @ts-ignore
|
|
7828
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
7829
|
+
yield yield __await(rest);
|
|
7830
|
+
hasMore = Boolean(has_more);
|
|
7831
|
+
pageToken = page_token || next_page_token;
|
|
7832
|
+
}
|
|
7833
|
+
catch (e) {
|
|
7834
|
+
yield yield __await(null);
|
|
7835
|
+
break;
|
|
7836
|
+
}
|
|
7837
|
+
}
|
|
7838
|
+
});
|
|
7839
|
+
},
|
|
7840
|
+
};
|
|
7841
|
+
return Iterable;
|
|
7842
|
+
}),
|
|
7843
|
+
/**
|
|
7844
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=simplelist&version=v3 click to debug }
|
|
7845
|
+
*
|
|
7846
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist document }
|
|
7847
|
+
*
|
|
7848
|
+
* 查询用户组列表
|
|
7849
|
+
*
|
|
7850
|
+
* 通过该接口可查询企业的用户组列表,可分别查询普通用户组或动态用户组。如果应用的通讯录权限范围是“全部员工”,则可获取企业全部用户组列表。如果应用的通讯录权限范围不是“全部员工”,则仅可获取通讯录权限范围内的用户组。[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7851
|
+
*/
|
|
7852
|
+
simplelist: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7853
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7854
|
+
return this.httpInstance
|
|
7855
|
+
.request({
|
|
7856
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/simplelist`, path),
|
|
7857
|
+
method: "GET",
|
|
7858
|
+
data,
|
|
7859
|
+
params,
|
|
7860
|
+
headers,
|
|
7861
|
+
})
|
|
7862
|
+
.catch((e) => {
|
|
7863
|
+
this.logger.error(formatErrors(e));
|
|
7864
|
+
throw e;
|
|
7865
|
+
});
|
|
7866
|
+
}),
|
|
7867
|
+
},
|
|
7868
|
+
/**
|
|
7869
|
+
* 用户组成员
|
|
7870
|
+
*/
|
|
7871
|
+
groupMember: {
|
|
7872
|
+
/**
|
|
7873
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=add&version=v3 click to debug }
|
|
7874
|
+
*
|
|
7875
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/add document }
|
|
7876
|
+
*
|
|
7877
|
+
* 添加用户组成员
|
|
7878
|
+
*
|
|
7879
|
+
* 向用户组中添加成员(目前成员仅支持用户,未来会支持部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7880
|
+
*/
|
|
7881
|
+
add: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7882
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7883
|
+
return this.httpInstance
|
|
7884
|
+
.request({
|
|
7885
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/add`, path),
|
|
7886
|
+
method: "POST",
|
|
7887
|
+
data,
|
|
7888
|
+
params,
|
|
7889
|
+
headers,
|
|
7890
|
+
})
|
|
7891
|
+
.catch((e) => {
|
|
7892
|
+
this.logger.error(formatErrors(e));
|
|
7893
|
+
throw e;
|
|
7894
|
+
});
|
|
7895
|
+
}),
|
|
7896
|
+
/**
|
|
7897
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_add&version=v3 click to debug }
|
|
7898
|
+
*
|
|
7899
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_add document }
|
|
7900
|
+
*
|
|
7901
|
+
* 批量添加用户组成员
|
|
7902
|
+
*
|
|
7903
|
+
* 向普通用户组中批量添加成员(目前仅支持添加用户,暂不支持添加部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7904
|
+
*
|
|
7905
|
+
* 请求体中的member_type,目前仅支持user, 未来将支持department。
|
|
7906
|
+
*/
|
|
7907
|
+
batchAdd: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7908
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7909
|
+
return this.httpInstance
|
|
7910
|
+
.request({
|
|
7911
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_add`, path),
|
|
7912
|
+
method: "POST",
|
|
7913
|
+
data,
|
|
7914
|
+
params,
|
|
7915
|
+
headers,
|
|
7916
|
+
})
|
|
7917
|
+
.catch((e) => {
|
|
7918
|
+
this.logger.error(formatErrors(e));
|
|
7919
|
+
throw e;
|
|
7920
|
+
});
|
|
7921
|
+
}),
|
|
7922
|
+
/**
|
|
7923
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=batch_remove&version=v3 click to debug }
|
|
7924
|
+
*
|
|
7925
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_remove document }
|
|
7926
|
+
*
|
|
7927
|
+
* 批量移除用户组成员
|
|
7928
|
+
*
|
|
7929
|
+
* 从普通用户组中批量移除成员 (目前仅支持移除用户,暂不支持移除部门)。如果应用的通讯录权限范围是“全部员工”,则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除, [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7930
|
+
*
|
|
7931
|
+
* 请求体中的member_type,目前仅支持user, 未来将支持department。
|
|
7932
|
+
*/
|
|
7933
|
+
batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7934
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7935
|
+
return this.httpInstance
|
|
7936
|
+
.request({
|
|
7937
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/batch_remove`, path),
|
|
7938
|
+
method: "POST",
|
|
7939
|
+
data,
|
|
7940
|
+
params,
|
|
7941
|
+
headers,
|
|
7942
|
+
})
|
|
7943
|
+
.catch((e) => {
|
|
7944
|
+
this.logger.error(formatErrors(e));
|
|
7945
|
+
throw e;
|
|
7946
|
+
});
|
|
7947
|
+
}),
|
|
7948
|
+
/**
|
|
7949
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=remove&version=v3 click to debug }
|
|
7950
|
+
*
|
|
7951
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove document }
|
|
7952
|
+
*
|
|
7953
|
+
* 移除用户组成员
|
|
7954
|
+
*
|
|
7955
|
+
* 从用户组中移除成员 (目前成员仅支持用户,未来会支持部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除, [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7537
7956
|
*/
|
|
7538
|
-
|
|
7957
|
+
remove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7539
7958
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7540
7959
|
return this.httpInstance
|
|
7541
7960
|
.request({
|
|
7542
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group`, path),
|
|
7961
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/remove`, path),
|
|
7543
7962
|
method: "POST",
|
|
7544
7963
|
data,
|
|
7545
7964
|
params,
|
|
@@ -7551,20 +7970,20 @@ class Client$1 {
|
|
|
7551
7970
|
});
|
|
7552
7971
|
}),
|
|
7553
7972
|
/**
|
|
7554
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group&apiName=
|
|
7973
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=group.member&apiName=simplelist&version=v3 click to debug }
|
|
7555
7974
|
*
|
|
7556
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/
|
|
7975
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist document }
|
|
7557
7976
|
*
|
|
7558
|
-
*
|
|
7977
|
+
* 查询用户组成员列表
|
|
7559
7978
|
*
|
|
7560
|
-
*
|
|
7979
|
+
* 通过该接口可查询某个用户组的成员列表(支持查询成员中的用户和部门), 本接口支持普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”,则可查询企业内任何用户组的成员列表。如果应用的通讯录权限范围不是“全部员工”,则仅可查询通讯录权限范围中的用户组的成员列表,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
7561
7980
|
*/
|
|
7562
|
-
|
|
7981
|
+
simplelist: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7563
7982
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7564
7983
|
return this.httpInstance
|
|
7565
7984
|
.request({
|
|
7566
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id`, path),
|
|
7567
|
-
method: "
|
|
7985
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/group/:group_id/member/simplelist`, path),
|
|
7986
|
+
method: "GET",
|
|
7568
7987
|
data,
|
|
7569
7988
|
params,
|
|
7570
7989
|
headers,
|
|
@@ -7574,21 +7993,22 @@ class Client$1 {
|
|
|
7574
7993
|
throw e;
|
|
7575
7994
|
});
|
|
7576
7995
|
}),
|
|
7996
|
+
},
|
|
7997
|
+
/**
|
|
7998
|
+
* job_family
|
|
7999
|
+
*/
|
|
8000
|
+
jobFamily: {
|
|
7577
8001
|
/**
|
|
7578
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7579
|
-
*
|
|
7580
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/get document }
|
|
7581
|
-
*
|
|
7582
|
-
* 查询用户组
|
|
8002
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=create&version=v3 click to debug }
|
|
7583
8003
|
*
|
|
7584
|
-
*
|
|
8004
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_family&version=v3 document }
|
|
7585
8005
|
*/
|
|
7586
|
-
|
|
8006
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7587
8007
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7588
8008
|
return this.httpInstance
|
|
7589
8009
|
.request({
|
|
7590
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7591
|
-
method: "
|
|
8010
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path),
|
|
8011
|
+
method: "POST",
|
|
7592
8012
|
data,
|
|
7593
8013
|
params,
|
|
7594
8014
|
headers,
|
|
@@ -7599,20 +8019,16 @@ class Client$1 {
|
|
|
7599
8019
|
});
|
|
7600
8020
|
}),
|
|
7601
8021
|
/**
|
|
7602
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7603
|
-
*
|
|
7604
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong document }
|
|
7605
|
-
*
|
|
7606
|
-
* 查询用户所属用户组
|
|
8022
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=delete&version=v3 click to debug }
|
|
7607
8023
|
*
|
|
7608
|
-
*
|
|
8024
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_family&version=v3 document }
|
|
7609
8025
|
*/
|
|
7610
|
-
|
|
8026
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7611
8027
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7612
8028
|
return this.httpInstance
|
|
7613
8029
|
.request({
|
|
7614
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7615
|
-
method: "
|
|
8030
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path),
|
|
8031
|
+
method: "DELETE",
|
|
7616
8032
|
data,
|
|
7617
8033
|
params,
|
|
7618
8034
|
headers,
|
|
@@ -7623,20 +8039,16 @@ class Client$1 {
|
|
|
7623
8039
|
});
|
|
7624
8040
|
}),
|
|
7625
8041
|
/**
|
|
7626
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7627
|
-
*
|
|
7628
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/patch document }
|
|
7629
|
-
*
|
|
7630
|
-
* 更新用户组
|
|
8042
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=get&version=v3 click to debug }
|
|
7631
8043
|
*
|
|
7632
|
-
*
|
|
8044
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_family&version=v3 document }
|
|
7633
8045
|
*/
|
|
7634
|
-
|
|
8046
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7635
8047
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7636
8048
|
return this.httpInstance
|
|
7637
8049
|
.request({
|
|
7638
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7639
|
-
method: "
|
|
8050
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path),
|
|
8051
|
+
method: "GET",
|
|
7640
8052
|
data,
|
|
7641
8053
|
params,
|
|
7642
8054
|
headers,
|
|
@@ -7646,12 +8058,12 @@ class Client$1 {
|
|
|
7646
8058
|
throw e;
|
|
7647
8059
|
});
|
|
7648
8060
|
}),
|
|
7649
|
-
|
|
8061
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7650
8062
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7651
8063
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7652
8064
|
const res = yield this.httpInstance
|
|
7653
8065
|
.request({
|
|
7654
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
8066
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path),
|
|
7655
8067
|
method: "GET",
|
|
7656
8068
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
7657
8069
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -7695,19 +8107,15 @@ class Client$1 {
|
|
|
7695
8107
|
return Iterable;
|
|
7696
8108
|
}),
|
|
7697
8109
|
/**
|
|
7698
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7699
|
-
*
|
|
7700
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist document }
|
|
7701
|
-
*
|
|
7702
|
-
* 查询用户组列表
|
|
8110
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=list&version=v3 click to debug }
|
|
7703
8111
|
*
|
|
7704
|
-
*
|
|
8112
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_family&version=v3 document }
|
|
7705
8113
|
*/
|
|
7706
|
-
|
|
8114
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7707
8115
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7708
8116
|
return this.httpInstance
|
|
7709
8117
|
.request({
|
|
7710
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
8118
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families`, path),
|
|
7711
8119
|
method: "GET",
|
|
7712
8120
|
data,
|
|
7713
8121
|
params,
|
|
@@ -7718,25 +8126,41 @@ class Client$1 {
|
|
|
7718
8126
|
throw e;
|
|
7719
8127
|
});
|
|
7720
8128
|
}),
|
|
8129
|
+
/**
|
|
8130
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_family&apiName=update&version=v3 click to debug }
|
|
8131
|
+
*
|
|
8132
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_family&version=v3 document }
|
|
8133
|
+
*/
|
|
8134
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
8135
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
8136
|
+
return this.httpInstance
|
|
8137
|
+
.request({
|
|
8138
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_families/:job_family_id`, path),
|
|
8139
|
+
method: "PUT",
|
|
8140
|
+
data,
|
|
8141
|
+
params,
|
|
8142
|
+
headers,
|
|
8143
|
+
})
|
|
8144
|
+
.catch((e) => {
|
|
8145
|
+
this.logger.error(formatErrors(e));
|
|
8146
|
+
throw e;
|
|
8147
|
+
});
|
|
8148
|
+
}),
|
|
7721
8149
|
},
|
|
7722
8150
|
/**
|
|
7723
|
-
*
|
|
8151
|
+
* job_level
|
|
7724
8152
|
*/
|
|
7725
|
-
|
|
8153
|
+
jobLevel: {
|
|
7726
8154
|
/**
|
|
7727
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7728
|
-
*
|
|
7729
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/add document }
|
|
7730
|
-
*
|
|
7731
|
-
* 添加用户组成员
|
|
8155
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=create&version=v3 click to debug }
|
|
7732
8156
|
*
|
|
7733
|
-
*
|
|
8157
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=contact&resource=job_level&version=v3 document }
|
|
7734
8158
|
*/
|
|
7735
|
-
|
|
8159
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7736
8160
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7737
8161
|
return this.httpInstance
|
|
7738
8162
|
.request({
|
|
7739
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
8163
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path),
|
|
7740
8164
|
method: "POST",
|
|
7741
8165
|
data,
|
|
7742
8166
|
params,
|
|
@@ -7748,22 +8172,16 @@ class Client$1 {
|
|
|
7748
8172
|
});
|
|
7749
8173
|
}),
|
|
7750
8174
|
/**
|
|
7751
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7752
|
-
*
|
|
7753
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_add document }
|
|
7754
|
-
*
|
|
7755
|
-
* 批量添加用户组成员
|
|
7756
|
-
*
|
|
7757
|
-
* 向普通用户组中批量添加成员(目前仅支持添加用户,暂不支持添加部门),如果应用的通讯录权限范围是“全部员工”,则可将任何成员添加到任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员添加到通讯录权限范围的用户组中,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
8175
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=delete&version=v3 click to debug }
|
|
7758
8176
|
*
|
|
7759
|
-
*
|
|
8177
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=contact&resource=job_level&version=v3 document }
|
|
7760
8178
|
*/
|
|
7761
|
-
|
|
8179
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7762
8180
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7763
8181
|
return this.httpInstance
|
|
7764
8182
|
.request({
|
|
7765
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7766
|
-
method: "
|
|
8183
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path),
|
|
8184
|
+
method: "DELETE",
|
|
7767
8185
|
data,
|
|
7768
8186
|
params,
|
|
7769
8187
|
headers,
|
|
@@ -7774,22 +8192,16 @@ class Client$1 {
|
|
|
7774
8192
|
});
|
|
7775
8193
|
}),
|
|
7776
8194
|
/**
|
|
7777
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7778
|
-
*
|
|
7779
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/batch_remove document }
|
|
7780
|
-
*
|
|
7781
|
-
* 批量移除用户组成员
|
|
7782
|
-
*
|
|
7783
|
-
* 从普通用户组中批量移除成员 (目前仅支持移除用户,暂不支持移除部门)。如果应用的通讯录权限范围是“全部员工”,则可将任何成员移出任何用户组。如果应用的通讯录权限范围不是“全部员工”,则仅可将通讯录权限范围中的成员从通讯录权限范围的用户组中移除, [点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
8195
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=get&version=v3 click to debug }
|
|
7784
8196
|
*
|
|
7785
|
-
*
|
|
8197
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=contact&resource=job_level&version=v3 document }
|
|
7786
8198
|
*/
|
|
7787
|
-
|
|
8199
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7788
8200
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7789
8201
|
return this.httpInstance
|
|
7790
8202
|
.request({
|
|
7791
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7792
|
-
method: "
|
|
8203
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path),
|
|
8204
|
+
method: "GET",
|
|
7793
8205
|
data,
|
|
7794
8206
|
params,
|
|
7795
8207
|
headers,
|
|
@@ -7799,21 +8211,65 @@ class Client$1 {
|
|
|
7799
8211
|
throw e;
|
|
7800
8212
|
});
|
|
7801
8213
|
}),
|
|
8214
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
8215
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
8216
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
8217
|
+
const res = yield this.httpInstance
|
|
8218
|
+
.request({
|
|
8219
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path),
|
|
8220
|
+
method: "GET",
|
|
8221
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
8222
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
8223
|
+
})
|
|
8224
|
+
.catch((e) => {
|
|
8225
|
+
this.logger.error(formatErrors(e));
|
|
8226
|
+
});
|
|
8227
|
+
return res;
|
|
8228
|
+
});
|
|
8229
|
+
const Iterable = {
|
|
8230
|
+
[Symbol.asyncIterator]() {
|
|
8231
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
8232
|
+
let hasMore = true;
|
|
8233
|
+
let pageToken;
|
|
8234
|
+
while (hasMore) {
|
|
8235
|
+
try {
|
|
8236
|
+
const res = yield __await(sendRequest({
|
|
8237
|
+
headers,
|
|
8238
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
8239
|
+
data,
|
|
8240
|
+
}));
|
|
8241
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
8242
|
+
// @ts-ignore
|
|
8243
|
+
has_more,
|
|
8244
|
+
// @ts-ignore
|
|
8245
|
+
page_token,
|
|
8246
|
+
// @ts-ignore
|
|
8247
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
8248
|
+
yield yield __await(rest);
|
|
8249
|
+
hasMore = Boolean(has_more);
|
|
8250
|
+
pageToken = page_token || next_page_token;
|
|
8251
|
+
}
|
|
8252
|
+
catch (e) {
|
|
8253
|
+
yield yield __await(null);
|
|
8254
|
+
break;
|
|
8255
|
+
}
|
|
8256
|
+
}
|
|
8257
|
+
});
|
|
8258
|
+
},
|
|
8259
|
+
};
|
|
8260
|
+
return Iterable;
|
|
8261
|
+
}),
|
|
7802
8262
|
/**
|
|
7803
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7804
|
-
*
|
|
7805
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove document }
|
|
7806
|
-
*
|
|
7807
|
-
* 移除用户组成员
|
|
8263
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=list&version=v3 click to debug }
|
|
7808
8264
|
*
|
|
7809
|
-
*
|
|
8265
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=contact&resource=job_level&version=v3 document }
|
|
7810
8266
|
*/
|
|
7811
|
-
|
|
8267
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7812
8268
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7813
8269
|
return this.httpInstance
|
|
7814
8270
|
.request({
|
|
7815
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7816
|
-
method: "
|
|
8271
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels`, path),
|
|
8272
|
+
method: "GET",
|
|
7817
8273
|
data,
|
|
7818
8274
|
params,
|
|
7819
8275
|
headers,
|
|
@@ -7824,20 +8280,16 @@ class Client$1 {
|
|
|
7824
8280
|
});
|
|
7825
8281
|
}),
|
|
7826
8282
|
/**
|
|
7827
|
-
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=
|
|
7828
|
-
*
|
|
7829
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist document }
|
|
8283
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=job_level&apiName=update&version=v3 click to debug }
|
|
7830
8284
|
*
|
|
7831
|
-
*
|
|
7832
|
-
*
|
|
7833
|
-
* 通过该接口可查询某个用户组的成员列表(支持查询成员中的用户和部门), 本接口支持普通用户组和动态用户组。如果应用的通讯录权限范围是“全部员工”,则可查询企业内任何用户组的成员列表。如果应用的通讯录权限范围不是“全部员工”,则仅可查询通讯录权限范围中的用户组的成员列表,[点击了解通讯录权限范围](https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM/v3/guides/scope_authority)。
|
|
8285
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=contact&resource=job_level&version=v3 document }
|
|
7834
8286
|
*/
|
|
7835
|
-
|
|
8287
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7836
8288
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7837
8289
|
return this.httpInstance
|
|
7838
8290
|
.request({
|
|
7839
|
-
url: fillApiPath(`${this.domain}/open-apis/contact/v3/
|
|
7840
|
-
method: "
|
|
8291
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/job_levels/:job_level_id`, path),
|
|
8292
|
+
method: "PUT",
|
|
7841
8293
|
data,
|
|
7842
8294
|
params,
|
|
7843
8295
|
headers,
|
|
@@ -9163,7 +9615,7 @@ class Client$1 {
|
|
|
9163
9615
|
}),
|
|
9164
9616
|
},
|
|
9165
9617
|
/**
|
|
9166
|
-
*
|
|
9618
|
+
* 分片上传
|
|
9167
9619
|
*/
|
|
9168
9620
|
file: {
|
|
9169
9621
|
/**
|
|
@@ -9899,7 +10351,7 @@ class Client$1 {
|
|
|
9899
10351
|
}),
|
|
9900
10352
|
},
|
|
9901
10353
|
/**
|
|
9902
|
-
*
|
|
10354
|
+
* 素材
|
|
9903
10355
|
*/
|
|
9904
10356
|
media: {
|
|
9905
10357
|
/**
|
|
@@ -12107,7 +12559,7 @@ class Client$1 {
|
|
|
12107
12559
|
*/
|
|
12108
12560
|
this.hire = {
|
|
12109
12561
|
/**
|
|
12110
|
-
*
|
|
12562
|
+
* 投递
|
|
12111
12563
|
*/
|
|
12112
12564
|
application: {
|
|
12113
12565
|
/**
|
|
@@ -16629,10 +17081,6 @@ class Client$1 {
|
|
|
16629
17081
|
|
|
16630
17082
|
*/
|
|
16631
17083
|
this.people_bytedance = {};
|
|
16632
|
-
/**
|
|
16633
|
-
|
|
16634
|
-
*/
|
|
16635
|
-
this.performance = {};
|
|
16636
17084
|
/**
|
|
16637
17085
|
|
|
16638
17086
|
*/
|
|
@@ -17450,7 +17898,7 @@ class Client$1 {
|
|
|
17450
17898
|
}),
|
|
17451
17899
|
},
|
|
17452
17900
|
/**
|
|
17453
|
-
*
|
|
17901
|
+
* 单元格
|
|
17454
17902
|
*/
|
|
17455
17903
|
spreadsheetSheet: {
|
|
17456
17904
|
/**
|
|
@@ -18604,6 +19052,31 @@ class Client$1 {
|
|
|
18604
19052
|
* 企业信息
|
|
18605
19053
|
*/
|
|
18606
19054
|
this.tenant = {
|
|
19055
|
+
/**
|
|
19056
|
+
* tenant.product_assign_info
|
|
19057
|
+
*/
|
|
19058
|
+
tenantProductAssignInfo: {
|
|
19059
|
+
/**
|
|
19060
|
+
* {@link https://open.feishu.cn/api-explorer?project=tenant&resource=tenant.product_assign_info&apiName=query&version=v2 click to debug }
|
|
19061
|
+
*
|
|
19062
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=tenant&resource=tenant.product_assign_info&version=v2 document }
|
|
19063
|
+
*/
|
|
19064
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19065
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19066
|
+
return this.httpInstance
|
|
19067
|
+
.request({
|
|
19068
|
+
url: fillApiPath(`${this.domain}/open-apis/tenant/v2/tenant/assign_info_list/query`, path),
|
|
19069
|
+
method: "GET",
|
|
19070
|
+
data,
|
|
19071
|
+
params,
|
|
19072
|
+
headers,
|
|
19073
|
+
})
|
|
19074
|
+
.catch((e) => {
|
|
19075
|
+
this.logger.error(formatErrors(e));
|
|
19076
|
+
throw e;
|
|
19077
|
+
});
|
|
19078
|
+
}),
|
|
19079
|
+
},
|
|
18607
19080
|
/**
|
|
18608
19081
|
* 企业信息
|
|
18609
19082
|
*/
|
|
@@ -19640,6 +20113,51 @@ class Client$1 {
|
|
|
19640
20113
|
});
|
|
19641
20114
|
}),
|
|
19642
20115
|
},
|
|
20116
|
+
/**
|
|
20117
|
+
* reserve_config.form
|
|
20118
|
+
*/
|
|
20119
|
+
reserveConfigForm: {
|
|
20120
|
+
/**
|
|
20121
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=get&version=v1 click to debug }
|
|
20122
|
+
*
|
|
20123
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.form&version=v1 document }
|
|
20124
|
+
*/
|
|
20125
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20126
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20127
|
+
return this.httpInstance
|
|
20128
|
+
.request({
|
|
20129
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path),
|
|
20130
|
+
method: "GET",
|
|
20131
|
+
data,
|
|
20132
|
+
params,
|
|
20133
|
+
headers,
|
|
20134
|
+
})
|
|
20135
|
+
.catch((e) => {
|
|
20136
|
+
this.logger.error(formatErrors(e));
|
|
20137
|
+
throw e;
|
|
20138
|
+
});
|
|
20139
|
+
}),
|
|
20140
|
+
/**
|
|
20141
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.form&apiName=patch&version=v1 click to debug }
|
|
20142
|
+
*
|
|
20143
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.form&version=v1 document }
|
|
20144
|
+
*/
|
|
20145
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20146
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20147
|
+
return this.httpInstance
|
|
20148
|
+
.request({
|
|
20149
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/form`, path),
|
|
20150
|
+
method: "PATCH",
|
|
20151
|
+
data,
|
|
20152
|
+
params,
|
|
20153
|
+
headers,
|
|
20154
|
+
})
|
|
20155
|
+
.catch((e) => {
|
|
20156
|
+
this.logger.error(formatErrors(e));
|
|
20157
|
+
throw e;
|
|
20158
|
+
});
|
|
20159
|
+
}),
|
|
20160
|
+
},
|
|
19643
20161
|
/**
|
|
19644
20162
|
* reserve_config
|
|
19645
20163
|
*/
|