@larksuiteoapi/node-sdk 1.14.0 → 1.16.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
@@ -585,7 +585,7 @@ class Client$1 {
585
585
  },
586
586
  };
587
587
  /**
588
- * 管理后台-密码
588
+ * 管理后台-数据报表
589
589
  */
590
590
  this.admin = {
591
591
  /**
@@ -1148,6 +1148,28 @@ class Client$1 {
1148
1148
  * 事件
1149
1149
  */
1150
1150
  applicationAppVersion: {
1151
+ /**
1152
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=contacts_range_suggest&version=v6 click to debug }
1153
+ *
1154
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_suggest&project=application&resource=application.app_version&version=v6 document }
1155
+ *
1156
+ * 获取应用版本通讯录权限范围建议
1157
+ */
1158
+ contactsRangeSuggest: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1159
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1160
+ return this.httpInstance
1161
+ .request({
1162
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`, path),
1163
+ method: "GET",
1164
+ data,
1165
+ params,
1166
+ headers,
1167
+ })
1168
+ .catch((e) => {
1169
+ this.logger.error(formatErrors(e));
1170
+ throw e;
1171
+ });
1172
+ }),
1151
1173
  /**
1152
1174
  * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=get&version=v6 click to debug }
1153
1175
  *
@@ -1270,23 +1292,19 @@ class Client$1 {
1270
1292
  }),
1271
1293
  },
1272
1294
  /**
1273
- * 应用反馈
1295
+ * 应用
1274
1296
  */
1275
- applicationFeedback: {
1297
+ application: {
1276
1298
  /**
1277
- * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=list&version=v6 click to debug }
1278
- *
1279
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list document }
1299
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
1280
1300
  *
1281
- * 获取应用反馈列表
1282
- *
1283
- * 查询应用的反馈数据
1301
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
1284
1302
  */
1285
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1303
+ contactsRangeConfiguration: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1286
1304
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
1287
1305
  return this.httpInstance
1288
1306
  .request({
1289
- url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`, path),
1307
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path),
1290
1308
  method: "GET",
1291
1309
  data,
1292
1310
  params,
@@ -1297,35 +1315,6 @@ class Client$1 {
1297
1315
  throw e;
1298
1316
  });
1299
1317
  }),
1300
- /**
1301
- * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=patch&version=v6 click to debug }
1302
- *
1303
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch document }
1304
- *
1305
- * 更新应用反馈
1306
- *
1307
- * 更新应用的反馈数据
1308
- */
1309
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1310
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
1311
- return this.httpInstance
1312
- .request({
1313
- url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`, path),
1314
- method: "PATCH",
1315
- data,
1316
- params,
1317
- headers,
1318
- })
1319
- .catch((e) => {
1320
- this.logger.error(formatErrors(e));
1321
- throw e;
1322
- });
1323
- }),
1324
- },
1325
- /**
1326
- * 应用
1327
- */
1328
- application: {
1329
1318
  /**
1330
1319
  * {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
1331
1320
  *
@@ -1447,13 +1436,91 @@ class Client$1 {
1447
1436
  });
1448
1437
  }),
1449
1438
  },
1439
+ /**
1440
+ * 应用反馈
1441
+ */
1442
+ applicationFeedback: {
1443
+ /**
1444
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=list&version=v6 click to debug }
1445
+ *
1446
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list document }
1447
+ *
1448
+ * 获取应用反馈列表
1449
+ *
1450
+ * 查询应用的反馈数据
1451
+ */
1452
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1453
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1454
+ return this.httpInstance
1455
+ .request({
1456
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`, path),
1457
+ method: "GET",
1458
+ data,
1459
+ params,
1460
+ headers,
1461
+ })
1462
+ .catch((e) => {
1463
+ this.logger.error(formatErrors(e));
1464
+ throw e;
1465
+ });
1466
+ }),
1467
+ /**
1468
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=patch&version=v6 click to debug }
1469
+ *
1470
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch document }
1471
+ *
1472
+ * 更新应用反馈
1473
+ *
1474
+ * 更新应用的反馈数据
1475
+ */
1476
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1477
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1478
+ return this.httpInstance
1479
+ .request({
1480
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`, path),
1481
+ method: "PATCH",
1482
+ data,
1483
+ params,
1484
+ headers,
1485
+ })
1486
+ .catch((e) => {
1487
+ this.logger.error(formatErrors(e));
1488
+ throw e;
1489
+ });
1490
+ }),
1491
+ },
1492
+ /**
1493
+ * 事件
1494
+ */
1495
+ applicationVisibility: {
1496
+ /**
1497
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=check_white_black_list&version=v6 click to debug }
1498
+ *
1499
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=check_white_black_list&project=application&resource=application.visibility&version=v6 document }
1500
+ */
1501
+ checkWhiteBlackList: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1502
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1503
+ return this.httpInstance
1504
+ .request({
1505
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`, path),
1506
+ method: "POST",
1507
+ data,
1508
+ params,
1509
+ headers,
1510
+ })
1511
+ .catch((e) => {
1512
+ this.logger.error(formatErrors(e));
1513
+ throw e;
1514
+ });
1515
+ }),
1516
+ },
1450
1517
  };
1451
1518
  /**
1452
1519
  * 审批
1453
1520
  */
1454
1521
  this.approval = {
1455
1522
  /**
1456
- * 事件
1523
+ * 原生审批定义
1457
1524
  */
1458
1525
  approval: {
1459
1526
  /**
@@ -4031,6 +4098,26 @@ class Client$1 {
4031
4098
  * 多维表格
4032
4099
  */
4033
4100
  app: {
4101
+ /**
4102
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=copy&version=v1 click to debug }
4103
+ *
4104
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=copy&project=bitable&resource=app&version=v1 document }
4105
+ */
4106
+ copy: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4107
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4108
+ return this.httpInstance
4109
+ .request({
4110
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`, path),
4111
+ method: "POST",
4112
+ data,
4113
+ params,
4114
+ headers,
4115
+ })
4116
+ .catch((e) => {
4117
+ this.logger.error(formatErrors(e));
4118
+ throw e;
4119
+ });
4120
+ }),
4034
4121
  /**
4035
4122
  * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=create&version=v1 click to debug }
4036
4123
  *
@@ -8846,6 +8933,32 @@ class Client$1 {
8846
8933
  throw e;
8847
8934
  });
8848
8935
  }),
8936
+ /**
8937
+ * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=resurrect&version=v3 click to debug }
8938
+ *
8939
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/resurrect document }
8940
+ *
8941
+ * 恢复已删除用户
8942
+ *
8943
+ * 该接口用于恢复已删除用户(已离职的成员),仅自建应用可申请,应用商店应用无权调用接口。
8944
+ *
8945
+ * - 仅支持恢复离职 30 天内的成员。恢复后,部分用户数据仍不可恢复,请谨慎调用。;- 待恢复成员的用户 ID 不能被企业内其他成员使用。如有重复,请先离职对应的成员,否则接口会报错。;- 待恢复成员的手机号和邮箱不能被企业内其他成员使用。如有重复,请先修改对应成员的信息,否则接口会报错。
8946
+ */
8947
+ resurrect: (payload, options) => __awaiter(this, void 0, void 0, function* () {
8948
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
8949
+ return this.httpInstance
8950
+ .request({
8951
+ url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`, path),
8952
+ method: "POST",
8953
+ data,
8954
+ params,
8955
+ headers,
8956
+ })
8957
+ .catch((e) => {
8958
+ this.logger.error(formatErrors(e));
8959
+ throw e;
8960
+ });
8961
+ }),
8849
8962
  /**
8850
8963
  * {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=update&version=v3 click to debug }
8851
8964
  *
@@ -9317,7 +9430,7 @@ class Client$1 {
9317
9430
  },
9318
9431
  };
9319
9432
  /**
9320
- * 云文档-文档
9433
+ * 云文档-文件管理
9321
9434
  */
9322
9435
  this.drive = {
9323
9436
  /**
@@ -9416,6 +9529,30 @@ class Client$1 {
9416
9529
  * 评论
9417
9530
  */
9418
9531
  fileComment: {
9532
+ /**
9533
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=batch_query&version=v1 click to debug }
9534
+ *
9535
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query document }
9536
+ *
9537
+ * 批量获取评论
9538
+ *
9539
+ * 该接口用于根据评论 ID 列表批量获取评论。
9540
+ */
9541
+ batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9542
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9543
+ return this.httpInstance
9544
+ .request({
9545
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`, path),
9546
+ method: "POST",
9547
+ data,
9548
+ params,
9549
+ headers,
9550
+ })
9551
+ .catch((e) => {
9552
+ this.logger.error(formatErrors(e));
9553
+ throw e;
9554
+ });
9555
+ }),
9419
9556
  /**
9420
9557
  * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=create&version=v1 click to debug }
9421
9558
  *
@@ -9615,7 +9752,7 @@ class Client$1 {
9615
9752
  }),
9616
9753
  },
9617
9754
  /**
9618
- * 分片上传
9755
+ * 文件
9619
9756
  */
9620
9757
  file: {
9621
9758
  /**
@@ -9670,6 +9807,26 @@ class Client$1 {
9670
9807
  throw e;
9671
9808
  });
9672
9809
  }),
9810
+ /**
9811
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=create_shortcut&version=v1 click to debug }
9812
+ *
9813
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_shortcut&project=drive&resource=file&version=v1 document }
9814
+ */
9815
+ createShortcut: (payload, options) => __awaiter(this, void 0, void 0, function* () {
9816
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
9817
+ return this.httpInstance
9818
+ .request({
9819
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/create_shortcut`, path),
9820
+ method: "POST",
9821
+ data,
9822
+ params,
9823
+ headers,
9824
+ })
9825
+ .catch((e) => {
9826
+ this.logger.error(formatErrors(e));
9827
+ throw e;
9828
+ });
9829
+ }),
9673
9830
  /**
9674
9831
  * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=delete&version=v1 click to debug }
9675
9832
  *
@@ -10351,7 +10508,7 @@ class Client$1 {
10351
10508
  }),
10352
10509
  },
10353
10510
  /**
10354
- * 素材
10511
+ * 分片上传
10355
10512
  */
10356
10513
  media: {
10357
10514
  /**
@@ -10759,66 +10916,131 @@ class Client$1 {
10759
10916
  });
10760
10917
  }),
10761
10918
  },
10762
- };
10763
- /**
10764
-
10765
- */
10766
- this.edu = {};
10767
- /**
10768
- * 智能人事
10769
- */
10770
- this.ehr = {
10771
10919
  /**
10772
- * 飞书人事(标准版)
10920
+ * permission.public.password
10773
10921
  */
10774
- attachment: {
10922
+ permissionPublicPassword: {
10775
10923
  /**
10776
- * {@link https://open.feishu.cn/api-explorer?project=ehr&resource=attachment&apiName=get&version=v1 click to debug }
10777
- *
10778
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get document }
10779
- *
10780
- * 下载附件
10781
- *
10782
- * 根据文件 token 下载文件。;;调用 「批量获取员工花名册信息」接口的返回值中,「文件」类型的字段 id,即是文件 token
10924
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=create&version=v1 click to debug }
10783
10925
  *
10784
- * ![image.png](//sf1-ttcdn-tos.pstatp.com/obj/open-platform-opendoc/bed391d2a8ce6ed2d5985ea69bf92850_9GY1mnuDXP.png)
10926
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=drive&resource=permission.public.password&version=v1 document }
10785
10927
  */
10786
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10928
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10787
10929
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
10788
- const res = yield this.httpInstance
10930
+ return this.httpInstance
10789
10931
  .request({
10790
- url: fillApiPath(`${this.domain}/open-apis/ehr/v1/attachments/:token`, path),
10791
- method: "GET",
10792
- headers,
10932
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path),
10933
+ method: "POST",
10793
10934
  data,
10794
10935
  params,
10795
- responseType: "stream",
10936
+ headers,
10796
10937
  })
10797
10938
  .catch((e) => {
10798
10939
  this.logger.error(formatErrors(e));
10799
10940
  throw e;
10800
10941
  });
10801
- return {
10802
- writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
10803
- return new Promise((resolve, reject) => {
10804
- const writableStream = fs__default["default"].createWriteStream(filePath);
10805
- writableStream.on("finish", () => {
10806
- resolve(filePath);
10807
- });
10808
- writableStream.on("error", (e) => {
10809
- reject(e);
10810
- });
10811
- res.pipe(writableStream);
10812
- });
10813
- }),
10814
- };
10815
10942
  }),
10816
- },
10817
- /**
10818
- * 飞书人事(标准版)
10819
- */
10820
- employee: {
10821
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10943
+ /**
10944
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=delete&version=v1 click to debug }
10945
+ *
10946
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=drive&resource=permission.public.password&version=v1 document }
10947
+ */
10948
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10949
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
10950
+ return this.httpInstance
10951
+ .request({
10952
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path),
10953
+ method: "DELETE",
10954
+ data,
10955
+ params,
10956
+ headers,
10957
+ })
10958
+ .catch((e) => {
10959
+ this.logger.error(formatErrors(e));
10960
+ throw e;
10961
+ });
10962
+ }),
10963
+ /**
10964
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=update&version=v1 click to debug }
10965
+ *
10966
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=drive&resource=permission.public.password&version=v1 document }
10967
+ */
10968
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10969
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
10970
+ return this.httpInstance
10971
+ .request({
10972
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path),
10973
+ method: "PUT",
10974
+ data,
10975
+ params,
10976
+ headers,
10977
+ })
10978
+ .catch((e) => {
10979
+ this.logger.error(formatErrors(e));
10980
+ throw e;
10981
+ });
10982
+ }),
10983
+ },
10984
+ };
10985
+ /**
10986
+
10987
+ */
10988
+ this.edu = {};
10989
+ /**
10990
+ * 智能人事
10991
+ */
10992
+ this.ehr = {
10993
+ /**
10994
+ * 飞书人事(标准版)
10995
+ */
10996
+ attachment: {
10997
+ /**
10998
+ * {@link https://open.feishu.cn/api-explorer?project=ehr&resource=attachment&apiName=get&version=v1 click to debug }
10999
+ *
11000
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get document }
11001
+ *
11002
+ * 下载附件
11003
+ *
11004
+ * 根据文件 token 下载文件。;;调用 「批量获取员工花名册信息」接口的返回值中,「文件」类型的字段 id,即是文件 token
11005
+ *
11006
+ * ![image.png](//sf1-ttcdn-tos.pstatp.com/obj/open-platform-opendoc/bed391d2a8ce6ed2d5985ea69bf92850_9GY1mnuDXP.png)
11007
+ */
11008
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
11009
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
11010
+ const res = yield this.httpInstance
11011
+ .request({
11012
+ url: fillApiPath(`${this.domain}/open-apis/ehr/v1/attachments/:token`, path),
11013
+ method: "GET",
11014
+ headers,
11015
+ data,
11016
+ params,
11017
+ responseType: "stream",
11018
+ })
11019
+ .catch((e) => {
11020
+ this.logger.error(formatErrors(e));
11021
+ throw e;
11022
+ });
11023
+ return {
11024
+ writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
11025
+ return new Promise((resolve, reject) => {
11026
+ const writableStream = fs__default["default"].createWriteStream(filePath);
11027
+ writableStream.on("finish", () => {
11028
+ resolve(filePath);
11029
+ });
11030
+ writableStream.on("error", (e) => {
11031
+ reject(e);
11032
+ });
11033
+ res.pipe(writableStream);
11034
+ });
11035
+ }),
11036
+ };
11037
+ }),
11038
+ },
11039
+ /**
11040
+ * 飞书人事(标准版)
11041
+ */
11042
+ employee: {
11043
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10822
11044
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
10823
11045
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
10824
11046
  const res = yield this.httpInstance
@@ -12891,6 +13113,122 @@ class Client$1 {
12891
13113
  });
12892
13114
  }),
12893
13115
  },
13116
+ /**
13117
+ * 导入外部系统信息(灰度租户可见)
13118
+ */
13119
+ externalApplication: {
13120
+ /**
13121
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=create&version=v1 click to debug }
13122
+ *
13123
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/create document }
13124
+ *
13125
+ * 创建外部投递
13126
+ *
13127
+ * 导入来自其他系统的投递信息,创建为外部投递
13128
+ */
13129
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13130
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13131
+ return this.httpInstance
13132
+ .request({
13133
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path),
13134
+ method: "POST",
13135
+ data,
13136
+ params,
13137
+ headers,
13138
+ })
13139
+ .catch((e) => {
13140
+ this.logger.error(formatErrors(e));
13141
+ throw e;
13142
+ });
13143
+ }),
13144
+ },
13145
+ /**
13146
+ * 导入外部系统信息(灰度租户可见)
13147
+ */
13148
+ externalBackgroundCheck: {
13149
+ /**
13150
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=create&version=v1 click to debug }
13151
+ *
13152
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/create document }
13153
+ *
13154
+ * 创建外部背调
13155
+ *
13156
+ * 导入来自其他系统的背调信息,创建为外部背调
13157
+ */
13158
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13159
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13160
+ return this.httpInstance
13161
+ .request({
13162
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks`, path),
13163
+ method: "POST",
13164
+ data,
13165
+ params,
13166
+ headers,
13167
+ })
13168
+ .catch((e) => {
13169
+ this.logger.error(formatErrors(e));
13170
+ throw e;
13171
+ });
13172
+ }),
13173
+ },
13174
+ /**
13175
+ * 导入外部系统信息(灰度租户可见)
13176
+ */
13177
+ externalInterview: {
13178
+ /**
13179
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=create&version=v1 click to debug }
13180
+ *
13181
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/create document }
13182
+ *
13183
+ * 创建外部面试
13184
+ *
13185
+ * 导入来自其他系统的面试信息,创建为外部面试
13186
+ */
13187
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13188
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13189
+ return this.httpInstance
13190
+ .request({
13191
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews`, path),
13192
+ method: "POST",
13193
+ data,
13194
+ params,
13195
+ headers,
13196
+ })
13197
+ .catch((e) => {
13198
+ this.logger.error(formatErrors(e));
13199
+ throw e;
13200
+ });
13201
+ }),
13202
+ },
13203
+ /**
13204
+ * 导入外部系统信息(灰度租户可见)
13205
+ */
13206
+ externalInterviewAssessment: {
13207
+ /**
13208
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=create&version=v1 click to debug }
13209
+ *
13210
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview_assessment/create document }
13211
+ *
13212
+ * 创建外部面评
13213
+ *
13214
+ * 导入来自其他系统的面评信息,创建为外部面评
13215
+ */
13216
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13217
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13218
+ return this.httpInstance
13219
+ .request({
13220
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments`, path),
13221
+ method: "POST",
13222
+ data,
13223
+ params,
13224
+ headers,
13225
+ })
13226
+ .catch((e) => {
13227
+ this.logger.error(formatErrors(e));
13228
+ throw e;
13229
+ });
13230
+ }),
13231
+ },
12894
13232
  /**
12895
13233
  * 职位
12896
13234
  */
@@ -13310,6 +13648,30 @@ class Client$1 {
13310
13648
  * 人才
13311
13649
  */
13312
13650
  talent: {
13651
+ /**
13652
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=add_to_folder&version=v1 click to debug }
13653
+ *
13654
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/add_to_folder document }
13655
+ *
13656
+ * 将人才加入指定文件夹
13657
+ *
13658
+ * 将人才加入指定文件夹
13659
+ */
13660
+ addToFolder: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13661
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13662
+ return this.httpInstance
13663
+ .request({
13664
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`, path),
13665
+ method: "POST",
13666
+ data,
13667
+ params,
13668
+ headers,
13669
+ })
13670
+ .catch((e) => {
13671
+ this.logger.error(formatErrors(e));
13672
+ throw e;
13673
+ });
13674
+ }),
13313
13675
  /**
13314
13676
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=batch_get_id&version=v1 click to debug }
13315
13677
  *
@@ -13359,6 +13721,83 @@ class Client$1 {
13359
13721
  });
13360
13722
  }),
13361
13723
  },
13724
+ /**
13725
+ * talent_folder
13726
+ */
13727
+ talentFolder: {
13728
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13729
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13730
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
13731
+ const res = yield this.httpInstance
13732
+ .request({
13733
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path),
13734
+ method: "GET",
13735
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
13736
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
13737
+ })
13738
+ .catch((e) => {
13739
+ this.logger.error(formatErrors(e));
13740
+ });
13741
+ return res;
13742
+ });
13743
+ const Iterable = {
13744
+ [Symbol.asyncIterator]() {
13745
+ return __asyncGenerator(this, arguments, function* _a() {
13746
+ let hasMore = true;
13747
+ let pageToken;
13748
+ while (hasMore) {
13749
+ try {
13750
+ const res = yield __await(sendRequest({
13751
+ headers,
13752
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
13753
+ data,
13754
+ }));
13755
+ const _b = get__default["default"](res, "data") || {}, {
13756
+ // @ts-ignore
13757
+ has_more,
13758
+ // @ts-ignore
13759
+ page_token,
13760
+ // @ts-ignore
13761
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
13762
+ yield yield __await(rest);
13763
+ hasMore = Boolean(has_more);
13764
+ pageToken = page_token || next_page_token;
13765
+ }
13766
+ catch (e) {
13767
+ yield yield __await(null);
13768
+ break;
13769
+ }
13770
+ }
13771
+ });
13772
+ },
13773
+ };
13774
+ return Iterable;
13775
+ }),
13776
+ /**
13777
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_folder&apiName=list&version=v1 click to debug }
13778
+ *
13779
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_folder/list document }
13780
+ *
13781
+ * 获取人才文件夹信息
13782
+ *
13783
+ * 用于获取招聘系统中人才文件夹信息
13784
+ */
13785
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13786
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13787
+ return this.httpInstance
13788
+ .request({
13789
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path),
13790
+ method: "GET",
13791
+ data,
13792
+ params,
13793
+ headers,
13794
+ })
13795
+ .catch((e) => {
13796
+ this.logger.error(formatErrors(e));
13797
+ throw e;
13798
+ });
13799
+ }),
13800
+ },
13362
13801
  };
13363
13802
  /**
13364
13803
  * 实名认证
@@ -14647,7 +15086,7 @@ class Client$1 {
14647
15086
  }),
14648
15087
  },
14649
15088
  /**
14650
- * 消息
15089
+ * 消息加急
14651
15090
  */
14652
15091
  message: {
14653
15092
  /**
@@ -14966,6 +15405,70 @@ class Client$1 {
14966
15405
  throw e;
14967
15406
  });
14968
15407
  }),
15408
+ /**
15409
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=create&version=v1 click to debug }
15410
+ *
15411
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create document }
15412
+ *
15413
+ * 通过模版消息卡片发送消息
15414
+ *
15415
+ * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 给用户发送消息,需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 给群组发送消息,需要机器人在群组中
15416
+ */
15417
+ createByCard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15418
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15419
+ const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
15420
+ const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
15421
+ type: "template",
15422
+ data: {
15423
+ template_id: template_id,
15424
+ template_variable: template_variable,
15425
+ },
15426
+ }) }, rest);
15427
+ return this.httpInstance
15428
+ .request({
15429
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path),
15430
+ method: "POST",
15431
+ data: targetData,
15432
+ params,
15433
+ headers,
15434
+ })
15435
+ .catch((e) => {
15436
+ this.logger.error(formatErrors(e));
15437
+ throw e;
15438
+ });
15439
+ }),
15440
+ /**
15441
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=reply&version=v1 click to debug }
15442
+ *
15443
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply document }
15444
+ *
15445
+ * 通过模版消息卡片回复消息
15446
+ *
15447
+ * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 回复私聊消息,需要机器人对用户有[可用性](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability);- 回复群组消息,需要机器人在群中
15448
+ */
15449
+ replyByCard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
15450
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
15451
+ const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
15452
+ const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
15453
+ type: "template",
15454
+ data: {
15455
+ template_id: template_id,
15456
+ template_variable: template_variable,
15457
+ },
15458
+ }) }, rest);
15459
+ return this.httpInstance
15460
+ .request({
15461
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`, path),
15462
+ method: "POST",
15463
+ data: targetData,
15464
+ params,
15465
+ headers,
15466
+ })
15467
+ .catch((e) => {
15468
+ this.logger.error(formatErrors(e));
15469
+ throw e;
15470
+ });
15471
+ }),
14969
15472
  },
14970
15473
  /**
14971
15474
  * 消息 - 表情回复
@@ -17093,6 +17596,31 @@ class Client$1 {
17093
17596
  * 搜索
17094
17597
  */
17095
17598
  this.search = {
17599
+ /**
17600
+ * app
17601
+ */
17602
+ app: {
17603
+ /**
17604
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=app&apiName=create&version=v2 click to debug }
17605
+ *
17606
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=app&version=v2 document }
17607
+ */
17608
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
17609
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
17610
+ return this.httpInstance
17611
+ .request({
17612
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/app`, path),
17613
+ method: "POST",
17614
+ data,
17615
+ params,
17616
+ headers,
17617
+ })
17618
+ .catch((e) => {
17619
+ this.logger.error(formatErrors(e));
17620
+ throw e;
17621
+ });
17622
+ }),
17623
+ },
17096
17624
  /**
17097
17625
  * 数据源
17098
17626
  */
@@ -17343,6 +17871,31 @@ class Client$1 {
17343
17871
  });
17344
17872
  }),
17345
17873
  },
17874
+ /**
17875
+ * message
17876
+ */
17877
+ message: {
17878
+ /**
17879
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=message&apiName=create&version=v2 click to debug }
17880
+ *
17881
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=message&version=v2 document }
17882
+ */
17883
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
17884
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
17885
+ return this.httpInstance
17886
+ .request({
17887
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/message`, path),
17888
+ method: "POST",
17889
+ data,
17890
+ params,
17891
+ headers,
17892
+ })
17893
+ .catch((e) => {
17894
+ this.logger.error(formatErrors(e));
17895
+ throw e;
17896
+ });
17897
+ }),
17898
+ },
17346
17899
  /**
17347
17900
  * 数据范式
17348
17901
  */
@@ -17898,7 +18451,7 @@ class Client$1 {
17898
18451
  }),
17899
18452
  },
17900
18453
  /**
17901
- * 单元格
18454
+ * 工作表
17902
18455
  */
17903
18456
  spreadsheetSheet: {
17904
18457
  /**
@@ -22042,6 +22595,33 @@ const adaptKoaRouter = (dispatcher, options) => (ctx, next) => __awaiter(void 0,
22042
22595
  yield next();
22043
22596
  });
22044
22597
 
22598
+ const defaultCard = (variables) => {
22599
+ const { title, content } = variables;
22600
+ return JSON.stringify({
22601
+ "config": {
22602
+ "wide_screen_mode": true
22603
+ },
22604
+ "elements": [
22605
+ {
22606
+ "tag": "markdown",
22607
+ "content": content
22608
+ }
22609
+ ],
22610
+ "header": {
22611
+ "template": "blue",
22612
+ "title": {
22613
+ "content": title,
22614
+ "tag": "plain_text"
22615
+ }
22616
+ }
22617
+ });
22618
+ };
22619
+
22620
+ var messageCard = /*#__PURE__*/Object.freeze({
22621
+ __proto__: null,
22622
+ defaultCard: defaultCard
22623
+ });
22624
+
22045
22625
  exports.AESCipher = AESCipher;
22046
22626
  exports.CAppTicket = CAppTicket;
22047
22627
  exports.CTenantAccessToken = CTenantAccessToken;
@@ -22054,6 +22634,7 @@ exports.adaptKoa = adaptKoa;
22054
22634
  exports.adaptKoaRouter = adaptKoaRouter;
22055
22635
  exports.defaultHttpInstance = defaultHttpInstance;
22056
22636
  exports.generateChallenge = generateChallenge;
22637
+ exports.messageCard = messageCard;
22057
22638
  exports.withAll = withAll;
22058
22639
  exports.withHelpDeskCredential = withHelpDeskCredential;
22059
22640
  exports.withTenantKey = withTenantKey;