@larksuiteoapi/node-sdk 1.37.2 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +472 -12
- package/lib/index.js +472 -12
- package/package.json +1 -1
- package/types/index.d.ts +14249 -2757
package/lib/index.js
CHANGED
|
@@ -253,7 +253,7 @@ const formatErrors = (e) => {
|
|
|
253
253
|
const errors = [filteredErrorInfo];
|
|
254
254
|
const specificError = get__default["default"](e, 'response.data');
|
|
255
255
|
if (specificError) {
|
|
256
|
-
errors.push(specificError);
|
|
256
|
+
errors.push(Object.assign(Object.assign({}, specificError), (specificError.error ? specificError.error : {})));
|
|
257
257
|
}
|
|
258
258
|
return errors;
|
|
259
259
|
}
|
|
@@ -1322,7 +1322,7 @@ class Client$_ extends Client$$ {
|
|
|
1322
1322
|
constructor() {
|
|
1323
1323
|
super(...arguments);
|
|
1324
1324
|
/**
|
|
1325
|
-
*
|
|
1325
|
+
* 管理后台-密码
|
|
1326
1326
|
*/
|
|
1327
1327
|
this.admin = {
|
|
1328
1328
|
/**
|
|
@@ -4230,7 +4230,7 @@ class Client$X extends Client$Y {
|
|
|
4230
4230
|
*/
|
|
4231
4231
|
this.approval = {
|
|
4232
4232
|
/**
|
|
4233
|
-
*
|
|
4233
|
+
* 原生审批定义
|
|
4234
4234
|
*/
|
|
4235
4235
|
approval: {
|
|
4236
4236
|
/**
|
|
@@ -4525,7 +4525,7 @@ class Client$X extends Client$Y {
|
|
|
4525
4525
|
}),
|
|
4526
4526
|
},
|
|
4527
4527
|
/**
|
|
4528
|
-
*
|
|
4528
|
+
* 审批查询
|
|
4529
4529
|
*/
|
|
4530
4530
|
instance: {
|
|
4531
4531
|
/**
|
|
@@ -5027,7 +5027,7 @@ class Client$X extends Client$Y {
|
|
|
5027
5027
|
}),
|
|
5028
5028
|
},
|
|
5029
5029
|
/**
|
|
5030
|
-
*
|
|
5030
|
+
* 原生审批任务
|
|
5031
5031
|
*/
|
|
5032
5032
|
task: {
|
|
5033
5033
|
/**
|
|
@@ -5233,7 +5233,7 @@ class Client$X extends Client$Y {
|
|
|
5233
5233
|
},
|
|
5234
5234
|
v4: {
|
|
5235
5235
|
/**
|
|
5236
|
-
*
|
|
5236
|
+
* 原生审批定义
|
|
5237
5237
|
*/
|
|
5238
5238
|
approval: {
|
|
5239
5239
|
/**
|
|
@@ -5530,7 +5530,7 @@ class Client$X extends Client$Y {
|
|
|
5530
5530
|
}),
|
|
5531
5531
|
},
|
|
5532
5532
|
/**
|
|
5533
|
-
*
|
|
5533
|
+
* 审批查询
|
|
5534
5534
|
*/
|
|
5535
5535
|
instance: {
|
|
5536
5536
|
/**
|
|
@@ -6038,7 +6038,7 @@ class Client$X extends Client$Y {
|
|
|
6038
6038
|
}),
|
|
6039
6039
|
},
|
|
6040
6040
|
/**
|
|
6041
|
-
*
|
|
6041
|
+
* 原生审批任务
|
|
6042
6042
|
*/
|
|
6043
6043
|
task: {
|
|
6044
6044
|
/**
|
|
@@ -23768,6 +23768,48 @@ class Client$I extends Client$J {
|
|
|
23768
23768
|
throw e;
|
|
23769
23769
|
});
|
|
23770
23770
|
}),
|
|
23771
|
+
/**
|
|
23772
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar&version=v1 click to debug }
|
|
23773
|
+
*
|
|
23774
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar&project=corehr&resource=leave&version=v1 document }
|
|
23775
|
+
*/
|
|
23776
|
+
workCalendar: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
23777
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
23778
|
+
return this.httpInstance
|
|
23779
|
+
.request({
|
|
23780
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`, path),
|
|
23781
|
+
method: "POST",
|
|
23782
|
+
data,
|
|
23783
|
+
params,
|
|
23784
|
+
headers,
|
|
23785
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
23786
|
+
})
|
|
23787
|
+
.catch((e) => {
|
|
23788
|
+
this.logger.error(formatErrors(e));
|
|
23789
|
+
throw e;
|
|
23790
|
+
});
|
|
23791
|
+
}),
|
|
23792
|
+
/**
|
|
23793
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar_date&version=v1 click to debug }
|
|
23794
|
+
*
|
|
23795
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar_date&project=corehr&resource=leave&version=v1 document }
|
|
23796
|
+
*/
|
|
23797
|
+
workCalendarDate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
23798
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
23799
|
+
return this.httpInstance
|
|
23800
|
+
.request({
|
|
23801
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`, path),
|
|
23802
|
+
method: "POST",
|
|
23803
|
+
data,
|
|
23804
|
+
params,
|
|
23805
|
+
headers,
|
|
23806
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
23807
|
+
})
|
|
23808
|
+
.catch((e) => {
|
|
23809
|
+
this.logger.error(formatErrors(e));
|
|
23810
|
+
throw e;
|
|
23811
|
+
});
|
|
23812
|
+
}),
|
|
23771
23813
|
},
|
|
23772
23814
|
/**
|
|
23773
23815
|
* leave_granting_record
|
|
@@ -26551,6 +26593,48 @@ class Client$I extends Client$J {
|
|
|
26551
26593
|
throw e;
|
|
26552
26594
|
});
|
|
26553
26595
|
}),
|
|
26596
|
+
/**
|
|
26597
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar&version=v1 click to debug }
|
|
26598
|
+
*
|
|
26599
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar&project=corehr&resource=leave&version=v1 document }
|
|
26600
|
+
*/
|
|
26601
|
+
workCalendar: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
26602
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
26603
|
+
return this.httpInstance
|
|
26604
|
+
.request({
|
|
26605
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar`, path),
|
|
26606
|
+
method: "POST",
|
|
26607
|
+
data,
|
|
26608
|
+
params,
|
|
26609
|
+
headers,
|
|
26610
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
26611
|
+
})
|
|
26612
|
+
.catch((e) => {
|
|
26613
|
+
this.logger.error(formatErrors(e));
|
|
26614
|
+
throw e;
|
|
26615
|
+
});
|
|
26616
|
+
}),
|
|
26617
|
+
/**
|
|
26618
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=work_calendar_date&version=v1 click to debug }
|
|
26619
|
+
*
|
|
26620
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=work_calendar_date&project=corehr&resource=leave&version=v1 document }
|
|
26621
|
+
*/
|
|
26622
|
+
workCalendarDate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
26623
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
26624
|
+
return this.httpInstance
|
|
26625
|
+
.request({
|
|
26626
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/work_calendar_date`, path),
|
|
26627
|
+
method: "POST",
|
|
26628
|
+
data,
|
|
26629
|
+
params,
|
|
26630
|
+
headers,
|
|
26631
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
26632
|
+
})
|
|
26633
|
+
.catch((e) => {
|
|
26634
|
+
this.logger.error(formatErrors(e));
|
|
26635
|
+
throw e;
|
|
26636
|
+
});
|
|
26637
|
+
}),
|
|
26554
26638
|
},
|
|
26555
26639
|
/**
|
|
26556
26640
|
* leave_granting_record
|
|
@@ -28141,6 +28225,84 @@ class Client$I extends Client$J {
|
|
|
28141
28225
|
});
|
|
28142
28226
|
}),
|
|
28143
28227
|
},
|
|
28228
|
+
/**
|
|
28229
|
+
* basic_info.language
|
|
28230
|
+
*/
|
|
28231
|
+
basicInfoLanguage: {
|
|
28232
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28233
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28234
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28235
|
+
const res = yield this.httpInstance
|
|
28236
|
+
.request({
|
|
28237
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`, path),
|
|
28238
|
+
method: "POST",
|
|
28239
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28240
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28241
|
+
data,
|
|
28242
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28243
|
+
arrayFormat: "repeat",
|
|
28244
|
+
}),
|
|
28245
|
+
})
|
|
28246
|
+
.catch((e) => {
|
|
28247
|
+
this.logger.error(formatErrors(e));
|
|
28248
|
+
});
|
|
28249
|
+
return res;
|
|
28250
|
+
});
|
|
28251
|
+
const Iterable = {
|
|
28252
|
+
[Symbol.asyncIterator]() {
|
|
28253
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28254
|
+
let hasMore = true;
|
|
28255
|
+
let pageToken;
|
|
28256
|
+
while (hasMore) {
|
|
28257
|
+
try {
|
|
28258
|
+
const res = yield __await(sendRequest({
|
|
28259
|
+
headers,
|
|
28260
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28261
|
+
data,
|
|
28262
|
+
}));
|
|
28263
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28264
|
+
// @ts-ignore
|
|
28265
|
+
has_more,
|
|
28266
|
+
// @ts-ignore
|
|
28267
|
+
page_token,
|
|
28268
|
+
// @ts-ignore
|
|
28269
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28270
|
+
yield yield __await(rest);
|
|
28271
|
+
hasMore = Boolean(has_more);
|
|
28272
|
+
pageToken = page_token || next_page_token;
|
|
28273
|
+
}
|
|
28274
|
+
catch (e) {
|
|
28275
|
+
yield yield __await(null);
|
|
28276
|
+
break;
|
|
28277
|
+
}
|
|
28278
|
+
}
|
|
28279
|
+
});
|
|
28280
|
+
},
|
|
28281
|
+
};
|
|
28282
|
+
return Iterable;
|
|
28283
|
+
}),
|
|
28284
|
+
/**
|
|
28285
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.language&apiName=search&version=v2 click to debug }
|
|
28286
|
+
*
|
|
28287
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.language&version=v2 document }
|
|
28288
|
+
*/
|
|
28289
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28290
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28291
|
+
return this.httpInstance
|
|
28292
|
+
.request({
|
|
28293
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/languages/search`, path),
|
|
28294
|
+
method: "POST",
|
|
28295
|
+
data,
|
|
28296
|
+
params,
|
|
28297
|
+
headers,
|
|
28298
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28299
|
+
})
|
|
28300
|
+
.catch((e) => {
|
|
28301
|
+
this.logger.error(formatErrors(e));
|
|
28302
|
+
throw e;
|
|
28303
|
+
});
|
|
28304
|
+
}),
|
|
28305
|
+
},
|
|
28144
28306
|
/**
|
|
28145
28307
|
* basic_info.nationality
|
|
28146
28308
|
*/
|
|
@@ -28219,6 +28381,84 @@ class Client$I extends Client$J {
|
|
|
28219
28381
|
});
|
|
28220
28382
|
}),
|
|
28221
28383
|
},
|
|
28384
|
+
/**
|
|
28385
|
+
* basic_info.time_zone
|
|
28386
|
+
*/
|
|
28387
|
+
basicInfoTimeZone: {
|
|
28388
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28389
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28390
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28391
|
+
const res = yield this.httpInstance
|
|
28392
|
+
.request({
|
|
28393
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28394
|
+
method: "POST",
|
|
28395
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28396
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28397
|
+
data,
|
|
28398
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28399
|
+
arrayFormat: "repeat",
|
|
28400
|
+
}),
|
|
28401
|
+
})
|
|
28402
|
+
.catch((e) => {
|
|
28403
|
+
this.logger.error(formatErrors(e));
|
|
28404
|
+
});
|
|
28405
|
+
return res;
|
|
28406
|
+
});
|
|
28407
|
+
const Iterable = {
|
|
28408
|
+
[Symbol.asyncIterator]() {
|
|
28409
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28410
|
+
let hasMore = true;
|
|
28411
|
+
let pageToken;
|
|
28412
|
+
while (hasMore) {
|
|
28413
|
+
try {
|
|
28414
|
+
const res = yield __await(sendRequest({
|
|
28415
|
+
headers,
|
|
28416
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28417
|
+
data,
|
|
28418
|
+
}));
|
|
28419
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28420
|
+
// @ts-ignore
|
|
28421
|
+
has_more,
|
|
28422
|
+
// @ts-ignore
|
|
28423
|
+
page_token,
|
|
28424
|
+
// @ts-ignore
|
|
28425
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28426
|
+
yield yield __await(rest);
|
|
28427
|
+
hasMore = Boolean(has_more);
|
|
28428
|
+
pageToken = page_token || next_page_token;
|
|
28429
|
+
}
|
|
28430
|
+
catch (e) {
|
|
28431
|
+
yield yield __await(null);
|
|
28432
|
+
break;
|
|
28433
|
+
}
|
|
28434
|
+
}
|
|
28435
|
+
});
|
|
28436
|
+
},
|
|
28437
|
+
};
|
|
28438
|
+
return Iterable;
|
|
28439
|
+
}),
|
|
28440
|
+
/**
|
|
28441
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=basic_info.time_zone&apiName=search&version=v2 click to debug }
|
|
28442
|
+
*
|
|
28443
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=basic_info.time_zone&version=v2 document }
|
|
28444
|
+
*/
|
|
28445
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28446
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28447
|
+
return this.httpInstance
|
|
28448
|
+
.request({
|
|
28449
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/basic_info/time_zones/search`, path),
|
|
28450
|
+
method: "POST",
|
|
28451
|
+
data,
|
|
28452
|
+
params,
|
|
28453
|
+
headers,
|
|
28454
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
28455
|
+
})
|
|
28456
|
+
.catch((e) => {
|
|
28457
|
+
this.logger.error(formatErrors(e));
|
|
28458
|
+
throw e;
|
|
28459
|
+
});
|
|
28460
|
+
}),
|
|
28461
|
+
},
|
|
28222
28462
|
/**
|
|
28223
28463
|
* bp
|
|
28224
28464
|
*/
|
|
@@ -28712,6 +28952,79 @@ class Client$I extends Client$J {
|
|
|
28712
28952
|
throw e;
|
|
28713
28953
|
});
|
|
28714
28954
|
}),
|
|
28955
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
28956
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
28957
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
28958
|
+
const res = yield this.httpInstance
|
|
28959
|
+
.request({
|
|
28960
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`, path),
|
|
28961
|
+
method: "GET",
|
|
28962
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
28963
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
28964
|
+
data,
|
|
28965
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
28966
|
+
arrayFormat: "repeat",
|
|
28967
|
+
}),
|
|
28968
|
+
})
|
|
28969
|
+
.catch((e) => {
|
|
28970
|
+
this.logger.error(formatErrors(e));
|
|
28971
|
+
});
|
|
28972
|
+
return res;
|
|
28973
|
+
});
|
|
28974
|
+
const Iterable = {
|
|
28975
|
+
[Symbol.asyncIterator]() {
|
|
28976
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
28977
|
+
let hasMore = true;
|
|
28978
|
+
let pageToken;
|
|
28979
|
+
while (hasMore) {
|
|
28980
|
+
try {
|
|
28981
|
+
const res = yield __await(sendRequest({
|
|
28982
|
+
headers,
|
|
28983
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
28984
|
+
data,
|
|
28985
|
+
}));
|
|
28986
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
28987
|
+
// @ts-ignore
|
|
28988
|
+
has_more,
|
|
28989
|
+
// @ts-ignore
|
|
28990
|
+
page_token,
|
|
28991
|
+
// @ts-ignore
|
|
28992
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
28993
|
+
yield yield __await(rest);
|
|
28994
|
+
hasMore = Boolean(has_more);
|
|
28995
|
+
pageToken = page_token || next_page_token;
|
|
28996
|
+
}
|
|
28997
|
+
catch (e) {
|
|
28998
|
+
yield yield __await(null);
|
|
28999
|
+
break;
|
|
29000
|
+
}
|
|
29001
|
+
}
|
|
29002
|
+
});
|
|
29003
|
+
},
|
|
29004
|
+
};
|
|
29005
|
+
return Iterable;
|
|
29006
|
+
}),
|
|
29007
|
+
/**
|
|
29008
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_recent_change&version=v2 click to debug }
|
|
29009
|
+
*
|
|
29010
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=department&version=v2 document }
|
|
29011
|
+
*/
|
|
29012
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29013
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29014
|
+
return this.httpInstance
|
|
29015
|
+
.request({
|
|
29016
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/query_recent_change`, path),
|
|
29017
|
+
method: "GET",
|
|
29018
|
+
data,
|
|
29019
|
+
params,
|
|
29020
|
+
headers,
|
|
29021
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29022
|
+
})
|
|
29023
|
+
.catch((e) => {
|
|
29024
|
+
this.logger.error(formatErrors(e));
|
|
29025
|
+
throw e;
|
|
29026
|
+
});
|
|
29027
|
+
}),
|
|
28715
29028
|
/**
|
|
28716
29029
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_timeline&version=v2 click to debug }
|
|
28717
29030
|
*
|
|
@@ -29192,6 +29505,75 @@ class Client$I extends Client$J {
|
|
|
29192
29505
|
* job_grade
|
|
29193
29506
|
*/
|
|
29194
29507
|
jobGrade: {
|
|
29508
|
+
/**
|
|
29509
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=create&version=v2 click to debug }
|
|
29510
|
+
*
|
|
29511
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_grade&version=v2 document }
|
|
29512
|
+
*
|
|
29513
|
+
* 创建职等数据
|
|
29514
|
+
*/
|
|
29515
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29516
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29517
|
+
return this.httpInstance
|
|
29518
|
+
.request({
|
|
29519
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades`, path),
|
|
29520
|
+
method: "POST",
|
|
29521
|
+
data,
|
|
29522
|
+
params,
|
|
29523
|
+
headers,
|
|
29524
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29525
|
+
})
|
|
29526
|
+
.catch((e) => {
|
|
29527
|
+
this.logger.error(formatErrors(e));
|
|
29528
|
+
throw e;
|
|
29529
|
+
});
|
|
29530
|
+
}),
|
|
29531
|
+
/**
|
|
29532
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=delete&version=v2 click to debug }
|
|
29533
|
+
*
|
|
29534
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=job_grade&version=v2 document }
|
|
29535
|
+
*
|
|
29536
|
+
* 删除职等信息
|
|
29537
|
+
*/
|
|
29538
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29539
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29540
|
+
return this.httpInstance
|
|
29541
|
+
.request({
|
|
29542
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`, path),
|
|
29543
|
+
method: "DELETE",
|
|
29544
|
+
data,
|
|
29545
|
+
params,
|
|
29546
|
+
headers,
|
|
29547
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29548
|
+
})
|
|
29549
|
+
.catch((e) => {
|
|
29550
|
+
this.logger.error(formatErrors(e));
|
|
29551
|
+
throw e;
|
|
29552
|
+
});
|
|
29553
|
+
}),
|
|
29554
|
+
/**
|
|
29555
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=patch&version=v2 click to debug }
|
|
29556
|
+
*
|
|
29557
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=job_grade&version=v2 document }
|
|
29558
|
+
*
|
|
29559
|
+
* 更新职等信息
|
|
29560
|
+
*/
|
|
29561
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29562
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29563
|
+
return this.httpInstance
|
|
29564
|
+
.request({
|
|
29565
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_grades/:job_grade_id`, path),
|
|
29566
|
+
method: "PATCH",
|
|
29567
|
+
data,
|
|
29568
|
+
params,
|
|
29569
|
+
headers,
|
|
29570
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29571
|
+
})
|
|
29572
|
+
.catch((e) => {
|
|
29573
|
+
this.logger.error(formatErrors(e));
|
|
29574
|
+
throw e;
|
|
29575
|
+
});
|
|
29576
|
+
}),
|
|
29195
29577
|
/**
|
|
29196
29578
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_grade&apiName=query&version=v2 click to debug }
|
|
29197
29579
|
*
|
|
@@ -29953,6 +30335,32 @@ class Client$I extends Client$J {
|
|
|
29953
30335
|
});
|
|
29954
30336
|
}),
|
|
29955
30337
|
},
|
|
30338
|
+
/**
|
|
30339
|
+
* workforce_plan_detail
|
|
30340
|
+
*/
|
|
30341
|
+
workforcePlanDetail: {
|
|
30342
|
+
/**
|
|
30343
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=workforce_plan_detail&apiName=batch&version=v2 click to debug }
|
|
30344
|
+
*
|
|
30345
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=workforce_plan_detail&version=v2 document }
|
|
30346
|
+
*/
|
|
30347
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30348
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30349
|
+
return this.httpInstance
|
|
30350
|
+
.request({
|
|
30351
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/workforce_plan_details/batch`, path),
|
|
30352
|
+
method: "POST",
|
|
30353
|
+
data,
|
|
30354
|
+
params,
|
|
30355
|
+
headers,
|
|
30356
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30357
|
+
})
|
|
30358
|
+
.catch((e) => {
|
|
30359
|
+
this.logger.error(formatErrors(e));
|
|
30360
|
+
throw e;
|
|
30361
|
+
});
|
|
30362
|
+
}),
|
|
30363
|
+
},
|
|
29956
30364
|
},
|
|
29957
30365
|
};
|
|
29958
30366
|
}
|
|
@@ -30790,6 +31198,32 @@ class Client$F extends Client$G {
|
|
|
30790
31198
|
});
|
|
30791
31199
|
}),
|
|
30792
31200
|
},
|
|
31201
|
+
/**
|
|
31202
|
+
* document.block.descendant
|
|
31203
|
+
*/
|
|
31204
|
+
documentBlockDescendant: {
|
|
31205
|
+
/**
|
|
31206
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.descendant&apiName=create&version=v1 click to debug }
|
|
31207
|
+
*
|
|
31208
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=document.block.descendant&version=v1 document }
|
|
31209
|
+
*/
|
|
31210
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31211
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31212
|
+
return this.httpInstance
|
|
31213
|
+
.request({
|
|
31214
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`, path),
|
|
31215
|
+
method: "POST",
|
|
31216
|
+
data,
|
|
31217
|
+
params,
|
|
31218
|
+
headers,
|
|
31219
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31220
|
+
})
|
|
31221
|
+
.catch((e) => {
|
|
31222
|
+
this.logger.error(formatErrors(e));
|
|
31223
|
+
throw e;
|
|
31224
|
+
});
|
|
31225
|
+
}),
|
|
31226
|
+
},
|
|
30793
31227
|
/**
|
|
30794
31228
|
* 文档
|
|
30795
31229
|
*/
|
|
@@ -31200,6 +31634,32 @@ class Client$F extends Client$G {
|
|
|
31200
31634
|
});
|
|
31201
31635
|
}),
|
|
31202
31636
|
},
|
|
31637
|
+
/**
|
|
31638
|
+
* document.block.descendant
|
|
31639
|
+
*/
|
|
31640
|
+
documentBlockDescendant: {
|
|
31641
|
+
/**
|
|
31642
|
+
* {@link https://open.feishu.cn/api-explorer?project=docx&resource=document.block.descendant&apiName=create&version=v1 click to debug }
|
|
31643
|
+
*
|
|
31644
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=docx&resource=document.block.descendant&version=v1 document }
|
|
31645
|
+
*/
|
|
31646
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31647
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31648
|
+
return this.httpInstance
|
|
31649
|
+
.request({
|
|
31650
|
+
url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/:document_id/blocks/:block_id/descendant`, path),
|
|
31651
|
+
method: "POST",
|
|
31652
|
+
data,
|
|
31653
|
+
params,
|
|
31654
|
+
headers,
|
|
31655
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31656
|
+
})
|
|
31657
|
+
.catch((e) => {
|
|
31658
|
+
this.logger.error(formatErrors(e));
|
|
31659
|
+
throw e;
|
|
31660
|
+
});
|
|
31661
|
+
}),
|
|
31662
|
+
},
|
|
31203
31663
|
/**
|
|
31204
31664
|
* 文档
|
|
31205
31665
|
*/
|
|
@@ -31723,7 +32183,7 @@ class Client$E extends Client$F {
|
|
|
31723
32183
|
}),
|
|
31724
32184
|
},
|
|
31725
32185
|
/**
|
|
31726
|
-
*
|
|
32186
|
+
* 事件
|
|
31727
32187
|
*/
|
|
31728
32188
|
file: {
|
|
31729
32189
|
/**
|
|
@@ -32596,7 +33056,7 @@ class Client$E extends Client$F {
|
|
|
32596
33056
|
}),
|
|
32597
33057
|
},
|
|
32598
33058
|
/**
|
|
32599
|
-
*
|
|
33059
|
+
* 分片上传
|
|
32600
33060
|
*/
|
|
32601
33061
|
media: {
|
|
32602
33062
|
/**
|
|
@@ -33543,7 +34003,7 @@ class Client$E extends Client$F {
|
|
|
33543
34003
|
}),
|
|
33544
34004
|
},
|
|
33545
34005
|
/**
|
|
33546
|
-
*
|
|
34006
|
+
* 事件
|
|
33547
34007
|
*/
|
|
33548
34008
|
file: {
|
|
33549
34009
|
/**
|
|
@@ -34422,7 +34882,7 @@ class Client$E extends Client$F {
|
|
|
34422
34882
|
}),
|
|
34423
34883
|
},
|
|
34424
34884
|
/**
|
|
34425
|
-
*
|
|
34885
|
+
* 分片上传
|
|
34426
34886
|
*/
|
|
34427
34887
|
media: {
|
|
34428
34888
|
/**
|