@larksuiteoapi/node-sdk 1.39.0 → 1.40.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 CHANGED
@@ -1305,7 +1305,7 @@ class Client$_ extends Client$$ {
1305
1305
  constructor() {
1306
1306
  super(...arguments);
1307
1307
  /**
1308
- * 管理后台-行为审计
1308
+ * 管理后台-密码
1309
1309
  */
1310
1310
  this.admin = {
1311
1311
  /**
@@ -3529,6 +3529,81 @@ class Client$Y extends Client$Z {
3529
3529
  throw e;
3530
3530
  });
3531
3531
  }),
3532
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3533
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3534
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
3535
+ const res = yield this.httpInstance
3536
+ .request({
3537
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
3538
+ method: "GET",
3539
+ headers: pickBy(innerPayload.headers, identity),
3540
+ params: pickBy(innerPayload.params, identity),
3541
+ data,
3542
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
3543
+ })
3544
+ .catch((e) => {
3545
+ this.logger.error(formatErrors(e));
3546
+ });
3547
+ return res;
3548
+ });
3549
+ const Iterable = {
3550
+ [Symbol.asyncIterator]() {
3551
+ return __asyncGenerator(this, arguments, function* _a() {
3552
+ let hasMore = true;
3553
+ let pageToken;
3554
+ while (hasMore) {
3555
+ try {
3556
+ const res = yield __await(sendRequest({
3557
+ headers,
3558
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
3559
+ data,
3560
+ }));
3561
+ const _b = get(res, "data") || {}, {
3562
+ // @ts-ignore
3563
+ has_more,
3564
+ // @ts-ignore
3565
+ page_token,
3566
+ // @ts-ignore
3567
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
3568
+ yield yield __await(rest);
3569
+ hasMore = Boolean(has_more);
3570
+ pageToken = page_token || next_page_token;
3571
+ }
3572
+ catch (e) {
3573
+ yield yield __await(null);
3574
+ break;
3575
+ }
3576
+ }
3577
+ });
3578
+ },
3579
+ };
3580
+ return Iterable;
3581
+ }),
3582
+ /**
3583
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
3584
+ *
3585
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
3586
+ *
3587
+ * 获取企业安装的应用
3588
+ *
3589
+ * 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
3590
+ */
3591
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3592
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3593
+ return this.httpInstance
3594
+ .request({
3595
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
3596
+ method: "GET",
3597
+ data,
3598
+ params,
3599
+ headers,
3600
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
3601
+ })
3602
+ .catch((e) => {
3603
+ this.logger.error(formatErrors(e));
3604
+ throw e;
3605
+ });
3606
+ }),
3532
3607
  /**
3533
3608
  * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
3534
3609
  *
@@ -4235,6 +4310,83 @@ class Client$Y extends Client$Z {
4235
4310
  throw e;
4236
4311
  });
4237
4312
  }),
4313
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4314
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4315
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
4316
+ const res = yield this.httpInstance
4317
+ .request({
4318
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
4319
+ method: "GET",
4320
+ headers: pickBy(innerPayload.headers, identity),
4321
+ params: pickBy(innerPayload.params, identity),
4322
+ data,
4323
+ paramsSerializer: (params) => stringify(params, {
4324
+ arrayFormat: "repeat",
4325
+ }),
4326
+ })
4327
+ .catch((e) => {
4328
+ this.logger.error(formatErrors(e));
4329
+ });
4330
+ return res;
4331
+ });
4332
+ const Iterable = {
4333
+ [Symbol.asyncIterator]() {
4334
+ return __asyncGenerator(this, arguments, function* _a() {
4335
+ let hasMore = true;
4336
+ let pageToken;
4337
+ while (hasMore) {
4338
+ try {
4339
+ const res = yield __await(sendRequest({
4340
+ headers,
4341
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
4342
+ data,
4343
+ }));
4344
+ const _b = get(res, "data") || {}, {
4345
+ // @ts-ignore
4346
+ has_more,
4347
+ // @ts-ignore
4348
+ page_token,
4349
+ // @ts-ignore
4350
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
4351
+ yield yield __await(rest);
4352
+ hasMore = Boolean(has_more);
4353
+ pageToken = page_token || next_page_token;
4354
+ }
4355
+ catch (e) {
4356
+ yield yield __await(null);
4357
+ break;
4358
+ }
4359
+ }
4360
+ });
4361
+ },
4362
+ };
4363
+ return Iterable;
4364
+ }),
4365
+ /**
4366
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=list&version=v6 click to debug }
4367
+ *
4368
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list document }
4369
+ *
4370
+ * 获取企业安装的应用
4371
+ *
4372
+ * 该接口用于查询企业安装的应用列表,只能被企业自建应用调用。
4373
+ */
4374
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4375
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4376
+ return this.httpInstance
4377
+ .request({
4378
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications`, path),
4379
+ method: "GET",
4380
+ data,
4381
+ params,
4382
+ headers,
4383
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
4384
+ })
4385
+ .catch((e) => {
4386
+ this.logger.error(formatErrors(e));
4387
+ throw e;
4388
+ });
4389
+ }),
4238
4390
  /**
4239
4391
  * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=patch&version=v6 click to debug }
4240
4392
  *
@@ -4527,7 +4679,7 @@ class Client$X extends Client$Y {
4527
4679
  */
4528
4680
  this.approval = {
4529
4681
  /**
4530
- * 事件
4682
+ * 原生审批定义
4531
4683
  */
4532
4684
  approval: {
4533
4685
  /**
@@ -5324,7 +5476,7 @@ class Client$X extends Client$Y {
5324
5476
  }),
5325
5477
  },
5326
5478
  /**
5327
- * 审批查询
5479
+ * 原生审批任务
5328
5480
  */
5329
5481
  task: {
5330
5482
  /**
@@ -5530,7 +5682,7 @@ class Client$X extends Client$Y {
5530
5682
  },
5531
5683
  v4: {
5532
5684
  /**
5533
- * 事件
5685
+ * 原生审批定义
5534
5686
  */
5535
5687
  approval: {
5536
5688
  /**
@@ -6335,7 +6487,7 @@ class Client$X extends Client$Y {
6335
6487
  }),
6336
6488
  },
6337
6489
  /**
6338
- * 审批查询
6490
+ * 原生审批任务
6339
6491
  */
6340
6492
  task: {
6341
6493
  /**
@@ -17270,7 +17422,7 @@ class Client$L extends Client$M {
17270
17422
  constructor() {
17271
17423
  super(...arguments);
17272
17424
  /**
17273
- * 搜索
17425
+ * 通讯录
17274
17426
  */
17275
17427
  this.contact = {
17276
17428
  /**
@@ -29738,6 +29890,155 @@ class Client$I extends Client$J {
29738
29890
  });
29739
29891
  }),
29740
29892
  },
29893
+ /**
29894
+ * employees.additional_job
29895
+ */
29896
+ employeesAdditionalJob: {
29897
+ batchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
29898
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
29899
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
29900
+ const res = yield this.httpInstance
29901
+ .request({
29902
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
29903
+ method: "POST",
29904
+ headers: pickBy(innerPayload.headers, identity),
29905
+ params: pickBy(innerPayload.params, identity),
29906
+ data,
29907
+ paramsSerializer: (params) => stringify(params, {
29908
+ arrayFormat: "repeat",
29909
+ }),
29910
+ })
29911
+ .catch((e) => {
29912
+ this.logger.error(formatErrors(e));
29913
+ });
29914
+ return res;
29915
+ });
29916
+ const Iterable = {
29917
+ [Symbol.asyncIterator]() {
29918
+ return __asyncGenerator(this, arguments, function* _a() {
29919
+ let hasMore = true;
29920
+ let pageToken;
29921
+ while (hasMore) {
29922
+ try {
29923
+ const res = yield __await(sendRequest({
29924
+ headers,
29925
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
29926
+ data,
29927
+ }));
29928
+ const _b = get(res, "data") || {}, {
29929
+ // @ts-ignore
29930
+ has_more,
29931
+ // @ts-ignore
29932
+ page_token,
29933
+ // @ts-ignore
29934
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
29935
+ yield yield __await(rest);
29936
+ hasMore = Boolean(has_more);
29937
+ pageToken = page_token || next_page_token;
29938
+ }
29939
+ catch (e) {
29940
+ yield yield __await(null);
29941
+ break;
29942
+ }
29943
+ }
29944
+ });
29945
+ },
29946
+ };
29947
+ return Iterable;
29948
+ }),
29949
+ /**
29950
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=batch&version=v2 click to debug }
29951
+ *
29952
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=corehr&resource=employees.additional_job&version=v2 document }
29953
+ *
29954
+ * 批量查询兼职信息
29955
+ */
29956
+ batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
29957
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
29958
+ return this.httpInstance
29959
+ .request({
29960
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/batch`, path),
29961
+ method: "POST",
29962
+ data,
29963
+ params,
29964
+ headers,
29965
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
29966
+ })
29967
+ .catch((e) => {
29968
+ this.logger.error(formatErrors(e));
29969
+ throw e;
29970
+ });
29971
+ }),
29972
+ /**
29973
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=create&version=v2 click to debug }
29974
+ *
29975
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=employees.additional_job&version=v2 document }
29976
+ *
29977
+ * 创建兼职
29978
+ */
29979
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
29980
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
29981
+ return this.httpInstance
29982
+ .request({
29983
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs`, path),
29984
+ method: "POST",
29985
+ data,
29986
+ params,
29987
+ headers,
29988
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
29989
+ })
29990
+ .catch((e) => {
29991
+ this.logger.error(formatErrors(e));
29992
+ throw e;
29993
+ });
29994
+ }),
29995
+ /**
29996
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=delete&version=v2 click to debug }
29997
+ *
29998
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=employees.additional_job&version=v2 document }
29999
+ *
30000
+ * 删除兼职
30001
+ */
30002
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
30003
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
30004
+ return this.httpInstance
30005
+ .request({
30006
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
30007
+ method: "DELETE",
30008
+ data,
30009
+ params,
30010
+ headers,
30011
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
30012
+ })
30013
+ .catch((e) => {
30014
+ this.logger.error(formatErrors(e));
30015
+ throw e;
30016
+ });
30017
+ }),
30018
+ /**
30019
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.additional_job&apiName=patch&version=v2 click to debug }
30020
+ *
30021
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=employees.additional_job&version=v2 document }
30022
+ *
30023
+ * 更新兼职
30024
+ */
30025
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
30026
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
30027
+ return this.httpInstance
30028
+ .request({
30029
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/additional_jobs/:additional_job_id`, path),
30030
+ method: "PATCH",
30031
+ data,
30032
+ params,
30033
+ headers,
30034
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
30035
+ })
30036
+ .catch((e) => {
30037
+ this.logger.error(formatErrors(e));
30038
+ throw e;
30039
+ });
30040
+ }),
30041
+ },
29741
30042
  /**
29742
30043
  * employees.bp
29743
30044
  */
@@ -30243,6 +30544,32 @@ class Client$I extends Client$J {
30243
30544
  });
30244
30545
  }),
30245
30546
  },
30547
+ /**
30548
+ * offboarding
30549
+ */
30550
+ offboarding: {
30551
+ /**
30552
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=offboarding&apiName=submit_v2&version=v2 click to debug }
30553
+ *
30554
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=submit_v2&project=corehr&resource=offboarding&version=v2 document }
30555
+ */
30556
+ submitV2: (payload, options) => __awaiter(this, void 0, void 0, function* () {
30557
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
30558
+ return this.httpInstance
30559
+ .request({
30560
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/offboardings/submit_v2`, path),
30561
+ method: "POST",
30562
+ data,
30563
+ params,
30564
+ headers,
30565
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
30566
+ })
30567
+ .catch((e) => {
30568
+ this.logger.error(formatErrors(e));
30569
+ throw e;
30570
+ });
30571
+ }),
30572
+ },
30246
30573
  /**
30247
30574
  * person
30248
30575
  */
@@ -32850,7 +33177,7 @@ class Client$E extends Client$F {
32850
33177
  }),
32851
33178
  },
32852
33179
  /**
32853
- * 文件夹
33180
+ * 文件
32854
33181
  */
32855
33182
  file: {
32856
33183
  /**
@@ -34670,7 +34997,7 @@ class Client$E extends Client$F {
34670
34997
  }),
34671
34998
  },
34672
34999
  /**
34673
- * 文件夹
35000
+ * 文件
34674
35001
  */
34675
35002
  file: {
34676
35003
  /**
@@ -40106,7 +40433,7 @@ class Client$u extends Client$v {
40106
40433
  }),
40107
40434
  },
40108
40435
  /**
40109
- * 投递
40436
+ * 入职
40110
40437
  */
40111
40438
  application: {
40112
40439
  /**
@@ -45529,7 +45856,7 @@ class Client$u extends Client$v {
45529
45856
  }),
45530
45857
  },
45531
45858
  /**
45532
- * 投递
45859
+ * 入职
45533
45860
  */
45534
45861
  application: {
45535
45862
  /**
@@ -52280,7 +52607,7 @@ class Client$s extends Client$t {
52280
52607
  }),
52281
52608
  },
52282
52609
  /**
52283
- * 消息
52610
+ * 消息加急
52284
52611
  */
52285
52612
  message: {
52286
52613
  /**
@@ -54483,7 +54810,7 @@ class Client$s extends Client$t {
54483
54810
  }),
54484
54811
  },
54485
54812
  /**
54486
- * 消息
54813
+ * 消息加急
54487
54814
  */
54488
54815
  message: {
54489
54816
  /**