@larksuiteoapi/node-sdk 1.17.1 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/README.zh.md +4 -2
- package/es/index.js +3751 -279
- package/lib/index.js +3751 -279
- package/package.json +1 -1
- package/types/index.d.ts +9671 -722
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
|
/**
|
|
@@ -2266,7 +2266,7 @@ class Client$1 {
|
|
|
2266
2266
|
}),
|
|
2267
2267
|
},
|
|
2268
2268
|
/**
|
|
2269
|
-
*
|
|
2269
|
+
* 审批查询
|
|
2270
2270
|
*/
|
|
2271
2271
|
task: {
|
|
2272
2272
|
/**
|
|
@@ -2744,6 +2744,56 @@ class Client$1 {
|
|
|
2744
2744
|
});
|
|
2745
2745
|
}),
|
|
2746
2746
|
},
|
|
2747
|
+
/**
|
|
2748
|
+
* leave_accrual_record
|
|
2749
|
+
*/
|
|
2750
|
+
leaveAccrualRecord: {
|
|
2751
|
+
/**
|
|
2752
|
+
* {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_accrual_record&apiName=patch&version=v1 click to debug }
|
|
2753
|
+
*
|
|
2754
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=attendance&resource=leave_accrual_record&version=v1 document }
|
|
2755
|
+
*/
|
|
2756
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2757
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2758
|
+
return this.httpInstance
|
|
2759
|
+
.request({
|
|
2760
|
+
url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`, path),
|
|
2761
|
+
method: "PATCH",
|
|
2762
|
+
data,
|
|
2763
|
+
params,
|
|
2764
|
+
headers,
|
|
2765
|
+
})
|
|
2766
|
+
.catch((e) => {
|
|
2767
|
+
this.logger.error(formatErrors(e));
|
|
2768
|
+
throw e;
|
|
2769
|
+
});
|
|
2770
|
+
}),
|
|
2771
|
+
},
|
|
2772
|
+
/**
|
|
2773
|
+
* leave_employ_expire_record
|
|
2774
|
+
*/
|
|
2775
|
+
leaveEmployExpireRecord: {
|
|
2776
|
+
/**
|
|
2777
|
+
* {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_employ_expire_record&apiName=get&version=v1 click to debug }
|
|
2778
|
+
*
|
|
2779
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=attendance&resource=leave_employ_expire_record&version=v1 document }
|
|
2780
|
+
*/
|
|
2781
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2782
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2783
|
+
return this.httpInstance
|
|
2784
|
+
.request({
|
|
2785
|
+
url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`, path),
|
|
2786
|
+
method: "GET",
|
|
2787
|
+
data,
|
|
2788
|
+
params,
|
|
2789
|
+
headers,
|
|
2790
|
+
})
|
|
2791
|
+
.catch((e) => {
|
|
2792
|
+
this.logger.error(formatErrors(e));
|
|
2793
|
+
throw e;
|
|
2794
|
+
});
|
|
2795
|
+
}),
|
|
2796
|
+
},
|
|
2747
2797
|
/**
|
|
2748
2798
|
* 考勤班次
|
|
2749
2799
|
*/
|
|
@@ -6943,6 +6993,26 @@ class Client$1 {
|
|
|
6943
6993
|
* 部门
|
|
6944
6994
|
*/
|
|
6945
6995
|
department: {
|
|
6996
|
+
/**
|
|
6997
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=batch&version=v3 click to debug }
|
|
6998
|
+
*
|
|
6999
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=contact&resource=department&version=v3 document }
|
|
7000
|
+
*/
|
|
7001
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7002
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7003
|
+
return this.httpInstance
|
|
7004
|
+
.request({
|
|
7005
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/batch`, path),
|
|
7006
|
+
method: "GET",
|
|
7007
|
+
data,
|
|
7008
|
+
params,
|
|
7009
|
+
headers,
|
|
7010
|
+
})
|
|
7011
|
+
.catch((e) => {
|
|
7012
|
+
this.logger.error(formatErrors(e));
|
|
7013
|
+
throw e;
|
|
7014
|
+
});
|
|
7015
|
+
}),
|
|
6946
7016
|
childrenWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6947
7017
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6948
7018
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -8665,6 +8735,26 @@ class Client$1 {
|
|
|
8665
8735
|
* 用户
|
|
8666
8736
|
*/
|
|
8667
8737
|
user: {
|
|
8738
|
+
/**
|
|
8739
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=batch&version=v3 click to debug }
|
|
8740
|
+
*
|
|
8741
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=contact&resource=user&version=v3 document }
|
|
8742
|
+
*/
|
|
8743
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
8744
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
8745
|
+
return this.httpInstance
|
|
8746
|
+
.request({
|
|
8747
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/batch`, path),
|
|
8748
|
+
method: "GET",
|
|
8749
|
+
data,
|
|
8750
|
+
params,
|
|
8751
|
+
headers,
|
|
8752
|
+
})
|
|
8753
|
+
.catch((e) => {
|
|
8754
|
+
this.logger.error(formatErrors(e));
|
|
8755
|
+
throw e;
|
|
8756
|
+
});
|
|
8757
|
+
}),
|
|
8668
8758
|
/**
|
|
8669
8759
|
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=batch_get_id&version=v3 click to debug }
|
|
8670
8760
|
*
|
|
@@ -9000,24 +9090,24 @@ class Client$1 {
|
|
|
9000
9090
|
*/
|
|
9001
9091
|
this.corehr = {
|
|
9002
9092
|
/**
|
|
9003
|
-
*
|
|
9093
|
+
* assigned_user
|
|
9004
9094
|
*/
|
|
9005
|
-
|
|
9095
|
+
assignedUser: {
|
|
9006
9096
|
/**
|
|
9007
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
9097
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=assigned_user&apiName=search&version=v1 click to debug }
|
|
9008
9098
|
*
|
|
9009
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/
|
|
9099
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/assigned_user/search document }
|
|
9010
9100
|
*
|
|
9011
|
-
*
|
|
9101
|
+
* 获取组织类角色授权列表
|
|
9012
9102
|
*
|
|
9013
|
-
*
|
|
9103
|
+
* 查询组织类角色的授权信息
|
|
9014
9104
|
*/
|
|
9015
|
-
|
|
9105
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9016
9106
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9017
9107
|
return this.httpInstance
|
|
9018
9108
|
.request({
|
|
9019
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/
|
|
9020
|
-
method: "
|
|
9109
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/assigned_users/search`, path),
|
|
9110
|
+
method: "POST",
|
|
9021
9111
|
data,
|
|
9022
9112
|
params,
|
|
9023
9113
|
headers,
|
|
@@ -9028,38 +9118,25 @@ class Client$1 {
|
|
|
9028
9118
|
});
|
|
9029
9119
|
}),
|
|
9030
9120
|
},
|
|
9031
|
-
};
|
|
9032
|
-
/**
|
|
9033
|
-
|
|
9034
|
-
*/
|
|
9035
|
-
this.docs_tool = {};
|
|
9036
|
-
/**
|
|
9037
|
-
* 云文档-文档
|
|
9038
|
-
*/
|
|
9039
|
-
this.docx = {
|
|
9040
9121
|
/**
|
|
9041
|
-
*
|
|
9122
|
+
* 公司
|
|
9042
9123
|
*/
|
|
9043
|
-
|
|
9124
|
+
company: {
|
|
9044
9125
|
/**
|
|
9045
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9046
|
-
*
|
|
9047
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update document }
|
|
9048
|
-
*
|
|
9049
|
-
* 批量更新块
|
|
9126
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=create&version=v1 click to debug }
|
|
9050
9127
|
*
|
|
9051
|
-
*
|
|
9128
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/create document }
|
|
9052
9129
|
*
|
|
9053
|
-
*
|
|
9130
|
+
* 创建公司
|
|
9054
9131
|
*
|
|
9055
|
-
*
|
|
9132
|
+
* 创建公司
|
|
9056
9133
|
*/
|
|
9057
|
-
|
|
9134
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9058
9135
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9059
9136
|
return this.httpInstance
|
|
9060
9137
|
.request({
|
|
9061
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9062
|
-
method: "
|
|
9138
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path),
|
|
9139
|
+
method: "POST",
|
|
9063
9140
|
data,
|
|
9064
9141
|
params,
|
|
9065
9142
|
headers,
|
|
@@ -9070,24 +9147,20 @@ class Client$1 {
|
|
|
9070
9147
|
});
|
|
9071
9148
|
}),
|
|
9072
9149
|
/**
|
|
9073
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9074
|
-
*
|
|
9075
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get document }
|
|
9076
|
-
*
|
|
9077
|
-
* 获取块
|
|
9150
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=delete&version=v1 click to debug }
|
|
9078
9151
|
*
|
|
9079
|
-
*
|
|
9152
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/delete document }
|
|
9080
9153
|
*
|
|
9081
|
-
*
|
|
9154
|
+
* 删除公司
|
|
9082
9155
|
*
|
|
9083
|
-
*
|
|
9156
|
+
* 删除公司
|
|
9084
9157
|
*/
|
|
9085
|
-
|
|
9158
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9086
9159
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9087
9160
|
return this.httpInstance
|
|
9088
9161
|
.request({
|
|
9089
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9090
|
-
method: "
|
|
9162
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path),
|
|
9163
|
+
method: "DELETE",
|
|
9091
9164
|
data,
|
|
9092
9165
|
params,
|
|
9093
9166
|
headers,
|
|
@@ -9097,72 +9170,20 @@ class Client$1 {
|
|
|
9097
9170
|
throw e;
|
|
9098
9171
|
});
|
|
9099
9172
|
}),
|
|
9100
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9101
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9102
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
9103
|
-
const res = yield this.httpInstance
|
|
9104
|
-
.request({
|
|
9105
|
-
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path),
|
|
9106
|
-
method: "GET",
|
|
9107
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
9108
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
9109
|
-
})
|
|
9110
|
-
.catch((e) => {
|
|
9111
|
-
this.logger.error(formatErrors(e));
|
|
9112
|
-
});
|
|
9113
|
-
return res;
|
|
9114
|
-
});
|
|
9115
|
-
const Iterable = {
|
|
9116
|
-
[Symbol.asyncIterator]() {
|
|
9117
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
9118
|
-
let hasMore = true;
|
|
9119
|
-
let pageToken;
|
|
9120
|
-
while (hasMore) {
|
|
9121
|
-
try {
|
|
9122
|
-
const res = yield __await(sendRequest({
|
|
9123
|
-
headers,
|
|
9124
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
9125
|
-
data,
|
|
9126
|
-
}));
|
|
9127
|
-
const _b = get__default["default"](res, "data") || {}, {
|
|
9128
|
-
// @ts-ignore
|
|
9129
|
-
has_more,
|
|
9130
|
-
// @ts-ignore
|
|
9131
|
-
page_token,
|
|
9132
|
-
// @ts-ignore
|
|
9133
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
9134
|
-
yield yield __await(rest);
|
|
9135
|
-
hasMore = Boolean(has_more);
|
|
9136
|
-
pageToken = page_token || next_page_token;
|
|
9137
|
-
}
|
|
9138
|
-
catch (e) {
|
|
9139
|
-
yield yield __await(null);
|
|
9140
|
-
break;
|
|
9141
|
-
}
|
|
9142
|
-
}
|
|
9143
|
-
});
|
|
9144
|
-
},
|
|
9145
|
-
};
|
|
9146
|
-
return Iterable;
|
|
9147
|
-
}),
|
|
9148
9173
|
/**
|
|
9149
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9150
|
-
*
|
|
9151
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list document }
|
|
9152
|
-
*
|
|
9153
|
-
* 获取文档所有块
|
|
9174
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=get&version=v1 click to debug }
|
|
9154
9175
|
*
|
|
9155
|
-
*
|
|
9176
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/get document }
|
|
9156
9177
|
*
|
|
9157
|
-
*
|
|
9178
|
+
* 查询单个公司
|
|
9158
9179
|
*
|
|
9159
|
-
*
|
|
9180
|
+
* 根据 ID 查询单个公司
|
|
9160
9181
|
*/
|
|
9161
|
-
|
|
9182
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9162
9183
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9163
9184
|
return this.httpInstance
|
|
9164
9185
|
.request({
|
|
9165
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9186
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path),
|
|
9166
9187
|
method: "GET",
|
|
9167
9188
|
data,
|
|
9168
9189
|
params,
|
|
@@ -9174,24 +9195,20 @@ class Client$1 {
|
|
|
9174
9195
|
});
|
|
9175
9196
|
}),
|
|
9176
9197
|
/**
|
|
9177
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9178
|
-
*
|
|
9179
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch document }
|
|
9180
|
-
*
|
|
9181
|
-
* 更新块
|
|
9198
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=list&version=v1 click to debug }
|
|
9182
9199
|
*
|
|
9183
|
-
*
|
|
9200
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list document }
|
|
9184
9201
|
*
|
|
9185
|
-
*
|
|
9202
|
+
* 批量查询公司
|
|
9186
9203
|
*
|
|
9187
|
-
*
|
|
9204
|
+
* 批量查询公司
|
|
9188
9205
|
*/
|
|
9189
|
-
|
|
9206
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9190
9207
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9191
9208
|
return this.httpInstance
|
|
9192
9209
|
.request({
|
|
9193
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9194
|
-
method: "
|
|
9210
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path),
|
|
9211
|
+
method: "GET",
|
|
9195
9212
|
data,
|
|
9196
9213
|
params,
|
|
9197
9214
|
headers,
|
|
@@ -9203,27 +9220,47 @@ class Client$1 {
|
|
|
9203
9220
|
}),
|
|
9204
9221
|
},
|
|
9205
9222
|
/**
|
|
9206
|
-
*
|
|
9223
|
+
* 合同
|
|
9207
9224
|
*/
|
|
9208
|
-
|
|
9225
|
+
contract: {
|
|
9209
9226
|
/**
|
|
9210
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9227
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=create&version=v1 click to debug }
|
|
9211
9228
|
*
|
|
9212
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
9229
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/create document }
|
|
9213
9230
|
*
|
|
9214
|
-
*
|
|
9231
|
+
* 创建合同
|
|
9215
9232
|
*
|
|
9216
|
-
*
|
|
9233
|
+
* 创建合同
|
|
9234
|
+
*/
|
|
9235
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9236
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9237
|
+
return this.httpInstance
|
|
9238
|
+
.request({
|
|
9239
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path),
|
|
9240
|
+
method: "POST",
|
|
9241
|
+
data,
|
|
9242
|
+
params,
|
|
9243
|
+
headers,
|
|
9244
|
+
})
|
|
9245
|
+
.catch((e) => {
|
|
9246
|
+
this.logger.error(formatErrors(e));
|
|
9247
|
+
throw e;
|
|
9248
|
+
});
|
|
9249
|
+
}),
|
|
9250
|
+
/**
|
|
9251
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=delete&version=v1 click to debug }
|
|
9217
9252
|
*
|
|
9218
|
-
*
|
|
9253
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/delete document }
|
|
9219
9254
|
*
|
|
9220
|
-
*
|
|
9255
|
+
* 删除合同
|
|
9256
|
+
*
|
|
9257
|
+
* 删除合同
|
|
9221
9258
|
*/
|
|
9222
|
-
|
|
9259
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9223
9260
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9224
9261
|
return this.httpInstance
|
|
9225
9262
|
.request({
|
|
9226
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9263
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path),
|
|
9227
9264
|
method: "DELETE",
|
|
9228
9265
|
data,
|
|
9229
9266
|
params,
|
|
@@ -9235,24 +9272,44 @@ class Client$1 {
|
|
|
9235
9272
|
});
|
|
9236
9273
|
}),
|
|
9237
9274
|
/**
|
|
9238
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9275
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=get&version=v1 click to debug }
|
|
9239
9276
|
*
|
|
9240
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
9277
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/get document }
|
|
9241
9278
|
*
|
|
9242
|
-
*
|
|
9279
|
+
* 查询单个合同
|
|
9243
9280
|
*
|
|
9244
|
-
*
|
|
9281
|
+
* 根据 ID 查询单个合同
|
|
9282
|
+
*/
|
|
9283
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9284
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9285
|
+
return this.httpInstance
|
|
9286
|
+
.request({
|
|
9287
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path),
|
|
9288
|
+
method: "GET",
|
|
9289
|
+
data,
|
|
9290
|
+
params,
|
|
9291
|
+
headers,
|
|
9292
|
+
})
|
|
9293
|
+
.catch((e) => {
|
|
9294
|
+
this.logger.error(formatErrors(e));
|
|
9295
|
+
throw e;
|
|
9296
|
+
});
|
|
9297
|
+
}),
|
|
9298
|
+
/**
|
|
9299
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=list&version=v1 click to debug }
|
|
9245
9300
|
*
|
|
9246
|
-
*
|
|
9301
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/list document }
|
|
9247
9302
|
*
|
|
9248
|
-
*
|
|
9303
|
+
* 批量查询合同
|
|
9304
|
+
*
|
|
9305
|
+
* 批量查询合同
|
|
9249
9306
|
*/
|
|
9250
|
-
|
|
9307
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9251
9308
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9252
9309
|
return this.httpInstance
|
|
9253
9310
|
.request({
|
|
9254
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9255
|
-
method: "
|
|
9311
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path),
|
|
9312
|
+
method: "GET",
|
|
9256
9313
|
data,
|
|
9257
9314
|
params,
|
|
9258
9315
|
headers,
|
|
@@ -9262,9 +9319,2376 @@ class Client$1 {
|
|
|
9262
9319
|
throw e;
|
|
9263
9320
|
});
|
|
9264
9321
|
}),
|
|
9265
|
-
|
|
9322
|
+
/**
|
|
9323
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=patch&version=v1 click to debug }
|
|
9324
|
+
*
|
|
9325
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/patch document }
|
|
9326
|
+
*
|
|
9327
|
+
* 更新合同
|
|
9328
|
+
*
|
|
9329
|
+
* 更新合同
|
|
9330
|
+
*/
|
|
9331
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9266
9332
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9267
|
-
|
|
9333
|
+
return this.httpInstance
|
|
9334
|
+
.request({
|
|
9335
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path),
|
|
9336
|
+
method: "PATCH",
|
|
9337
|
+
data,
|
|
9338
|
+
params,
|
|
9339
|
+
headers,
|
|
9340
|
+
})
|
|
9341
|
+
.catch((e) => {
|
|
9342
|
+
this.logger.error(formatErrors(e));
|
|
9343
|
+
throw e;
|
|
9344
|
+
});
|
|
9345
|
+
}),
|
|
9346
|
+
},
|
|
9347
|
+
/**
|
|
9348
|
+
* 地理库信息
|
|
9349
|
+
*/
|
|
9350
|
+
countryRegion: {
|
|
9351
|
+
/**
|
|
9352
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=get&version=v1 click to debug }
|
|
9353
|
+
*
|
|
9354
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/get document }
|
|
9355
|
+
*
|
|
9356
|
+
* 查询单条国家/地区信息
|
|
9357
|
+
*
|
|
9358
|
+
* 查询单条国家/地区信息
|
|
9359
|
+
*/
|
|
9360
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9361
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9362
|
+
return this.httpInstance
|
|
9363
|
+
.request({
|
|
9364
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`, path),
|
|
9365
|
+
method: "GET",
|
|
9366
|
+
data,
|
|
9367
|
+
params,
|
|
9368
|
+
headers,
|
|
9369
|
+
})
|
|
9370
|
+
.catch((e) => {
|
|
9371
|
+
this.logger.error(formatErrors(e));
|
|
9372
|
+
throw e;
|
|
9373
|
+
});
|
|
9374
|
+
}),
|
|
9375
|
+
/**
|
|
9376
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=list&version=v1 click to debug }
|
|
9377
|
+
*
|
|
9378
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/list document }
|
|
9379
|
+
*
|
|
9380
|
+
* 批量查询国家/地区信息
|
|
9381
|
+
*
|
|
9382
|
+
* 批量查询国家/地区信息
|
|
9383
|
+
*/
|
|
9384
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9385
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9386
|
+
return this.httpInstance
|
|
9387
|
+
.request({
|
|
9388
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions`, path),
|
|
9389
|
+
method: "GET",
|
|
9390
|
+
data,
|
|
9391
|
+
params,
|
|
9392
|
+
headers,
|
|
9393
|
+
})
|
|
9394
|
+
.catch((e) => {
|
|
9395
|
+
this.logger.error(formatErrors(e));
|
|
9396
|
+
throw e;
|
|
9397
|
+
});
|
|
9398
|
+
}),
|
|
9399
|
+
},
|
|
9400
|
+
/**
|
|
9401
|
+
* 货币信息
|
|
9402
|
+
*/
|
|
9403
|
+
currency: {
|
|
9404
|
+
/**
|
|
9405
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=get&version=v1 click to debug }
|
|
9406
|
+
*
|
|
9407
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/get document }
|
|
9408
|
+
*
|
|
9409
|
+
* 查询单个货币信息
|
|
9410
|
+
*
|
|
9411
|
+
* 查询单个货币信息
|
|
9412
|
+
*/
|
|
9413
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9414
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9415
|
+
return this.httpInstance
|
|
9416
|
+
.request({
|
|
9417
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`, path),
|
|
9418
|
+
method: "GET",
|
|
9419
|
+
data,
|
|
9420
|
+
params,
|
|
9421
|
+
headers,
|
|
9422
|
+
})
|
|
9423
|
+
.catch((e) => {
|
|
9424
|
+
this.logger.error(formatErrors(e));
|
|
9425
|
+
throw e;
|
|
9426
|
+
});
|
|
9427
|
+
}),
|
|
9428
|
+
/**
|
|
9429
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=list&version=v1 click to debug }
|
|
9430
|
+
*
|
|
9431
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/list document }
|
|
9432
|
+
*
|
|
9433
|
+
* 批量查询货币信息
|
|
9434
|
+
*
|
|
9435
|
+
* 批量查询货币信息
|
|
9436
|
+
*/
|
|
9437
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9438
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9439
|
+
return this.httpInstance
|
|
9440
|
+
.request({
|
|
9441
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies`, path),
|
|
9442
|
+
method: "GET",
|
|
9443
|
+
data,
|
|
9444
|
+
params,
|
|
9445
|
+
headers,
|
|
9446
|
+
})
|
|
9447
|
+
.catch((e) => {
|
|
9448
|
+
this.logger.error(formatErrors(e));
|
|
9449
|
+
throw e;
|
|
9450
|
+
});
|
|
9451
|
+
}),
|
|
9452
|
+
},
|
|
9453
|
+
/**
|
|
9454
|
+
* 自定义字段
|
|
9455
|
+
*/
|
|
9456
|
+
customField: {
|
|
9457
|
+
/**
|
|
9458
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=get_by_param&version=v1 click to debug }
|
|
9459
|
+
*
|
|
9460
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/get_by_param document }
|
|
9461
|
+
*
|
|
9462
|
+
* 获取自定义字段详情
|
|
9463
|
+
*
|
|
9464
|
+
* 获取「飞书人事」具体对象下某自定义字段的详细信息
|
|
9465
|
+
*/
|
|
9466
|
+
getByParam: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9467
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9468
|
+
return this.httpInstance
|
|
9469
|
+
.request({
|
|
9470
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`, path),
|
|
9471
|
+
method: "GET",
|
|
9472
|
+
data,
|
|
9473
|
+
params,
|
|
9474
|
+
headers,
|
|
9475
|
+
})
|
|
9476
|
+
.catch((e) => {
|
|
9477
|
+
this.logger.error(formatErrors(e));
|
|
9478
|
+
throw e;
|
|
9479
|
+
});
|
|
9480
|
+
}),
|
|
9481
|
+
/**
|
|
9482
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=list_object_api_name&version=v1 click to debug }
|
|
9483
|
+
*
|
|
9484
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/list_object_api_name document }
|
|
9485
|
+
*
|
|
9486
|
+
* 获取飞书人事对象列表
|
|
9487
|
+
*
|
|
9488
|
+
* 获取「飞书人事」中的对象列表,含系统预置对象与自定义对象
|
|
9489
|
+
*/
|
|
9490
|
+
listObjectApiName: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9491
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9492
|
+
return this.httpInstance
|
|
9493
|
+
.request({
|
|
9494
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`, path),
|
|
9495
|
+
method: "GET",
|
|
9496
|
+
data,
|
|
9497
|
+
params,
|
|
9498
|
+
headers,
|
|
9499
|
+
})
|
|
9500
|
+
.catch((e) => {
|
|
9501
|
+
this.logger.error(formatErrors(e));
|
|
9502
|
+
throw e;
|
|
9503
|
+
});
|
|
9504
|
+
}),
|
|
9505
|
+
/**
|
|
9506
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=query&version=v1 click to debug }
|
|
9507
|
+
*
|
|
9508
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/query document }
|
|
9509
|
+
*
|
|
9510
|
+
* 获取自定义字段列表
|
|
9511
|
+
*
|
|
9512
|
+
* 获取「飞书人事」具体对象下的自定义字段列表
|
|
9513
|
+
*/
|
|
9514
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9515
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9516
|
+
return this.httpInstance
|
|
9517
|
+
.request({
|
|
9518
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/query`, path),
|
|
9519
|
+
method: "GET",
|
|
9520
|
+
data,
|
|
9521
|
+
params,
|
|
9522
|
+
headers,
|
|
9523
|
+
})
|
|
9524
|
+
.catch((e) => {
|
|
9525
|
+
this.logger.error(formatErrors(e));
|
|
9526
|
+
throw e;
|
|
9527
|
+
});
|
|
9528
|
+
}),
|
|
9529
|
+
},
|
|
9530
|
+
/**
|
|
9531
|
+
* 部门
|
|
9532
|
+
*/
|
|
9533
|
+
department: {
|
|
9534
|
+
/**
|
|
9535
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=create&version=v1 click to debug }
|
|
9536
|
+
*
|
|
9537
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/create document }
|
|
9538
|
+
*
|
|
9539
|
+
* 创建部门
|
|
9540
|
+
*
|
|
9541
|
+
* 创建部门
|
|
9542
|
+
*/
|
|
9543
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9544
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9545
|
+
return this.httpInstance
|
|
9546
|
+
.request({
|
|
9547
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path),
|
|
9548
|
+
method: "POST",
|
|
9549
|
+
data,
|
|
9550
|
+
params,
|
|
9551
|
+
headers,
|
|
9552
|
+
})
|
|
9553
|
+
.catch((e) => {
|
|
9554
|
+
this.logger.error(formatErrors(e));
|
|
9555
|
+
throw e;
|
|
9556
|
+
});
|
|
9557
|
+
}),
|
|
9558
|
+
/**
|
|
9559
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v1 click to debug }
|
|
9560
|
+
*
|
|
9561
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/delete document }
|
|
9562
|
+
*
|
|
9563
|
+
* 删除部门
|
|
9564
|
+
*
|
|
9565
|
+
* 删除部门
|
|
9566
|
+
*/
|
|
9567
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9568
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9569
|
+
return this.httpInstance
|
|
9570
|
+
.request({
|
|
9571
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path),
|
|
9572
|
+
method: "DELETE",
|
|
9573
|
+
data,
|
|
9574
|
+
params,
|
|
9575
|
+
headers,
|
|
9576
|
+
})
|
|
9577
|
+
.catch((e) => {
|
|
9578
|
+
this.logger.error(formatErrors(e));
|
|
9579
|
+
throw e;
|
|
9580
|
+
});
|
|
9581
|
+
}),
|
|
9582
|
+
/**
|
|
9583
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=get&version=v1 click to debug }
|
|
9584
|
+
*
|
|
9585
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/get document }
|
|
9586
|
+
*
|
|
9587
|
+
* 查询单个部门
|
|
9588
|
+
*
|
|
9589
|
+
* 根据 ID 查询单个部门
|
|
9590
|
+
*/
|
|
9591
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9592
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9593
|
+
return this.httpInstance
|
|
9594
|
+
.request({
|
|
9595
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path),
|
|
9596
|
+
method: "GET",
|
|
9597
|
+
data,
|
|
9598
|
+
params,
|
|
9599
|
+
headers,
|
|
9600
|
+
})
|
|
9601
|
+
.catch((e) => {
|
|
9602
|
+
this.logger.error(formatErrors(e));
|
|
9603
|
+
throw e;
|
|
9604
|
+
});
|
|
9605
|
+
}),
|
|
9606
|
+
/**
|
|
9607
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=list&version=v1 click to debug }
|
|
9608
|
+
*
|
|
9609
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/list document }
|
|
9610
|
+
*
|
|
9611
|
+
* 批量查询部门
|
|
9612
|
+
*
|
|
9613
|
+
* 批量查询部门
|
|
9614
|
+
*/
|
|
9615
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9616
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9617
|
+
return this.httpInstance
|
|
9618
|
+
.request({
|
|
9619
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path),
|
|
9620
|
+
method: "GET",
|
|
9621
|
+
data,
|
|
9622
|
+
params,
|
|
9623
|
+
headers,
|
|
9624
|
+
})
|
|
9625
|
+
.catch((e) => {
|
|
9626
|
+
this.logger.error(formatErrors(e));
|
|
9627
|
+
throw e;
|
|
9628
|
+
});
|
|
9629
|
+
}),
|
|
9630
|
+
/**
|
|
9631
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v1 click to debug }
|
|
9632
|
+
*
|
|
9633
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/patch document }
|
|
9634
|
+
*
|
|
9635
|
+
* 更新部门
|
|
9636
|
+
*
|
|
9637
|
+
* 更新部门
|
|
9638
|
+
*/
|
|
9639
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9640
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9641
|
+
return this.httpInstance
|
|
9642
|
+
.request({
|
|
9643
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path),
|
|
9644
|
+
method: "PATCH",
|
|
9645
|
+
data,
|
|
9646
|
+
params,
|
|
9647
|
+
headers,
|
|
9648
|
+
})
|
|
9649
|
+
.catch((e) => {
|
|
9650
|
+
this.logger.error(formatErrors(e));
|
|
9651
|
+
throw e;
|
|
9652
|
+
});
|
|
9653
|
+
}),
|
|
9654
|
+
},
|
|
9655
|
+
/**
|
|
9656
|
+
* 人员类型
|
|
9657
|
+
*/
|
|
9658
|
+
employeeType: {
|
|
9659
|
+
/**
|
|
9660
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=create&version=v1 click to debug }
|
|
9661
|
+
*
|
|
9662
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/create document }
|
|
9663
|
+
*
|
|
9664
|
+
* 创建人员类型
|
|
9665
|
+
*
|
|
9666
|
+
* 创建人员类型
|
|
9667
|
+
*/
|
|
9668
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9669
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9670
|
+
return this.httpInstance
|
|
9671
|
+
.request({
|
|
9672
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path),
|
|
9673
|
+
method: "POST",
|
|
9674
|
+
data,
|
|
9675
|
+
params,
|
|
9676
|
+
headers,
|
|
9677
|
+
})
|
|
9678
|
+
.catch((e) => {
|
|
9679
|
+
this.logger.error(formatErrors(e));
|
|
9680
|
+
throw e;
|
|
9681
|
+
});
|
|
9682
|
+
}),
|
|
9683
|
+
/**
|
|
9684
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=delete&version=v1 click to debug }
|
|
9685
|
+
*
|
|
9686
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/delete document }
|
|
9687
|
+
*
|
|
9688
|
+
* 删除人员类型
|
|
9689
|
+
*
|
|
9690
|
+
* 删除人员类型
|
|
9691
|
+
*/
|
|
9692
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9693
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9694
|
+
return this.httpInstance
|
|
9695
|
+
.request({
|
|
9696
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path),
|
|
9697
|
+
method: "DELETE",
|
|
9698
|
+
data,
|
|
9699
|
+
params,
|
|
9700
|
+
headers,
|
|
9701
|
+
})
|
|
9702
|
+
.catch((e) => {
|
|
9703
|
+
this.logger.error(formatErrors(e));
|
|
9704
|
+
throw e;
|
|
9705
|
+
});
|
|
9706
|
+
}),
|
|
9707
|
+
/**
|
|
9708
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=get&version=v1 click to debug }
|
|
9709
|
+
*
|
|
9710
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/get document }
|
|
9711
|
+
*
|
|
9712
|
+
* 查询单个人员类型
|
|
9713
|
+
*
|
|
9714
|
+
* 根据 ID 查询单个人员类型
|
|
9715
|
+
*/
|
|
9716
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9717
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9718
|
+
return this.httpInstance
|
|
9719
|
+
.request({
|
|
9720
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path),
|
|
9721
|
+
method: "GET",
|
|
9722
|
+
data,
|
|
9723
|
+
params,
|
|
9724
|
+
headers,
|
|
9725
|
+
})
|
|
9726
|
+
.catch((e) => {
|
|
9727
|
+
this.logger.error(formatErrors(e));
|
|
9728
|
+
throw e;
|
|
9729
|
+
});
|
|
9730
|
+
}),
|
|
9731
|
+
/**
|
|
9732
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=list&version=v1 click to debug }
|
|
9733
|
+
*
|
|
9734
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list document }
|
|
9735
|
+
*
|
|
9736
|
+
* 批量查询人员类型
|
|
9737
|
+
*
|
|
9738
|
+
* 批量查询人员类型
|
|
9739
|
+
*/
|
|
9740
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9741
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9742
|
+
return this.httpInstance
|
|
9743
|
+
.request({
|
|
9744
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path),
|
|
9745
|
+
method: "GET",
|
|
9746
|
+
data,
|
|
9747
|
+
params,
|
|
9748
|
+
headers,
|
|
9749
|
+
})
|
|
9750
|
+
.catch((e) => {
|
|
9751
|
+
this.logger.error(formatErrors(e));
|
|
9752
|
+
throw e;
|
|
9753
|
+
});
|
|
9754
|
+
}),
|
|
9755
|
+
/**
|
|
9756
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=patch&version=v1 click to debug }
|
|
9757
|
+
*
|
|
9758
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/patch document }
|
|
9759
|
+
*
|
|
9760
|
+
* 更新人员类型数据
|
|
9761
|
+
*
|
|
9762
|
+
* 更新人员类型数据
|
|
9763
|
+
*/
|
|
9764
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9765
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9766
|
+
return this.httpInstance
|
|
9767
|
+
.request({
|
|
9768
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path),
|
|
9769
|
+
method: "PATCH",
|
|
9770
|
+
data,
|
|
9771
|
+
params,
|
|
9772
|
+
headers,
|
|
9773
|
+
})
|
|
9774
|
+
.catch((e) => {
|
|
9775
|
+
this.logger.error(formatErrors(e));
|
|
9776
|
+
throw e;
|
|
9777
|
+
});
|
|
9778
|
+
}),
|
|
9779
|
+
},
|
|
9780
|
+
/**
|
|
9781
|
+
* 雇佣信息
|
|
9782
|
+
*/
|
|
9783
|
+
employment: {
|
|
9784
|
+
/**
|
|
9785
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=create&version=v1 click to debug }
|
|
9786
|
+
*
|
|
9787
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/create document }
|
|
9788
|
+
*
|
|
9789
|
+
* 创建雇佣信息
|
|
9790
|
+
*
|
|
9791
|
+
* 创建人员的雇佣信息
|
|
9792
|
+
*/
|
|
9793
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9794
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9795
|
+
return this.httpInstance
|
|
9796
|
+
.request({
|
|
9797
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments`, path),
|
|
9798
|
+
method: "POST",
|
|
9799
|
+
data,
|
|
9800
|
+
params,
|
|
9801
|
+
headers,
|
|
9802
|
+
})
|
|
9803
|
+
.catch((e) => {
|
|
9804
|
+
this.logger.error(formatErrors(e));
|
|
9805
|
+
throw e;
|
|
9806
|
+
});
|
|
9807
|
+
}),
|
|
9808
|
+
/**
|
|
9809
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=delete&version=v1 click to debug }
|
|
9810
|
+
*
|
|
9811
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/delete document }
|
|
9812
|
+
*
|
|
9813
|
+
* 删除雇佣信息
|
|
9814
|
+
*
|
|
9815
|
+
* 删除人员的雇佣信息
|
|
9816
|
+
*/
|
|
9817
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9818
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9819
|
+
return this.httpInstance
|
|
9820
|
+
.request({
|
|
9821
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path),
|
|
9822
|
+
method: "DELETE",
|
|
9823
|
+
data,
|
|
9824
|
+
params,
|
|
9825
|
+
headers,
|
|
9826
|
+
})
|
|
9827
|
+
.catch((e) => {
|
|
9828
|
+
this.logger.error(formatErrors(e));
|
|
9829
|
+
throw e;
|
|
9830
|
+
});
|
|
9831
|
+
}),
|
|
9832
|
+
/**
|
|
9833
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=patch&version=v1 click to debug }
|
|
9834
|
+
*
|
|
9835
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/patch document }
|
|
9836
|
+
*
|
|
9837
|
+
* 更新雇佣信息
|
|
9838
|
+
*
|
|
9839
|
+
* 更新雇佣信息
|
|
9840
|
+
*/
|
|
9841
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9842
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9843
|
+
return this.httpInstance
|
|
9844
|
+
.request({
|
|
9845
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path),
|
|
9846
|
+
method: "PATCH",
|
|
9847
|
+
data,
|
|
9848
|
+
params,
|
|
9849
|
+
headers,
|
|
9850
|
+
})
|
|
9851
|
+
.catch((e) => {
|
|
9852
|
+
this.logger.error(formatErrors(e));
|
|
9853
|
+
throw e;
|
|
9854
|
+
});
|
|
9855
|
+
}),
|
|
9856
|
+
},
|
|
9857
|
+
/**
|
|
9858
|
+
* file
|
|
9859
|
+
*/
|
|
9860
|
+
file: {
|
|
9861
|
+
/**
|
|
9862
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=file&apiName=get&version=v1 click to debug }
|
|
9863
|
+
*
|
|
9864
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=file&version=v1 document }
|
|
9865
|
+
*/
|
|
9866
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9867
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9868
|
+
const res = yield this.httpInstance
|
|
9869
|
+
.request({
|
|
9870
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/files/:id`, path),
|
|
9871
|
+
method: "GET",
|
|
9872
|
+
headers,
|
|
9873
|
+
data,
|
|
9874
|
+
params,
|
|
9875
|
+
responseType: "stream",
|
|
9876
|
+
})
|
|
9877
|
+
.catch((e) => {
|
|
9878
|
+
this.logger.error(formatErrors(e));
|
|
9879
|
+
throw e;
|
|
9880
|
+
});
|
|
9881
|
+
return {
|
|
9882
|
+
writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
9883
|
+
return new Promise((resolve, reject) => {
|
|
9884
|
+
const writableStream = fs__default["default"].createWriteStream(filePath);
|
|
9885
|
+
writableStream.on("finish", () => {
|
|
9886
|
+
resolve(filePath);
|
|
9887
|
+
});
|
|
9888
|
+
writableStream.on("error", (e) => {
|
|
9889
|
+
reject(e);
|
|
9890
|
+
});
|
|
9891
|
+
res.pipe(writableStream);
|
|
9892
|
+
});
|
|
9893
|
+
}),
|
|
9894
|
+
};
|
|
9895
|
+
}),
|
|
9896
|
+
},
|
|
9897
|
+
/**
|
|
9898
|
+
* 职务
|
|
9899
|
+
*/
|
|
9900
|
+
job: {
|
|
9901
|
+
/**
|
|
9902
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=create&version=v1 click to debug }
|
|
9903
|
+
*
|
|
9904
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/create document }
|
|
9905
|
+
*
|
|
9906
|
+
* 创建职务
|
|
9907
|
+
*
|
|
9908
|
+
* 创建职务
|
|
9909
|
+
*/
|
|
9910
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9911
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9912
|
+
return this.httpInstance
|
|
9913
|
+
.request({
|
|
9914
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path),
|
|
9915
|
+
method: "POST",
|
|
9916
|
+
data,
|
|
9917
|
+
params,
|
|
9918
|
+
headers,
|
|
9919
|
+
})
|
|
9920
|
+
.catch((e) => {
|
|
9921
|
+
this.logger.error(formatErrors(e));
|
|
9922
|
+
throw e;
|
|
9923
|
+
});
|
|
9924
|
+
}),
|
|
9925
|
+
/**
|
|
9926
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=delete&version=v1 click to debug }
|
|
9927
|
+
*
|
|
9928
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/delete document }
|
|
9929
|
+
*
|
|
9930
|
+
* 删除职务
|
|
9931
|
+
*
|
|
9932
|
+
* 删除职务
|
|
9933
|
+
*/
|
|
9934
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9935
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9936
|
+
return this.httpInstance
|
|
9937
|
+
.request({
|
|
9938
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path),
|
|
9939
|
+
method: "DELETE",
|
|
9940
|
+
data,
|
|
9941
|
+
params,
|
|
9942
|
+
headers,
|
|
9943
|
+
})
|
|
9944
|
+
.catch((e) => {
|
|
9945
|
+
this.logger.error(formatErrors(e));
|
|
9946
|
+
throw e;
|
|
9947
|
+
});
|
|
9948
|
+
}),
|
|
9949
|
+
/**
|
|
9950
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v1 click to debug }
|
|
9951
|
+
*
|
|
9952
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/get document }
|
|
9953
|
+
*
|
|
9954
|
+
* 查询单个职务
|
|
9955
|
+
*
|
|
9956
|
+
* 根据 ID 查询单个职务
|
|
9957
|
+
*/
|
|
9958
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9959
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9960
|
+
return this.httpInstance
|
|
9961
|
+
.request({
|
|
9962
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path),
|
|
9963
|
+
method: "GET",
|
|
9964
|
+
data,
|
|
9965
|
+
params,
|
|
9966
|
+
headers,
|
|
9967
|
+
})
|
|
9968
|
+
.catch((e) => {
|
|
9969
|
+
this.logger.error(formatErrors(e));
|
|
9970
|
+
throw e;
|
|
9971
|
+
});
|
|
9972
|
+
}),
|
|
9973
|
+
/**
|
|
9974
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v1 click to debug }
|
|
9975
|
+
*
|
|
9976
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/list document }
|
|
9977
|
+
*
|
|
9978
|
+
* 批量查询职务
|
|
9979
|
+
*
|
|
9980
|
+
* 批量查询职务
|
|
9981
|
+
*/
|
|
9982
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9983
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9984
|
+
return this.httpInstance
|
|
9985
|
+
.request({
|
|
9986
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path),
|
|
9987
|
+
method: "GET",
|
|
9988
|
+
data,
|
|
9989
|
+
params,
|
|
9990
|
+
headers,
|
|
9991
|
+
})
|
|
9992
|
+
.catch((e) => {
|
|
9993
|
+
this.logger.error(formatErrors(e));
|
|
9994
|
+
throw e;
|
|
9995
|
+
});
|
|
9996
|
+
}),
|
|
9997
|
+
/**
|
|
9998
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=patch&version=v1 click to debug }
|
|
9999
|
+
*
|
|
10000
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/patch document }
|
|
10001
|
+
*
|
|
10002
|
+
* 更新职务
|
|
10003
|
+
*
|
|
10004
|
+
* 更新职务
|
|
10005
|
+
*/
|
|
10006
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10007
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10008
|
+
return this.httpInstance
|
|
10009
|
+
.request({
|
|
10010
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path),
|
|
10011
|
+
method: "PATCH",
|
|
10012
|
+
data,
|
|
10013
|
+
params,
|
|
10014
|
+
headers,
|
|
10015
|
+
})
|
|
10016
|
+
.catch((e) => {
|
|
10017
|
+
this.logger.error(formatErrors(e));
|
|
10018
|
+
throw e;
|
|
10019
|
+
});
|
|
10020
|
+
}),
|
|
10021
|
+
},
|
|
10022
|
+
/**
|
|
10023
|
+
* 异动信息
|
|
10024
|
+
*/
|
|
10025
|
+
jobChange: {
|
|
10026
|
+
/**
|
|
10027
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v1 click to debug }
|
|
10028
|
+
*
|
|
10029
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_change/create document }
|
|
10030
|
+
*
|
|
10031
|
+
* 发起员工异动
|
|
10032
|
+
*
|
|
10033
|
+
* 创建员工异动信息
|
|
10034
|
+
*/
|
|
10035
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10036
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10037
|
+
return this.httpInstance
|
|
10038
|
+
.request({
|
|
10039
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_changes`, path),
|
|
10040
|
+
method: "POST",
|
|
10041
|
+
data,
|
|
10042
|
+
params,
|
|
10043
|
+
headers,
|
|
10044
|
+
})
|
|
10045
|
+
.catch((e) => {
|
|
10046
|
+
this.logger.error(formatErrors(e));
|
|
10047
|
+
throw e;
|
|
10048
|
+
});
|
|
10049
|
+
}),
|
|
10050
|
+
},
|
|
10051
|
+
/**
|
|
10052
|
+
* 任职信息
|
|
10053
|
+
*/
|
|
10054
|
+
jobData: {
|
|
10055
|
+
/**
|
|
10056
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=create&version=v1 click to debug }
|
|
10057
|
+
*
|
|
10058
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/create document }
|
|
10059
|
+
*
|
|
10060
|
+
* 创建任职信息
|
|
10061
|
+
*
|
|
10062
|
+
* 在系统中第一次创建员工任职数据,通常在员工入职或者做数据批量导入的时候使用,【任职原因】只支持填写“入职”
|
|
10063
|
+
*/
|
|
10064
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10065
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10066
|
+
return this.httpInstance
|
|
10067
|
+
.request({
|
|
10068
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path),
|
|
10069
|
+
method: "POST",
|
|
10070
|
+
data,
|
|
10071
|
+
params,
|
|
10072
|
+
headers,
|
|
10073
|
+
})
|
|
10074
|
+
.catch((e) => {
|
|
10075
|
+
this.logger.error(formatErrors(e));
|
|
10076
|
+
throw e;
|
|
10077
|
+
});
|
|
10078
|
+
}),
|
|
10079
|
+
/**
|
|
10080
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=delete&version=v1 click to debug }
|
|
10081
|
+
*
|
|
10082
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/delete document }
|
|
10083
|
+
*
|
|
10084
|
+
* 删除任职信息
|
|
10085
|
+
*
|
|
10086
|
+
* 删除人员的任职信息
|
|
10087
|
+
*/
|
|
10088
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10089
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10090
|
+
return this.httpInstance
|
|
10091
|
+
.request({
|
|
10092
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path),
|
|
10093
|
+
method: "DELETE",
|
|
10094
|
+
data,
|
|
10095
|
+
params,
|
|
10096
|
+
headers,
|
|
10097
|
+
})
|
|
10098
|
+
.catch((e) => {
|
|
10099
|
+
this.logger.error(formatErrors(e));
|
|
10100
|
+
throw e;
|
|
10101
|
+
});
|
|
10102
|
+
}),
|
|
10103
|
+
/**
|
|
10104
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=get&version=v1 click to debug }
|
|
10105
|
+
*
|
|
10106
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/get document }
|
|
10107
|
+
*
|
|
10108
|
+
* 查询单个任职信息
|
|
10109
|
+
*
|
|
10110
|
+
* 根据 ID 查询单任职信息
|
|
10111
|
+
*/
|
|
10112
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10113
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10114
|
+
return this.httpInstance
|
|
10115
|
+
.request({
|
|
10116
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path),
|
|
10117
|
+
method: "GET",
|
|
10118
|
+
data,
|
|
10119
|
+
params,
|
|
10120
|
+
headers,
|
|
10121
|
+
})
|
|
10122
|
+
.catch((e) => {
|
|
10123
|
+
this.logger.error(formatErrors(e));
|
|
10124
|
+
throw e;
|
|
10125
|
+
});
|
|
10126
|
+
}),
|
|
10127
|
+
/**
|
|
10128
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=list&version=v1 click to debug }
|
|
10129
|
+
*
|
|
10130
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/list document }
|
|
10131
|
+
*
|
|
10132
|
+
* 批量查询任职信息
|
|
10133
|
+
*
|
|
10134
|
+
* 批量查询人员的任职信息
|
|
10135
|
+
*/
|
|
10136
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10137
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10138
|
+
return this.httpInstance
|
|
10139
|
+
.request({
|
|
10140
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path),
|
|
10141
|
+
method: "GET",
|
|
10142
|
+
data,
|
|
10143
|
+
params,
|
|
10144
|
+
headers,
|
|
10145
|
+
})
|
|
10146
|
+
.catch((e) => {
|
|
10147
|
+
this.logger.error(formatErrors(e));
|
|
10148
|
+
throw e;
|
|
10149
|
+
});
|
|
10150
|
+
}),
|
|
10151
|
+
/**
|
|
10152
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=patch&version=v1 click to debug }
|
|
10153
|
+
*
|
|
10154
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/patch document }
|
|
10155
|
+
*
|
|
10156
|
+
* 更新任职信息
|
|
10157
|
+
*
|
|
10158
|
+
* 更新任职信息
|
|
10159
|
+
*/
|
|
10160
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10161
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10162
|
+
return this.httpInstance
|
|
10163
|
+
.request({
|
|
10164
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path),
|
|
10165
|
+
method: "PATCH",
|
|
10166
|
+
data,
|
|
10167
|
+
params,
|
|
10168
|
+
headers,
|
|
10169
|
+
})
|
|
10170
|
+
.catch((e) => {
|
|
10171
|
+
this.logger.error(formatErrors(e));
|
|
10172
|
+
throw e;
|
|
10173
|
+
});
|
|
10174
|
+
}),
|
|
10175
|
+
},
|
|
10176
|
+
/**
|
|
10177
|
+
* 职务序列
|
|
10178
|
+
*/
|
|
10179
|
+
jobFamily: {
|
|
10180
|
+
/**
|
|
10181
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=create&version=v1 click to debug }
|
|
10182
|
+
*
|
|
10183
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/create document }
|
|
10184
|
+
*
|
|
10185
|
+
* 创建职务序列
|
|
10186
|
+
*
|
|
10187
|
+
* 创建职务序列
|
|
10188
|
+
*/
|
|
10189
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10190
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10191
|
+
return this.httpInstance
|
|
10192
|
+
.request({
|
|
10193
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path),
|
|
10194
|
+
method: "POST",
|
|
10195
|
+
data,
|
|
10196
|
+
params,
|
|
10197
|
+
headers,
|
|
10198
|
+
})
|
|
10199
|
+
.catch((e) => {
|
|
10200
|
+
this.logger.error(formatErrors(e));
|
|
10201
|
+
throw e;
|
|
10202
|
+
});
|
|
10203
|
+
}),
|
|
10204
|
+
/**
|
|
10205
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=delete&version=v1 click to debug }
|
|
10206
|
+
*
|
|
10207
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/delete document }
|
|
10208
|
+
*
|
|
10209
|
+
* 删除职务序列
|
|
10210
|
+
*
|
|
10211
|
+
* 删除职务序列
|
|
10212
|
+
*/
|
|
10213
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10214
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10215
|
+
return this.httpInstance
|
|
10216
|
+
.request({
|
|
10217
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path),
|
|
10218
|
+
method: "DELETE",
|
|
10219
|
+
data,
|
|
10220
|
+
params,
|
|
10221
|
+
headers,
|
|
10222
|
+
})
|
|
10223
|
+
.catch((e) => {
|
|
10224
|
+
this.logger.error(formatErrors(e));
|
|
10225
|
+
throw e;
|
|
10226
|
+
});
|
|
10227
|
+
}),
|
|
10228
|
+
/**
|
|
10229
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=get&version=v1 click to debug }
|
|
10230
|
+
*
|
|
10231
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/get document }
|
|
10232
|
+
*
|
|
10233
|
+
* 查询单个职务序列
|
|
10234
|
+
*
|
|
10235
|
+
* 根据 ID 查询单个职务序列
|
|
10236
|
+
*/
|
|
10237
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10238
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10239
|
+
return this.httpInstance
|
|
10240
|
+
.request({
|
|
10241
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path),
|
|
10242
|
+
method: "GET",
|
|
10243
|
+
data,
|
|
10244
|
+
params,
|
|
10245
|
+
headers,
|
|
10246
|
+
})
|
|
10247
|
+
.catch((e) => {
|
|
10248
|
+
this.logger.error(formatErrors(e));
|
|
10249
|
+
throw e;
|
|
10250
|
+
});
|
|
10251
|
+
}),
|
|
10252
|
+
/**
|
|
10253
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=list&version=v1 click to debug }
|
|
10254
|
+
*
|
|
10255
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list document }
|
|
10256
|
+
*
|
|
10257
|
+
* 批量查询职务序列
|
|
10258
|
+
*
|
|
10259
|
+
* 批量查询职务序列
|
|
10260
|
+
*/
|
|
10261
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10262
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10263
|
+
return this.httpInstance
|
|
10264
|
+
.request({
|
|
10265
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path),
|
|
10266
|
+
method: "GET",
|
|
10267
|
+
data,
|
|
10268
|
+
params,
|
|
10269
|
+
headers,
|
|
10270
|
+
})
|
|
10271
|
+
.catch((e) => {
|
|
10272
|
+
this.logger.error(formatErrors(e));
|
|
10273
|
+
throw e;
|
|
10274
|
+
});
|
|
10275
|
+
}),
|
|
10276
|
+
/**
|
|
10277
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=patch&version=v1 click to debug }
|
|
10278
|
+
*
|
|
10279
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/patch document }
|
|
10280
|
+
*
|
|
10281
|
+
* 更新职务序列
|
|
10282
|
+
*
|
|
10283
|
+
* 更新职务序列
|
|
10284
|
+
*/
|
|
10285
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10286
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10287
|
+
return this.httpInstance
|
|
10288
|
+
.request({
|
|
10289
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path),
|
|
10290
|
+
method: "PATCH",
|
|
10291
|
+
data,
|
|
10292
|
+
params,
|
|
10293
|
+
headers,
|
|
10294
|
+
})
|
|
10295
|
+
.catch((e) => {
|
|
10296
|
+
this.logger.error(formatErrors(e));
|
|
10297
|
+
throw e;
|
|
10298
|
+
});
|
|
10299
|
+
}),
|
|
10300
|
+
},
|
|
10301
|
+
/**
|
|
10302
|
+
* 职务级别
|
|
10303
|
+
*/
|
|
10304
|
+
jobLevel: {
|
|
10305
|
+
/**
|
|
10306
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=create&version=v1 click to debug }
|
|
10307
|
+
*
|
|
10308
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/create document }
|
|
10309
|
+
*
|
|
10310
|
+
* 创建职务级别
|
|
10311
|
+
*
|
|
10312
|
+
* 创建职务级别
|
|
10313
|
+
*/
|
|
10314
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10315
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10316
|
+
return this.httpInstance
|
|
10317
|
+
.request({
|
|
10318
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path),
|
|
10319
|
+
method: "POST",
|
|
10320
|
+
data,
|
|
10321
|
+
params,
|
|
10322
|
+
headers,
|
|
10323
|
+
})
|
|
10324
|
+
.catch((e) => {
|
|
10325
|
+
this.logger.error(formatErrors(e));
|
|
10326
|
+
throw e;
|
|
10327
|
+
});
|
|
10328
|
+
}),
|
|
10329
|
+
/**
|
|
10330
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=delete&version=v1 click to debug }
|
|
10331
|
+
*
|
|
10332
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/delete document }
|
|
10333
|
+
*
|
|
10334
|
+
* 删除职务级别
|
|
10335
|
+
*
|
|
10336
|
+
* 删除职务级别
|
|
10337
|
+
*/
|
|
10338
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10339
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10340
|
+
return this.httpInstance
|
|
10341
|
+
.request({
|
|
10342
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path),
|
|
10343
|
+
method: "DELETE",
|
|
10344
|
+
data,
|
|
10345
|
+
params,
|
|
10346
|
+
headers,
|
|
10347
|
+
})
|
|
10348
|
+
.catch((e) => {
|
|
10349
|
+
this.logger.error(formatErrors(e));
|
|
10350
|
+
throw e;
|
|
10351
|
+
});
|
|
10352
|
+
}),
|
|
10353
|
+
/**
|
|
10354
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=get&version=v1 click to debug }
|
|
10355
|
+
*
|
|
10356
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/get document }
|
|
10357
|
+
*
|
|
10358
|
+
* 查询单个职务级别
|
|
10359
|
+
*
|
|
10360
|
+
* 根据 ID 查询单个职务级别
|
|
10361
|
+
*/
|
|
10362
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10363
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10364
|
+
return this.httpInstance
|
|
10365
|
+
.request({
|
|
10366
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path),
|
|
10367
|
+
method: "GET",
|
|
10368
|
+
data,
|
|
10369
|
+
params,
|
|
10370
|
+
headers,
|
|
10371
|
+
})
|
|
10372
|
+
.catch((e) => {
|
|
10373
|
+
this.logger.error(formatErrors(e));
|
|
10374
|
+
throw e;
|
|
10375
|
+
});
|
|
10376
|
+
}),
|
|
10377
|
+
/**
|
|
10378
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=list&version=v1 click to debug }
|
|
10379
|
+
*
|
|
10380
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list document }
|
|
10381
|
+
*
|
|
10382
|
+
* 批量查询职务级别
|
|
10383
|
+
*
|
|
10384
|
+
* 批量查询职务级别
|
|
10385
|
+
*/
|
|
10386
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10387
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10388
|
+
return this.httpInstance
|
|
10389
|
+
.request({
|
|
10390
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path),
|
|
10391
|
+
method: "GET",
|
|
10392
|
+
data,
|
|
10393
|
+
params,
|
|
10394
|
+
headers,
|
|
10395
|
+
})
|
|
10396
|
+
.catch((e) => {
|
|
10397
|
+
this.logger.error(formatErrors(e));
|
|
10398
|
+
throw e;
|
|
10399
|
+
});
|
|
10400
|
+
}),
|
|
10401
|
+
/**
|
|
10402
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=patch&version=v1 click to debug }
|
|
10403
|
+
*
|
|
10404
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/patch document }
|
|
10405
|
+
*
|
|
10406
|
+
* 更新职务级别
|
|
10407
|
+
*
|
|
10408
|
+
* 更新职务级别
|
|
10409
|
+
*/
|
|
10410
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10411
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10412
|
+
return this.httpInstance
|
|
10413
|
+
.request({
|
|
10414
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path),
|
|
10415
|
+
method: "PATCH",
|
|
10416
|
+
data,
|
|
10417
|
+
params,
|
|
10418
|
+
headers,
|
|
10419
|
+
})
|
|
10420
|
+
.catch((e) => {
|
|
10421
|
+
this.logger.error(formatErrors(e));
|
|
10422
|
+
throw e;
|
|
10423
|
+
});
|
|
10424
|
+
}),
|
|
10425
|
+
},
|
|
10426
|
+
/**
|
|
10427
|
+
* 休假管理
|
|
10428
|
+
*/
|
|
10429
|
+
leave: {
|
|
10430
|
+
/**
|
|
10431
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
|
|
10432
|
+
*
|
|
10433
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_balances document }
|
|
10434
|
+
*
|
|
10435
|
+
* 批量查询员工假期余额
|
|
10436
|
+
*
|
|
10437
|
+
* 批量获取员工各个假期的余额数据
|
|
10438
|
+
*/
|
|
10439
|
+
leaveBalances: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10440
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10441
|
+
return this.httpInstance
|
|
10442
|
+
.request({
|
|
10443
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`, path),
|
|
10444
|
+
method: "GET",
|
|
10445
|
+
data,
|
|
10446
|
+
params,
|
|
10447
|
+
headers,
|
|
10448
|
+
})
|
|
10449
|
+
.catch((e) => {
|
|
10450
|
+
this.logger.error(formatErrors(e));
|
|
10451
|
+
throw e;
|
|
10452
|
+
});
|
|
10453
|
+
}),
|
|
10454
|
+
/**
|
|
10455
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_request_history&version=v1 click to debug }
|
|
10456
|
+
*
|
|
10457
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_request_history document }
|
|
10458
|
+
*
|
|
10459
|
+
* 批量查询员工请假记录
|
|
10460
|
+
*
|
|
10461
|
+
* 批量获取员工的请假记录数据
|
|
10462
|
+
*/
|
|
10463
|
+
leaveRequestHistory: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10464
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10465
|
+
return this.httpInstance
|
|
10466
|
+
.request({
|
|
10467
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`, path),
|
|
10468
|
+
method: "GET",
|
|
10469
|
+
data,
|
|
10470
|
+
params,
|
|
10471
|
+
headers,
|
|
10472
|
+
})
|
|
10473
|
+
.catch((e) => {
|
|
10474
|
+
this.logger.error(formatErrors(e));
|
|
10475
|
+
throw e;
|
|
10476
|
+
});
|
|
10477
|
+
}),
|
|
10478
|
+
/**
|
|
10479
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_types&version=v1 click to debug }
|
|
10480
|
+
*
|
|
10481
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_types document }
|
|
10482
|
+
*
|
|
10483
|
+
* 获取假期类型列表
|
|
10484
|
+
*
|
|
10485
|
+
* 获取休假设置后台配置的假期类型列表(比如年假、事假、婚假等)
|
|
10486
|
+
*/
|
|
10487
|
+
leaveTypes: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10488
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10489
|
+
return this.httpInstance
|
|
10490
|
+
.request({
|
|
10491
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`, path),
|
|
10492
|
+
method: "GET",
|
|
10493
|
+
data,
|
|
10494
|
+
params,
|
|
10495
|
+
headers,
|
|
10496
|
+
})
|
|
10497
|
+
.catch((e) => {
|
|
10498
|
+
this.logger.error(formatErrors(e));
|
|
10499
|
+
throw e;
|
|
10500
|
+
});
|
|
10501
|
+
}),
|
|
10502
|
+
},
|
|
10503
|
+
/**
|
|
10504
|
+
* leave_granting_record
|
|
10505
|
+
*/
|
|
10506
|
+
leaveGrantingRecord: {
|
|
10507
|
+
/**
|
|
10508
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=create&version=v1 click to debug }
|
|
10509
|
+
*
|
|
10510
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/create document }
|
|
10511
|
+
*
|
|
10512
|
+
* 创建假期授予记录
|
|
10513
|
+
*
|
|
10514
|
+
* 向飞书人事休假系统写入假期授予记录
|
|
10515
|
+
*/
|
|
10516
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10517
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10518
|
+
return this.httpInstance
|
|
10519
|
+
.request({
|
|
10520
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records`, path),
|
|
10521
|
+
method: "POST",
|
|
10522
|
+
data,
|
|
10523
|
+
params,
|
|
10524
|
+
headers,
|
|
10525
|
+
})
|
|
10526
|
+
.catch((e) => {
|
|
10527
|
+
this.logger.error(formatErrors(e));
|
|
10528
|
+
throw e;
|
|
10529
|
+
});
|
|
10530
|
+
}),
|
|
10531
|
+
/**
|
|
10532
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=delete&version=v1 click to debug }
|
|
10533
|
+
*
|
|
10534
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/delete document }
|
|
10535
|
+
*
|
|
10536
|
+
* 删除假期授予记录
|
|
10537
|
+
*
|
|
10538
|
+
* 删除飞书人事休假系统中的假期授予记录(仅支持删除授予来源是「手动授予」或「外部系统授予」的记录)
|
|
10539
|
+
*/
|
|
10540
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10541
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10542
|
+
return this.httpInstance
|
|
10543
|
+
.request({
|
|
10544
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`, path),
|
|
10545
|
+
method: "DELETE",
|
|
10546
|
+
data,
|
|
10547
|
+
params,
|
|
10548
|
+
headers,
|
|
10549
|
+
})
|
|
10550
|
+
.catch((e) => {
|
|
10551
|
+
this.logger.error(formatErrors(e));
|
|
10552
|
+
throw e;
|
|
10553
|
+
});
|
|
10554
|
+
}),
|
|
10555
|
+
},
|
|
10556
|
+
/**
|
|
10557
|
+
* 地点
|
|
10558
|
+
*/
|
|
10559
|
+
location: {
|
|
10560
|
+
/**
|
|
10561
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=create&version=v1 click to debug }
|
|
10562
|
+
*
|
|
10563
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/create document }
|
|
10564
|
+
*
|
|
10565
|
+
* 创建地点
|
|
10566
|
+
*
|
|
10567
|
+
* 创建地点
|
|
10568
|
+
*/
|
|
10569
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10570
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10571
|
+
return this.httpInstance
|
|
10572
|
+
.request({
|
|
10573
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path),
|
|
10574
|
+
method: "POST",
|
|
10575
|
+
data,
|
|
10576
|
+
params,
|
|
10577
|
+
headers,
|
|
10578
|
+
})
|
|
10579
|
+
.catch((e) => {
|
|
10580
|
+
this.logger.error(formatErrors(e));
|
|
10581
|
+
throw e;
|
|
10582
|
+
});
|
|
10583
|
+
}),
|
|
10584
|
+
/**
|
|
10585
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=delete&version=v1 click to debug }
|
|
10586
|
+
*
|
|
10587
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/delete document }
|
|
10588
|
+
*
|
|
10589
|
+
* 删除地点
|
|
10590
|
+
*
|
|
10591
|
+
* 删除地点
|
|
10592
|
+
*/
|
|
10593
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10594
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10595
|
+
return this.httpInstance
|
|
10596
|
+
.request({
|
|
10597
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path),
|
|
10598
|
+
method: "DELETE",
|
|
10599
|
+
data,
|
|
10600
|
+
params,
|
|
10601
|
+
headers,
|
|
10602
|
+
})
|
|
10603
|
+
.catch((e) => {
|
|
10604
|
+
this.logger.error(formatErrors(e));
|
|
10605
|
+
throw e;
|
|
10606
|
+
});
|
|
10607
|
+
}),
|
|
10608
|
+
/**
|
|
10609
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=get&version=v1 click to debug }
|
|
10610
|
+
*
|
|
10611
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/get document }
|
|
10612
|
+
*
|
|
10613
|
+
* 查询单个地点
|
|
10614
|
+
*
|
|
10615
|
+
* 根据 ID 查询单个地点
|
|
10616
|
+
*/
|
|
10617
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10618
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10619
|
+
return this.httpInstance
|
|
10620
|
+
.request({
|
|
10621
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path),
|
|
10622
|
+
method: "GET",
|
|
10623
|
+
data,
|
|
10624
|
+
params,
|
|
10625
|
+
headers,
|
|
10626
|
+
})
|
|
10627
|
+
.catch((e) => {
|
|
10628
|
+
this.logger.error(formatErrors(e));
|
|
10629
|
+
throw e;
|
|
10630
|
+
});
|
|
10631
|
+
}),
|
|
10632
|
+
/**
|
|
10633
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=list&version=v1 click to debug }
|
|
10634
|
+
*
|
|
10635
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list document }
|
|
10636
|
+
*
|
|
10637
|
+
* 批量查询地点
|
|
10638
|
+
*
|
|
10639
|
+
* 批量查询地点
|
|
10640
|
+
*/
|
|
10641
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10642
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10643
|
+
return this.httpInstance
|
|
10644
|
+
.request({
|
|
10645
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path),
|
|
10646
|
+
method: "GET",
|
|
10647
|
+
data,
|
|
10648
|
+
params,
|
|
10649
|
+
headers,
|
|
10650
|
+
})
|
|
10651
|
+
.catch((e) => {
|
|
10652
|
+
this.logger.error(formatErrors(e));
|
|
10653
|
+
throw e;
|
|
10654
|
+
});
|
|
10655
|
+
}),
|
|
10656
|
+
},
|
|
10657
|
+
/**
|
|
10658
|
+
* 国家证件类型
|
|
10659
|
+
*/
|
|
10660
|
+
nationalIdType: {
|
|
10661
|
+
/**
|
|
10662
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=create&version=v1 click to debug }
|
|
10663
|
+
*
|
|
10664
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/create document }
|
|
10665
|
+
*
|
|
10666
|
+
* 创建国家证件类型
|
|
10667
|
+
*
|
|
10668
|
+
* 创建国家证件类型
|
|
10669
|
+
*/
|
|
10670
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10671
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10672
|
+
return this.httpInstance
|
|
10673
|
+
.request({
|
|
10674
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path),
|
|
10675
|
+
method: "POST",
|
|
10676
|
+
data,
|
|
10677
|
+
params,
|
|
10678
|
+
headers,
|
|
10679
|
+
})
|
|
10680
|
+
.catch((e) => {
|
|
10681
|
+
this.logger.error(formatErrors(e));
|
|
10682
|
+
throw e;
|
|
10683
|
+
});
|
|
10684
|
+
}),
|
|
10685
|
+
/**
|
|
10686
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=delete&version=v1 click to debug }
|
|
10687
|
+
*
|
|
10688
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/delete document }
|
|
10689
|
+
*
|
|
10690
|
+
* 删除国家证件类型
|
|
10691
|
+
*
|
|
10692
|
+
* 删除国家证件类型
|
|
10693
|
+
*/
|
|
10694
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10695
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10696
|
+
return this.httpInstance
|
|
10697
|
+
.request({
|
|
10698
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path),
|
|
10699
|
+
method: "DELETE",
|
|
10700
|
+
data,
|
|
10701
|
+
params,
|
|
10702
|
+
headers,
|
|
10703
|
+
})
|
|
10704
|
+
.catch((e) => {
|
|
10705
|
+
this.logger.error(formatErrors(e));
|
|
10706
|
+
throw e;
|
|
10707
|
+
});
|
|
10708
|
+
}),
|
|
10709
|
+
/**
|
|
10710
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=get&version=v1 click to debug }
|
|
10711
|
+
*
|
|
10712
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/get document }
|
|
10713
|
+
*
|
|
10714
|
+
* 查询单个国家证件类型
|
|
10715
|
+
*
|
|
10716
|
+
* 根据 ID 查询单个国家证件类型
|
|
10717
|
+
*/
|
|
10718
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10719
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10720
|
+
return this.httpInstance
|
|
10721
|
+
.request({
|
|
10722
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path),
|
|
10723
|
+
method: "GET",
|
|
10724
|
+
data,
|
|
10725
|
+
params,
|
|
10726
|
+
headers,
|
|
10727
|
+
})
|
|
10728
|
+
.catch((e) => {
|
|
10729
|
+
this.logger.error(formatErrors(e));
|
|
10730
|
+
throw e;
|
|
10731
|
+
});
|
|
10732
|
+
}),
|
|
10733
|
+
/**
|
|
10734
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=list&version=v1 click to debug }
|
|
10735
|
+
*
|
|
10736
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/list document }
|
|
10737
|
+
*
|
|
10738
|
+
* 批量查询国家证件类型
|
|
10739
|
+
*
|
|
10740
|
+
* 批量查询国家证件类型
|
|
10741
|
+
*/
|
|
10742
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10743
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10744
|
+
return this.httpInstance
|
|
10745
|
+
.request({
|
|
10746
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path),
|
|
10747
|
+
method: "GET",
|
|
10748
|
+
data,
|
|
10749
|
+
params,
|
|
10750
|
+
headers,
|
|
10751
|
+
})
|
|
10752
|
+
.catch((e) => {
|
|
10753
|
+
this.logger.error(formatErrors(e));
|
|
10754
|
+
throw e;
|
|
10755
|
+
});
|
|
10756
|
+
}),
|
|
10757
|
+
/**
|
|
10758
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=patch&version=v1 click to debug }
|
|
10759
|
+
*
|
|
10760
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/patch document }
|
|
10761
|
+
*
|
|
10762
|
+
* 更新国家证件类型
|
|
10763
|
+
*
|
|
10764
|
+
* 更新国家证件类型
|
|
10765
|
+
*/
|
|
10766
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10767
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10768
|
+
return this.httpInstance
|
|
10769
|
+
.request({
|
|
10770
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path),
|
|
10771
|
+
method: "PATCH",
|
|
10772
|
+
data,
|
|
10773
|
+
params,
|
|
10774
|
+
headers,
|
|
10775
|
+
})
|
|
10776
|
+
.catch((e) => {
|
|
10777
|
+
this.logger.error(formatErrors(e));
|
|
10778
|
+
throw e;
|
|
10779
|
+
});
|
|
10780
|
+
}),
|
|
10781
|
+
},
|
|
10782
|
+
/**
|
|
10783
|
+
* 员工离职
|
|
10784
|
+
*/
|
|
10785
|
+
offboarding: {
|
|
10786
|
+
/**
|
|
10787
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=query&version=v1 click to debug }
|
|
10788
|
+
*
|
|
10789
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/query document }
|
|
10790
|
+
*
|
|
10791
|
+
* 查询员工离职原因列表
|
|
10792
|
+
*
|
|
10793
|
+
* 查询「飞书人事」-「离职设置」中的离职原因
|
|
10794
|
+
*/
|
|
10795
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10796
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10797
|
+
return this.httpInstance
|
|
10798
|
+
.request({
|
|
10799
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/query`, path),
|
|
10800
|
+
method: "POST",
|
|
10801
|
+
data,
|
|
10802
|
+
params,
|
|
10803
|
+
headers,
|
|
10804
|
+
})
|
|
10805
|
+
.catch((e) => {
|
|
10806
|
+
this.logger.error(formatErrors(e));
|
|
10807
|
+
throw e;
|
|
10808
|
+
});
|
|
10809
|
+
}),
|
|
10810
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10811
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10812
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10813
|
+
const res = yield this.httpInstance
|
|
10814
|
+
.request({
|
|
10815
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path),
|
|
10816
|
+
method: "POST",
|
|
10817
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
10818
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
10819
|
+
})
|
|
10820
|
+
.catch((e) => {
|
|
10821
|
+
this.logger.error(formatErrors(e));
|
|
10822
|
+
});
|
|
10823
|
+
return res;
|
|
10824
|
+
});
|
|
10825
|
+
const Iterable = {
|
|
10826
|
+
[Symbol.asyncIterator]() {
|
|
10827
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
10828
|
+
let hasMore = true;
|
|
10829
|
+
let pageToken;
|
|
10830
|
+
while (hasMore) {
|
|
10831
|
+
try {
|
|
10832
|
+
const res = yield __await(sendRequest({
|
|
10833
|
+
headers,
|
|
10834
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
10835
|
+
data,
|
|
10836
|
+
}));
|
|
10837
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
10838
|
+
// @ts-ignore
|
|
10839
|
+
has_more,
|
|
10840
|
+
// @ts-ignore
|
|
10841
|
+
page_token,
|
|
10842
|
+
// @ts-ignore
|
|
10843
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
10844
|
+
yield yield __await(rest);
|
|
10845
|
+
hasMore = Boolean(has_more);
|
|
10846
|
+
pageToken = page_token || next_page_token;
|
|
10847
|
+
}
|
|
10848
|
+
catch (e) {
|
|
10849
|
+
yield yield __await(null);
|
|
10850
|
+
break;
|
|
10851
|
+
}
|
|
10852
|
+
}
|
|
10853
|
+
});
|
|
10854
|
+
},
|
|
10855
|
+
};
|
|
10856
|
+
return Iterable;
|
|
10857
|
+
}),
|
|
10858
|
+
/**
|
|
10859
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=search&version=v1 click to debug }
|
|
10860
|
+
*
|
|
10861
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=offboarding&version=v1 document }
|
|
10862
|
+
*
|
|
10863
|
+
* 根据 雇佣 ID 查询员工离职信息
|
|
10864
|
+
*/
|
|
10865
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10866
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10867
|
+
return this.httpInstance
|
|
10868
|
+
.request({
|
|
10869
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path),
|
|
10870
|
+
method: "POST",
|
|
10871
|
+
data,
|
|
10872
|
+
params,
|
|
10873
|
+
headers,
|
|
10874
|
+
})
|
|
10875
|
+
.catch((e) => {
|
|
10876
|
+
this.logger.error(formatErrors(e));
|
|
10877
|
+
throw e;
|
|
10878
|
+
});
|
|
10879
|
+
}),
|
|
10880
|
+
/**
|
|
10881
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit&version=v1 click to debug }
|
|
10882
|
+
*
|
|
10883
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/submit document }
|
|
10884
|
+
*
|
|
10885
|
+
* 操作员工离职
|
|
10886
|
+
*
|
|
10887
|
+
* 操作员工直接离职
|
|
10888
|
+
*/
|
|
10889
|
+
submit: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10890
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10891
|
+
return this.httpInstance
|
|
10892
|
+
.request({
|
|
10893
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/submit`, path),
|
|
10894
|
+
method: "POST",
|
|
10895
|
+
data,
|
|
10896
|
+
params,
|
|
10897
|
+
headers,
|
|
10898
|
+
})
|
|
10899
|
+
.catch((e) => {
|
|
10900
|
+
this.logger.error(formatErrors(e));
|
|
10901
|
+
throw e;
|
|
10902
|
+
});
|
|
10903
|
+
}),
|
|
10904
|
+
},
|
|
10905
|
+
/**
|
|
10906
|
+
* 个人信息
|
|
10907
|
+
*/
|
|
10908
|
+
person: {
|
|
10909
|
+
/**
|
|
10910
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=delete&version=v1 click to debug }
|
|
10911
|
+
*
|
|
10912
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/delete document }
|
|
10913
|
+
*
|
|
10914
|
+
* 删除个人信息
|
|
10915
|
+
*
|
|
10916
|
+
* 删除人员的个人信息
|
|
10917
|
+
*/
|
|
10918
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10919
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10920
|
+
return this.httpInstance
|
|
10921
|
+
.request({
|
|
10922
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path),
|
|
10923
|
+
method: "DELETE",
|
|
10924
|
+
data,
|
|
10925
|
+
params,
|
|
10926
|
+
headers,
|
|
10927
|
+
})
|
|
10928
|
+
.catch((e) => {
|
|
10929
|
+
this.logger.error(formatErrors(e));
|
|
10930
|
+
throw e;
|
|
10931
|
+
});
|
|
10932
|
+
}),
|
|
10933
|
+
/**
|
|
10934
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=get&version=v1 click to debug }
|
|
10935
|
+
*
|
|
10936
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/get document }
|
|
10937
|
+
*
|
|
10938
|
+
* 查询单个个人信息
|
|
10939
|
+
*
|
|
10940
|
+
* 根据 ID 查询单个人员的个人信息
|
|
10941
|
+
*/
|
|
10942
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10943
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10944
|
+
return this.httpInstance
|
|
10945
|
+
.request({
|
|
10946
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path),
|
|
10947
|
+
method: "GET",
|
|
10948
|
+
data,
|
|
10949
|
+
params,
|
|
10950
|
+
headers,
|
|
10951
|
+
})
|
|
10952
|
+
.catch((e) => {
|
|
10953
|
+
this.logger.error(formatErrors(e));
|
|
10954
|
+
throw e;
|
|
10955
|
+
});
|
|
10956
|
+
}),
|
|
10957
|
+
/**
|
|
10958
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=upload&version=v1 click to debug }
|
|
10959
|
+
*
|
|
10960
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/upload document }
|
|
10961
|
+
*
|
|
10962
|
+
* 上传文件
|
|
10963
|
+
*
|
|
10964
|
+
* 上传文件
|
|
10965
|
+
*/
|
|
10966
|
+
upload: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10967
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10968
|
+
const res = yield this.httpInstance
|
|
10969
|
+
.request({
|
|
10970
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/upload`, path),
|
|
10971
|
+
method: "POST",
|
|
10972
|
+
data,
|
|
10973
|
+
params,
|
|
10974
|
+
headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
|
|
10975
|
+
})
|
|
10976
|
+
.catch((e) => {
|
|
10977
|
+
this.logger.error(formatErrors(e));
|
|
10978
|
+
throw e;
|
|
10979
|
+
});
|
|
10980
|
+
return get__default["default"](res, "data", null);
|
|
10981
|
+
}),
|
|
10982
|
+
},
|
|
10983
|
+
/**
|
|
10984
|
+
* 待入职
|
|
10985
|
+
*/
|
|
10986
|
+
preHire: {
|
|
10987
|
+
/**
|
|
10988
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v1 click to debug }
|
|
10989
|
+
*
|
|
10990
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/delete document }
|
|
10991
|
+
*
|
|
10992
|
+
* 删除待入职人员
|
|
10993
|
+
*
|
|
10994
|
+
* 删除待入职人员
|
|
10995
|
+
*/
|
|
10996
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10997
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10998
|
+
return this.httpInstance
|
|
10999
|
+
.request({
|
|
11000
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path),
|
|
11001
|
+
method: "DELETE",
|
|
11002
|
+
data,
|
|
11003
|
+
params,
|
|
11004
|
+
headers,
|
|
11005
|
+
})
|
|
11006
|
+
.catch((e) => {
|
|
11007
|
+
this.logger.error(formatErrors(e));
|
|
11008
|
+
throw e;
|
|
11009
|
+
});
|
|
11010
|
+
}),
|
|
11011
|
+
/**
|
|
11012
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=get&version=v1 click to debug }
|
|
11013
|
+
*
|
|
11014
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/get document }
|
|
11015
|
+
*
|
|
11016
|
+
* 查询单个待入职人员
|
|
11017
|
+
*
|
|
11018
|
+
* 根据 ID 查询单个待入职人员
|
|
11019
|
+
*/
|
|
11020
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11021
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11022
|
+
return this.httpInstance
|
|
11023
|
+
.request({
|
|
11024
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path),
|
|
11025
|
+
method: "GET",
|
|
11026
|
+
data,
|
|
11027
|
+
params,
|
|
11028
|
+
headers,
|
|
11029
|
+
})
|
|
11030
|
+
.catch((e) => {
|
|
11031
|
+
this.logger.error(formatErrors(e));
|
|
11032
|
+
throw e;
|
|
11033
|
+
});
|
|
11034
|
+
}),
|
|
11035
|
+
/**
|
|
11036
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=list&version=v1 click to debug }
|
|
11037
|
+
*
|
|
11038
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/list document }
|
|
11039
|
+
*
|
|
11040
|
+
* 批量查询待入职人员
|
|
11041
|
+
*
|
|
11042
|
+
* 批量查询待入职人员
|
|
11043
|
+
*/
|
|
11044
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11045
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11046
|
+
return this.httpInstance
|
|
11047
|
+
.request({
|
|
11048
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires`, path),
|
|
11049
|
+
method: "GET",
|
|
11050
|
+
data,
|
|
11051
|
+
params,
|
|
11052
|
+
headers,
|
|
11053
|
+
})
|
|
11054
|
+
.catch((e) => {
|
|
11055
|
+
this.logger.error(formatErrors(e));
|
|
11056
|
+
throw e;
|
|
11057
|
+
});
|
|
11058
|
+
}),
|
|
11059
|
+
/**
|
|
11060
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v1 click to debug }
|
|
11061
|
+
*
|
|
11062
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/patch document }
|
|
11063
|
+
*
|
|
11064
|
+
* 更新待入职数据
|
|
11065
|
+
*
|
|
11066
|
+
* 更新待入职数据
|
|
11067
|
+
*/
|
|
11068
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11069
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11070
|
+
return this.httpInstance
|
|
11071
|
+
.request({
|
|
11072
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path),
|
|
11073
|
+
method: "PATCH",
|
|
11074
|
+
data,
|
|
11075
|
+
params,
|
|
11076
|
+
headers,
|
|
11077
|
+
})
|
|
11078
|
+
.catch((e) => {
|
|
11079
|
+
this.logger.error(formatErrors(e));
|
|
11080
|
+
throw e;
|
|
11081
|
+
});
|
|
11082
|
+
}),
|
|
11083
|
+
},
|
|
11084
|
+
/**
|
|
11085
|
+
* 流程管理
|
|
11086
|
+
*/
|
|
11087
|
+
processFormVariableData: {
|
|
11088
|
+
/**
|
|
11089
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v1 click to debug }
|
|
11090
|
+
*
|
|
11091
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/process-form_variable_data/get document }
|
|
11092
|
+
*
|
|
11093
|
+
* 获取流程表单数据
|
|
11094
|
+
*
|
|
11095
|
+
* 获取流程表单数据
|
|
11096
|
+
*/
|
|
11097
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11098
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11099
|
+
return this.httpInstance
|
|
11100
|
+
.request({
|
|
11101
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`, path),
|
|
11102
|
+
method: "GET",
|
|
11103
|
+
data,
|
|
11104
|
+
params,
|
|
11105
|
+
headers,
|
|
11106
|
+
})
|
|
11107
|
+
.catch((e) => {
|
|
11108
|
+
this.logger.error(formatErrors(e));
|
|
11109
|
+
throw e;
|
|
11110
|
+
});
|
|
11111
|
+
}),
|
|
11112
|
+
},
|
|
11113
|
+
/**
|
|
11114
|
+
* security_group
|
|
11115
|
+
*/
|
|
11116
|
+
securityGroup: {
|
|
11117
|
+
/**
|
|
11118
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=list&version=v1 click to debug }
|
|
11119
|
+
*
|
|
11120
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/list document }
|
|
11121
|
+
*
|
|
11122
|
+
* 批量获取角色列表
|
|
11123
|
+
*
|
|
11124
|
+
* 批量查询「飞书人事」-「权限设置」-「角色设置」中的角色列表
|
|
11125
|
+
*/
|
|
11126
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11127
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11128
|
+
return this.httpInstance
|
|
11129
|
+
.request({
|
|
11130
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups`, path),
|
|
11131
|
+
method: "GET",
|
|
11132
|
+
data,
|
|
11133
|
+
params,
|
|
11134
|
+
headers,
|
|
11135
|
+
})
|
|
11136
|
+
.catch((e) => {
|
|
11137
|
+
this.logger.error(formatErrors(e));
|
|
11138
|
+
throw e;
|
|
11139
|
+
});
|
|
11140
|
+
}),
|
|
11141
|
+
/**
|
|
11142
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=query&version=v1 click to debug }
|
|
11143
|
+
*
|
|
11144
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/query document }
|
|
11145
|
+
*
|
|
11146
|
+
* HRBP/属地 BP 查询
|
|
11147
|
+
*
|
|
11148
|
+
* 通过部门或工作地点,查询对应的 HRBP/属地 BP
|
|
11149
|
+
*/
|
|
11150
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11151
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11152
|
+
return this.httpInstance
|
|
11153
|
+
.request({
|
|
11154
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups/query`, path),
|
|
11155
|
+
method: "POST",
|
|
11156
|
+
data,
|
|
11157
|
+
params,
|
|
11158
|
+
headers,
|
|
11159
|
+
})
|
|
11160
|
+
.catch((e) => {
|
|
11161
|
+
this.logger.error(formatErrors(e));
|
|
11162
|
+
throw e;
|
|
11163
|
+
});
|
|
11164
|
+
}),
|
|
11165
|
+
},
|
|
11166
|
+
/**
|
|
11167
|
+
* 地理库信息
|
|
11168
|
+
*/
|
|
11169
|
+
subdivision: {
|
|
11170
|
+
/**
|
|
11171
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=get&version=v1 click to debug }
|
|
11172
|
+
*
|
|
11173
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/get document }
|
|
11174
|
+
*
|
|
11175
|
+
* 查询单条省份/行政区信息
|
|
11176
|
+
*
|
|
11177
|
+
* 查询单条省份/行政区信息
|
|
11178
|
+
*/
|
|
11179
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11180
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11181
|
+
return this.httpInstance
|
|
11182
|
+
.request({
|
|
11183
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`, path),
|
|
11184
|
+
method: "GET",
|
|
11185
|
+
data,
|
|
11186
|
+
params,
|
|
11187
|
+
headers,
|
|
11188
|
+
})
|
|
11189
|
+
.catch((e) => {
|
|
11190
|
+
this.logger.error(formatErrors(e));
|
|
11191
|
+
throw e;
|
|
11192
|
+
});
|
|
11193
|
+
}),
|
|
11194
|
+
/**
|
|
11195
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=list&version=v1 click to debug }
|
|
11196
|
+
*
|
|
11197
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/list document }
|
|
11198
|
+
*
|
|
11199
|
+
* 批量查询省份/行政区信息
|
|
11200
|
+
*
|
|
11201
|
+
* 批量查询省份/行政区信息
|
|
11202
|
+
*/
|
|
11203
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11204
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11205
|
+
return this.httpInstance
|
|
11206
|
+
.request({
|
|
11207
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions`, path),
|
|
11208
|
+
method: "GET",
|
|
11209
|
+
data,
|
|
11210
|
+
params,
|
|
11211
|
+
headers,
|
|
11212
|
+
})
|
|
11213
|
+
.catch((e) => {
|
|
11214
|
+
this.logger.error(formatErrors(e));
|
|
11215
|
+
throw e;
|
|
11216
|
+
});
|
|
11217
|
+
}),
|
|
11218
|
+
},
|
|
11219
|
+
/**
|
|
11220
|
+
* 地理库信息
|
|
11221
|
+
*/
|
|
11222
|
+
subregion: {
|
|
11223
|
+
/**
|
|
11224
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=get&version=v1 click to debug }
|
|
11225
|
+
*
|
|
11226
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/get document }
|
|
11227
|
+
*
|
|
11228
|
+
* 查询单条城市/区域信息
|
|
11229
|
+
*
|
|
11230
|
+
* 查询单条城市/区域信息
|
|
11231
|
+
*/
|
|
11232
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11233
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11234
|
+
return this.httpInstance
|
|
11235
|
+
.request({
|
|
11236
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`, path),
|
|
11237
|
+
method: "GET",
|
|
11238
|
+
data,
|
|
11239
|
+
params,
|
|
11240
|
+
headers,
|
|
11241
|
+
})
|
|
11242
|
+
.catch((e) => {
|
|
11243
|
+
this.logger.error(formatErrors(e));
|
|
11244
|
+
throw e;
|
|
11245
|
+
});
|
|
11246
|
+
}),
|
|
11247
|
+
/**
|
|
11248
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=list&version=v1 click to debug }
|
|
11249
|
+
*
|
|
11250
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/list document }
|
|
11251
|
+
*
|
|
11252
|
+
* 批量查询城市/区域信息
|
|
11253
|
+
*
|
|
11254
|
+
* 批量查询城市/区域信息
|
|
11255
|
+
*/
|
|
11256
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11257
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11258
|
+
return this.httpInstance
|
|
11259
|
+
.request({
|
|
11260
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions`, path),
|
|
11261
|
+
method: "GET",
|
|
11262
|
+
data,
|
|
11263
|
+
params,
|
|
11264
|
+
headers,
|
|
11265
|
+
})
|
|
11266
|
+
.catch((e) => {
|
|
11267
|
+
this.logger.error(formatErrors(e));
|
|
11268
|
+
throw e;
|
|
11269
|
+
});
|
|
11270
|
+
}),
|
|
11271
|
+
},
|
|
11272
|
+
/**
|
|
11273
|
+
* 异动原因
|
|
11274
|
+
*/
|
|
11275
|
+
transferReason: {
|
|
11276
|
+
/**
|
|
11277
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_reason&apiName=query&version=v1 click to debug }
|
|
11278
|
+
*
|
|
11279
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_reason/query document }
|
|
11280
|
+
*
|
|
11281
|
+
* 获取异动原因列表
|
|
11282
|
+
*
|
|
11283
|
+
* 获取异动原因列表
|
|
11284
|
+
*/
|
|
11285
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11286
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11287
|
+
return this.httpInstance
|
|
11288
|
+
.request({
|
|
11289
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`, path),
|
|
11290
|
+
method: "GET",
|
|
11291
|
+
data,
|
|
11292
|
+
params,
|
|
11293
|
+
headers,
|
|
11294
|
+
})
|
|
11295
|
+
.catch((e) => {
|
|
11296
|
+
this.logger.error(formatErrors(e));
|
|
11297
|
+
throw e;
|
|
11298
|
+
});
|
|
11299
|
+
}),
|
|
11300
|
+
},
|
|
11301
|
+
/**
|
|
11302
|
+
* 异动类型
|
|
11303
|
+
*/
|
|
11304
|
+
transferType: {
|
|
11305
|
+
/**
|
|
11306
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_type&apiName=query&version=v1 click to debug }
|
|
11307
|
+
*
|
|
11308
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_type/query document }
|
|
11309
|
+
*
|
|
11310
|
+
* 获取异动类型列表
|
|
11311
|
+
*
|
|
11312
|
+
* 获取异动类型列表
|
|
11313
|
+
*/
|
|
11314
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11315
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11316
|
+
return this.httpInstance
|
|
11317
|
+
.request({
|
|
11318
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_types/query`, path),
|
|
11319
|
+
method: "GET",
|
|
11320
|
+
data,
|
|
11321
|
+
params,
|
|
11322
|
+
headers,
|
|
11323
|
+
})
|
|
11324
|
+
.catch((e) => {
|
|
11325
|
+
this.logger.error(formatErrors(e));
|
|
11326
|
+
throw e;
|
|
11327
|
+
});
|
|
11328
|
+
}),
|
|
11329
|
+
},
|
|
11330
|
+
/**
|
|
11331
|
+
* 工时制度
|
|
11332
|
+
*/
|
|
11333
|
+
workingHoursType: {
|
|
11334
|
+
/**
|
|
11335
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=create&version=v1 click to debug }
|
|
11336
|
+
*
|
|
11337
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/create document }
|
|
11338
|
+
*
|
|
11339
|
+
* 创建工时制度
|
|
11340
|
+
*
|
|
11341
|
+
* 创建工时制度
|
|
11342
|
+
*/
|
|
11343
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11344
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11345
|
+
return this.httpInstance
|
|
11346
|
+
.request({
|
|
11347
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path),
|
|
11348
|
+
method: "POST",
|
|
11349
|
+
data,
|
|
11350
|
+
params,
|
|
11351
|
+
headers,
|
|
11352
|
+
})
|
|
11353
|
+
.catch((e) => {
|
|
11354
|
+
this.logger.error(formatErrors(e));
|
|
11355
|
+
throw e;
|
|
11356
|
+
});
|
|
11357
|
+
}),
|
|
11358
|
+
/**
|
|
11359
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=delete&version=v1 click to debug }
|
|
11360
|
+
*
|
|
11361
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/delete document }
|
|
11362
|
+
*
|
|
11363
|
+
* 删除工时制度
|
|
11364
|
+
*
|
|
11365
|
+
* 删除工时制度
|
|
11366
|
+
*/
|
|
11367
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11368
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11369
|
+
return this.httpInstance
|
|
11370
|
+
.request({
|
|
11371
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path),
|
|
11372
|
+
method: "DELETE",
|
|
11373
|
+
data,
|
|
11374
|
+
params,
|
|
11375
|
+
headers,
|
|
11376
|
+
})
|
|
11377
|
+
.catch((e) => {
|
|
11378
|
+
this.logger.error(formatErrors(e));
|
|
11379
|
+
throw e;
|
|
11380
|
+
});
|
|
11381
|
+
}),
|
|
11382
|
+
/**
|
|
11383
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=get&version=v1 click to debug }
|
|
11384
|
+
*
|
|
11385
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/get document }
|
|
11386
|
+
*
|
|
11387
|
+
* 查询单个工时制度
|
|
11388
|
+
*
|
|
11389
|
+
* 根据 ID 查询单个工时制度
|
|
11390
|
+
*/
|
|
11391
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11392
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11393
|
+
return this.httpInstance
|
|
11394
|
+
.request({
|
|
11395
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path),
|
|
11396
|
+
method: "GET",
|
|
11397
|
+
data,
|
|
11398
|
+
params,
|
|
11399
|
+
headers,
|
|
11400
|
+
})
|
|
11401
|
+
.catch((e) => {
|
|
11402
|
+
this.logger.error(formatErrors(e));
|
|
11403
|
+
throw e;
|
|
11404
|
+
});
|
|
11405
|
+
}),
|
|
11406
|
+
/**
|
|
11407
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=list&version=v1 click to debug }
|
|
11408
|
+
*
|
|
11409
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/list document }
|
|
11410
|
+
*
|
|
11411
|
+
* 批量查询工时制度
|
|
11412
|
+
*
|
|
11413
|
+
* 批量查询工时制度
|
|
11414
|
+
*/
|
|
11415
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11416
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11417
|
+
return this.httpInstance
|
|
11418
|
+
.request({
|
|
11419
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path),
|
|
11420
|
+
method: "GET",
|
|
11421
|
+
data,
|
|
11422
|
+
params,
|
|
11423
|
+
headers,
|
|
11424
|
+
})
|
|
11425
|
+
.catch((e) => {
|
|
11426
|
+
this.logger.error(formatErrors(e));
|
|
11427
|
+
throw e;
|
|
11428
|
+
});
|
|
11429
|
+
}),
|
|
11430
|
+
/**
|
|
11431
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=patch&version=v1 click to debug }
|
|
11432
|
+
*
|
|
11433
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/patch document }
|
|
11434
|
+
*
|
|
11435
|
+
* 更新工时制度
|
|
11436
|
+
*
|
|
11437
|
+
* 更新工时制度
|
|
11438
|
+
*/
|
|
11439
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11440
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11441
|
+
return this.httpInstance
|
|
11442
|
+
.request({
|
|
11443
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path),
|
|
11444
|
+
method: "PATCH",
|
|
11445
|
+
data,
|
|
11446
|
+
params,
|
|
11447
|
+
headers,
|
|
11448
|
+
})
|
|
11449
|
+
.catch((e) => {
|
|
11450
|
+
this.logger.error(formatErrors(e));
|
|
11451
|
+
throw e;
|
|
11452
|
+
});
|
|
11453
|
+
}),
|
|
11454
|
+
},
|
|
11455
|
+
};
|
|
11456
|
+
/**
|
|
11457
|
+
|
|
11458
|
+
*/
|
|
11459
|
+
this.docs_tool = {};
|
|
11460
|
+
/**
|
|
11461
|
+
* 云文档-文档
|
|
11462
|
+
*/
|
|
11463
|
+
this.docx = {
|
|
11464
|
+
/**
|
|
11465
|
+
* 块
|
|
11466
|
+
*/
|
|
11467
|
+
documentBlock: {
|
|
11468
|
+
/**
|
|
11469
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=batch_update&version=v1 click to debug }
|
|
11470
|
+
*
|
|
11471
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update document }
|
|
11472
|
+
*
|
|
11473
|
+
* 批量更新块
|
|
11474
|
+
*
|
|
11475
|
+
* 批量更新块的富文本内容。
|
|
11476
|
+
*
|
|
11477
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11478
|
+
*
|
|
11479
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnMiwAKCiE6oQEkPyhvmmQEe),了解相关规则及约束。
|
|
11480
|
+
*/
|
|
11481
|
+
batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11482
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11483
|
+
return this.httpInstance
|
|
11484
|
+
.request({
|
|
11485
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`, path),
|
|
11486
|
+
method: "PATCH",
|
|
11487
|
+
data,
|
|
11488
|
+
params,
|
|
11489
|
+
headers,
|
|
11490
|
+
})
|
|
11491
|
+
.catch((e) => {
|
|
11492
|
+
this.logger.error(formatErrors(e));
|
|
11493
|
+
throw e;
|
|
11494
|
+
});
|
|
11495
|
+
}),
|
|
11496
|
+
/**
|
|
11497
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=get&version=v1 click to debug }
|
|
11498
|
+
*
|
|
11499
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get document }
|
|
11500
|
+
*
|
|
11501
|
+
* 获取块
|
|
11502
|
+
*
|
|
11503
|
+
* 获取指定块的富文本内容。
|
|
11504
|
+
*
|
|
11505
|
+
* 频率限制:单个应用调用频率上限为每秒 5 次。
|
|
11506
|
+
*
|
|
11507
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcnWEMWYAg2YMkEq0SZXHzaih),了解相关规则及约束。
|
|
11508
|
+
*/
|
|
11509
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11510
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11511
|
+
return this.httpInstance
|
|
11512
|
+
.request({
|
|
11513
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path),
|
|
11514
|
+
method: "GET",
|
|
11515
|
+
data,
|
|
11516
|
+
params,
|
|
11517
|
+
headers,
|
|
11518
|
+
})
|
|
11519
|
+
.catch((e) => {
|
|
11520
|
+
this.logger.error(formatErrors(e));
|
|
11521
|
+
throw e;
|
|
11522
|
+
});
|
|
11523
|
+
}),
|
|
11524
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11525
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11526
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
11527
|
+
const res = yield this.httpInstance
|
|
11528
|
+
.request({
|
|
11529
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path),
|
|
11530
|
+
method: "GET",
|
|
11531
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
11532
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
11533
|
+
})
|
|
11534
|
+
.catch((e) => {
|
|
11535
|
+
this.logger.error(formatErrors(e));
|
|
11536
|
+
});
|
|
11537
|
+
return res;
|
|
11538
|
+
});
|
|
11539
|
+
const Iterable = {
|
|
11540
|
+
[Symbol.asyncIterator]() {
|
|
11541
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
11542
|
+
let hasMore = true;
|
|
11543
|
+
let pageToken;
|
|
11544
|
+
while (hasMore) {
|
|
11545
|
+
try {
|
|
11546
|
+
const res = yield __await(sendRequest({
|
|
11547
|
+
headers,
|
|
11548
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
11549
|
+
data,
|
|
11550
|
+
}));
|
|
11551
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
11552
|
+
// @ts-ignore
|
|
11553
|
+
has_more,
|
|
11554
|
+
// @ts-ignore
|
|
11555
|
+
page_token,
|
|
11556
|
+
// @ts-ignore
|
|
11557
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
11558
|
+
yield yield __await(rest);
|
|
11559
|
+
hasMore = Boolean(has_more);
|
|
11560
|
+
pageToken = page_token || next_page_token;
|
|
11561
|
+
}
|
|
11562
|
+
catch (e) {
|
|
11563
|
+
yield yield __await(null);
|
|
11564
|
+
break;
|
|
11565
|
+
}
|
|
11566
|
+
}
|
|
11567
|
+
});
|
|
11568
|
+
},
|
|
11569
|
+
};
|
|
11570
|
+
return Iterable;
|
|
11571
|
+
}),
|
|
11572
|
+
/**
|
|
11573
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=list&version=v1 click to debug }
|
|
11574
|
+
*
|
|
11575
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list document }
|
|
11576
|
+
*
|
|
11577
|
+
* 获取文档所有块
|
|
11578
|
+
*
|
|
11579
|
+
* 获取文档所有块的富文本内容并分页返回。
|
|
11580
|
+
*
|
|
11581
|
+
* 频率限制:单个应用调用频率上限为每秒 5 次。
|
|
11582
|
+
*
|
|
11583
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcn6AkCE2AUUm2WwxID7lS7Xc),了解相关规则及约束。
|
|
11584
|
+
*/
|
|
11585
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11586
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11587
|
+
return this.httpInstance
|
|
11588
|
+
.request({
|
|
11589
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path),
|
|
11590
|
+
method: "GET",
|
|
11591
|
+
data,
|
|
11592
|
+
params,
|
|
11593
|
+
headers,
|
|
11594
|
+
})
|
|
11595
|
+
.catch((e) => {
|
|
11596
|
+
this.logger.error(formatErrors(e));
|
|
11597
|
+
throw e;
|
|
11598
|
+
});
|
|
11599
|
+
}),
|
|
11600
|
+
/**
|
|
11601
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=patch&version=v1 click to debug }
|
|
11602
|
+
*
|
|
11603
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch document }
|
|
11604
|
+
*
|
|
11605
|
+
* 更新块
|
|
11606
|
+
*
|
|
11607
|
+
* 更新指定的块。
|
|
11608
|
+
*
|
|
11609
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11610
|
+
*
|
|
11611
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnEeyS0I8MMqoieIMpK7jm8g),了解相关规则及约束。
|
|
11612
|
+
*/
|
|
11613
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11614
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11615
|
+
return this.httpInstance
|
|
11616
|
+
.request({
|
|
11617
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path),
|
|
11618
|
+
method: "PATCH",
|
|
11619
|
+
data,
|
|
11620
|
+
params,
|
|
11621
|
+
headers,
|
|
11622
|
+
})
|
|
11623
|
+
.catch((e) => {
|
|
11624
|
+
this.logger.error(formatErrors(e));
|
|
11625
|
+
throw e;
|
|
11626
|
+
});
|
|
11627
|
+
}),
|
|
11628
|
+
},
|
|
11629
|
+
/**
|
|
11630
|
+
* document.block.children
|
|
11631
|
+
*/
|
|
11632
|
+
documentBlockChildren: {
|
|
11633
|
+
/**
|
|
11634
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=batch_delete&version=v1 click to debug }
|
|
11635
|
+
*
|
|
11636
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete document }
|
|
11637
|
+
*
|
|
11638
|
+
* 删除块
|
|
11639
|
+
*
|
|
11640
|
+
* 指定需要操作的块,删除其指定范围的子块。如果操作成功,接口将返回应用删除操作后的文档版本号。
|
|
11641
|
+
*
|
|
11642
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11643
|
+
*
|
|
11644
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcngCsscGk0WacO258mYDgM6b),了解相关规则及约束。
|
|
11645
|
+
*/
|
|
11646
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11647
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11648
|
+
return this.httpInstance
|
|
11649
|
+
.request({
|
|
11650
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`, path),
|
|
11651
|
+
method: "DELETE",
|
|
11652
|
+
data,
|
|
11653
|
+
params,
|
|
11654
|
+
headers,
|
|
11655
|
+
})
|
|
11656
|
+
.catch((e) => {
|
|
11657
|
+
this.logger.error(formatErrors(e));
|
|
11658
|
+
throw e;
|
|
11659
|
+
});
|
|
11660
|
+
}),
|
|
11661
|
+
/**
|
|
11662
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=create&version=v1 click to debug }
|
|
11663
|
+
*
|
|
11664
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create document }
|
|
11665
|
+
*
|
|
11666
|
+
* 创建块
|
|
11667
|
+
*
|
|
11668
|
+
* 指定需要操作的块,为其创建一批子块,并插入到指定位置。如果操作成功,接口将返回新创建子块的富文本内容。
|
|
11669
|
+
*
|
|
11670
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11671
|
+
*
|
|
11672
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnm0ooUe0s20GwwVB3a05rtb),了解相关规则及约束。
|
|
11673
|
+
*/
|
|
11674
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11675
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11676
|
+
return this.httpInstance
|
|
11677
|
+
.request({
|
|
11678
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path),
|
|
11679
|
+
method: "POST",
|
|
11680
|
+
data,
|
|
11681
|
+
params,
|
|
11682
|
+
headers,
|
|
11683
|
+
})
|
|
11684
|
+
.catch((e) => {
|
|
11685
|
+
this.logger.error(formatErrors(e));
|
|
11686
|
+
throw e;
|
|
11687
|
+
});
|
|
11688
|
+
}),
|
|
11689
|
+
getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11690
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11691
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
9268
11692
|
const res = yield this.httpInstance
|
|
9269
11693
|
.request({
|
|
9270
11694
|
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path),
|
|
@@ -9752,7 +12176,7 @@ class Client$1 {
|
|
|
9752
12176
|
}),
|
|
9753
12177
|
},
|
|
9754
12178
|
/**
|
|
9755
|
-
*
|
|
12179
|
+
* 文件
|
|
9756
12180
|
*/
|
|
9757
12181
|
file: {
|
|
9758
12182
|
/**
|
|
@@ -10309,12 +12733,36 @@ class Client$1 {
|
|
|
10309
12733
|
throw e;
|
|
10310
12734
|
});
|
|
10311
12735
|
}),
|
|
10312
|
-
|
|
12736
|
+
/**
|
|
12737
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=get&version=v1 click to debug }
|
|
12738
|
+
*
|
|
12739
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get document }
|
|
12740
|
+
*
|
|
12741
|
+
* 获取文档版本
|
|
12742
|
+
*
|
|
12743
|
+
* 获取文档版本。
|
|
12744
|
+
*/
|
|
12745
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
12746
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
12747
|
+
return this.httpInstance
|
|
12748
|
+
.request({
|
|
12749
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
|
|
12750
|
+
method: "GET",
|
|
12751
|
+
data,
|
|
12752
|
+
params,
|
|
12753
|
+
headers,
|
|
12754
|
+
})
|
|
12755
|
+
.catch((e) => {
|
|
12756
|
+
this.logger.error(formatErrors(e));
|
|
12757
|
+
throw e;
|
|
12758
|
+
});
|
|
12759
|
+
}),
|
|
12760
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10313
12761
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10314
12762
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10315
12763
|
const res = yield this.httpInstance
|
|
10316
12764
|
.request({
|
|
10317
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions
|
|
12765
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
10318
12766
|
method: "GET",
|
|
10319
12767
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
10320
12768
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -10358,19 +12806,19 @@ class Client$1 {
|
|
|
10358
12806
|
return Iterable;
|
|
10359
12807
|
}),
|
|
10360
12808
|
/**
|
|
10361
|
-
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=
|
|
12809
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=list&version=v1 click to debug }
|
|
10362
12810
|
*
|
|
10363
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/
|
|
12811
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
|
|
10364
12812
|
*
|
|
10365
|
-
*
|
|
12813
|
+
* 获取文档版本列表
|
|
10366
12814
|
*
|
|
10367
|
-
*
|
|
12815
|
+
* 获取文档所有版本。
|
|
10368
12816
|
*/
|
|
10369
|
-
|
|
12817
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10370
12818
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10371
12819
|
return this.httpInstance
|
|
10372
12820
|
.request({
|
|
10373
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions
|
|
12821
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
10374
12822
|
method: "GET",
|
|
10375
12823
|
data,
|
|
10376
12824
|
params,
|
|
@@ -10381,12 +12829,17 @@ class Client$1 {
|
|
|
10381
12829
|
throw e;
|
|
10382
12830
|
});
|
|
10383
12831
|
}),
|
|
12832
|
+
},
|
|
12833
|
+
/**
|
|
12834
|
+
* file.view_record
|
|
12835
|
+
*/
|
|
12836
|
+
fileViewRecord: {
|
|
10384
12837
|
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10385
12838
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10386
12839
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10387
12840
|
const res = yield this.httpInstance
|
|
10388
12841
|
.request({
|
|
10389
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/
|
|
12842
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path),
|
|
10390
12843
|
method: "GET",
|
|
10391
12844
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
10392
12845
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -10430,19 +12883,15 @@ class Client$1 {
|
|
|
10430
12883
|
return Iterable;
|
|
10431
12884
|
}),
|
|
10432
12885
|
/**
|
|
10433
|
-
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.
|
|
10434
|
-
*
|
|
10435
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
|
|
10436
|
-
*
|
|
10437
|
-
* 获取文档版本列表
|
|
12886
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.view_record&apiName=list&version=v1 click to debug }
|
|
10438
12887
|
*
|
|
10439
|
-
*
|
|
12888
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=drive&resource=file.view_record&version=v1 document }
|
|
10440
12889
|
*/
|
|
10441
12890
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10442
12891
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10443
12892
|
return this.httpInstance
|
|
10444
12893
|
.request({
|
|
10445
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/
|
|
12894
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path),
|
|
10446
12895
|
method: "GET",
|
|
10447
12896
|
data,
|
|
10448
12897
|
params,
|
|
@@ -12781,7 +15230,7 @@ class Client$1 {
|
|
|
12781
15230
|
*/
|
|
12782
15231
|
this.hire = {
|
|
12783
15232
|
/**
|
|
12784
|
-
*
|
|
15233
|
+
* 投递
|
|
12785
15234
|
*/
|
|
12786
15235
|
application: {
|
|
12787
15236
|
/**
|
|
@@ -13218,6 +15667,50 @@ class Client$1 {
|
|
|
13218
15667
|
throw e;
|
|
13219
15668
|
});
|
|
13220
15669
|
}),
|
|
15670
|
+
/**
|
|
15671
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=delete&version=v1 click to debug }
|
|
15672
|
+
*
|
|
15673
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_application&version=v1 document }
|
|
15674
|
+
*
|
|
15675
|
+
* 删除外部投递
|
|
15676
|
+
*/
|
|
15677
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15678
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15679
|
+
return this.httpInstance
|
|
15680
|
+
.request({
|
|
15681
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path),
|
|
15682
|
+
method: "DELETE",
|
|
15683
|
+
data,
|
|
15684
|
+
params,
|
|
15685
|
+
headers,
|
|
15686
|
+
})
|
|
15687
|
+
.catch((e) => {
|
|
15688
|
+
this.logger.error(formatErrors(e));
|
|
15689
|
+
throw e;
|
|
15690
|
+
});
|
|
15691
|
+
}),
|
|
15692
|
+
/**
|
|
15693
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=update&version=v1 click to debug }
|
|
15694
|
+
*
|
|
15695
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_application&version=v1 document }
|
|
15696
|
+
*
|
|
15697
|
+
* 更新外部投递
|
|
15698
|
+
*/
|
|
15699
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15700
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15701
|
+
return this.httpInstance
|
|
15702
|
+
.request({
|
|
15703
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path),
|
|
15704
|
+
method: "PUT",
|
|
15705
|
+
data,
|
|
15706
|
+
params,
|
|
15707
|
+
headers,
|
|
15708
|
+
})
|
|
15709
|
+
.catch((e) => {
|
|
15710
|
+
this.logger.error(formatErrors(e));
|
|
15711
|
+
throw e;
|
|
15712
|
+
});
|
|
15713
|
+
}),
|
|
13221
15714
|
},
|
|
13222
15715
|
/**
|
|
13223
15716
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -13278,24 +15771,53 @@ class Client$1 {
|
|
|
13278
15771
|
}),
|
|
13279
15772
|
},
|
|
13280
15773
|
/**
|
|
13281
|
-
* 导入外部系统信息(灰度租户可见)
|
|
15774
|
+
* 导入外部系统信息(灰度租户可见)
|
|
15775
|
+
*/
|
|
15776
|
+
externalInterviewAssessment: {
|
|
15777
|
+
/**
|
|
15778
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=create&version=v1 click to debug }
|
|
15779
|
+
*
|
|
15780
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview_assessment/create document }
|
|
15781
|
+
*
|
|
15782
|
+
* 创建外部面评
|
|
15783
|
+
*
|
|
15784
|
+
* 导入来自其他系统的面评信息,创建为外部面评
|
|
15785
|
+
*/
|
|
15786
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15787
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15788
|
+
return this.httpInstance
|
|
15789
|
+
.request({
|
|
15790
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments`, path),
|
|
15791
|
+
method: "POST",
|
|
15792
|
+
data,
|
|
15793
|
+
params,
|
|
15794
|
+
headers,
|
|
15795
|
+
})
|
|
15796
|
+
.catch((e) => {
|
|
15797
|
+
this.logger.error(formatErrors(e));
|
|
15798
|
+
throw e;
|
|
15799
|
+
});
|
|
15800
|
+
}),
|
|
15801
|
+
},
|
|
15802
|
+
/**
|
|
15803
|
+
* 面试
|
|
13282
15804
|
*/
|
|
13283
|
-
|
|
15805
|
+
interview: {
|
|
13284
15806
|
/**
|
|
13285
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
15807
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview&apiName=list&version=v1 click to debug }
|
|
13286
15808
|
*
|
|
13287
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
15809
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/list document }
|
|
13288
15810
|
*
|
|
13289
|
-
*
|
|
15811
|
+
* 获取面试信息
|
|
13290
15812
|
*
|
|
13291
|
-
*
|
|
15813
|
+
* 根据投递 ID 或面试时间获取面试信息
|
|
13292
15814
|
*/
|
|
13293
|
-
|
|
15815
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13294
15816
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13295
15817
|
return this.httpInstance
|
|
13296
15818
|
.request({
|
|
13297
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
13298
|
-
method: "
|
|
15819
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviews`, path),
|
|
15820
|
+
method: "GET",
|
|
13299
15821
|
data,
|
|
13300
15822
|
params,
|
|
13301
15823
|
headers,
|
|
@@ -13489,6 +16011,158 @@ class Client$1 {
|
|
|
13489
16011
|
});
|
|
13490
16012
|
}),
|
|
13491
16013
|
},
|
|
16014
|
+
/**
|
|
16015
|
+
* 招聘需求(灰度租户可见)
|
|
16016
|
+
*/
|
|
16017
|
+
jobRequirement: {
|
|
16018
|
+
/**
|
|
16019
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=create&version=v1 click to debug }
|
|
16020
|
+
*
|
|
16021
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/create document }
|
|
16022
|
+
*
|
|
16023
|
+
* 创建招聘需求
|
|
16024
|
+
*
|
|
16025
|
+
* 创建招聘需求,除招聘需求编号为必填外,其他字段是否必填与飞书招聘「招聘需求字段管理」内设置一致
|
|
16026
|
+
*/
|
|
16027
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16028
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16029
|
+
return this.httpInstance
|
|
16030
|
+
.request({
|
|
16031
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path),
|
|
16032
|
+
method: "POST",
|
|
16033
|
+
data,
|
|
16034
|
+
params,
|
|
16035
|
+
headers,
|
|
16036
|
+
})
|
|
16037
|
+
.catch((e) => {
|
|
16038
|
+
this.logger.error(formatErrors(e));
|
|
16039
|
+
throw e;
|
|
16040
|
+
});
|
|
16041
|
+
}),
|
|
16042
|
+
/**
|
|
16043
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=delete&version=v1 click to debug }
|
|
16044
|
+
*
|
|
16045
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/delete document }
|
|
16046
|
+
*
|
|
16047
|
+
* 删除招聘需求
|
|
16048
|
+
*
|
|
16049
|
+
* 删除招聘需求
|
|
16050
|
+
*/
|
|
16051
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16052
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16053
|
+
return this.httpInstance
|
|
16054
|
+
.request({
|
|
16055
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path),
|
|
16056
|
+
method: "DELETE",
|
|
16057
|
+
data,
|
|
16058
|
+
params,
|
|
16059
|
+
headers,
|
|
16060
|
+
})
|
|
16061
|
+
.catch((e) => {
|
|
16062
|
+
this.logger.error(formatErrors(e));
|
|
16063
|
+
throw e;
|
|
16064
|
+
});
|
|
16065
|
+
}),
|
|
16066
|
+
/**
|
|
16067
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list&version=v1 click to debug }
|
|
16068
|
+
*
|
|
16069
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/list document }
|
|
16070
|
+
*
|
|
16071
|
+
* 获取招聘需求列表
|
|
16072
|
+
*
|
|
16073
|
+
* 获取招聘需求列表
|
|
16074
|
+
*/
|
|
16075
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16076
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16077
|
+
return this.httpInstance
|
|
16078
|
+
.request({
|
|
16079
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path),
|
|
16080
|
+
method: "GET",
|
|
16081
|
+
data,
|
|
16082
|
+
params,
|
|
16083
|
+
headers,
|
|
16084
|
+
})
|
|
16085
|
+
.catch((e) => {
|
|
16086
|
+
this.logger.error(formatErrors(e));
|
|
16087
|
+
throw e;
|
|
16088
|
+
});
|
|
16089
|
+
}),
|
|
16090
|
+
/**
|
|
16091
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list_by_id&version=v1 click to debug }
|
|
16092
|
+
*
|
|
16093
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_id&project=hire&resource=job_requirement&version=v1 document }
|
|
16094
|
+
*
|
|
16095
|
+
* 获取招聘需求信息
|
|
16096
|
+
*/
|
|
16097
|
+
listById: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16098
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16099
|
+
return this.httpInstance
|
|
16100
|
+
.request({
|
|
16101
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/search`, path),
|
|
16102
|
+
method: "POST",
|
|
16103
|
+
data,
|
|
16104
|
+
params,
|
|
16105
|
+
headers,
|
|
16106
|
+
})
|
|
16107
|
+
.catch((e) => {
|
|
16108
|
+
this.logger.error(formatErrors(e));
|
|
16109
|
+
throw e;
|
|
16110
|
+
});
|
|
16111
|
+
}),
|
|
16112
|
+
/**
|
|
16113
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=update&version=v1 click to debug }
|
|
16114
|
+
*
|
|
16115
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/update document }
|
|
16116
|
+
*
|
|
16117
|
+
* 更新招聘需求
|
|
16118
|
+
*
|
|
16119
|
+
* 更新招聘需求
|
|
16120
|
+
*/
|
|
16121
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16122
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16123
|
+
return this.httpInstance
|
|
16124
|
+
.request({
|
|
16125
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path),
|
|
16126
|
+
method: "PUT",
|
|
16127
|
+
data,
|
|
16128
|
+
params,
|
|
16129
|
+
headers,
|
|
16130
|
+
})
|
|
16131
|
+
.catch((e) => {
|
|
16132
|
+
this.logger.error(formatErrors(e));
|
|
16133
|
+
throw e;
|
|
16134
|
+
});
|
|
16135
|
+
}),
|
|
16136
|
+
},
|
|
16137
|
+
/**
|
|
16138
|
+
* job_requirement_schema
|
|
16139
|
+
*/
|
|
16140
|
+
jobRequirementSchema: {
|
|
16141
|
+
/**
|
|
16142
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement_schema&apiName=list&version=v1 click to debug }
|
|
16143
|
+
*
|
|
16144
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement_schema/list document }
|
|
16145
|
+
*
|
|
16146
|
+
* 获取招聘需求模板
|
|
16147
|
+
*
|
|
16148
|
+
* 获取招聘需求模板
|
|
16149
|
+
*/
|
|
16150
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16151
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16152
|
+
return this.httpInstance
|
|
16153
|
+
.request({
|
|
16154
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`, path),
|
|
16155
|
+
method: "GET",
|
|
16156
|
+
data,
|
|
16157
|
+
params,
|
|
16158
|
+
headers,
|
|
16159
|
+
})
|
|
16160
|
+
.catch((e) => {
|
|
16161
|
+
this.logger.error(formatErrors(e));
|
|
16162
|
+
throw e;
|
|
16163
|
+
});
|
|
16164
|
+
}),
|
|
16165
|
+
},
|
|
13492
16166
|
/**
|
|
13493
16167
|
* 备注
|
|
13494
16168
|
*/
|
|
@@ -13759,54 +16433,151 @@ class Client$1 {
|
|
|
13759
16433
|
throw e;
|
|
13760
16434
|
});
|
|
13761
16435
|
}),
|
|
13762
|
-
},
|
|
13763
|
-
/**
|
|
13764
|
-
* 问卷(灰度租户可见)
|
|
13765
|
-
*/
|
|
13766
|
-
questionnaire: {
|
|
16436
|
+
},
|
|
16437
|
+
/**
|
|
16438
|
+
* 问卷(灰度租户可见)
|
|
16439
|
+
*/
|
|
16440
|
+
questionnaire: {
|
|
16441
|
+
/**
|
|
16442
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=questionnaire&apiName=list&version=v1 click to debug }
|
|
16443
|
+
*
|
|
16444
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list document }
|
|
16445
|
+
*
|
|
16446
|
+
* 获取面试满意度问卷列表
|
|
16447
|
+
*
|
|
16448
|
+
* 获取面试满意度问卷列表
|
|
16449
|
+
*/
|
|
16450
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16451
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16452
|
+
return this.httpInstance
|
|
16453
|
+
.request({
|
|
16454
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/questionnaires`, path),
|
|
16455
|
+
method: "GET",
|
|
16456
|
+
data,
|
|
16457
|
+
params,
|
|
16458
|
+
headers,
|
|
16459
|
+
})
|
|
16460
|
+
.catch((e) => {
|
|
16461
|
+
this.logger.error(formatErrors(e));
|
|
16462
|
+
throw e;
|
|
16463
|
+
});
|
|
16464
|
+
}),
|
|
16465
|
+
},
|
|
16466
|
+
/**
|
|
16467
|
+
* 内推
|
|
16468
|
+
*/
|
|
16469
|
+
referral: {
|
|
16470
|
+
/**
|
|
16471
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral&apiName=get_by_application&version=v1 click to debug }
|
|
16472
|
+
*
|
|
16473
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral/get_by_application document }
|
|
16474
|
+
*
|
|
16475
|
+
* 获取内推信息
|
|
16476
|
+
*
|
|
16477
|
+
* 根据投递 ID 获取内推信息
|
|
16478
|
+
*/
|
|
16479
|
+
getByApplication: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16480
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16481
|
+
return this.httpInstance
|
|
16482
|
+
.request({
|
|
16483
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`, path),
|
|
16484
|
+
method: "GET",
|
|
16485
|
+
data,
|
|
16486
|
+
params,
|
|
16487
|
+
headers,
|
|
16488
|
+
})
|
|
16489
|
+
.catch((e) => {
|
|
16490
|
+
this.logger.error(formatErrors(e));
|
|
16491
|
+
throw e;
|
|
16492
|
+
});
|
|
16493
|
+
}),
|
|
16494
|
+
},
|
|
16495
|
+
/**
|
|
16496
|
+
* referral_website.job_post
|
|
16497
|
+
*/
|
|
16498
|
+
referralWebsiteJobPost: {
|
|
16499
|
+
/**
|
|
16500
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_website.job_post&apiName=get&version=v1 click to debug }
|
|
16501
|
+
*
|
|
16502
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=referral_website.job_post&version=v1 document }
|
|
16503
|
+
*
|
|
16504
|
+
* 获取内推官网下职位广告详情
|
|
16505
|
+
*/
|
|
16506
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16507
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16508
|
+
return this.httpInstance
|
|
16509
|
+
.request({
|
|
16510
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts/:job_post_id`, path),
|
|
16511
|
+
method: "GET",
|
|
16512
|
+
data,
|
|
16513
|
+
params,
|
|
16514
|
+
headers,
|
|
16515
|
+
})
|
|
16516
|
+
.catch((e) => {
|
|
16517
|
+
this.logger.error(formatErrors(e));
|
|
16518
|
+
throw e;
|
|
16519
|
+
});
|
|
16520
|
+
}),
|
|
16521
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16522
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16523
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
16524
|
+
const res = yield this.httpInstance
|
|
16525
|
+
.request({
|
|
16526
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`, path),
|
|
16527
|
+
method: "GET",
|
|
16528
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
16529
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
16530
|
+
})
|
|
16531
|
+
.catch((e) => {
|
|
16532
|
+
this.logger.error(formatErrors(e));
|
|
16533
|
+
});
|
|
16534
|
+
return res;
|
|
16535
|
+
});
|
|
16536
|
+
const Iterable = {
|
|
16537
|
+
[Symbol.asyncIterator]() {
|
|
16538
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
16539
|
+
let hasMore = true;
|
|
16540
|
+
let pageToken;
|
|
16541
|
+
while (hasMore) {
|
|
16542
|
+
try {
|
|
16543
|
+
const res = yield __await(sendRequest({
|
|
16544
|
+
headers,
|
|
16545
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
16546
|
+
data,
|
|
16547
|
+
}));
|
|
16548
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
16549
|
+
// @ts-ignore
|
|
16550
|
+
has_more,
|
|
16551
|
+
// @ts-ignore
|
|
16552
|
+
page_token,
|
|
16553
|
+
// @ts-ignore
|
|
16554
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
16555
|
+
yield yield __await(rest);
|
|
16556
|
+
hasMore = Boolean(has_more);
|
|
16557
|
+
pageToken = page_token || next_page_token;
|
|
16558
|
+
}
|
|
16559
|
+
catch (e) {
|
|
16560
|
+
yield yield __await(null);
|
|
16561
|
+
break;
|
|
16562
|
+
}
|
|
16563
|
+
}
|
|
16564
|
+
});
|
|
16565
|
+
},
|
|
16566
|
+
};
|
|
16567
|
+
return Iterable;
|
|
16568
|
+
}),
|
|
13767
16569
|
/**
|
|
13768
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
13769
|
-
*
|
|
13770
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list document }
|
|
16570
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_website.job_post&apiName=list&version=v1 click to debug }
|
|
13771
16571
|
*
|
|
13772
|
-
*
|
|
16572
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=referral_website.job_post&version=v1 document }
|
|
13773
16573
|
*
|
|
13774
|
-
*
|
|
16574
|
+
* 获取内推官网下的职位列表。自定义数据暂不支持列表获取,请从「获取内推官网下职位广告详情」接口获取
|
|
13775
16575
|
*/
|
|
13776
16576
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13777
16577
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13778
16578
|
return this.httpInstance
|
|
13779
16579
|
.request({
|
|
13780
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
13781
|
-
method: "GET",
|
|
13782
|
-
data,
|
|
13783
|
-
params,
|
|
13784
|
-
headers,
|
|
13785
|
-
})
|
|
13786
|
-
.catch((e) => {
|
|
13787
|
-
this.logger.error(formatErrors(e));
|
|
13788
|
-
throw e;
|
|
13789
|
-
});
|
|
13790
|
-
}),
|
|
13791
|
-
},
|
|
13792
|
-
/**
|
|
13793
|
-
* 内推
|
|
13794
|
-
*/
|
|
13795
|
-
referral: {
|
|
13796
|
-
/**
|
|
13797
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral&apiName=get_by_application&version=v1 click to debug }
|
|
13798
|
-
*
|
|
13799
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral/get_by_application document }
|
|
13800
|
-
*
|
|
13801
|
-
* 获取内推信息
|
|
13802
|
-
*
|
|
13803
|
-
* 根据投递 ID 获取内推信息
|
|
13804
|
-
*/
|
|
13805
|
-
getByApplication: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13806
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13807
|
-
return this.httpInstance
|
|
13808
|
-
.request({
|
|
13809
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/referrals/get_by_application`, path),
|
|
16580
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_websites/job_posts`, path),
|
|
13810
16581
|
method: "GET",
|
|
13811
16582
|
data,
|
|
13812
16583
|
params,
|
|
@@ -15616,6 +18387,28 @@ class Client$1 {
|
|
|
15616
18387
|
throw e;
|
|
15617
18388
|
});
|
|
15618
18389
|
}),
|
|
18390
|
+
/**
|
|
18391
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=update&version=v1 click to debug }
|
|
18392
|
+
*
|
|
18393
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=message&version=v1 document }
|
|
18394
|
+
*
|
|
18395
|
+
* 编辑已发送的消息内容,当前仅支持编辑文本和富文本消息。
|
|
18396
|
+
*/
|
|
18397
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18398
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18399
|
+
return this.httpInstance
|
|
18400
|
+
.request({
|
|
18401
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path),
|
|
18402
|
+
method: "PUT",
|
|
18403
|
+
data,
|
|
18404
|
+
params,
|
|
18405
|
+
headers,
|
|
18406
|
+
})
|
|
18407
|
+
.catch((e) => {
|
|
18408
|
+
this.logger.error(formatErrors(e));
|
|
18409
|
+
throw e;
|
|
18410
|
+
});
|
|
18411
|
+
}),
|
|
15619
18412
|
/**
|
|
15620
18413
|
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=urgent_app&version=v1 click to debug }
|
|
15621
18414
|
*
|
|
@@ -15764,6 +18557,36 @@ class Client$1 {
|
|
|
15764
18557
|
throw e;
|
|
15765
18558
|
});
|
|
15766
18559
|
}),
|
|
18560
|
+
/**
|
|
18561
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=update&version=v1 click to debug }
|
|
18562
|
+
*
|
|
18563
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=im&resource=message&version=v1 document }
|
|
18564
|
+
*
|
|
18565
|
+
* 通过模版消息卡片
|
|
18566
|
+
*/
|
|
18567
|
+
updateByCard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18568
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18569
|
+
const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
|
|
18570
|
+
const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
|
|
18571
|
+
type: "template",
|
|
18572
|
+
data: {
|
|
18573
|
+
template_id: template_id,
|
|
18574
|
+
template_variable: template_variable,
|
|
18575
|
+
},
|
|
18576
|
+
}) }, rest);
|
|
18577
|
+
return this.httpInstance
|
|
18578
|
+
.request({
|
|
18579
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id`, path),
|
|
18580
|
+
method: "PUT",
|
|
18581
|
+
data: targetData,
|
|
18582
|
+
params,
|
|
18583
|
+
headers,
|
|
18584
|
+
})
|
|
18585
|
+
.catch((e) => {
|
|
18586
|
+
this.logger.error(formatErrors(e));
|
|
18587
|
+
throw e;
|
|
18588
|
+
});
|
|
18589
|
+
}),
|
|
15767
18590
|
},
|
|
15768
18591
|
/**
|
|
15769
18592
|
* 消息 - 表情回复
|
|
@@ -16073,6 +18896,107 @@ class Client$1 {
|
|
|
16073
18896
|
});
|
|
16074
18897
|
}),
|
|
16075
18898
|
},
|
|
18899
|
+
/**
|
|
18900
|
+
* 特别关注(灰度租户可见)
|
|
18901
|
+
*/
|
|
18902
|
+
specialFocus: {
|
|
18903
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18904
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18905
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
18906
|
+
const res = yield this.httpInstance
|
|
18907
|
+
.request({
|
|
18908
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/special_focus`, path),
|
|
18909
|
+
method: "GET",
|
|
18910
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
18911
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
18912
|
+
})
|
|
18913
|
+
.catch((e) => {
|
|
18914
|
+
this.logger.error(formatErrors(e));
|
|
18915
|
+
});
|
|
18916
|
+
return res;
|
|
18917
|
+
});
|
|
18918
|
+
const Iterable = {
|
|
18919
|
+
[Symbol.asyncIterator]() {
|
|
18920
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
18921
|
+
let hasMore = true;
|
|
18922
|
+
let pageToken;
|
|
18923
|
+
while (hasMore) {
|
|
18924
|
+
try {
|
|
18925
|
+
const res = yield __await(sendRequest({
|
|
18926
|
+
headers,
|
|
18927
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
18928
|
+
data,
|
|
18929
|
+
}));
|
|
18930
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
18931
|
+
// @ts-ignore
|
|
18932
|
+
has_more,
|
|
18933
|
+
// @ts-ignore
|
|
18934
|
+
page_token,
|
|
18935
|
+
// @ts-ignore
|
|
18936
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
18937
|
+
yield yield __await(rest);
|
|
18938
|
+
hasMore = Boolean(has_more);
|
|
18939
|
+
pageToken = page_token || next_page_token;
|
|
18940
|
+
}
|
|
18941
|
+
catch (e) {
|
|
18942
|
+
yield yield __await(null);
|
|
18943
|
+
break;
|
|
18944
|
+
}
|
|
18945
|
+
}
|
|
18946
|
+
});
|
|
18947
|
+
},
|
|
18948
|
+
};
|
|
18949
|
+
return Iterable;
|
|
18950
|
+
}),
|
|
18951
|
+
/**
|
|
18952
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=special_focus&apiName=list&version=v1 click to debug }
|
|
18953
|
+
*
|
|
18954
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/special_focus/list document }
|
|
18955
|
+
*
|
|
18956
|
+
* 获取特别关注列表
|
|
18957
|
+
*
|
|
18958
|
+
* 获取用户的特别关注列表。
|
|
18959
|
+
*/
|
|
18960
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18961
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18962
|
+
return this.httpInstance
|
|
18963
|
+
.request({
|
|
18964
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/special_focus`, path),
|
|
18965
|
+
method: "GET",
|
|
18966
|
+
data,
|
|
18967
|
+
params,
|
|
18968
|
+
headers,
|
|
18969
|
+
})
|
|
18970
|
+
.catch((e) => {
|
|
18971
|
+
this.logger.error(formatErrors(e));
|
|
18972
|
+
throw e;
|
|
18973
|
+
});
|
|
18974
|
+
}),
|
|
18975
|
+
/**
|
|
18976
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=special_focus&apiName=unread&version=v1 click to debug }
|
|
18977
|
+
*
|
|
18978
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/special_focus/unread document }
|
|
18979
|
+
*
|
|
18980
|
+
* 获取特别关注未读信息
|
|
18981
|
+
*
|
|
18982
|
+
* 支持按单聊类型和群聊类型获取用户的特别关注未读消息数。
|
|
18983
|
+
*/
|
|
18984
|
+
unread: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18985
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18986
|
+
return this.httpInstance
|
|
18987
|
+
.request({
|
|
18988
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/special_focus/unread`, path),
|
|
18989
|
+
method: "POST",
|
|
18990
|
+
data,
|
|
18991
|
+
params,
|
|
18992
|
+
headers,
|
|
18993
|
+
})
|
|
18994
|
+
.catch((e) => {
|
|
18995
|
+
this.logger.error(formatErrors(e));
|
|
18996
|
+
throw e;
|
|
18997
|
+
});
|
|
18998
|
+
}),
|
|
18999
|
+
},
|
|
16076
19000
|
};
|
|
16077
19001
|
/**
|
|
16078
19002
|
* 邮箱
|
|
@@ -16328,20 +19252,145 @@ class Client$1 {
|
|
|
16328
19252
|
});
|
|
16329
19253
|
}),
|
|
16330
19254
|
/**
|
|
16331
|
-
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=update&version=v1 click to debug }
|
|
19255
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup&apiName=update&version=v1 click to debug }
|
|
19256
|
+
*
|
|
19257
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/update document }
|
|
19258
|
+
*
|
|
19259
|
+
* 更新邮件组
|
|
19260
|
+
*
|
|
19261
|
+
* 更新邮件组所有信息
|
|
19262
|
+
*/
|
|
19263
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19264
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19265
|
+
return this.httpInstance
|
|
19266
|
+
.request({
|
|
19267
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path),
|
|
19268
|
+
method: "PUT",
|
|
19269
|
+
data,
|
|
19270
|
+
params,
|
|
19271
|
+
headers,
|
|
19272
|
+
})
|
|
19273
|
+
.catch((e) => {
|
|
19274
|
+
this.logger.error(formatErrors(e));
|
|
19275
|
+
throw e;
|
|
19276
|
+
});
|
|
19277
|
+
}),
|
|
19278
|
+
},
|
|
19279
|
+
/**
|
|
19280
|
+
* 邮件组管理员
|
|
19281
|
+
*/
|
|
19282
|
+
mailgroupManager: {
|
|
19283
|
+
/**
|
|
19284
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=batch_create&version=v1 click to debug }
|
|
19285
|
+
*
|
|
19286
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_create document }
|
|
19287
|
+
*
|
|
19288
|
+
* 批量创建邮件组管理员
|
|
19289
|
+
*
|
|
19290
|
+
* 批量创建邮件组管理员
|
|
19291
|
+
*/
|
|
19292
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19293
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19294
|
+
return this.httpInstance
|
|
19295
|
+
.request({
|
|
19296
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_create`, path),
|
|
19297
|
+
method: "POST",
|
|
19298
|
+
data,
|
|
19299
|
+
params,
|
|
19300
|
+
headers,
|
|
19301
|
+
})
|
|
19302
|
+
.catch((e) => {
|
|
19303
|
+
this.logger.error(formatErrors(e));
|
|
19304
|
+
throw e;
|
|
19305
|
+
});
|
|
19306
|
+
}),
|
|
19307
|
+
/**
|
|
19308
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=batch_delete&version=v1 click to debug }
|
|
19309
|
+
*
|
|
19310
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_delete document }
|
|
19311
|
+
*
|
|
19312
|
+
* 批量删除邮件组管理员
|
|
19313
|
+
*
|
|
19314
|
+
* 批量删除邮件组管理员
|
|
19315
|
+
*/
|
|
19316
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19317
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19318
|
+
return this.httpInstance
|
|
19319
|
+
.request({
|
|
19320
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers/batch_delete`, path),
|
|
19321
|
+
method: "POST",
|
|
19322
|
+
data,
|
|
19323
|
+
params,
|
|
19324
|
+
headers,
|
|
19325
|
+
})
|
|
19326
|
+
.catch((e) => {
|
|
19327
|
+
this.logger.error(formatErrors(e));
|
|
19328
|
+
throw e;
|
|
19329
|
+
});
|
|
19330
|
+
}),
|
|
19331
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19332
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19333
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
19334
|
+
const res = yield this.httpInstance
|
|
19335
|
+
.request({
|
|
19336
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`, path),
|
|
19337
|
+
method: "GET",
|
|
19338
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
19339
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
19340
|
+
})
|
|
19341
|
+
.catch((e) => {
|
|
19342
|
+
this.logger.error(formatErrors(e));
|
|
19343
|
+
});
|
|
19344
|
+
return res;
|
|
19345
|
+
});
|
|
19346
|
+
const Iterable = {
|
|
19347
|
+
[Symbol.asyncIterator]() {
|
|
19348
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
19349
|
+
let hasMore = true;
|
|
19350
|
+
let pageToken;
|
|
19351
|
+
while (hasMore) {
|
|
19352
|
+
try {
|
|
19353
|
+
const res = yield __await(sendRequest({
|
|
19354
|
+
headers,
|
|
19355
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
19356
|
+
data,
|
|
19357
|
+
}));
|
|
19358
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
19359
|
+
// @ts-ignore
|
|
19360
|
+
has_more,
|
|
19361
|
+
// @ts-ignore
|
|
19362
|
+
page_token,
|
|
19363
|
+
// @ts-ignore
|
|
19364
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
19365
|
+
yield yield __await(rest);
|
|
19366
|
+
hasMore = Boolean(has_more);
|
|
19367
|
+
pageToken = page_token || next_page_token;
|
|
19368
|
+
}
|
|
19369
|
+
catch (e) {
|
|
19370
|
+
yield yield __await(null);
|
|
19371
|
+
break;
|
|
19372
|
+
}
|
|
19373
|
+
}
|
|
19374
|
+
});
|
|
19375
|
+
},
|
|
19376
|
+
};
|
|
19377
|
+
return Iterable;
|
|
19378
|
+
}),
|
|
19379
|
+
/**
|
|
19380
|
+
* {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.manager&apiName=list&version=v1 click to debug }
|
|
16332
19381
|
*
|
|
16333
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/
|
|
19382
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/list document }
|
|
16334
19383
|
*
|
|
16335
|
-
*
|
|
19384
|
+
* 批量获取邮件组管理员
|
|
16336
19385
|
*
|
|
16337
|
-
*
|
|
19386
|
+
* 批量获取邮件组管理员
|
|
16338
19387
|
*/
|
|
16339
|
-
|
|
19388
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16340
19389
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16341
19390
|
return this.httpInstance
|
|
16342
19391
|
.request({
|
|
16343
|
-
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id`, path),
|
|
16344
|
-
method: "
|
|
19392
|
+
url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/managers`, path),
|
|
19393
|
+
method: "GET",
|
|
16345
19394
|
data,
|
|
16346
19395
|
params,
|
|
16347
19396
|
headers,
|
|
@@ -17402,9 +20451,63 @@ class Client$1 {
|
|
|
17402
20451
|
},
|
|
17403
20452
|
};
|
|
17404
20453
|
/**
|
|
17405
|
-
|
|
20454
|
+
* 主数据
|
|
20455
|
+
*/
|
|
20456
|
+
this.mdm = {
|
|
20457
|
+
/**
|
|
20458
|
+
* 数据维度
|
|
17406
20459
|
*/
|
|
17407
|
-
|
|
20460
|
+
userAuthDataRelation: {
|
|
20461
|
+
/**
|
|
20462
|
+
* {@link https://open.feishu.cn/api-explorer?project=mdm&resource=user_auth_data_relation&apiName=bind&version=v1 click to debug }
|
|
20463
|
+
*
|
|
20464
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/bind document }
|
|
20465
|
+
*
|
|
20466
|
+
* 用户数据维度绑定
|
|
20467
|
+
*
|
|
20468
|
+
* 通过该接口,可为指定应用下的用户绑定一类数据维度,支持批量给多个用户同时增量授权。
|
|
20469
|
+
*/
|
|
20470
|
+
bind: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20471
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20472
|
+
return this.httpInstance
|
|
20473
|
+
.request({
|
|
20474
|
+
url: fillApiPath(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/bind`, path),
|
|
20475
|
+
method: "POST",
|
|
20476
|
+
data,
|
|
20477
|
+
params,
|
|
20478
|
+
headers,
|
|
20479
|
+
})
|
|
20480
|
+
.catch((e) => {
|
|
20481
|
+
this.logger.error(formatErrors(e));
|
|
20482
|
+
throw e;
|
|
20483
|
+
});
|
|
20484
|
+
}),
|
|
20485
|
+
/**
|
|
20486
|
+
* {@link https://open.feishu.cn/api-explorer?project=mdm&resource=user_auth_data_relation&apiName=unbind&version=v1 click to debug }
|
|
20487
|
+
*
|
|
20488
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/unbind document }
|
|
20489
|
+
*
|
|
20490
|
+
* 用户数据维度解绑
|
|
20491
|
+
*
|
|
20492
|
+
* 通过该接口,可为指定应用下的指定用户解除一类数据维度。
|
|
20493
|
+
*/
|
|
20494
|
+
unbind: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20495
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20496
|
+
return this.httpInstance
|
|
20497
|
+
.request({
|
|
20498
|
+
url: fillApiPath(`${this.domain}/open-apis/mdm/v1/user_auth_data_relations/unbind`, path),
|
|
20499
|
+
method: "POST",
|
|
20500
|
+
data,
|
|
20501
|
+
params,
|
|
20502
|
+
headers,
|
|
20503
|
+
})
|
|
20504
|
+
.catch((e) => {
|
|
20505
|
+
this.logger.error(formatErrors(e));
|
|
20506
|
+
throw e;
|
|
20507
|
+
});
|
|
20508
|
+
}),
|
|
20509
|
+
},
|
|
20510
|
+
};
|
|
17408
20511
|
/**
|
|
17409
20512
|
|
|
17410
20513
|
*/
|
|
@@ -17727,14 +20830,205 @@ class Client$1 {
|
|
|
17727
20830
|
*
|
|
17728
20831
|
* 获取OKR进展记录
|
|
17729
20832
|
*
|
|
17730
|
-
* 根据ID获取OKR进展记录详情
|
|
20833
|
+
* 根据ID获取OKR进展记录详情
|
|
20834
|
+
*/
|
|
20835
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20836
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20837
|
+
return this.httpInstance
|
|
20838
|
+
.request({
|
|
20839
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path),
|
|
20840
|
+
method: "GET",
|
|
20841
|
+
data,
|
|
20842
|
+
params,
|
|
20843
|
+
headers,
|
|
20844
|
+
})
|
|
20845
|
+
.catch((e) => {
|
|
20846
|
+
this.logger.error(formatErrors(e));
|
|
20847
|
+
throw e;
|
|
20848
|
+
});
|
|
20849
|
+
}),
|
|
20850
|
+
/**
|
|
20851
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=progress_record&apiName=update&version=v1 click to debug }
|
|
20852
|
+
*
|
|
20853
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/update document }
|
|
20854
|
+
*
|
|
20855
|
+
* 更新OKR进展记录
|
|
20856
|
+
*
|
|
20857
|
+
* 根据OKR进展记录ID更新进展详情
|
|
20858
|
+
*/
|
|
20859
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20860
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20861
|
+
return this.httpInstance
|
|
20862
|
+
.request({
|
|
20863
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/progress_records/:progress_id`, path),
|
|
20864
|
+
method: "PUT",
|
|
20865
|
+
data,
|
|
20866
|
+
params,
|
|
20867
|
+
headers,
|
|
20868
|
+
})
|
|
20869
|
+
.catch((e) => {
|
|
20870
|
+
this.logger.error(formatErrors(e));
|
|
20871
|
+
throw e;
|
|
20872
|
+
});
|
|
20873
|
+
}),
|
|
20874
|
+
},
|
|
20875
|
+
/**
|
|
20876
|
+
* 用户OKR
|
|
20877
|
+
*/
|
|
20878
|
+
userOkr: {
|
|
20879
|
+
/**
|
|
20880
|
+
* {@link https://open.feishu.cn/api-explorer?project=okr&resource=user.okr&apiName=list&version=v1 click to debug }
|
|
20881
|
+
*
|
|
20882
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/user-okr/list document }
|
|
20883
|
+
*
|
|
20884
|
+
* 获取用户的OKR列表
|
|
20885
|
+
*
|
|
20886
|
+
* 根据用户的id获取OKR列表
|
|
20887
|
+
*
|
|
20888
|
+
* 使用<md-tag mode="inline" type="token-tenant">tenant_access_token</md-tag>需要额外申请权限<md-perm ;href="https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN">以应用身份访问OKR信息</md-perm>
|
|
20889
|
+
*/
|
|
20890
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20891
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20892
|
+
return this.httpInstance
|
|
20893
|
+
.request({
|
|
20894
|
+
url: fillApiPath(`${this.domain}/open-apis/okr/v1/users/:user_id/okrs`, path),
|
|
20895
|
+
method: "GET",
|
|
20896
|
+
data,
|
|
20897
|
+
params,
|
|
20898
|
+
headers,
|
|
20899
|
+
})
|
|
20900
|
+
.catch((e) => {
|
|
20901
|
+
this.logger.error(formatErrors(e));
|
|
20902
|
+
throw e;
|
|
20903
|
+
});
|
|
20904
|
+
}),
|
|
20905
|
+
},
|
|
20906
|
+
};
|
|
20907
|
+
/**
|
|
20908
|
+
* AI能力
|
|
20909
|
+
*/
|
|
20910
|
+
this.optical_char_recognition = {
|
|
20911
|
+
/**
|
|
20912
|
+
* 图片识别
|
|
20913
|
+
*/
|
|
20914
|
+
image: {
|
|
20915
|
+
/**
|
|
20916
|
+
* {@link https://open.feishu.cn/api-explorer?project=optical_char_recognition&resource=image&apiName=basic_recognize&version=v1 click to debug }
|
|
20917
|
+
*
|
|
20918
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/optical_char_recognition-v1/image/basic_recognize document }
|
|
20919
|
+
*
|
|
20920
|
+
* 基础图片识别 (OCR)
|
|
20921
|
+
*
|
|
20922
|
+
* 可识别图片中的文字,按图片中的区域划分,分段返回文本列表
|
|
20923
|
+
*
|
|
20924
|
+
* 单租户限流:20QPS,同租户下的应用没有限流,共享本租户的 20QPS 限流
|
|
20925
|
+
*/
|
|
20926
|
+
basicRecognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20927
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20928
|
+
return this.httpInstance
|
|
20929
|
+
.request({
|
|
20930
|
+
url: fillApiPath(`${this.domain}/open-apis/optical_char_recognition/v1/image/basic_recognize`, path),
|
|
20931
|
+
method: "POST",
|
|
20932
|
+
data,
|
|
20933
|
+
params,
|
|
20934
|
+
headers,
|
|
20935
|
+
})
|
|
20936
|
+
.catch((e) => {
|
|
20937
|
+
this.logger.error(formatErrors(e));
|
|
20938
|
+
throw e;
|
|
20939
|
+
});
|
|
20940
|
+
}),
|
|
20941
|
+
},
|
|
20942
|
+
};
|
|
20943
|
+
/**
|
|
20944
|
+
* 帐号
|
|
20945
|
+
*/
|
|
20946
|
+
this.passport = {
|
|
20947
|
+
/**
|
|
20948
|
+
* 登录态
|
|
20949
|
+
*/
|
|
20950
|
+
session: {
|
|
20951
|
+
/**
|
|
20952
|
+
* {@link https://open.feishu.cn/api-explorer?project=passport&resource=session&apiName=query&version=v1 click to debug }
|
|
20953
|
+
*
|
|
20954
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/passport-v1/session/query document }
|
|
20955
|
+
*
|
|
20956
|
+
* 批量获取用户登录信息(脱敏)
|
|
20957
|
+
*
|
|
20958
|
+
* 该接口用于查询用户的登录信息
|
|
20959
|
+
*/
|
|
20960
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20961
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20962
|
+
return this.httpInstance
|
|
20963
|
+
.request({
|
|
20964
|
+
url: fillApiPath(`${this.domain}/open-apis/passport/v1/sessions/query`, path),
|
|
20965
|
+
method: "POST",
|
|
20966
|
+
data,
|
|
20967
|
+
params,
|
|
20968
|
+
headers,
|
|
20969
|
+
})
|
|
20970
|
+
.catch((e) => {
|
|
20971
|
+
this.logger.error(formatErrors(e));
|
|
20972
|
+
throw e;
|
|
20973
|
+
});
|
|
20974
|
+
}),
|
|
20975
|
+
},
|
|
20976
|
+
};
|
|
20977
|
+
/**
|
|
20978
|
+
|
|
20979
|
+
*/
|
|
20980
|
+
this.people_admin = {};
|
|
20981
|
+
/**
|
|
20982
|
+
|
|
20983
|
+
*/
|
|
20984
|
+
this.people_bytedance = {};
|
|
20985
|
+
/**
|
|
20986
|
+
* 个人设置
|
|
20987
|
+
*/
|
|
20988
|
+
this.personal_settings = {
|
|
20989
|
+
/**
|
|
20990
|
+
* 系统状态
|
|
20991
|
+
*/
|
|
20992
|
+
systemStatus: {
|
|
20993
|
+
/**
|
|
20994
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_close&version=v1 click to debug }
|
|
20995
|
+
*
|
|
20996
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_close document }
|
|
20997
|
+
*
|
|
20998
|
+
* 批量关闭系统状态
|
|
20999
|
+
*
|
|
21000
|
+
* 批量关闭用户系统状态可用
|
|
21001
|
+
*/
|
|
21002
|
+
batchClose: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
21003
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
21004
|
+
return this.httpInstance
|
|
21005
|
+
.request({
|
|
21006
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`, path),
|
|
21007
|
+
method: "POST",
|
|
21008
|
+
data,
|
|
21009
|
+
params,
|
|
21010
|
+
headers,
|
|
21011
|
+
})
|
|
21012
|
+
.catch((e) => {
|
|
21013
|
+
this.logger.error(formatErrors(e));
|
|
21014
|
+
throw e;
|
|
21015
|
+
});
|
|
21016
|
+
}),
|
|
21017
|
+
/**
|
|
21018
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_open&version=v1 click to debug }
|
|
21019
|
+
*
|
|
21020
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_open document }
|
|
21021
|
+
*
|
|
21022
|
+
* 批量开启系统状态
|
|
21023
|
+
*
|
|
21024
|
+
* 批量开启用户系统状态可用
|
|
17731
21025
|
*/
|
|
17732
|
-
|
|
21026
|
+
batchOpen: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17733
21027
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17734
21028
|
return this.httpInstance
|
|
17735
21029
|
.request({
|
|
17736
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
17737
|
-
method: "
|
|
21030
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`, path),
|
|
21031
|
+
method: "POST",
|
|
17738
21032
|
data,
|
|
17739
21033
|
params,
|
|
17740
21034
|
headers,
|
|
@@ -17745,20 +21039,22 @@ class Client$1 {
|
|
|
17745
21039
|
});
|
|
17746
21040
|
}),
|
|
17747
21041
|
/**
|
|
17748
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
21042
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=create&version=v1 click to debug }
|
|
17749
21043
|
*
|
|
17750
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/
|
|
21044
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/create document }
|
|
17751
21045
|
*
|
|
17752
|
-
*
|
|
21046
|
+
* 创建系统状态
|
|
17753
21047
|
*
|
|
17754
|
-
*
|
|
21048
|
+
* 创建租户维度的系统状态。
|
|
21049
|
+
*
|
|
21050
|
+
* 注意事项:;- 操作的数据为租户维度数据,请小心操作。;- 每个租户最多创建10个系统状态。
|
|
17755
21051
|
*/
|
|
17756
|
-
|
|
21052
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17757
21053
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17758
21054
|
return this.httpInstance
|
|
17759
21055
|
.request({
|
|
17760
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
17761
|
-
method: "
|
|
21056
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path),
|
|
21057
|
+
method: "POST",
|
|
17762
21058
|
data,
|
|
17763
21059
|
params,
|
|
17764
21060
|
headers,
|
|
@@ -17768,28 +21064,23 @@ class Client$1 {
|
|
|
17768
21064
|
throw e;
|
|
17769
21065
|
});
|
|
17770
21066
|
}),
|
|
17771
|
-
},
|
|
17772
|
-
/**
|
|
17773
|
-
* 用户OKR
|
|
17774
|
-
*/
|
|
17775
|
-
userOkr: {
|
|
17776
21067
|
/**
|
|
17777
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
21068
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=delete&version=v1 click to debug }
|
|
17778
21069
|
*
|
|
17779
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/
|
|
21070
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/delete document }
|
|
17780
21071
|
*
|
|
17781
|
-
*
|
|
21072
|
+
* 删除系统状态
|
|
17782
21073
|
*
|
|
17783
|
-
*
|
|
21074
|
+
* 删除租户维度的系统状态。
|
|
17784
21075
|
*
|
|
17785
|
-
*
|
|
21076
|
+
* 注意事项:;- 操作的数据为租户维度数据,请小心操作。 ;- 删除系统状态后,并不影响正在使用该状态用户下系统状态的客户端展示。
|
|
17786
21077
|
*/
|
|
17787
|
-
|
|
21078
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17788
21079
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17789
21080
|
return this.httpInstance
|
|
17790
21081
|
.request({
|
|
17791
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
17792
|
-
method: "
|
|
21082
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path),
|
|
21083
|
+
method: "DELETE",
|
|
17793
21084
|
data,
|
|
17794
21085
|
params,
|
|
17795
21086
|
headers,
|
|
@@ -17799,33 +21090,69 @@ class Client$1 {
|
|
|
17799
21090
|
throw e;
|
|
17800
21091
|
});
|
|
17801
21092
|
}),
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
21093
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
21094
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
21095
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
21096
|
+
const res = yield this.httpInstance
|
|
21097
|
+
.request({
|
|
21098
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path),
|
|
21099
|
+
method: "GET",
|
|
21100
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
21101
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
21102
|
+
})
|
|
21103
|
+
.catch((e) => {
|
|
21104
|
+
this.logger.error(formatErrors(e));
|
|
21105
|
+
});
|
|
21106
|
+
return res;
|
|
21107
|
+
});
|
|
21108
|
+
const Iterable = {
|
|
21109
|
+
[Symbol.asyncIterator]() {
|
|
21110
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
21111
|
+
let hasMore = true;
|
|
21112
|
+
let pageToken;
|
|
21113
|
+
while (hasMore) {
|
|
21114
|
+
try {
|
|
21115
|
+
const res = yield __await(sendRequest({
|
|
21116
|
+
headers,
|
|
21117
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
21118
|
+
data,
|
|
21119
|
+
}));
|
|
21120
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
21121
|
+
// @ts-ignore
|
|
21122
|
+
has_more,
|
|
21123
|
+
// @ts-ignore
|
|
21124
|
+
page_token,
|
|
21125
|
+
// @ts-ignore
|
|
21126
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
21127
|
+
yield yield __await(rest);
|
|
21128
|
+
hasMore = Boolean(has_more);
|
|
21129
|
+
pageToken = page_token || next_page_token;
|
|
21130
|
+
}
|
|
21131
|
+
catch (e) {
|
|
21132
|
+
yield yield __await(null);
|
|
21133
|
+
break;
|
|
21134
|
+
}
|
|
21135
|
+
}
|
|
21136
|
+
});
|
|
21137
|
+
},
|
|
21138
|
+
};
|
|
21139
|
+
return Iterable;
|
|
21140
|
+
}),
|
|
17812
21141
|
/**
|
|
17813
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
21142
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=list&version=v1 click to debug }
|
|
17814
21143
|
*
|
|
17815
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/
|
|
17816
|
-
*
|
|
17817
|
-
* 基础图片识别 (OCR)
|
|
21144
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/list document }
|
|
17818
21145
|
*
|
|
17819
|
-
*
|
|
21146
|
+
* 获取系统状态
|
|
17820
21147
|
*
|
|
17821
|
-
*
|
|
21148
|
+
* 获取租户下所有系统状态
|
|
17822
21149
|
*/
|
|
17823
|
-
|
|
21150
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17824
21151
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17825
21152
|
return this.httpInstance
|
|
17826
21153
|
.request({
|
|
17827
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
17828
|
-
method: "
|
|
21154
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path),
|
|
21155
|
+
method: "GET",
|
|
17829
21156
|
data,
|
|
17830
21157
|
params,
|
|
17831
21158
|
headers,
|
|
@@ -17835,31 +21162,23 @@ class Client$1 {
|
|
|
17835
21162
|
throw e;
|
|
17836
21163
|
});
|
|
17837
21164
|
}),
|
|
17838
|
-
},
|
|
17839
|
-
};
|
|
17840
|
-
/**
|
|
17841
|
-
* 帐号
|
|
17842
|
-
*/
|
|
17843
|
-
this.passport = {
|
|
17844
|
-
/**
|
|
17845
|
-
* 登录态
|
|
17846
|
-
*/
|
|
17847
|
-
session: {
|
|
17848
21165
|
/**
|
|
17849
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
21166
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=patch&version=v1 click to debug }
|
|
17850
21167
|
*
|
|
17851
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/
|
|
21168
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/patch document }
|
|
17852
21169
|
*
|
|
17853
|
-
*
|
|
21170
|
+
* 修改系统状态
|
|
17854
21171
|
*
|
|
17855
|
-
*
|
|
21172
|
+
* 修改租户维度系统状态。
|
|
21173
|
+
*
|
|
21174
|
+
* 注意事项:;- 操作的数据为租户维度数据,请小心操作。 ;- 修改系统状态后,并不影响正在使用的用户。该用户的系统状态可用时间到期后,再次被开启可用的时候,用户客户端才会同步到更新后的系统状态。
|
|
17856
21175
|
*/
|
|
17857
|
-
|
|
21176
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17858
21177
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17859
21178
|
return this.httpInstance
|
|
17860
21179
|
.request({
|
|
17861
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
17862
|
-
method: "
|
|
21180
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path),
|
|
21181
|
+
method: "PATCH",
|
|
17863
21182
|
data,
|
|
17864
21183
|
params,
|
|
17865
21184
|
headers,
|
|
@@ -17871,14 +21190,6 @@ class Client$1 {
|
|
|
17871
21190
|
}),
|
|
17872
21191
|
},
|
|
17873
21192
|
};
|
|
17874
|
-
/**
|
|
17875
|
-
|
|
17876
|
-
*/
|
|
17877
|
-
this.people_admin = {};
|
|
17878
|
-
/**
|
|
17879
|
-
|
|
17880
|
-
*/
|
|
17881
|
-
this.people_bytedance = {};
|
|
17882
21193
|
/**
|
|
17883
21194
|
|
|
17884
21195
|
*/
|
|
@@ -21038,6 +24349,51 @@ class Client$1 {
|
|
|
21038
24349
|
});
|
|
21039
24350
|
}),
|
|
21040
24351
|
},
|
|
24352
|
+
/**
|
|
24353
|
+
* reserve_config.disable_inform
|
|
24354
|
+
*/
|
|
24355
|
+
reserveConfigDisableInform: {
|
|
24356
|
+
/**
|
|
24357
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.disable_inform&apiName=get&version=v1 click to debug }
|
|
24358
|
+
*
|
|
24359
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.disable_inform&version=v1 document }
|
|
24360
|
+
*/
|
|
24361
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
24362
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
24363
|
+
return this.httpInstance
|
|
24364
|
+
.request({
|
|
24365
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`, path),
|
|
24366
|
+
method: "GET",
|
|
24367
|
+
data,
|
|
24368
|
+
params,
|
|
24369
|
+
headers,
|
|
24370
|
+
})
|
|
24371
|
+
.catch((e) => {
|
|
24372
|
+
this.logger.error(formatErrors(e));
|
|
24373
|
+
throw e;
|
|
24374
|
+
});
|
|
24375
|
+
}),
|
|
24376
|
+
/**
|
|
24377
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.disable_inform&apiName=patch&version=v1 click to debug }
|
|
24378
|
+
*
|
|
24379
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.disable_inform&version=v1 document }
|
|
24380
|
+
*/
|
|
24381
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
24382
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
24383
|
+
return this.httpInstance
|
|
24384
|
+
.request({
|
|
24385
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/disable_inform`, path),
|
|
24386
|
+
method: "PATCH",
|
|
24387
|
+
data,
|
|
24388
|
+
params,
|
|
24389
|
+
headers,
|
|
24390
|
+
})
|
|
24391
|
+
.catch((e) => {
|
|
24392
|
+
this.logger.error(formatErrors(e));
|
|
24393
|
+
throw e;
|
|
24394
|
+
});
|
|
24395
|
+
}),
|
|
24396
|
+
},
|
|
21041
24397
|
/**
|
|
21042
24398
|
* reserve_config.form
|
|
21043
24399
|
*/
|
|
@@ -21474,6 +24830,46 @@ class Client$1 {
|
|
|
21474
24830
|
throw e;
|
|
21475
24831
|
});
|
|
21476
24832
|
}),
|
|
24833
|
+
/**
|
|
24834
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set_checkboard_access_code&version=v1 click to debug }
|
|
24835
|
+
*
|
|
24836
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set_checkboard_access_code&project=vc&resource=room_config&version=v1 document }
|
|
24837
|
+
*/
|
|
24838
|
+
setCheckboardAccessCode: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
24839
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
24840
|
+
return this.httpInstance
|
|
24841
|
+
.request({
|
|
24842
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set_checkboard_access_code`, path),
|
|
24843
|
+
method: "POST",
|
|
24844
|
+
data,
|
|
24845
|
+
params,
|
|
24846
|
+
headers,
|
|
24847
|
+
})
|
|
24848
|
+
.catch((e) => {
|
|
24849
|
+
this.logger.error(formatErrors(e));
|
|
24850
|
+
throw e;
|
|
24851
|
+
});
|
|
24852
|
+
}),
|
|
24853
|
+
/**
|
|
24854
|
+
* {@link https://open.feishu.cn/api-explorer?project=vc&resource=room_config&apiName=set_room_access_code&version=v1 click to debug }
|
|
24855
|
+
*
|
|
24856
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=set_room_access_code&project=vc&resource=room_config&version=v1 document }
|
|
24857
|
+
*/
|
|
24858
|
+
setRoomAccessCode: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
24859
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
24860
|
+
return this.httpInstance
|
|
24861
|
+
.request({
|
|
24862
|
+
url: fillApiPath(`${this.domain}/open-apis/vc/v1/room_configs/set_room_access_code`, path),
|
|
24863
|
+
method: "POST",
|
|
24864
|
+
data,
|
|
24865
|
+
params,
|
|
24866
|
+
headers,
|
|
24867
|
+
})
|
|
24868
|
+
.catch((e) => {
|
|
24869
|
+
this.logger.error(formatErrors(e));
|
|
24870
|
+
throw e;
|
|
24871
|
+
});
|
|
24872
|
+
}),
|
|
21477
24873
|
},
|
|
21478
24874
|
/**
|
|
21479
24875
|
* 会议室层级
|
|
@@ -22243,7 +25639,83 @@ class Client$1 {
|
|
|
22243
25639
|
/**
|
|
22244
25640
|
|
|
22245
25641
|
*/
|
|
22246
|
-
this.workplace = {
|
|
25642
|
+
this.workplace = {
|
|
25643
|
+
/**
|
|
25644
|
+
* custom_workplace_access_data
|
|
25645
|
+
*/
|
|
25646
|
+
customWorkplaceAccessData: {
|
|
25647
|
+
/**
|
|
25648
|
+
* {@link https://open.feishu.cn/api-explorer?project=workplace&resource=custom_workplace_access_data&apiName=search&version=v1 click to debug }
|
|
25649
|
+
*
|
|
25650
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=custom_workplace_access_data&version=v1 document }
|
|
25651
|
+
*/
|
|
25652
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
25653
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
25654
|
+
return this.httpInstance
|
|
25655
|
+
.request({
|
|
25656
|
+
url: fillApiPath(`${this.domain}/open-apis/workplace/v1/custom_workplace_access_data/search`, path),
|
|
25657
|
+
method: "POST",
|
|
25658
|
+
data,
|
|
25659
|
+
params,
|
|
25660
|
+
headers,
|
|
25661
|
+
})
|
|
25662
|
+
.catch((e) => {
|
|
25663
|
+
this.logger.error(formatErrors(e));
|
|
25664
|
+
throw e;
|
|
25665
|
+
});
|
|
25666
|
+
}),
|
|
25667
|
+
},
|
|
25668
|
+
/**
|
|
25669
|
+
* workplace_access_data
|
|
25670
|
+
*/
|
|
25671
|
+
workplaceAccessData: {
|
|
25672
|
+
/**
|
|
25673
|
+
* {@link https://open.feishu.cn/api-explorer?project=workplace&resource=workplace_access_data&apiName=search&version=v1 click to debug }
|
|
25674
|
+
*
|
|
25675
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=workplace_access_data&version=v1 document }
|
|
25676
|
+
*/
|
|
25677
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
25678
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
25679
|
+
return this.httpInstance
|
|
25680
|
+
.request({
|
|
25681
|
+
url: fillApiPath(`${this.domain}/open-apis/workplace/v1/workplace_access_data/search`, path),
|
|
25682
|
+
method: "POST",
|
|
25683
|
+
data,
|
|
25684
|
+
params,
|
|
25685
|
+
headers,
|
|
25686
|
+
})
|
|
25687
|
+
.catch((e) => {
|
|
25688
|
+
this.logger.error(formatErrors(e));
|
|
25689
|
+
throw e;
|
|
25690
|
+
});
|
|
25691
|
+
}),
|
|
25692
|
+
},
|
|
25693
|
+
/**
|
|
25694
|
+
* workplace_block_access_data
|
|
25695
|
+
*/
|
|
25696
|
+
workplaceBlockAccessData: {
|
|
25697
|
+
/**
|
|
25698
|
+
* {@link https://open.feishu.cn/api-explorer?project=workplace&resource=workplace_block_access_data&apiName=search&version=v1 click to debug }
|
|
25699
|
+
*
|
|
25700
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=workplace&resource=workplace_block_access_data&version=v1 document }
|
|
25701
|
+
*/
|
|
25702
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
25703
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
25704
|
+
return this.httpInstance
|
|
25705
|
+
.request({
|
|
25706
|
+
url: fillApiPath(`${this.domain}/open-apis/workplace/v1/workplace_block_access_data/search`, path),
|
|
25707
|
+
method: "POST",
|
|
25708
|
+
data,
|
|
25709
|
+
params,
|
|
25710
|
+
headers,
|
|
25711
|
+
})
|
|
25712
|
+
.catch((e) => {
|
|
25713
|
+
this.logger.error(formatErrors(e));
|
|
25714
|
+
throw e;
|
|
25715
|
+
});
|
|
25716
|
+
}),
|
|
25717
|
+
},
|
|
25718
|
+
};
|
|
22247
25719
|
}
|
|
22248
25720
|
}
|
|
22249
25721
|
|