@larksuiteoapi/node-sdk 1.42.0 → 1.43.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/lib/index.js CHANGED
@@ -1333,7 +1333,7 @@ class Client$10 extends Client$11 {
1333
1333
  constructor() {
1334
1334
  super(...arguments);
1335
1335
  /**
1336
- * 管理后台-密码
1336
+ * 管理后台-企业勋章
1337
1337
  */
1338
1338
  this.admin = {
1339
1339
  /**
@@ -3481,6 +3481,53 @@ class Client$_ extends Client$$ {
3481
3481
  });
3482
3482
  }),
3483
3483
  },
3484
+ /**
3485
+ * application.collaborators
3486
+ */
3487
+ applicationCollaborators: {
3488
+ /**
3489
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=get&version=v6 click to debug }
3490
+ *
3491
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=application&resource=application.collaborators&version=v6 document }
3492
+ */
3493
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3494
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3495
+ return this.httpInstance
3496
+ .request({
3497
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path),
3498
+ method: "GET",
3499
+ data,
3500
+ params,
3501
+ headers,
3502
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
3503
+ })
3504
+ .catch((e) => {
3505
+ this.logger.error(formatErrors(e));
3506
+ throw e;
3507
+ });
3508
+ }),
3509
+ /**
3510
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=update&version=v6 click to debug }
3511
+ *
3512
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.collaborators&version=v6 document }
3513
+ */
3514
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3515
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3516
+ return this.httpInstance
3517
+ .request({
3518
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path),
3519
+ method: "PUT",
3520
+ data,
3521
+ params,
3522
+ headers,
3523
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
3524
+ })
3525
+ .catch((e) => {
3526
+ this.logger.error(formatErrors(e));
3527
+ throw e;
3528
+ });
3529
+ }),
3530
+ },
3484
3531
  /**
3485
3532
  * application.contacts_range
3486
3533
  */
@@ -3814,6 +3861,32 @@ class Client$_ extends Client$$ {
3814
3861
  });
3815
3862
  }),
3816
3863
  },
3864
+ /**
3865
+ * application.owner
3866
+ */
3867
+ applicationOwner: {
3868
+ /**
3869
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.owner&apiName=update&version=v6 click to debug }
3870
+ *
3871
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.owner&version=v6 document }
3872
+ */
3873
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3874
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3875
+ return this.httpInstance
3876
+ .request({
3877
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`, path),
3878
+ method: "PUT",
3879
+ data,
3880
+ params,
3881
+ headers,
3882
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
3883
+ })
3884
+ .catch((e) => {
3885
+ this.logger.error(formatErrors(e));
3886
+ throw e;
3887
+ });
3888
+ }),
3889
+ },
3817
3890
  /**
3818
3891
  * 事件
3819
3892
  */
@@ -4262,6 +4335,53 @@ class Client$_ extends Client$$ {
4262
4335
  });
4263
4336
  }),
4264
4337
  },
4338
+ /**
4339
+ * application.collaborators
4340
+ */
4341
+ applicationCollaborators: {
4342
+ /**
4343
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=get&version=v6 click to debug }
4344
+ *
4345
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=application&resource=application.collaborators&version=v6 document }
4346
+ */
4347
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4348
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4349
+ return this.httpInstance
4350
+ .request({
4351
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path),
4352
+ method: "GET",
4353
+ data,
4354
+ params,
4355
+ headers,
4356
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
4357
+ })
4358
+ .catch((e) => {
4359
+ this.logger.error(formatErrors(e));
4360
+ throw e;
4361
+ });
4362
+ }),
4363
+ /**
4364
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.collaborators&apiName=update&version=v6 click to debug }
4365
+ *
4366
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.collaborators&version=v6 document }
4367
+ */
4368
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4369
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4370
+ return this.httpInstance
4371
+ .request({
4372
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/collaborators`, path),
4373
+ method: "PUT",
4374
+ data,
4375
+ params,
4376
+ headers,
4377
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
4378
+ })
4379
+ .catch((e) => {
4380
+ this.logger.error(formatErrors(e));
4381
+ throw e;
4382
+ });
4383
+ }),
4384
+ },
4265
4385
  /**
4266
4386
  * application.contacts_range
4267
4387
  */
@@ -4599,6 +4719,32 @@ class Client$_ extends Client$$ {
4599
4719
  });
4600
4720
  }),
4601
4721
  },
4722
+ /**
4723
+ * application.owner
4724
+ */
4725
+ applicationOwner: {
4726
+ /**
4727
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.owner&apiName=update&version=v6 click to debug }
4728
+ *
4729
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=application&resource=application.owner&version=v6 document }
4730
+ */
4731
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4732
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4733
+ return this.httpInstance
4734
+ .request({
4735
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/owner`, path),
4736
+ method: "PUT",
4737
+ data,
4738
+ params,
4739
+ headers,
4740
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
4741
+ })
4742
+ .catch((e) => {
4743
+ this.logger.error(formatErrors(e));
4744
+ throw e;
4745
+ });
4746
+ }),
4747
+ },
4602
4748
  /**
4603
4749
  * 事件
4604
4750
  */
@@ -7593,6 +7739,29 @@ class Client$Y extends Client$Z {
7593
7739
  throw e;
7594
7740
  });
7595
7741
  }),
7742
+ /**
7743
+ * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=batch_del&version=v1 click to debug }
7744
+ *
7745
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_del&project=attendance&resource=user_flow&version=v1 document }
7746
+ *
7747
+ * 批量删除流水
7748
+ */
7749
+ batchDel: (payload, options) => __awaiter(this, void 0, void 0, function* () {
7750
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
7751
+ return this.httpInstance
7752
+ .request({
7753
+ url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`, path),
7754
+ method: "POST",
7755
+ data,
7756
+ params,
7757
+ headers,
7758
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
7759
+ })
7760
+ .catch((e) => {
7761
+ this.logger.error(formatErrors(e));
7762
+ throw e;
7763
+ });
7764
+ }),
7596
7765
  /**
7597
7766
  * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=get&version=v1 click to debug }
7598
7767
  *
@@ -8794,6 +8963,29 @@ class Client$Y extends Client$Z {
8794
8963
  throw e;
8795
8964
  });
8796
8965
  }),
8966
+ /**
8967
+ * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=batch_del&version=v1 click to debug }
8968
+ *
8969
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_del&project=attendance&resource=user_flow&version=v1 document }
8970
+ *
8971
+ * 批量删除流水
8972
+ */
8973
+ batchDel: (payload, options) => __awaiter(this, void 0, void 0, function* () {
8974
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
8975
+ return this.httpInstance
8976
+ .request({
8977
+ url: fillApiPath(`${this.domain}/open-apis/attendance/v1/user_flows/batch_del`, path),
8978
+ method: "POST",
8979
+ data,
8980
+ params,
8981
+ headers,
8982
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
8983
+ })
8984
+ .catch((e) => {
8985
+ this.logger.error(formatErrors(e));
8986
+ throw e;
8987
+ });
8988
+ }),
8797
8989
  /**
8798
8990
  * {@link https://open.feishu.cn/api-explorer?project=attendance&resource=user_flow&apiName=get&version=v1 click to debug }
8799
8991
  *
@@ -34662,7 +34854,7 @@ class Client$E extends Client$F {
34662
34854
  constructor() {
34663
34855
  super(...arguments);
34664
34856
  /**
34665
- * 云文档-文档
34857
+ * 云文档-文件管理
34666
34858
  */
34667
34859
  this.drive = {
34668
34860
  /**
@@ -35083,7 +35275,7 @@ class Client$E extends Client$F {
35083
35275
  }),
35084
35276
  },
35085
35277
  /**
35086
- * 文件
35278
+ * 分片上传
35087
35279
  */
35088
35280
  file: {
35089
35281
  /**
@@ -35956,7 +36148,7 @@ class Client$E extends Client$F {
35956
36148
  }),
35957
36149
  },
35958
36150
  /**
35959
- * 素材
36151
+ * 分片上传
35960
36152
  */
35961
36153
  media: {
35962
36154
  /**
@@ -36903,7 +37095,7 @@ class Client$E extends Client$F {
36903
37095
  }),
36904
37096
  },
36905
37097
  /**
36906
- * 文件
37098
+ * 分片上传
36907
37099
  */
36908
37100
  file: {
36909
37101
  /**
@@ -37782,7 +37974,7 @@ class Client$E extends Client$F {
37782
37974
  }),
37783
37975
  },
37784
37976
  /**
37785
- * 素材
37977
+ * 分片上传
37786
37978
  */
37787
37979
  media: {
37788
37980
  /**
@@ -42482,9 +42674,34 @@ class Client$u extends Client$v {
42482
42674
  }),
42483
42675
  },
42484
42676
  /**
42485
- * 投递
42677
+ * 入职
42486
42678
  */
42487
42679
  application: {
42680
+ /**
42681
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=cancel_onboard&version=v1 click to debug }
42682
+ *
42683
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/cancel_onboard document }
42684
+ *
42685
+ * 取消候选人入职
42686
+ *
42687
+ * 操作候选人取消入职
42688
+ */
42689
+ cancelOnboard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42690
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
42691
+ return this.httpInstance
42692
+ .request({
42693
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`, path),
42694
+ method: "POST",
42695
+ data,
42696
+ params,
42697
+ headers,
42698
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
42699
+ })
42700
+ .catch((e) => {
42701
+ this.logger.error(formatErrors(e));
42702
+ throw e;
42703
+ });
42704
+ }),
42488
42705
  /**
42489
42706
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=create&version=v1 click to debug }
42490
42707
  *
@@ -48485,9 +48702,34 @@ class Client$u extends Client$v {
48485
48702
  }),
48486
48703
  },
48487
48704
  /**
48488
- * 投递
48705
+ * 入职
48489
48706
  */
48490
48707
  application: {
48708
+ /**
48709
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=cancel_onboard&version=v1 click to debug }
48710
+ *
48711
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/cancel_onboard document }
48712
+ *
48713
+ * 取消候选人入职
48714
+ *
48715
+ * 操作候选人取消入职
48716
+ */
48717
+ cancelOnboard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
48718
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
48719
+ return this.httpInstance
48720
+ .request({
48721
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/applications/:application_id/cancel_onboard`, path),
48722
+ method: "POST",
48723
+ data,
48724
+ params,
48725
+ headers,
48726
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
48727
+ })
48728
+ .catch((e) => {
48729
+ this.logger.error(formatErrors(e));
48730
+ throw e;
48731
+ });
48732
+ }),
48491
48733
  /**
48492
48734
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=application&apiName=create&version=v1 click to debug }
48493
48735
  *
@@ -55759,7 +56001,7 @@ class Client$s extends Client$t {
55759
56001
  }),
55760
56002
  },
55761
56003
  /**
55762
- * 消息
56004
+ * 消息加急
55763
56005
  */
55764
56006
  message: {
55765
56007
  /**
@@ -57962,7 +58204,7 @@ class Client$s extends Client$t {
57962
58204
  }),
57963
58205
  },
57964
58206
  /**
57965
- * 消息
58207
+ * 消息加急
57966
58208
  */
57967
58209
  message: {
57968
58210
  /**
@@ -65893,7 +66135,7 @@ class Client$c extends Client$d {
65893
66135
  }),
65894
66136
  },
65895
66137
  /**
65896
- * 行列
66138
+ * 工作表
65897
66139
  */
65898
66140
  spreadsheetSheet: {
65899
66141
  /**
@@ -66623,7 +66865,7 @@ class Client$c extends Client$d {
66623
66865
  }),
66624
66866
  },
66625
66867
  /**
66626
- * 行列
66868
+ * 工作表
66627
66869
  */
66628
66870
  spreadsheetSheet: {
66629
66871
  /**
@@ -76428,11 +76670,7 @@ const adaptDefault = (path, dispatcher, options) => (req, res) => __awaiter(void
76428
76670
  }
76429
76671
  }
76430
76672
  const value = yield dispatcher.invoke(data);
76431
- // event don't need response
76432
- if (dispatcher instanceof CardActionHandler) {
76433
- res.end(JSON.stringify(value));
76434
- }
76435
- res.end('');
76673
+ res.end(JSON.stringify(value));
76436
76674
  });
76437
76675
 
76438
76676
  const adaptExpress = (dispatcher, options) => (req, res) => __awaiter(void 0, void 0, void 0, function* () {
@@ -76463,11 +76701,7 @@ const adaptExpress = (dispatcher, options) => (req, res) => __awaiter(void 0, vo
76463
76701
  }
76464
76702
  }
76465
76703
  const value = yield dispatcher.invoke(data);
76466
- // event don't need response
76467
- if (dispatcher instanceof CardActionHandler) {
76468
- res.json(value);
76469
- }
76470
- res.end('');
76704
+ res.json(value);
76471
76705
  });
76472
76706
 
76473
76707
  const adaptKoa = (path, dispatcher, options) => (ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
@@ -76501,13 +76735,7 @@ const adaptKoa = (path, dispatcher, options) => (ctx, next) => __awaiter(void 0,
76501
76735
  }
76502
76736
  }
76503
76737
  const value = yield dispatcher.invoke(data);
76504
- // event don't need response
76505
- if (dispatcher instanceof CardActionHandler) {
76506
- ctx.body = JSON.stringify(value);
76507
- }
76508
- else {
76509
- ctx.body = '';
76510
- }
76738
+ ctx.body = JSON.stringify(value);
76511
76739
  }
76512
76740
  yield next();
76513
76741
  });
@@ -76542,13 +76770,7 @@ const adaptKoaRouter = (dispatcher, options) => (ctx, next) => __awaiter(void 0,
76542
76770
  }
76543
76771
  }
76544
76772
  const value = yield dispatcher.invoke(data);
76545
- // event don't need response
76546
- if (dispatcher instanceof CardActionHandler) {
76547
- ctx.body = JSON.stringify(value);
76548
- }
76549
- else {
76550
- ctx.body = '';
76551
- }
76773
+ ctx.body = JSON.stringify(value);
76552
76774
  yield next();
76553
76775
  });
76554
76776
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larksuiteoapi/node-sdk",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "description": "larksuite open sdk for nodejs",
5
5
  "keywords": [
6
6
  "feishu",