@larksuiteoapi/node-sdk 1.8.1 → 1.9.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
@@ -561,7 +561,7 @@ class Client$1 {
561
561
  },
562
562
  };
563
563
  /**
564
- * 管理后台-企业勋章
564
+ * 管理后台-密码
565
565
  */
566
566
  this.admin = {
567
567
  /**
@@ -1765,7 +1765,7 @@ class Client$1 {
1765
1765
  }),
1766
1766
  },
1767
1767
  /**
1768
- * 原生审批实例
1768
+ * 审批查询
1769
1769
  */
1770
1770
  instance: {
1771
1771
  /**
@@ -3364,6 +3364,86 @@ class Client$1 {
3364
3364
  }),
3365
3365
  },
3366
3366
  };
3367
+ /**
3368
+
3369
+ */
3370
+ this.authen = {
3371
+ /**
3372
+ * access_token
3373
+ */
3374
+ accessToken: {
3375
+ /**
3376
+ * {@link https://open.feishu.cn/api-explorer?project=authen&resource=access_token&apiName=create&version=v1 click to debug }
3377
+ *
3378
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=access_token&version=v1 document }
3379
+ */
3380
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3381
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3382
+ return httpInstance
3383
+ .request({
3384
+ url: fillApiPath(`${this.domain}/open-apis/authen/v1/access_token`, path),
3385
+ method: "POST",
3386
+ data,
3387
+ params,
3388
+ headers,
3389
+ })
3390
+ .catch((e) => {
3391
+ this.logger.error(formatErrors(e));
3392
+ throw e;
3393
+ });
3394
+ }),
3395
+ },
3396
+ /**
3397
+ * refresh_access_token
3398
+ */
3399
+ refreshAccessToken: {
3400
+ /**
3401
+ * {@link https://open.feishu.cn/api-explorer?project=authen&resource=refresh_access_token&apiName=create&version=v1 click to debug }
3402
+ *
3403
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=refresh_access_token&version=v1 document }
3404
+ */
3405
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3406
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3407
+ return httpInstance
3408
+ .request({
3409
+ url: fillApiPath(`${this.domain}/open-apis/authen/v1/refresh_access_token`, path),
3410
+ method: "POST",
3411
+ data,
3412
+ params,
3413
+ headers,
3414
+ })
3415
+ .catch((e) => {
3416
+ this.logger.error(formatErrors(e));
3417
+ throw e;
3418
+ });
3419
+ }),
3420
+ },
3421
+ /**
3422
+ * user_info
3423
+ */
3424
+ userInfo: {
3425
+ /**
3426
+ * {@link https://open.feishu.cn/api-explorer?project=authen&resource=user_info&apiName=get&version=v1 click to debug }
3427
+ *
3428
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=user_info&version=v1 document }
3429
+ */
3430
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3431
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3432
+ return httpInstance
3433
+ .request({
3434
+ url: fillApiPath(`${this.domain}/open-apis/authen/v1/user_info`, path),
3435
+ method: "GET",
3436
+ data,
3437
+ params,
3438
+ headers,
3439
+ })
3440
+ .catch((e) => {
3441
+ this.logger.error(formatErrors(e));
3442
+ throw e;
3443
+ });
3444
+ }),
3445
+ },
3446
+ };
3367
3447
  /**
3368
3448
 
3369
3449
  */
@@ -4543,6 +4623,26 @@ class Client$1 {
4543
4623
  throw e;
4544
4624
  });
4545
4625
  }),
4626
+ /**
4627
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app.table&apiName=patch&version=v1 click to debug }
4628
+ *
4629
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/patch document }
4630
+ */
4631
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4632
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4633
+ return httpInstance
4634
+ .request({
4635
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/tables/:table_id`, path),
4636
+ method: "PATCH",
4637
+ data,
4638
+ params,
4639
+ headers,
4640
+ })
4641
+ .catch((e) => {
4642
+ this.logger.error(formatErrors(e));
4643
+ throw e;
4644
+ });
4645
+ }),
4546
4646
  },
4547
4647
  /**
4548
4648
  * 字段
@@ -8899,7 +8999,7 @@ class Client$1 {
8899
8999
  }),
8900
9000
  },
8901
9001
  /**
8902
- * 下载
9002
+ * 文件夹
8903
9003
  */
8904
9004
  file: {
8905
9005
  /**
@@ -9384,6 +9484,203 @@ class Client$1 {
9384
9484
  });
9385
9485
  }),
9386
9486
  },
9487
+ /**
9488
+ * 文档版本
9489
+ */
9490
+ fileVersion: {
9491
+ /**
9492
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=create&version=v1 click to debug }
9493
+ *
9494
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/create document }
9495
+ *
9496
+ * 创建文档版本
9497
+ *
9498
+ * 创建文档版本。
9499
+ */
9500
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9501
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9502
+ return httpInstance
9503
+ .request({
9504
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
9505
+ method: "POST",
9506
+ data,
9507
+ params,
9508
+ headers,
9509
+ })
9510
+ .catch((e) => {
9511
+ this.logger.error(formatErrors(e));
9512
+ throw e;
9513
+ });
9514
+ }),
9515
+ /**
9516
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=delete&version=v1 click to debug }
9517
+ *
9518
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete document }
9519
+ *
9520
+ * 删除文档版本
9521
+ *
9522
+ * 删除文档版本。
9523
+ */
9524
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9525
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9526
+ return httpInstance
9527
+ .request({
9528
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
9529
+ method: "DELETE",
9530
+ data,
9531
+ params,
9532
+ headers,
9533
+ })
9534
+ .catch((e) => {
9535
+ this.logger.error(formatErrors(e));
9536
+ throw e;
9537
+ });
9538
+ }),
9539
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9540
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9541
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
9542
+ const res = yield httpInstance
9543
+ .request({
9544
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
9545
+ method: "GET",
9546
+ headers: pickBy(innerPayload.headers, identity),
9547
+ params: pickBy(innerPayload.params, identity),
9548
+ })
9549
+ .catch((e) => {
9550
+ this.logger.error(formatErrors(e));
9551
+ });
9552
+ return res;
9553
+ });
9554
+ const Iterable = {
9555
+ [Symbol.asyncIterator]() {
9556
+ return __asyncGenerator(this, arguments, function* _a() {
9557
+ let hasMore = true;
9558
+ let pageToken;
9559
+ while (hasMore) {
9560
+ try {
9561
+ const res = yield __await(sendRequest({
9562
+ headers,
9563
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
9564
+ data,
9565
+ }));
9566
+ const _b = get(res, "data") || {}, {
9567
+ // @ts-ignore
9568
+ has_more,
9569
+ // @ts-ignore
9570
+ page_token,
9571
+ // @ts-ignore
9572
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
9573
+ yield yield __await(rest);
9574
+ hasMore = Boolean(has_more);
9575
+ pageToken = page_token || next_page_token;
9576
+ }
9577
+ catch (e) {
9578
+ yield yield __await(null);
9579
+ break;
9580
+ }
9581
+ }
9582
+ });
9583
+ },
9584
+ };
9585
+ return Iterable;
9586
+ }),
9587
+ /**
9588
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=get&version=v1 click to debug }
9589
+ *
9590
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get document }
9591
+ *
9592
+ * 获取文档版本
9593
+ *
9594
+ * 获取文档版本。
9595
+ */
9596
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9597
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9598
+ return httpInstance
9599
+ .request({
9600
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions/:version_id`, path),
9601
+ method: "GET",
9602
+ data,
9603
+ params,
9604
+ headers,
9605
+ })
9606
+ .catch((e) => {
9607
+ this.logger.error(formatErrors(e));
9608
+ throw e;
9609
+ });
9610
+ }),
9611
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9612
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9613
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
9614
+ const res = yield httpInstance
9615
+ .request({
9616
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
9617
+ method: "GET",
9618
+ headers: pickBy(innerPayload.headers, identity),
9619
+ params: pickBy(innerPayload.params, identity),
9620
+ })
9621
+ .catch((e) => {
9622
+ this.logger.error(formatErrors(e));
9623
+ });
9624
+ return res;
9625
+ });
9626
+ const Iterable = {
9627
+ [Symbol.asyncIterator]() {
9628
+ return __asyncGenerator(this, arguments, function* _a() {
9629
+ let hasMore = true;
9630
+ let pageToken;
9631
+ while (hasMore) {
9632
+ try {
9633
+ const res = yield __await(sendRequest({
9634
+ headers,
9635
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
9636
+ data,
9637
+ }));
9638
+ const _b = get(res, "data") || {}, {
9639
+ // @ts-ignore
9640
+ has_more,
9641
+ // @ts-ignore
9642
+ page_token,
9643
+ // @ts-ignore
9644
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
9645
+ yield yield __await(rest);
9646
+ hasMore = Boolean(has_more);
9647
+ pageToken = page_token || next_page_token;
9648
+ }
9649
+ catch (e) {
9650
+ yield yield __await(null);
9651
+ break;
9652
+ }
9653
+ }
9654
+ });
9655
+ },
9656
+ };
9657
+ return Iterable;
9658
+ }),
9659
+ /**
9660
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.version&apiName=list&version=v1 click to debug }
9661
+ *
9662
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list document }
9663
+ *
9664
+ * 获取文档版本列表
9665
+ *
9666
+ * 获取文档所有版本。
9667
+ */
9668
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9669
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9670
+ return httpInstance
9671
+ .request({
9672
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/versions`, path),
9673
+ method: "GET",
9674
+ data,
9675
+ params,
9676
+ headers,
9677
+ })
9678
+ .catch((e) => {
9679
+ this.logger.error(formatErrors(e));
9680
+ throw e;
9681
+ });
9682
+ }),
9683
+ },
9387
9684
  /**
9388
9685
  * 导入
9389
9686
  */
@@ -9438,7 +9735,7 @@ class Client$1 {
9438
9735
  }),
9439
9736
  },
9440
9737
  /**
9441
- * 分片上传
9738
+ * 素材
9442
9739
  */
9443
9740
  media: {
9444
9741
  /**
@@ -9653,7 +9950,27 @@ class Client$1 {
9653
9950
  */
9654
9951
  permissionMember: {
9655
9952
  /**
9656
- * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=create&version=v1 click to debug }
9953
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=auth&version=v1 click to debug }
9954
+ *
9955
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=auth&project=drive&resource=permission.member&version=v1 document }
9956
+ */
9957
+ auth: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9958
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9959
+ return httpInstance
9960
+ .request({
9961
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/auth`, path),
9962
+ method: "GET",
9963
+ data,
9964
+ params,
9965
+ headers,
9966
+ })
9967
+ .catch((e) => {
9968
+ this.logger.error(formatErrors(e));
9969
+ throw e;
9970
+ });
9971
+ }),
9972
+ /**
9973
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=create&version=v1 click to debug }
9657
9974
  *
9658
9975
  * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create document }
9659
9976
  *
@@ -9726,6 +10043,26 @@ class Client$1 {
9726
10043
  throw e;
9727
10044
  });
9728
10045
  }),
10046
+ /**
10047
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=transfer_owner&version=v1 click to debug }
10048
+ *
10049
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transfer_owner&project=drive&resource=permission.member&version=v1 document }
10050
+ */
10051
+ transferOwner: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10052
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
10053
+ return httpInstance
10054
+ .request({
10055
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/members/transfer_owner`, path),
10056
+ method: "POST",
10057
+ data,
10058
+ params,
10059
+ headers,
10060
+ })
10061
+ .catch((e) => {
10062
+ this.logger.error(formatErrors(e));
10063
+ throw e;
10064
+ });
10065
+ }),
9729
10066
  /**
9730
10067
  * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.member&apiName=update&version=v1 click to debug }
9731
10068
  *
@@ -11998,6 +12335,30 @@ class Client$1 {
11998
12335
  throw e;
11999
12336
  });
12000
12337
  }),
12338
+ /**
12339
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=combined_update&version=v1 click to debug }
12340
+ *
12341
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_update document }
12342
+ *
12343
+ * 更新职位
12344
+ *
12345
+ * 更新职位信息,该接口为全量更新,若字段没有返回值,则原有值将会被清空。字段的是否必填,将以系统中的「职位字段管理」中的设置为准。
12346
+ */
12347
+ combinedUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12348
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12349
+ return httpInstance
12350
+ .request({
12351
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/jobs/:job_id/combined_update`, path),
12352
+ method: "POST",
12353
+ data,
12354
+ params,
12355
+ headers,
12356
+ })
12357
+ .catch((e) => {
12358
+ this.logger.error(formatErrors(e));
12359
+ throw e;
12360
+ });
12361
+ }),
12001
12362
  /**
12002
12363
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=job&apiName=config&version=v1 click to debug }
12003
12364
  *
@@ -13118,6 +13479,146 @@ class Client$1 {
13118
13479
  });
13119
13480
  }),
13120
13481
  },
13482
+ /**
13483
+ * chat.menu_item
13484
+ */
13485
+ chatMenuItem: {
13486
+ /**
13487
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_item&apiName=patch&version=v1 click to debug }
13488
+ *
13489
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_item/patch document }
13490
+ *
13491
+ * 修改群菜单元信息
13492
+ *
13493
+ * 修改某个一级菜单或者二级菜单的元信息。
13494
+ *
13495
+ * 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
13496
+ */
13497
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13498
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13499
+ return httpInstance
13500
+ .request({
13501
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_items/:menu_item_id`, path),
13502
+ method: "PATCH",
13503
+ data,
13504
+ params,
13505
+ headers,
13506
+ })
13507
+ .catch((e) => {
13508
+ this.logger.error(formatErrors(e));
13509
+ throw e;
13510
+ });
13511
+ }),
13512
+ },
13513
+ /**
13514
+ * 群组 - 群菜单
13515
+ */
13516
+ chatMenuTree: {
13517
+ /**
13518
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=create&version=v1 click to debug }
13519
+ *
13520
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/create document }
13521
+ *
13522
+ * 添加群菜单
13523
+ *
13524
+ * 向群内添加群菜单。
13525
+ *
13526
+ * 注意事项:;- 该API是向群内追加菜单,群内原来存在的菜单并不会被覆盖。操作API后,将返回群内所有菜单。;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 一个群内,一级菜单最多有3个,每个一级菜单最多有5个二级菜单。
13527
+ */
13528
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13529
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13530
+ return httpInstance
13531
+ .request({
13532
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path),
13533
+ method: "POST",
13534
+ data,
13535
+ params,
13536
+ headers,
13537
+ })
13538
+ .catch((e) => {
13539
+ this.logger.error(formatErrors(e));
13540
+ throw e;
13541
+ });
13542
+ }),
13543
+ /**
13544
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=delete&version=v1 click to debug }
13545
+ *
13546
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/delete document }
13547
+ *
13548
+ * 删除群菜单。
13549
+ *
13550
+ * 删除群内菜单。
13551
+ *
13552
+ * 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后,将返回群内所有菜单。
13553
+ */
13554
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13555
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13556
+ return httpInstance
13557
+ .request({
13558
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path),
13559
+ method: "DELETE",
13560
+ data,
13561
+ params,
13562
+ headers,
13563
+ })
13564
+ .catch((e) => {
13565
+ this.logger.error(formatErrors(e));
13566
+ throw e;
13567
+ });
13568
+ }),
13569
+ /**
13570
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=get&version=v1 click to debug }
13571
+ *
13572
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/get document }
13573
+ *
13574
+ * 获取群内菜单
13575
+ *
13576
+ * 通过群ID获取群内菜单。
13577
+ *
13578
+ * 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。
13579
+ */
13580
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13581
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13582
+ return httpInstance
13583
+ .request({
13584
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree`, path),
13585
+ method: "GET",
13586
+ data,
13587
+ params,
13588
+ headers,
13589
+ })
13590
+ .catch((e) => {
13591
+ this.logger.error(formatErrors(e));
13592
+ throw e;
13593
+ });
13594
+ }),
13595
+ /**
13596
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=chat.menu_tree&apiName=sort&version=v1 click to debug }
13597
+ *
13598
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/sort document }
13599
+ *
13600
+ * 排序群菜单
13601
+ *
13602
+ * 给一个群内的一级菜单排序。
13603
+ *
13604
+ * 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 机器人必须在群里。;- 操作API后,将返回群内所有菜单。
13605
+ */
13606
+ sort: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13607
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13608
+ return httpInstance
13609
+ .request({
13610
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/chats/:chat_id/menu_tree/sort`, path),
13611
+ method: "POST",
13612
+ data,
13613
+ params,
13614
+ headers,
13615
+ })
13616
+ .catch((e) => {
13617
+ this.logger.error(formatErrors(e));
13618
+ throw e;
13619
+ });
13620
+ }),
13621
+ },
13121
13622
  /**
13122
13623
  * chat.moderation
13123
13624
  */
@@ -14473,6 +14974,46 @@ class Client$1 {
14473
14974
  * 邮件组成员
14474
14975
  */
14475
14976
  mailgroupMember: {
14977
+ /**
14978
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_create&version=v1 click to debug }
14979
+ *
14980
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.member&version=v1 document }
14981
+ */
14982
+ batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
14983
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
14984
+ return httpInstance
14985
+ .request({
14986
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_create`, path),
14987
+ method: "POST",
14988
+ data,
14989
+ params,
14990
+ headers,
14991
+ })
14992
+ .catch((e) => {
14993
+ this.logger.error(formatErrors(e));
14994
+ throw e;
14995
+ });
14996
+ }),
14997
+ /**
14998
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=batch_delete&version=v1 click to debug }
14999
+ *
15000
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.member&version=v1 document }
15001
+ */
15002
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15003
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15004
+ return httpInstance
15005
+ .request({
15006
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/members/batch_delete`, path),
15007
+ method: "DELETE",
15008
+ data,
15009
+ params,
15010
+ headers,
15011
+ })
15012
+ .catch((e) => {
15013
+ this.logger.error(formatErrors(e));
15014
+ throw e;
15015
+ });
15016
+ }),
14476
15017
  /**
14477
15018
  * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.member&apiName=create&version=v1 click to debug }
14478
15019
  *
@@ -14622,6 +15163,46 @@ class Client$1 {
14622
15163
  * 邮件组权限成员
14623
15164
  */
14624
15165
  mailgroupPermissionMember: {
15166
+ /**
15167
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_create&version=v1 click to debug }
15168
+ *
15169
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=mailgroup.permission_member&version=v1 document }
15170
+ */
15171
+ batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15172
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15173
+ return httpInstance
15174
+ .request({
15175
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_create`, path),
15176
+ method: "POST",
15177
+ data,
15178
+ params,
15179
+ headers,
15180
+ })
15181
+ .catch((e) => {
15182
+ this.logger.error(formatErrors(e));
15183
+ throw e;
15184
+ });
15185
+ }),
15186
+ /**
15187
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=batch_delete&version=v1 click to debug }
15188
+ *
15189
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=mailgroup.permission_member&version=v1 document }
15190
+ */
15191
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15192
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15193
+ return httpInstance
15194
+ .request({
15195
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/mailgroups/:mailgroup_id/permission_members/batch_delete`, path),
15196
+ method: "DELETE",
15197
+ data,
15198
+ params,
15199
+ headers,
15200
+ })
15201
+ .catch((e) => {
15202
+ this.logger.error(formatErrors(e));
15203
+ throw e;
15204
+ });
15205
+ }),
14625
15206
  /**
14626
15207
  * {@link https://open.feishu.cn/api-explorer?project=mail&resource=mailgroup.permission_member&apiName=create&version=v1 click to debug }
14627
15208
  *
@@ -15045,6 +15626,46 @@ class Client$1 {
15045
15626
  * 公共邮箱成员
15046
15627
  */
15047
15628
  publicMailboxMember: {
15629
+ /**
15630
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_create&version=v1 click to debug }
15631
+ *
15632
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=mail&resource=public_mailbox.member&version=v1 document }
15633
+ */
15634
+ batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15635
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15636
+ return httpInstance
15637
+ .request({
15638
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_create`, path),
15639
+ method: "POST",
15640
+ data,
15641
+ params,
15642
+ headers,
15643
+ })
15644
+ .catch((e) => {
15645
+ this.logger.error(formatErrors(e));
15646
+ throw e;
15647
+ });
15648
+ }),
15649
+ /**
15650
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=batch_delete&version=v1 click to debug }
15651
+ *
15652
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=mail&resource=public_mailbox.member&version=v1 document }
15653
+ */
15654
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15655
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15656
+ return httpInstance
15657
+ .request({
15658
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/public_mailboxes/:public_mailbox_id/members/batch_delete`, path),
15659
+ method: "DELETE",
15660
+ data,
15661
+ params,
15662
+ headers,
15663
+ })
15664
+ .catch((e) => {
15665
+ this.logger.error(formatErrors(e));
15666
+ throw e;
15667
+ });
15668
+ }),
15048
15669
  /**
15049
15670
  * {@link https://open.feishu.cn/api-explorer?project=mail&resource=public_mailbox.member&apiName=clear&version=v1 click to debug }
15050
15671
  *
@@ -15444,6 +16065,165 @@ class Client$1 {
15444
16065
  return get(res, "data", {});
15445
16066
  }),
15446
16067
  },
16068
+ /**
16069
+ * 指标库
16070
+ */
16071
+ metricSource: {
16072
+ /**
16073
+ * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source&apiName=list&version=v1 click to debug }
16074
+ *
16075
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source/list document }
16076
+ *
16077
+ * 获取指标库
16078
+ *
16079
+ * 获取租户下全部 OKR 指标库(仅限 OKR 企业版使用)
16080
+ */
16081
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
16082
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
16083
+ return httpInstance
16084
+ .request({
16085
+ url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources`, path),
16086
+ method: "GET",
16087
+ data,
16088
+ params,
16089
+ headers,
16090
+ })
16091
+ .catch((e) => {
16092
+ this.logger.error(formatErrors(e));
16093
+ throw e;
16094
+ });
16095
+ }),
16096
+ },
16097
+ /**
16098
+ * 指标项
16099
+ */
16100
+ metricSourceTableItem: {
16101
+ /**
16102
+ * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=batch_update&version=v1 click to debug }
16103
+ *
16104
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/batch_update document }
16105
+ *
16106
+ * 批量更新指标项
16107
+ *
16108
+ * - 该接口用于批量更新多项指标,单次调用最多更新 100 条记录。接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
16109
+ */
16110
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
16111
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
16112
+ return httpInstance
16113
+ .request({
16114
+ url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/batch_update`, path),
16115
+ method: "PATCH",
16116
+ data,
16117
+ params,
16118
+ headers,
16119
+ })
16120
+ .catch((e) => {
16121
+ this.logger.error(formatErrors(e));
16122
+ throw e;
16123
+ });
16124
+ }),
16125
+ /**
16126
+ * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=get&version=v1 click to debug }
16127
+ *
16128
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/get document }
16129
+ *
16130
+ * 获取指标项详情
16131
+ *
16132
+ * 获取某项指标的具体内容(仅限 OKR 企业版使用)
16133
+ */
16134
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
16135
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
16136
+ return httpInstance
16137
+ .request({
16138
+ url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
16139
+ method: "GET",
16140
+ data,
16141
+ params,
16142
+ headers,
16143
+ })
16144
+ .catch((e) => {
16145
+ this.logger.error(formatErrors(e));
16146
+ throw e;
16147
+ });
16148
+ }),
16149
+ /**
16150
+ * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=list&version=v1 click to debug }
16151
+ *
16152
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/list document }
16153
+ *
16154
+ * 获取指标项
16155
+ *
16156
+ * 获取指定指标表下的所有指标项(仅限 OKR 企业版使用)
16157
+ */
16158
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
16159
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
16160
+ return httpInstance
16161
+ .request({
16162
+ url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items`, path),
16163
+ method: "GET",
16164
+ data,
16165
+ params,
16166
+ headers,
16167
+ })
16168
+ .catch((e) => {
16169
+ this.logger.error(formatErrors(e));
16170
+ throw e;
16171
+ });
16172
+ }),
16173
+ /**
16174
+ * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=patch&version=v1 click to debug }
16175
+ *
16176
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/patch document }
16177
+ *
16178
+ * 更新指标项
16179
+ *
16180
+ * - 该接口用于更新某项指标,接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
16181
+ */
16182
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
16183
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
16184
+ return httpInstance
16185
+ .request({
16186
+ url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
16187
+ method: "PATCH",
16188
+ data,
16189
+ params,
16190
+ headers,
16191
+ })
16192
+ .catch((e) => {
16193
+ this.logger.error(formatErrors(e));
16194
+ throw e;
16195
+ });
16196
+ }),
16197
+ },
16198
+ /**
16199
+ * 指标表
16200
+ */
16201
+ metricSourceTable: {
16202
+ /**
16203
+ * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table&apiName=list&version=v1 click to debug }
16204
+ *
16205
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table/list document }
16206
+ *
16207
+ * 获取指标表
16208
+ *
16209
+ * 获取指定指标库下有哪些指标表(仅限 OKR 企业版使用)
16210
+ */
16211
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
16212
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
16213
+ return httpInstance
16214
+ .request({
16215
+ url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables`, path),
16216
+ method: "GET",
16217
+ data,
16218
+ params,
16219
+ headers,
16220
+ })
16221
+ .catch((e) => {
16222
+ this.logger.error(formatErrors(e));
16223
+ throw e;
16224
+ });
16225
+ }),
16226
+ },
15447
16227
  /**
15448
16228
  * OKR
15449
16229
  */
@@ -16538,7 +17318,7 @@ class Client$1 {
16538
17318
  }),
16539
17319
  },
16540
17320
  /**
16541
- * 单元格
17321
+ * 工作表
16542
17322
  */
16543
17323
  spreadsheetSheet: {
16544
17324
  /**
@@ -17794,83 +18574,6 @@ class Client$1 {
17794
18574
  * 视频会议
17795
18575
  */
17796
18576
  this.vc = {
17797
- /**
17798
- * 告警中心
17799
- */
17800
- alert: {
17801
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
17802
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
17803
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
17804
- const res = yield httpInstance
17805
- .request({
17806
- url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path),
17807
- method: "GET",
17808
- headers: pickBy(innerPayload.headers, identity),
17809
- params: pickBy(innerPayload.params, identity),
17810
- })
17811
- .catch((e) => {
17812
- this.logger.error(formatErrors(e));
17813
- });
17814
- return res;
17815
- });
17816
- const Iterable = {
17817
- [Symbol.asyncIterator]() {
17818
- return __asyncGenerator(this, arguments, function* _a() {
17819
- let hasMore = true;
17820
- let pageToken;
17821
- while (hasMore) {
17822
- try {
17823
- const res = yield __await(sendRequest({
17824
- headers,
17825
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
17826
- data,
17827
- }));
17828
- const _b = get(res, "data") || {}, {
17829
- // @ts-ignore
17830
- has_more,
17831
- // @ts-ignore
17832
- page_token,
17833
- // @ts-ignore
17834
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
17835
- yield yield __await(rest);
17836
- hasMore = Boolean(has_more);
17837
- pageToken = page_token || next_page_token;
17838
- }
17839
- catch (e) {
17840
- yield yield __await(null);
17841
- break;
17842
- }
17843
- }
17844
- });
17845
- },
17846
- };
17847
- return Iterable;
17848
- }),
17849
- /**
17850
- * {@link https://open.feishu.cn/api-explorer?project=vc&resource=alert&apiName=list&version=v1 click to debug }
17851
- *
17852
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list document }
17853
- *
17854
- * 获取告警记录
17855
- *
17856
- * 获取特定条件下租户的设备告警记录
17857
- */
17858
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
17859
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
17860
- return httpInstance
17861
- .request({
17862
- url: fillApiPath(`${this.domain}/open-apis/vc/v1/alerts`, path),
17863
- method: "GET",
17864
- data,
17865
- params,
17866
- headers,
17867
- })
17868
- .catch((e) => {
17869
- this.logger.error(formatErrors(e));
17870
- throw e;
17871
- });
17872
- }),
17873
- },
17874
18577
  /**
17875
18578
  * 导出
17876
18579
  */