@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/README.md +68 -0
- package/README.zh.md +69 -0
- package/es/index.js +672 -92
- package/lib/index.js +672 -91
- package/package.json +1 -1
- package/types/index.d.ts +1042 -83
package/es/index.js
CHANGED
|
@@ -570,7 +570,7 @@ class Client$1 {
|
|
|
570
570
|
},
|
|
571
571
|
};
|
|
572
572
|
/**
|
|
573
|
-
*
|
|
573
|
+
* 管理后台-数据报表
|
|
574
574
|
*/
|
|
575
575
|
this.admin = {
|
|
576
576
|
/**
|
|
@@ -1133,6 +1133,28 @@ class Client$1 {
|
|
|
1133
1133
|
* 事件
|
|
1134
1134
|
*/
|
|
1135
1135
|
applicationAppVersion: {
|
|
1136
|
+
/**
|
|
1137
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=contacts_range_suggest&version=v6 click to debug }
|
|
1138
|
+
*
|
|
1139
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_suggest&project=application&resource=application.app_version&version=v6 document }
|
|
1140
|
+
*
|
|
1141
|
+
* 获取应用版本通讯录权限范围建议
|
|
1142
|
+
*/
|
|
1143
|
+
contactsRangeSuggest: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1144
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1145
|
+
return this.httpInstance
|
|
1146
|
+
.request({
|
|
1147
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/app_versions/:version_id/contacts_range_suggest`, path),
|
|
1148
|
+
method: "GET",
|
|
1149
|
+
data,
|
|
1150
|
+
params,
|
|
1151
|
+
headers,
|
|
1152
|
+
})
|
|
1153
|
+
.catch((e) => {
|
|
1154
|
+
this.logger.error(formatErrors(e));
|
|
1155
|
+
throw e;
|
|
1156
|
+
});
|
|
1157
|
+
}),
|
|
1136
1158
|
/**
|
|
1137
1159
|
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.app_version&apiName=get&version=v6 click to debug }
|
|
1138
1160
|
*
|
|
@@ -1255,23 +1277,19 @@ class Client$1 {
|
|
|
1255
1277
|
}),
|
|
1256
1278
|
},
|
|
1257
1279
|
/**
|
|
1258
|
-
*
|
|
1280
|
+
* 应用
|
|
1259
1281
|
*/
|
|
1260
|
-
|
|
1282
|
+
application: {
|
|
1261
1283
|
/**
|
|
1262
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application
|
|
1263
|
-
*
|
|
1264
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list document }
|
|
1284
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=contacts_range_configuration&version=v6 click to debug }
|
|
1265
1285
|
*
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1268
|
-
* 查询应用的反馈数据
|
|
1286
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=contacts_range_configuration&project=application&resource=application&version=v6 document }
|
|
1269
1287
|
*/
|
|
1270
|
-
|
|
1288
|
+
contactsRangeConfiguration: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1271
1289
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1272
1290
|
return this.httpInstance
|
|
1273
1291
|
.request({
|
|
1274
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/
|
|
1292
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range_configuration`, path),
|
|
1275
1293
|
method: "GET",
|
|
1276
1294
|
data,
|
|
1277
1295
|
params,
|
|
@@ -1282,35 +1300,6 @@ class Client$1 {
|
|
|
1282
1300
|
throw e;
|
|
1283
1301
|
});
|
|
1284
1302
|
}),
|
|
1285
|
-
/**
|
|
1286
|
-
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=patch&version=v6 click to debug }
|
|
1287
|
-
*
|
|
1288
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch document }
|
|
1289
|
-
*
|
|
1290
|
-
* 更新应用反馈
|
|
1291
|
-
*
|
|
1292
|
-
* 更新应用的反馈数据
|
|
1293
|
-
*/
|
|
1294
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1295
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1296
|
-
return this.httpInstance
|
|
1297
|
-
.request({
|
|
1298
|
-
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`, path),
|
|
1299
|
-
method: "PATCH",
|
|
1300
|
-
data,
|
|
1301
|
-
params,
|
|
1302
|
-
headers,
|
|
1303
|
-
})
|
|
1304
|
-
.catch((e) => {
|
|
1305
|
-
this.logger.error(formatErrors(e));
|
|
1306
|
-
throw e;
|
|
1307
|
-
});
|
|
1308
|
-
}),
|
|
1309
|
-
},
|
|
1310
|
-
/**
|
|
1311
|
-
* 应用
|
|
1312
|
-
*/
|
|
1313
|
-
application: {
|
|
1314
1303
|
/**
|
|
1315
1304
|
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application&apiName=get&version=v6 click to debug }
|
|
1316
1305
|
*
|
|
@@ -1432,13 +1421,91 @@ class Client$1 {
|
|
|
1432
1421
|
});
|
|
1433
1422
|
}),
|
|
1434
1423
|
},
|
|
1424
|
+
/**
|
|
1425
|
+
* 应用反馈
|
|
1426
|
+
*/
|
|
1427
|
+
applicationFeedback: {
|
|
1428
|
+
/**
|
|
1429
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=list&version=v6 click to debug }
|
|
1430
|
+
*
|
|
1431
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list document }
|
|
1432
|
+
*
|
|
1433
|
+
* 获取应用反馈列表
|
|
1434
|
+
*
|
|
1435
|
+
* 查询应用的反馈数据
|
|
1436
|
+
*/
|
|
1437
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1438
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1439
|
+
return this.httpInstance
|
|
1440
|
+
.request({
|
|
1441
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks`, path),
|
|
1442
|
+
method: "GET",
|
|
1443
|
+
data,
|
|
1444
|
+
params,
|
|
1445
|
+
headers,
|
|
1446
|
+
})
|
|
1447
|
+
.catch((e) => {
|
|
1448
|
+
this.logger.error(formatErrors(e));
|
|
1449
|
+
throw e;
|
|
1450
|
+
});
|
|
1451
|
+
}),
|
|
1452
|
+
/**
|
|
1453
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.feedback&apiName=patch&version=v6 click to debug }
|
|
1454
|
+
*
|
|
1455
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch document }
|
|
1456
|
+
*
|
|
1457
|
+
* 更新应用反馈
|
|
1458
|
+
*
|
|
1459
|
+
* 更新应用的反馈数据
|
|
1460
|
+
*/
|
|
1461
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1462
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1463
|
+
return this.httpInstance
|
|
1464
|
+
.request({
|
|
1465
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/feedbacks/:feedback_id`, path),
|
|
1466
|
+
method: "PATCH",
|
|
1467
|
+
data,
|
|
1468
|
+
params,
|
|
1469
|
+
headers,
|
|
1470
|
+
})
|
|
1471
|
+
.catch((e) => {
|
|
1472
|
+
this.logger.error(formatErrors(e));
|
|
1473
|
+
throw e;
|
|
1474
|
+
});
|
|
1475
|
+
}),
|
|
1476
|
+
},
|
|
1477
|
+
/**
|
|
1478
|
+
* 事件
|
|
1479
|
+
*/
|
|
1480
|
+
applicationVisibility: {
|
|
1481
|
+
/**
|
|
1482
|
+
* {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=check_white_black_list&version=v6 click to debug }
|
|
1483
|
+
*
|
|
1484
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=check_white_black_list&project=application&resource=application.visibility&version=v6 document }
|
|
1485
|
+
*/
|
|
1486
|
+
checkWhiteBlackList: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
1487
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
1488
|
+
return this.httpInstance
|
|
1489
|
+
.request({
|
|
1490
|
+
url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility/check_white_black_list`, path),
|
|
1491
|
+
method: "POST",
|
|
1492
|
+
data,
|
|
1493
|
+
params,
|
|
1494
|
+
headers,
|
|
1495
|
+
})
|
|
1496
|
+
.catch((e) => {
|
|
1497
|
+
this.logger.error(formatErrors(e));
|
|
1498
|
+
throw e;
|
|
1499
|
+
});
|
|
1500
|
+
}),
|
|
1501
|
+
},
|
|
1435
1502
|
};
|
|
1436
1503
|
/**
|
|
1437
1504
|
* 审批
|
|
1438
1505
|
*/
|
|
1439
1506
|
this.approval = {
|
|
1440
1507
|
/**
|
|
1441
|
-
*
|
|
1508
|
+
* 原生审批定义
|
|
1442
1509
|
*/
|
|
1443
1510
|
approval: {
|
|
1444
1511
|
/**
|
|
@@ -4016,6 +4083,26 @@ class Client$1 {
|
|
|
4016
4083
|
* 多维表格
|
|
4017
4084
|
*/
|
|
4018
4085
|
app: {
|
|
4086
|
+
/**
|
|
4087
|
+
* {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=copy&version=v1 click to debug }
|
|
4088
|
+
*
|
|
4089
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=copy&project=bitable&resource=app&version=v1 document }
|
|
4090
|
+
*/
|
|
4091
|
+
copy: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4092
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4093
|
+
return this.httpInstance
|
|
4094
|
+
.request({
|
|
4095
|
+
url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token/copy`, path),
|
|
4096
|
+
method: "POST",
|
|
4097
|
+
data,
|
|
4098
|
+
params,
|
|
4099
|
+
headers,
|
|
4100
|
+
})
|
|
4101
|
+
.catch((e) => {
|
|
4102
|
+
this.logger.error(formatErrors(e));
|
|
4103
|
+
throw e;
|
|
4104
|
+
});
|
|
4105
|
+
}),
|
|
4019
4106
|
/**
|
|
4020
4107
|
* {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=create&version=v1 click to debug }
|
|
4021
4108
|
*
|
|
@@ -8831,6 +8918,32 @@ class Client$1 {
|
|
|
8831
8918
|
throw e;
|
|
8832
8919
|
});
|
|
8833
8920
|
}),
|
|
8921
|
+
/**
|
|
8922
|
+
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=resurrect&version=v3 click to debug }
|
|
8923
|
+
*
|
|
8924
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/resurrect document }
|
|
8925
|
+
*
|
|
8926
|
+
* 恢复已删除用户
|
|
8927
|
+
*
|
|
8928
|
+
* 该接口用于恢复已删除用户(已离职的成员),仅自建应用可申请,应用商店应用无权调用接口。
|
|
8929
|
+
*
|
|
8930
|
+
* - 仅支持恢复离职 30 天内的成员。恢复后,部分用户数据仍不可恢复,请谨慎调用。;- 待恢复成员的用户 ID 不能被企业内其他成员使用。如有重复,请先离职对应的成员,否则接口会报错。;- 待恢复成员的手机号和邮箱不能被企业内其他成员使用。如有重复,请先修改对应成员的信息,否则接口会报错。
|
|
8931
|
+
*/
|
|
8932
|
+
resurrect: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
8933
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
8934
|
+
return this.httpInstance
|
|
8935
|
+
.request({
|
|
8936
|
+
url: fillApiPath(`${this.domain}/open-apis/contact/v3/users/:user_id/resurrect`, path),
|
|
8937
|
+
method: "POST",
|
|
8938
|
+
data,
|
|
8939
|
+
params,
|
|
8940
|
+
headers,
|
|
8941
|
+
})
|
|
8942
|
+
.catch((e) => {
|
|
8943
|
+
this.logger.error(formatErrors(e));
|
|
8944
|
+
throw e;
|
|
8945
|
+
});
|
|
8946
|
+
}),
|
|
8834
8947
|
/**
|
|
8835
8948
|
* {@link https://open.feishu.cn/api-explorer?project=contact&resource=user&apiName=update&version=v3 click to debug }
|
|
8836
8949
|
*
|
|
@@ -9302,7 +9415,7 @@ class Client$1 {
|
|
|
9302
9415
|
},
|
|
9303
9416
|
};
|
|
9304
9417
|
/**
|
|
9305
|
-
*
|
|
9418
|
+
* 云文档-文件管理
|
|
9306
9419
|
*/
|
|
9307
9420
|
this.drive = {
|
|
9308
9421
|
/**
|
|
@@ -9401,6 +9514,30 @@ class Client$1 {
|
|
|
9401
9514
|
* 评论
|
|
9402
9515
|
*/
|
|
9403
9516
|
fileComment: {
|
|
9517
|
+
/**
|
|
9518
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=batch_query&version=v1 click to debug }
|
|
9519
|
+
*
|
|
9520
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query document }
|
|
9521
|
+
*
|
|
9522
|
+
* 批量获取评论
|
|
9523
|
+
*
|
|
9524
|
+
* 该接口用于根据评论 ID 列表批量获取评论。
|
|
9525
|
+
*/
|
|
9526
|
+
batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9527
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9528
|
+
return this.httpInstance
|
|
9529
|
+
.request({
|
|
9530
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/batch_query`, path),
|
|
9531
|
+
method: "POST",
|
|
9532
|
+
data,
|
|
9533
|
+
params,
|
|
9534
|
+
headers,
|
|
9535
|
+
})
|
|
9536
|
+
.catch((e) => {
|
|
9537
|
+
this.logger.error(formatErrors(e));
|
|
9538
|
+
throw e;
|
|
9539
|
+
});
|
|
9540
|
+
}),
|
|
9404
9541
|
/**
|
|
9405
9542
|
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment&apiName=create&version=v1 click to debug }
|
|
9406
9543
|
*
|
|
@@ -9600,7 +9737,7 @@ class Client$1 {
|
|
|
9600
9737
|
}),
|
|
9601
9738
|
},
|
|
9602
9739
|
/**
|
|
9603
|
-
*
|
|
9740
|
+
* 文件
|
|
9604
9741
|
*/
|
|
9605
9742
|
file: {
|
|
9606
9743
|
/**
|
|
@@ -9655,6 +9792,26 @@ class Client$1 {
|
|
|
9655
9792
|
throw e;
|
|
9656
9793
|
});
|
|
9657
9794
|
}),
|
|
9795
|
+
/**
|
|
9796
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=create_shortcut&version=v1 click to debug }
|
|
9797
|
+
*
|
|
9798
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_shortcut&project=drive&resource=file&version=v1 document }
|
|
9799
|
+
*/
|
|
9800
|
+
createShortcut: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
9801
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
9802
|
+
return this.httpInstance
|
|
9803
|
+
.request({
|
|
9804
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/create_shortcut`, path),
|
|
9805
|
+
method: "POST",
|
|
9806
|
+
data,
|
|
9807
|
+
params,
|
|
9808
|
+
headers,
|
|
9809
|
+
})
|
|
9810
|
+
.catch((e) => {
|
|
9811
|
+
this.logger.error(formatErrors(e));
|
|
9812
|
+
throw e;
|
|
9813
|
+
});
|
|
9814
|
+
}),
|
|
9658
9815
|
/**
|
|
9659
9816
|
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=file&apiName=delete&version=v1 click to debug }
|
|
9660
9817
|
*
|
|
@@ -10336,7 +10493,7 @@ class Client$1 {
|
|
|
10336
10493
|
}),
|
|
10337
10494
|
},
|
|
10338
10495
|
/**
|
|
10339
|
-
*
|
|
10496
|
+
* 分片上传
|
|
10340
10497
|
*/
|
|
10341
10498
|
media: {
|
|
10342
10499
|
/**
|
|
@@ -10744,66 +10901,131 @@ class Client$1 {
|
|
|
10744
10901
|
});
|
|
10745
10902
|
}),
|
|
10746
10903
|
},
|
|
10747
|
-
};
|
|
10748
|
-
/**
|
|
10749
|
-
|
|
10750
|
-
*/
|
|
10751
|
-
this.edu = {};
|
|
10752
|
-
/**
|
|
10753
|
-
* 智能人事
|
|
10754
|
-
*/
|
|
10755
|
-
this.ehr = {
|
|
10756
10904
|
/**
|
|
10757
|
-
*
|
|
10905
|
+
* permission.public.password
|
|
10758
10906
|
*/
|
|
10759
|
-
|
|
10907
|
+
permissionPublicPassword: {
|
|
10760
10908
|
/**
|
|
10761
|
-
* {@link https://open.feishu.cn/api-explorer?project=
|
|
10762
|
-
*
|
|
10763
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get document }
|
|
10764
|
-
*
|
|
10765
|
-
* 下载附件
|
|
10766
|
-
*
|
|
10767
|
-
* 根据文件 token 下载文件。;;调用 「批量获取员工花名册信息」接口的返回值中,「文件」类型的字段 id,即是文件 token
|
|
10909
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=create&version=v1 click to debug }
|
|
10768
10910
|
*
|
|
10769
|
-
*
|
|
10911
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=drive&resource=permission.public.password&version=v1 document }
|
|
10770
10912
|
*/
|
|
10771
|
-
|
|
10913
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10772
10914
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10773
|
-
|
|
10915
|
+
return this.httpInstance
|
|
10774
10916
|
.request({
|
|
10775
|
-
url: fillApiPath(`${this.domain}/open-apis/
|
|
10776
|
-
method: "
|
|
10777
|
-
headers,
|
|
10917
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path),
|
|
10918
|
+
method: "POST",
|
|
10778
10919
|
data,
|
|
10779
10920
|
params,
|
|
10780
|
-
|
|
10921
|
+
headers,
|
|
10781
10922
|
})
|
|
10782
10923
|
.catch((e) => {
|
|
10783
10924
|
this.logger.error(formatErrors(e));
|
|
10784
10925
|
throw e;
|
|
10785
10926
|
});
|
|
10786
|
-
return {
|
|
10787
|
-
writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
10788
|
-
return new Promise((resolve, reject) => {
|
|
10789
|
-
const writableStream = fs.createWriteStream(filePath);
|
|
10790
|
-
writableStream.on("finish", () => {
|
|
10791
|
-
resolve(filePath);
|
|
10792
|
-
});
|
|
10793
|
-
writableStream.on("error", (e) => {
|
|
10794
|
-
reject(e);
|
|
10795
|
-
});
|
|
10796
|
-
res.pipe(writableStream);
|
|
10797
|
-
});
|
|
10798
|
-
}),
|
|
10799
|
-
};
|
|
10800
10927
|
}),
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10928
|
+
/**
|
|
10929
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=delete&version=v1 click to debug }
|
|
10930
|
+
*
|
|
10931
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=drive&resource=permission.public.password&version=v1 document }
|
|
10932
|
+
*/
|
|
10933
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10934
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10935
|
+
return this.httpInstance
|
|
10936
|
+
.request({
|
|
10937
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path),
|
|
10938
|
+
method: "DELETE",
|
|
10939
|
+
data,
|
|
10940
|
+
params,
|
|
10941
|
+
headers,
|
|
10942
|
+
})
|
|
10943
|
+
.catch((e) => {
|
|
10944
|
+
this.logger.error(formatErrors(e));
|
|
10945
|
+
throw e;
|
|
10946
|
+
});
|
|
10947
|
+
}),
|
|
10948
|
+
/**
|
|
10949
|
+
* {@link https://open.feishu.cn/api-explorer?project=drive&resource=permission.public.password&apiName=update&version=v1 click to debug }
|
|
10950
|
+
*
|
|
10951
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=drive&resource=permission.public.password&version=v1 document }
|
|
10952
|
+
*/
|
|
10953
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10954
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10955
|
+
return this.httpInstance
|
|
10956
|
+
.request({
|
|
10957
|
+
url: fillApiPath(`${this.domain}/open-apis/drive/v1/permissions/:token/public/password`, path),
|
|
10958
|
+
method: "PUT",
|
|
10959
|
+
data,
|
|
10960
|
+
params,
|
|
10961
|
+
headers,
|
|
10962
|
+
})
|
|
10963
|
+
.catch((e) => {
|
|
10964
|
+
this.logger.error(formatErrors(e));
|
|
10965
|
+
throw e;
|
|
10966
|
+
});
|
|
10967
|
+
}),
|
|
10968
|
+
},
|
|
10969
|
+
};
|
|
10970
|
+
/**
|
|
10971
|
+
|
|
10972
|
+
*/
|
|
10973
|
+
this.edu = {};
|
|
10974
|
+
/**
|
|
10975
|
+
* 智能人事
|
|
10976
|
+
*/
|
|
10977
|
+
this.ehr = {
|
|
10978
|
+
/**
|
|
10979
|
+
* 飞书人事(标准版)
|
|
10980
|
+
*/
|
|
10981
|
+
attachment: {
|
|
10982
|
+
/**
|
|
10983
|
+
* {@link https://open.feishu.cn/api-explorer?project=ehr&resource=attachment&apiName=get&version=v1 click to debug }
|
|
10984
|
+
*
|
|
10985
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get document }
|
|
10986
|
+
*
|
|
10987
|
+
* 下载附件
|
|
10988
|
+
*
|
|
10989
|
+
* 根据文件 token 下载文件。;;调用 「批量获取员工花名册信息」接口的返回值中,「文件」类型的字段 id,即是文件 token
|
|
10990
|
+
*
|
|
10991
|
+
* 
|
|
10992
|
+
*/
|
|
10993
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10994
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10995
|
+
const res = yield this.httpInstance
|
|
10996
|
+
.request({
|
|
10997
|
+
url: fillApiPath(`${this.domain}/open-apis/ehr/v1/attachments/:token`, path),
|
|
10998
|
+
method: "GET",
|
|
10999
|
+
headers,
|
|
11000
|
+
data,
|
|
11001
|
+
params,
|
|
11002
|
+
responseType: "stream",
|
|
11003
|
+
})
|
|
11004
|
+
.catch((e) => {
|
|
11005
|
+
this.logger.error(formatErrors(e));
|
|
11006
|
+
throw e;
|
|
11007
|
+
});
|
|
11008
|
+
return {
|
|
11009
|
+
writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
11010
|
+
return new Promise((resolve, reject) => {
|
|
11011
|
+
const writableStream = fs.createWriteStream(filePath);
|
|
11012
|
+
writableStream.on("finish", () => {
|
|
11013
|
+
resolve(filePath);
|
|
11014
|
+
});
|
|
11015
|
+
writableStream.on("error", (e) => {
|
|
11016
|
+
reject(e);
|
|
11017
|
+
});
|
|
11018
|
+
res.pipe(writableStream);
|
|
11019
|
+
});
|
|
11020
|
+
}),
|
|
11021
|
+
};
|
|
11022
|
+
}),
|
|
11023
|
+
},
|
|
11024
|
+
/**
|
|
11025
|
+
* 飞书人事(标准版)
|
|
11026
|
+
*/
|
|
11027
|
+
employee: {
|
|
11028
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
10807
11029
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
10808
11030
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
10809
11031
|
const res = yield this.httpInstance
|
|
@@ -12876,6 +13098,122 @@ class Client$1 {
|
|
|
12876
13098
|
});
|
|
12877
13099
|
}),
|
|
12878
13100
|
},
|
|
13101
|
+
/**
|
|
13102
|
+
* 导入外部系统信息(灰度租户可见)
|
|
13103
|
+
*/
|
|
13104
|
+
externalApplication: {
|
|
13105
|
+
/**
|
|
13106
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_application&apiName=create&version=v1 click to debug }
|
|
13107
|
+
*
|
|
13108
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/create document }
|
|
13109
|
+
*
|
|
13110
|
+
* 创建外部投递
|
|
13111
|
+
*
|
|
13112
|
+
* 导入来自其他系统的投递信息,创建为外部投递
|
|
13113
|
+
*/
|
|
13114
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13115
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13116
|
+
return this.httpInstance
|
|
13117
|
+
.request({
|
|
13118
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_applications`, path),
|
|
13119
|
+
method: "POST",
|
|
13120
|
+
data,
|
|
13121
|
+
params,
|
|
13122
|
+
headers,
|
|
13123
|
+
})
|
|
13124
|
+
.catch((e) => {
|
|
13125
|
+
this.logger.error(formatErrors(e));
|
|
13126
|
+
throw e;
|
|
13127
|
+
});
|
|
13128
|
+
}),
|
|
13129
|
+
},
|
|
13130
|
+
/**
|
|
13131
|
+
* 导入外部系统信息(灰度租户可见)
|
|
13132
|
+
*/
|
|
13133
|
+
externalBackgroundCheck: {
|
|
13134
|
+
/**
|
|
13135
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_background_check&apiName=create&version=v1 click to debug }
|
|
13136
|
+
*
|
|
13137
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/create document }
|
|
13138
|
+
*
|
|
13139
|
+
* 创建外部背调
|
|
13140
|
+
*
|
|
13141
|
+
* 导入来自其他系统的背调信息,创建为外部背调
|
|
13142
|
+
*/
|
|
13143
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13144
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13145
|
+
return this.httpInstance
|
|
13146
|
+
.request({
|
|
13147
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_background_checks`, path),
|
|
13148
|
+
method: "POST",
|
|
13149
|
+
data,
|
|
13150
|
+
params,
|
|
13151
|
+
headers,
|
|
13152
|
+
})
|
|
13153
|
+
.catch((e) => {
|
|
13154
|
+
this.logger.error(formatErrors(e));
|
|
13155
|
+
throw e;
|
|
13156
|
+
});
|
|
13157
|
+
}),
|
|
13158
|
+
},
|
|
13159
|
+
/**
|
|
13160
|
+
* 导入外部系统信息(灰度租户可见)
|
|
13161
|
+
*/
|
|
13162
|
+
externalInterview: {
|
|
13163
|
+
/**
|
|
13164
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview&apiName=create&version=v1 click to debug }
|
|
13165
|
+
*
|
|
13166
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/create document }
|
|
13167
|
+
*
|
|
13168
|
+
* 创建外部面试
|
|
13169
|
+
*
|
|
13170
|
+
* 导入来自其他系统的面试信息,创建为外部面试
|
|
13171
|
+
*/
|
|
13172
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13173
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13174
|
+
return this.httpInstance
|
|
13175
|
+
.request({
|
|
13176
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interviews`, path),
|
|
13177
|
+
method: "POST",
|
|
13178
|
+
data,
|
|
13179
|
+
params,
|
|
13180
|
+
headers,
|
|
13181
|
+
})
|
|
13182
|
+
.catch((e) => {
|
|
13183
|
+
this.logger.error(formatErrors(e));
|
|
13184
|
+
throw e;
|
|
13185
|
+
});
|
|
13186
|
+
}),
|
|
13187
|
+
},
|
|
13188
|
+
/**
|
|
13189
|
+
* 导入外部系统信息(灰度租户可见)
|
|
13190
|
+
*/
|
|
13191
|
+
externalInterviewAssessment: {
|
|
13192
|
+
/**
|
|
13193
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=external_interview_assessment&apiName=create&version=v1 click to debug }
|
|
13194
|
+
*
|
|
13195
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview_assessment/create document }
|
|
13196
|
+
*
|
|
13197
|
+
* 创建外部面评
|
|
13198
|
+
*
|
|
13199
|
+
* 导入来自其他系统的面评信息,创建为外部面评
|
|
13200
|
+
*/
|
|
13201
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13202
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13203
|
+
return this.httpInstance
|
|
13204
|
+
.request({
|
|
13205
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/external_interview_assessments`, path),
|
|
13206
|
+
method: "POST",
|
|
13207
|
+
data,
|
|
13208
|
+
params,
|
|
13209
|
+
headers,
|
|
13210
|
+
})
|
|
13211
|
+
.catch((e) => {
|
|
13212
|
+
this.logger.error(formatErrors(e));
|
|
13213
|
+
throw e;
|
|
13214
|
+
});
|
|
13215
|
+
}),
|
|
13216
|
+
},
|
|
12879
13217
|
/**
|
|
12880
13218
|
* 职位
|
|
12881
13219
|
*/
|
|
@@ -13295,6 +13633,30 @@ class Client$1 {
|
|
|
13295
13633
|
* 人才
|
|
13296
13634
|
*/
|
|
13297
13635
|
talent: {
|
|
13636
|
+
/**
|
|
13637
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=add_to_folder&version=v1 click to debug }
|
|
13638
|
+
*
|
|
13639
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/add_to_folder document }
|
|
13640
|
+
*
|
|
13641
|
+
* 将人才加入指定文件夹
|
|
13642
|
+
*
|
|
13643
|
+
* 将人才加入指定文件夹
|
|
13644
|
+
*/
|
|
13645
|
+
addToFolder: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13646
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13647
|
+
return this.httpInstance
|
|
13648
|
+
.request({
|
|
13649
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talents/add_to_folder`, path),
|
|
13650
|
+
method: "POST",
|
|
13651
|
+
data,
|
|
13652
|
+
params,
|
|
13653
|
+
headers,
|
|
13654
|
+
})
|
|
13655
|
+
.catch((e) => {
|
|
13656
|
+
this.logger.error(formatErrors(e));
|
|
13657
|
+
throw e;
|
|
13658
|
+
});
|
|
13659
|
+
}),
|
|
13298
13660
|
/**
|
|
13299
13661
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent&apiName=batch_get_id&version=v1 click to debug }
|
|
13300
13662
|
*
|
|
@@ -13344,6 +13706,83 @@ class Client$1 {
|
|
|
13344
13706
|
});
|
|
13345
13707
|
}),
|
|
13346
13708
|
},
|
|
13709
|
+
/**
|
|
13710
|
+
* talent_folder
|
|
13711
|
+
*/
|
|
13712
|
+
talentFolder: {
|
|
13713
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13714
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13715
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
13716
|
+
const res = yield this.httpInstance
|
|
13717
|
+
.request({
|
|
13718
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path),
|
|
13719
|
+
method: "GET",
|
|
13720
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
13721
|
+
params: pickBy(innerPayload.params, identity),
|
|
13722
|
+
})
|
|
13723
|
+
.catch((e) => {
|
|
13724
|
+
this.logger.error(formatErrors(e));
|
|
13725
|
+
});
|
|
13726
|
+
return res;
|
|
13727
|
+
});
|
|
13728
|
+
const Iterable = {
|
|
13729
|
+
[Symbol.asyncIterator]() {
|
|
13730
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
13731
|
+
let hasMore = true;
|
|
13732
|
+
let pageToken;
|
|
13733
|
+
while (hasMore) {
|
|
13734
|
+
try {
|
|
13735
|
+
const res = yield __await(sendRequest({
|
|
13736
|
+
headers,
|
|
13737
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
13738
|
+
data,
|
|
13739
|
+
}));
|
|
13740
|
+
const _b = get(res, "data") || {}, {
|
|
13741
|
+
// @ts-ignore
|
|
13742
|
+
has_more,
|
|
13743
|
+
// @ts-ignore
|
|
13744
|
+
page_token,
|
|
13745
|
+
// @ts-ignore
|
|
13746
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
13747
|
+
yield yield __await(rest);
|
|
13748
|
+
hasMore = Boolean(has_more);
|
|
13749
|
+
pageToken = page_token || next_page_token;
|
|
13750
|
+
}
|
|
13751
|
+
catch (e) {
|
|
13752
|
+
yield yield __await(null);
|
|
13753
|
+
break;
|
|
13754
|
+
}
|
|
13755
|
+
}
|
|
13756
|
+
});
|
|
13757
|
+
},
|
|
13758
|
+
};
|
|
13759
|
+
return Iterable;
|
|
13760
|
+
}),
|
|
13761
|
+
/**
|
|
13762
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=talent_folder&apiName=list&version=v1 click to debug }
|
|
13763
|
+
*
|
|
13764
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_folder/list document }
|
|
13765
|
+
*
|
|
13766
|
+
* 获取人才文件夹信息
|
|
13767
|
+
*
|
|
13768
|
+
* 用于获取招聘系统中人才文件夹信息
|
|
13769
|
+
*/
|
|
13770
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
13771
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
13772
|
+
return this.httpInstance
|
|
13773
|
+
.request({
|
|
13774
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/talent_folders`, path),
|
|
13775
|
+
method: "GET",
|
|
13776
|
+
data,
|
|
13777
|
+
params,
|
|
13778
|
+
headers,
|
|
13779
|
+
})
|
|
13780
|
+
.catch((e) => {
|
|
13781
|
+
this.logger.error(formatErrors(e));
|
|
13782
|
+
throw e;
|
|
13783
|
+
});
|
|
13784
|
+
}),
|
|
13785
|
+
},
|
|
13347
13786
|
};
|
|
13348
13787
|
/**
|
|
13349
13788
|
* 实名认证
|
|
@@ -14632,7 +15071,7 @@ class Client$1 {
|
|
|
14632
15071
|
}),
|
|
14633
15072
|
},
|
|
14634
15073
|
/**
|
|
14635
|
-
*
|
|
15074
|
+
* 消息加急
|
|
14636
15075
|
*/
|
|
14637
15076
|
message: {
|
|
14638
15077
|
/**
|
|
@@ -14951,6 +15390,70 @@ class Client$1 {
|
|
|
14951
15390
|
throw e;
|
|
14952
15391
|
});
|
|
14953
15392
|
}),
|
|
15393
|
+
/**
|
|
15394
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=create&version=v1 click to debug }
|
|
15395
|
+
*
|
|
15396
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create document }
|
|
15397
|
+
*
|
|
15398
|
+
* 通过模版消息卡片发送消息
|
|
15399
|
+
*
|
|
15400
|
+
* 注意事项:;- 需要开启[机器人能力](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);- 给群组发送消息,需要机器人在群组中
|
|
15401
|
+
*/
|
|
15402
|
+
createByCard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15403
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15404
|
+
const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
|
|
15405
|
+
const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
|
|
15406
|
+
type: "template",
|
|
15407
|
+
data: {
|
|
15408
|
+
template_id: template_id,
|
|
15409
|
+
template_variable: template_variable,
|
|
15410
|
+
},
|
|
15411
|
+
}) }, rest);
|
|
15412
|
+
return this.httpInstance
|
|
15413
|
+
.request({
|
|
15414
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/messages`, path),
|
|
15415
|
+
method: "POST",
|
|
15416
|
+
data: targetData,
|
|
15417
|
+
params,
|
|
15418
|
+
headers,
|
|
15419
|
+
})
|
|
15420
|
+
.catch((e) => {
|
|
15421
|
+
this.logger.error(formatErrors(e));
|
|
15422
|
+
throw e;
|
|
15423
|
+
});
|
|
15424
|
+
}),
|
|
15425
|
+
/**
|
|
15426
|
+
* {@link https://open.feishu.cn/api-explorer?project=im&resource=message&apiName=reply&version=v1 click to debug }
|
|
15427
|
+
*
|
|
15428
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply document }
|
|
15429
|
+
*
|
|
15430
|
+
* 通过模版消息卡片回复消息
|
|
15431
|
+
*
|
|
15432
|
+
* 注意事项:;- 需要开启[机器人能力](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);- 回复群组消息,需要机器人在群中
|
|
15433
|
+
*/
|
|
15434
|
+
replyByCard: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
15435
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
15436
|
+
const { template_id, template_variable } = data, rest = __rest(data, ["template_id", "template_variable"]);
|
|
15437
|
+
const targetData = Object.assign({ msg_type: "interactive", content: JSON.stringify({
|
|
15438
|
+
type: "template",
|
|
15439
|
+
data: {
|
|
15440
|
+
template_id: template_id,
|
|
15441
|
+
template_variable: template_variable,
|
|
15442
|
+
},
|
|
15443
|
+
}) }, rest);
|
|
15444
|
+
return this.httpInstance
|
|
15445
|
+
.request({
|
|
15446
|
+
url: fillApiPath(`${this.domain}/open-apis/im/v1/messages/:message_id/reply`, path),
|
|
15447
|
+
method: "POST",
|
|
15448
|
+
data: targetData,
|
|
15449
|
+
params,
|
|
15450
|
+
headers,
|
|
15451
|
+
})
|
|
15452
|
+
.catch((e) => {
|
|
15453
|
+
this.logger.error(formatErrors(e));
|
|
15454
|
+
throw e;
|
|
15455
|
+
});
|
|
15456
|
+
}),
|
|
14954
15457
|
},
|
|
14955
15458
|
/**
|
|
14956
15459
|
* 消息 - 表情回复
|
|
@@ -17078,6 +17581,31 @@ class Client$1 {
|
|
|
17078
17581
|
* 搜索
|
|
17079
17582
|
*/
|
|
17080
17583
|
this.search = {
|
|
17584
|
+
/**
|
|
17585
|
+
* app
|
|
17586
|
+
*/
|
|
17587
|
+
app: {
|
|
17588
|
+
/**
|
|
17589
|
+
* {@link https://open.feishu.cn/api-explorer?project=search&resource=app&apiName=create&version=v2 click to debug }
|
|
17590
|
+
*
|
|
17591
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=app&version=v2 document }
|
|
17592
|
+
*/
|
|
17593
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17594
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17595
|
+
return this.httpInstance
|
|
17596
|
+
.request({
|
|
17597
|
+
url: fillApiPath(`${this.domain}/open-apis/search/v2/app`, path),
|
|
17598
|
+
method: "POST",
|
|
17599
|
+
data,
|
|
17600
|
+
params,
|
|
17601
|
+
headers,
|
|
17602
|
+
})
|
|
17603
|
+
.catch((e) => {
|
|
17604
|
+
this.logger.error(formatErrors(e));
|
|
17605
|
+
throw e;
|
|
17606
|
+
});
|
|
17607
|
+
}),
|
|
17608
|
+
},
|
|
17081
17609
|
/**
|
|
17082
17610
|
* 数据源
|
|
17083
17611
|
*/
|
|
@@ -17328,6 +17856,31 @@ class Client$1 {
|
|
|
17328
17856
|
});
|
|
17329
17857
|
}),
|
|
17330
17858
|
},
|
|
17859
|
+
/**
|
|
17860
|
+
* message
|
|
17861
|
+
*/
|
|
17862
|
+
message: {
|
|
17863
|
+
/**
|
|
17864
|
+
* {@link https://open.feishu.cn/api-explorer?project=search&resource=message&apiName=create&version=v2 click to debug }
|
|
17865
|
+
*
|
|
17866
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=message&version=v2 document }
|
|
17867
|
+
*/
|
|
17868
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17869
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17870
|
+
return this.httpInstance
|
|
17871
|
+
.request({
|
|
17872
|
+
url: fillApiPath(`${this.domain}/open-apis/search/v2/message`, path),
|
|
17873
|
+
method: "POST",
|
|
17874
|
+
data,
|
|
17875
|
+
params,
|
|
17876
|
+
headers,
|
|
17877
|
+
})
|
|
17878
|
+
.catch((e) => {
|
|
17879
|
+
this.logger.error(formatErrors(e));
|
|
17880
|
+
throw e;
|
|
17881
|
+
});
|
|
17882
|
+
}),
|
|
17883
|
+
},
|
|
17331
17884
|
/**
|
|
17332
17885
|
* 数据范式
|
|
17333
17886
|
*/
|
|
@@ -17883,7 +18436,7 @@ class Client$1 {
|
|
|
17883
18436
|
}),
|
|
17884
18437
|
},
|
|
17885
18438
|
/**
|
|
17886
|
-
*
|
|
18439
|
+
* 工作表
|
|
17887
18440
|
*/
|
|
17888
18441
|
spreadsheetSheet: {
|
|
17889
18442
|
/**
|
|
@@ -22027,4 +22580,31 @@ const adaptKoaRouter = (dispatcher, options) => (ctx, next) => __awaiter(void 0,
|
|
|
22027
22580
|
yield next();
|
|
22028
22581
|
});
|
|
22029
22582
|
|
|
22030
|
-
|
|
22583
|
+
const defaultCard = (variables) => {
|
|
22584
|
+
const { title, content } = variables;
|
|
22585
|
+
return JSON.stringify({
|
|
22586
|
+
"config": {
|
|
22587
|
+
"wide_screen_mode": true
|
|
22588
|
+
},
|
|
22589
|
+
"elements": [
|
|
22590
|
+
{
|
|
22591
|
+
"tag": "markdown",
|
|
22592
|
+
"content": content
|
|
22593
|
+
}
|
|
22594
|
+
],
|
|
22595
|
+
"header": {
|
|
22596
|
+
"template": "blue",
|
|
22597
|
+
"title": {
|
|
22598
|
+
"content": title,
|
|
22599
|
+
"tag": "plain_text"
|
|
22600
|
+
}
|
|
22601
|
+
}
|
|
22602
|
+
});
|
|
22603
|
+
};
|
|
22604
|
+
|
|
22605
|
+
var messageCard = /*#__PURE__*/Object.freeze({
|
|
22606
|
+
__proto__: null,
|
|
22607
|
+
defaultCard: defaultCard
|
|
22608
|
+
});
|
|
22609
|
+
|
|
22610
|
+
export { AESCipher, AppType, CAppTicket, CTenantAccessToken, CardActionHandler, Client, Domain, EventDispatcher, LoggerLevel, adaptDefault, adaptExpress, adaptKoa, adaptKoaRouter, defaultHttpInstance, generateChallenge, messageCard, withAll, withHelpDeskCredential, withTenantKey, withTenantToken, withUserAccessToken };
|