@larksuiteoapi/node-sdk 1.8.1 → 1.9.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 +786 -83
- package/lib/index.js +786 -83
- package/package.json +1 -1
- package/types/index.d.ts +1676 -113
package/lib/index.js
CHANGED
|
@@ -576,7 +576,7 @@ class Client$1 {
|
|
|
576
576
|
},
|
|
577
577
|
};
|
|
578
578
|
/**
|
|
579
|
-
*
|
|
579
|
+
* 管理后台-密码
|
|
580
580
|
*/
|
|
581
581
|
this.admin = {
|
|
582
582
|
/**
|
|
@@ -1780,7 +1780,7 @@ class Client$1 {
|
|
|
1780
1780
|
}),
|
|
1781
1781
|
},
|
|
1782
1782
|
/**
|
|
1783
|
-
*
|
|
1783
|
+
* 审批查询
|
|
1784
1784
|
*/
|
|
1785
1785
|
instance: {
|
|
1786
1786
|
/**
|
|
@@ -3379,6 +3379,86 @@ class Client$1 {
|
|
|
3379
3379
|
}),
|
|
3380
3380
|
},
|
|
3381
3381
|
};
|
|
3382
|
+
/**
|
|
3383
|
+
|
|
3384
|
+
*/
|
|
3385
|
+
this.authen = {
|
|
3386
|
+
/**
|
|
3387
|
+
* access_token
|
|
3388
|
+
*/
|
|
3389
|
+
accessToken: {
|
|
3390
|
+
/**
|
|
3391
|
+
* {@link https://open.feishu.cn/api-explorer?project=authen&resource=access_token&apiName=create&version=v1 click to debug }
|
|
3392
|
+
*
|
|
3393
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=access_token&version=v1 document }
|
|
3394
|
+
*/
|
|
3395
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3396
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3397
|
+
return httpInstance
|
|
3398
|
+
.request({
|
|
3399
|
+
url: fillApiPath(`${this.domain}/open-apis/authen/v1/access_token`, path),
|
|
3400
|
+
method: "POST",
|
|
3401
|
+
data,
|
|
3402
|
+
params,
|
|
3403
|
+
headers,
|
|
3404
|
+
})
|
|
3405
|
+
.catch((e) => {
|
|
3406
|
+
this.logger.error(formatErrors(e));
|
|
3407
|
+
throw e;
|
|
3408
|
+
});
|
|
3409
|
+
}),
|
|
3410
|
+
},
|
|
3411
|
+
/**
|
|
3412
|
+
* refresh_access_token
|
|
3413
|
+
*/
|
|
3414
|
+
refreshAccessToken: {
|
|
3415
|
+
/**
|
|
3416
|
+
* {@link https://open.feishu.cn/api-explorer?project=authen&resource=refresh_access_token&apiName=create&version=v1 click to debug }
|
|
3417
|
+
*
|
|
3418
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=refresh_access_token&version=v1 document }
|
|
3419
|
+
*/
|
|
3420
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3421
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3422
|
+
return httpInstance
|
|
3423
|
+
.request({
|
|
3424
|
+
url: fillApiPath(`${this.domain}/open-apis/authen/v1/refresh_access_token`, path),
|
|
3425
|
+
method: "POST",
|
|
3426
|
+
data,
|
|
3427
|
+
params,
|
|
3428
|
+
headers,
|
|
3429
|
+
})
|
|
3430
|
+
.catch((e) => {
|
|
3431
|
+
this.logger.error(formatErrors(e));
|
|
3432
|
+
throw e;
|
|
3433
|
+
});
|
|
3434
|
+
}),
|
|
3435
|
+
},
|
|
3436
|
+
/**
|
|
3437
|
+
* user_info
|
|
3438
|
+
*/
|
|
3439
|
+
userInfo: {
|
|
3440
|
+
/**
|
|
3441
|
+
* {@link https://open.feishu.cn/api-explorer?project=authen&resource=user_info&apiName=get&version=v1 click to debug }
|
|
3442
|
+
*
|
|
3443
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=user_info&version=v1 document }
|
|
3444
|
+
*/
|
|
3445
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3446
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3447
|
+
return httpInstance
|
|
3448
|
+
.request({
|
|
3449
|
+
url: fillApiPath(`${this.domain}/open-apis/authen/v1/user_info`, path),
|
|
3450
|
+
method: "GET",
|
|
3451
|
+
data,
|
|
3452
|
+
params,
|
|
3453
|
+
headers,
|
|
3454
|
+
})
|
|
3455
|
+
.catch((e) => {
|
|
3456
|
+
this.logger.error(formatErrors(e));
|
|
3457
|
+
throw e;
|
|
3458
|
+
});
|
|
3459
|
+
}),
|
|
3460
|
+
},
|
|
3461
|
+
};
|
|
3382
3462
|
/**
|
|
3383
3463
|
|
|
3384
3464
|
*/
|
|
@@ -4558,6 +4638,26 @@ class Client$1 {
|
|
|
4558
4638
|
throw e;
|
|
4559
4639
|
});
|
|
4560
4640
|
}),
|
|
4641
|
+
/**
|
|
4642
|
+
* {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=patch&version=v1 click to debug }
|
|
4643
|
+
*
|
|
4644
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/patch document }
|
|
4645
|
+
*/
|
|
4646
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4647
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4648
|
+
return httpInstance
|
|
4649
|
+
.request({
|
|
4650
|
+
url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`, path),
|
|
4651
|
+
method: "PATCH",
|
|
4652
|
+
data,
|
|
4653
|
+
params,
|
|
4654
|
+
headers,
|
|
4655
|
+
})
|
|
4656
|
+
.catch((e) => {
|
|
4657
|
+
this.logger.error(formatErrors(e));
|
|
4658
|
+
throw e;
|
|
4659
|
+
});
|
|
4660
|
+
}),
|
|
4561
4661
|
},
|
|
4562
4662
|
/**
|
|
4563
4663
|
* 字段
|
|
@@ -8914,7 +9014,7 @@ class Client$1 {
|
|
|
8914
9014
|
}),
|
|
8915
9015
|
},
|
|
8916
9016
|
/**
|
|
8917
|
-
*
|
|
9017
|
+
* 文件夹
|
|
8918
9018
|
*/
|
|
8919
9019
|
file: {
|
|
8920
9020
|
/**
|
|
@@ -9399,6 +9499,203 @@ class Client$1 {
|
|
|
9399
9499
|
});
|
|
9400
9500
|
}),
|
|
9401
9501
|
},
|
|
9502
|
+
/**
|
|
9503
|
+
* 文档版本
|
|
9504
|
+
*/
|
|
9505
|
+
fileVersion: {
|
|
9506
|
+
/**
|
|
9507
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=create&version=v1 click to debug }
|
|
9508
|
+
*
|
|
9509
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/create document }
|
|
9510
|
+
*
|
|
9511
|
+
* 创建文档版本
|
|
9512
|
+
*
|
|
9513
|
+
* 创建文档版本。
|
|
9514
|
+
*/
|
|
9515
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9516
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9517
|
+
return httpInstance
|
|
9518
|
+
.request({
|
|
9519
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
9520
|
+
method: "POST",
|
|
9521
|
+
data,
|
|
9522
|
+
params,
|
|
9523
|
+
headers,
|
|
9524
|
+
})
|
|
9525
|
+
.catch((e) => {
|
|
9526
|
+
this.logger.error(formatErrors(e));
|
|
9527
|
+
throw e;
|
|
9528
|
+
});
|
|
9529
|
+
}),
|
|
9530
|
+
/**
|
|
9531
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=delete&version=v1 click to debug }
|
|
9532
|
+
*
|
|
9533
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete document }
|
|
9534
|
+
*
|
|
9535
|
+
* 删除文档版本
|
|
9536
|
+
*
|
|
9537
|
+
* 删除文档版本。
|
|
9538
|
+
*/
|
|
9539
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9540
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9541
|
+
return httpInstance
|
|
9542
|
+
.request({
|
|
9543
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
|
|
9544
|
+
method: "DELETE",
|
|
9545
|
+
data,
|
|
9546
|
+
params,
|
|
9547
|
+
headers,
|
|
9548
|
+
})
|
|
9549
|
+
.catch((e) => {
|
|
9550
|
+
this.logger.error(formatErrors(e));
|
|
9551
|
+
throw e;
|
|
9552
|
+
});
|
|
9553
|
+
}),
|
|
9554
|
+
getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9555
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9556
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
9557
|
+
const res = yield httpInstance
|
|
9558
|
+
.request({
|
|
9559
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
|
|
9560
|
+
method: "GET",
|
|
9561
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
9562
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
9563
|
+
})
|
|
9564
|
+
.catch((e) => {
|
|
9565
|
+
this.logger.error(formatErrors(e));
|
|
9566
|
+
});
|
|
9567
|
+
return res;
|
|
9568
|
+
});
|
|
9569
|
+
const Iterable = {
|
|
9570
|
+
[Symbol.asyncIterator]() {
|
|
9571
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
9572
|
+
let hasMore = true;
|
|
9573
|
+
let pageToken;
|
|
9574
|
+
while (hasMore) {
|
|
9575
|
+
try {
|
|
9576
|
+
const res = yield __await(sendRequest({
|
|
9577
|
+
headers,
|
|
9578
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
9579
|
+
data,
|
|
9580
|
+
}));
|
|
9581
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
9582
|
+
// @ts-ignore
|
|
9583
|
+
has_more,
|
|
9584
|
+
// @ts-ignore
|
|
9585
|
+
page_token,
|
|
9586
|
+
// @ts-ignore
|
|
9587
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
9588
|
+
yield yield __await(rest);
|
|
9589
|
+
hasMore = Boolean(has_more);
|
|
9590
|
+
pageToken = page_token || next_page_token;
|
|
9591
|
+
}
|
|
9592
|
+
catch (e) {
|
|
9593
|
+
yield yield __await(null);
|
|
9594
|
+
break;
|
|
9595
|
+
}
|
|
9596
|
+
}
|
|
9597
|
+
});
|
|
9598
|
+
},
|
|
9599
|
+
};
|
|
9600
|
+
return Iterable;
|
|
9601
|
+
}),
|
|
9602
|
+
/**
|
|
9603
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=get&version=v1 click to debug }
|
|
9604
|
+
*
|
|
9605
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get document }
|
|
9606
|
+
*
|
|
9607
|
+
* 获取文档版本
|
|
9608
|
+
*
|
|
9609
|
+
* 获取文档版本。
|
|
9610
|
+
*/
|
|
9611
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9612
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9613
|
+
return httpInstance
|
|
9614
|
+
.request({
|
|
9615
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
|
|
9616
|
+
method: "GET",
|
|
9617
|
+
data,
|
|
9618
|
+
params,
|
|
9619
|
+
headers,
|
|
9620
|
+
})
|
|
9621
|
+
.catch((e) => {
|
|
9622
|
+
this.logger.error(formatErrors(e));
|
|
9623
|
+
throw e;
|
|
9624
|
+
});
|
|
9625
|
+
}),
|
|
9626
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9627
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9628
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
9629
|
+
const res = yield httpInstance
|
|
9630
|
+
.request({
|
|
9631
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
9632
|
+
method: "GET",
|
|
9633
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
9634
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
9635
|
+
})
|
|
9636
|
+
.catch((e) => {
|
|
9637
|
+
this.logger.error(formatErrors(e));
|
|
9638
|
+
});
|
|
9639
|
+
return res;
|
|
9640
|
+
});
|
|
9641
|
+
const Iterable = {
|
|
9642
|
+
[Symbol.asyncIterator]() {
|
|
9643
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
9644
|
+
let hasMore = true;
|
|
9645
|
+
let pageToken;
|
|
9646
|
+
while (hasMore) {
|
|
9647
|
+
try {
|
|
9648
|
+
const res = yield __await(sendRequest({
|
|
9649
|
+
headers,
|
|
9650
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
9651
|
+
data,
|
|
9652
|
+
}));
|
|
9653
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
9654
|
+
// @ts-ignore
|
|
9655
|
+
has_more,
|
|
9656
|
+
// @ts-ignore
|
|
9657
|
+
page_token,
|
|
9658
|
+
// @ts-ignore
|
|
9659
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
9660
|
+
yield yield __await(rest);
|
|
9661
|
+
hasMore = Boolean(has_more);
|
|
9662
|
+
pageToken = page_token || next_page_token;
|
|
9663
|
+
}
|
|
9664
|
+
catch (e) {
|
|
9665
|
+
yield yield __await(null);
|
|
9666
|
+
break;
|
|
9667
|
+
}
|
|
9668
|
+
}
|
|
9669
|
+
});
|
|
9670
|
+
},
|
|
9671
|
+
};
|
|
9672
|
+
return Iterable;
|
|
9673
|
+
}),
|
|
9674
|
+
/**
|
|
9675
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=list&version=v1 click to debug }
|
|
9676
|
+
*
|
|
9677
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
|
|
9678
|
+
*
|
|
9679
|
+
* 获取文档版本列表
|
|
9680
|
+
*
|
|
9681
|
+
* 获取文档所有版本。
|
|
9682
|
+
*/
|
|
9683
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9684
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9685
|
+
return httpInstance
|
|
9686
|
+
.request({
|
|
9687
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
9688
|
+
method: "GET",
|
|
9689
|
+
data,
|
|
9690
|
+
params,
|
|
9691
|
+
headers,
|
|
9692
|
+
})
|
|
9693
|
+
.catch((e) => {
|
|
9694
|
+
this.logger.error(formatErrors(e));
|
|
9695
|
+
throw e;
|
|
9696
|
+
});
|
|
9697
|
+
}),
|
|
9698
|
+
},
|
|
9402
9699
|
/**
|
|
9403
9700
|
* 导入
|
|
9404
9701
|
*/
|
|
@@ -9453,7 +9750,7 @@ class Client$1 {
|
|
|
9453
9750
|
}),
|
|
9454
9751
|
},
|
|
9455
9752
|
/**
|
|
9456
|
-
*
|
|
9753
|
+
* 素材
|
|
9457
9754
|
*/
|
|
9458
9755
|
media: {
|
|
9459
9756
|
/**
|
|
@@ -9668,7 +9965,27 @@ class Client$1 {
|
|
|
9668
9965
|
*/
|
|
9669
9966
|
permissionMember: {
|
|
9670
9967
|
/**
|
|
9671
|
-
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=
|
|
9968
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=auth&version=v1 click to debug }
|
|
9969
|
+
*
|
|
9970
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=auth&project=drive&resource=permission.member&version=v1 document }
|
|
9971
|
+
*/
|
|
9972
|
+
auth: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9973
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9974
|
+
return httpInstance
|
|
9975
|
+
.request({
|
|
9976
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`, path),
|
|
9977
|
+
method: "GET",
|
|
9978
|
+
data,
|
|
9979
|
+
params,
|
|
9980
|
+
headers,
|
|
9981
|
+
})
|
|
9982
|
+
.catch((e) => {
|
|
9983
|
+
this.logger.error(formatErrors(e));
|
|
9984
|
+
throw e;
|
|
9985
|
+
});
|
|
9986
|
+
}),
|
|
9987
|
+
/**
|
|
9988
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=create&version=v1 click to debug }
|
|
9672
9989
|
*
|
|
9673
9990
|
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create document }
|
|
9674
9991
|
*
|
|
@@ -9741,6 +10058,26 @@ class Client$1 {
|
|
|
9741
10058
|
throw e;
|
|
9742
10059
|
});
|
|
9743
10060
|
}),
|
|
10061
|
+
/**
|
|
10062
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=transfer_owner&version=v1 click to debug }
|
|
10063
|
+
*
|
|
10064
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transfer_owner&project=drive&resource=permission.member&version=v1 document }
|
|
10065
|
+
*/
|
|
10066
|
+
transferOwner: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10067
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10068
|
+
return httpInstance
|
|
10069
|
+
.request({
|
|
10070
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`, path),
|
|
10071
|
+
method: "POST",
|
|
10072
|
+
data,
|
|
10073
|
+
params,
|
|
10074
|
+
headers,
|
|
10075
|
+
})
|
|
10076
|
+
.catch((e) => {
|
|
10077
|
+
this.logger.error(formatErrors(e));
|
|
10078
|
+
throw e;
|
|
10079
|
+
});
|
|
10080
|
+
}),
|
|
9744
10081
|
/**
|
|
9745
10082
|
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=update&version=v1 click to debug }
|
|
9746
10083
|
*
|
|
@@ -12013,6 +12350,30 @@ class Client$1 {
|
|
|
12013
12350
|
throw e;
|
|
12014
12351
|
});
|
|
12015
12352
|
}),
|
|
12353
|
+
/**
|
|
12354
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_update&version=v1 click to debug }
|
|
12355
|
+
*
|
|
12356
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_update document }
|
|
12357
|
+
*
|
|
12358
|
+
* 更新职位
|
|
12359
|
+
*
|
|
12360
|
+
* 更新职位信息,该接口为全量更新,若字段没有返回值,则原有值将会被清空。字段的是否必填,将以系统中的「职位字段管理」中的设置为准。
|
|
12361
|
+
*/
|
|
12362
|
+
combinedUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
12363
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
12364
|
+
return httpInstance
|
|
12365
|
+
.request({
|
|
12366
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`, path),
|
|
12367
|
+
method: "POST",
|
|
12368
|
+
data,
|
|
12369
|
+
params,
|
|
12370
|
+
headers,
|
|
12371
|
+
})
|
|
12372
|
+
.catch((e) => {
|
|
12373
|
+
this.logger.error(formatErrors(e));
|
|
12374
|
+
throw e;
|
|
12375
|
+
});
|
|
12376
|
+
}),
|
|
12016
12377
|
/**
|
|
12017
12378
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=config&version=v1 click to debug }
|
|
12018
12379
|
*
|
|
@@ -13133,6 +13494,146 @@ class Client$1 {
|
|
|
13133
13494
|
});
|
|
13134
13495
|
}),
|
|
13135
13496
|
},
|
|
13497
|
+
/**
|
|
13498
|
+
* chat.menu_item
|
|
13499
|
+
*/
|
|
13500
|
+
chatMenuItem: {
|
|
13501
|
+
/**
|
|
13502
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_item&apiName=patch&version=v1 click to debug }
|
|
13503
|
+
*
|
|
13504
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_item/patch document }
|
|
13505
|
+
*
|
|
13506
|
+
* 修改群菜单元信息
|
|
13507
|
+
*
|
|
13508
|
+
* 修改某个一级菜单或者二级菜单的元信息。
|
|
13509
|
+
*
|
|
13510
|
+
* 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
|
|
13511
|
+
*/
|
|
13512
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13513
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13514
|
+
return httpInstance
|
|
13515
|
+
.request({
|
|
13516
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`, path),
|
|
13517
|
+
method: "PATCH",
|
|
13518
|
+
data,
|
|
13519
|
+
params,
|
|
13520
|
+
headers,
|
|
13521
|
+
})
|
|
13522
|
+
.catch((e) => {
|
|
13523
|
+
this.logger.error(formatErrors(e));
|
|
13524
|
+
throw e;
|
|
13525
|
+
});
|
|
13526
|
+
}),
|
|
13527
|
+
},
|
|
13528
|
+
/**
|
|
13529
|
+
* 群组 - 群菜单
|
|
13530
|
+
*/
|
|
13531
|
+
chatMenuTree: {
|
|
13532
|
+
/**
|
|
13533
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=create&version=v1 click to debug }
|
|
13534
|
+
*
|
|
13535
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/create document }
|
|
13536
|
+
*
|
|
13537
|
+
* 添加群菜单
|
|
13538
|
+
*
|
|
13539
|
+
* 向群内添加群菜单。
|
|
13540
|
+
*
|
|
13541
|
+
* 注意事项:;- 该API是向群内追加菜单,群内原来存在的菜单并不会被覆盖。操作API后,将返回群内所有菜单。;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 一个群内,一级菜单最多有3个,每个一级菜单最多有5个二级菜单。
|
|
13542
|
+
*/
|
|
13543
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13544
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13545
|
+
return httpInstance
|
|
13546
|
+
.request({
|
|
13547
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path),
|
|
13548
|
+
method: "POST",
|
|
13549
|
+
data,
|
|
13550
|
+
params,
|
|
13551
|
+
headers,
|
|
13552
|
+
})
|
|
13553
|
+
.catch((e) => {
|
|
13554
|
+
this.logger.error(formatErrors(e));
|
|
13555
|
+
throw e;
|
|
13556
|
+
});
|
|
13557
|
+
}),
|
|
13558
|
+
/**
|
|
13559
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=delete&version=v1 click to debug }
|
|
13560
|
+
*
|
|
13561
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/delete document }
|
|
13562
|
+
*
|
|
13563
|
+
* 删除群菜单。
|
|
13564
|
+
*
|
|
13565
|
+
* 删除群内菜单。
|
|
13566
|
+
*
|
|
13567
|
+
* 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后,将返回群内所有菜单。
|
|
13568
|
+
*/
|
|
13569
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13570
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13571
|
+
return httpInstance
|
|
13572
|
+
.request({
|
|
13573
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path),
|
|
13574
|
+
method: "DELETE",
|
|
13575
|
+
data,
|
|
13576
|
+
params,
|
|
13577
|
+
headers,
|
|
13578
|
+
})
|
|
13579
|
+
.catch((e) => {
|
|
13580
|
+
this.logger.error(formatErrors(e));
|
|
13581
|
+
throw e;
|
|
13582
|
+
});
|
|
13583
|
+
}),
|
|
13584
|
+
/**
|
|
13585
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=get&version=v1 click to debug }
|
|
13586
|
+
*
|
|
13587
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/get document }
|
|
13588
|
+
*
|
|
13589
|
+
* 获取群内菜单
|
|
13590
|
+
*
|
|
13591
|
+
* 通过群ID获取群内菜单。
|
|
13592
|
+
*
|
|
13593
|
+
* 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
|
|
13594
|
+
*/
|
|
13595
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13596
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13597
|
+
return httpInstance
|
|
13598
|
+
.request({
|
|
13599
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path),
|
|
13600
|
+
method: "GET",
|
|
13601
|
+
data,
|
|
13602
|
+
params,
|
|
13603
|
+
headers,
|
|
13604
|
+
})
|
|
13605
|
+
.catch((e) => {
|
|
13606
|
+
this.logger.error(formatErrors(e));
|
|
13607
|
+
throw e;
|
|
13608
|
+
});
|
|
13609
|
+
}),
|
|
13610
|
+
/**
|
|
13611
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=sort&version=v1 click to debug }
|
|
13612
|
+
*
|
|
13613
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/sort document }
|
|
13614
|
+
*
|
|
13615
|
+
* 排序群菜单
|
|
13616
|
+
*
|
|
13617
|
+
* 给一个群内的一级菜单排序。
|
|
13618
|
+
*
|
|
13619
|
+
* 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后,将返回群内所有菜单。
|
|
13620
|
+
*/
|
|
13621
|
+
sort: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13622
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13623
|
+
return httpInstance
|
|
13624
|
+
.request({
|
|
13625
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`, path),
|
|
13626
|
+
method: "POST",
|
|
13627
|
+
data,
|
|
13628
|
+
params,
|
|
13629
|
+
headers,
|
|
13630
|
+
})
|
|
13631
|
+
.catch((e) => {
|
|
13632
|
+
this.logger.error(formatErrors(e));
|
|
13633
|
+
throw e;
|
|
13634
|
+
});
|
|
13635
|
+
}),
|
|
13636
|
+
},
|
|
13136
13637
|
/**
|
|
13137
13638
|
* chat.moderation
|
|
13138
13639
|
*/
|
|
@@ -14488,6 +14989,46 @@ class Client$1 {
|
|
|
14488
14989
|
* 邮件组成员
|
|
14489
14990
|
*/
|
|
14490
14991
|
mailgroupMember: {
|
|
14992
|
+
/**
|
|
14993
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_create&version=v1 click to debug }
|
|
14994
|
+
*
|
|
14995
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.member&version=v1 document }
|
|
14996
|
+
*/
|
|
14997
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
14998
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
14999
|
+
return httpInstance
|
|
15000
|
+
.request({
|
|
15001
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`, path),
|
|
15002
|
+
method: "POST",
|
|
15003
|
+
data,
|
|
15004
|
+
params,
|
|
15005
|
+
headers,
|
|
15006
|
+
})
|
|
15007
|
+
.catch((e) => {
|
|
15008
|
+
this.logger.error(formatErrors(e));
|
|
15009
|
+
throw e;
|
|
15010
|
+
});
|
|
15011
|
+
}),
|
|
15012
|
+
/**
|
|
15013
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_delete&version=v1 click to debug }
|
|
15014
|
+
*
|
|
15015
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.member&version=v1 document }
|
|
15016
|
+
*/
|
|
15017
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15018
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15019
|
+
return httpInstance
|
|
15020
|
+
.request({
|
|
15021
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`, path),
|
|
15022
|
+
method: "DELETE",
|
|
15023
|
+
data,
|
|
15024
|
+
params,
|
|
15025
|
+
headers,
|
|
15026
|
+
})
|
|
15027
|
+
.catch((e) => {
|
|
15028
|
+
this.logger.error(formatErrors(e));
|
|
15029
|
+
throw e;
|
|
15030
|
+
});
|
|
15031
|
+
}),
|
|
14491
15032
|
/**
|
|
14492
15033
|
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=create&version=v1 click to debug }
|
|
14493
15034
|
*
|
|
@@ -14637,6 +15178,46 @@ class Client$1 {
|
|
|
14637
15178
|
* 邮件组权限成员
|
|
14638
15179
|
*/
|
|
14639
15180
|
mailgroupPermissionMember: {
|
|
15181
|
+
/**
|
|
15182
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_create&version=v1 click to debug }
|
|
15183
|
+
*
|
|
15184
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.permission_member&version=v1 document }
|
|
15185
|
+
*/
|
|
15186
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15187
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15188
|
+
return httpInstance
|
|
15189
|
+
.request({
|
|
15190
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`, path),
|
|
15191
|
+
method: "POST",
|
|
15192
|
+
data,
|
|
15193
|
+
params,
|
|
15194
|
+
headers,
|
|
15195
|
+
})
|
|
15196
|
+
.catch((e) => {
|
|
15197
|
+
this.logger.error(formatErrors(e));
|
|
15198
|
+
throw e;
|
|
15199
|
+
});
|
|
15200
|
+
}),
|
|
15201
|
+
/**
|
|
15202
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_delete&version=v1 click to debug }
|
|
15203
|
+
*
|
|
15204
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.permission_member&version=v1 document }
|
|
15205
|
+
*/
|
|
15206
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15207
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15208
|
+
return httpInstance
|
|
15209
|
+
.request({
|
|
15210
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`, path),
|
|
15211
|
+
method: "DELETE",
|
|
15212
|
+
data,
|
|
15213
|
+
params,
|
|
15214
|
+
headers,
|
|
15215
|
+
})
|
|
15216
|
+
.catch((e) => {
|
|
15217
|
+
this.logger.error(formatErrors(e));
|
|
15218
|
+
throw e;
|
|
15219
|
+
});
|
|
15220
|
+
}),
|
|
14640
15221
|
/**
|
|
14641
15222
|
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=create&version=v1 click to debug }
|
|
14642
15223
|
*
|
|
@@ -15060,6 +15641,46 @@ class Client$1 {
|
|
|
15060
15641
|
* 公共邮箱成员
|
|
15061
15642
|
*/
|
|
15062
15643
|
publicMailboxMember: {
|
|
15644
|
+
/**
|
|
15645
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_create&version=v1 click to debug }
|
|
15646
|
+
*
|
|
15647
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=public_mailbox.member&version=v1 document }
|
|
15648
|
+
*/
|
|
15649
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15650
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15651
|
+
return httpInstance
|
|
15652
|
+
.request({
|
|
15653
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`, path),
|
|
15654
|
+
method: "POST",
|
|
15655
|
+
data,
|
|
15656
|
+
params,
|
|
15657
|
+
headers,
|
|
15658
|
+
})
|
|
15659
|
+
.catch((e) => {
|
|
15660
|
+
this.logger.error(formatErrors(e));
|
|
15661
|
+
throw e;
|
|
15662
|
+
});
|
|
15663
|
+
}),
|
|
15664
|
+
/**
|
|
15665
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_delete&version=v1 click to debug }
|
|
15666
|
+
*
|
|
15667
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=public_mailbox.member&version=v1 document }
|
|
15668
|
+
*/
|
|
15669
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15670
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15671
|
+
return httpInstance
|
|
15672
|
+
.request({
|
|
15673
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`, path),
|
|
15674
|
+
method: "DELETE",
|
|
15675
|
+
data,
|
|
15676
|
+
params,
|
|
15677
|
+
headers,
|
|
15678
|
+
})
|
|
15679
|
+
.catch((e) => {
|
|
15680
|
+
this.logger.error(formatErrors(e));
|
|
15681
|
+
throw e;
|
|
15682
|
+
});
|
|
15683
|
+
}),
|
|
15063
15684
|
/**
|
|
15064
15685
|
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=clear&version=v1 click to debug }
|
|
15065
15686
|
*
|
|
@@ -15459,6 +16080,165 @@ class Client$1 {
|
|
|
15459
16080
|
return get__default["default"](res, "data", {});
|
|
15460
16081
|
}),
|
|
15461
16082
|
},
|
|
16083
|
+
/**
|
|
16084
|
+
* 指标库
|
|
16085
|
+
*/
|
|
16086
|
+
metricSource: {
|
|
16087
|
+
/**
|
|
16088
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source&apiName=list&version=v1 click to debug }
|
|
16089
|
+
*
|
|
16090
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source/list document }
|
|
16091
|
+
*
|
|
16092
|
+
* 获取指标库
|
|
16093
|
+
*
|
|
16094
|
+
* 获取租户下全部 OKR 指标库(仅限 OKR 企业版使用)
|
|
16095
|
+
*/
|
|
16096
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16097
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16098
|
+
return httpInstance
|
|
16099
|
+
.request({
|
|
16100
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources`, path),
|
|
16101
|
+
method: "GET",
|
|
16102
|
+
data,
|
|
16103
|
+
params,
|
|
16104
|
+
headers,
|
|
16105
|
+
})
|
|
16106
|
+
.catch((e) => {
|
|
16107
|
+
this.logger.error(formatErrors(e));
|
|
16108
|
+
throw e;
|
|
16109
|
+
});
|
|
16110
|
+
}),
|
|
16111
|
+
},
|
|
16112
|
+
/**
|
|
16113
|
+
* 指标项
|
|
16114
|
+
*/
|
|
16115
|
+
metricSourceTableItem: {
|
|
16116
|
+
/**
|
|
16117
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=batch_update&version=v1 click to debug }
|
|
16118
|
+
*
|
|
16119
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/batch_update document }
|
|
16120
|
+
*
|
|
16121
|
+
* 批量更新指标项
|
|
16122
|
+
*
|
|
16123
|
+
* - 该接口用于批量更新多项指标,单次调用最多更新 100 条记录。接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
|
|
16124
|
+
*/
|
|
16125
|
+
batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16126
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16127
|
+
return httpInstance
|
|
16128
|
+
.request({
|
|
16129
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/batch_update`, path),
|
|
16130
|
+
method: "PATCH",
|
|
16131
|
+
data,
|
|
16132
|
+
params,
|
|
16133
|
+
headers,
|
|
16134
|
+
})
|
|
16135
|
+
.catch((e) => {
|
|
16136
|
+
this.logger.error(formatErrors(e));
|
|
16137
|
+
throw e;
|
|
16138
|
+
});
|
|
16139
|
+
}),
|
|
16140
|
+
/**
|
|
16141
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=get&version=v1 click to debug }
|
|
16142
|
+
*
|
|
16143
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/get document }
|
|
16144
|
+
*
|
|
16145
|
+
* 获取指标项详情
|
|
16146
|
+
*
|
|
16147
|
+
* 获取某项指标的具体内容(仅限 OKR 企业版使用)
|
|
16148
|
+
*/
|
|
16149
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16150
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16151
|
+
return httpInstance
|
|
16152
|
+
.request({
|
|
16153
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
|
|
16154
|
+
method: "GET",
|
|
16155
|
+
data,
|
|
16156
|
+
params,
|
|
16157
|
+
headers,
|
|
16158
|
+
})
|
|
16159
|
+
.catch((e) => {
|
|
16160
|
+
this.logger.error(formatErrors(e));
|
|
16161
|
+
throw e;
|
|
16162
|
+
});
|
|
16163
|
+
}),
|
|
16164
|
+
/**
|
|
16165
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=list&version=v1 click to debug }
|
|
16166
|
+
*
|
|
16167
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/list document }
|
|
16168
|
+
*
|
|
16169
|
+
* 获取指标项
|
|
16170
|
+
*
|
|
16171
|
+
* 获取指定指标表下的所有指标项(仅限 OKR 企业版使用)
|
|
16172
|
+
*/
|
|
16173
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16174
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16175
|
+
return httpInstance
|
|
16176
|
+
.request({
|
|
16177
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items`, path),
|
|
16178
|
+
method: "GET",
|
|
16179
|
+
data,
|
|
16180
|
+
params,
|
|
16181
|
+
headers,
|
|
16182
|
+
})
|
|
16183
|
+
.catch((e) => {
|
|
16184
|
+
this.logger.error(formatErrors(e));
|
|
16185
|
+
throw e;
|
|
16186
|
+
});
|
|
16187
|
+
}),
|
|
16188
|
+
/**
|
|
16189
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=patch&version=v1 click to debug }
|
|
16190
|
+
*
|
|
16191
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/patch document }
|
|
16192
|
+
*
|
|
16193
|
+
* 更新指标项
|
|
16194
|
+
*
|
|
16195
|
+
* - 该接口用于更新某项指标,接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
|
|
16196
|
+
*/
|
|
16197
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16198
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16199
|
+
return httpInstance
|
|
16200
|
+
.request({
|
|
16201
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
|
|
16202
|
+
method: "PATCH",
|
|
16203
|
+
data,
|
|
16204
|
+
params,
|
|
16205
|
+
headers,
|
|
16206
|
+
})
|
|
16207
|
+
.catch((e) => {
|
|
16208
|
+
this.logger.error(formatErrors(e));
|
|
16209
|
+
throw e;
|
|
16210
|
+
});
|
|
16211
|
+
}),
|
|
16212
|
+
},
|
|
16213
|
+
/**
|
|
16214
|
+
* 指标表
|
|
16215
|
+
*/
|
|
16216
|
+
metricSourceTable: {
|
|
16217
|
+
/**
|
|
16218
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table&apiName=list&version=v1 click to debug }
|
|
16219
|
+
*
|
|
16220
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table/list document }
|
|
16221
|
+
*
|
|
16222
|
+
* 获取指标表
|
|
16223
|
+
*
|
|
16224
|
+
* 获取指定指标库下有哪些指标表(仅限 OKR 企业版使用)
|
|
16225
|
+
*/
|
|
16226
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16227
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16228
|
+
return httpInstance
|
|
16229
|
+
.request({
|
|
16230
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables`, path),
|
|
16231
|
+
method: "GET",
|
|
16232
|
+
data,
|
|
16233
|
+
params,
|
|
16234
|
+
headers,
|
|
16235
|
+
})
|
|
16236
|
+
.catch((e) => {
|
|
16237
|
+
this.logger.error(formatErrors(e));
|
|
16238
|
+
throw e;
|
|
16239
|
+
});
|
|
16240
|
+
}),
|
|
16241
|
+
},
|
|
15462
16242
|
/**
|
|
15463
16243
|
* OKR
|
|
15464
16244
|
*/
|
|
@@ -16553,7 +17333,7 @@ class Client$1 {
|
|
|
16553
17333
|
}),
|
|
16554
17334
|
},
|
|
16555
17335
|
/**
|
|
16556
|
-
*
|
|
17336
|
+
* 工作表
|
|
16557
17337
|
*/
|
|
16558
17338
|
spreadsheetSheet: {
|
|
16559
17339
|
/**
|
|
@@ -17809,83 +18589,6 @@ class Client$1 {
|
|
|
17809
18589
|
* 视频会议
|
|
17810
18590
|
*/
|
|
17811
18591
|
this.vc = {
|
|
17812
|
-
/**
|
|
17813
|
-
* 告警中心
|
|
17814
|
-
*/
|
|
17815
|
-
alert: {
|
|
17816
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17817
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17818
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
17819
|
-
const res = yield httpInstance
|
|
17820
|
-
.request({
|
|
17821
|
-
url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path),
|
|
17822
|
-
method: "GET",
|
|
17823
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
17824
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
17825
|
-
})
|
|
17826
|
-
.catch((e) => {
|
|
17827
|
-
this.logger.error(formatErrors(e));
|
|
17828
|
-
});
|
|
17829
|
-
return res;
|
|
17830
|
-
});
|
|
17831
|
-
const Iterable = {
|
|
17832
|
-
[Symbol.asyncIterator]() {
|
|
17833
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
17834
|
-
let hasMore = true;
|
|
17835
|
-
let pageToken;
|
|
17836
|
-
while (hasMore) {
|
|
17837
|
-
try {
|
|
17838
|
-
const res = yield __await(sendRequest({
|
|
17839
|
-
headers,
|
|
17840
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
17841
|
-
data,
|
|
17842
|
-
}));
|
|
17843
|
-
const _b = get__default["default"](res, "data") || {}, {
|
|
17844
|
-
// @ts-ignore
|
|
17845
|
-
has_more,
|
|
17846
|
-
// @ts-ignore
|
|
17847
|
-
page_token,
|
|
17848
|
-
// @ts-ignore
|
|
17849
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
17850
|
-
yield yield __await(rest);
|
|
17851
|
-
hasMore = Boolean(has_more);
|
|
17852
|
-
pageToken = page_token || next_page_token;
|
|
17853
|
-
}
|
|
17854
|
-
catch (e) {
|
|
17855
|
-
yield yield __await(null);
|
|
17856
|
-
break;
|
|
17857
|
-
}
|
|
17858
|
-
}
|
|
17859
|
-
});
|
|
17860
|
-
},
|
|
17861
|
-
};
|
|
17862
|
-
return Iterable;
|
|
17863
|
-
}),
|
|
17864
|
-
/**
|
|
17865
|
-
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=alert&apiName=list&version=v1 click to debug }
|
|
17866
|
-
*
|
|
17867
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list document }
|
|
17868
|
-
*
|
|
17869
|
-
* 获取告警记录
|
|
17870
|
-
*
|
|
17871
|
-
* 获取特定条件下租户的设备告警记录
|
|
17872
|
-
*/
|
|
17873
|
-
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17874
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17875
|
-
return httpInstance
|
|
17876
|
-
.request({
|
|
17877
|
-
url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path),
|
|
17878
|
-
method: "GET",
|
|
17879
|
-
data,
|
|
17880
|
-
params,
|
|
17881
|
-
headers,
|
|
17882
|
-
})
|
|
17883
|
-
.catch((e) => {
|
|
17884
|
-
this.logger.error(formatErrors(e));
|
|
17885
|
-
throw e;
|
|
17886
|
-
});
|
|
17887
|
-
}),
|
|
17888
|
-
},
|
|
17889
18592
|
/**
|
|
17890
18593
|
* 导出
|
|
17891
18594
|
*/
|