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