@larksuiteoapi/node-sdk 1.17.1 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +3134 -292
- package/lib/index.js +3134 -292
- package/package.json +1 -1
- package/types/index.d.ts +8475 -989
package/es/index.js
CHANGED
|
@@ -2729,6 +2729,56 @@ class Client$1 {
|
|
|
2729
2729
|
});
|
|
2730
2730
|
}),
|
|
2731
2731
|
},
|
|
2732
|
+
/**
|
|
2733
|
+
* leave_accrual_record
|
|
2734
|
+
*/
|
|
2735
|
+
leaveAccrualRecord: {
|
|
2736
|
+
/**
|
|
2737
|
+
* {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_accrual_record&apiName=patch&version=v1 click to debug }
|
|
2738
|
+
*
|
|
2739
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=attendance&resource=leave_accrual_record&version=v1 document }
|
|
2740
|
+
*/
|
|
2741
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2742
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2743
|
+
return this.httpInstance
|
|
2744
|
+
.request({
|
|
2745
|
+
url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_accrual_record/:leave_id`, path),
|
|
2746
|
+
method: "PATCH",
|
|
2747
|
+
data,
|
|
2748
|
+
params,
|
|
2749
|
+
headers,
|
|
2750
|
+
})
|
|
2751
|
+
.catch((e) => {
|
|
2752
|
+
this.logger.error(formatErrors(e));
|
|
2753
|
+
throw e;
|
|
2754
|
+
});
|
|
2755
|
+
}),
|
|
2756
|
+
},
|
|
2757
|
+
/**
|
|
2758
|
+
* leave_employ_expire_record
|
|
2759
|
+
*/
|
|
2760
|
+
leaveEmployExpireRecord: {
|
|
2761
|
+
/**
|
|
2762
|
+
* {@link https://open.feishu.cn/api-explorer?project=attendance&resource=leave_employ_expire_record&apiName=get&version=v1 click to debug }
|
|
2763
|
+
*
|
|
2764
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=attendance&resource=leave_employ_expire_record&version=v1 document }
|
|
2765
|
+
*/
|
|
2766
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2767
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
2768
|
+
return this.httpInstance
|
|
2769
|
+
.request({
|
|
2770
|
+
url: fillApiPath(`${this.domain}/open-apis/attendance/v1/leave_employ_expire_records/:leave_id`, path),
|
|
2771
|
+
method: "GET",
|
|
2772
|
+
data,
|
|
2773
|
+
params,
|
|
2774
|
+
headers,
|
|
2775
|
+
})
|
|
2776
|
+
.catch((e) => {
|
|
2777
|
+
this.logger.error(formatErrors(e));
|
|
2778
|
+
throw e;
|
|
2779
|
+
});
|
|
2780
|
+
}),
|
|
2781
|
+
},
|
|
2732
2782
|
/**
|
|
2733
2783
|
* 考勤班次
|
|
2734
2784
|
*/
|
|
@@ -8985,24 +9035,24 @@ class Client$1 {
|
|
|
8985
9035
|
*/
|
|
8986
9036
|
this.corehr = {
|
|
8987
9037
|
/**
|
|
8988
|
-
*
|
|
9038
|
+
* assigned_user
|
|
8989
9039
|
*/
|
|
8990
|
-
|
|
9040
|
+
assignedUser: {
|
|
8991
9041
|
/**
|
|
8992
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
9042
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=assigned_user&apiName=search&version=v1 click to debug }
|
|
8993
9043
|
*
|
|
8994
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/
|
|
9044
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/assigned_user/search document }
|
|
8995
9045
|
*
|
|
8996
|
-
*
|
|
9046
|
+
* 获取组织类角色授权列表
|
|
8997
9047
|
*
|
|
8998
|
-
*
|
|
9048
|
+
* 查询组织类角色的授权信息
|
|
8999
9049
|
*/
|
|
9000
|
-
|
|
9050
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9001
9051
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9002
9052
|
return this.httpInstance
|
|
9003
9053
|
.request({
|
|
9004
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/
|
|
9005
|
-
method: "
|
|
9054
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/assigned_users/search`, path),
|
|
9055
|
+
method: "POST",
|
|
9006
9056
|
data,
|
|
9007
9057
|
params,
|
|
9008
9058
|
headers,
|
|
@@ -9013,38 +9063,25 @@ class Client$1 {
|
|
|
9013
9063
|
});
|
|
9014
9064
|
}),
|
|
9015
9065
|
},
|
|
9016
|
-
};
|
|
9017
|
-
/**
|
|
9018
|
-
|
|
9019
|
-
*/
|
|
9020
|
-
this.docs_tool = {};
|
|
9021
|
-
/**
|
|
9022
|
-
* 云文档-文档
|
|
9023
|
-
*/
|
|
9024
|
-
this.docx = {
|
|
9025
9066
|
/**
|
|
9026
|
-
*
|
|
9067
|
+
* 公司
|
|
9027
9068
|
*/
|
|
9028
|
-
|
|
9069
|
+
company: {
|
|
9029
9070
|
/**
|
|
9030
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9031
|
-
*
|
|
9032
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update document }
|
|
9033
|
-
*
|
|
9034
|
-
* 批量更新块
|
|
9071
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=create&version=v1 click to debug }
|
|
9035
9072
|
*
|
|
9036
|
-
*
|
|
9073
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/create document }
|
|
9037
9074
|
*
|
|
9038
|
-
*
|
|
9075
|
+
* 创建公司
|
|
9039
9076
|
*
|
|
9040
|
-
*
|
|
9077
|
+
* 创建公司
|
|
9041
9078
|
*/
|
|
9042
|
-
|
|
9079
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9043
9080
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9044
9081
|
return this.httpInstance
|
|
9045
9082
|
.request({
|
|
9046
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9047
|
-
method: "
|
|
9083
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path),
|
|
9084
|
+
method: "POST",
|
|
9048
9085
|
data,
|
|
9049
9086
|
params,
|
|
9050
9087
|
headers,
|
|
@@ -9055,24 +9092,20 @@ class Client$1 {
|
|
|
9055
9092
|
});
|
|
9056
9093
|
}),
|
|
9057
9094
|
/**
|
|
9058
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9059
|
-
*
|
|
9060
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get document }
|
|
9061
|
-
*
|
|
9062
|
-
* 获取块
|
|
9095
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=delete&version=v1 click to debug }
|
|
9063
9096
|
*
|
|
9064
|
-
*
|
|
9097
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/delete document }
|
|
9065
9098
|
*
|
|
9066
|
-
*
|
|
9099
|
+
* 删除公司
|
|
9067
9100
|
*
|
|
9068
|
-
*
|
|
9101
|
+
* 删除公司
|
|
9069
9102
|
*/
|
|
9070
|
-
|
|
9103
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9071
9104
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9072
9105
|
return this.httpInstance
|
|
9073
9106
|
.request({
|
|
9074
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9075
|
-
method: "
|
|
9107
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path),
|
|
9108
|
+
method: "DELETE",
|
|
9076
9109
|
data,
|
|
9077
9110
|
params,
|
|
9078
9111
|
headers,
|
|
@@ -9082,72 +9115,20 @@ class Client$1 {
|
|
|
9082
9115
|
throw e;
|
|
9083
9116
|
});
|
|
9084
9117
|
}),
|
|
9085
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9086
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9087
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
9088
|
-
const res = yield this.httpInstance
|
|
9089
|
-
.request({
|
|
9090
|
-
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path),
|
|
9091
|
-
method: "GET",
|
|
9092
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
9093
|
-
params: pickBy(innerPayload.params, identity),
|
|
9094
|
-
})
|
|
9095
|
-
.catch((e) => {
|
|
9096
|
-
this.logger.error(formatErrors(e));
|
|
9097
|
-
});
|
|
9098
|
-
return res;
|
|
9099
|
-
});
|
|
9100
|
-
const Iterable = {
|
|
9101
|
-
[Symbol.asyncIterator]() {
|
|
9102
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
9103
|
-
let hasMore = true;
|
|
9104
|
-
let pageToken;
|
|
9105
|
-
while (hasMore) {
|
|
9106
|
-
try {
|
|
9107
|
-
const res = yield __await(sendRequest({
|
|
9108
|
-
headers,
|
|
9109
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
9110
|
-
data,
|
|
9111
|
-
}));
|
|
9112
|
-
const _b = get(res, "data") || {}, {
|
|
9113
|
-
// @ts-ignore
|
|
9114
|
-
has_more,
|
|
9115
|
-
// @ts-ignore
|
|
9116
|
-
page_token,
|
|
9117
|
-
// @ts-ignore
|
|
9118
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
9119
|
-
yield yield __await(rest);
|
|
9120
|
-
hasMore = Boolean(has_more);
|
|
9121
|
-
pageToken = page_token || next_page_token;
|
|
9122
|
-
}
|
|
9123
|
-
catch (e) {
|
|
9124
|
-
yield yield __await(null);
|
|
9125
|
-
break;
|
|
9126
|
-
}
|
|
9127
|
-
}
|
|
9128
|
-
});
|
|
9129
|
-
},
|
|
9130
|
-
};
|
|
9131
|
-
return Iterable;
|
|
9132
|
-
}),
|
|
9133
9118
|
/**
|
|
9134
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9135
|
-
*
|
|
9136
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list document }
|
|
9137
|
-
*
|
|
9138
|
-
* 获取文档所有块
|
|
9119
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=get&version=v1 click to debug }
|
|
9139
9120
|
*
|
|
9140
|
-
*
|
|
9121
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/get document }
|
|
9141
9122
|
*
|
|
9142
|
-
*
|
|
9123
|
+
* 查询单个公司
|
|
9143
9124
|
*
|
|
9144
|
-
*
|
|
9125
|
+
* 根据 ID 查询单个公司
|
|
9145
9126
|
*/
|
|
9146
|
-
|
|
9127
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9147
9128
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9148
9129
|
return this.httpInstance
|
|
9149
9130
|
.request({
|
|
9150
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9131
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies/:company_id`, path),
|
|
9151
9132
|
method: "GET",
|
|
9152
9133
|
data,
|
|
9153
9134
|
params,
|
|
@@ -9159,24 +9140,20 @@ class Client$1 {
|
|
|
9159
9140
|
});
|
|
9160
9141
|
}),
|
|
9161
9142
|
/**
|
|
9162
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9163
|
-
*
|
|
9164
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch document }
|
|
9165
|
-
*
|
|
9166
|
-
* 更新块
|
|
9143
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=list&version=v1 click to debug }
|
|
9167
9144
|
*
|
|
9168
|
-
*
|
|
9145
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list document }
|
|
9169
9146
|
*
|
|
9170
|
-
*
|
|
9147
|
+
* 批量查询公司
|
|
9171
9148
|
*
|
|
9172
|
-
*
|
|
9149
|
+
* 批量查询公司
|
|
9173
9150
|
*/
|
|
9174
|
-
|
|
9151
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9175
9152
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9176
9153
|
return this.httpInstance
|
|
9177
9154
|
.request({
|
|
9178
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9179
|
-
method: "
|
|
9155
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/companies`, path),
|
|
9156
|
+
method: "GET",
|
|
9180
9157
|
data,
|
|
9181
9158
|
params,
|
|
9182
9159
|
headers,
|
|
@@ -9188,28 +9165,24 @@ class Client$1 {
|
|
|
9188
9165
|
}),
|
|
9189
9166
|
},
|
|
9190
9167
|
/**
|
|
9191
|
-
*
|
|
9168
|
+
* 合同
|
|
9192
9169
|
*/
|
|
9193
|
-
|
|
9170
|
+
contract: {
|
|
9194
9171
|
/**
|
|
9195
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9196
|
-
*
|
|
9197
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete document }
|
|
9198
|
-
*
|
|
9199
|
-
* 删除块
|
|
9172
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=create&version=v1 click to debug }
|
|
9200
9173
|
*
|
|
9201
|
-
*
|
|
9174
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/create document }
|
|
9202
9175
|
*
|
|
9203
|
-
*
|
|
9176
|
+
* 创建合同
|
|
9204
9177
|
*
|
|
9205
|
-
*
|
|
9178
|
+
* 创建合同
|
|
9206
9179
|
*/
|
|
9207
|
-
|
|
9180
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9208
9181
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9209
9182
|
return this.httpInstance
|
|
9210
9183
|
.request({
|
|
9211
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9212
|
-
method: "
|
|
9184
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path),
|
|
9185
|
+
method: "POST",
|
|
9213
9186
|
data,
|
|
9214
9187
|
params,
|
|
9215
9188
|
headers,
|
|
@@ -9220,24 +9193,20 @@ class Client$1 {
|
|
|
9220
9193
|
});
|
|
9221
9194
|
}),
|
|
9222
9195
|
/**
|
|
9223
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9196
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=delete&version=v1 click to debug }
|
|
9224
9197
|
*
|
|
9225
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
9226
|
-
*
|
|
9227
|
-
* 创建块
|
|
9228
|
-
*
|
|
9229
|
-
* 指定需要操作的块,为其创建一批子块,并插入到指定位置。如果操作成功,接口将返回新创建子块的富文本内容。
|
|
9198
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/delete document }
|
|
9230
9199
|
*
|
|
9231
|
-
*
|
|
9200
|
+
* 删除合同
|
|
9232
9201
|
*
|
|
9233
|
-
*
|
|
9202
|
+
* 删除合同
|
|
9234
9203
|
*/
|
|
9235
|
-
|
|
9204
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9236
9205
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9237
9206
|
return this.httpInstance
|
|
9238
9207
|
.request({
|
|
9239
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9240
|
-
method: "
|
|
9208
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path),
|
|
9209
|
+
method: "DELETE",
|
|
9241
9210
|
data,
|
|
9242
9211
|
params,
|
|
9243
9212
|
headers,
|
|
@@ -9247,72 +9216,20 @@ class Client$1 {
|
|
|
9247
9216
|
throw e;
|
|
9248
9217
|
});
|
|
9249
9218
|
}),
|
|
9250
|
-
getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9251
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9252
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
9253
|
-
const res = yield this.httpInstance
|
|
9254
|
-
.request({
|
|
9255
|
-
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path),
|
|
9256
|
-
method: "GET",
|
|
9257
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
9258
|
-
params: pickBy(innerPayload.params, identity),
|
|
9259
|
-
})
|
|
9260
|
-
.catch((e) => {
|
|
9261
|
-
this.logger.error(formatErrors(e));
|
|
9262
|
-
});
|
|
9263
|
-
return res;
|
|
9264
|
-
});
|
|
9265
|
-
const Iterable = {
|
|
9266
|
-
[Symbol.asyncIterator]() {
|
|
9267
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
9268
|
-
let hasMore = true;
|
|
9269
|
-
let pageToken;
|
|
9270
|
-
while (hasMore) {
|
|
9271
|
-
try {
|
|
9272
|
-
const res = yield __await(sendRequest({
|
|
9273
|
-
headers,
|
|
9274
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
9275
|
-
data,
|
|
9276
|
-
}));
|
|
9277
|
-
const _b = get(res, "data") || {}, {
|
|
9278
|
-
// @ts-ignore
|
|
9279
|
-
has_more,
|
|
9280
|
-
// @ts-ignore
|
|
9281
|
-
page_token,
|
|
9282
|
-
// @ts-ignore
|
|
9283
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
9284
|
-
yield yield __await(rest);
|
|
9285
|
-
hasMore = Boolean(has_more);
|
|
9286
|
-
pageToken = page_token || next_page_token;
|
|
9287
|
-
}
|
|
9288
|
-
catch (e) {
|
|
9289
|
-
yield yield __await(null);
|
|
9290
|
-
break;
|
|
9291
|
-
}
|
|
9292
|
-
}
|
|
9293
|
-
});
|
|
9294
|
-
},
|
|
9295
|
-
};
|
|
9296
|
-
return Iterable;
|
|
9297
|
-
}),
|
|
9298
9219
|
/**
|
|
9299
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9300
|
-
*
|
|
9301
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get document }
|
|
9302
|
-
*
|
|
9303
|
-
* 获取所有子块
|
|
9220
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=get&version=v1 click to debug }
|
|
9304
9221
|
*
|
|
9305
|
-
*
|
|
9222
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/get document }
|
|
9306
9223
|
*
|
|
9307
|
-
*
|
|
9224
|
+
* 查询单个合同
|
|
9308
9225
|
*
|
|
9309
|
-
*
|
|
9226
|
+
* 根据 ID 查询单个合同
|
|
9310
9227
|
*/
|
|
9311
9228
|
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9312
9229
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9313
9230
|
return this.httpInstance
|
|
9314
9231
|
.request({
|
|
9315
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
9232
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path),
|
|
9316
9233
|
method: "GET",
|
|
9317
9234
|
data,
|
|
9318
9235
|
params,
|
|
@@ -9323,21 +9240,2488 @@ class Client$1 {
|
|
|
9323
9240
|
throw e;
|
|
9324
9241
|
});
|
|
9325
9242
|
}),
|
|
9326
|
-
},
|
|
9327
|
-
/**
|
|
9328
|
-
* 文档
|
|
9329
|
-
*/
|
|
9330
|
-
document: {
|
|
9331
9243
|
/**
|
|
9332
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
9333
|
-
*
|
|
9334
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/create document }
|
|
9244
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=list&version=v1 click to debug }
|
|
9335
9245
|
*
|
|
9336
|
-
*
|
|
9246
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/list document }
|
|
9337
9247
|
*
|
|
9338
|
-
*
|
|
9248
|
+
* 批量查询合同
|
|
9339
9249
|
*
|
|
9340
|
-
*
|
|
9250
|
+
* 批量查询合同
|
|
9251
|
+
*/
|
|
9252
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9253
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9254
|
+
return this.httpInstance
|
|
9255
|
+
.request({
|
|
9256
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts`, path),
|
|
9257
|
+
method: "GET",
|
|
9258
|
+
data,
|
|
9259
|
+
params,
|
|
9260
|
+
headers,
|
|
9261
|
+
})
|
|
9262
|
+
.catch((e) => {
|
|
9263
|
+
this.logger.error(formatErrors(e));
|
|
9264
|
+
throw e;
|
|
9265
|
+
});
|
|
9266
|
+
}),
|
|
9267
|
+
/**
|
|
9268
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=contract&apiName=patch&version=v1 click to debug }
|
|
9269
|
+
*
|
|
9270
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/patch document }
|
|
9271
|
+
*
|
|
9272
|
+
* 更新合同
|
|
9273
|
+
*
|
|
9274
|
+
* 更新合同
|
|
9275
|
+
*/
|
|
9276
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9277
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9278
|
+
return this.httpInstance
|
|
9279
|
+
.request({
|
|
9280
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/contracts/:contract_id`, path),
|
|
9281
|
+
method: "PATCH",
|
|
9282
|
+
data,
|
|
9283
|
+
params,
|
|
9284
|
+
headers,
|
|
9285
|
+
})
|
|
9286
|
+
.catch((e) => {
|
|
9287
|
+
this.logger.error(formatErrors(e));
|
|
9288
|
+
throw e;
|
|
9289
|
+
});
|
|
9290
|
+
}),
|
|
9291
|
+
},
|
|
9292
|
+
/**
|
|
9293
|
+
* 地理库信息
|
|
9294
|
+
*/
|
|
9295
|
+
countryRegion: {
|
|
9296
|
+
/**
|
|
9297
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=get&version=v1 click to debug }
|
|
9298
|
+
*
|
|
9299
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/get document }
|
|
9300
|
+
*
|
|
9301
|
+
* 查询单条国家/地区信息
|
|
9302
|
+
*
|
|
9303
|
+
* 查询单条国家/地区信息
|
|
9304
|
+
*/
|
|
9305
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9306
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9307
|
+
return this.httpInstance
|
|
9308
|
+
.request({
|
|
9309
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions/:country_region_id`, path),
|
|
9310
|
+
method: "GET",
|
|
9311
|
+
data,
|
|
9312
|
+
params,
|
|
9313
|
+
headers,
|
|
9314
|
+
})
|
|
9315
|
+
.catch((e) => {
|
|
9316
|
+
this.logger.error(formatErrors(e));
|
|
9317
|
+
throw e;
|
|
9318
|
+
});
|
|
9319
|
+
}),
|
|
9320
|
+
/**
|
|
9321
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=country_region&apiName=list&version=v1 click to debug }
|
|
9322
|
+
*
|
|
9323
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/list document }
|
|
9324
|
+
*
|
|
9325
|
+
* 批量查询国家/地区信息
|
|
9326
|
+
*
|
|
9327
|
+
* 批量查询国家/地区信息
|
|
9328
|
+
*/
|
|
9329
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9330
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9331
|
+
return this.httpInstance
|
|
9332
|
+
.request({
|
|
9333
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/country_regions`, path),
|
|
9334
|
+
method: "GET",
|
|
9335
|
+
data,
|
|
9336
|
+
params,
|
|
9337
|
+
headers,
|
|
9338
|
+
})
|
|
9339
|
+
.catch((e) => {
|
|
9340
|
+
this.logger.error(formatErrors(e));
|
|
9341
|
+
throw e;
|
|
9342
|
+
});
|
|
9343
|
+
}),
|
|
9344
|
+
},
|
|
9345
|
+
/**
|
|
9346
|
+
* 货币信息
|
|
9347
|
+
*/
|
|
9348
|
+
currency: {
|
|
9349
|
+
/**
|
|
9350
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=get&version=v1 click to debug }
|
|
9351
|
+
*
|
|
9352
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/get document }
|
|
9353
|
+
*
|
|
9354
|
+
* 查询单个货币信息
|
|
9355
|
+
*
|
|
9356
|
+
* 查询单个货币信息
|
|
9357
|
+
*/
|
|
9358
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9359
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9360
|
+
return this.httpInstance
|
|
9361
|
+
.request({
|
|
9362
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies/:currency_id`, path),
|
|
9363
|
+
method: "GET",
|
|
9364
|
+
data,
|
|
9365
|
+
params,
|
|
9366
|
+
headers,
|
|
9367
|
+
})
|
|
9368
|
+
.catch((e) => {
|
|
9369
|
+
this.logger.error(formatErrors(e));
|
|
9370
|
+
throw e;
|
|
9371
|
+
});
|
|
9372
|
+
}),
|
|
9373
|
+
/**
|
|
9374
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=currency&apiName=list&version=v1 click to debug }
|
|
9375
|
+
*
|
|
9376
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/list document }
|
|
9377
|
+
*
|
|
9378
|
+
* 批量查询货币信息
|
|
9379
|
+
*
|
|
9380
|
+
* 批量查询货币信息
|
|
9381
|
+
*/
|
|
9382
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9383
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9384
|
+
return this.httpInstance
|
|
9385
|
+
.request({
|
|
9386
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/currencies`, path),
|
|
9387
|
+
method: "GET",
|
|
9388
|
+
data,
|
|
9389
|
+
params,
|
|
9390
|
+
headers,
|
|
9391
|
+
})
|
|
9392
|
+
.catch((e) => {
|
|
9393
|
+
this.logger.error(formatErrors(e));
|
|
9394
|
+
throw e;
|
|
9395
|
+
});
|
|
9396
|
+
}),
|
|
9397
|
+
},
|
|
9398
|
+
/**
|
|
9399
|
+
* 自定义字段
|
|
9400
|
+
*/
|
|
9401
|
+
customField: {
|
|
9402
|
+
/**
|
|
9403
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=get_by_param&version=v1 click to debug }
|
|
9404
|
+
*
|
|
9405
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/get_by_param document }
|
|
9406
|
+
*
|
|
9407
|
+
* 获取自定义字段详情
|
|
9408
|
+
*
|
|
9409
|
+
* 获取「飞书人事」具体对象下某自定义字段的详细信息
|
|
9410
|
+
*/
|
|
9411
|
+
getByParam: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9412
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9413
|
+
return this.httpInstance
|
|
9414
|
+
.request({
|
|
9415
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/get_by_param`, path),
|
|
9416
|
+
method: "GET",
|
|
9417
|
+
data,
|
|
9418
|
+
params,
|
|
9419
|
+
headers,
|
|
9420
|
+
})
|
|
9421
|
+
.catch((e) => {
|
|
9422
|
+
this.logger.error(formatErrors(e));
|
|
9423
|
+
throw e;
|
|
9424
|
+
});
|
|
9425
|
+
}),
|
|
9426
|
+
/**
|
|
9427
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=list_object_api_name&version=v1 click to debug }
|
|
9428
|
+
*
|
|
9429
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/list_object_api_name document }
|
|
9430
|
+
*
|
|
9431
|
+
* 获取飞书人事对象列表
|
|
9432
|
+
*
|
|
9433
|
+
* 获取「飞书人事」中的对象列表,含系统预置对象与自定义对象
|
|
9434
|
+
*/
|
|
9435
|
+
listObjectApiName: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9436
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9437
|
+
return this.httpInstance
|
|
9438
|
+
.request({
|
|
9439
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/list_object_api_name`, path),
|
|
9440
|
+
method: "GET",
|
|
9441
|
+
data,
|
|
9442
|
+
params,
|
|
9443
|
+
headers,
|
|
9444
|
+
})
|
|
9445
|
+
.catch((e) => {
|
|
9446
|
+
this.logger.error(formatErrors(e));
|
|
9447
|
+
throw e;
|
|
9448
|
+
});
|
|
9449
|
+
}),
|
|
9450
|
+
/**
|
|
9451
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=custom_field&apiName=query&version=v1 click to debug }
|
|
9452
|
+
*
|
|
9453
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/query document }
|
|
9454
|
+
*
|
|
9455
|
+
* 获取自定义字段列表
|
|
9456
|
+
*
|
|
9457
|
+
* 获取「飞书人事」具体对象下的自定义字段列表
|
|
9458
|
+
*/
|
|
9459
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9460
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9461
|
+
return this.httpInstance
|
|
9462
|
+
.request({
|
|
9463
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/custom_fields/query`, path),
|
|
9464
|
+
method: "GET",
|
|
9465
|
+
data,
|
|
9466
|
+
params,
|
|
9467
|
+
headers,
|
|
9468
|
+
})
|
|
9469
|
+
.catch((e) => {
|
|
9470
|
+
this.logger.error(formatErrors(e));
|
|
9471
|
+
throw e;
|
|
9472
|
+
});
|
|
9473
|
+
}),
|
|
9474
|
+
},
|
|
9475
|
+
/**
|
|
9476
|
+
* 部门
|
|
9477
|
+
*/
|
|
9478
|
+
department: {
|
|
9479
|
+
/**
|
|
9480
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=create&version=v1 click to debug }
|
|
9481
|
+
*
|
|
9482
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/create document }
|
|
9483
|
+
*
|
|
9484
|
+
* 创建部门
|
|
9485
|
+
*
|
|
9486
|
+
* 创建部门
|
|
9487
|
+
*/
|
|
9488
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9489
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9490
|
+
return this.httpInstance
|
|
9491
|
+
.request({
|
|
9492
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path),
|
|
9493
|
+
method: "POST",
|
|
9494
|
+
data,
|
|
9495
|
+
params,
|
|
9496
|
+
headers,
|
|
9497
|
+
})
|
|
9498
|
+
.catch((e) => {
|
|
9499
|
+
this.logger.error(formatErrors(e));
|
|
9500
|
+
throw e;
|
|
9501
|
+
});
|
|
9502
|
+
}),
|
|
9503
|
+
/**
|
|
9504
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v1 click to debug }
|
|
9505
|
+
*
|
|
9506
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/delete document }
|
|
9507
|
+
*
|
|
9508
|
+
* 删除部门
|
|
9509
|
+
*
|
|
9510
|
+
* 删除部门
|
|
9511
|
+
*/
|
|
9512
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9513
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9514
|
+
return this.httpInstance
|
|
9515
|
+
.request({
|
|
9516
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path),
|
|
9517
|
+
method: "DELETE",
|
|
9518
|
+
data,
|
|
9519
|
+
params,
|
|
9520
|
+
headers,
|
|
9521
|
+
})
|
|
9522
|
+
.catch((e) => {
|
|
9523
|
+
this.logger.error(formatErrors(e));
|
|
9524
|
+
throw e;
|
|
9525
|
+
});
|
|
9526
|
+
}),
|
|
9527
|
+
/**
|
|
9528
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=get&version=v1 click to debug }
|
|
9529
|
+
*
|
|
9530
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/get document }
|
|
9531
|
+
*
|
|
9532
|
+
* 查询单个部门
|
|
9533
|
+
*
|
|
9534
|
+
* 根据 ID 查询单个部门
|
|
9535
|
+
*/
|
|
9536
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9537
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9538
|
+
return this.httpInstance
|
|
9539
|
+
.request({
|
|
9540
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path),
|
|
9541
|
+
method: "GET",
|
|
9542
|
+
data,
|
|
9543
|
+
params,
|
|
9544
|
+
headers,
|
|
9545
|
+
})
|
|
9546
|
+
.catch((e) => {
|
|
9547
|
+
this.logger.error(formatErrors(e));
|
|
9548
|
+
throw e;
|
|
9549
|
+
});
|
|
9550
|
+
}),
|
|
9551
|
+
/**
|
|
9552
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=list&version=v1 click to debug }
|
|
9553
|
+
*
|
|
9554
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/list document }
|
|
9555
|
+
*
|
|
9556
|
+
* 批量查询部门
|
|
9557
|
+
*
|
|
9558
|
+
* 批量查询部门
|
|
9559
|
+
*/
|
|
9560
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9561
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9562
|
+
return this.httpInstance
|
|
9563
|
+
.request({
|
|
9564
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments`, path),
|
|
9565
|
+
method: "GET",
|
|
9566
|
+
data,
|
|
9567
|
+
params,
|
|
9568
|
+
headers,
|
|
9569
|
+
})
|
|
9570
|
+
.catch((e) => {
|
|
9571
|
+
this.logger.error(formatErrors(e));
|
|
9572
|
+
throw e;
|
|
9573
|
+
});
|
|
9574
|
+
}),
|
|
9575
|
+
/**
|
|
9576
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v1 click to debug }
|
|
9577
|
+
*
|
|
9578
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/patch document }
|
|
9579
|
+
*
|
|
9580
|
+
* 更新部门
|
|
9581
|
+
*
|
|
9582
|
+
* 更新部门
|
|
9583
|
+
*/
|
|
9584
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9585
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9586
|
+
return this.httpInstance
|
|
9587
|
+
.request({
|
|
9588
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/departments/:department_id`, path),
|
|
9589
|
+
method: "PATCH",
|
|
9590
|
+
data,
|
|
9591
|
+
params,
|
|
9592
|
+
headers,
|
|
9593
|
+
})
|
|
9594
|
+
.catch((e) => {
|
|
9595
|
+
this.logger.error(formatErrors(e));
|
|
9596
|
+
throw e;
|
|
9597
|
+
});
|
|
9598
|
+
}),
|
|
9599
|
+
},
|
|
9600
|
+
/**
|
|
9601
|
+
* 人员类型
|
|
9602
|
+
*/
|
|
9603
|
+
employeeType: {
|
|
9604
|
+
/**
|
|
9605
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=create&version=v1 click to debug }
|
|
9606
|
+
*
|
|
9607
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/create document }
|
|
9608
|
+
*
|
|
9609
|
+
* 创建人员类型
|
|
9610
|
+
*
|
|
9611
|
+
* 创建人员类型
|
|
9612
|
+
*/
|
|
9613
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9614
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9615
|
+
return this.httpInstance
|
|
9616
|
+
.request({
|
|
9617
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path),
|
|
9618
|
+
method: "POST",
|
|
9619
|
+
data,
|
|
9620
|
+
params,
|
|
9621
|
+
headers,
|
|
9622
|
+
})
|
|
9623
|
+
.catch((e) => {
|
|
9624
|
+
this.logger.error(formatErrors(e));
|
|
9625
|
+
throw e;
|
|
9626
|
+
});
|
|
9627
|
+
}),
|
|
9628
|
+
/**
|
|
9629
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=delete&version=v1 click to debug }
|
|
9630
|
+
*
|
|
9631
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/delete document }
|
|
9632
|
+
*
|
|
9633
|
+
* 删除人员类型
|
|
9634
|
+
*
|
|
9635
|
+
* 删除人员类型
|
|
9636
|
+
*/
|
|
9637
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9638
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9639
|
+
return this.httpInstance
|
|
9640
|
+
.request({
|
|
9641
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path),
|
|
9642
|
+
method: "DELETE",
|
|
9643
|
+
data,
|
|
9644
|
+
params,
|
|
9645
|
+
headers,
|
|
9646
|
+
})
|
|
9647
|
+
.catch((e) => {
|
|
9648
|
+
this.logger.error(formatErrors(e));
|
|
9649
|
+
throw e;
|
|
9650
|
+
});
|
|
9651
|
+
}),
|
|
9652
|
+
/**
|
|
9653
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=get&version=v1 click to debug }
|
|
9654
|
+
*
|
|
9655
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/get document }
|
|
9656
|
+
*
|
|
9657
|
+
* 查询单个人员类型
|
|
9658
|
+
*
|
|
9659
|
+
* 根据 ID 查询单个人员类型
|
|
9660
|
+
*/
|
|
9661
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9662
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9663
|
+
return this.httpInstance
|
|
9664
|
+
.request({
|
|
9665
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path),
|
|
9666
|
+
method: "GET",
|
|
9667
|
+
data,
|
|
9668
|
+
params,
|
|
9669
|
+
headers,
|
|
9670
|
+
})
|
|
9671
|
+
.catch((e) => {
|
|
9672
|
+
this.logger.error(formatErrors(e));
|
|
9673
|
+
throw e;
|
|
9674
|
+
});
|
|
9675
|
+
}),
|
|
9676
|
+
/**
|
|
9677
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=list&version=v1 click to debug }
|
|
9678
|
+
*
|
|
9679
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list document }
|
|
9680
|
+
*
|
|
9681
|
+
* 批量查询人员类型
|
|
9682
|
+
*
|
|
9683
|
+
* 批量查询人员类型
|
|
9684
|
+
*/
|
|
9685
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9686
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9687
|
+
return this.httpInstance
|
|
9688
|
+
.request({
|
|
9689
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types`, path),
|
|
9690
|
+
method: "GET",
|
|
9691
|
+
data,
|
|
9692
|
+
params,
|
|
9693
|
+
headers,
|
|
9694
|
+
})
|
|
9695
|
+
.catch((e) => {
|
|
9696
|
+
this.logger.error(formatErrors(e));
|
|
9697
|
+
throw e;
|
|
9698
|
+
});
|
|
9699
|
+
}),
|
|
9700
|
+
/**
|
|
9701
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employee_type&apiName=patch&version=v1 click to debug }
|
|
9702
|
+
*
|
|
9703
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/patch document }
|
|
9704
|
+
*
|
|
9705
|
+
* 更新人员类型数据
|
|
9706
|
+
*
|
|
9707
|
+
* 更新人员类型数据
|
|
9708
|
+
*/
|
|
9709
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9710
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9711
|
+
return this.httpInstance
|
|
9712
|
+
.request({
|
|
9713
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employee_types/:employee_type_id`, path),
|
|
9714
|
+
method: "PATCH",
|
|
9715
|
+
data,
|
|
9716
|
+
params,
|
|
9717
|
+
headers,
|
|
9718
|
+
})
|
|
9719
|
+
.catch((e) => {
|
|
9720
|
+
this.logger.error(formatErrors(e));
|
|
9721
|
+
throw e;
|
|
9722
|
+
});
|
|
9723
|
+
}),
|
|
9724
|
+
},
|
|
9725
|
+
/**
|
|
9726
|
+
* 雇佣信息
|
|
9727
|
+
*/
|
|
9728
|
+
employment: {
|
|
9729
|
+
/**
|
|
9730
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=create&version=v1 click to debug }
|
|
9731
|
+
*
|
|
9732
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/create document }
|
|
9733
|
+
*
|
|
9734
|
+
* 创建雇佣信息
|
|
9735
|
+
*
|
|
9736
|
+
* 创建人员的雇佣信息
|
|
9737
|
+
*/
|
|
9738
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9739
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9740
|
+
return this.httpInstance
|
|
9741
|
+
.request({
|
|
9742
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments`, path),
|
|
9743
|
+
method: "POST",
|
|
9744
|
+
data,
|
|
9745
|
+
params,
|
|
9746
|
+
headers,
|
|
9747
|
+
})
|
|
9748
|
+
.catch((e) => {
|
|
9749
|
+
this.logger.error(formatErrors(e));
|
|
9750
|
+
throw e;
|
|
9751
|
+
});
|
|
9752
|
+
}),
|
|
9753
|
+
/**
|
|
9754
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=delete&version=v1 click to debug }
|
|
9755
|
+
*
|
|
9756
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/delete document }
|
|
9757
|
+
*
|
|
9758
|
+
* 删除雇佣信息
|
|
9759
|
+
*
|
|
9760
|
+
* 删除人员的雇佣信息
|
|
9761
|
+
*/
|
|
9762
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9763
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9764
|
+
return this.httpInstance
|
|
9765
|
+
.request({
|
|
9766
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path),
|
|
9767
|
+
method: "DELETE",
|
|
9768
|
+
data,
|
|
9769
|
+
params,
|
|
9770
|
+
headers,
|
|
9771
|
+
})
|
|
9772
|
+
.catch((e) => {
|
|
9773
|
+
this.logger.error(formatErrors(e));
|
|
9774
|
+
throw e;
|
|
9775
|
+
});
|
|
9776
|
+
}),
|
|
9777
|
+
/**
|
|
9778
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employment&apiName=patch&version=v1 click to debug }
|
|
9779
|
+
*
|
|
9780
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/patch document }
|
|
9781
|
+
*
|
|
9782
|
+
* 更新雇佣信息
|
|
9783
|
+
*
|
|
9784
|
+
* 更新雇佣信息
|
|
9785
|
+
*/
|
|
9786
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9787
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9788
|
+
return this.httpInstance
|
|
9789
|
+
.request({
|
|
9790
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/employments/:employment_id`, path),
|
|
9791
|
+
method: "PATCH",
|
|
9792
|
+
data,
|
|
9793
|
+
params,
|
|
9794
|
+
headers,
|
|
9795
|
+
})
|
|
9796
|
+
.catch((e) => {
|
|
9797
|
+
this.logger.error(formatErrors(e));
|
|
9798
|
+
throw e;
|
|
9799
|
+
});
|
|
9800
|
+
}),
|
|
9801
|
+
},
|
|
9802
|
+
/**
|
|
9803
|
+
* file
|
|
9804
|
+
*/
|
|
9805
|
+
file: {
|
|
9806
|
+
/**
|
|
9807
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=file&apiName=get&version=v1 click to debug }
|
|
9808
|
+
*
|
|
9809
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=file&version=v1 document }
|
|
9810
|
+
*/
|
|
9811
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9812
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9813
|
+
const res = yield this.httpInstance
|
|
9814
|
+
.request({
|
|
9815
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/files/:id`, path),
|
|
9816
|
+
method: "GET",
|
|
9817
|
+
headers,
|
|
9818
|
+
data,
|
|
9819
|
+
params,
|
|
9820
|
+
responseType: "stream",
|
|
9821
|
+
})
|
|
9822
|
+
.catch((e) => {
|
|
9823
|
+
this.logger.error(formatErrors(e));
|
|
9824
|
+
throw e;
|
|
9825
|
+
});
|
|
9826
|
+
return {
|
|
9827
|
+
writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
9828
|
+
return new Promise((resolve, reject) => {
|
|
9829
|
+
const writableStream = fs.createWriteStream(filePath);
|
|
9830
|
+
writableStream.on("finish", () => {
|
|
9831
|
+
resolve(filePath);
|
|
9832
|
+
});
|
|
9833
|
+
writableStream.on("error", (e) => {
|
|
9834
|
+
reject(e);
|
|
9835
|
+
});
|
|
9836
|
+
res.pipe(writableStream);
|
|
9837
|
+
});
|
|
9838
|
+
}),
|
|
9839
|
+
};
|
|
9840
|
+
}),
|
|
9841
|
+
},
|
|
9842
|
+
/**
|
|
9843
|
+
* 职务
|
|
9844
|
+
*/
|
|
9845
|
+
job: {
|
|
9846
|
+
/**
|
|
9847
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=create&version=v1 click to debug }
|
|
9848
|
+
*
|
|
9849
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/create document }
|
|
9850
|
+
*
|
|
9851
|
+
* 创建职务
|
|
9852
|
+
*
|
|
9853
|
+
* 创建职务
|
|
9854
|
+
*/
|
|
9855
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9856
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9857
|
+
return this.httpInstance
|
|
9858
|
+
.request({
|
|
9859
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path),
|
|
9860
|
+
method: "POST",
|
|
9861
|
+
data,
|
|
9862
|
+
params,
|
|
9863
|
+
headers,
|
|
9864
|
+
})
|
|
9865
|
+
.catch((e) => {
|
|
9866
|
+
this.logger.error(formatErrors(e));
|
|
9867
|
+
throw e;
|
|
9868
|
+
});
|
|
9869
|
+
}),
|
|
9870
|
+
/**
|
|
9871
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=delete&version=v1 click to debug }
|
|
9872
|
+
*
|
|
9873
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/delete document }
|
|
9874
|
+
*
|
|
9875
|
+
* 删除职务
|
|
9876
|
+
*
|
|
9877
|
+
* 删除职务
|
|
9878
|
+
*/
|
|
9879
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9880
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9881
|
+
return this.httpInstance
|
|
9882
|
+
.request({
|
|
9883
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path),
|
|
9884
|
+
method: "DELETE",
|
|
9885
|
+
data,
|
|
9886
|
+
params,
|
|
9887
|
+
headers,
|
|
9888
|
+
})
|
|
9889
|
+
.catch((e) => {
|
|
9890
|
+
this.logger.error(formatErrors(e));
|
|
9891
|
+
throw e;
|
|
9892
|
+
});
|
|
9893
|
+
}),
|
|
9894
|
+
/**
|
|
9895
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v1 click to debug }
|
|
9896
|
+
*
|
|
9897
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/get document }
|
|
9898
|
+
*
|
|
9899
|
+
* 查询单个职务
|
|
9900
|
+
*
|
|
9901
|
+
* 根据 ID 查询单个职务
|
|
9902
|
+
*/
|
|
9903
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9904
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9905
|
+
return this.httpInstance
|
|
9906
|
+
.request({
|
|
9907
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path),
|
|
9908
|
+
method: "GET",
|
|
9909
|
+
data,
|
|
9910
|
+
params,
|
|
9911
|
+
headers,
|
|
9912
|
+
})
|
|
9913
|
+
.catch((e) => {
|
|
9914
|
+
this.logger.error(formatErrors(e));
|
|
9915
|
+
throw e;
|
|
9916
|
+
});
|
|
9917
|
+
}),
|
|
9918
|
+
/**
|
|
9919
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v1 click to debug }
|
|
9920
|
+
*
|
|
9921
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/list document }
|
|
9922
|
+
*
|
|
9923
|
+
* 批量查询职务
|
|
9924
|
+
*
|
|
9925
|
+
* 批量查询职务
|
|
9926
|
+
*/
|
|
9927
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9928
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9929
|
+
return this.httpInstance
|
|
9930
|
+
.request({
|
|
9931
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs`, path),
|
|
9932
|
+
method: "GET",
|
|
9933
|
+
data,
|
|
9934
|
+
params,
|
|
9935
|
+
headers,
|
|
9936
|
+
})
|
|
9937
|
+
.catch((e) => {
|
|
9938
|
+
this.logger.error(formatErrors(e));
|
|
9939
|
+
throw e;
|
|
9940
|
+
});
|
|
9941
|
+
}),
|
|
9942
|
+
/**
|
|
9943
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=patch&version=v1 click to debug }
|
|
9944
|
+
*
|
|
9945
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/patch document }
|
|
9946
|
+
*
|
|
9947
|
+
* 更新职务
|
|
9948
|
+
*
|
|
9949
|
+
* 更新职务
|
|
9950
|
+
*/
|
|
9951
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9952
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9953
|
+
return this.httpInstance
|
|
9954
|
+
.request({
|
|
9955
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/jobs/:job_id`, path),
|
|
9956
|
+
method: "PATCH",
|
|
9957
|
+
data,
|
|
9958
|
+
params,
|
|
9959
|
+
headers,
|
|
9960
|
+
})
|
|
9961
|
+
.catch((e) => {
|
|
9962
|
+
this.logger.error(formatErrors(e));
|
|
9963
|
+
throw e;
|
|
9964
|
+
});
|
|
9965
|
+
}),
|
|
9966
|
+
},
|
|
9967
|
+
/**
|
|
9968
|
+
* 异动信息
|
|
9969
|
+
*/
|
|
9970
|
+
jobChange: {
|
|
9971
|
+
/**
|
|
9972
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v1 click to debug }
|
|
9973
|
+
*
|
|
9974
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_change/create document }
|
|
9975
|
+
*
|
|
9976
|
+
* 发起员工异动
|
|
9977
|
+
*
|
|
9978
|
+
* 创建员工异动信息
|
|
9979
|
+
*/
|
|
9980
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9981
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9982
|
+
return this.httpInstance
|
|
9983
|
+
.request({
|
|
9984
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_changes`, path),
|
|
9985
|
+
method: "POST",
|
|
9986
|
+
data,
|
|
9987
|
+
params,
|
|
9988
|
+
headers,
|
|
9989
|
+
})
|
|
9990
|
+
.catch((e) => {
|
|
9991
|
+
this.logger.error(formatErrors(e));
|
|
9992
|
+
throw e;
|
|
9993
|
+
});
|
|
9994
|
+
}),
|
|
9995
|
+
},
|
|
9996
|
+
/**
|
|
9997
|
+
* 任职信息
|
|
9998
|
+
*/
|
|
9999
|
+
jobData: {
|
|
10000
|
+
/**
|
|
10001
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=create&version=v1 click to debug }
|
|
10002
|
+
*
|
|
10003
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/create document }
|
|
10004
|
+
*
|
|
10005
|
+
* 创建任职信息
|
|
10006
|
+
*
|
|
10007
|
+
* 在系统中第一次创建员工任职数据,通常在员工入职或者做数据批量导入的时候使用,【任职原因】只支持填写“入职”
|
|
10008
|
+
*/
|
|
10009
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10010
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10011
|
+
return this.httpInstance
|
|
10012
|
+
.request({
|
|
10013
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path),
|
|
10014
|
+
method: "POST",
|
|
10015
|
+
data,
|
|
10016
|
+
params,
|
|
10017
|
+
headers,
|
|
10018
|
+
})
|
|
10019
|
+
.catch((e) => {
|
|
10020
|
+
this.logger.error(formatErrors(e));
|
|
10021
|
+
throw e;
|
|
10022
|
+
});
|
|
10023
|
+
}),
|
|
10024
|
+
/**
|
|
10025
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=delete&version=v1 click to debug }
|
|
10026
|
+
*
|
|
10027
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/delete document }
|
|
10028
|
+
*
|
|
10029
|
+
* 删除任职信息
|
|
10030
|
+
*
|
|
10031
|
+
* 删除人员的任职信息
|
|
10032
|
+
*/
|
|
10033
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10034
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10035
|
+
return this.httpInstance
|
|
10036
|
+
.request({
|
|
10037
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path),
|
|
10038
|
+
method: "DELETE",
|
|
10039
|
+
data,
|
|
10040
|
+
params,
|
|
10041
|
+
headers,
|
|
10042
|
+
})
|
|
10043
|
+
.catch((e) => {
|
|
10044
|
+
this.logger.error(formatErrors(e));
|
|
10045
|
+
throw e;
|
|
10046
|
+
});
|
|
10047
|
+
}),
|
|
10048
|
+
/**
|
|
10049
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=get&version=v1 click to debug }
|
|
10050
|
+
*
|
|
10051
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/get document }
|
|
10052
|
+
*
|
|
10053
|
+
* 查询单个任职信息
|
|
10054
|
+
*
|
|
10055
|
+
* 根据 ID 查询单任职信息
|
|
10056
|
+
*/
|
|
10057
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10058
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10059
|
+
return this.httpInstance
|
|
10060
|
+
.request({
|
|
10061
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path),
|
|
10062
|
+
method: "GET",
|
|
10063
|
+
data,
|
|
10064
|
+
params,
|
|
10065
|
+
headers,
|
|
10066
|
+
})
|
|
10067
|
+
.catch((e) => {
|
|
10068
|
+
this.logger.error(formatErrors(e));
|
|
10069
|
+
throw e;
|
|
10070
|
+
});
|
|
10071
|
+
}),
|
|
10072
|
+
/**
|
|
10073
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=list&version=v1 click to debug }
|
|
10074
|
+
*
|
|
10075
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/list document }
|
|
10076
|
+
*
|
|
10077
|
+
* 批量查询任职信息
|
|
10078
|
+
*
|
|
10079
|
+
* 批量查询人员的任职信息
|
|
10080
|
+
*/
|
|
10081
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10082
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10083
|
+
return this.httpInstance
|
|
10084
|
+
.request({
|
|
10085
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas`, path),
|
|
10086
|
+
method: "GET",
|
|
10087
|
+
data,
|
|
10088
|
+
params,
|
|
10089
|
+
headers,
|
|
10090
|
+
})
|
|
10091
|
+
.catch((e) => {
|
|
10092
|
+
this.logger.error(formatErrors(e));
|
|
10093
|
+
throw e;
|
|
10094
|
+
});
|
|
10095
|
+
}),
|
|
10096
|
+
/**
|
|
10097
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_data&apiName=patch&version=v1 click to debug }
|
|
10098
|
+
*
|
|
10099
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/patch document }
|
|
10100
|
+
*
|
|
10101
|
+
* 更新任职信息
|
|
10102
|
+
*
|
|
10103
|
+
* 更新任职信息
|
|
10104
|
+
*/
|
|
10105
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10106
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10107
|
+
return this.httpInstance
|
|
10108
|
+
.request({
|
|
10109
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_datas/:job_data_id`, path),
|
|
10110
|
+
method: "PATCH",
|
|
10111
|
+
data,
|
|
10112
|
+
params,
|
|
10113
|
+
headers,
|
|
10114
|
+
})
|
|
10115
|
+
.catch((e) => {
|
|
10116
|
+
this.logger.error(formatErrors(e));
|
|
10117
|
+
throw e;
|
|
10118
|
+
});
|
|
10119
|
+
}),
|
|
10120
|
+
},
|
|
10121
|
+
/**
|
|
10122
|
+
* 职务序列
|
|
10123
|
+
*/
|
|
10124
|
+
jobFamily: {
|
|
10125
|
+
/**
|
|
10126
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=create&version=v1 click to debug }
|
|
10127
|
+
*
|
|
10128
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/create document }
|
|
10129
|
+
*
|
|
10130
|
+
* 创建职务序列
|
|
10131
|
+
*
|
|
10132
|
+
* 创建职务序列
|
|
10133
|
+
*/
|
|
10134
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10135
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10136
|
+
return this.httpInstance
|
|
10137
|
+
.request({
|
|
10138
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path),
|
|
10139
|
+
method: "POST",
|
|
10140
|
+
data,
|
|
10141
|
+
params,
|
|
10142
|
+
headers,
|
|
10143
|
+
})
|
|
10144
|
+
.catch((e) => {
|
|
10145
|
+
this.logger.error(formatErrors(e));
|
|
10146
|
+
throw e;
|
|
10147
|
+
});
|
|
10148
|
+
}),
|
|
10149
|
+
/**
|
|
10150
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=delete&version=v1 click to debug }
|
|
10151
|
+
*
|
|
10152
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/delete document }
|
|
10153
|
+
*
|
|
10154
|
+
* 删除职务序列
|
|
10155
|
+
*
|
|
10156
|
+
* 删除职务序列
|
|
10157
|
+
*/
|
|
10158
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10159
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10160
|
+
return this.httpInstance
|
|
10161
|
+
.request({
|
|
10162
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path),
|
|
10163
|
+
method: "DELETE",
|
|
10164
|
+
data,
|
|
10165
|
+
params,
|
|
10166
|
+
headers,
|
|
10167
|
+
})
|
|
10168
|
+
.catch((e) => {
|
|
10169
|
+
this.logger.error(formatErrors(e));
|
|
10170
|
+
throw e;
|
|
10171
|
+
});
|
|
10172
|
+
}),
|
|
10173
|
+
/**
|
|
10174
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=get&version=v1 click to debug }
|
|
10175
|
+
*
|
|
10176
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/get document }
|
|
10177
|
+
*
|
|
10178
|
+
* 查询单个职务序列
|
|
10179
|
+
*
|
|
10180
|
+
* 根据 ID 查询单个职务序列
|
|
10181
|
+
*/
|
|
10182
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10183
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10184
|
+
return this.httpInstance
|
|
10185
|
+
.request({
|
|
10186
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path),
|
|
10187
|
+
method: "GET",
|
|
10188
|
+
data,
|
|
10189
|
+
params,
|
|
10190
|
+
headers,
|
|
10191
|
+
})
|
|
10192
|
+
.catch((e) => {
|
|
10193
|
+
this.logger.error(formatErrors(e));
|
|
10194
|
+
throw e;
|
|
10195
|
+
});
|
|
10196
|
+
}),
|
|
10197
|
+
/**
|
|
10198
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=list&version=v1 click to debug }
|
|
10199
|
+
*
|
|
10200
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list document }
|
|
10201
|
+
*
|
|
10202
|
+
* 批量查询职务序列
|
|
10203
|
+
*
|
|
10204
|
+
* 批量查询职务序列
|
|
10205
|
+
*/
|
|
10206
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10207
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10208
|
+
return this.httpInstance
|
|
10209
|
+
.request({
|
|
10210
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families`, path),
|
|
10211
|
+
method: "GET",
|
|
10212
|
+
data,
|
|
10213
|
+
params,
|
|
10214
|
+
headers,
|
|
10215
|
+
})
|
|
10216
|
+
.catch((e) => {
|
|
10217
|
+
this.logger.error(formatErrors(e));
|
|
10218
|
+
throw e;
|
|
10219
|
+
});
|
|
10220
|
+
}),
|
|
10221
|
+
/**
|
|
10222
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=patch&version=v1 click to debug }
|
|
10223
|
+
*
|
|
10224
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/patch document }
|
|
10225
|
+
*
|
|
10226
|
+
* 更新职务序列
|
|
10227
|
+
*
|
|
10228
|
+
* 更新职务序列
|
|
10229
|
+
*/
|
|
10230
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10231
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10232
|
+
return this.httpInstance
|
|
10233
|
+
.request({
|
|
10234
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_families/:job_family_id`, path),
|
|
10235
|
+
method: "PATCH",
|
|
10236
|
+
data,
|
|
10237
|
+
params,
|
|
10238
|
+
headers,
|
|
10239
|
+
})
|
|
10240
|
+
.catch((e) => {
|
|
10241
|
+
this.logger.error(formatErrors(e));
|
|
10242
|
+
throw e;
|
|
10243
|
+
});
|
|
10244
|
+
}),
|
|
10245
|
+
},
|
|
10246
|
+
/**
|
|
10247
|
+
* 职务级别
|
|
10248
|
+
*/
|
|
10249
|
+
jobLevel: {
|
|
10250
|
+
/**
|
|
10251
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=create&version=v1 click to debug }
|
|
10252
|
+
*
|
|
10253
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/create document }
|
|
10254
|
+
*
|
|
10255
|
+
* 创建职务级别
|
|
10256
|
+
*
|
|
10257
|
+
* 创建职务级别
|
|
10258
|
+
*/
|
|
10259
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10260
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10261
|
+
return this.httpInstance
|
|
10262
|
+
.request({
|
|
10263
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path),
|
|
10264
|
+
method: "POST",
|
|
10265
|
+
data,
|
|
10266
|
+
params,
|
|
10267
|
+
headers,
|
|
10268
|
+
})
|
|
10269
|
+
.catch((e) => {
|
|
10270
|
+
this.logger.error(formatErrors(e));
|
|
10271
|
+
throw e;
|
|
10272
|
+
});
|
|
10273
|
+
}),
|
|
10274
|
+
/**
|
|
10275
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=delete&version=v1 click to debug }
|
|
10276
|
+
*
|
|
10277
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/delete document }
|
|
10278
|
+
*
|
|
10279
|
+
* 删除职务级别
|
|
10280
|
+
*
|
|
10281
|
+
* 删除职务级别
|
|
10282
|
+
*/
|
|
10283
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10284
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10285
|
+
return this.httpInstance
|
|
10286
|
+
.request({
|
|
10287
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path),
|
|
10288
|
+
method: "DELETE",
|
|
10289
|
+
data,
|
|
10290
|
+
params,
|
|
10291
|
+
headers,
|
|
10292
|
+
})
|
|
10293
|
+
.catch((e) => {
|
|
10294
|
+
this.logger.error(formatErrors(e));
|
|
10295
|
+
throw e;
|
|
10296
|
+
});
|
|
10297
|
+
}),
|
|
10298
|
+
/**
|
|
10299
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=get&version=v1 click to debug }
|
|
10300
|
+
*
|
|
10301
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/get document }
|
|
10302
|
+
*
|
|
10303
|
+
* 查询单个职务级别
|
|
10304
|
+
*
|
|
10305
|
+
* 根据 ID 查询单个职务级别
|
|
10306
|
+
*/
|
|
10307
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10308
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10309
|
+
return this.httpInstance
|
|
10310
|
+
.request({
|
|
10311
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path),
|
|
10312
|
+
method: "GET",
|
|
10313
|
+
data,
|
|
10314
|
+
params,
|
|
10315
|
+
headers,
|
|
10316
|
+
})
|
|
10317
|
+
.catch((e) => {
|
|
10318
|
+
this.logger.error(formatErrors(e));
|
|
10319
|
+
throw e;
|
|
10320
|
+
});
|
|
10321
|
+
}),
|
|
10322
|
+
/**
|
|
10323
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=list&version=v1 click to debug }
|
|
10324
|
+
*
|
|
10325
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list document }
|
|
10326
|
+
*
|
|
10327
|
+
* 批量查询职务级别
|
|
10328
|
+
*
|
|
10329
|
+
* 批量查询职务级别
|
|
10330
|
+
*/
|
|
10331
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10332
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10333
|
+
return this.httpInstance
|
|
10334
|
+
.request({
|
|
10335
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels`, path),
|
|
10336
|
+
method: "GET",
|
|
10337
|
+
data,
|
|
10338
|
+
params,
|
|
10339
|
+
headers,
|
|
10340
|
+
})
|
|
10341
|
+
.catch((e) => {
|
|
10342
|
+
this.logger.error(formatErrors(e));
|
|
10343
|
+
throw e;
|
|
10344
|
+
});
|
|
10345
|
+
}),
|
|
10346
|
+
/**
|
|
10347
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=patch&version=v1 click to debug }
|
|
10348
|
+
*
|
|
10349
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/patch document }
|
|
10350
|
+
*
|
|
10351
|
+
* 更新职务级别
|
|
10352
|
+
*
|
|
10353
|
+
* 更新职务级别
|
|
10354
|
+
*/
|
|
10355
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10356
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10357
|
+
return this.httpInstance
|
|
10358
|
+
.request({
|
|
10359
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/job_levels/:job_level_id`, path),
|
|
10360
|
+
method: "PATCH",
|
|
10361
|
+
data,
|
|
10362
|
+
params,
|
|
10363
|
+
headers,
|
|
10364
|
+
})
|
|
10365
|
+
.catch((e) => {
|
|
10366
|
+
this.logger.error(formatErrors(e));
|
|
10367
|
+
throw e;
|
|
10368
|
+
});
|
|
10369
|
+
}),
|
|
10370
|
+
},
|
|
10371
|
+
/**
|
|
10372
|
+
* 休假管理
|
|
10373
|
+
*/
|
|
10374
|
+
leave: {
|
|
10375
|
+
/**
|
|
10376
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
|
|
10377
|
+
*
|
|
10378
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_balances document }
|
|
10379
|
+
*
|
|
10380
|
+
* 批量查询员工假期余额
|
|
10381
|
+
*
|
|
10382
|
+
* 批量获取员工各个假期的余额数据
|
|
10383
|
+
*/
|
|
10384
|
+
leaveBalances: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10385
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10386
|
+
return this.httpInstance
|
|
10387
|
+
.request({
|
|
10388
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_balances`, path),
|
|
10389
|
+
method: "GET",
|
|
10390
|
+
data,
|
|
10391
|
+
params,
|
|
10392
|
+
headers,
|
|
10393
|
+
})
|
|
10394
|
+
.catch((e) => {
|
|
10395
|
+
this.logger.error(formatErrors(e));
|
|
10396
|
+
throw e;
|
|
10397
|
+
});
|
|
10398
|
+
}),
|
|
10399
|
+
/**
|
|
10400
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_request_history&version=v1 click to debug }
|
|
10401
|
+
*
|
|
10402
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_request_history document }
|
|
10403
|
+
*
|
|
10404
|
+
* 批量查询员工请假记录
|
|
10405
|
+
*
|
|
10406
|
+
* 批量获取员工的请假记录数据
|
|
10407
|
+
*/
|
|
10408
|
+
leaveRequestHistory: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10409
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10410
|
+
return this.httpInstance
|
|
10411
|
+
.request({
|
|
10412
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_request_history`, path),
|
|
10413
|
+
method: "GET",
|
|
10414
|
+
data,
|
|
10415
|
+
params,
|
|
10416
|
+
headers,
|
|
10417
|
+
})
|
|
10418
|
+
.catch((e) => {
|
|
10419
|
+
this.logger.error(formatErrors(e));
|
|
10420
|
+
throw e;
|
|
10421
|
+
});
|
|
10422
|
+
}),
|
|
10423
|
+
/**
|
|
10424
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_types&version=v1 click to debug }
|
|
10425
|
+
*
|
|
10426
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_types document }
|
|
10427
|
+
*
|
|
10428
|
+
* 获取假期类型列表
|
|
10429
|
+
*
|
|
10430
|
+
* 获取休假设置后台配置的假期类型列表(比如年假、事假、婚假等)
|
|
10431
|
+
*/
|
|
10432
|
+
leaveTypes: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10433
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10434
|
+
return this.httpInstance
|
|
10435
|
+
.request({
|
|
10436
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/leave_types`, path),
|
|
10437
|
+
method: "GET",
|
|
10438
|
+
data,
|
|
10439
|
+
params,
|
|
10440
|
+
headers,
|
|
10441
|
+
})
|
|
10442
|
+
.catch((e) => {
|
|
10443
|
+
this.logger.error(formatErrors(e));
|
|
10444
|
+
throw e;
|
|
10445
|
+
});
|
|
10446
|
+
}),
|
|
10447
|
+
},
|
|
10448
|
+
/**
|
|
10449
|
+
* leave_granting_record
|
|
10450
|
+
*/
|
|
10451
|
+
leaveGrantingRecord: {
|
|
10452
|
+
/**
|
|
10453
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=create&version=v1 click to debug }
|
|
10454
|
+
*
|
|
10455
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/create document }
|
|
10456
|
+
*
|
|
10457
|
+
* 创建假期授予记录
|
|
10458
|
+
*
|
|
10459
|
+
* 向飞书人事休假系统写入假期授予记录
|
|
10460
|
+
*/
|
|
10461
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10462
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10463
|
+
return this.httpInstance
|
|
10464
|
+
.request({
|
|
10465
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records`, path),
|
|
10466
|
+
method: "POST",
|
|
10467
|
+
data,
|
|
10468
|
+
params,
|
|
10469
|
+
headers,
|
|
10470
|
+
})
|
|
10471
|
+
.catch((e) => {
|
|
10472
|
+
this.logger.error(formatErrors(e));
|
|
10473
|
+
throw e;
|
|
10474
|
+
});
|
|
10475
|
+
}),
|
|
10476
|
+
/**
|
|
10477
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave_granting_record&apiName=delete&version=v1 click to debug }
|
|
10478
|
+
*
|
|
10479
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/delete document }
|
|
10480
|
+
*
|
|
10481
|
+
* 删除假期授予记录
|
|
10482
|
+
*
|
|
10483
|
+
* 删除飞书人事休假系统中的假期授予记录(仅支持删除授予来源是「手动授予」或「外部系统授予」的记录)
|
|
10484
|
+
*/
|
|
10485
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10486
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10487
|
+
return this.httpInstance
|
|
10488
|
+
.request({
|
|
10489
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leave_granting_records/:leave_granting_record_id`, path),
|
|
10490
|
+
method: "DELETE",
|
|
10491
|
+
data,
|
|
10492
|
+
params,
|
|
10493
|
+
headers,
|
|
10494
|
+
})
|
|
10495
|
+
.catch((e) => {
|
|
10496
|
+
this.logger.error(formatErrors(e));
|
|
10497
|
+
throw e;
|
|
10498
|
+
});
|
|
10499
|
+
}),
|
|
10500
|
+
},
|
|
10501
|
+
/**
|
|
10502
|
+
* 地点
|
|
10503
|
+
*/
|
|
10504
|
+
location: {
|
|
10505
|
+
/**
|
|
10506
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=create&version=v1 click to debug }
|
|
10507
|
+
*
|
|
10508
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/create document }
|
|
10509
|
+
*
|
|
10510
|
+
* 创建地点
|
|
10511
|
+
*
|
|
10512
|
+
* 创建地点
|
|
10513
|
+
*/
|
|
10514
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10515
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10516
|
+
return this.httpInstance
|
|
10517
|
+
.request({
|
|
10518
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path),
|
|
10519
|
+
method: "POST",
|
|
10520
|
+
data,
|
|
10521
|
+
params,
|
|
10522
|
+
headers,
|
|
10523
|
+
})
|
|
10524
|
+
.catch((e) => {
|
|
10525
|
+
this.logger.error(formatErrors(e));
|
|
10526
|
+
throw e;
|
|
10527
|
+
});
|
|
10528
|
+
}),
|
|
10529
|
+
/**
|
|
10530
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=delete&version=v1 click to debug }
|
|
10531
|
+
*
|
|
10532
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/delete document }
|
|
10533
|
+
*
|
|
10534
|
+
* 删除地点
|
|
10535
|
+
*
|
|
10536
|
+
* 删除地点
|
|
10537
|
+
*/
|
|
10538
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10539
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10540
|
+
return this.httpInstance
|
|
10541
|
+
.request({
|
|
10542
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path),
|
|
10543
|
+
method: "DELETE",
|
|
10544
|
+
data,
|
|
10545
|
+
params,
|
|
10546
|
+
headers,
|
|
10547
|
+
})
|
|
10548
|
+
.catch((e) => {
|
|
10549
|
+
this.logger.error(formatErrors(e));
|
|
10550
|
+
throw e;
|
|
10551
|
+
});
|
|
10552
|
+
}),
|
|
10553
|
+
/**
|
|
10554
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=get&version=v1 click to debug }
|
|
10555
|
+
*
|
|
10556
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/get document }
|
|
10557
|
+
*
|
|
10558
|
+
* 查询单个地点
|
|
10559
|
+
*
|
|
10560
|
+
* 根据 ID 查询单个地点
|
|
10561
|
+
*/
|
|
10562
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10563
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10564
|
+
return this.httpInstance
|
|
10565
|
+
.request({
|
|
10566
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations/:location_id`, path),
|
|
10567
|
+
method: "GET",
|
|
10568
|
+
data,
|
|
10569
|
+
params,
|
|
10570
|
+
headers,
|
|
10571
|
+
})
|
|
10572
|
+
.catch((e) => {
|
|
10573
|
+
this.logger.error(formatErrors(e));
|
|
10574
|
+
throw e;
|
|
10575
|
+
});
|
|
10576
|
+
}),
|
|
10577
|
+
/**
|
|
10578
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=list&version=v1 click to debug }
|
|
10579
|
+
*
|
|
10580
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list document }
|
|
10581
|
+
*
|
|
10582
|
+
* 批量查询地点
|
|
10583
|
+
*
|
|
10584
|
+
* 批量查询地点
|
|
10585
|
+
*/
|
|
10586
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10587
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10588
|
+
return this.httpInstance
|
|
10589
|
+
.request({
|
|
10590
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/locations`, path),
|
|
10591
|
+
method: "GET",
|
|
10592
|
+
data,
|
|
10593
|
+
params,
|
|
10594
|
+
headers,
|
|
10595
|
+
})
|
|
10596
|
+
.catch((e) => {
|
|
10597
|
+
this.logger.error(formatErrors(e));
|
|
10598
|
+
throw e;
|
|
10599
|
+
});
|
|
10600
|
+
}),
|
|
10601
|
+
},
|
|
10602
|
+
/**
|
|
10603
|
+
* 国家证件类型
|
|
10604
|
+
*/
|
|
10605
|
+
nationalIdType: {
|
|
10606
|
+
/**
|
|
10607
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=create&version=v1 click to debug }
|
|
10608
|
+
*
|
|
10609
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/create document }
|
|
10610
|
+
*
|
|
10611
|
+
* 创建国家证件类型
|
|
10612
|
+
*
|
|
10613
|
+
* 创建国家证件类型
|
|
10614
|
+
*/
|
|
10615
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10616
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10617
|
+
return this.httpInstance
|
|
10618
|
+
.request({
|
|
10619
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path),
|
|
10620
|
+
method: "POST",
|
|
10621
|
+
data,
|
|
10622
|
+
params,
|
|
10623
|
+
headers,
|
|
10624
|
+
})
|
|
10625
|
+
.catch((e) => {
|
|
10626
|
+
this.logger.error(formatErrors(e));
|
|
10627
|
+
throw e;
|
|
10628
|
+
});
|
|
10629
|
+
}),
|
|
10630
|
+
/**
|
|
10631
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=delete&version=v1 click to debug }
|
|
10632
|
+
*
|
|
10633
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/delete document }
|
|
10634
|
+
*
|
|
10635
|
+
* 删除国家证件类型
|
|
10636
|
+
*
|
|
10637
|
+
* 删除国家证件类型
|
|
10638
|
+
*/
|
|
10639
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10640
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10641
|
+
return this.httpInstance
|
|
10642
|
+
.request({
|
|
10643
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path),
|
|
10644
|
+
method: "DELETE",
|
|
10645
|
+
data,
|
|
10646
|
+
params,
|
|
10647
|
+
headers,
|
|
10648
|
+
})
|
|
10649
|
+
.catch((e) => {
|
|
10650
|
+
this.logger.error(formatErrors(e));
|
|
10651
|
+
throw e;
|
|
10652
|
+
});
|
|
10653
|
+
}),
|
|
10654
|
+
/**
|
|
10655
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=get&version=v1 click to debug }
|
|
10656
|
+
*
|
|
10657
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/get document }
|
|
10658
|
+
*
|
|
10659
|
+
* 查询单个国家证件类型
|
|
10660
|
+
*
|
|
10661
|
+
* 根据 ID 查询单个国家证件类型
|
|
10662
|
+
*/
|
|
10663
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10664
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10665
|
+
return this.httpInstance
|
|
10666
|
+
.request({
|
|
10667
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path),
|
|
10668
|
+
method: "GET",
|
|
10669
|
+
data,
|
|
10670
|
+
params,
|
|
10671
|
+
headers,
|
|
10672
|
+
})
|
|
10673
|
+
.catch((e) => {
|
|
10674
|
+
this.logger.error(formatErrors(e));
|
|
10675
|
+
throw e;
|
|
10676
|
+
});
|
|
10677
|
+
}),
|
|
10678
|
+
/**
|
|
10679
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=list&version=v1 click to debug }
|
|
10680
|
+
*
|
|
10681
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/list document }
|
|
10682
|
+
*
|
|
10683
|
+
* 批量查询国家证件类型
|
|
10684
|
+
*
|
|
10685
|
+
* 批量查询国家证件类型
|
|
10686
|
+
*/
|
|
10687
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10688
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10689
|
+
return this.httpInstance
|
|
10690
|
+
.request({
|
|
10691
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types`, path),
|
|
10692
|
+
method: "GET",
|
|
10693
|
+
data,
|
|
10694
|
+
params,
|
|
10695
|
+
headers,
|
|
10696
|
+
})
|
|
10697
|
+
.catch((e) => {
|
|
10698
|
+
this.logger.error(formatErrors(e));
|
|
10699
|
+
throw e;
|
|
10700
|
+
});
|
|
10701
|
+
}),
|
|
10702
|
+
/**
|
|
10703
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=national_id_type&apiName=patch&version=v1 click to debug }
|
|
10704
|
+
*
|
|
10705
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/patch document }
|
|
10706
|
+
*
|
|
10707
|
+
* 更新国家证件类型
|
|
10708
|
+
*
|
|
10709
|
+
* 更新国家证件类型
|
|
10710
|
+
*/
|
|
10711
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10712
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10713
|
+
return this.httpInstance
|
|
10714
|
+
.request({
|
|
10715
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/national_id_types/:national_id_type_id`, path),
|
|
10716
|
+
method: "PATCH",
|
|
10717
|
+
data,
|
|
10718
|
+
params,
|
|
10719
|
+
headers,
|
|
10720
|
+
})
|
|
10721
|
+
.catch((e) => {
|
|
10722
|
+
this.logger.error(formatErrors(e));
|
|
10723
|
+
throw e;
|
|
10724
|
+
});
|
|
10725
|
+
}),
|
|
10726
|
+
},
|
|
10727
|
+
/**
|
|
10728
|
+
* 员工离职
|
|
10729
|
+
*/
|
|
10730
|
+
offboarding: {
|
|
10731
|
+
/**
|
|
10732
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=query&version=v1 click to debug }
|
|
10733
|
+
*
|
|
10734
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/query document }
|
|
10735
|
+
*
|
|
10736
|
+
* 查询员工离职原因列表
|
|
10737
|
+
*
|
|
10738
|
+
* 查询「飞书人事」-「离职设置」中的离职原因
|
|
10739
|
+
*/
|
|
10740
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10741
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10742
|
+
return this.httpInstance
|
|
10743
|
+
.request({
|
|
10744
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/query`, path),
|
|
10745
|
+
method: "POST",
|
|
10746
|
+
data,
|
|
10747
|
+
params,
|
|
10748
|
+
headers,
|
|
10749
|
+
})
|
|
10750
|
+
.catch((e) => {
|
|
10751
|
+
this.logger.error(formatErrors(e));
|
|
10752
|
+
throw e;
|
|
10753
|
+
});
|
|
10754
|
+
}),
|
|
10755
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10756
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10757
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10758
|
+
const res = yield this.httpInstance
|
|
10759
|
+
.request({
|
|
10760
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path),
|
|
10761
|
+
method: "POST",
|
|
10762
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
10763
|
+
params: pickBy(innerPayload.params, identity),
|
|
10764
|
+
})
|
|
10765
|
+
.catch((e) => {
|
|
10766
|
+
this.logger.error(formatErrors(e));
|
|
10767
|
+
});
|
|
10768
|
+
return res;
|
|
10769
|
+
});
|
|
10770
|
+
const Iterable = {
|
|
10771
|
+
[Symbol.asyncIterator]() {
|
|
10772
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
10773
|
+
let hasMore = true;
|
|
10774
|
+
let pageToken;
|
|
10775
|
+
while (hasMore) {
|
|
10776
|
+
try {
|
|
10777
|
+
const res = yield __await(sendRequest({
|
|
10778
|
+
headers,
|
|
10779
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
10780
|
+
data,
|
|
10781
|
+
}));
|
|
10782
|
+
const _b = get(res, "data") || {}, {
|
|
10783
|
+
// @ts-ignore
|
|
10784
|
+
has_more,
|
|
10785
|
+
// @ts-ignore
|
|
10786
|
+
page_token,
|
|
10787
|
+
// @ts-ignore
|
|
10788
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
10789
|
+
yield yield __await(rest);
|
|
10790
|
+
hasMore = Boolean(has_more);
|
|
10791
|
+
pageToken = page_token || next_page_token;
|
|
10792
|
+
}
|
|
10793
|
+
catch (e) {
|
|
10794
|
+
yield yield __await(null);
|
|
10795
|
+
break;
|
|
10796
|
+
}
|
|
10797
|
+
}
|
|
10798
|
+
});
|
|
10799
|
+
},
|
|
10800
|
+
};
|
|
10801
|
+
return Iterable;
|
|
10802
|
+
}),
|
|
10803
|
+
/**
|
|
10804
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=search&version=v1 click to debug }
|
|
10805
|
+
*
|
|
10806
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=offboarding&version=v1 document }
|
|
10807
|
+
*
|
|
10808
|
+
* 根据 雇佣 ID 查询员工离职信息
|
|
10809
|
+
*/
|
|
10810
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10811
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10812
|
+
return this.httpInstance
|
|
10813
|
+
.request({
|
|
10814
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/search`, path),
|
|
10815
|
+
method: "POST",
|
|
10816
|
+
data,
|
|
10817
|
+
params,
|
|
10818
|
+
headers,
|
|
10819
|
+
})
|
|
10820
|
+
.catch((e) => {
|
|
10821
|
+
this.logger.error(formatErrors(e));
|
|
10822
|
+
throw e;
|
|
10823
|
+
});
|
|
10824
|
+
}),
|
|
10825
|
+
/**
|
|
10826
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit&version=v1 click to debug }
|
|
10827
|
+
*
|
|
10828
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/submit document }
|
|
10829
|
+
*
|
|
10830
|
+
* 操作员工离职
|
|
10831
|
+
*
|
|
10832
|
+
* 操作员工直接离职
|
|
10833
|
+
*/
|
|
10834
|
+
submit: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10835
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10836
|
+
return this.httpInstance
|
|
10837
|
+
.request({
|
|
10838
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/offboardings/submit`, path),
|
|
10839
|
+
method: "POST",
|
|
10840
|
+
data,
|
|
10841
|
+
params,
|
|
10842
|
+
headers,
|
|
10843
|
+
})
|
|
10844
|
+
.catch((e) => {
|
|
10845
|
+
this.logger.error(formatErrors(e));
|
|
10846
|
+
throw e;
|
|
10847
|
+
});
|
|
10848
|
+
}),
|
|
10849
|
+
},
|
|
10850
|
+
/**
|
|
10851
|
+
* 个人信息
|
|
10852
|
+
*/
|
|
10853
|
+
person: {
|
|
10854
|
+
/**
|
|
10855
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=delete&version=v1 click to debug }
|
|
10856
|
+
*
|
|
10857
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/delete document }
|
|
10858
|
+
*
|
|
10859
|
+
* 删除个人信息
|
|
10860
|
+
*
|
|
10861
|
+
* 删除人员的个人信息
|
|
10862
|
+
*/
|
|
10863
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10864
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10865
|
+
return this.httpInstance
|
|
10866
|
+
.request({
|
|
10867
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path),
|
|
10868
|
+
method: "DELETE",
|
|
10869
|
+
data,
|
|
10870
|
+
params,
|
|
10871
|
+
headers,
|
|
10872
|
+
})
|
|
10873
|
+
.catch((e) => {
|
|
10874
|
+
this.logger.error(formatErrors(e));
|
|
10875
|
+
throw e;
|
|
10876
|
+
});
|
|
10877
|
+
}),
|
|
10878
|
+
/**
|
|
10879
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=get&version=v1 click to debug }
|
|
10880
|
+
*
|
|
10881
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/get document }
|
|
10882
|
+
*
|
|
10883
|
+
* 查询单个个人信息
|
|
10884
|
+
*
|
|
10885
|
+
* 根据 ID 查询单个人员的个人信息
|
|
10886
|
+
*/
|
|
10887
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10888
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10889
|
+
return this.httpInstance
|
|
10890
|
+
.request({
|
|
10891
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/:person_id`, path),
|
|
10892
|
+
method: "GET",
|
|
10893
|
+
data,
|
|
10894
|
+
params,
|
|
10895
|
+
headers,
|
|
10896
|
+
})
|
|
10897
|
+
.catch((e) => {
|
|
10898
|
+
this.logger.error(formatErrors(e));
|
|
10899
|
+
throw e;
|
|
10900
|
+
});
|
|
10901
|
+
}),
|
|
10902
|
+
/**
|
|
10903
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=upload&version=v1 click to debug }
|
|
10904
|
+
*
|
|
10905
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/upload document }
|
|
10906
|
+
*
|
|
10907
|
+
* 上传文件
|
|
10908
|
+
*
|
|
10909
|
+
* 上传文件
|
|
10910
|
+
*/
|
|
10911
|
+
upload: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10912
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10913
|
+
const res = yield this.httpInstance
|
|
10914
|
+
.request({
|
|
10915
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/persons/upload`, path),
|
|
10916
|
+
method: "POST",
|
|
10917
|
+
data,
|
|
10918
|
+
params,
|
|
10919
|
+
headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
|
|
10920
|
+
})
|
|
10921
|
+
.catch((e) => {
|
|
10922
|
+
this.logger.error(formatErrors(e));
|
|
10923
|
+
throw e;
|
|
10924
|
+
});
|
|
10925
|
+
return get(res, "data", null);
|
|
10926
|
+
}),
|
|
10927
|
+
},
|
|
10928
|
+
/**
|
|
10929
|
+
* 待入职
|
|
10930
|
+
*/
|
|
10931
|
+
preHire: {
|
|
10932
|
+
/**
|
|
10933
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v1 click to debug }
|
|
10934
|
+
*
|
|
10935
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/delete document }
|
|
10936
|
+
*
|
|
10937
|
+
* 删除待入职人员
|
|
10938
|
+
*
|
|
10939
|
+
* 删除待入职人员
|
|
10940
|
+
*/
|
|
10941
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10942
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10943
|
+
return this.httpInstance
|
|
10944
|
+
.request({
|
|
10945
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path),
|
|
10946
|
+
method: "DELETE",
|
|
10947
|
+
data,
|
|
10948
|
+
params,
|
|
10949
|
+
headers,
|
|
10950
|
+
})
|
|
10951
|
+
.catch((e) => {
|
|
10952
|
+
this.logger.error(formatErrors(e));
|
|
10953
|
+
throw e;
|
|
10954
|
+
});
|
|
10955
|
+
}),
|
|
10956
|
+
/**
|
|
10957
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=get&version=v1 click to debug }
|
|
10958
|
+
*
|
|
10959
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/get document }
|
|
10960
|
+
*
|
|
10961
|
+
* 查询单个待入职人员
|
|
10962
|
+
*
|
|
10963
|
+
* 根据 ID 查询单个待入职人员
|
|
10964
|
+
*/
|
|
10965
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10966
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10967
|
+
return this.httpInstance
|
|
10968
|
+
.request({
|
|
10969
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path),
|
|
10970
|
+
method: "GET",
|
|
10971
|
+
data,
|
|
10972
|
+
params,
|
|
10973
|
+
headers,
|
|
10974
|
+
})
|
|
10975
|
+
.catch((e) => {
|
|
10976
|
+
this.logger.error(formatErrors(e));
|
|
10977
|
+
throw e;
|
|
10978
|
+
});
|
|
10979
|
+
}),
|
|
10980
|
+
/**
|
|
10981
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=list&version=v1 click to debug }
|
|
10982
|
+
*
|
|
10983
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/list document }
|
|
10984
|
+
*
|
|
10985
|
+
* 批量查询待入职人员
|
|
10986
|
+
*
|
|
10987
|
+
* 批量查询待入职人员
|
|
10988
|
+
*/
|
|
10989
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10990
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10991
|
+
return this.httpInstance
|
|
10992
|
+
.request({
|
|
10993
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires`, path),
|
|
10994
|
+
method: "GET",
|
|
10995
|
+
data,
|
|
10996
|
+
params,
|
|
10997
|
+
headers,
|
|
10998
|
+
})
|
|
10999
|
+
.catch((e) => {
|
|
11000
|
+
this.logger.error(formatErrors(e));
|
|
11001
|
+
throw e;
|
|
11002
|
+
});
|
|
11003
|
+
}),
|
|
11004
|
+
/**
|
|
11005
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v1 click to debug }
|
|
11006
|
+
*
|
|
11007
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/patch document }
|
|
11008
|
+
*
|
|
11009
|
+
* 更新待入职数据
|
|
11010
|
+
*
|
|
11011
|
+
* 更新待入职数据
|
|
11012
|
+
*/
|
|
11013
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11014
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11015
|
+
return this.httpInstance
|
|
11016
|
+
.request({
|
|
11017
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/pre_hires/:pre_hire_id`, path),
|
|
11018
|
+
method: "PATCH",
|
|
11019
|
+
data,
|
|
11020
|
+
params,
|
|
11021
|
+
headers,
|
|
11022
|
+
})
|
|
11023
|
+
.catch((e) => {
|
|
11024
|
+
this.logger.error(formatErrors(e));
|
|
11025
|
+
throw e;
|
|
11026
|
+
});
|
|
11027
|
+
}),
|
|
11028
|
+
},
|
|
11029
|
+
/**
|
|
11030
|
+
* 流程管理
|
|
11031
|
+
*/
|
|
11032
|
+
processFormVariableData: {
|
|
11033
|
+
/**
|
|
11034
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v1 click to debug }
|
|
11035
|
+
*
|
|
11036
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/process-form_variable_data/get document }
|
|
11037
|
+
*
|
|
11038
|
+
* 获取流程表单数据
|
|
11039
|
+
*
|
|
11040
|
+
* 获取流程表单数据
|
|
11041
|
+
*/
|
|
11042
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11043
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11044
|
+
return this.httpInstance
|
|
11045
|
+
.request({
|
|
11046
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/processes/:process_id/form_variable_data`, path),
|
|
11047
|
+
method: "GET",
|
|
11048
|
+
data,
|
|
11049
|
+
params,
|
|
11050
|
+
headers,
|
|
11051
|
+
})
|
|
11052
|
+
.catch((e) => {
|
|
11053
|
+
this.logger.error(formatErrors(e));
|
|
11054
|
+
throw e;
|
|
11055
|
+
});
|
|
11056
|
+
}),
|
|
11057
|
+
},
|
|
11058
|
+
/**
|
|
11059
|
+
* security_group
|
|
11060
|
+
*/
|
|
11061
|
+
securityGroup: {
|
|
11062
|
+
/**
|
|
11063
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=list&version=v1 click to debug }
|
|
11064
|
+
*
|
|
11065
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/list document }
|
|
11066
|
+
*
|
|
11067
|
+
* 批量获取角色列表
|
|
11068
|
+
*
|
|
11069
|
+
* 批量查询「飞书人事」-「权限设置」-「角色设置」中的角色列表
|
|
11070
|
+
*/
|
|
11071
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11072
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11073
|
+
return this.httpInstance
|
|
11074
|
+
.request({
|
|
11075
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups`, path),
|
|
11076
|
+
method: "GET",
|
|
11077
|
+
data,
|
|
11078
|
+
params,
|
|
11079
|
+
headers,
|
|
11080
|
+
})
|
|
11081
|
+
.catch((e) => {
|
|
11082
|
+
this.logger.error(formatErrors(e));
|
|
11083
|
+
throw e;
|
|
11084
|
+
});
|
|
11085
|
+
}),
|
|
11086
|
+
/**
|
|
11087
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=security_group&apiName=query&version=v1 click to debug }
|
|
11088
|
+
*
|
|
11089
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/query document }
|
|
11090
|
+
*
|
|
11091
|
+
* HRBP/属地 BP 查询
|
|
11092
|
+
*
|
|
11093
|
+
* 通过部门或工作地点,查询对应的 HRBP/属地 BP
|
|
11094
|
+
*/
|
|
11095
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11096
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11097
|
+
return this.httpInstance
|
|
11098
|
+
.request({
|
|
11099
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/security_groups/query`, path),
|
|
11100
|
+
method: "POST",
|
|
11101
|
+
data,
|
|
11102
|
+
params,
|
|
11103
|
+
headers,
|
|
11104
|
+
})
|
|
11105
|
+
.catch((e) => {
|
|
11106
|
+
this.logger.error(formatErrors(e));
|
|
11107
|
+
throw e;
|
|
11108
|
+
});
|
|
11109
|
+
}),
|
|
11110
|
+
},
|
|
11111
|
+
/**
|
|
11112
|
+
* 地理库信息
|
|
11113
|
+
*/
|
|
11114
|
+
subdivision: {
|
|
11115
|
+
/**
|
|
11116
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=get&version=v1 click to debug }
|
|
11117
|
+
*
|
|
11118
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/get document }
|
|
11119
|
+
*
|
|
11120
|
+
* 查询单条省份/行政区信息
|
|
11121
|
+
*
|
|
11122
|
+
* 查询单条省份/行政区信息
|
|
11123
|
+
*/
|
|
11124
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11125
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11126
|
+
return this.httpInstance
|
|
11127
|
+
.request({
|
|
11128
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions/:subdivision_id`, path),
|
|
11129
|
+
method: "GET",
|
|
11130
|
+
data,
|
|
11131
|
+
params,
|
|
11132
|
+
headers,
|
|
11133
|
+
})
|
|
11134
|
+
.catch((e) => {
|
|
11135
|
+
this.logger.error(formatErrors(e));
|
|
11136
|
+
throw e;
|
|
11137
|
+
});
|
|
11138
|
+
}),
|
|
11139
|
+
/**
|
|
11140
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subdivision&apiName=list&version=v1 click to debug }
|
|
11141
|
+
*
|
|
11142
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/list document }
|
|
11143
|
+
*
|
|
11144
|
+
* 批量查询省份/行政区信息
|
|
11145
|
+
*
|
|
11146
|
+
* 批量查询省份/行政区信息
|
|
11147
|
+
*/
|
|
11148
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11149
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11150
|
+
return this.httpInstance
|
|
11151
|
+
.request({
|
|
11152
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subdivisions`, path),
|
|
11153
|
+
method: "GET",
|
|
11154
|
+
data,
|
|
11155
|
+
params,
|
|
11156
|
+
headers,
|
|
11157
|
+
})
|
|
11158
|
+
.catch((e) => {
|
|
11159
|
+
this.logger.error(formatErrors(e));
|
|
11160
|
+
throw e;
|
|
11161
|
+
});
|
|
11162
|
+
}),
|
|
11163
|
+
},
|
|
11164
|
+
/**
|
|
11165
|
+
* 地理库信息
|
|
11166
|
+
*/
|
|
11167
|
+
subregion: {
|
|
11168
|
+
/**
|
|
11169
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=get&version=v1 click to debug }
|
|
11170
|
+
*
|
|
11171
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/get document }
|
|
11172
|
+
*
|
|
11173
|
+
* 查询单条城市/区域信息
|
|
11174
|
+
*
|
|
11175
|
+
* 查询单条城市/区域信息
|
|
11176
|
+
*/
|
|
11177
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11178
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11179
|
+
return this.httpInstance
|
|
11180
|
+
.request({
|
|
11181
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions/:subregion_id`, path),
|
|
11182
|
+
method: "GET",
|
|
11183
|
+
data,
|
|
11184
|
+
params,
|
|
11185
|
+
headers,
|
|
11186
|
+
})
|
|
11187
|
+
.catch((e) => {
|
|
11188
|
+
this.logger.error(formatErrors(e));
|
|
11189
|
+
throw e;
|
|
11190
|
+
});
|
|
11191
|
+
}),
|
|
11192
|
+
/**
|
|
11193
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=subregion&apiName=list&version=v1 click to debug }
|
|
11194
|
+
*
|
|
11195
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/list document }
|
|
11196
|
+
*
|
|
11197
|
+
* 批量查询城市/区域信息
|
|
11198
|
+
*
|
|
11199
|
+
* 批量查询城市/区域信息
|
|
11200
|
+
*/
|
|
11201
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11202
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11203
|
+
return this.httpInstance
|
|
11204
|
+
.request({
|
|
11205
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/subregions`, path),
|
|
11206
|
+
method: "GET",
|
|
11207
|
+
data,
|
|
11208
|
+
params,
|
|
11209
|
+
headers,
|
|
11210
|
+
})
|
|
11211
|
+
.catch((e) => {
|
|
11212
|
+
this.logger.error(formatErrors(e));
|
|
11213
|
+
throw e;
|
|
11214
|
+
});
|
|
11215
|
+
}),
|
|
11216
|
+
},
|
|
11217
|
+
/**
|
|
11218
|
+
* 异动原因
|
|
11219
|
+
*/
|
|
11220
|
+
transferReason: {
|
|
11221
|
+
/**
|
|
11222
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_reason&apiName=query&version=v1 click to debug }
|
|
11223
|
+
*
|
|
11224
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_reason/query document }
|
|
11225
|
+
*
|
|
11226
|
+
* 获取异动原因列表
|
|
11227
|
+
*
|
|
11228
|
+
* 获取异动原因列表
|
|
11229
|
+
*/
|
|
11230
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11231
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11232
|
+
return this.httpInstance
|
|
11233
|
+
.request({
|
|
11234
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_reasons/query`, path),
|
|
11235
|
+
method: "GET",
|
|
11236
|
+
data,
|
|
11237
|
+
params,
|
|
11238
|
+
headers,
|
|
11239
|
+
})
|
|
11240
|
+
.catch((e) => {
|
|
11241
|
+
this.logger.error(formatErrors(e));
|
|
11242
|
+
throw e;
|
|
11243
|
+
});
|
|
11244
|
+
}),
|
|
11245
|
+
},
|
|
11246
|
+
/**
|
|
11247
|
+
* 异动类型
|
|
11248
|
+
*/
|
|
11249
|
+
transferType: {
|
|
11250
|
+
/**
|
|
11251
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=transfer_type&apiName=query&version=v1 click to debug }
|
|
11252
|
+
*
|
|
11253
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/transfer_type/query document }
|
|
11254
|
+
*
|
|
11255
|
+
* 获取异动类型列表
|
|
11256
|
+
*
|
|
11257
|
+
* 获取异动类型列表
|
|
11258
|
+
*/
|
|
11259
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11260
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11261
|
+
return this.httpInstance
|
|
11262
|
+
.request({
|
|
11263
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/transfer_types/query`, path),
|
|
11264
|
+
method: "GET",
|
|
11265
|
+
data,
|
|
11266
|
+
params,
|
|
11267
|
+
headers,
|
|
11268
|
+
})
|
|
11269
|
+
.catch((e) => {
|
|
11270
|
+
this.logger.error(formatErrors(e));
|
|
11271
|
+
throw e;
|
|
11272
|
+
});
|
|
11273
|
+
}),
|
|
11274
|
+
},
|
|
11275
|
+
/**
|
|
11276
|
+
* 工时制度
|
|
11277
|
+
*/
|
|
11278
|
+
workingHoursType: {
|
|
11279
|
+
/**
|
|
11280
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=create&version=v1 click to debug }
|
|
11281
|
+
*
|
|
11282
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/create document }
|
|
11283
|
+
*
|
|
11284
|
+
* 创建工时制度
|
|
11285
|
+
*
|
|
11286
|
+
* 创建工时制度
|
|
11287
|
+
*/
|
|
11288
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11289
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11290
|
+
return this.httpInstance
|
|
11291
|
+
.request({
|
|
11292
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path),
|
|
11293
|
+
method: "POST",
|
|
11294
|
+
data,
|
|
11295
|
+
params,
|
|
11296
|
+
headers,
|
|
11297
|
+
})
|
|
11298
|
+
.catch((e) => {
|
|
11299
|
+
this.logger.error(formatErrors(e));
|
|
11300
|
+
throw e;
|
|
11301
|
+
});
|
|
11302
|
+
}),
|
|
11303
|
+
/**
|
|
11304
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=delete&version=v1 click to debug }
|
|
11305
|
+
*
|
|
11306
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/delete document }
|
|
11307
|
+
*
|
|
11308
|
+
* 删除工时制度
|
|
11309
|
+
*
|
|
11310
|
+
* 删除工时制度
|
|
11311
|
+
*/
|
|
11312
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11313
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11314
|
+
return this.httpInstance
|
|
11315
|
+
.request({
|
|
11316
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path),
|
|
11317
|
+
method: "DELETE",
|
|
11318
|
+
data,
|
|
11319
|
+
params,
|
|
11320
|
+
headers,
|
|
11321
|
+
})
|
|
11322
|
+
.catch((e) => {
|
|
11323
|
+
this.logger.error(formatErrors(e));
|
|
11324
|
+
throw e;
|
|
11325
|
+
});
|
|
11326
|
+
}),
|
|
11327
|
+
/**
|
|
11328
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=get&version=v1 click to debug }
|
|
11329
|
+
*
|
|
11330
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/get document }
|
|
11331
|
+
*
|
|
11332
|
+
* 查询单个工时制度
|
|
11333
|
+
*
|
|
11334
|
+
* 根据 ID 查询单个工时制度
|
|
11335
|
+
*/
|
|
11336
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11337
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11338
|
+
return this.httpInstance
|
|
11339
|
+
.request({
|
|
11340
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path),
|
|
11341
|
+
method: "GET",
|
|
11342
|
+
data,
|
|
11343
|
+
params,
|
|
11344
|
+
headers,
|
|
11345
|
+
})
|
|
11346
|
+
.catch((e) => {
|
|
11347
|
+
this.logger.error(formatErrors(e));
|
|
11348
|
+
throw e;
|
|
11349
|
+
});
|
|
11350
|
+
}),
|
|
11351
|
+
/**
|
|
11352
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=list&version=v1 click to debug }
|
|
11353
|
+
*
|
|
11354
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/list document }
|
|
11355
|
+
*
|
|
11356
|
+
* 批量查询工时制度
|
|
11357
|
+
*
|
|
11358
|
+
* 批量查询工时制度
|
|
11359
|
+
*/
|
|
11360
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11361
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11362
|
+
return this.httpInstance
|
|
11363
|
+
.request({
|
|
11364
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types`, path),
|
|
11365
|
+
method: "GET",
|
|
11366
|
+
data,
|
|
11367
|
+
params,
|
|
11368
|
+
headers,
|
|
11369
|
+
})
|
|
11370
|
+
.catch((e) => {
|
|
11371
|
+
this.logger.error(formatErrors(e));
|
|
11372
|
+
throw e;
|
|
11373
|
+
});
|
|
11374
|
+
}),
|
|
11375
|
+
/**
|
|
11376
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=working_hours_type&apiName=patch&version=v1 click to debug }
|
|
11377
|
+
*
|
|
11378
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/patch document }
|
|
11379
|
+
*
|
|
11380
|
+
* 更新工时制度
|
|
11381
|
+
*
|
|
11382
|
+
* 更新工时制度
|
|
11383
|
+
*/
|
|
11384
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11385
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11386
|
+
return this.httpInstance
|
|
11387
|
+
.request({
|
|
11388
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/working_hours_types/:working_hours_type_id`, path),
|
|
11389
|
+
method: "PATCH",
|
|
11390
|
+
data,
|
|
11391
|
+
params,
|
|
11392
|
+
headers,
|
|
11393
|
+
})
|
|
11394
|
+
.catch((e) => {
|
|
11395
|
+
this.logger.error(formatErrors(e));
|
|
11396
|
+
throw e;
|
|
11397
|
+
});
|
|
11398
|
+
}),
|
|
11399
|
+
},
|
|
11400
|
+
};
|
|
11401
|
+
/**
|
|
11402
|
+
|
|
11403
|
+
*/
|
|
11404
|
+
this.docs_tool = {};
|
|
11405
|
+
/**
|
|
11406
|
+
* 云文档-文档
|
|
11407
|
+
*/
|
|
11408
|
+
this.docx = {
|
|
11409
|
+
/**
|
|
11410
|
+
* 块
|
|
11411
|
+
*/
|
|
11412
|
+
documentBlock: {
|
|
11413
|
+
/**
|
|
11414
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=batch_update&version=v1 click to debug }
|
|
11415
|
+
*
|
|
11416
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update document }
|
|
11417
|
+
*
|
|
11418
|
+
* 批量更新块
|
|
11419
|
+
*
|
|
11420
|
+
* 批量更新块的富文本内容。
|
|
11421
|
+
*
|
|
11422
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11423
|
+
*
|
|
11424
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnMiwAKCiE6oQEkPyhvmmQEe),了解相关规则及约束。
|
|
11425
|
+
*/
|
|
11426
|
+
batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11427
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11428
|
+
return this.httpInstance
|
|
11429
|
+
.request({
|
|
11430
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/batch_update`, path),
|
|
11431
|
+
method: "PATCH",
|
|
11432
|
+
data,
|
|
11433
|
+
params,
|
|
11434
|
+
headers,
|
|
11435
|
+
})
|
|
11436
|
+
.catch((e) => {
|
|
11437
|
+
this.logger.error(formatErrors(e));
|
|
11438
|
+
throw e;
|
|
11439
|
+
});
|
|
11440
|
+
}),
|
|
11441
|
+
/**
|
|
11442
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=get&version=v1 click to debug }
|
|
11443
|
+
*
|
|
11444
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get document }
|
|
11445
|
+
*
|
|
11446
|
+
* 获取块
|
|
11447
|
+
*
|
|
11448
|
+
* 获取指定块的富文本内容。
|
|
11449
|
+
*
|
|
11450
|
+
* 频率限制:单个应用调用频率上限为每秒 5 次。
|
|
11451
|
+
*
|
|
11452
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcnWEMWYAg2YMkEq0SZXHzaih),了解相关规则及约束。
|
|
11453
|
+
*/
|
|
11454
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11455
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11456
|
+
return this.httpInstance
|
|
11457
|
+
.request({
|
|
11458
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path),
|
|
11459
|
+
method: "GET",
|
|
11460
|
+
data,
|
|
11461
|
+
params,
|
|
11462
|
+
headers,
|
|
11463
|
+
})
|
|
11464
|
+
.catch((e) => {
|
|
11465
|
+
this.logger.error(formatErrors(e));
|
|
11466
|
+
throw e;
|
|
11467
|
+
});
|
|
11468
|
+
}),
|
|
11469
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11470
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11471
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
11472
|
+
const res = yield this.httpInstance
|
|
11473
|
+
.request({
|
|
11474
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path),
|
|
11475
|
+
method: "GET",
|
|
11476
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
11477
|
+
params: pickBy(innerPayload.params, identity),
|
|
11478
|
+
})
|
|
11479
|
+
.catch((e) => {
|
|
11480
|
+
this.logger.error(formatErrors(e));
|
|
11481
|
+
});
|
|
11482
|
+
return res;
|
|
11483
|
+
});
|
|
11484
|
+
const Iterable = {
|
|
11485
|
+
[Symbol.asyncIterator]() {
|
|
11486
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
11487
|
+
let hasMore = true;
|
|
11488
|
+
let pageToken;
|
|
11489
|
+
while (hasMore) {
|
|
11490
|
+
try {
|
|
11491
|
+
const res = yield __await(sendRequest({
|
|
11492
|
+
headers,
|
|
11493
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
11494
|
+
data,
|
|
11495
|
+
}));
|
|
11496
|
+
const _b = get(res, "data") || {}, {
|
|
11497
|
+
// @ts-ignore
|
|
11498
|
+
has_more,
|
|
11499
|
+
// @ts-ignore
|
|
11500
|
+
page_token,
|
|
11501
|
+
// @ts-ignore
|
|
11502
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
11503
|
+
yield yield __await(rest);
|
|
11504
|
+
hasMore = Boolean(has_more);
|
|
11505
|
+
pageToken = page_token || next_page_token;
|
|
11506
|
+
}
|
|
11507
|
+
catch (e) {
|
|
11508
|
+
yield yield __await(null);
|
|
11509
|
+
break;
|
|
11510
|
+
}
|
|
11511
|
+
}
|
|
11512
|
+
});
|
|
11513
|
+
},
|
|
11514
|
+
};
|
|
11515
|
+
return Iterable;
|
|
11516
|
+
}),
|
|
11517
|
+
/**
|
|
11518
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=list&version=v1 click to debug }
|
|
11519
|
+
*
|
|
11520
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list document }
|
|
11521
|
+
*
|
|
11522
|
+
* 获取文档所有块
|
|
11523
|
+
*
|
|
11524
|
+
* 获取文档所有块的富文本内容并分页返回。
|
|
11525
|
+
*
|
|
11526
|
+
* 频率限制:单个应用调用频率上限为每秒 5 次。
|
|
11527
|
+
*
|
|
11528
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnamKaccZKqIMopnREJCZUMe#doxcn6AkCE2AUUm2WwxID7lS7Xc),了解相关规则及约束。
|
|
11529
|
+
*/
|
|
11530
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11531
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11532
|
+
return this.httpInstance
|
|
11533
|
+
.request({
|
|
11534
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks`, path),
|
|
11535
|
+
method: "GET",
|
|
11536
|
+
data,
|
|
11537
|
+
params,
|
|
11538
|
+
headers,
|
|
11539
|
+
})
|
|
11540
|
+
.catch((e) => {
|
|
11541
|
+
this.logger.error(formatErrors(e));
|
|
11542
|
+
throw e;
|
|
11543
|
+
});
|
|
11544
|
+
}),
|
|
11545
|
+
/**
|
|
11546
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block&apiName=patch&version=v1 click to debug }
|
|
11547
|
+
*
|
|
11548
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch document }
|
|
11549
|
+
*
|
|
11550
|
+
* 更新块
|
|
11551
|
+
*
|
|
11552
|
+
* 更新指定的块。
|
|
11553
|
+
*
|
|
11554
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11555
|
+
*
|
|
11556
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnEeyS0I8MMqoieIMpK7jm8g),了解相关规则及约束。
|
|
11557
|
+
*/
|
|
11558
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11559
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11560
|
+
return this.httpInstance
|
|
11561
|
+
.request({
|
|
11562
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id`, path),
|
|
11563
|
+
method: "PATCH",
|
|
11564
|
+
data,
|
|
11565
|
+
params,
|
|
11566
|
+
headers,
|
|
11567
|
+
})
|
|
11568
|
+
.catch((e) => {
|
|
11569
|
+
this.logger.error(formatErrors(e));
|
|
11570
|
+
throw e;
|
|
11571
|
+
});
|
|
11572
|
+
}),
|
|
11573
|
+
},
|
|
11574
|
+
/**
|
|
11575
|
+
* document.block.children
|
|
11576
|
+
*/
|
|
11577
|
+
documentBlockChildren: {
|
|
11578
|
+
/**
|
|
11579
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=batch_delete&version=v1 click to debug }
|
|
11580
|
+
*
|
|
11581
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete document }
|
|
11582
|
+
*
|
|
11583
|
+
* 删除块
|
|
11584
|
+
*
|
|
11585
|
+
* 指定需要操作的块,删除其指定范围的子块。如果操作成功,接口将返回应用删除操作后的文档版本号。
|
|
11586
|
+
*
|
|
11587
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11588
|
+
*
|
|
11589
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcngCsscGk0WacO258mYDgM6b),了解相关规则及约束。
|
|
11590
|
+
*/
|
|
11591
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11592
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11593
|
+
return this.httpInstance
|
|
11594
|
+
.request({
|
|
11595
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children/batch_delete`, path),
|
|
11596
|
+
method: "DELETE",
|
|
11597
|
+
data,
|
|
11598
|
+
params,
|
|
11599
|
+
headers,
|
|
11600
|
+
})
|
|
11601
|
+
.catch((e) => {
|
|
11602
|
+
this.logger.error(formatErrors(e));
|
|
11603
|
+
throw e;
|
|
11604
|
+
});
|
|
11605
|
+
}),
|
|
11606
|
+
/**
|
|
11607
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=create&version=v1 click to debug }
|
|
11608
|
+
*
|
|
11609
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create document }
|
|
11610
|
+
*
|
|
11611
|
+
* 创建块
|
|
11612
|
+
*
|
|
11613
|
+
* 指定需要操作的块,为其创建一批子块,并插入到指定位置。如果操作成功,接口将返回新创建子块的富文本内容。
|
|
11614
|
+
*
|
|
11615
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
11616
|
+
*
|
|
11617
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnm0ooUe0s20GwwVB3a05rtb),了解相关规则及约束。
|
|
11618
|
+
*/
|
|
11619
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11620
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11621
|
+
return this.httpInstance
|
|
11622
|
+
.request({
|
|
11623
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path),
|
|
11624
|
+
method: "POST",
|
|
11625
|
+
data,
|
|
11626
|
+
params,
|
|
11627
|
+
headers,
|
|
11628
|
+
})
|
|
11629
|
+
.catch((e) => {
|
|
11630
|
+
this.logger.error(formatErrors(e));
|
|
11631
|
+
throw e;
|
|
11632
|
+
});
|
|
11633
|
+
}),
|
|
11634
|
+
getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11635
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11636
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
11637
|
+
const res = yield this.httpInstance
|
|
11638
|
+
.request({
|
|
11639
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path),
|
|
11640
|
+
method: "GET",
|
|
11641
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
11642
|
+
params: pickBy(innerPayload.params, identity),
|
|
11643
|
+
})
|
|
11644
|
+
.catch((e) => {
|
|
11645
|
+
this.logger.error(formatErrors(e));
|
|
11646
|
+
});
|
|
11647
|
+
return res;
|
|
11648
|
+
});
|
|
11649
|
+
const Iterable = {
|
|
11650
|
+
[Symbol.asyncIterator]() {
|
|
11651
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
11652
|
+
let hasMore = true;
|
|
11653
|
+
let pageToken;
|
|
11654
|
+
while (hasMore) {
|
|
11655
|
+
try {
|
|
11656
|
+
const res = yield __await(sendRequest({
|
|
11657
|
+
headers,
|
|
11658
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
11659
|
+
data,
|
|
11660
|
+
}));
|
|
11661
|
+
const _b = get(res, "data") || {}, {
|
|
11662
|
+
// @ts-ignore
|
|
11663
|
+
has_more,
|
|
11664
|
+
// @ts-ignore
|
|
11665
|
+
page_token,
|
|
11666
|
+
// @ts-ignore
|
|
11667
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
11668
|
+
yield yield __await(rest);
|
|
11669
|
+
hasMore = Boolean(has_more);
|
|
11670
|
+
pageToken = page_token || next_page_token;
|
|
11671
|
+
}
|
|
11672
|
+
catch (e) {
|
|
11673
|
+
yield yield __await(null);
|
|
11674
|
+
break;
|
|
11675
|
+
}
|
|
11676
|
+
}
|
|
11677
|
+
});
|
|
11678
|
+
},
|
|
11679
|
+
};
|
|
11680
|
+
return Iterable;
|
|
11681
|
+
}),
|
|
11682
|
+
/**
|
|
11683
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.children&apiName=get&version=v1 click to debug }
|
|
11684
|
+
*
|
|
11685
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get document }
|
|
11686
|
+
*
|
|
11687
|
+
* 获取所有子块
|
|
11688
|
+
*
|
|
11689
|
+
* 给定一个指定版本的文档,并指定需要操作的块,分页遍历其所有子块富文本内容 。如果不指定版本,则会默认查询最新版本。
|
|
11690
|
+
*
|
|
11691
|
+
* 频率限制:单个应用调用频率上限为每秒 5 次。
|
|
11692
|
+
*
|
|
11693
|
+
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnE2UK2yY0gEGK8nBMPtB0vd),了解相关规则及约束。
|
|
11694
|
+
*/
|
|
11695
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
11696
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
11697
|
+
return this.httpInstance
|
|
11698
|
+
.request({
|
|
11699
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/children`, path),
|
|
11700
|
+
method: "GET",
|
|
11701
|
+
data,
|
|
11702
|
+
params,
|
|
11703
|
+
headers,
|
|
11704
|
+
})
|
|
11705
|
+
.catch((e) => {
|
|
11706
|
+
this.logger.error(formatErrors(e));
|
|
11707
|
+
throw e;
|
|
11708
|
+
});
|
|
11709
|
+
}),
|
|
11710
|
+
},
|
|
11711
|
+
/**
|
|
11712
|
+
* 文档
|
|
11713
|
+
*/
|
|
11714
|
+
document: {
|
|
11715
|
+
/**
|
|
11716
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
|
|
11717
|
+
*
|
|
11718
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/create document }
|
|
11719
|
+
*
|
|
11720
|
+
* 创建文档
|
|
11721
|
+
*
|
|
11722
|
+
* 创建新版文档,文档标题和目录可选。
|
|
11723
|
+
*
|
|
11724
|
+
* 频率限制:单个应用调用频率上限为每秒 3 次。
|
|
9341
11725
|
*
|
|
9342
11726
|
* 在调用此接口前,请仔细阅读[新版文档 OpenAPI 接口校验规则](https://bytedance.feishu.cn/docx/doxcnby5Y0yoACL3PdfZqrJEm6f#doxcnyoyCgwS8ywWwMtQr9yjZ2f),了解相关规则及约束。
|
|
9343
11727
|
*/
|
|
@@ -10259,8 +12643,32 @@ class Client$1 {
|
|
|
10259
12643
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10260
12644
|
return this.httpInstance
|
|
10261
12645
|
.request({
|
|
10262
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
10263
|
-
method: "POST",
|
|
12646
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
12647
|
+
method: "POST",
|
|
12648
|
+
data,
|
|
12649
|
+
params,
|
|
12650
|
+
headers,
|
|
12651
|
+
})
|
|
12652
|
+
.catch((e) => {
|
|
12653
|
+
this.logger.error(formatErrors(e));
|
|
12654
|
+
throw e;
|
|
12655
|
+
});
|
|
12656
|
+
}),
|
|
12657
|
+
/**
|
|
12658
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=delete&version=v1 click to debug }
|
|
12659
|
+
*
|
|
12660
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete document }
|
|
12661
|
+
*
|
|
12662
|
+
* 删除文档版本
|
|
12663
|
+
*
|
|
12664
|
+
* 删除文档版本。
|
|
12665
|
+
*/
|
|
12666
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
12667
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
12668
|
+
return this.httpInstance
|
|
12669
|
+
.request({
|
|
12670
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
|
|
12671
|
+
method: "DELETE",
|
|
10264
12672
|
data,
|
|
10265
12673
|
params,
|
|
10266
12674
|
headers,
|
|
@@ -10271,20 +12679,20 @@ class Client$1 {
|
|
|
10271
12679
|
});
|
|
10272
12680
|
}),
|
|
10273
12681
|
/**
|
|
10274
|
-
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=
|
|
12682
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=get&version=v1 click to debug }
|
|
10275
12683
|
*
|
|
10276
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/
|
|
12684
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get document }
|
|
10277
12685
|
*
|
|
10278
|
-
*
|
|
12686
|
+
* 获取文档版本
|
|
10279
12687
|
*
|
|
10280
|
-
*
|
|
12688
|
+
* 获取文档版本。
|
|
10281
12689
|
*/
|
|
10282
|
-
|
|
12690
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10283
12691
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10284
12692
|
return this.httpInstance
|
|
10285
12693
|
.request({
|
|
10286
12694
|
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
|
|
10287
|
-
method: "
|
|
12695
|
+
method: "GET",
|
|
10288
12696
|
data,
|
|
10289
12697
|
params,
|
|
10290
12698
|
headers,
|
|
@@ -10294,12 +12702,12 @@ class Client$1 {
|
|
|
10294
12702
|
throw e;
|
|
10295
12703
|
});
|
|
10296
12704
|
}),
|
|
10297
|
-
|
|
12705
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10298
12706
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10299
12707
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10300
12708
|
const res = yield this.httpInstance
|
|
10301
12709
|
.request({
|
|
10302
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions
|
|
12710
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
10303
12711
|
method: "GET",
|
|
10304
12712
|
headers: pickBy(innerPayload.headers, identity),
|
|
10305
12713
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -10343,19 +12751,19 @@ class Client$1 {
|
|
|
10343
12751
|
return Iterable;
|
|
10344
12752
|
}),
|
|
10345
12753
|
/**
|
|
10346
|
-
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=
|
|
12754
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=list&version=v1 click to debug }
|
|
10347
12755
|
*
|
|
10348
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/
|
|
12756
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
|
|
10349
12757
|
*
|
|
10350
|
-
*
|
|
12758
|
+
* 获取文档版本列表
|
|
10351
12759
|
*
|
|
10352
|
-
*
|
|
12760
|
+
* 获取文档所有版本。
|
|
10353
12761
|
*/
|
|
10354
|
-
|
|
12762
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10355
12763
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10356
12764
|
return this.httpInstance
|
|
10357
12765
|
.request({
|
|
10358
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions
|
|
12766
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
|
|
10359
12767
|
method: "GET",
|
|
10360
12768
|
data,
|
|
10361
12769
|
params,
|
|
@@ -10366,12 +12774,17 @@ class Client$1 {
|
|
|
10366
12774
|
throw e;
|
|
10367
12775
|
});
|
|
10368
12776
|
}),
|
|
12777
|
+
},
|
|
12778
|
+
/**
|
|
12779
|
+
* file.view_record
|
|
12780
|
+
*/
|
|
12781
|
+
fileViewRecord: {
|
|
10369
12782
|
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10370
12783
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10371
12784
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10372
12785
|
const res = yield this.httpInstance
|
|
10373
12786
|
.request({
|
|
10374
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/
|
|
12787
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path),
|
|
10375
12788
|
method: "GET",
|
|
10376
12789
|
headers: pickBy(innerPayload.headers, identity),
|
|
10377
12790
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -10415,19 +12828,15 @@ class Client$1 {
|
|
|
10415
12828
|
return Iterable;
|
|
10416
12829
|
}),
|
|
10417
12830
|
/**
|
|
10418
|
-
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.
|
|
10419
|
-
*
|
|
10420
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
|
|
10421
|
-
*
|
|
10422
|
-
* 获取文档版本列表
|
|
12831
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.view_record&apiName=list&version=v1 click to debug }
|
|
10423
12832
|
*
|
|
10424
|
-
*
|
|
12833
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=drive&resource=file.view_record&version=v1 document }
|
|
10425
12834
|
*/
|
|
10426
12835
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10427
12836
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10428
12837
|
return this.httpInstance
|
|
10429
12838
|
.request({
|
|
10430
|
-
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/
|
|
12839
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/view_records`, path),
|
|
10431
12840
|
method: "GET",
|
|
10432
12841
|
data,
|
|
10433
12842
|
params,
|
|
@@ -12766,7 +15175,7 @@ class Client$1 {
|
|
|
12766
15175
|
*/
|
|
12767
15176
|
this.hire = {
|
|
12768
15177
|
/**
|
|
12769
|
-
*
|
|
15178
|
+
* 投递
|
|
12770
15179
|
*/
|
|
12771
15180
|
application: {
|
|
12772
15181
|
/**
|
|
@@ -13203,6 +15612,50 @@ class Client$1 {
|
|
|
13203
15612
|
throw e;
|
|
13204
15613
|
});
|
|
13205
15614
|
}),
|
|
15615
|
+
/**
|
|
15616
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=delete&version=v1 click to debug }
|
|
15617
|
+
*
|
|
15618
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=external_application&version=v1 document }
|
|
15619
|
+
*
|
|
15620
|
+
* 删除外部投递
|
|
15621
|
+
*/
|
|
15622
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15623
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15624
|
+
return this.httpInstance
|
|
15625
|
+
.request({
|
|
15626
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path),
|
|
15627
|
+
method: "DELETE",
|
|
15628
|
+
data,
|
|
15629
|
+
params,
|
|
15630
|
+
headers,
|
|
15631
|
+
})
|
|
15632
|
+
.catch((e) => {
|
|
15633
|
+
this.logger.error(formatErrors(e));
|
|
15634
|
+
throw e;
|
|
15635
|
+
});
|
|
15636
|
+
}),
|
|
15637
|
+
/**
|
|
15638
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=update&version=v1 click to debug }
|
|
15639
|
+
*
|
|
15640
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=external_application&version=v1 document }
|
|
15641
|
+
*
|
|
15642
|
+
* 更新外部投递
|
|
15643
|
+
*/
|
|
15644
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15645
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15646
|
+
return this.httpInstance
|
|
15647
|
+
.request({
|
|
15648
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications/:external_application_id`, path),
|
|
15649
|
+
method: "PUT",
|
|
15650
|
+
data,
|
|
15651
|
+
params,
|
|
15652
|
+
headers,
|
|
15653
|
+
})
|
|
15654
|
+
.catch((e) => {
|
|
15655
|
+
this.logger.error(formatErrors(e));
|
|
15656
|
+
throw e;
|
|
15657
|
+
});
|
|
15658
|
+
}),
|
|
13206
15659
|
},
|
|
13207
15660
|
/**
|
|
13208
15661
|
* 导入外部系统信息(灰度租户可见)
|
|
@@ -13265,22 +15718,205 @@ class Client$1 {
|
|
|
13265
15718
|
/**
|
|
13266
15719
|
* 导入外部系统信息(灰度租户可见)
|
|
13267
15720
|
*/
|
|
13268
|
-
externalInterviewAssessment: {
|
|
15721
|
+
externalInterviewAssessment: {
|
|
15722
|
+
/**
|
|
15723
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=create&version=v1 click to debug }
|
|
15724
|
+
*
|
|
15725
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview_assessment/create document }
|
|
15726
|
+
*
|
|
15727
|
+
* 创建外部面评
|
|
15728
|
+
*
|
|
15729
|
+
* 导入来自其他系统的面评信息,创建为外部面评
|
|
15730
|
+
*/
|
|
15731
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15732
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15733
|
+
return this.httpInstance
|
|
15734
|
+
.request({
|
|
15735
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments`, path),
|
|
15736
|
+
method: "POST",
|
|
15737
|
+
data,
|
|
15738
|
+
params,
|
|
15739
|
+
headers,
|
|
15740
|
+
})
|
|
15741
|
+
.catch((e) => {
|
|
15742
|
+
this.logger.error(formatErrors(e));
|
|
15743
|
+
throw e;
|
|
15744
|
+
});
|
|
15745
|
+
}),
|
|
15746
|
+
},
|
|
15747
|
+
/**
|
|
15748
|
+
* 面试
|
|
15749
|
+
*/
|
|
15750
|
+
interview: {
|
|
15751
|
+
/**
|
|
15752
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=interview&apiName=list&version=v1 click to debug }
|
|
15753
|
+
*
|
|
15754
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/list document }
|
|
15755
|
+
*
|
|
15756
|
+
* 获取面试信息
|
|
15757
|
+
*
|
|
15758
|
+
* 根据投递 ID 或面试时间获取面试信息
|
|
15759
|
+
*/
|
|
15760
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15761
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15762
|
+
return this.httpInstance
|
|
15763
|
+
.request({
|
|
15764
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviews`, path),
|
|
15765
|
+
method: "GET",
|
|
15766
|
+
data,
|
|
15767
|
+
params,
|
|
15768
|
+
headers,
|
|
15769
|
+
})
|
|
15770
|
+
.catch((e) => {
|
|
15771
|
+
this.logger.error(formatErrors(e));
|
|
15772
|
+
throw e;
|
|
15773
|
+
});
|
|
15774
|
+
}),
|
|
15775
|
+
},
|
|
15776
|
+
/**
|
|
15777
|
+
* 职位
|
|
15778
|
+
*/
|
|
15779
|
+
job: {
|
|
15780
|
+
/**
|
|
15781
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_create&version=v1 click to debug }
|
|
15782
|
+
*
|
|
15783
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_create document }
|
|
15784
|
+
*
|
|
15785
|
+
* 新建职位
|
|
15786
|
+
*
|
|
15787
|
+
* 新建职位,字段的是否必填,以系统中的「职位字段管理」中的设置为准。
|
|
15788
|
+
*/
|
|
15789
|
+
combinedCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15790
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15791
|
+
return this.httpInstance
|
|
15792
|
+
.request({
|
|
15793
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/combined_create`, path),
|
|
15794
|
+
method: "POST",
|
|
15795
|
+
data,
|
|
15796
|
+
params,
|
|
15797
|
+
headers,
|
|
15798
|
+
})
|
|
15799
|
+
.catch((e) => {
|
|
15800
|
+
this.logger.error(formatErrors(e));
|
|
15801
|
+
throw e;
|
|
15802
|
+
});
|
|
15803
|
+
}),
|
|
15804
|
+
/**
|
|
15805
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_update&version=v1 click to debug }
|
|
15806
|
+
*
|
|
15807
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_update document }
|
|
15808
|
+
*
|
|
15809
|
+
* 更新职位
|
|
15810
|
+
*
|
|
15811
|
+
* 更新职位信息,该接口为全量更新,若字段没有返回值,则原有值将会被清空。字段的是否必填,将以系统中的「职位字段管理」中的设置为准。
|
|
15812
|
+
*/
|
|
15813
|
+
combinedUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15814
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15815
|
+
return this.httpInstance
|
|
15816
|
+
.request({
|
|
15817
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`, path),
|
|
15818
|
+
method: "POST",
|
|
15819
|
+
data,
|
|
15820
|
+
params,
|
|
15821
|
+
headers,
|
|
15822
|
+
})
|
|
15823
|
+
.catch((e) => {
|
|
15824
|
+
this.logger.error(formatErrors(e));
|
|
15825
|
+
throw e;
|
|
15826
|
+
});
|
|
15827
|
+
}),
|
|
15828
|
+
/**
|
|
15829
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=config&version=v1 click to debug }
|
|
15830
|
+
*
|
|
15831
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/config document }
|
|
15832
|
+
*
|
|
15833
|
+
* 获取职位设置
|
|
15834
|
+
*
|
|
15835
|
+
* 获取职位设置
|
|
15836
|
+
*/
|
|
15837
|
+
config: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15838
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15839
|
+
return this.httpInstance
|
|
15840
|
+
.request({
|
|
15841
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/config`, path),
|
|
15842
|
+
method: "GET",
|
|
15843
|
+
data,
|
|
15844
|
+
params,
|
|
15845
|
+
headers,
|
|
15846
|
+
})
|
|
15847
|
+
.catch((e) => {
|
|
15848
|
+
this.logger.error(formatErrors(e));
|
|
15849
|
+
throw e;
|
|
15850
|
+
});
|
|
15851
|
+
}),
|
|
15852
|
+
/**
|
|
15853
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=get&version=v1 click to debug }
|
|
15854
|
+
*
|
|
15855
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/get document }
|
|
15856
|
+
*
|
|
15857
|
+
* 获取职位信息
|
|
15858
|
+
*
|
|
15859
|
+
* 根据职位 ID 获取职位信息
|
|
15860
|
+
*/
|
|
15861
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15862
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15863
|
+
return this.httpInstance
|
|
15864
|
+
.request({
|
|
15865
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id`, path),
|
|
15866
|
+
method: "GET",
|
|
15867
|
+
data,
|
|
15868
|
+
params,
|
|
15869
|
+
headers,
|
|
15870
|
+
})
|
|
15871
|
+
.catch((e) => {
|
|
15872
|
+
this.logger.error(formatErrors(e));
|
|
15873
|
+
throw e;
|
|
15874
|
+
});
|
|
15875
|
+
}),
|
|
15876
|
+
/**
|
|
15877
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=update_config&version=v1 click to debug }
|
|
15878
|
+
*
|
|
15879
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/update_config document }
|
|
15880
|
+
*
|
|
15881
|
+
* 更新职位设置
|
|
15882
|
+
*
|
|
15883
|
+
* 更新职位设置,包括面试评价表、Offer 申请表等。接口将按照所选择的「更新选项」进行设置参数校验和更新。
|
|
15884
|
+
*/
|
|
15885
|
+
updateConfig: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15886
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15887
|
+
return this.httpInstance
|
|
15888
|
+
.request({
|
|
15889
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/update_config`, path),
|
|
15890
|
+
method: "POST",
|
|
15891
|
+
data,
|
|
15892
|
+
params,
|
|
15893
|
+
headers,
|
|
15894
|
+
})
|
|
15895
|
+
.catch((e) => {
|
|
15896
|
+
this.logger.error(formatErrors(e));
|
|
15897
|
+
throw e;
|
|
15898
|
+
});
|
|
15899
|
+
}),
|
|
15900
|
+
},
|
|
15901
|
+
/**
|
|
15902
|
+
* job.manager
|
|
15903
|
+
*/
|
|
15904
|
+
jobManager: {
|
|
13269
15905
|
/**
|
|
13270
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
15906
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job.manager&apiName=get&version=v1 click to debug }
|
|
13271
15907
|
*
|
|
13272
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
15908
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job-manager/get document }
|
|
13273
15909
|
*
|
|
13274
|
-
*
|
|
15910
|
+
* 获取职位上的招聘人员信息
|
|
13275
15911
|
*
|
|
13276
|
-
*
|
|
15912
|
+
* 根据职位 ID 获取职位上的招聘人员信息,如招聘负责人、用人经理
|
|
13277
15913
|
*/
|
|
13278
|
-
|
|
15914
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13279
15915
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13280
15916
|
return this.httpInstance
|
|
13281
15917
|
.request({
|
|
13282
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
13283
|
-
method: "
|
|
15918
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/managers/:manager_id`, path),
|
|
15919
|
+
method: "GET",
|
|
13284
15920
|
data,
|
|
13285
15921
|
params,
|
|
13286
15922
|
headers,
|
|
@@ -13292,24 +15928,24 @@ class Client$1 {
|
|
|
13292
15928
|
}),
|
|
13293
15929
|
},
|
|
13294
15930
|
/**
|
|
13295
|
-
*
|
|
15931
|
+
* 流程
|
|
13296
15932
|
*/
|
|
13297
|
-
|
|
15933
|
+
jobProcess: {
|
|
13298
15934
|
/**
|
|
13299
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
15935
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_process&apiName=list&version=v1 click to debug }
|
|
13300
15936
|
*
|
|
13301
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
15937
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_process/list document }
|
|
13302
15938
|
*
|
|
13303
|
-
*
|
|
15939
|
+
* 获取招聘流程信息
|
|
13304
15940
|
*
|
|
13305
|
-
*
|
|
15941
|
+
* 获取全部招聘流程信息
|
|
13306
15942
|
*/
|
|
13307
|
-
|
|
15943
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13308
15944
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13309
15945
|
return this.httpInstance
|
|
13310
15946
|
.request({
|
|
13311
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
13312
|
-
method: "
|
|
15947
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_processes`, path),
|
|
15948
|
+
method: "GET",
|
|
13313
15949
|
data,
|
|
13314
15950
|
params,
|
|
13315
15951
|
headers,
|
|
@@ -13319,20 +15955,25 @@ class Client$1 {
|
|
|
13319
15955
|
throw e;
|
|
13320
15956
|
});
|
|
13321
15957
|
}),
|
|
15958
|
+
},
|
|
15959
|
+
/**
|
|
15960
|
+
* 招聘需求(灰度租户可见)
|
|
15961
|
+
*/
|
|
15962
|
+
jobRequirement: {
|
|
13322
15963
|
/**
|
|
13323
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
15964
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=create&version=v1 click to debug }
|
|
13324
15965
|
*
|
|
13325
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
15966
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/create document }
|
|
13326
15967
|
*
|
|
13327
|
-
*
|
|
15968
|
+
* 创建招聘需求
|
|
13328
15969
|
*
|
|
13329
|
-
*
|
|
15970
|
+
* 创建招聘需求,除招聘需求编号为必填外,其他字段是否必填与飞书招聘「招聘需求字段管理」内设置一致
|
|
13330
15971
|
*/
|
|
13331
|
-
|
|
15972
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13332
15973
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13333
15974
|
return this.httpInstance
|
|
13334
15975
|
.request({
|
|
13335
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
15976
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path),
|
|
13336
15977
|
method: "POST",
|
|
13337
15978
|
data,
|
|
13338
15979
|
params,
|
|
@@ -13344,20 +15985,20 @@ class Client$1 {
|
|
|
13344
15985
|
});
|
|
13345
15986
|
}),
|
|
13346
15987
|
/**
|
|
13347
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
15988
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=delete&version=v1 click to debug }
|
|
13348
15989
|
*
|
|
13349
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
15990
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/delete document }
|
|
13350
15991
|
*
|
|
13351
|
-
*
|
|
15992
|
+
* 删除招聘需求
|
|
13352
15993
|
*
|
|
13353
|
-
*
|
|
15994
|
+
* 删除招聘需求
|
|
13354
15995
|
*/
|
|
13355
|
-
|
|
15996
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13356
15997
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13357
15998
|
return this.httpInstance
|
|
13358
15999
|
.request({
|
|
13359
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
13360
|
-
method: "
|
|
16000
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path),
|
|
16001
|
+
method: "DELETE",
|
|
13361
16002
|
data,
|
|
13362
16003
|
params,
|
|
13363
16004
|
headers,
|
|
@@ -13368,19 +16009,19 @@ class Client$1 {
|
|
|
13368
16009
|
});
|
|
13369
16010
|
}),
|
|
13370
16011
|
/**
|
|
13371
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
16012
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list&version=v1 click to debug }
|
|
13372
16013
|
*
|
|
13373
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
16014
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/list document }
|
|
13374
16015
|
*
|
|
13375
|
-
*
|
|
16016
|
+
* 获取招聘需求列表
|
|
13376
16017
|
*
|
|
13377
|
-
*
|
|
16018
|
+
* 获取招聘需求列表
|
|
13378
16019
|
*/
|
|
13379
|
-
|
|
16020
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13380
16021
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13381
16022
|
return this.httpInstance
|
|
13382
16023
|
.request({
|
|
13383
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
16024
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements`, path),
|
|
13384
16025
|
method: "GET",
|
|
13385
16026
|
data,
|
|
13386
16027
|
params,
|
|
@@ -13392,19 +16033,17 @@ class Client$1 {
|
|
|
13392
16033
|
});
|
|
13393
16034
|
}),
|
|
13394
16035
|
/**
|
|
13395
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
13396
|
-
*
|
|
13397
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/update_config document }
|
|
16036
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=list_by_id&version=v1 click to debug }
|
|
13398
16037
|
*
|
|
13399
|
-
*
|
|
16038
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_id&project=hire&resource=job_requirement&version=v1 document }
|
|
13400
16039
|
*
|
|
13401
|
-
*
|
|
16040
|
+
* 获取招聘需求信息
|
|
13402
16041
|
*/
|
|
13403
|
-
|
|
16042
|
+
listById: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13404
16043
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13405
16044
|
return this.httpInstance
|
|
13406
16045
|
.request({
|
|
13407
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
16046
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/search`, path),
|
|
13408
16047
|
method: "POST",
|
|
13409
16048
|
data,
|
|
13410
16049
|
params,
|
|
@@ -13415,26 +16054,21 @@ class Client$1 {
|
|
|
13415
16054
|
throw e;
|
|
13416
16055
|
});
|
|
13417
16056
|
}),
|
|
13418
|
-
},
|
|
13419
|
-
/**
|
|
13420
|
-
* job.manager
|
|
13421
|
-
*/
|
|
13422
|
-
jobManager: {
|
|
13423
16057
|
/**
|
|
13424
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
16058
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement&apiName=update&version=v1 click to debug }
|
|
13425
16059
|
*
|
|
13426
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
16060
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/update document }
|
|
13427
16061
|
*
|
|
13428
|
-
*
|
|
16062
|
+
* 更新招聘需求
|
|
13429
16063
|
*
|
|
13430
|
-
*
|
|
16064
|
+
* 更新招聘需求
|
|
13431
16065
|
*/
|
|
13432
|
-
|
|
16066
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13433
16067
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13434
16068
|
return this.httpInstance
|
|
13435
16069
|
.request({
|
|
13436
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
13437
|
-
method: "
|
|
16070
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirements/:job_requirement_id`, path),
|
|
16071
|
+
method: "PUT",
|
|
13438
16072
|
data,
|
|
13439
16073
|
params,
|
|
13440
16074
|
headers,
|
|
@@ -13446,23 +16080,23 @@ class Client$1 {
|
|
|
13446
16080
|
}),
|
|
13447
16081
|
},
|
|
13448
16082
|
/**
|
|
13449
|
-
*
|
|
16083
|
+
* job_requirement_schema
|
|
13450
16084
|
*/
|
|
13451
|
-
|
|
16085
|
+
jobRequirementSchema: {
|
|
13452
16086
|
/**
|
|
13453
|
-
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=
|
|
16087
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=job_requirement_schema&apiName=list&version=v1 click to debug }
|
|
13454
16088
|
*
|
|
13455
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/
|
|
16089
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement_schema/list document }
|
|
13456
16090
|
*
|
|
13457
|
-
*
|
|
16091
|
+
* 获取招聘需求模板
|
|
13458
16092
|
*
|
|
13459
|
-
*
|
|
16093
|
+
* 获取招聘需求模板
|
|
13460
16094
|
*/
|
|
13461
16095
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13462
16096
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13463
16097
|
return this.httpInstance
|
|
13464
16098
|
.request({
|
|
13465
|
-
url: fillApiPath(`${this.domain}/open-apis/hire/v1/
|
|
16099
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/job_requirement_schemas`, path),
|
|
13466
16100
|
method: "GET",
|
|
13467
16101
|
data,
|
|
13468
16102
|
params,
|
|
@@ -15322,7 +17956,7 @@ class Client$1 {
|
|
|
15322
17956
|
}),
|
|
15323
17957
|
},
|
|
15324
17958
|
/**
|
|
15325
|
-
* 消息
|
|
17959
|
+
* 消息 - 消息卡片
|
|
15326
17960
|
*/
|
|
15327
17961
|
message: {
|
|
15328
17962
|
/**
|
|
@@ -17864,6 +20498,214 @@ class Client$1 {
|
|
|
17864
20498
|
|
|
17865
20499
|
*/
|
|
17866
20500
|
this.people_bytedance = {};
|
|
20501
|
+
/**
|
|
20502
|
+
* 个人设置
|
|
20503
|
+
*/
|
|
20504
|
+
this.personal_settings = {
|
|
20505
|
+
/**
|
|
20506
|
+
* 系统状态
|
|
20507
|
+
*/
|
|
20508
|
+
systemStatus: {
|
|
20509
|
+
/**
|
|
20510
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_close&version=v1 click to debug }
|
|
20511
|
+
*
|
|
20512
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_close document }
|
|
20513
|
+
*
|
|
20514
|
+
* 批量关闭系统状态
|
|
20515
|
+
*
|
|
20516
|
+
* 批量关闭用户系统状态可用
|
|
20517
|
+
*/
|
|
20518
|
+
batchClose: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20519
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20520
|
+
return this.httpInstance
|
|
20521
|
+
.request({
|
|
20522
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_close`, path),
|
|
20523
|
+
method: "POST",
|
|
20524
|
+
data,
|
|
20525
|
+
params,
|
|
20526
|
+
headers,
|
|
20527
|
+
})
|
|
20528
|
+
.catch((e) => {
|
|
20529
|
+
this.logger.error(formatErrors(e));
|
|
20530
|
+
throw e;
|
|
20531
|
+
});
|
|
20532
|
+
}),
|
|
20533
|
+
/**
|
|
20534
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=batch_open&version=v1 click to debug }
|
|
20535
|
+
*
|
|
20536
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_open document }
|
|
20537
|
+
*
|
|
20538
|
+
* 批量开启系统状态
|
|
20539
|
+
*
|
|
20540
|
+
* 批量开启用户系统状态可用
|
|
20541
|
+
*/
|
|
20542
|
+
batchOpen: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20543
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20544
|
+
return this.httpInstance
|
|
20545
|
+
.request({
|
|
20546
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id/batch_open`, path),
|
|
20547
|
+
method: "POST",
|
|
20548
|
+
data,
|
|
20549
|
+
params,
|
|
20550
|
+
headers,
|
|
20551
|
+
})
|
|
20552
|
+
.catch((e) => {
|
|
20553
|
+
this.logger.error(formatErrors(e));
|
|
20554
|
+
throw e;
|
|
20555
|
+
});
|
|
20556
|
+
}),
|
|
20557
|
+
/**
|
|
20558
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=create&version=v1 click to debug }
|
|
20559
|
+
*
|
|
20560
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/create document }
|
|
20561
|
+
*
|
|
20562
|
+
* 创建系统状态
|
|
20563
|
+
*
|
|
20564
|
+
* 创建租户维度的系统状态。
|
|
20565
|
+
*
|
|
20566
|
+
* 注意事项:;- 操作的数据为租户维度数据,请小心操作。;- 每个租户最多创建10个系统状态。
|
|
20567
|
+
*/
|
|
20568
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20569
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20570
|
+
return this.httpInstance
|
|
20571
|
+
.request({
|
|
20572
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path),
|
|
20573
|
+
method: "POST",
|
|
20574
|
+
data,
|
|
20575
|
+
params,
|
|
20576
|
+
headers,
|
|
20577
|
+
})
|
|
20578
|
+
.catch((e) => {
|
|
20579
|
+
this.logger.error(formatErrors(e));
|
|
20580
|
+
throw e;
|
|
20581
|
+
});
|
|
20582
|
+
}),
|
|
20583
|
+
/**
|
|
20584
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=delete&version=v1 click to debug }
|
|
20585
|
+
*
|
|
20586
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/delete document }
|
|
20587
|
+
*
|
|
20588
|
+
* 删除系统状态
|
|
20589
|
+
*
|
|
20590
|
+
* 删除租户维度的系统状态。
|
|
20591
|
+
*
|
|
20592
|
+
* 注意事项:;- 操作的数据为租户维度数据,请小心操作。 ;- 删除系统状态后,并不影响正在使用该状态用户下系统状态的客户端展示。
|
|
20593
|
+
*/
|
|
20594
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20595
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20596
|
+
return this.httpInstance
|
|
20597
|
+
.request({
|
|
20598
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path),
|
|
20599
|
+
method: "DELETE",
|
|
20600
|
+
data,
|
|
20601
|
+
params,
|
|
20602
|
+
headers,
|
|
20603
|
+
})
|
|
20604
|
+
.catch((e) => {
|
|
20605
|
+
this.logger.error(formatErrors(e));
|
|
20606
|
+
throw e;
|
|
20607
|
+
});
|
|
20608
|
+
}),
|
|
20609
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20610
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20611
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
20612
|
+
const res = yield this.httpInstance
|
|
20613
|
+
.request({
|
|
20614
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path),
|
|
20615
|
+
method: "GET",
|
|
20616
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
20617
|
+
params: pickBy(innerPayload.params, identity),
|
|
20618
|
+
})
|
|
20619
|
+
.catch((e) => {
|
|
20620
|
+
this.logger.error(formatErrors(e));
|
|
20621
|
+
});
|
|
20622
|
+
return res;
|
|
20623
|
+
});
|
|
20624
|
+
const Iterable = {
|
|
20625
|
+
[Symbol.asyncIterator]() {
|
|
20626
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
20627
|
+
let hasMore = true;
|
|
20628
|
+
let pageToken;
|
|
20629
|
+
while (hasMore) {
|
|
20630
|
+
try {
|
|
20631
|
+
const res = yield __await(sendRequest({
|
|
20632
|
+
headers,
|
|
20633
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
20634
|
+
data,
|
|
20635
|
+
}));
|
|
20636
|
+
const _b = get(res, "data") || {}, {
|
|
20637
|
+
// @ts-ignore
|
|
20638
|
+
has_more,
|
|
20639
|
+
// @ts-ignore
|
|
20640
|
+
page_token,
|
|
20641
|
+
// @ts-ignore
|
|
20642
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
20643
|
+
yield yield __await(rest);
|
|
20644
|
+
hasMore = Boolean(has_more);
|
|
20645
|
+
pageToken = page_token || next_page_token;
|
|
20646
|
+
}
|
|
20647
|
+
catch (e) {
|
|
20648
|
+
yield yield __await(null);
|
|
20649
|
+
break;
|
|
20650
|
+
}
|
|
20651
|
+
}
|
|
20652
|
+
});
|
|
20653
|
+
},
|
|
20654
|
+
};
|
|
20655
|
+
return Iterable;
|
|
20656
|
+
}),
|
|
20657
|
+
/**
|
|
20658
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=list&version=v1 click to debug }
|
|
20659
|
+
*
|
|
20660
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/list document }
|
|
20661
|
+
*
|
|
20662
|
+
* 获取系统状态
|
|
20663
|
+
*
|
|
20664
|
+
* 获取租户下所有系统状态
|
|
20665
|
+
*/
|
|
20666
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20667
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20668
|
+
return this.httpInstance
|
|
20669
|
+
.request({
|
|
20670
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses`, path),
|
|
20671
|
+
method: "GET",
|
|
20672
|
+
data,
|
|
20673
|
+
params,
|
|
20674
|
+
headers,
|
|
20675
|
+
})
|
|
20676
|
+
.catch((e) => {
|
|
20677
|
+
this.logger.error(formatErrors(e));
|
|
20678
|
+
throw e;
|
|
20679
|
+
});
|
|
20680
|
+
}),
|
|
20681
|
+
/**
|
|
20682
|
+
* {@link https://open.feishu.cn/api-explorer?project=personal_settings&resource=system_status&apiName=patch&version=v1 click to debug }
|
|
20683
|
+
*
|
|
20684
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/patch document }
|
|
20685
|
+
*
|
|
20686
|
+
* 修改系统状态
|
|
20687
|
+
*
|
|
20688
|
+
* 修改租户维度系统状态。
|
|
20689
|
+
*
|
|
20690
|
+
* 注意事项:;- 操作的数据为租户维度数据,请小心操作。 ;- 修改系统状态后,并不影响正在使用的用户。该用户的系统状态可用时间到期后,再次被开启可用的时候,用户客户端才会同步到更新后的系统状态。
|
|
20691
|
+
*/
|
|
20692
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20693
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20694
|
+
return this.httpInstance
|
|
20695
|
+
.request({
|
|
20696
|
+
url: fillApiPath(`${this.domain}/open-apis/personal_settings/v1/system_statuses/:system_status_id`, path),
|
|
20697
|
+
method: "PATCH",
|
|
20698
|
+
data,
|
|
20699
|
+
params,
|
|
20700
|
+
headers,
|
|
20701
|
+
})
|
|
20702
|
+
.catch((e) => {
|
|
20703
|
+
this.logger.error(formatErrors(e));
|
|
20704
|
+
throw e;
|
|
20705
|
+
});
|
|
20706
|
+
}),
|
|
20707
|
+
},
|
|
20708
|
+
};
|
|
17867
20709
|
/**
|
|
17868
20710
|
|
|
17869
20711
|
*/
|
|
@@ -18731,7 +21573,7 @@ class Client$1 {
|
|
|
18731
21573
|
}),
|
|
18732
21574
|
},
|
|
18733
21575
|
/**
|
|
18734
|
-
*
|
|
21576
|
+
* 行列
|
|
18735
21577
|
*/
|
|
18736
21578
|
spreadsheetSheet: {
|
|
18737
21579
|
/**
|