@larksuiteoapi/node-sdk 1.16.1 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/README.zh.md +8 -0
- package/es/index.js +378 -6
- package/lib/index.js +378 -6
- package/package.json +1 -1
- package/types/index.d.ts +752 -17
package/README.md
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
All of these make the overall development experience poor. In order to make the open capability easy to use, we have written this SDK, which integrates all the verbose logic into built-in processing, provides a complete type hints, and provides external semantics. Programming interface to improve coding experience.
|
|
8
8
|
|
|
9
|
+
Here are some official tutorials based on the sdk:
|
|
10
|
+
* [Quickly develop interactive cards](https://open.feishu.cn/document/home/quickly-develop-interactive-cards/introduction)
|
|
11
|
+
* [Quick Start of Personnel and Attendance Management System](https://open.feishu.cn/document/home/quick-start-of-personnel-and-attendance-management-system/overview)
|
|
12
|
+
* [Quick access to Base](https://open.feishu.cn/document/home/quick-access-to-base/preparation)
|
|
13
|
+
* [Department personnel management based on web app](https://open.feishu.cn/document/home/quick-access-to-base/department-personnel-management-based-on-web-app/overview)
|
|
14
|
+
* [Quick access to Contact API](https://open.feishu.cn/document/home/quick-access-to-contact-api/introduction)
|
|
15
|
+
* [Automatic attendance management based on approval](https://open.feishu.cn/document/home/automatic-attendance-management-based-on-approval/introduction)
|
|
16
|
+
|
|
9
17
|
## Concept
|
|
10
18
|
- Development documentation: A reference to the open interface of the open platform, **a must-see for developers, you can use the search function to query documents efficiently**. [More introduction instructions](https://open.feishu.cn/document/) .
|
|
11
19
|
|
package/README.zh.md
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
凡此种种,都使得整体的开发体验不佳,基于此,为了让开放能力变得易用,我们编写了该SDK,将所有冗长的逻辑内置处理,提供完备的类型系统,对外提供语义化的编程接口,提高编码体验。😙
|
|
7
7
|
|
|
8
|
+
以下是一些基于该sdk的官方教程:
|
|
9
|
+
* [快速开发互动卡片](https://open.feishu.cn/document/home/quickly-develop-interactive-cards/introduction)
|
|
10
|
+
* [快速开发人员及考勤管理系统](https://open.feishu.cn/document/home/quick-start-of-personnel-and-attendance-management-system/overview)
|
|
11
|
+
* [快速接入多维表格](https://open.feishu.cn/document/home/quick-access-to-base/preparation)
|
|
12
|
+
* [基于网页应用实现部门人员管理](https://open.feishu.cn/document/home/quick-access-to-base/department-personnel-management-based-on-web-app/overview)
|
|
13
|
+
* [快速接入通讯录](https://open.feishu.cn/document/home/quick-access-to-contact-api/introduction)
|
|
14
|
+
* [基于审批实现自动考勤管理](https://open.feishu.cn/document/home/automatic-attendance-management-based-on-approval/introduction)
|
|
15
|
+
|
|
8
16
|
## 概念
|
|
9
17
|
- 开发文档:开放平台的开放接口的参考,**开发者必看,可以使用搜索功能,高效的查询文档**。[更多介绍说明](https://open.feishu.cn/document/) 。
|
|
10
18
|
|
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
|
/**
|
|
@@ -9737,7 +9737,7 @@ class Client$1 {
|
|
|
9737
9737
|
}),
|
|
9738
9738
|
},
|
|
9739
9739
|
/**
|
|
9740
|
-
*
|
|
9740
|
+
* 异步任务状态
|
|
9741
9741
|
*/
|
|
9742
9742
|
file: {
|
|
9743
9743
|
/**
|
|
@@ -10493,7 +10493,7 @@ class Client$1 {
|
|
|
10493
10493
|
}),
|
|
10494
10494
|
},
|
|
10495
10495
|
/**
|
|
10496
|
-
*
|
|
10496
|
+
* 素材
|
|
10497
10497
|
*/
|
|
10498
10498
|
media: {
|
|
10499
10499
|
/**
|
|
@@ -12766,7 +12766,7 @@ class Client$1 {
|
|
|
12766
12766
|
*/
|
|
12767
12767
|
this.hire = {
|
|
12768
12768
|
/**
|
|
12769
|
-
*
|
|
12769
|
+
* 入职
|
|
12770
12770
|
*/
|
|
12771
12771
|
application: {
|
|
12772
12772
|
/**
|
|
@@ -13098,6 +13098,83 @@ class Client$1 {
|
|
|
13098
13098
|
});
|
|
13099
13099
|
}),
|
|
13100
13100
|
},
|
|
13101
|
+
/**
|
|
13102
|
+
* 评估(灰度租户可见)
|
|
13103
|
+
*/
|
|
13104
|
+
evaluation: {
|
|
13105
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13106
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13107
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
13108
|
+
const res = yield this.httpInstance
|
|
13109
|
+
.request({
|
|
13110
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluations`, path),
|
|
13111
|
+
method: "GET",
|
|
13112
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
13113
|
+
params: pickBy(innerPayload.params, identity),
|
|
13114
|
+
})
|
|
13115
|
+
.catch((e) => {
|
|
13116
|
+
this.logger.error(formatErrors(e));
|
|
13117
|
+
});
|
|
13118
|
+
return res;
|
|
13119
|
+
});
|
|
13120
|
+
const Iterable = {
|
|
13121
|
+
[Symbol.asyncIterator]() {
|
|
13122
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
13123
|
+
let hasMore = true;
|
|
13124
|
+
let pageToken;
|
|
13125
|
+
while (hasMore) {
|
|
13126
|
+
try {
|
|
13127
|
+
const res = yield __await(sendRequest({
|
|
13128
|
+
headers,
|
|
13129
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
13130
|
+
data,
|
|
13131
|
+
}));
|
|
13132
|
+
const _b = get(res, "data") || {}, {
|
|
13133
|
+
// @ts-ignore
|
|
13134
|
+
has_more,
|
|
13135
|
+
// @ts-ignore
|
|
13136
|
+
page_token,
|
|
13137
|
+
// @ts-ignore
|
|
13138
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
13139
|
+
yield yield __await(rest);
|
|
13140
|
+
hasMore = Boolean(has_more);
|
|
13141
|
+
pageToken = page_token || next_page_token;
|
|
13142
|
+
}
|
|
13143
|
+
catch (e) {
|
|
13144
|
+
yield yield __await(null);
|
|
13145
|
+
break;
|
|
13146
|
+
}
|
|
13147
|
+
}
|
|
13148
|
+
});
|
|
13149
|
+
},
|
|
13150
|
+
};
|
|
13151
|
+
return Iterable;
|
|
13152
|
+
}),
|
|
13153
|
+
/**
|
|
13154
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=evaluation&apiName=list&version=v1 click to debug }
|
|
13155
|
+
*
|
|
13156
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation/list document }
|
|
13157
|
+
*
|
|
13158
|
+
* 获取简历评估信息
|
|
13159
|
+
*
|
|
13160
|
+
* 获取简历评估信息
|
|
13161
|
+
*/
|
|
13162
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13163
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13164
|
+
return this.httpInstance
|
|
13165
|
+
.request({
|
|
13166
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/evaluations`, path),
|
|
13167
|
+
method: "GET",
|
|
13168
|
+
data,
|
|
13169
|
+
params,
|
|
13170
|
+
headers,
|
|
13171
|
+
})
|
|
13172
|
+
.catch((e) => {
|
|
13173
|
+
this.logger.error(formatErrors(e));
|
|
13174
|
+
throw e;
|
|
13175
|
+
});
|
|
13176
|
+
}),
|
|
13177
|
+
},
|
|
13101
13178
|
/**
|
|
13102
13179
|
* 导入外部系统信息(灰度租户可见)
|
|
13103
13180
|
*/
|
|
@@ -13498,6 +13575,151 @@ class Client$1 {
|
|
|
13498
13575
|
});
|
|
13499
13576
|
}),
|
|
13500
13577
|
},
|
|
13578
|
+
/**
|
|
13579
|
+
* Offer
|
|
13580
|
+
*/
|
|
13581
|
+
offer: {
|
|
13582
|
+
/**
|
|
13583
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=create&version=v1 click to debug }
|
|
13584
|
+
*
|
|
13585
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/create document }
|
|
13586
|
+
*
|
|
13587
|
+
* 创建 Offer
|
|
13588
|
+
*
|
|
13589
|
+
* 创建 Offer 时,需传入本文档中标注为必传的参数,其余参数是否必传参考「获取 Offer 申请表模板信息」的参数定义
|
|
13590
|
+
*/
|
|
13591
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13592
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13593
|
+
return this.httpInstance
|
|
13594
|
+
.request({
|
|
13595
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers`, path),
|
|
13596
|
+
method: "POST",
|
|
13597
|
+
data,
|
|
13598
|
+
params,
|
|
13599
|
+
headers,
|
|
13600
|
+
})
|
|
13601
|
+
.catch((e) => {
|
|
13602
|
+
this.logger.error(formatErrors(e));
|
|
13603
|
+
throw e;
|
|
13604
|
+
});
|
|
13605
|
+
}),
|
|
13606
|
+
/**
|
|
13607
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=get&version=v1 click to debug }
|
|
13608
|
+
*
|
|
13609
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/get document }
|
|
13610
|
+
*
|
|
13611
|
+
* 获取 Offer 详情
|
|
13612
|
+
*
|
|
13613
|
+
* 根据 Offer ID 获取 Offer 详细信息
|
|
13614
|
+
*/
|
|
13615
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13616
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13617
|
+
return this.httpInstance
|
|
13618
|
+
.request({
|
|
13619
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id`, path),
|
|
13620
|
+
method: "GET",
|
|
13621
|
+
data,
|
|
13622
|
+
params,
|
|
13623
|
+
headers,
|
|
13624
|
+
})
|
|
13625
|
+
.catch((e) => {
|
|
13626
|
+
this.logger.error(formatErrors(e));
|
|
13627
|
+
throw e;
|
|
13628
|
+
});
|
|
13629
|
+
}),
|
|
13630
|
+
/**
|
|
13631
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=intern_offer_status&version=v1 click to debug }
|
|
13632
|
+
*
|
|
13633
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/intern_offer_status document }
|
|
13634
|
+
*
|
|
13635
|
+
* 更新实习 Offer 入/离职状态
|
|
13636
|
+
*
|
|
13637
|
+
* 对「实习待入职」状态的实习 Offer 确认入职、放弃入职,或对「实习已入职」状态的实习 Offer 操作离职
|
|
13638
|
+
*/
|
|
13639
|
+
internOfferStatus: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13640
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13641
|
+
return this.httpInstance
|
|
13642
|
+
.request({
|
|
13643
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id/intern_offer_status`, path),
|
|
13644
|
+
method: "POST",
|
|
13645
|
+
data,
|
|
13646
|
+
params,
|
|
13647
|
+
headers,
|
|
13648
|
+
})
|
|
13649
|
+
.catch((e) => {
|
|
13650
|
+
this.logger.error(formatErrors(e));
|
|
13651
|
+
throw e;
|
|
13652
|
+
});
|
|
13653
|
+
}),
|
|
13654
|
+
/**
|
|
13655
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=list&version=v1 click to debug }
|
|
13656
|
+
*
|
|
13657
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/list document }
|
|
13658
|
+
*
|
|
13659
|
+
* 获取 Offer 列表
|
|
13660
|
+
*
|
|
13661
|
+
* 根据人才 ID 获取 Offer 列表
|
|
13662
|
+
*/
|
|
13663
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13664
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13665
|
+
return this.httpInstance
|
|
13666
|
+
.request({
|
|
13667
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers`, path),
|
|
13668
|
+
method: "GET",
|
|
13669
|
+
data,
|
|
13670
|
+
params,
|
|
13671
|
+
headers,
|
|
13672
|
+
})
|
|
13673
|
+
.catch((e) => {
|
|
13674
|
+
this.logger.error(formatErrors(e));
|
|
13675
|
+
throw e;
|
|
13676
|
+
});
|
|
13677
|
+
}),
|
|
13678
|
+
/**
|
|
13679
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=offer_status&version=v1 click to debug }
|
|
13680
|
+
*
|
|
13681
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=offer_status&project=hire&resource=offer&version=v1 document }
|
|
13682
|
+
*/
|
|
13683
|
+
offerStatus: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13684
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13685
|
+
return this.httpInstance
|
|
13686
|
+
.request({
|
|
13687
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id/offer_status`, path),
|
|
13688
|
+
method: "PATCH",
|
|
13689
|
+
data,
|
|
13690
|
+
params,
|
|
13691
|
+
headers,
|
|
13692
|
+
})
|
|
13693
|
+
.catch((e) => {
|
|
13694
|
+
this.logger.error(formatErrors(e));
|
|
13695
|
+
throw e;
|
|
13696
|
+
});
|
|
13697
|
+
}),
|
|
13698
|
+
/**
|
|
13699
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer&apiName=update&version=v1 click to debug }
|
|
13700
|
+
*
|
|
13701
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/update document }
|
|
13702
|
+
*
|
|
13703
|
+
* 更新 Offer 信息
|
|
13704
|
+
*
|
|
13705
|
+
* 1. 更新 Offer 时,需传入本文档中标注为必传的参数,其余参数是否必传参考「获取 Offer 申请表模板信息」的参数定义;;2. 对系统中已存在的 offer 进行更新的,若更新 offer 中含有「修改需审批」的字段,更新后原 Offer 的审批会自动撤回,需要重新发起审批
|
|
13706
|
+
*/
|
|
13707
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13708
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13709
|
+
return this.httpInstance
|
|
13710
|
+
.request({
|
|
13711
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offers/:offer_id`, path),
|
|
13712
|
+
method: "PUT",
|
|
13713
|
+
data,
|
|
13714
|
+
params,
|
|
13715
|
+
headers,
|
|
13716
|
+
})
|
|
13717
|
+
.catch((e) => {
|
|
13718
|
+
this.logger.error(formatErrors(e));
|
|
13719
|
+
throw e;
|
|
13720
|
+
});
|
|
13721
|
+
}),
|
|
13722
|
+
},
|
|
13501
13723
|
/**
|
|
13502
13724
|
* offer_schema
|
|
13503
13725
|
*/
|
|
@@ -13523,6 +13745,35 @@ class Client$1 {
|
|
|
13523
13745
|
});
|
|
13524
13746
|
}),
|
|
13525
13747
|
},
|
|
13748
|
+
/**
|
|
13749
|
+
* 问卷(灰度租户可见)
|
|
13750
|
+
*/
|
|
13751
|
+
questionnaire: {
|
|
13752
|
+
/**
|
|
13753
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=questionnaire&apiName=list&version=v1 click to debug }
|
|
13754
|
+
*
|
|
13755
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list document }
|
|
13756
|
+
*
|
|
13757
|
+
* 获取面试满意度问卷列表
|
|
13758
|
+
*
|
|
13759
|
+
* 获取面试满意度问卷列表
|
|
13760
|
+
*/
|
|
13761
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13762
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13763
|
+
return this.httpInstance
|
|
13764
|
+
.request({
|
|
13765
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/questionnaires`, path),
|
|
13766
|
+
method: "GET",
|
|
13767
|
+
data,
|
|
13768
|
+
params,
|
|
13769
|
+
headers,
|
|
13770
|
+
})
|
|
13771
|
+
.catch((e) => {
|
|
13772
|
+
this.logger.error(formatErrors(e));
|
|
13773
|
+
throw e;
|
|
13774
|
+
});
|
|
13775
|
+
}),
|
|
13776
|
+
},
|
|
13526
13777
|
/**
|
|
13527
13778
|
* 内推
|
|
13528
13779
|
*/
|
|
@@ -15071,7 +15322,7 @@ class Client$1 {
|
|
|
15071
15322
|
}),
|
|
15072
15323
|
},
|
|
15073
15324
|
/**
|
|
15074
|
-
*
|
|
15325
|
+
* 消息
|
|
15075
15326
|
*/
|
|
15076
15327
|
message: {
|
|
15077
15328
|
/**
|
|
@@ -15126,6 +15377,28 @@ class Client$1 {
|
|
|
15126
15377
|
throw e;
|
|
15127
15378
|
});
|
|
15128
15379
|
}),
|
|
15380
|
+
/**
|
|
15381
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=forward&version=v1 click to debug }
|
|
15382
|
+
*
|
|
15383
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=forward&project=im&resource=message&version=v1 document }
|
|
15384
|
+
*
|
|
15385
|
+
* 转发一条消息
|
|
15386
|
+
*/
|
|
15387
|
+
forward: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15388
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15389
|
+
return this.httpInstance
|
|
15390
|
+
.request({
|
|
15391
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/forward`, path),
|
|
15392
|
+
method: "POST",
|
|
15393
|
+
data,
|
|
15394
|
+
params,
|
|
15395
|
+
headers,
|
|
15396
|
+
})
|
|
15397
|
+
.catch((e) => {
|
|
15398
|
+
this.logger.error(formatErrors(e));
|
|
15399
|
+
throw e;
|
|
15400
|
+
});
|
|
15401
|
+
}),
|
|
15129
15402
|
/**
|
|
15130
15403
|
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=get&version=v1 click to debug }
|
|
15131
15404
|
*
|
|
@@ -15228,6 +15501,28 @@ class Client$1 {
|
|
|
15228
15501
|
throw e;
|
|
15229
15502
|
});
|
|
15230
15503
|
}),
|
|
15504
|
+
/**
|
|
15505
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=merge_forward&version=v1 click to debug }
|
|
15506
|
+
*
|
|
15507
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=merge_forward&project=im&resource=message&version=v1 document }
|
|
15508
|
+
*
|
|
15509
|
+
* 合并转发多条消息
|
|
15510
|
+
*/
|
|
15511
|
+
mergeForward: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15512
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15513
|
+
return this.httpInstance
|
|
15514
|
+
.request({
|
|
15515
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/merge_forward`, path),
|
|
15516
|
+
method: "POST",
|
|
15517
|
+
data,
|
|
15518
|
+
params,
|
|
15519
|
+
headers,
|
|
15520
|
+
})
|
|
15521
|
+
.catch((e) => {
|
|
15522
|
+
this.logger.error(formatErrors(e));
|
|
15523
|
+
throw e;
|
|
15524
|
+
});
|
|
15525
|
+
}),
|
|
15231
15526
|
/**
|
|
15232
15527
|
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=patch&version=v1 click to debug }
|
|
15233
15528
|
*
|
|
@@ -18436,7 +18731,7 @@ class Client$1 {
|
|
|
18436
18731
|
}),
|
|
18437
18732
|
},
|
|
18438
18733
|
/**
|
|
18439
|
-
*
|
|
18734
|
+
* 单元格
|
|
18440
18735
|
*/
|
|
18441
18736
|
spreadsheetSheet: {
|
|
18442
18737
|
/**
|
|
@@ -19717,6 +20012,83 @@ class Client$1 {
|
|
|
19717
20012
|
* 视频会议
|
|
19718
20013
|
*/
|
|
19719
20014
|
this.vc = {
|
|
20015
|
+
/**
|
|
20016
|
+
* 告警中心
|
|
20017
|
+
*/
|
|
20018
|
+
alert: {
|
|
20019
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20020
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20021
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
20022
|
+
const res = yield this.httpInstance
|
|
20023
|
+
.request({
|
|
20024
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path),
|
|
20025
|
+
method: "GET",
|
|
20026
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
20027
|
+
params: pickBy(innerPayload.params, identity),
|
|
20028
|
+
})
|
|
20029
|
+
.catch((e) => {
|
|
20030
|
+
this.logger.error(formatErrors(e));
|
|
20031
|
+
});
|
|
20032
|
+
return res;
|
|
20033
|
+
});
|
|
20034
|
+
const Iterable = {
|
|
20035
|
+
[Symbol.asyncIterator]() {
|
|
20036
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
20037
|
+
let hasMore = true;
|
|
20038
|
+
let pageToken;
|
|
20039
|
+
while (hasMore) {
|
|
20040
|
+
try {
|
|
20041
|
+
const res = yield __await(sendRequest({
|
|
20042
|
+
headers,
|
|
20043
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
20044
|
+
data,
|
|
20045
|
+
}));
|
|
20046
|
+
const _b = get(res, "data") || {}, {
|
|
20047
|
+
// @ts-ignore
|
|
20048
|
+
has_more,
|
|
20049
|
+
// @ts-ignore
|
|
20050
|
+
page_token,
|
|
20051
|
+
// @ts-ignore
|
|
20052
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
20053
|
+
yield yield __await(rest);
|
|
20054
|
+
hasMore = Boolean(has_more);
|
|
20055
|
+
pageToken = page_token || next_page_token;
|
|
20056
|
+
}
|
|
20057
|
+
catch (e) {
|
|
20058
|
+
yield yield __await(null);
|
|
20059
|
+
break;
|
|
20060
|
+
}
|
|
20061
|
+
}
|
|
20062
|
+
});
|
|
20063
|
+
},
|
|
20064
|
+
};
|
|
20065
|
+
return Iterable;
|
|
20066
|
+
}),
|
|
20067
|
+
/**
|
|
20068
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=alert&apiName=list&version=v1 click to debug }
|
|
20069
|
+
*
|
|
20070
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list document }
|
|
20071
|
+
*
|
|
20072
|
+
* 获取告警记录
|
|
20073
|
+
*
|
|
20074
|
+
* 获取特定条件下租户的设备告警记录
|
|
20075
|
+
*/
|
|
20076
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20077
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20078
|
+
return this.httpInstance
|
|
20079
|
+
.request({
|
|
20080
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path),
|
|
20081
|
+
method: "GET",
|
|
20082
|
+
data,
|
|
20083
|
+
params,
|
|
20084
|
+
headers,
|
|
20085
|
+
})
|
|
20086
|
+
.catch((e) => {
|
|
20087
|
+
this.logger.error(formatErrors(e));
|
|
20088
|
+
throw e;
|
|
20089
|
+
});
|
|
20090
|
+
}),
|
|
20091
|
+
},
|
|
19720
20092
|
/**
|
|
19721
20093
|
* 导出
|
|
19722
20094
|
*/
|