@larksuiteoapi/node-sdk 1.39.0 → 1.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +352 -13
- package/lib/index.js +356 -18
- package/package.json +1 -2
- package/types/index.d.ts +729 -14
package/lib/index.js
CHANGED
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
17
17
|
var get = require('lodash.get');
|
|
18
18
|
var axios = require('axios');
|
|
19
19
|
var crypto = require('crypto');
|
|
20
|
-
var pick = require('lodash.pick');
|
|
21
20
|
var qs = require('qs');
|
|
22
21
|
var identity = require('lodash.identity');
|
|
23
22
|
var pickBy = require('lodash.pickby');
|
|
@@ -31,7 +30,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
31
30
|
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
32
31
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
33
32
|
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
|
34
|
-
var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);
|
|
35
33
|
var identity__default = /*#__PURE__*/_interopDefaultLegacy(identity);
|
|
36
34
|
var pickBy__default = /*#__PURE__*/_interopDefaultLegacy(pickBy);
|
|
37
35
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
@@ -236,9 +234,22 @@ const assert = (predication, callback) => __awaiter(void 0, void 0, void 0, func
|
|
|
236
234
|
|
|
237
235
|
const formatUrl = (url) => (url ? url.replace(/^\//, '') : '');
|
|
238
236
|
|
|
237
|
+
const pick = (obj, keys = []) => {
|
|
238
|
+
const result = {};
|
|
239
|
+
if (!obj) {
|
|
240
|
+
return result;
|
|
241
|
+
}
|
|
242
|
+
keys.forEach(key => {
|
|
243
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
244
|
+
result[key] = obj[key];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
return result;
|
|
248
|
+
};
|
|
249
|
+
|
|
239
250
|
const formatErrors = (e) => {
|
|
240
251
|
if (e instanceof axios.AxiosError) {
|
|
241
|
-
const { message, response, request, config } =
|
|
252
|
+
const { message, response, request, config } = pick(e, [
|
|
242
253
|
'message',
|
|
243
254
|
'response',
|
|
244
255
|
'request',
|
|
@@ -246,9 +257,9 @@ const formatErrors = (e) => {
|
|
|
246
257
|
]);
|
|
247
258
|
const filteredErrorInfo = {
|
|
248
259
|
message,
|
|
249
|
-
config:
|
|
250
|
-
request:
|
|
251
|
-
response:
|
|
260
|
+
config: pick(config, ['data', 'url', 'params', 'method']),
|
|
261
|
+
request: pick(request, ['protocol', 'host', 'path', 'method']),
|
|
262
|
+
response: pick(response, ['data', 'status', 'statusText']),
|
|
252
263
|
};
|
|
253
264
|
const errors = [filteredErrorInfo];
|
|
254
265
|
const specificError = get__default["default"](e, 'response.data');
|
|
@@ -1322,7 +1333,7 @@ class Client$_ extends Client$$ {
|
|
|
1322
1333
|
constructor() {
|
|
1323
1334
|
super(...arguments);
|
|
1324
1335
|
/**
|
|
1325
|
-
*
|
|
1336
|
+
* 管理后台-密码
|
|
1326
1337
|
*/
|
|
1327
1338
|
this.admin = {
|
|
1328
1339
|
/**
|
|
@@ -3546,6 +3557,81 @@ class Client$Y extends Client$Z {
|
|
|
3546
3557
|
throw e;
|
|
3547
3558
|
});
|
|
3548
3559
|
}),
|
|
3560
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3561
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3562
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
3563
|
+
const res = yield this.httpInstance
|
|
3564
|
+
.request({
|
|
3565
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3566
|
+
method: "GET",
|
|
3567
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
3568
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
3569
|
+
data,
|
|
3570
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3571
|
+
})
|
|
3572
|
+
.catch((e) => {
|
|
3573
|
+
this.logger.error(formatErrors(e));
|
|
3574
|
+
});
|
|
3575
|
+
return res;
|
|
3576
|
+
});
|
|
3577
|
+
const Iterable = {
|
|
3578
|
+
[Symbol.asyncIterator]() {
|
|
3579
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
3580
|
+
let hasMore = true;
|
|
3581
|
+
let pageToken;
|
|
3582
|
+
while (hasMore) {
|
|
3583
|
+
try {
|
|
3584
|
+
const res = yield __await(sendRequest({
|
|
3585
|
+
headers,
|
|
3586
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
3587
|
+
data,
|
|
3588
|
+
}));
|
|
3589
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
3590
|
+
// @ts-ignore
|
|
3591
|
+
has_more,
|
|
3592
|
+
// @ts-ignore
|
|
3593
|
+
page_token,
|
|
3594
|
+
// @ts-ignore
|
|
3595
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
3596
|
+
yield yield __await(rest);
|
|
3597
|
+
hasMore = Boolean(has_more);
|
|
3598
|
+
pageToken = page_token || next_page_token;
|
|
3599
|
+
}
|
|
3600
|
+
catch (e) {
|
|
3601
|
+
yield yield __await(null);
|
|
3602
|
+
break;
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
});
|
|
3606
|
+
},
|
|
3607
|
+
};
|
|
3608
|
+
return Iterable;
|
|
3609
|
+
}),
|
|
3610
|
+
/**
|
|
3611
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
|
|
3612
|
+
*
|
|
3613
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
|
|
3614
|
+
*
|
|
3615
|
+
* 获取企业安装的应用
|
|
3616
|
+
*
|
|
3617
|
+
* 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
|
|
3618
|
+
*/
|
|
3619
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3620
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
3621
|
+
return this.httpInstance
|
|
3622
|
+
.request({
|
|
3623
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
3624
|
+
method: "GET",
|
|
3625
|
+
data,
|
|
3626
|
+
params,
|
|
3627
|
+
headers,
|
|
3628
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
3629
|
+
})
|
|
3630
|
+
.catch((e) => {
|
|
3631
|
+
this.logger.error(formatErrors(e));
|
|
3632
|
+
throw e;
|
|
3633
|
+
});
|
|
3634
|
+
}),
|
|
3549
3635
|
/**
|
|
3550
3636
|
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
|
|
3551
3637
|
*
|
|
@@ -4252,6 +4338,83 @@ class Client$Y extends Client$Z {
|
|
|
4252
4338
|
throw e;
|
|
4253
4339
|
});
|
|
4254
4340
|
}),
|
|
4341
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4342
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4343
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
4344
|
+
const res = yield this.httpInstance
|
|
4345
|
+
.request({
|
|
4346
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
4347
|
+
method: "GET",
|
|
4348
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
4349
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
4350
|
+
data,
|
|
4351
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
4352
|
+
arrayFormat: "repeat",
|
|
4353
|
+
}),
|
|
4354
|
+
})
|
|
4355
|
+
.catch((e) => {
|
|
4356
|
+
this.logger.error(formatErrors(e));
|
|
4357
|
+
});
|
|
4358
|
+
return res;
|
|
4359
|
+
});
|
|
4360
|
+
const Iterable = {
|
|
4361
|
+
[Symbol.asyncIterator]() {
|
|
4362
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
4363
|
+
let hasMore = true;
|
|
4364
|
+
let pageToken;
|
|
4365
|
+
while (hasMore) {
|
|
4366
|
+
try {
|
|
4367
|
+
const res = yield __await(sendRequest({
|
|
4368
|
+
headers,
|
|
4369
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
4370
|
+
data,
|
|
4371
|
+
}));
|
|
4372
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
4373
|
+
// @ts-ignore
|
|
4374
|
+
has_more,
|
|
4375
|
+
// @ts-ignore
|
|
4376
|
+
page_token,
|
|
4377
|
+
// @ts-ignore
|
|
4378
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
4379
|
+
yield yield __await(rest);
|
|
4380
|
+
hasMore = Boolean(has_more);
|
|
4381
|
+
pageToken = page_token || next_page_token;
|
|
4382
|
+
}
|
|
4383
|
+
catch (e) {
|
|
4384
|
+
yield yield __await(null);
|
|
4385
|
+
break;
|
|
4386
|
+
}
|
|
4387
|
+
}
|
|
4388
|
+
});
|
|
4389
|
+
},
|
|
4390
|
+
};
|
|
4391
|
+
return Iterable;
|
|
4392
|
+
}),
|
|
4393
|
+
/**
|
|
4394
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
|
|
4395
|
+
*
|
|
4396
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
|
|
4397
|
+
*
|
|
4398
|
+
* 获取企业安装的应用
|
|
4399
|
+
*
|
|
4400
|
+
* 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
|
|
4401
|
+
*/
|
|
4402
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4403
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4404
|
+
return this.httpInstance
|
|
4405
|
+
.request({
|
|
4406
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
|
|
4407
|
+
method: "GET",
|
|
4408
|
+
data,
|
|
4409
|
+
params,
|
|
4410
|
+
headers,
|
|
4411
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4412
|
+
})
|
|
4413
|
+
.catch((e) => {
|
|
4414
|
+
this.logger.error(formatErrors(e));
|
|
4415
|
+
throw e;
|
|
4416
|
+
});
|
|
4417
|
+
}),
|
|
4255
4418
|
/**
|
|
4256
4419
|
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
|
|
4257
4420
|
*
|
|
@@ -4544,7 +4707,7 @@ class Client$X extends Client$Y {
|
|
|
4544
4707
|
*/
|
|
4545
4708
|
this.approval = {
|
|
4546
4709
|
/**
|
|
4547
|
-
*
|
|
4710
|
+
* 原生审批定义
|
|
4548
4711
|
*/
|
|
4549
4712
|
approval: {
|
|
4550
4713
|
/**
|
|
@@ -5341,7 +5504,7 @@ class Client$X extends Client$Y {
|
|
|
5341
5504
|
}),
|
|
5342
5505
|
},
|
|
5343
5506
|
/**
|
|
5344
|
-
*
|
|
5507
|
+
* 原生审批任务
|
|
5345
5508
|
*/
|
|
5346
5509
|
task: {
|
|
5347
5510
|
/**
|
|
@@ -5547,7 +5710,7 @@ class Client$X extends Client$Y {
|
|
|
5547
5710
|
},
|
|
5548
5711
|
v4: {
|
|
5549
5712
|
/**
|
|
5550
|
-
*
|
|
5713
|
+
* 原生审批定义
|
|
5551
5714
|
*/
|
|
5552
5715
|
approval: {
|
|
5553
5716
|
/**
|
|
@@ -6352,7 +6515,7 @@ class Client$X extends Client$Y {
|
|
|
6352
6515
|
}),
|
|
6353
6516
|
},
|
|
6354
6517
|
/**
|
|
6355
|
-
*
|
|
6518
|
+
* 原生审批任务
|
|
6356
6519
|
*/
|
|
6357
6520
|
task: {
|
|
6358
6521
|
/**
|
|
@@ -17287,7 +17450,7 @@ class Client$L extends Client$M {
|
|
|
17287
17450
|
constructor() {
|
|
17288
17451
|
super(...arguments);
|
|
17289
17452
|
/**
|
|
17290
|
-
*
|
|
17453
|
+
* 通讯录
|
|
17291
17454
|
*/
|
|
17292
17455
|
this.contact = {
|
|
17293
17456
|
/**
|
|
@@ -29755,6 +29918,155 @@ class Client$I extends Client$J {
|
|
|
29755
29918
|
});
|
|
29756
29919
|
}),
|
|
29757
29920
|
},
|
|
29921
|
+
/**
|
|
29922
|
+
* employees.additional_job
|
|
29923
|
+
*/
|
|
29924
|
+
employeesAdditionalJob: {
|
|
29925
|
+
batchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29926
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29927
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
29928
|
+
const res = yield this.httpInstance
|
|
29929
|
+
.request({
|
|
29930
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
|
|
29931
|
+
method: "POST",
|
|
29932
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
29933
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
29934
|
+
data,
|
|
29935
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
29936
|
+
arrayFormat: "repeat",
|
|
29937
|
+
}),
|
|
29938
|
+
})
|
|
29939
|
+
.catch((e) => {
|
|
29940
|
+
this.logger.error(formatErrors(e));
|
|
29941
|
+
});
|
|
29942
|
+
return res;
|
|
29943
|
+
});
|
|
29944
|
+
const Iterable = {
|
|
29945
|
+
[Symbol.asyncIterator]() {
|
|
29946
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
29947
|
+
let hasMore = true;
|
|
29948
|
+
let pageToken;
|
|
29949
|
+
while (hasMore) {
|
|
29950
|
+
try {
|
|
29951
|
+
const res = yield __await(sendRequest({
|
|
29952
|
+
headers,
|
|
29953
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
29954
|
+
data,
|
|
29955
|
+
}));
|
|
29956
|
+
const _b = get__default["default"](res, "data") || {}, {
|
|
29957
|
+
// @ts-ignore
|
|
29958
|
+
has_more,
|
|
29959
|
+
// @ts-ignore
|
|
29960
|
+
page_token,
|
|
29961
|
+
// @ts-ignore
|
|
29962
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
29963
|
+
yield yield __await(rest);
|
|
29964
|
+
hasMore = Boolean(has_more);
|
|
29965
|
+
pageToken = page_token || next_page_token;
|
|
29966
|
+
}
|
|
29967
|
+
catch (e) {
|
|
29968
|
+
yield yield __await(null);
|
|
29969
|
+
break;
|
|
29970
|
+
}
|
|
29971
|
+
}
|
|
29972
|
+
});
|
|
29973
|
+
},
|
|
29974
|
+
};
|
|
29975
|
+
return Iterable;
|
|
29976
|
+
}),
|
|
29977
|
+
/**
|
|
29978
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=batch&version=v2 click to debug }
|
|
29979
|
+
*
|
|
29980
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
29981
|
+
*
|
|
29982
|
+
* 批量查询兼职信息
|
|
29983
|
+
*/
|
|
29984
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
29985
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
29986
|
+
return this.httpInstance
|
|
29987
|
+
.request({
|
|
29988
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
|
|
29989
|
+
method: "POST",
|
|
29990
|
+
data,
|
|
29991
|
+
params,
|
|
29992
|
+
headers,
|
|
29993
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
29994
|
+
})
|
|
29995
|
+
.catch((e) => {
|
|
29996
|
+
this.logger.error(formatErrors(e));
|
|
29997
|
+
throw e;
|
|
29998
|
+
});
|
|
29999
|
+
}),
|
|
30000
|
+
/**
|
|
30001
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=create&version=v2 click to debug }
|
|
30002
|
+
*
|
|
30003
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
30004
|
+
*
|
|
30005
|
+
* 创建兼职
|
|
30006
|
+
*/
|
|
30007
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30008
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30009
|
+
return this.httpInstance
|
|
30010
|
+
.request({
|
|
30011
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`, path),
|
|
30012
|
+
method: "POST",
|
|
30013
|
+
data,
|
|
30014
|
+
params,
|
|
30015
|
+
headers,
|
|
30016
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30017
|
+
})
|
|
30018
|
+
.catch((e) => {
|
|
30019
|
+
this.logger.error(formatErrors(e));
|
|
30020
|
+
throw e;
|
|
30021
|
+
});
|
|
30022
|
+
}),
|
|
30023
|
+
/**
|
|
30024
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=delete&version=v2 click to debug }
|
|
30025
|
+
*
|
|
30026
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
30027
|
+
*
|
|
30028
|
+
* 删除兼职
|
|
30029
|
+
*/
|
|
30030
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30031
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30032
|
+
return this.httpInstance
|
|
30033
|
+
.request({
|
|
30034
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
|
|
30035
|
+
method: "DELETE",
|
|
30036
|
+
data,
|
|
30037
|
+
params,
|
|
30038
|
+
headers,
|
|
30039
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30040
|
+
})
|
|
30041
|
+
.catch((e) => {
|
|
30042
|
+
this.logger.error(formatErrors(e));
|
|
30043
|
+
throw e;
|
|
30044
|
+
});
|
|
30045
|
+
}),
|
|
30046
|
+
/**
|
|
30047
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=patch&version=v2 click to debug }
|
|
30048
|
+
*
|
|
30049
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=employees.additional_job&version=v2 document }
|
|
30050
|
+
*
|
|
30051
|
+
* 更新兼职
|
|
30052
|
+
*/
|
|
30053
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30054
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30055
|
+
return this.httpInstance
|
|
30056
|
+
.request({
|
|
30057
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
|
|
30058
|
+
method: "PATCH",
|
|
30059
|
+
data,
|
|
30060
|
+
params,
|
|
30061
|
+
headers,
|
|
30062
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30063
|
+
})
|
|
30064
|
+
.catch((e) => {
|
|
30065
|
+
this.logger.error(formatErrors(e));
|
|
30066
|
+
throw e;
|
|
30067
|
+
});
|
|
30068
|
+
}),
|
|
30069
|
+
},
|
|
29758
30070
|
/**
|
|
29759
30071
|
* employees.bp
|
|
29760
30072
|
*/
|
|
@@ -30260,6 +30572,32 @@ class Client$I extends Client$J {
|
|
|
30260
30572
|
});
|
|
30261
30573
|
}),
|
|
30262
30574
|
},
|
|
30575
|
+
/**
|
|
30576
|
+
* offboarding
|
|
30577
|
+
*/
|
|
30578
|
+
offboarding: {
|
|
30579
|
+
/**
|
|
30580
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit_v2&version=v2 click to debug }
|
|
30581
|
+
*
|
|
30582
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=submit_v2&project=corehr&resource=offboarding&version=v2 document }
|
|
30583
|
+
*/
|
|
30584
|
+
submitV2: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
30585
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
30586
|
+
return this.httpInstance
|
|
30587
|
+
.request({
|
|
30588
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`, path),
|
|
30589
|
+
method: "POST",
|
|
30590
|
+
data,
|
|
30591
|
+
params,
|
|
30592
|
+
headers,
|
|
30593
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
30594
|
+
})
|
|
30595
|
+
.catch((e) => {
|
|
30596
|
+
this.logger.error(formatErrors(e));
|
|
30597
|
+
throw e;
|
|
30598
|
+
});
|
|
30599
|
+
}),
|
|
30600
|
+
},
|
|
30263
30601
|
/**
|
|
30264
30602
|
* person
|
|
30265
30603
|
*/
|
|
@@ -32867,7 +33205,7 @@ class Client$E extends Client$F {
|
|
|
32867
33205
|
}),
|
|
32868
33206
|
},
|
|
32869
33207
|
/**
|
|
32870
|
-
*
|
|
33208
|
+
* 文件
|
|
32871
33209
|
*/
|
|
32872
33210
|
file: {
|
|
32873
33211
|
/**
|
|
@@ -34687,7 +35025,7 @@ class Client$E extends Client$F {
|
|
|
34687
35025
|
}),
|
|
34688
35026
|
},
|
|
34689
35027
|
/**
|
|
34690
|
-
*
|
|
35028
|
+
* 文件
|
|
34691
35029
|
*/
|
|
34692
35030
|
file: {
|
|
34693
35031
|
/**
|
|
@@ -40123,7 +40461,7 @@ class Client$u extends Client$v {
|
|
|
40123
40461
|
}),
|
|
40124
40462
|
},
|
|
40125
40463
|
/**
|
|
40126
|
-
*
|
|
40464
|
+
* 入职
|
|
40127
40465
|
*/
|
|
40128
40466
|
application: {
|
|
40129
40467
|
/**
|
|
@@ -45546,7 +45884,7 @@ class Client$u extends Client$v {
|
|
|
45546
45884
|
}),
|
|
45547
45885
|
},
|
|
45548
45886
|
/**
|
|
45549
|
-
*
|
|
45887
|
+
* 入职
|
|
45550
45888
|
*/
|
|
45551
45889
|
application: {
|
|
45552
45890
|
/**
|
|
@@ -52297,7 +52635,7 @@ class Client$s extends Client$t {
|
|
|
52297
52635
|
}),
|
|
52298
52636
|
},
|
|
52299
52637
|
/**
|
|
52300
|
-
*
|
|
52638
|
+
* 消息加急
|
|
52301
52639
|
*/
|
|
52302
52640
|
message: {
|
|
52303
52641
|
/**
|
|
@@ -54500,7 +54838,7 @@ class Client$s extends Client$t {
|
|
|
54500
54838
|
}),
|
|
54501
54839
|
},
|
|
54502
54840
|
/**
|
|
54503
|
-
*
|
|
54841
|
+
* 消息加急
|
|
54504
54842
|
*/
|
|
54505
54843
|
message: {
|
|
54506
54844
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@larksuiteoapi/node-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.1",
|
|
4
4
|
"description": "larksuite open sdk for nodejs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"feishu",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"lodash.get": "^4.4.2",
|
|
34
34
|
"lodash.identity": "^3.0.0",
|
|
35
35
|
"lodash.merge": "^4.6.2",
|
|
36
|
-
"lodash.pick": "^4.4.0",
|
|
37
36
|
"lodash.pickby": "^4.6.0",
|
|
38
37
|
"protobufjs": "^7.2.6",
|
|
39
38
|
"qs": "^6.13.0",
|