@larksuiteoapi/node-sdk 1.54.0 → 1.56.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 +11 -4
- package/README.zh.md +9 -2
- package/es/index.js +3121 -993
- package/lib/index.js +3121 -993
- package/package.json +1 -1
- package/types/index.d.ts +24046 -3870
package/lib/index.js
CHANGED
|
@@ -1348,7 +1348,7 @@ class Client$15 extends Client$16 {
|
|
|
1348
1348
|
constructor() {
|
|
1349
1349
|
super(...arguments);
|
|
1350
1350
|
/**
|
|
1351
|
-
*
|
|
1351
|
+
* 管理后台-企业勋章
|
|
1352
1352
|
*/
|
|
1353
1353
|
this.admin = {
|
|
1354
1354
|
/**
|
|
@@ -4286,6 +4286,180 @@ class Client$13 extends Client$14 {
|
|
|
4286
4286
|
});
|
|
4287
4287
|
}),
|
|
4288
4288
|
},
|
|
4289
|
+
/**
|
|
4290
|
+
* workspace
|
|
4291
|
+
*/
|
|
4292
|
+
workspace: {
|
|
4293
|
+
/**
|
|
4294
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace&apiName=sql_commands&version=v1 click to debug }
|
|
4295
|
+
*
|
|
4296
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=sql_commands&project=apaas&resource=workspace&version=v1 document }
|
|
4297
|
+
*
|
|
4298
|
+
* 执行 SQL
|
|
4299
|
+
*/
|
|
4300
|
+
sqlCommands: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4301
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4302
|
+
return this.httpInstance
|
|
4303
|
+
.request({
|
|
4304
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`, path),
|
|
4305
|
+
method: "POST",
|
|
4306
|
+
data,
|
|
4307
|
+
params,
|
|
4308
|
+
headers,
|
|
4309
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4310
|
+
})
|
|
4311
|
+
.catch((e) => {
|
|
4312
|
+
this.logger.error(formatErrors(e));
|
|
4313
|
+
throw e;
|
|
4314
|
+
});
|
|
4315
|
+
}),
|
|
4316
|
+
},
|
|
4317
|
+
/**
|
|
4318
|
+
* workspace.table
|
|
4319
|
+
*/
|
|
4320
|
+
workspaceTable: {
|
|
4321
|
+
/**
|
|
4322
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_batch_update&version=v1 click to debug }
|
|
4323
|
+
*
|
|
4324
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_batch_update&project=apaas&resource=workspace.table&version=v1 document }
|
|
4325
|
+
*
|
|
4326
|
+
* 批量更新数据表中的记录
|
|
4327
|
+
*/
|
|
4328
|
+
recordsBatchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4329
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4330
|
+
return this.httpInstance
|
|
4331
|
+
.request({
|
|
4332
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`, path),
|
|
4333
|
+
method: "PATCH",
|
|
4334
|
+
data,
|
|
4335
|
+
params,
|
|
4336
|
+
headers,
|
|
4337
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4338
|
+
})
|
|
4339
|
+
.catch((e) => {
|
|
4340
|
+
this.logger.error(formatErrors(e));
|
|
4341
|
+
throw e;
|
|
4342
|
+
});
|
|
4343
|
+
}),
|
|
4344
|
+
/**
|
|
4345
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_delete&version=v1 click to debug }
|
|
4346
|
+
*
|
|
4347
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_delete&project=apaas&resource=workspace.table&version=v1 document }
|
|
4348
|
+
*
|
|
4349
|
+
* 删除数据表中的记录
|
|
4350
|
+
*/
|
|
4351
|
+
recordsDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4352
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4353
|
+
return this.httpInstance
|
|
4354
|
+
.request({
|
|
4355
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4356
|
+
method: "DELETE",
|
|
4357
|
+
data,
|
|
4358
|
+
params,
|
|
4359
|
+
headers,
|
|
4360
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4361
|
+
})
|
|
4362
|
+
.catch((e) => {
|
|
4363
|
+
this.logger.error(formatErrors(e));
|
|
4364
|
+
throw e;
|
|
4365
|
+
});
|
|
4366
|
+
}),
|
|
4367
|
+
/**
|
|
4368
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_get&version=v1 click to debug }
|
|
4369
|
+
*
|
|
4370
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_get&project=apaas&resource=workspace.table&version=v1 document }
|
|
4371
|
+
*
|
|
4372
|
+
* 查询数据表数据记录
|
|
4373
|
+
*/
|
|
4374
|
+
recordsGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4375
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4376
|
+
return this.httpInstance
|
|
4377
|
+
.request({
|
|
4378
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4379
|
+
method: "GET",
|
|
4380
|
+
data,
|
|
4381
|
+
params,
|
|
4382
|
+
headers,
|
|
4383
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4384
|
+
})
|
|
4385
|
+
.catch((e) => {
|
|
4386
|
+
this.logger.error(formatErrors(e));
|
|
4387
|
+
throw e;
|
|
4388
|
+
});
|
|
4389
|
+
}),
|
|
4390
|
+
/**
|
|
4391
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_patch&version=v1 click to debug }
|
|
4392
|
+
*
|
|
4393
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_patch&project=apaas&resource=workspace.table&version=v1 document }
|
|
4394
|
+
*
|
|
4395
|
+
* 按条件更新数据表中的记录
|
|
4396
|
+
*/
|
|
4397
|
+
recordsPatch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4398
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4399
|
+
return this.httpInstance
|
|
4400
|
+
.request({
|
|
4401
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4402
|
+
method: "PATCH",
|
|
4403
|
+
data,
|
|
4404
|
+
params,
|
|
4405
|
+
headers,
|
|
4406
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4407
|
+
})
|
|
4408
|
+
.catch((e) => {
|
|
4409
|
+
this.logger.error(formatErrors(e));
|
|
4410
|
+
throw e;
|
|
4411
|
+
});
|
|
4412
|
+
}),
|
|
4413
|
+
/**
|
|
4414
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_post&version=v1 click to debug }
|
|
4415
|
+
*
|
|
4416
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_post&project=apaas&resource=workspace.table&version=v1 document }
|
|
4417
|
+
*
|
|
4418
|
+
* 向数据表中添加或更新记录
|
|
4419
|
+
*/
|
|
4420
|
+
recordsPost: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4421
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4422
|
+
return this.httpInstance
|
|
4423
|
+
.request({
|
|
4424
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4425
|
+
method: "POST",
|
|
4426
|
+
data,
|
|
4427
|
+
params,
|
|
4428
|
+
headers,
|
|
4429
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4430
|
+
})
|
|
4431
|
+
.catch((e) => {
|
|
4432
|
+
this.logger.error(formatErrors(e));
|
|
4433
|
+
throw e;
|
|
4434
|
+
});
|
|
4435
|
+
}),
|
|
4436
|
+
},
|
|
4437
|
+
/**
|
|
4438
|
+
* workspace.view
|
|
4439
|
+
*/
|
|
4440
|
+
workspaceView: {
|
|
4441
|
+
/**
|
|
4442
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.view&apiName=views_get&version=v1 click to debug }
|
|
4443
|
+
*
|
|
4444
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=views_get&project=apaas&resource=workspace.view&version=v1 document }
|
|
4445
|
+
*/
|
|
4446
|
+
viewsGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4447
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4448
|
+
return this.httpInstance
|
|
4449
|
+
.request({
|
|
4450
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`, path),
|
|
4451
|
+
method: "GET",
|
|
4452
|
+
data,
|
|
4453
|
+
params,
|
|
4454
|
+
headers,
|
|
4455
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
4456
|
+
})
|
|
4457
|
+
.catch((e) => {
|
|
4458
|
+
this.logger.error(formatErrors(e));
|
|
4459
|
+
throw e;
|
|
4460
|
+
});
|
|
4461
|
+
}),
|
|
4462
|
+
},
|
|
4289
4463
|
},
|
|
4290
4464
|
};
|
|
4291
4465
|
}
|
|
@@ -4722,7 +4896,7 @@ class Client$12 extends Client$13 {
|
|
|
4722
4896
|
}),
|
|
4723
4897
|
},
|
|
4724
4898
|
/**
|
|
4725
|
-
*
|
|
4899
|
+
* 应用管理
|
|
4726
4900
|
*/
|
|
4727
4901
|
application: {
|
|
4728
4902
|
/**
|
|
@@ -5576,7 +5750,7 @@ class Client$12 extends Client$13 {
|
|
|
5576
5750
|
}),
|
|
5577
5751
|
},
|
|
5578
5752
|
/**
|
|
5579
|
-
*
|
|
5753
|
+
* 应用管理
|
|
5580
5754
|
*/
|
|
5581
5755
|
application: {
|
|
5582
5756
|
/**
|
|
@@ -6315,7 +6489,7 @@ class Client$11 extends Client$12 {
|
|
|
6315
6489
|
}),
|
|
6316
6490
|
},
|
|
6317
6491
|
/**
|
|
6318
|
-
*
|
|
6492
|
+
* 原生审批实例
|
|
6319
6493
|
*/
|
|
6320
6494
|
instance: {
|
|
6321
6495
|
/**
|
|
@@ -6439,13 +6613,34 @@ class Client$11 extends Client$12 {
|
|
|
6439
6613
|
throw e;
|
|
6440
6614
|
});
|
|
6441
6615
|
}),
|
|
6442
|
-
|
|
6616
|
+
/**
|
|
6617
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=preview&version=v4 click to debug }
|
|
6618
|
+
*
|
|
6619
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview document }
|
|
6620
|
+
*/
|
|
6621
|
+
preview: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6622
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6623
|
+
return this.httpInstance
|
|
6624
|
+
.request({
|
|
6625
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/preview`, path),
|
|
6626
|
+
method: "POST",
|
|
6627
|
+
data,
|
|
6628
|
+
params,
|
|
6629
|
+
headers,
|
|
6630
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6631
|
+
})
|
|
6632
|
+
.catch((e) => {
|
|
6633
|
+
this.logger.error(formatErrors(e));
|
|
6634
|
+
throw e;
|
|
6635
|
+
});
|
|
6636
|
+
}),
|
|
6637
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6443
6638
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6444
6639
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
6445
6640
|
const res = yield this.httpInstance
|
|
6446
6641
|
.request({
|
|
6447
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
6448
|
-
method: "
|
|
6642
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
6643
|
+
method: "POST",
|
|
6449
6644
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
6450
6645
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
6451
6646
|
data,
|
|
@@ -6490,20 +6685,20 @@ class Client$11 extends Client$12 {
|
|
|
6490
6685
|
return Iterable;
|
|
6491
6686
|
}),
|
|
6492
6687
|
/**
|
|
6493
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
6688
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
6494
6689
|
*
|
|
6495
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/
|
|
6690
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
6496
6691
|
*
|
|
6497
|
-
*
|
|
6692
|
+
* 查询实例列表
|
|
6498
6693
|
*
|
|
6499
|
-
*
|
|
6694
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
6500
6695
|
*/
|
|
6501
|
-
|
|
6696
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6502
6697
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6503
6698
|
return this.httpInstance
|
|
6504
6699
|
.request({
|
|
6505
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
6506
|
-
method: "
|
|
6700
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
6701
|
+
method: "POST",
|
|
6507
6702
|
data,
|
|
6508
6703
|
params,
|
|
6509
6704
|
headers,
|
|
@@ -6515,15 +6710,19 @@ class Client$11 extends Client$12 {
|
|
|
6515
6710
|
});
|
|
6516
6711
|
}),
|
|
6517
6712
|
/**
|
|
6518
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
6713
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
6519
6714
|
*
|
|
6520
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
6715
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
6716
|
+
*
|
|
6717
|
+
* 查询抄送列表
|
|
6718
|
+
*
|
|
6719
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
6521
6720
|
*/
|
|
6522
|
-
|
|
6721
|
+
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6523
6722
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6524
6723
|
return this.httpInstance
|
|
6525
6724
|
.request({
|
|
6526
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
6725
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
6527
6726
|
method: "POST",
|
|
6528
6727
|
data,
|
|
6529
6728
|
params,
|
|
@@ -6535,193 +6734,93 @@ class Client$11 extends Client$12 {
|
|
|
6535
6734
|
throw e;
|
|
6536
6735
|
});
|
|
6537
6736
|
}),
|
|
6538
|
-
|
|
6737
|
+
/**
|
|
6738
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
6739
|
+
*
|
|
6740
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
6741
|
+
*
|
|
6742
|
+
* 审批任务退回
|
|
6743
|
+
*
|
|
6744
|
+
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
6745
|
+
*/
|
|
6746
|
+
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6747
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6748
|
+
return this.httpInstance
|
|
6749
|
+
.request({
|
|
6750
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
6751
|
+
method: "POST",
|
|
6752
|
+
data,
|
|
6753
|
+
params,
|
|
6754
|
+
headers,
|
|
6755
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6756
|
+
})
|
|
6757
|
+
.catch((e) => {
|
|
6758
|
+
this.logger.error(formatErrors(e));
|
|
6759
|
+
throw e;
|
|
6760
|
+
});
|
|
6761
|
+
}),
|
|
6762
|
+
},
|
|
6763
|
+
/**
|
|
6764
|
+
* 原生审批评论
|
|
6765
|
+
*/
|
|
6766
|
+
instanceComment: {
|
|
6767
|
+
/**
|
|
6768
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
6769
|
+
*
|
|
6770
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
6771
|
+
*
|
|
6772
|
+
* 创建评论
|
|
6773
|
+
*
|
|
6774
|
+
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6775
|
+
*/
|
|
6776
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6777
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6778
|
+
return this.httpInstance
|
|
6779
|
+
.request({
|
|
6780
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6781
|
+
method: "POST",
|
|
6782
|
+
data,
|
|
6783
|
+
params,
|
|
6784
|
+
headers,
|
|
6785
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6786
|
+
})
|
|
6787
|
+
.catch((e) => {
|
|
6788
|
+
this.logger.error(formatErrors(e));
|
|
6789
|
+
throw e;
|
|
6790
|
+
});
|
|
6791
|
+
}),
|
|
6792
|
+
/**
|
|
6793
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
6794
|
+
*
|
|
6795
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
6796
|
+
*
|
|
6797
|
+
* 删除评论
|
|
6798
|
+
*
|
|
6799
|
+
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6800
|
+
*/
|
|
6801
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6802
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6803
|
+
return this.httpInstance
|
|
6804
|
+
.request({
|
|
6805
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
6806
|
+
method: "DELETE",
|
|
6807
|
+
data,
|
|
6808
|
+
params,
|
|
6809
|
+
headers,
|
|
6810
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6811
|
+
})
|
|
6812
|
+
.catch((e) => {
|
|
6813
|
+
this.logger.error(formatErrors(e));
|
|
6814
|
+
throw e;
|
|
6815
|
+
});
|
|
6816
|
+
}),
|
|
6817
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6539
6818
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6540
6819
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
6541
6820
|
const res = yield this.httpInstance
|
|
6542
6821
|
.request({
|
|
6543
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
6544
|
-
method: "
|
|
6545
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
6546
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
6547
|
-
data,
|
|
6548
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6549
|
-
})
|
|
6550
|
-
.catch((e) => {
|
|
6551
|
-
this.logger.error(formatErrors(e));
|
|
6552
|
-
});
|
|
6553
|
-
return res;
|
|
6554
|
-
});
|
|
6555
|
-
const Iterable = {
|
|
6556
|
-
[Symbol.asyncIterator]() {
|
|
6557
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
6558
|
-
let hasMore = true;
|
|
6559
|
-
let pageToken;
|
|
6560
|
-
while (hasMore) {
|
|
6561
|
-
try {
|
|
6562
|
-
const res = yield __await(sendRequest({
|
|
6563
|
-
headers,
|
|
6564
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
6565
|
-
data,
|
|
6566
|
-
}));
|
|
6567
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
6568
|
-
// @ts-ignore
|
|
6569
|
-
has_more,
|
|
6570
|
-
// @ts-ignore
|
|
6571
|
-
page_token,
|
|
6572
|
-
// @ts-ignore
|
|
6573
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
6574
|
-
yield yield __await(rest);
|
|
6575
|
-
hasMore = Boolean(has_more);
|
|
6576
|
-
pageToken = page_token || next_page_token;
|
|
6577
|
-
}
|
|
6578
|
-
catch (e) {
|
|
6579
|
-
yield yield __await(null);
|
|
6580
|
-
break;
|
|
6581
|
-
}
|
|
6582
|
-
}
|
|
6583
|
-
});
|
|
6584
|
-
},
|
|
6585
|
-
};
|
|
6586
|
-
return Iterable;
|
|
6587
|
-
}),
|
|
6588
|
-
/**
|
|
6589
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
6590
|
-
*
|
|
6591
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
6592
|
-
*
|
|
6593
|
-
* 查询实例列表
|
|
6594
|
-
*
|
|
6595
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
6596
|
-
*/
|
|
6597
|
-
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6598
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6599
|
-
return this.httpInstance
|
|
6600
|
-
.request({
|
|
6601
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
6602
|
-
method: "POST",
|
|
6603
|
-
data,
|
|
6604
|
-
params,
|
|
6605
|
-
headers,
|
|
6606
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6607
|
-
})
|
|
6608
|
-
.catch((e) => {
|
|
6609
|
-
this.logger.error(formatErrors(e));
|
|
6610
|
-
throw e;
|
|
6611
|
-
});
|
|
6612
|
-
}),
|
|
6613
|
-
/**
|
|
6614
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
6615
|
-
*
|
|
6616
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
6617
|
-
*
|
|
6618
|
-
* 查询抄送列表
|
|
6619
|
-
*
|
|
6620
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
6621
|
-
*/
|
|
6622
|
-
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6623
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6624
|
-
return this.httpInstance
|
|
6625
|
-
.request({
|
|
6626
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
6627
|
-
method: "POST",
|
|
6628
|
-
data,
|
|
6629
|
-
params,
|
|
6630
|
-
headers,
|
|
6631
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6632
|
-
})
|
|
6633
|
-
.catch((e) => {
|
|
6634
|
-
this.logger.error(formatErrors(e));
|
|
6635
|
-
throw e;
|
|
6636
|
-
});
|
|
6637
|
-
}),
|
|
6638
|
-
/**
|
|
6639
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
6640
|
-
*
|
|
6641
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
6642
|
-
*
|
|
6643
|
-
* 审批任务退回
|
|
6644
|
-
*
|
|
6645
|
-
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
6646
|
-
*/
|
|
6647
|
-
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6648
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6649
|
-
return this.httpInstance
|
|
6650
|
-
.request({
|
|
6651
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
6652
|
-
method: "POST",
|
|
6653
|
-
data,
|
|
6654
|
-
params,
|
|
6655
|
-
headers,
|
|
6656
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6657
|
-
})
|
|
6658
|
-
.catch((e) => {
|
|
6659
|
-
this.logger.error(formatErrors(e));
|
|
6660
|
-
throw e;
|
|
6661
|
-
});
|
|
6662
|
-
}),
|
|
6663
|
-
},
|
|
6664
|
-
/**
|
|
6665
|
-
* 原生审批评论
|
|
6666
|
-
*/
|
|
6667
|
-
instanceComment: {
|
|
6668
|
-
/**
|
|
6669
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
6670
|
-
*
|
|
6671
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
6672
|
-
*
|
|
6673
|
-
* 创建评论
|
|
6674
|
-
*
|
|
6675
|
-
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6676
|
-
*/
|
|
6677
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6678
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6679
|
-
return this.httpInstance
|
|
6680
|
-
.request({
|
|
6681
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6682
|
-
method: "POST",
|
|
6683
|
-
data,
|
|
6684
|
-
params,
|
|
6685
|
-
headers,
|
|
6686
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6687
|
-
})
|
|
6688
|
-
.catch((e) => {
|
|
6689
|
-
this.logger.error(formatErrors(e));
|
|
6690
|
-
throw e;
|
|
6691
|
-
});
|
|
6692
|
-
}),
|
|
6693
|
-
/**
|
|
6694
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
6695
|
-
*
|
|
6696
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
6697
|
-
*
|
|
6698
|
-
* 删除评论
|
|
6699
|
-
*
|
|
6700
|
-
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6701
|
-
*/
|
|
6702
|
-
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6703
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6704
|
-
return this.httpInstance
|
|
6705
|
-
.request({
|
|
6706
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
6707
|
-
method: "DELETE",
|
|
6708
|
-
data,
|
|
6709
|
-
params,
|
|
6710
|
-
headers,
|
|
6711
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
6712
|
-
})
|
|
6713
|
-
.catch((e) => {
|
|
6714
|
-
this.logger.error(formatErrors(e));
|
|
6715
|
-
throw e;
|
|
6716
|
-
});
|
|
6717
|
-
}),
|
|
6718
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6719
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6720
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
6721
|
-
const res = yield this.httpInstance
|
|
6722
|
-
.request({
|
|
6723
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6724
|
-
method: "GET",
|
|
6822
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6823
|
+
method: "GET",
|
|
6725
6824
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
6726
6825
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
6727
6826
|
data,
|
|
@@ -7320,7 +7419,7 @@ class Client$11 extends Client$12 {
|
|
|
7320
7419
|
}),
|
|
7321
7420
|
},
|
|
7322
7421
|
/**
|
|
7323
|
-
*
|
|
7422
|
+
* 原生审批实例
|
|
7324
7423
|
*/
|
|
7325
7424
|
instance: {
|
|
7326
7425
|
/**
|
|
@@ -7444,13 +7543,34 @@ class Client$11 extends Client$12 {
|
|
|
7444
7543
|
throw e;
|
|
7445
7544
|
});
|
|
7446
7545
|
}),
|
|
7447
|
-
|
|
7546
|
+
/**
|
|
7547
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=preview&version=v4 click to debug }
|
|
7548
|
+
*
|
|
7549
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview document }
|
|
7550
|
+
*/
|
|
7551
|
+
preview: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7552
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7553
|
+
return this.httpInstance
|
|
7554
|
+
.request({
|
|
7555
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/preview`, path),
|
|
7556
|
+
method: "POST",
|
|
7557
|
+
data,
|
|
7558
|
+
params,
|
|
7559
|
+
headers,
|
|
7560
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7561
|
+
})
|
|
7562
|
+
.catch((e) => {
|
|
7563
|
+
this.logger.error(formatErrors(e));
|
|
7564
|
+
throw e;
|
|
7565
|
+
});
|
|
7566
|
+
}),
|
|
7567
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7448
7568
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7449
7569
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7450
7570
|
const res = yield this.httpInstance
|
|
7451
7571
|
.request({
|
|
7452
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
7453
|
-
method: "
|
|
7572
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
7573
|
+
method: "POST",
|
|
7454
7574
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
7455
7575
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
7456
7576
|
data,
|
|
@@ -7497,20 +7617,20 @@ class Client$11 extends Client$12 {
|
|
|
7497
7617
|
return Iterable;
|
|
7498
7618
|
}),
|
|
7499
7619
|
/**
|
|
7500
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
7620
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
7501
7621
|
*
|
|
7502
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/
|
|
7622
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
7503
7623
|
*
|
|
7504
|
-
*
|
|
7624
|
+
* 查询实例列表
|
|
7505
7625
|
*
|
|
7506
|
-
*
|
|
7626
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
7507
7627
|
*/
|
|
7508
|
-
|
|
7628
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7509
7629
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7510
7630
|
return this.httpInstance
|
|
7511
7631
|
.request({
|
|
7512
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
7513
|
-
method: "
|
|
7632
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
7633
|
+
method: "POST",
|
|
7514
7634
|
data,
|
|
7515
7635
|
params,
|
|
7516
7636
|
headers,
|
|
@@ -7522,15 +7642,19 @@ class Client$11 extends Client$12 {
|
|
|
7522
7642
|
});
|
|
7523
7643
|
}),
|
|
7524
7644
|
/**
|
|
7525
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
7645
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
7526
7646
|
*
|
|
7527
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
7647
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
7648
|
+
*
|
|
7649
|
+
* 查询抄送列表
|
|
7650
|
+
*
|
|
7651
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
7528
7652
|
*/
|
|
7529
|
-
|
|
7653
|
+
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7530
7654
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7531
7655
|
return this.httpInstance
|
|
7532
7656
|
.request({
|
|
7533
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
7657
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
7534
7658
|
method: "POST",
|
|
7535
7659
|
data,
|
|
7536
7660
|
params,
|
|
@@ -7542,195 +7666,93 @@ class Client$11 extends Client$12 {
|
|
|
7542
7666
|
throw e;
|
|
7543
7667
|
});
|
|
7544
7668
|
}),
|
|
7545
|
-
|
|
7669
|
+
/**
|
|
7670
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
7671
|
+
*
|
|
7672
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
7673
|
+
*
|
|
7674
|
+
* 审批任务退回
|
|
7675
|
+
*
|
|
7676
|
+
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
7677
|
+
*/
|
|
7678
|
+
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7679
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7680
|
+
return this.httpInstance
|
|
7681
|
+
.request({
|
|
7682
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
7683
|
+
method: "POST",
|
|
7684
|
+
data,
|
|
7685
|
+
params,
|
|
7686
|
+
headers,
|
|
7687
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7688
|
+
})
|
|
7689
|
+
.catch((e) => {
|
|
7690
|
+
this.logger.error(formatErrors(e));
|
|
7691
|
+
throw e;
|
|
7692
|
+
});
|
|
7693
|
+
}),
|
|
7694
|
+
},
|
|
7695
|
+
/**
|
|
7696
|
+
* 原生审批评论
|
|
7697
|
+
*/
|
|
7698
|
+
instanceComment: {
|
|
7699
|
+
/**
|
|
7700
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
7701
|
+
*
|
|
7702
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
7703
|
+
*
|
|
7704
|
+
* 创建评论
|
|
7705
|
+
*
|
|
7706
|
+
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7707
|
+
*/
|
|
7708
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7709
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7710
|
+
return this.httpInstance
|
|
7711
|
+
.request({
|
|
7712
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7713
|
+
method: "POST",
|
|
7714
|
+
data,
|
|
7715
|
+
params,
|
|
7716
|
+
headers,
|
|
7717
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7718
|
+
})
|
|
7719
|
+
.catch((e) => {
|
|
7720
|
+
this.logger.error(formatErrors(e));
|
|
7721
|
+
throw e;
|
|
7722
|
+
});
|
|
7723
|
+
}),
|
|
7724
|
+
/**
|
|
7725
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
7726
|
+
*
|
|
7727
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
7728
|
+
*
|
|
7729
|
+
* 删除评论
|
|
7730
|
+
*
|
|
7731
|
+
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7732
|
+
*/
|
|
7733
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7734
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7735
|
+
return this.httpInstance
|
|
7736
|
+
.request({
|
|
7737
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
7738
|
+
method: "DELETE",
|
|
7739
|
+
data,
|
|
7740
|
+
params,
|
|
7741
|
+
headers,
|
|
7742
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7743
|
+
})
|
|
7744
|
+
.catch((e) => {
|
|
7745
|
+
this.logger.error(formatErrors(e));
|
|
7746
|
+
throw e;
|
|
7747
|
+
});
|
|
7748
|
+
}),
|
|
7749
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7546
7750
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7547
7751
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7548
7752
|
const res = yield this.httpInstance
|
|
7549
7753
|
.request({
|
|
7550
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
7551
|
-
method: "
|
|
7552
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
7553
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
7554
|
-
data,
|
|
7555
|
-
paramsSerializer: (params) => qs.stringify(params, {
|
|
7556
|
-
arrayFormat: "repeat",
|
|
7557
|
-
}),
|
|
7558
|
-
})
|
|
7559
|
-
.catch((e) => {
|
|
7560
|
-
this.logger.error(formatErrors(e));
|
|
7561
|
-
});
|
|
7562
|
-
return res;
|
|
7563
|
-
});
|
|
7564
|
-
const Iterable = {
|
|
7565
|
-
[Symbol.asyncIterator]() {
|
|
7566
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
7567
|
-
let hasMore = true;
|
|
7568
|
-
let pageToken;
|
|
7569
|
-
while (hasMore) {
|
|
7570
|
-
try {
|
|
7571
|
-
const res = yield __await(sendRequest({
|
|
7572
|
-
headers,
|
|
7573
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
7574
|
-
data,
|
|
7575
|
-
}));
|
|
7576
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
7577
|
-
// @ts-ignore
|
|
7578
|
-
has_more,
|
|
7579
|
-
// @ts-ignore
|
|
7580
|
-
page_token,
|
|
7581
|
-
// @ts-ignore
|
|
7582
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
7583
|
-
yield yield __await(rest);
|
|
7584
|
-
hasMore = Boolean(has_more);
|
|
7585
|
-
pageToken = page_token || next_page_token;
|
|
7586
|
-
}
|
|
7587
|
-
catch (e) {
|
|
7588
|
-
yield yield __await(null);
|
|
7589
|
-
break;
|
|
7590
|
-
}
|
|
7591
|
-
}
|
|
7592
|
-
});
|
|
7593
|
-
},
|
|
7594
|
-
};
|
|
7595
|
-
return Iterable;
|
|
7596
|
-
}),
|
|
7597
|
-
/**
|
|
7598
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
7599
|
-
*
|
|
7600
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
7601
|
-
*
|
|
7602
|
-
* 查询实例列表
|
|
7603
|
-
*
|
|
7604
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
7605
|
-
*/
|
|
7606
|
-
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7607
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7608
|
-
return this.httpInstance
|
|
7609
|
-
.request({
|
|
7610
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
7611
|
-
method: "POST",
|
|
7612
|
-
data,
|
|
7613
|
-
params,
|
|
7614
|
-
headers,
|
|
7615
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7616
|
-
})
|
|
7617
|
-
.catch((e) => {
|
|
7618
|
-
this.logger.error(formatErrors(e));
|
|
7619
|
-
throw e;
|
|
7620
|
-
});
|
|
7621
|
-
}),
|
|
7622
|
-
/**
|
|
7623
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
7624
|
-
*
|
|
7625
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
7626
|
-
*
|
|
7627
|
-
* 查询抄送列表
|
|
7628
|
-
*
|
|
7629
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
7630
|
-
*/
|
|
7631
|
-
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7632
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7633
|
-
return this.httpInstance
|
|
7634
|
-
.request({
|
|
7635
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
7636
|
-
method: "POST",
|
|
7637
|
-
data,
|
|
7638
|
-
params,
|
|
7639
|
-
headers,
|
|
7640
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7641
|
-
})
|
|
7642
|
-
.catch((e) => {
|
|
7643
|
-
this.logger.error(formatErrors(e));
|
|
7644
|
-
throw e;
|
|
7645
|
-
});
|
|
7646
|
-
}),
|
|
7647
|
-
/**
|
|
7648
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
7649
|
-
*
|
|
7650
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
7651
|
-
*
|
|
7652
|
-
* 审批任务退回
|
|
7653
|
-
*
|
|
7654
|
-
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
7655
|
-
*/
|
|
7656
|
-
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7657
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7658
|
-
return this.httpInstance
|
|
7659
|
-
.request({
|
|
7660
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
7661
|
-
method: "POST",
|
|
7662
|
-
data,
|
|
7663
|
-
params,
|
|
7664
|
-
headers,
|
|
7665
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7666
|
-
})
|
|
7667
|
-
.catch((e) => {
|
|
7668
|
-
this.logger.error(formatErrors(e));
|
|
7669
|
-
throw e;
|
|
7670
|
-
});
|
|
7671
|
-
}),
|
|
7672
|
-
},
|
|
7673
|
-
/**
|
|
7674
|
-
* 原生审批评论
|
|
7675
|
-
*/
|
|
7676
|
-
instanceComment: {
|
|
7677
|
-
/**
|
|
7678
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
7679
|
-
*
|
|
7680
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
7681
|
-
*
|
|
7682
|
-
* 创建评论
|
|
7683
|
-
*
|
|
7684
|
-
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7685
|
-
*/
|
|
7686
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7687
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7688
|
-
return this.httpInstance
|
|
7689
|
-
.request({
|
|
7690
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7691
|
-
method: "POST",
|
|
7692
|
-
data,
|
|
7693
|
-
params,
|
|
7694
|
-
headers,
|
|
7695
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7696
|
-
})
|
|
7697
|
-
.catch((e) => {
|
|
7698
|
-
this.logger.error(formatErrors(e));
|
|
7699
|
-
throw e;
|
|
7700
|
-
});
|
|
7701
|
-
}),
|
|
7702
|
-
/**
|
|
7703
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
7704
|
-
*
|
|
7705
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
7706
|
-
*
|
|
7707
|
-
* 删除评论
|
|
7708
|
-
*
|
|
7709
|
-
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7710
|
-
*/
|
|
7711
|
-
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7712
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7713
|
-
return this.httpInstance
|
|
7714
|
-
.request({
|
|
7715
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
7716
|
-
method: "DELETE",
|
|
7717
|
-
data,
|
|
7718
|
-
params,
|
|
7719
|
-
headers,
|
|
7720
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
7721
|
-
})
|
|
7722
|
-
.catch((e) => {
|
|
7723
|
-
this.logger.error(formatErrors(e));
|
|
7724
|
-
throw e;
|
|
7725
|
-
});
|
|
7726
|
-
}),
|
|
7727
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7728
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7729
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7730
|
-
const res = yield this.httpInstance
|
|
7731
|
-
.request({
|
|
7732
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7733
|
-
method: "GET",
|
|
7754
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7755
|
+
method: "GET",
|
|
7734
7756
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
7735
7757
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
7736
7758
|
data,
|
|
@@ -16019,11 +16041,103 @@ class Client$U extends Client$V {
|
|
|
16019
16041
|
headers: res.headers,
|
|
16020
16042
|
};
|
|
16021
16043
|
}),
|
|
16044
|
+
/**
|
|
16045
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=theme&version=v1 click to debug }
|
|
16046
|
+
*
|
|
16047
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=theme&project=board&resource=whiteboard&version=v1 document }
|
|
16048
|
+
*
|
|
16049
|
+
* 获取画板的主题
|
|
16050
|
+
*/
|
|
16051
|
+
theme: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16052
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16053
|
+
return this.httpInstance
|
|
16054
|
+
.request({
|
|
16055
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`, path),
|
|
16056
|
+
method: "GET",
|
|
16057
|
+
data,
|
|
16058
|
+
params,
|
|
16059
|
+
headers,
|
|
16060
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
16061
|
+
})
|
|
16062
|
+
.catch((e) => {
|
|
16063
|
+
this.logger.error(formatErrors(e));
|
|
16064
|
+
throw e;
|
|
16065
|
+
});
|
|
16066
|
+
}),
|
|
16067
|
+
/**
|
|
16068
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=update_theme&version=v1 click to debug }
|
|
16069
|
+
*
|
|
16070
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_theme&project=board&resource=whiteboard&version=v1 document }
|
|
16071
|
+
*
|
|
16072
|
+
* 更新画板主题
|
|
16073
|
+
*/
|
|
16074
|
+
updateTheme: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16075
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16076
|
+
return this.httpInstance
|
|
16077
|
+
.request({
|
|
16078
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`, path),
|
|
16079
|
+
method: "POST",
|
|
16080
|
+
data,
|
|
16081
|
+
params,
|
|
16082
|
+
headers,
|
|
16083
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
16084
|
+
})
|
|
16085
|
+
.catch((e) => {
|
|
16086
|
+
this.logger.error(formatErrors(e));
|
|
16087
|
+
throw e;
|
|
16088
|
+
});
|
|
16089
|
+
}),
|
|
16022
16090
|
},
|
|
16023
16091
|
/**
|
|
16024
16092
|
* whiteboard.node
|
|
16025
16093
|
*/
|
|
16026
16094
|
whiteboardNode: {
|
|
16095
|
+
/**
|
|
16096
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=create&version=v1 click to debug }
|
|
16097
|
+
*
|
|
16098
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=board&resource=whiteboard.node&version=v1 document }
|
|
16099
|
+
*
|
|
16100
|
+
* 在画板中创建节点
|
|
16101
|
+
*/
|
|
16102
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16103
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16104
|
+
return this.httpInstance
|
|
16105
|
+
.request({
|
|
16106
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`, path),
|
|
16107
|
+
method: "POST",
|
|
16108
|
+
data,
|
|
16109
|
+
params,
|
|
16110
|
+
headers,
|
|
16111
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
16112
|
+
})
|
|
16113
|
+
.catch((e) => {
|
|
16114
|
+
this.logger.error(formatErrors(e));
|
|
16115
|
+
throw e;
|
|
16116
|
+
});
|
|
16117
|
+
}),
|
|
16118
|
+
/**
|
|
16119
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=create_plantuml&version=v1 click to debug }
|
|
16120
|
+
*
|
|
16121
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_plantuml&project=board&resource=whiteboard.node&version=v1 document }
|
|
16122
|
+
*
|
|
16123
|
+
* 创建 plant uml 图形
|
|
16124
|
+
*/
|
|
16125
|
+
createPlantuml: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16126
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16127
|
+
return this.httpInstance
|
|
16128
|
+
.request({
|
|
16129
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`, path),
|
|
16130
|
+
method: "POST",
|
|
16131
|
+
data,
|
|
16132
|
+
params,
|
|
16133
|
+
headers,
|
|
16134
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
16135
|
+
})
|
|
16136
|
+
.catch((e) => {
|
|
16137
|
+
this.logger.error(formatErrors(e));
|
|
16138
|
+
throw e;
|
|
16139
|
+
});
|
|
16140
|
+
}),
|
|
16027
16141
|
/**
|
|
16028
16142
|
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=list&version=v1 click to debug }
|
|
16029
16143
|
*
|
|
@@ -16361,6 +16475,27 @@ class Client$T extends Client$U {
|
|
|
16361
16475
|
throw e;
|
|
16362
16476
|
});
|
|
16363
16477
|
}),
|
|
16478
|
+
/**
|
|
16479
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=mget&version=v4 click to debug }
|
|
16480
|
+
*
|
|
16481
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=calendar&resource=calendar&version=v4 document }
|
|
16482
|
+
*/
|
|
16483
|
+
mget: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16484
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16485
|
+
return this.httpInstance
|
|
16486
|
+
.request({
|
|
16487
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/mget`, path),
|
|
16488
|
+
method: "POST",
|
|
16489
|
+
data,
|
|
16490
|
+
params,
|
|
16491
|
+
headers,
|
|
16492
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
16493
|
+
})
|
|
16494
|
+
.catch((e) => {
|
|
16495
|
+
this.logger.error(formatErrors(e));
|
|
16496
|
+
throw e;
|
|
16497
|
+
});
|
|
16498
|
+
}),
|
|
16364
16499
|
/**
|
|
16365
16500
|
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=patch&version=v4 click to debug }
|
|
16366
16501
|
*
|
|
@@ -16413,6 +16548,27 @@ class Client$T extends Client$U {
|
|
|
16413
16548
|
throw e;
|
|
16414
16549
|
});
|
|
16415
16550
|
}),
|
|
16551
|
+
/**
|
|
16552
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primarys&version=v4 click to debug }
|
|
16553
|
+
*
|
|
16554
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=primarys&project=calendar&resource=calendar&version=v4 document }
|
|
16555
|
+
*/
|
|
16556
|
+
primarys: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16557
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16558
|
+
return this.httpInstance
|
|
16559
|
+
.request({
|
|
16560
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primarys`, path),
|
|
16561
|
+
method: "POST",
|
|
16562
|
+
data,
|
|
16563
|
+
params,
|
|
16564
|
+
headers,
|
|
16565
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
16566
|
+
})
|
|
16567
|
+
.catch((e) => {
|
|
16568
|
+
this.logger.error(formatErrors(e));
|
|
16569
|
+
throw e;
|
|
16570
|
+
});
|
|
16571
|
+
}),
|
|
16416
16572
|
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16417
16573
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16418
16574
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -17308,6 +17464,27 @@ class Client$T extends Client$U {
|
|
|
17308
17464
|
* freebusy
|
|
17309
17465
|
*/
|
|
17310
17466
|
freebusy: {
|
|
17467
|
+
/**
|
|
17468
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=batch&version=v4 click to debug }
|
|
17469
|
+
*
|
|
17470
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=calendar&resource=freebusy&version=v4 document }
|
|
17471
|
+
*/
|
|
17472
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17473
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17474
|
+
return this.httpInstance
|
|
17475
|
+
.request({
|
|
17476
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/batch`, path),
|
|
17477
|
+
method: "POST",
|
|
17478
|
+
data,
|
|
17479
|
+
params,
|
|
17480
|
+
headers,
|
|
17481
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
17482
|
+
})
|
|
17483
|
+
.catch((e) => {
|
|
17484
|
+
this.logger.error(formatErrors(e));
|
|
17485
|
+
throw e;
|
|
17486
|
+
});
|
|
17487
|
+
}),
|
|
17311
17488
|
/**
|
|
17312
17489
|
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=list&version=v4 click to debug }
|
|
17313
17490
|
*
|
|
@@ -17723,175 +17900,15 @@ class Client$T extends Client$U {
|
|
|
17723
17900
|
});
|
|
17724
17901
|
}),
|
|
17725
17902
|
/**
|
|
17726
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=
|
|
17727
|
-
*
|
|
17728
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch document }
|
|
17729
|
-
*
|
|
17730
|
-
* 更新日历信息
|
|
17731
|
-
*
|
|
17732
|
-
* 该接口用于以当前身份(应用 / 用户)修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17733
|
-
*
|
|
17734
|
-
* 当前身份对日历有 owner 权限时,可修改全局字段:summary, description, permission。;;当前身份对日历不具有 owner 权限时,仅可修改对自己生效的字段:color, summary_alias。
|
|
17735
|
-
*/
|
|
17736
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17737
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17738
|
-
return this.httpInstance
|
|
17739
|
-
.request({
|
|
17740
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path),
|
|
17741
|
-
method: "PATCH",
|
|
17742
|
-
data,
|
|
17743
|
-
params,
|
|
17744
|
-
headers,
|
|
17745
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
17746
|
-
})
|
|
17747
|
-
.catch((e) => {
|
|
17748
|
-
this.logger.error(formatErrors(e));
|
|
17749
|
-
throw e;
|
|
17750
|
-
});
|
|
17751
|
-
}),
|
|
17752
|
-
/**
|
|
17753
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primary&version=v4 click to debug }
|
|
17754
|
-
*
|
|
17755
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary document }
|
|
17756
|
-
*
|
|
17757
|
-
* 查询主日历信息
|
|
17758
|
-
*
|
|
17759
|
-
* 获取当前身份的主日历信息。
|
|
17760
|
-
*/
|
|
17761
|
-
primary: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17762
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17763
|
-
return this.httpInstance
|
|
17764
|
-
.request({
|
|
17765
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primary`, path),
|
|
17766
|
-
method: "POST",
|
|
17767
|
-
data,
|
|
17768
|
-
params,
|
|
17769
|
-
headers,
|
|
17770
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
17771
|
-
})
|
|
17772
|
-
.catch((e) => {
|
|
17773
|
-
this.logger.error(formatErrors(e));
|
|
17774
|
-
throw e;
|
|
17775
|
-
});
|
|
17776
|
-
}),
|
|
17777
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17778
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17779
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
17780
|
-
const res = yield this.httpInstance
|
|
17781
|
-
.request({
|
|
17782
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
17783
|
-
method: "POST",
|
|
17784
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
17785
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
17786
|
-
data,
|
|
17787
|
-
paramsSerializer: (params) => qs.stringify(params, {
|
|
17788
|
-
arrayFormat: "repeat",
|
|
17789
|
-
}),
|
|
17790
|
-
})
|
|
17791
|
-
.catch((e) => {
|
|
17792
|
-
this.logger.error(formatErrors(e));
|
|
17793
|
-
});
|
|
17794
|
-
return res;
|
|
17795
|
-
});
|
|
17796
|
-
const Iterable = {
|
|
17797
|
-
[Symbol.asyncIterator]() {
|
|
17798
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
17799
|
-
let hasMore = true;
|
|
17800
|
-
let pageToken;
|
|
17801
|
-
while (hasMore) {
|
|
17802
|
-
try {
|
|
17803
|
-
const res = yield __await(sendRequest({
|
|
17804
|
-
headers,
|
|
17805
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
17806
|
-
data,
|
|
17807
|
-
}));
|
|
17808
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
17809
|
-
// @ts-ignore
|
|
17810
|
-
has_more,
|
|
17811
|
-
// @ts-ignore
|
|
17812
|
-
page_token,
|
|
17813
|
-
// @ts-ignore
|
|
17814
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
17815
|
-
yield yield __await(rest);
|
|
17816
|
-
hasMore = Boolean(has_more);
|
|
17817
|
-
pageToken = page_token || next_page_token;
|
|
17818
|
-
}
|
|
17819
|
-
catch (e) {
|
|
17820
|
-
yield yield __await(null);
|
|
17821
|
-
break;
|
|
17822
|
-
}
|
|
17823
|
-
}
|
|
17824
|
-
});
|
|
17825
|
-
},
|
|
17826
|
-
};
|
|
17827
|
-
return Iterable;
|
|
17828
|
-
}),
|
|
17829
|
-
/**
|
|
17830
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=search&version=v4 click to debug }
|
|
17831
|
-
*
|
|
17832
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search document }
|
|
17833
|
-
*
|
|
17834
|
-
* 搜索日历
|
|
17835
|
-
*
|
|
17836
|
-
* 该接口用于通过关键字查询公共日历或用户主日历。
|
|
17837
|
-
*/
|
|
17838
|
-
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17839
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17840
|
-
return this.httpInstance
|
|
17841
|
-
.request({
|
|
17842
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
17843
|
-
method: "POST",
|
|
17844
|
-
data,
|
|
17845
|
-
params,
|
|
17846
|
-
headers,
|
|
17847
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
17848
|
-
})
|
|
17849
|
-
.catch((e) => {
|
|
17850
|
-
this.logger.error(formatErrors(e));
|
|
17851
|
-
throw e;
|
|
17852
|
-
});
|
|
17853
|
-
}),
|
|
17854
|
-
/**
|
|
17855
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscribe&version=v4 click to debug }
|
|
17903
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=mget&version=v4 click to debug }
|
|
17856
17904
|
*
|
|
17857
|
-
* {@link https://open.feishu.cn/
|
|
17858
|
-
*
|
|
17859
|
-
* 订阅日历
|
|
17860
|
-
*
|
|
17861
|
-
* 该接口用于以当前身份(应用 / 用户)订阅某个日历。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17862
|
-
*
|
|
17863
|
-
* - 仅可订阅类型为 primary 或 shared 的公开日历。;- 可订阅日历数量上限为1000。
|
|
17905
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=calendar&resource=calendar&version=v4 document }
|
|
17864
17906
|
*/
|
|
17865
|
-
|
|
17866
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17867
|
-
return this.httpInstance
|
|
17868
|
-
.request({
|
|
17869
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`, path),
|
|
17870
|
-
method: "POST",
|
|
17871
|
-
data,
|
|
17872
|
-
params,
|
|
17873
|
-
headers,
|
|
17874
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
17875
|
-
})
|
|
17876
|
-
.catch((e) => {
|
|
17877
|
-
this.logger.error(formatErrors(e));
|
|
17878
|
-
throw e;
|
|
17879
|
-
});
|
|
17880
|
-
}),
|
|
17881
|
-
/**
|
|
17882
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscription&version=v4 click to debug }
|
|
17883
|
-
*
|
|
17884
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription document }
|
|
17885
|
-
*
|
|
17886
|
-
* 订阅日历变更事件
|
|
17887
|
-
*
|
|
17888
|
-
* 该接口用于以用户身份订阅当前身份下日历列表中的所有日历变更。
|
|
17889
|
-
*/
|
|
17890
|
-
subscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17907
|
+
mget: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17891
17908
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17892
17909
|
return this.httpInstance
|
|
17893
17910
|
.request({
|
|
17894
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/
|
|
17911
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/mget`, path),
|
|
17895
17912
|
method: "POST",
|
|
17896
17913
|
data,
|
|
17897
17914
|
params,
|
|
@@ -17904,47 +17921,22 @@ class Client$T extends Client$U {
|
|
|
17904
17921
|
});
|
|
17905
17922
|
}),
|
|
17906
17923
|
/**
|
|
17907
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=
|
|
17908
|
-
*
|
|
17909
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscribe document }
|
|
17910
|
-
*
|
|
17911
|
-
* 取消订阅日历
|
|
17912
|
-
*
|
|
17913
|
-
* 该接口用于以当前身份(应用 / 用户)取消对某日历的订阅状态。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17924
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=patch&version=v4 click to debug }
|
|
17914
17925
|
*
|
|
17915
|
-
*
|
|
17916
|
-
*/
|
|
17917
|
-
unsubscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17918
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17919
|
-
return this.httpInstance
|
|
17920
|
-
.request({
|
|
17921
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`, path),
|
|
17922
|
-
method: "POST",
|
|
17923
|
-
data,
|
|
17924
|
-
params,
|
|
17925
|
-
headers,
|
|
17926
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
17927
|
-
})
|
|
17928
|
-
.catch((e) => {
|
|
17929
|
-
this.logger.error(formatErrors(e));
|
|
17930
|
-
throw e;
|
|
17931
|
-
});
|
|
17932
|
-
}),
|
|
17933
|
-
/**
|
|
17934
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscription&version=v4 click to debug }
|
|
17926
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch document }
|
|
17935
17927
|
*
|
|
17936
|
-
*
|
|
17928
|
+
* 更新日历信息
|
|
17937
17929
|
*
|
|
17938
|
-
*
|
|
17930
|
+
* 该接口用于以当前身份(应用 / 用户)修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17939
17931
|
*
|
|
17940
|
-
*
|
|
17932
|
+
* 当前身份对日历有 owner 权限时,可修改全局字段:summary, description, permission。;;当前身份对日历不具有 owner 权限时,仅可修改对自己生效的字段:color, summary_alias。
|
|
17941
17933
|
*/
|
|
17942
|
-
|
|
17934
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17943
17935
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17944
17936
|
return this.httpInstance
|
|
17945
17937
|
.request({
|
|
17946
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
17947
|
-
method: "
|
|
17938
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path),
|
|
17939
|
+
method: "PATCH",
|
|
17948
17940
|
data,
|
|
17949
17941
|
params,
|
|
17950
17942
|
headers,
|
|
@@ -17955,27 +17947,20 @@ class Client$T extends Client$U {
|
|
|
17955
17947
|
throw e;
|
|
17956
17948
|
});
|
|
17957
17949
|
}),
|
|
17958
|
-
},
|
|
17959
|
-
/**
|
|
17960
|
-
* 日程参与人
|
|
17961
|
-
*/
|
|
17962
|
-
calendarEventAttendee: {
|
|
17963
17950
|
/**
|
|
17964
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar
|
|
17965
|
-
*
|
|
17966
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete document }
|
|
17951
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primary&version=v4 click to debug }
|
|
17967
17952
|
*
|
|
17968
|
-
*
|
|
17953
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary document }
|
|
17969
17954
|
*
|
|
17970
|
-
*
|
|
17955
|
+
* 查询主日历信息
|
|
17971
17956
|
*
|
|
17972
|
-
*
|
|
17957
|
+
* 获取当前身份的主日历信息。
|
|
17973
17958
|
*/
|
|
17974
|
-
|
|
17959
|
+
primary: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17975
17960
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17976
17961
|
return this.httpInstance
|
|
17977
17962
|
.request({
|
|
17978
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
17963
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primary`, path),
|
|
17979
17964
|
method: "POST",
|
|
17980
17965
|
data,
|
|
17981
17966
|
params,
|
|
@@ -17988,21 +17973,15 @@ class Client$T extends Client$U {
|
|
|
17988
17973
|
});
|
|
17989
17974
|
}),
|
|
17990
17975
|
/**
|
|
17991
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar
|
|
17976
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primarys&version=v4 click to debug }
|
|
17992
17977
|
*
|
|
17993
|
-
* {@link https://open.feishu.cn/
|
|
17994
|
-
*
|
|
17995
|
-
* 创建日程参与人;
|
|
17996
|
-
*
|
|
17997
|
-
* 批量给日程添加参与人。
|
|
17998
|
-
*
|
|
17999
|
-
* - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者,或日程设置了「参与人可邀请其它参与人」权限。;;- 新添加的日程参与人必须与日程组织者在同一个企业内。;;- 使用该接口添加会议室后,会议室会进入异步的预约流程,请求结束不代表会议室预约成功,需后续再查询预约状态。;;- 每个日程最多只能有 3000 名参与人。;;- 开启管理员能力后预约会议室可不受会议室预约范围的限制(当前不支持用管理员身份给其他人的日程预约会议室)
|
|
17978
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=primarys&project=calendar&resource=calendar&version=v4 document }
|
|
18000
17979
|
*/
|
|
18001
|
-
|
|
17980
|
+
primarys: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18002
17981
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18003
17982
|
return this.httpInstance
|
|
18004
17983
|
.request({
|
|
18005
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
17984
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primarys`, path),
|
|
18006
17985
|
method: "POST",
|
|
18007
17986
|
data,
|
|
18008
17987
|
params,
|
|
@@ -18014,13 +17993,253 @@ class Client$T extends Client$U {
|
|
|
18014
17993
|
throw e;
|
|
18015
17994
|
});
|
|
18016
17995
|
}),
|
|
18017
|
-
|
|
17996
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18018
17997
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18019
17998
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
18020
17999
|
const res = yield this.httpInstance
|
|
18021
18000
|
.request({
|
|
18022
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
18023
|
-
method: "
|
|
18001
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
18002
|
+
method: "POST",
|
|
18003
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
18004
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
18005
|
+
data,
|
|
18006
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
18007
|
+
arrayFormat: "repeat",
|
|
18008
|
+
}),
|
|
18009
|
+
})
|
|
18010
|
+
.catch((e) => {
|
|
18011
|
+
this.logger.error(formatErrors(e));
|
|
18012
|
+
});
|
|
18013
|
+
return res;
|
|
18014
|
+
});
|
|
18015
|
+
const Iterable = {
|
|
18016
|
+
[Symbol.asyncIterator]() {
|
|
18017
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
18018
|
+
let hasMore = true;
|
|
18019
|
+
let pageToken;
|
|
18020
|
+
while (hasMore) {
|
|
18021
|
+
try {
|
|
18022
|
+
const res = yield __await(sendRequest({
|
|
18023
|
+
headers,
|
|
18024
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
18025
|
+
data,
|
|
18026
|
+
}));
|
|
18027
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
18028
|
+
// @ts-ignore
|
|
18029
|
+
has_more,
|
|
18030
|
+
// @ts-ignore
|
|
18031
|
+
page_token,
|
|
18032
|
+
// @ts-ignore
|
|
18033
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
18034
|
+
yield yield __await(rest);
|
|
18035
|
+
hasMore = Boolean(has_more);
|
|
18036
|
+
pageToken = page_token || next_page_token;
|
|
18037
|
+
}
|
|
18038
|
+
catch (e) {
|
|
18039
|
+
yield yield __await(null);
|
|
18040
|
+
break;
|
|
18041
|
+
}
|
|
18042
|
+
}
|
|
18043
|
+
});
|
|
18044
|
+
},
|
|
18045
|
+
};
|
|
18046
|
+
return Iterable;
|
|
18047
|
+
}),
|
|
18048
|
+
/**
|
|
18049
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=search&version=v4 click to debug }
|
|
18050
|
+
*
|
|
18051
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search document }
|
|
18052
|
+
*
|
|
18053
|
+
* 搜索日历
|
|
18054
|
+
*
|
|
18055
|
+
* 该接口用于通过关键字查询公共日历或用户主日历。
|
|
18056
|
+
*/
|
|
18057
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18058
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18059
|
+
return this.httpInstance
|
|
18060
|
+
.request({
|
|
18061
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
18062
|
+
method: "POST",
|
|
18063
|
+
data,
|
|
18064
|
+
params,
|
|
18065
|
+
headers,
|
|
18066
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18067
|
+
})
|
|
18068
|
+
.catch((e) => {
|
|
18069
|
+
this.logger.error(formatErrors(e));
|
|
18070
|
+
throw e;
|
|
18071
|
+
});
|
|
18072
|
+
}),
|
|
18073
|
+
/**
|
|
18074
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscribe&version=v4 click to debug }
|
|
18075
|
+
*
|
|
18076
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscribe document }
|
|
18077
|
+
*
|
|
18078
|
+
* 订阅日历
|
|
18079
|
+
*
|
|
18080
|
+
* 该接口用于以当前身份(应用 / 用户)订阅某个日历。;;身份由 Header Authorization 的 Token 类型决定。
|
|
18081
|
+
*
|
|
18082
|
+
* - 仅可订阅类型为 primary 或 shared 的公开日历。;- 可订阅日历数量上限为1000。
|
|
18083
|
+
*/
|
|
18084
|
+
subscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18085
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18086
|
+
return this.httpInstance
|
|
18087
|
+
.request({
|
|
18088
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`, path),
|
|
18089
|
+
method: "POST",
|
|
18090
|
+
data,
|
|
18091
|
+
params,
|
|
18092
|
+
headers,
|
|
18093
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18094
|
+
})
|
|
18095
|
+
.catch((e) => {
|
|
18096
|
+
this.logger.error(formatErrors(e));
|
|
18097
|
+
throw e;
|
|
18098
|
+
});
|
|
18099
|
+
}),
|
|
18100
|
+
/**
|
|
18101
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscription&version=v4 click to debug }
|
|
18102
|
+
*
|
|
18103
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription document }
|
|
18104
|
+
*
|
|
18105
|
+
* 订阅日历变更事件
|
|
18106
|
+
*
|
|
18107
|
+
* 该接口用于以用户身份订阅当前身份下日历列表中的所有日历变更。
|
|
18108
|
+
*/
|
|
18109
|
+
subscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18110
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18111
|
+
return this.httpInstance
|
|
18112
|
+
.request({
|
|
18113
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/subscription`, path),
|
|
18114
|
+
method: "POST",
|
|
18115
|
+
data,
|
|
18116
|
+
params,
|
|
18117
|
+
headers,
|
|
18118
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18119
|
+
})
|
|
18120
|
+
.catch((e) => {
|
|
18121
|
+
this.logger.error(formatErrors(e));
|
|
18122
|
+
throw e;
|
|
18123
|
+
});
|
|
18124
|
+
}),
|
|
18125
|
+
/**
|
|
18126
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscribe&version=v4 click to debug }
|
|
18127
|
+
*
|
|
18128
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscribe document }
|
|
18129
|
+
*
|
|
18130
|
+
* 取消订阅日历
|
|
18131
|
+
*
|
|
18132
|
+
* 该接口用于以当前身份(应用 / 用户)取消对某日历的订阅状态。;;身份由 Header Authorization 的 Token 类型决定。
|
|
18133
|
+
*
|
|
18134
|
+
* 仅可操作已经被当前身份订阅的日历。
|
|
18135
|
+
*/
|
|
18136
|
+
unsubscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18137
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18138
|
+
return this.httpInstance
|
|
18139
|
+
.request({
|
|
18140
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`, path),
|
|
18141
|
+
method: "POST",
|
|
18142
|
+
data,
|
|
18143
|
+
params,
|
|
18144
|
+
headers,
|
|
18145
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18146
|
+
})
|
|
18147
|
+
.catch((e) => {
|
|
18148
|
+
this.logger.error(formatErrors(e));
|
|
18149
|
+
throw e;
|
|
18150
|
+
});
|
|
18151
|
+
}),
|
|
18152
|
+
/**
|
|
18153
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscription&version=v4 click to debug }
|
|
18154
|
+
*
|
|
18155
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscription document }
|
|
18156
|
+
*
|
|
18157
|
+
* 取消订阅日历变更事件
|
|
18158
|
+
*
|
|
18159
|
+
* 该接口用于以用户身份取消订阅当前身份下日历列表中的日历变更事件。
|
|
18160
|
+
*/
|
|
18161
|
+
unsubscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18162
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18163
|
+
return this.httpInstance
|
|
18164
|
+
.request({
|
|
18165
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`, path),
|
|
18166
|
+
method: "POST",
|
|
18167
|
+
data,
|
|
18168
|
+
params,
|
|
18169
|
+
headers,
|
|
18170
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18171
|
+
})
|
|
18172
|
+
.catch((e) => {
|
|
18173
|
+
this.logger.error(formatErrors(e));
|
|
18174
|
+
throw e;
|
|
18175
|
+
});
|
|
18176
|
+
}),
|
|
18177
|
+
},
|
|
18178
|
+
/**
|
|
18179
|
+
* 日程参与人
|
|
18180
|
+
*/
|
|
18181
|
+
calendarEventAttendee: {
|
|
18182
|
+
/**
|
|
18183
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=batch_delete&version=v4 click to debug }
|
|
18184
|
+
*
|
|
18185
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete document }
|
|
18186
|
+
*
|
|
18187
|
+
* 删除日程参与人
|
|
18188
|
+
*
|
|
18189
|
+
* 批量删除日程的参与人。
|
|
18190
|
+
*
|
|
18191
|
+
* - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者。
|
|
18192
|
+
*/
|
|
18193
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18194
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18195
|
+
return this.httpInstance
|
|
18196
|
+
.request({
|
|
18197
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`, path),
|
|
18198
|
+
method: "POST",
|
|
18199
|
+
data,
|
|
18200
|
+
params,
|
|
18201
|
+
headers,
|
|
18202
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18203
|
+
})
|
|
18204
|
+
.catch((e) => {
|
|
18205
|
+
this.logger.error(formatErrors(e));
|
|
18206
|
+
throw e;
|
|
18207
|
+
});
|
|
18208
|
+
}),
|
|
18209
|
+
/**
|
|
18210
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=create&version=v4 click to debug }
|
|
18211
|
+
*
|
|
18212
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/create document }
|
|
18213
|
+
*
|
|
18214
|
+
* 创建日程参与人;
|
|
18215
|
+
*
|
|
18216
|
+
* 批量给日程添加参与人。
|
|
18217
|
+
*
|
|
18218
|
+
* - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者,或日程设置了「参与人可邀请其它参与人」权限。;;- 新添加的日程参与人必须与日程组织者在同一个企业内。;;- 使用该接口添加会议室后,会议室会进入异步的预约流程,请求结束不代表会议室预约成功,需后续再查询预约状态。;;- 每个日程最多只能有 3000 名参与人。;;- 开启管理员能力后预约会议室可不受会议室预约范围的限制(当前不支持用管理员身份给其他人的日程预约会议室)
|
|
18219
|
+
*/
|
|
18220
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18221
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18222
|
+
return this.httpInstance
|
|
18223
|
+
.request({
|
|
18224
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path),
|
|
18225
|
+
method: "POST",
|
|
18226
|
+
data,
|
|
18227
|
+
params,
|
|
18228
|
+
headers,
|
|
18229
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18230
|
+
})
|
|
18231
|
+
.catch((e) => {
|
|
18232
|
+
this.logger.error(formatErrors(e));
|
|
18233
|
+
throw e;
|
|
18234
|
+
});
|
|
18235
|
+
}),
|
|
18236
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18237
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18238
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
18239
|
+
const res = yield this.httpInstance
|
|
18240
|
+
.request({
|
|
18241
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path),
|
|
18242
|
+
method: "GET",
|
|
18024
18243
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
18025
18244
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
18026
18245
|
data,
|
|
@@ -18677,6 +18896,27 @@ class Client$T extends Client$U {
|
|
|
18677
18896
|
* freebusy
|
|
18678
18897
|
*/
|
|
18679
18898
|
freebusy: {
|
|
18899
|
+
/**
|
|
18900
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=batch&version=v4 click to debug }
|
|
18901
|
+
*
|
|
18902
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=calendar&resource=freebusy&version=v4 document }
|
|
18903
|
+
*/
|
|
18904
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18905
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18906
|
+
return this.httpInstance
|
|
18907
|
+
.request({
|
|
18908
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/batch`, path),
|
|
18909
|
+
method: "POST",
|
|
18910
|
+
data,
|
|
18911
|
+
params,
|
|
18912
|
+
headers,
|
|
18913
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
18914
|
+
})
|
|
18915
|
+
.catch((e) => {
|
|
18916
|
+
this.logger.error(formatErrors(e));
|
|
18917
|
+
throw e;
|
|
18918
|
+
});
|
|
18919
|
+
}),
|
|
18680
18920
|
/**
|
|
18681
18921
|
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=list&version=v4 click to debug }
|
|
18682
18922
|
*
|
|
@@ -19071,6 +19311,27 @@ class Client$Q extends Client$R {
|
|
|
19071
19311
|
* archive
|
|
19072
19312
|
*/
|
|
19073
19313
|
archive: {
|
|
19314
|
+
/**
|
|
19315
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=archive&apiName=create&version=v1 click to debug }
|
|
19316
|
+
*
|
|
19317
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=compensation&resource=archive&version=v1 document }
|
|
19318
|
+
*/
|
|
19319
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19320
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19321
|
+
return this.httpInstance
|
|
19322
|
+
.request({
|
|
19323
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/archives`, path),
|
|
19324
|
+
method: "POST",
|
|
19325
|
+
data,
|
|
19326
|
+
params,
|
|
19327
|
+
headers,
|
|
19328
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19329
|
+
})
|
|
19330
|
+
.catch((e) => {
|
|
19331
|
+
this.logger.error(formatErrors(e));
|
|
19332
|
+
throw e;
|
|
19333
|
+
});
|
|
19334
|
+
}),
|
|
19074
19335
|
/**
|
|
19075
19336
|
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=archive&apiName=query&version=v1 click to debug }
|
|
19076
19337
|
*
|
|
@@ -19405,6 +19666,220 @@ class Client$Q extends Client$R {
|
|
|
19405
19666
|
});
|
|
19406
19667
|
}),
|
|
19407
19668
|
},
|
|
19669
|
+
/**
|
|
19670
|
+
* lump_sum_payment
|
|
19671
|
+
*/
|
|
19672
|
+
lumpSumPayment: {
|
|
19673
|
+
/**
|
|
19674
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_create&version=v1 click to debug }
|
|
19675
|
+
*
|
|
19676
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=lump_sum_payment&version=v1 document }
|
|
19677
|
+
*/
|
|
19678
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19679
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19680
|
+
return this.httpInstance
|
|
19681
|
+
.request({
|
|
19682
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`, path),
|
|
19683
|
+
method: "POST",
|
|
19684
|
+
data,
|
|
19685
|
+
params,
|
|
19686
|
+
headers,
|
|
19687
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19688
|
+
})
|
|
19689
|
+
.catch((e) => {
|
|
19690
|
+
this.logger.error(formatErrors(e));
|
|
19691
|
+
throw e;
|
|
19692
|
+
});
|
|
19693
|
+
}),
|
|
19694
|
+
/**
|
|
19695
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_remove&version=v1 click to debug }
|
|
19696
|
+
*
|
|
19697
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=lump_sum_payment&version=v1 document }
|
|
19698
|
+
*/
|
|
19699
|
+
batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19700
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19701
|
+
return this.httpInstance
|
|
19702
|
+
.request({
|
|
19703
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`, path),
|
|
19704
|
+
method: "POST",
|
|
19705
|
+
data,
|
|
19706
|
+
params,
|
|
19707
|
+
headers,
|
|
19708
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19709
|
+
})
|
|
19710
|
+
.catch((e) => {
|
|
19711
|
+
this.logger.error(formatErrors(e));
|
|
19712
|
+
throw e;
|
|
19713
|
+
});
|
|
19714
|
+
}),
|
|
19715
|
+
/**
|
|
19716
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_update&version=v1 click to debug }
|
|
19717
|
+
*
|
|
19718
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=lump_sum_payment&version=v1 document }
|
|
19719
|
+
*/
|
|
19720
|
+
batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19721
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19722
|
+
return this.httpInstance
|
|
19723
|
+
.request({
|
|
19724
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`, path),
|
|
19725
|
+
method: "POST",
|
|
19726
|
+
data,
|
|
19727
|
+
params,
|
|
19728
|
+
headers,
|
|
19729
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19730
|
+
})
|
|
19731
|
+
.catch((e) => {
|
|
19732
|
+
this.logger.error(formatErrors(e));
|
|
19733
|
+
throw e;
|
|
19734
|
+
});
|
|
19735
|
+
}),
|
|
19736
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19737
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19738
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
19739
|
+
const res = yield this.httpInstance
|
|
19740
|
+
.request({
|
|
19741
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`, path),
|
|
19742
|
+
method: "POST",
|
|
19743
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
19744
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
19745
|
+
data,
|
|
19746
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
19747
|
+
arrayFormat: "repeat",
|
|
19748
|
+
}),
|
|
19749
|
+
})
|
|
19750
|
+
.catch((e) => {
|
|
19751
|
+
this.logger.error(formatErrors(e));
|
|
19752
|
+
});
|
|
19753
|
+
return res;
|
|
19754
|
+
});
|
|
19755
|
+
const Iterable = {
|
|
19756
|
+
[Symbol.asyncIterator]() {
|
|
19757
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
19758
|
+
let hasMore = true;
|
|
19759
|
+
let pageToken;
|
|
19760
|
+
while (hasMore) {
|
|
19761
|
+
try {
|
|
19762
|
+
const res = yield __await(sendRequest({
|
|
19763
|
+
headers,
|
|
19764
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
19765
|
+
data,
|
|
19766
|
+
}));
|
|
19767
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
19768
|
+
// @ts-ignore
|
|
19769
|
+
has_more,
|
|
19770
|
+
// @ts-ignore
|
|
19771
|
+
page_token,
|
|
19772
|
+
// @ts-ignore
|
|
19773
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
19774
|
+
yield yield __await(rest);
|
|
19775
|
+
hasMore = Boolean(has_more);
|
|
19776
|
+
pageToken = page_token || next_page_token;
|
|
19777
|
+
}
|
|
19778
|
+
catch (e) {
|
|
19779
|
+
yield yield __await(null);
|
|
19780
|
+
break;
|
|
19781
|
+
}
|
|
19782
|
+
}
|
|
19783
|
+
});
|
|
19784
|
+
},
|
|
19785
|
+
};
|
|
19786
|
+
return Iterable;
|
|
19787
|
+
}),
|
|
19788
|
+
/**
|
|
19789
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=query&version=v1 click to debug }
|
|
19790
|
+
*
|
|
19791
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=lump_sum_payment&version=v1 document }
|
|
19792
|
+
*/
|
|
19793
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19794
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19795
|
+
return this.httpInstance
|
|
19796
|
+
.request({
|
|
19797
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`, path),
|
|
19798
|
+
method: "POST",
|
|
19799
|
+
data,
|
|
19800
|
+
params,
|
|
19801
|
+
headers,
|
|
19802
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19803
|
+
})
|
|
19804
|
+
.catch((e) => {
|
|
19805
|
+
this.logger.error(formatErrors(e));
|
|
19806
|
+
throw e;
|
|
19807
|
+
});
|
|
19808
|
+
}),
|
|
19809
|
+
queryDetailWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19810
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19811
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
19812
|
+
const res = yield this.httpInstance
|
|
19813
|
+
.request({
|
|
19814
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`, path),
|
|
19815
|
+
method: "POST",
|
|
19816
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
19817
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
19818
|
+
data,
|
|
19819
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
19820
|
+
arrayFormat: "repeat",
|
|
19821
|
+
}),
|
|
19822
|
+
})
|
|
19823
|
+
.catch((e) => {
|
|
19824
|
+
this.logger.error(formatErrors(e));
|
|
19825
|
+
});
|
|
19826
|
+
return res;
|
|
19827
|
+
});
|
|
19828
|
+
const Iterable = {
|
|
19829
|
+
[Symbol.asyncIterator]() {
|
|
19830
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
19831
|
+
let hasMore = true;
|
|
19832
|
+
let pageToken;
|
|
19833
|
+
while (hasMore) {
|
|
19834
|
+
try {
|
|
19835
|
+
const res = yield __await(sendRequest({
|
|
19836
|
+
headers,
|
|
19837
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
19838
|
+
data,
|
|
19839
|
+
}));
|
|
19840
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
19841
|
+
// @ts-ignore
|
|
19842
|
+
has_more,
|
|
19843
|
+
// @ts-ignore
|
|
19844
|
+
page_token,
|
|
19845
|
+
// @ts-ignore
|
|
19846
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
19847
|
+
yield yield __await(rest);
|
|
19848
|
+
hasMore = Boolean(has_more);
|
|
19849
|
+
pageToken = page_token || next_page_token;
|
|
19850
|
+
}
|
|
19851
|
+
catch (e) {
|
|
19852
|
+
yield yield __await(null);
|
|
19853
|
+
break;
|
|
19854
|
+
}
|
|
19855
|
+
}
|
|
19856
|
+
});
|
|
19857
|
+
},
|
|
19858
|
+
};
|
|
19859
|
+
return Iterable;
|
|
19860
|
+
}),
|
|
19861
|
+
/**
|
|
19862
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=query_detail&version=v1 click to debug }
|
|
19863
|
+
*
|
|
19864
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_detail&project=compensation&resource=lump_sum_payment&version=v1 document }
|
|
19865
|
+
*/
|
|
19866
|
+
queryDetail: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19867
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19868
|
+
return this.httpInstance
|
|
19869
|
+
.request({
|
|
19870
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`, path),
|
|
19871
|
+
method: "POST",
|
|
19872
|
+
data,
|
|
19873
|
+
params,
|
|
19874
|
+
headers,
|
|
19875
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19876
|
+
})
|
|
19877
|
+
.catch((e) => {
|
|
19878
|
+
this.logger.error(formatErrors(e));
|
|
19879
|
+
throw e;
|
|
19880
|
+
});
|
|
19881
|
+
}),
|
|
19882
|
+
},
|
|
19408
19883
|
/**
|
|
19409
19884
|
* plan
|
|
19410
19885
|
*/
|
|
@@ -19483,6 +19958,342 @@ class Client$Q extends Client$R {
|
|
|
19483
19958
|
});
|
|
19484
19959
|
}),
|
|
19485
19960
|
},
|
|
19961
|
+
/**
|
|
19962
|
+
* recurring_payment
|
|
19963
|
+
*/
|
|
19964
|
+
recurringPayment: {
|
|
19965
|
+
/**
|
|
19966
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_create&version=v1 click to debug }
|
|
19967
|
+
*
|
|
19968
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=recurring_payment&version=v1 document }
|
|
19969
|
+
*
|
|
19970
|
+
* 创建经常性支付记录
|
|
19971
|
+
*/
|
|
19972
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19973
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19974
|
+
return this.httpInstance
|
|
19975
|
+
.request({
|
|
19976
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`, path),
|
|
19977
|
+
method: "POST",
|
|
19978
|
+
data,
|
|
19979
|
+
params,
|
|
19980
|
+
headers,
|
|
19981
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
19982
|
+
})
|
|
19983
|
+
.catch((e) => {
|
|
19984
|
+
this.logger.error(formatErrors(e));
|
|
19985
|
+
throw e;
|
|
19986
|
+
});
|
|
19987
|
+
}),
|
|
19988
|
+
/**
|
|
19989
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_remove&version=v1 click to debug }
|
|
19990
|
+
*
|
|
19991
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=recurring_payment&version=v1 document }
|
|
19992
|
+
*
|
|
19993
|
+
* 删除经常性支付记录
|
|
19994
|
+
*/
|
|
19995
|
+
batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19996
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19997
|
+
return this.httpInstance
|
|
19998
|
+
.request({
|
|
19999
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`, path),
|
|
20000
|
+
method: "POST",
|
|
20001
|
+
data,
|
|
20002
|
+
params,
|
|
20003
|
+
headers,
|
|
20004
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20005
|
+
})
|
|
20006
|
+
.catch((e) => {
|
|
20007
|
+
this.logger.error(formatErrors(e));
|
|
20008
|
+
throw e;
|
|
20009
|
+
});
|
|
20010
|
+
}),
|
|
20011
|
+
/**
|
|
20012
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_update&version=v1 click to debug }
|
|
20013
|
+
*
|
|
20014
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=recurring_payment&version=v1 document }
|
|
20015
|
+
*
|
|
20016
|
+
* 更新经常性支付记录
|
|
20017
|
+
*/
|
|
20018
|
+
batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20019
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20020
|
+
return this.httpInstance
|
|
20021
|
+
.request({
|
|
20022
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`, path),
|
|
20023
|
+
method: "POST",
|
|
20024
|
+
data,
|
|
20025
|
+
params,
|
|
20026
|
+
headers,
|
|
20027
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20028
|
+
})
|
|
20029
|
+
.catch((e) => {
|
|
20030
|
+
this.logger.error(formatErrors(e));
|
|
20031
|
+
throw e;
|
|
20032
|
+
});
|
|
20033
|
+
}),
|
|
20034
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20035
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20036
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
20037
|
+
const res = yield this.httpInstance
|
|
20038
|
+
.request({
|
|
20039
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path),
|
|
20040
|
+
method: "POST",
|
|
20041
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
20042
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
20043
|
+
data,
|
|
20044
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
20045
|
+
arrayFormat: "repeat",
|
|
20046
|
+
}),
|
|
20047
|
+
})
|
|
20048
|
+
.catch((e) => {
|
|
20049
|
+
this.logger.error(formatErrors(e));
|
|
20050
|
+
});
|
|
20051
|
+
return res;
|
|
20052
|
+
});
|
|
20053
|
+
const Iterable = {
|
|
20054
|
+
[Symbol.asyncIterator]() {
|
|
20055
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
20056
|
+
let hasMore = true;
|
|
20057
|
+
let pageToken;
|
|
20058
|
+
while (hasMore) {
|
|
20059
|
+
try {
|
|
20060
|
+
const res = yield __await(sendRequest({
|
|
20061
|
+
headers,
|
|
20062
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
20063
|
+
data,
|
|
20064
|
+
}));
|
|
20065
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
20066
|
+
// @ts-ignore
|
|
20067
|
+
has_more,
|
|
20068
|
+
// @ts-ignore
|
|
20069
|
+
page_token,
|
|
20070
|
+
// @ts-ignore
|
|
20071
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
20072
|
+
yield yield __await(rest);
|
|
20073
|
+
hasMore = Boolean(has_more);
|
|
20074
|
+
pageToken = page_token || next_page_token;
|
|
20075
|
+
}
|
|
20076
|
+
catch (e) {
|
|
20077
|
+
yield yield __await(null);
|
|
20078
|
+
break;
|
|
20079
|
+
}
|
|
20080
|
+
}
|
|
20081
|
+
});
|
|
20082
|
+
},
|
|
20083
|
+
};
|
|
20084
|
+
return Iterable;
|
|
20085
|
+
}),
|
|
20086
|
+
/**
|
|
20087
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=query&version=v1 click to debug }
|
|
20088
|
+
*
|
|
20089
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=recurring_payment&version=v1 document }
|
|
20090
|
+
*
|
|
20091
|
+
* 查询经常性支付记录
|
|
20092
|
+
*/
|
|
20093
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20094
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20095
|
+
return this.httpInstance
|
|
20096
|
+
.request({
|
|
20097
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path),
|
|
20098
|
+
method: "POST",
|
|
20099
|
+
data,
|
|
20100
|
+
params,
|
|
20101
|
+
headers,
|
|
20102
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20103
|
+
})
|
|
20104
|
+
.catch((e) => {
|
|
20105
|
+
this.logger.error(formatErrors(e));
|
|
20106
|
+
throw e;
|
|
20107
|
+
});
|
|
20108
|
+
}),
|
|
20109
|
+
},
|
|
20110
|
+
/**
|
|
20111
|
+
* social_archive
|
|
20112
|
+
*/
|
|
20113
|
+
socialArchive: {
|
|
20114
|
+
/**
|
|
20115
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive&apiName=query&version=v1 click to debug }
|
|
20116
|
+
*
|
|
20117
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive&version=v1 document }
|
|
20118
|
+
*
|
|
20119
|
+
* 通过员工ID和生效时间查询参保档案
|
|
20120
|
+
*/
|
|
20121
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20122
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20123
|
+
return this.httpInstance
|
|
20124
|
+
.request({
|
|
20125
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive/query`, path),
|
|
20126
|
+
method: "POST",
|
|
20127
|
+
data,
|
|
20128
|
+
params,
|
|
20129
|
+
headers,
|
|
20130
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20131
|
+
})
|
|
20132
|
+
.catch((e) => {
|
|
20133
|
+
this.logger.error(formatErrors(e));
|
|
20134
|
+
throw e;
|
|
20135
|
+
});
|
|
20136
|
+
}),
|
|
20137
|
+
},
|
|
20138
|
+
/**
|
|
20139
|
+
* social_archive_adjust_record
|
|
20140
|
+
*/
|
|
20141
|
+
socialArchiveAdjustRecord: {
|
|
20142
|
+
/**
|
|
20143
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive_adjust_record&apiName=query&version=v1 click to debug }
|
|
20144
|
+
*
|
|
20145
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive_adjust_record&version=v1 document }
|
|
20146
|
+
*
|
|
20147
|
+
* 根据员工ID查询待增员、待减员记录
|
|
20148
|
+
*/
|
|
20149
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20150
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20151
|
+
return this.httpInstance
|
|
20152
|
+
.request({
|
|
20153
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`, path),
|
|
20154
|
+
method: "POST",
|
|
20155
|
+
data,
|
|
20156
|
+
params,
|
|
20157
|
+
headers,
|
|
20158
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20159
|
+
})
|
|
20160
|
+
.catch((e) => {
|
|
20161
|
+
this.logger.error(formatErrors(e));
|
|
20162
|
+
throw e;
|
|
20163
|
+
});
|
|
20164
|
+
}),
|
|
20165
|
+
},
|
|
20166
|
+
/**
|
|
20167
|
+
* social_insurance
|
|
20168
|
+
*/
|
|
20169
|
+
socialInsurance: {
|
|
20170
|
+
/**
|
|
20171
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_insurance&apiName=list&version=v1 click to debug }
|
|
20172
|
+
*
|
|
20173
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_insurance&version=v1 document }
|
|
20174
|
+
*
|
|
20175
|
+
* 获取险种列表
|
|
20176
|
+
*/
|
|
20177
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20178
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20179
|
+
return this.httpInstance
|
|
20180
|
+
.request({
|
|
20181
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_insurances`, path),
|
|
20182
|
+
method: "GET",
|
|
20183
|
+
data,
|
|
20184
|
+
params,
|
|
20185
|
+
headers,
|
|
20186
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20187
|
+
})
|
|
20188
|
+
.catch((e) => {
|
|
20189
|
+
this.logger.error(formatErrors(e));
|
|
20190
|
+
throw e;
|
|
20191
|
+
});
|
|
20192
|
+
}),
|
|
20193
|
+
},
|
|
20194
|
+
/**
|
|
20195
|
+
* social_plan
|
|
20196
|
+
*/
|
|
20197
|
+
socialPlan: {
|
|
20198
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20199
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20200
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
20201
|
+
const res = yield this.httpInstance
|
|
20202
|
+
.request({
|
|
20203
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path),
|
|
20204
|
+
method: "GET",
|
|
20205
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
20206
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
20207
|
+
data,
|
|
20208
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
20209
|
+
arrayFormat: "repeat",
|
|
20210
|
+
}),
|
|
20211
|
+
})
|
|
20212
|
+
.catch((e) => {
|
|
20213
|
+
this.logger.error(formatErrors(e));
|
|
20214
|
+
});
|
|
20215
|
+
return res;
|
|
20216
|
+
});
|
|
20217
|
+
const Iterable = {
|
|
20218
|
+
[Symbol.asyncIterator]() {
|
|
20219
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
20220
|
+
let hasMore = true;
|
|
20221
|
+
let pageToken;
|
|
20222
|
+
while (hasMore) {
|
|
20223
|
+
try {
|
|
20224
|
+
const res = yield __await(sendRequest({
|
|
20225
|
+
headers,
|
|
20226
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
20227
|
+
data,
|
|
20228
|
+
}));
|
|
20229
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
20230
|
+
// @ts-ignore
|
|
20231
|
+
has_more,
|
|
20232
|
+
// @ts-ignore
|
|
20233
|
+
page_token,
|
|
20234
|
+
// @ts-ignore
|
|
20235
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
20236
|
+
yield yield __await(rest);
|
|
20237
|
+
hasMore = Boolean(has_more);
|
|
20238
|
+
pageToken = page_token || next_page_token;
|
|
20239
|
+
}
|
|
20240
|
+
catch (e) {
|
|
20241
|
+
yield yield __await(null);
|
|
20242
|
+
break;
|
|
20243
|
+
}
|
|
20244
|
+
}
|
|
20245
|
+
});
|
|
20246
|
+
},
|
|
20247
|
+
};
|
|
20248
|
+
return Iterable;
|
|
20249
|
+
}),
|
|
20250
|
+
/**
|
|
20251
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=list&version=v1 click to debug }
|
|
20252
|
+
*
|
|
20253
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_plan&version=v1 document }
|
|
20254
|
+
*
|
|
20255
|
+
* 分页获取参保方案列表
|
|
20256
|
+
*/
|
|
20257
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20258
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20259
|
+
return this.httpInstance
|
|
20260
|
+
.request({
|
|
20261
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path),
|
|
20262
|
+
method: "GET",
|
|
20263
|
+
data,
|
|
20264
|
+
params,
|
|
20265
|
+
headers,
|
|
20266
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20267
|
+
})
|
|
20268
|
+
.catch((e) => {
|
|
20269
|
+
this.logger.error(formatErrors(e));
|
|
20270
|
+
throw e;
|
|
20271
|
+
});
|
|
20272
|
+
}),
|
|
20273
|
+
/**
|
|
20274
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=query&version=v1 click to debug }
|
|
20275
|
+
*
|
|
20276
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_plan&version=v1 document }
|
|
20277
|
+
*
|
|
20278
|
+
* 批量查询参保方案
|
|
20279
|
+
*/
|
|
20280
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20281
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20282
|
+
return this.httpInstance
|
|
20283
|
+
.request({
|
|
20284
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans/query`, path),
|
|
20285
|
+
method: "POST",
|
|
20286
|
+
data,
|
|
20287
|
+
params,
|
|
20288
|
+
headers,
|
|
20289
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
20290
|
+
})
|
|
20291
|
+
.catch((e) => {
|
|
20292
|
+
this.logger.error(formatErrors(e));
|
|
20293
|
+
throw e;
|
|
20294
|
+
});
|
|
20295
|
+
}),
|
|
20296
|
+
},
|
|
19486
20297
|
},
|
|
19487
20298
|
};
|
|
19488
20299
|
}
|
|
@@ -30274,6 +31085,29 @@ class Client$M extends Client$N {
|
|
|
30274
31085
|
throw e;
|
|
30275
31086
|
});
|
|
30276
31087
|
}),
|
|
31088
|
+
/**
|
|
31089
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approval_groups&apiName=open_query_position_change_list_by_ids&version=v2 click to debug }
|
|
31090
|
+
*
|
|
31091
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=open_query_position_change_list_by_ids&project=corehr&resource=approval_groups&version=v2 document }
|
|
31092
|
+
*
|
|
31093
|
+
* 获取岗位调整信息详情
|
|
31094
|
+
*/
|
|
31095
|
+
openQueryPositionChangeListByIds: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31096
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31097
|
+
return this.httpInstance
|
|
31098
|
+
.request({
|
|
31099
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`, path),
|
|
31100
|
+
method: "POST",
|
|
31101
|
+
data,
|
|
31102
|
+
params,
|
|
31103
|
+
headers,
|
|
31104
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
31105
|
+
})
|
|
31106
|
+
.catch((e) => {
|
|
31107
|
+
this.logger.error(formatErrors(e));
|
|
31108
|
+
throw e;
|
|
31109
|
+
});
|
|
31110
|
+
}),
|
|
30277
31111
|
},
|
|
30278
31112
|
/**
|
|
30279
31113
|
* approver
|
|
@@ -32461,6 +33295,34 @@ class Client$M extends Client$N {
|
|
|
32461
33295
|
});
|
|
32462
33296
|
}),
|
|
32463
33297
|
},
|
|
33298
|
+
/**
|
|
33299
|
+
* draft
|
|
33300
|
+
*/
|
|
33301
|
+
draft: {
|
|
33302
|
+
/**
|
|
33303
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=draft&apiName=get&version=v2 click to debug }
|
|
33304
|
+
*
|
|
33305
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=draft&version=v2 document }
|
|
33306
|
+
*
|
|
33307
|
+
* 根据组织架构调整 ID 查询调整流程信息
|
|
33308
|
+
*/
|
|
33309
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33310
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33311
|
+
return this.httpInstance
|
|
33312
|
+
.request({
|
|
33313
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`, path),
|
|
33314
|
+
method: "GET",
|
|
33315
|
+
data,
|
|
33316
|
+
params,
|
|
33317
|
+
headers,
|
|
33318
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
33319
|
+
})
|
|
33320
|
+
.catch((e) => {
|
|
33321
|
+
this.logger.error(formatErrors(e));
|
|
33322
|
+
throw e;
|
|
33323
|
+
});
|
|
33324
|
+
}),
|
|
33325
|
+
},
|
|
32464
33326
|
/**
|
|
32465
33327
|
* employee
|
|
32466
33328
|
*/
|
|
@@ -32981,18 +33843,18 @@ class Client$M extends Client$N {
|
|
|
32981
33843
|
*/
|
|
32982
33844
|
job: {
|
|
32983
33845
|
/**
|
|
32984
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=
|
|
33846
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=batch_get&version=v2 click to debug }
|
|
32985
33847
|
*
|
|
32986
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
33848
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job&version=v2 document }
|
|
32987
33849
|
*
|
|
32988
|
-
*
|
|
33850
|
+
* 批量获取职务信息
|
|
32989
33851
|
*/
|
|
32990
|
-
|
|
33852
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
32991
33853
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
32992
33854
|
return this.httpInstance
|
|
32993
33855
|
.request({
|
|
32994
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs
|
|
32995
|
-
method: "
|
|
33856
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`, path),
|
|
33857
|
+
method: "POST",
|
|
32996
33858
|
data,
|
|
32997
33859
|
params,
|
|
32998
33860
|
headers,
|
|
@@ -33004,90 +33866,17 @@ class Client$M extends Client$N {
|
|
|
33004
33866
|
});
|
|
33005
33867
|
}),
|
|
33006
33868
|
/**
|
|
33007
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=
|
|
33008
|
-
*
|
|
33009
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
|
|
33869
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v2 click to debug }
|
|
33010
33870
|
*
|
|
33011
|
-
*
|
|
33012
|
-
*/
|
|
33013
|
-
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33014
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33015
|
-
return this.httpInstance
|
|
33016
|
-
.request({
|
|
33017
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path),
|
|
33018
|
-
method: "GET",
|
|
33019
|
-
data,
|
|
33020
|
-
params,
|
|
33021
|
-
headers,
|
|
33022
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
33023
|
-
})
|
|
33024
|
-
.catch((e) => {
|
|
33025
|
-
this.logger.error(formatErrors(e));
|
|
33026
|
-
throw e;
|
|
33027
|
-
});
|
|
33028
|
-
}),
|
|
33029
|
-
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33030
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33031
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
33032
|
-
const res = yield this.httpInstance
|
|
33033
|
-
.request({
|
|
33034
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
|
|
33035
|
-
method: "GET",
|
|
33036
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
33037
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
33038
|
-
data,
|
|
33039
|
-
paramsSerializer: (params) => qs.stringify(params, {
|
|
33040
|
-
arrayFormat: "repeat",
|
|
33041
|
-
}),
|
|
33042
|
-
})
|
|
33043
|
-
.catch((e) => {
|
|
33044
|
-
this.logger.error(formatErrors(e));
|
|
33045
|
-
});
|
|
33046
|
-
return res;
|
|
33047
|
-
});
|
|
33048
|
-
const Iterable = {
|
|
33049
|
-
[Symbol.asyncIterator]() {
|
|
33050
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
33051
|
-
let hasMore = true;
|
|
33052
|
-
let pageToken;
|
|
33053
|
-
while (hasMore) {
|
|
33054
|
-
try {
|
|
33055
|
-
const res = yield __await(sendRequest({
|
|
33056
|
-
headers,
|
|
33057
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
33058
|
-
data,
|
|
33059
|
-
}));
|
|
33060
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
33061
|
-
// @ts-ignore
|
|
33062
|
-
has_more,
|
|
33063
|
-
// @ts-ignore
|
|
33064
|
-
page_token,
|
|
33065
|
-
// @ts-ignore
|
|
33066
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
33067
|
-
yield yield __await(rest);
|
|
33068
|
-
hasMore = Boolean(has_more);
|
|
33069
|
-
pageToken = page_token || next_page_token;
|
|
33070
|
-
}
|
|
33071
|
-
catch (e) {
|
|
33072
|
-
yield yield __await(null);
|
|
33073
|
-
break;
|
|
33074
|
-
}
|
|
33075
|
-
}
|
|
33076
|
-
});
|
|
33077
|
-
},
|
|
33078
|
-
};
|
|
33079
|
-
return Iterable;
|
|
33080
|
-
}),
|
|
33081
|
-
/**
|
|
33082
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_recent_change&version=v2 click to debug }
|
|
33871
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=job&version=v2 document }
|
|
33083
33872
|
*
|
|
33084
|
-
*
|
|
33873
|
+
* 根据 ID 查询单个职务。
|
|
33085
33874
|
*/
|
|
33086
|
-
|
|
33875
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33087
33876
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33088
33877
|
return this.httpInstance
|
|
33089
33878
|
.request({
|
|
33090
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs
|
|
33879
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`, path),
|
|
33091
33880
|
method: "GET",
|
|
33092
33881
|
data,
|
|
33093
33882
|
params,
|
|
@@ -33099,118 +33888,19 @@ class Client$M extends Client$N {
|
|
|
33099
33888
|
throw e;
|
|
33100
33889
|
});
|
|
33101
33890
|
}),
|
|
33102
|
-
},
|
|
33103
|
-
/**
|
|
33104
|
-
* job_change
|
|
33105
|
-
*/
|
|
33106
|
-
jobChange: {
|
|
33107
|
-
/**
|
|
33108
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v2 click to debug }
|
|
33109
|
-
*
|
|
33110
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_change&version=v2 document }
|
|
33111
|
-
*/
|
|
33112
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33113
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33114
|
-
return this.httpInstance
|
|
33115
|
-
.request({
|
|
33116
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes`, path),
|
|
33117
|
-
method: "POST",
|
|
33118
|
-
data,
|
|
33119
|
-
params,
|
|
33120
|
-
headers,
|
|
33121
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
33122
|
-
})
|
|
33123
|
-
.catch((e) => {
|
|
33124
|
-
this.logger.error(formatErrors(e));
|
|
33125
|
-
throw e;
|
|
33126
|
-
});
|
|
33127
|
-
}),
|
|
33128
|
-
/**
|
|
33129
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=revoke&version=v2 click to debug }
|
|
33130
|
-
*
|
|
33131
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=revoke&project=corehr&resource=job_change&version=v2 document }
|
|
33132
|
-
*/
|
|
33133
|
-
revoke: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33134
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33135
|
-
return this.httpInstance
|
|
33136
|
-
.request({
|
|
33137
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`, path),
|
|
33138
|
-
method: "POST",
|
|
33139
|
-
data,
|
|
33140
|
-
params,
|
|
33141
|
-
headers,
|
|
33142
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
33143
|
-
})
|
|
33144
|
-
.catch((e) => {
|
|
33145
|
-
this.logger.error(formatErrors(e));
|
|
33146
|
-
throw e;
|
|
33147
|
-
});
|
|
33148
|
-
}),
|
|
33149
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33150
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33151
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
33152
|
-
const res = yield this.httpInstance
|
|
33153
|
-
.request({
|
|
33154
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
|
|
33155
|
-
method: "POST",
|
|
33156
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
33157
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
33158
|
-
data,
|
|
33159
|
-
paramsSerializer: (params) => qs.stringify(params, {
|
|
33160
|
-
arrayFormat: "repeat",
|
|
33161
|
-
}),
|
|
33162
|
-
})
|
|
33163
|
-
.catch((e) => {
|
|
33164
|
-
this.logger.error(formatErrors(e));
|
|
33165
|
-
});
|
|
33166
|
-
return res;
|
|
33167
|
-
});
|
|
33168
|
-
const Iterable = {
|
|
33169
|
-
[Symbol.asyncIterator]() {
|
|
33170
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
33171
|
-
let hasMore = true;
|
|
33172
|
-
let pageToken;
|
|
33173
|
-
while (hasMore) {
|
|
33174
|
-
try {
|
|
33175
|
-
const res = yield __await(sendRequest({
|
|
33176
|
-
headers,
|
|
33177
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
33178
|
-
data,
|
|
33179
|
-
}));
|
|
33180
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
33181
|
-
// @ts-ignore
|
|
33182
|
-
has_more,
|
|
33183
|
-
// @ts-ignore
|
|
33184
|
-
page_token,
|
|
33185
|
-
// @ts-ignore
|
|
33186
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
33187
|
-
yield yield __await(rest);
|
|
33188
|
-
hasMore = Boolean(has_more);
|
|
33189
|
-
pageToken = page_token || next_page_token;
|
|
33190
|
-
}
|
|
33191
|
-
catch (e) {
|
|
33192
|
-
yield yield __await(null);
|
|
33193
|
-
break;
|
|
33194
|
-
}
|
|
33195
|
-
}
|
|
33196
|
-
});
|
|
33197
|
-
},
|
|
33198
|
-
};
|
|
33199
|
-
return Iterable;
|
|
33200
|
-
}),
|
|
33201
33891
|
/**
|
|
33202
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
33892
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v2 click to debug }
|
|
33203
33893
|
*
|
|
33204
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
33894
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
|
|
33205
33895
|
*
|
|
33206
|
-
*
|
|
33896
|
+
* 分页查询职务数据
|
|
33207
33897
|
*/
|
|
33208
|
-
|
|
33898
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33209
33899
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33210
33900
|
return this.httpInstance
|
|
33211
33901
|
.request({
|
|
33212
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
33213
|
-
method: "
|
|
33902
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path),
|
|
33903
|
+
method: "GET",
|
|
33214
33904
|
data,
|
|
33215
33905
|
params,
|
|
33216
33906
|
headers,
|
|
@@ -33221,23 +33911,18 @@ class Client$M extends Client$N {
|
|
|
33221
33911
|
throw e;
|
|
33222
33912
|
});
|
|
33223
33913
|
}),
|
|
33224
|
-
},
|
|
33225
|
-
/**
|
|
33226
|
-
* job_family
|
|
33227
|
-
*/
|
|
33228
|
-
jobFamily: {
|
|
33229
33914
|
/**
|
|
33230
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
33915
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_multi_timeline&version=v2 click to debug }
|
|
33231
33916
|
*
|
|
33232
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
33917
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=job&version=v2 document }
|
|
33233
33918
|
*
|
|
33234
|
-
*
|
|
33919
|
+
* 查询生效时间在指定时间范围的职务
|
|
33235
33920
|
*/
|
|
33236
|
-
|
|
33921
|
+
queryMultiTimeline: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33237
33922
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33238
33923
|
return this.httpInstance
|
|
33239
33924
|
.request({
|
|
33240
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
33925
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`, path),
|
|
33241
33926
|
method: "POST",
|
|
33242
33927
|
data,
|
|
33243
33928
|
params,
|
|
@@ -33254,7 +33939,253 @@ class Client$M extends Client$N {
|
|
|
33254
33939
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
33255
33940
|
const res = yield this.httpInstance
|
|
33256
33941
|
.request({
|
|
33257
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
33942
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
|
|
33943
|
+
method: "GET",
|
|
33944
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
33945
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
33946
|
+
data,
|
|
33947
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
33948
|
+
arrayFormat: "repeat",
|
|
33949
|
+
}),
|
|
33950
|
+
})
|
|
33951
|
+
.catch((e) => {
|
|
33952
|
+
this.logger.error(formatErrors(e));
|
|
33953
|
+
});
|
|
33954
|
+
return res;
|
|
33955
|
+
});
|
|
33956
|
+
const Iterable = {
|
|
33957
|
+
[Symbol.asyncIterator]() {
|
|
33958
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
33959
|
+
let hasMore = true;
|
|
33960
|
+
let pageToken;
|
|
33961
|
+
while (hasMore) {
|
|
33962
|
+
try {
|
|
33963
|
+
const res = yield __await(sendRequest({
|
|
33964
|
+
headers,
|
|
33965
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
33966
|
+
data,
|
|
33967
|
+
}));
|
|
33968
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
33969
|
+
// @ts-ignore
|
|
33970
|
+
has_more,
|
|
33971
|
+
// @ts-ignore
|
|
33972
|
+
page_token,
|
|
33973
|
+
// @ts-ignore
|
|
33974
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
33975
|
+
yield yield __await(rest);
|
|
33976
|
+
hasMore = Boolean(has_more);
|
|
33977
|
+
pageToken = page_token || next_page_token;
|
|
33978
|
+
}
|
|
33979
|
+
catch (e) {
|
|
33980
|
+
yield yield __await(null);
|
|
33981
|
+
break;
|
|
33982
|
+
}
|
|
33983
|
+
}
|
|
33984
|
+
});
|
|
33985
|
+
},
|
|
33986
|
+
};
|
|
33987
|
+
return Iterable;
|
|
33988
|
+
}),
|
|
33989
|
+
/**
|
|
33990
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_recent_change&version=v2 click to debug }
|
|
33991
|
+
*
|
|
33992
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job&version=v2 document }
|
|
33993
|
+
*/
|
|
33994
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33995
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33996
|
+
return this.httpInstance
|
|
33997
|
+
.request({
|
|
33998
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
|
|
33999
|
+
method: "GET",
|
|
34000
|
+
data,
|
|
34001
|
+
params,
|
|
34002
|
+
headers,
|
|
34003
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34004
|
+
})
|
|
34005
|
+
.catch((e) => {
|
|
34006
|
+
this.logger.error(formatErrors(e));
|
|
34007
|
+
throw e;
|
|
34008
|
+
});
|
|
34009
|
+
}),
|
|
34010
|
+
},
|
|
34011
|
+
/**
|
|
34012
|
+
* job_change
|
|
34013
|
+
*/
|
|
34014
|
+
jobChange: {
|
|
34015
|
+
/**
|
|
34016
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v2 click to debug }
|
|
34017
|
+
*
|
|
34018
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_change&version=v2 document }
|
|
34019
|
+
*/
|
|
34020
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34021
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34022
|
+
return this.httpInstance
|
|
34023
|
+
.request({
|
|
34024
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes`, path),
|
|
34025
|
+
method: "POST",
|
|
34026
|
+
data,
|
|
34027
|
+
params,
|
|
34028
|
+
headers,
|
|
34029
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34030
|
+
})
|
|
34031
|
+
.catch((e) => {
|
|
34032
|
+
this.logger.error(formatErrors(e));
|
|
34033
|
+
throw e;
|
|
34034
|
+
});
|
|
34035
|
+
}),
|
|
34036
|
+
/**
|
|
34037
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=revoke&version=v2 click to debug }
|
|
34038
|
+
*
|
|
34039
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=revoke&project=corehr&resource=job_change&version=v2 document }
|
|
34040
|
+
*/
|
|
34041
|
+
revoke: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34042
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34043
|
+
return this.httpInstance
|
|
34044
|
+
.request({
|
|
34045
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`, path),
|
|
34046
|
+
method: "POST",
|
|
34047
|
+
data,
|
|
34048
|
+
params,
|
|
34049
|
+
headers,
|
|
34050
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34051
|
+
})
|
|
34052
|
+
.catch((e) => {
|
|
34053
|
+
this.logger.error(formatErrors(e));
|
|
34054
|
+
throw e;
|
|
34055
|
+
});
|
|
34056
|
+
}),
|
|
34057
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34058
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34059
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34060
|
+
const res = yield this.httpInstance
|
|
34061
|
+
.request({
|
|
34062
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
|
|
34063
|
+
method: "POST",
|
|
34064
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
34065
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
34066
|
+
data,
|
|
34067
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
34068
|
+
arrayFormat: "repeat",
|
|
34069
|
+
}),
|
|
34070
|
+
})
|
|
34071
|
+
.catch((e) => {
|
|
34072
|
+
this.logger.error(formatErrors(e));
|
|
34073
|
+
});
|
|
34074
|
+
return res;
|
|
34075
|
+
});
|
|
34076
|
+
const Iterable = {
|
|
34077
|
+
[Symbol.asyncIterator]() {
|
|
34078
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
34079
|
+
let hasMore = true;
|
|
34080
|
+
let pageToken;
|
|
34081
|
+
while (hasMore) {
|
|
34082
|
+
try {
|
|
34083
|
+
const res = yield __await(sendRequest({
|
|
34084
|
+
headers,
|
|
34085
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
34086
|
+
data,
|
|
34087
|
+
}));
|
|
34088
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
34089
|
+
// @ts-ignore
|
|
34090
|
+
has_more,
|
|
34091
|
+
// @ts-ignore
|
|
34092
|
+
page_token,
|
|
34093
|
+
// @ts-ignore
|
|
34094
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
34095
|
+
yield yield __await(rest);
|
|
34096
|
+
hasMore = Boolean(has_more);
|
|
34097
|
+
pageToken = page_token || next_page_token;
|
|
34098
|
+
}
|
|
34099
|
+
catch (e) {
|
|
34100
|
+
yield yield __await(null);
|
|
34101
|
+
break;
|
|
34102
|
+
}
|
|
34103
|
+
}
|
|
34104
|
+
});
|
|
34105
|
+
},
|
|
34106
|
+
};
|
|
34107
|
+
return Iterable;
|
|
34108
|
+
}),
|
|
34109
|
+
/**
|
|
34110
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
|
|
34111
|
+
*
|
|
34112
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
|
|
34113
|
+
*
|
|
34114
|
+
* 获取员工异动列表
|
|
34115
|
+
*/
|
|
34116
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34117
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34118
|
+
return this.httpInstance
|
|
34119
|
+
.request({
|
|
34120
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
|
|
34121
|
+
method: "POST",
|
|
34122
|
+
data,
|
|
34123
|
+
params,
|
|
34124
|
+
headers,
|
|
34125
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34126
|
+
})
|
|
34127
|
+
.catch((e) => {
|
|
34128
|
+
this.logger.error(formatErrors(e));
|
|
34129
|
+
throw e;
|
|
34130
|
+
});
|
|
34131
|
+
}),
|
|
34132
|
+
},
|
|
34133
|
+
/**
|
|
34134
|
+
* job_family
|
|
34135
|
+
*/
|
|
34136
|
+
jobFamily: {
|
|
34137
|
+
/**
|
|
34138
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=batch_get&version=v2 click to debug }
|
|
34139
|
+
*
|
|
34140
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
|
|
34141
|
+
*
|
|
34142
|
+
* 批量获取序列信息
|
|
34143
|
+
*/
|
|
34144
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34145
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34146
|
+
return this.httpInstance
|
|
34147
|
+
.request({
|
|
34148
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`, path),
|
|
34149
|
+
method: "POST",
|
|
34150
|
+
data,
|
|
34151
|
+
params,
|
|
34152
|
+
headers,
|
|
34153
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34154
|
+
})
|
|
34155
|
+
.catch((e) => {
|
|
34156
|
+
this.logger.error(formatErrors(e));
|
|
34157
|
+
throw e;
|
|
34158
|
+
});
|
|
34159
|
+
}),
|
|
34160
|
+
/**
|
|
34161
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=query_multi_timeline&version=v2 click to debug }
|
|
34162
|
+
*
|
|
34163
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=job_family&version=v2 document }
|
|
34164
|
+
*
|
|
34165
|
+
* 查询生效时间在指定时间范围的序列
|
|
34166
|
+
*/
|
|
34167
|
+
queryMultiTimeline: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34168
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34169
|
+
return this.httpInstance
|
|
34170
|
+
.request({
|
|
34171
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`, path),
|
|
34172
|
+
method: "POST",
|
|
34173
|
+
data,
|
|
34174
|
+
params,
|
|
34175
|
+
headers,
|
|
34176
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34177
|
+
})
|
|
34178
|
+
.catch((e) => {
|
|
34179
|
+
this.logger.error(formatErrors(e));
|
|
34180
|
+
throw e;
|
|
34181
|
+
});
|
|
34182
|
+
}),
|
|
34183
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34184
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34185
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34186
|
+
const res = yield this.httpInstance
|
|
34187
|
+
.request({
|
|
34188
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`, path),
|
|
33258
34189
|
method: "GET",
|
|
33259
34190
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
33260
34191
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -33887,6 +34818,126 @@ class Client$M extends Client$N {
|
|
|
33887
34818
|
});
|
|
33888
34819
|
}),
|
|
33889
34820
|
},
|
|
34821
|
+
/**
|
|
34822
|
+
* pathway
|
|
34823
|
+
*/
|
|
34824
|
+
pathway: {
|
|
34825
|
+
/**
|
|
34826
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=active&version=v2 click to debug }
|
|
34827
|
+
*
|
|
34828
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=pathway&version=v2 document }
|
|
34829
|
+
*
|
|
34830
|
+
* 启/停用通道
|
|
34831
|
+
*/
|
|
34832
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34833
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34834
|
+
return this.httpInstance
|
|
34835
|
+
.request({
|
|
34836
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/active`, path),
|
|
34837
|
+
method: "POST",
|
|
34838
|
+
data,
|
|
34839
|
+
params,
|
|
34840
|
+
headers,
|
|
34841
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34842
|
+
})
|
|
34843
|
+
.catch((e) => {
|
|
34844
|
+
this.logger.error(formatErrors(e));
|
|
34845
|
+
throw e;
|
|
34846
|
+
});
|
|
34847
|
+
}),
|
|
34848
|
+
/**
|
|
34849
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=batch_get&version=v2 click to debug }
|
|
34850
|
+
*
|
|
34851
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=pathway&version=v2 document }
|
|
34852
|
+
*
|
|
34853
|
+
* 通过通道 ID 批量获取通道信息
|
|
34854
|
+
*/
|
|
34855
|
+
batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34856
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34857
|
+
return this.httpInstance
|
|
34858
|
+
.request({
|
|
34859
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`, path),
|
|
34860
|
+
method: "POST",
|
|
34861
|
+
data,
|
|
34862
|
+
params,
|
|
34863
|
+
headers,
|
|
34864
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34865
|
+
})
|
|
34866
|
+
.catch((e) => {
|
|
34867
|
+
this.logger.error(formatErrors(e));
|
|
34868
|
+
throw e;
|
|
34869
|
+
});
|
|
34870
|
+
}),
|
|
34871
|
+
/**
|
|
34872
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=create&version=v2 click to debug }
|
|
34873
|
+
*
|
|
34874
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=pathway&version=v2 document }
|
|
34875
|
+
*
|
|
34876
|
+
* 创建通道
|
|
34877
|
+
*/
|
|
34878
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34879
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34880
|
+
return this.httpInstance
|
|
34881
|
+
.request({
|
|
34882
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways`, path),
|
|
34883
|
+
method: "POST",
|
|
34884
|
+
data,
|
|
34885
|
+
params,
|
|
34886
|
+
headers,
|
|
34887
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34888
|
+
})
|
|
34889
|
+
.catch((e) => {
|
|
34890
|
+
this.logger.error(formatErrors(e));
|
|
34891
|
+
throw e;
|
|
34892
|
+
});
|
|
34893
|
+
}),
|
|
34894
|
+
/**
|
|
34895
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=delete&version=v2 click to debug }
|
|
34896
|
+
*
|
|
34897
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pathway&version=v2 document }
|
|
34898
|
+
*
|
|
34899
|
+
* 删除通道
|
|
34900
|
+
*/
|
|
34901
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34902
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34903
|
+
return this.httpInstance
|
|
34904
|
+
.request({
|
|
34905
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`, path),
|
|
34906
|
+
method: "DELETE",
|
|
34907
|
+
data,
|
|
34908
|
+
params,
|
|
34909
|
+
headers,
|
|
34910
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34911
|
+
})
|
|
34912
|
+
.catch((e) => {
|
|
34913
|
+
this.logger.error(formatErrors(e));
|
|
34914
|
+
throw e;
|
|
34915
|
+
});
|
|
34916
|
+
}),
|
|
34917
|
+
/**
|
|
34918
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=patch&version=v2 click to debug }
|
|
34919
|
+
*
|
|
34920
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pathway&version=v2 document }
|
|
34921
|
+
*
|
|
34922
|
+
* 更新通道信息
|
|
34923
|
+
*/
|
|
34924
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34925
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34926
|
+
return this.httpInstance
|
|
34927
|
+
.request({
|
|
34928
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`, path),
|
|
34929
|
+
method: "PATCH",
|
|
34930
|
+
data,
|
|
34931
|
+
params,
|
|
34932
|
+
headers,
|
|
34933
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34934
|
+
})
|
|
34935
|
+
.catch((e) => {
|
|
34936
|
+
this.logger.error(formatErrors(e));
|
|
34937
|
+
throw e;
|
|
34938
|
+
});
|
|
34939
|
+
}),
|
|
34940
|
+
},
|
|
33890
34941
|
/**
|
|
33891
34942
|
* person
|
|
33892
34943
|
*/
|
|
@@ -33937,21 +34988,21 @@ class Client$M extends Client$N {
|
|
|
33937
34988
|
}),
|
|
33938
34989
|
},
|
|
33939
34990
|
/**
|
|
33940
|
-
*
|
|
34991
|
+
* position
|
|
33941
34992
|
*/
|
|
33942
|
-
|
|
34993
|
+
position: {
|
|
33943
34994
|
/**
|
|
33944
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
34995
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=active&version=v2 click to debug }
|
|
33945
34996
|
*
|
|
33946
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
34997
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=position&version=v2 document }
|
|
33947
34998
|
*
|
|
33948
|
-
*
|
|
34999
|
+
* 启/停用岗位
|
|
33949
35000
|
*/
|
|
33950
|
-
|
|
35001
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33951
35002
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33952
35003
|
return this.httpInstance
|
|
33953
35004
|
.request({
|
|
33954
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35005
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/active`, path),
|
|
33955
35006
|
method: "POST",
|
|
33956
35007
|
data,
|
|
33957
35008
|
params,
|
|
@@ -33964,19 +35015,15 @@ class Client$M extends Client$N {
|
|
|
33964
35015
|
});
|
|
33965
35016
|
}),
|
|
33966
35017
|
/**
|
|
33967
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
33968
|
-
*
|
|
33969
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
|
|
35018
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=create&version=v2 click to debug }
|
|
33970
35019
|
*
|
|
33971
|
-
*
|
|
33972
|
-
*
|
|
33973
|
-
* 创建待入职人员
|
|
35020
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=position&version=v2 document }
|
|
33974
35021
|
*/
|
|
33975
35022
|
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33976
35023
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33977
35024
|
return this.httpInstance
|
|
33978
35025
|
.request({
|
|
33979
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35026
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions`, path),
|
|
33980
35027
|
method: "POST",
|
|
33981
35028
|
data,
|
|
33982
35029
|
params,
|
|
@@ -33989,18 +35036,18 @@ class Client$M extends Client$N {
|
|
|
33989
35036
|
});
|
|
33990
35037
|
}),
|
|
33991
35038
|
/**
|
|
33992
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35039
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=del_position&version=v2 click to debug }
|
|
33993
35040
|
*
|
|
33994
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35041
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del_position&project=corehr&resource=position&version=v2 document }
|
|
33995
35042
|
*
|
|
33996
|
-
*
|
|
35043
|
+
* 删除岗位
|
|
33997
35044
|
*/
|
|
33998
|
-
|
|
35045
|
+
delPosition: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33999
35046
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34000
35047
|
return this.httpInstance
|
|
34001
35048
|
.request({
|
|
34002
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34003
|
-
method: "
|
|
35049
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/del_position`, path),
|
|
35050
|
+
method: "POST",
|
|
34004
35051
|
data,
|
|
34005
35052
|
params,
|
|
34006
35053
|
headers,
|
|
@@ -34012,17 +35059,17 @@ class Client$M extends Client$N {
|
|
|
34012
35059
|
});
|
|
34013
35060
|
}),
|
|
34014
35061
|
/**
|
|
34015
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35062
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=patch&version=v2 click to debug }
|
|
34016
35063
|
*
|
|
34017
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=
|
|
35064
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=position&version=v2 document }
|
|
34018
35065
|
*
|
|
34019
|
-
*
|
|
35066
|
+
* 更新岗位
|
|
34020
35067
|
*/
|
|
34021
35068
|
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34022
35069
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34023
35070
|
return this.httpInstance
|
|
34024
35071
|
.request({
|
|
34025
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35072
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/:position_id`, path),
|
|
34026
35073
|
method: "PATCH",
|
|
34027
35074
|
data,
|
|
34028
35075
|
params,
|
|
@@ -34034,13 +35081,208 @@ class Client$M extends Client$N {
|
|
|
34034
35081
|
throw e;
|
|
34035
35082
|
});
|
|
34036
35083
|
}),
|
|
34037
|
-
|
|
35084
|
+
/**
|
|
35085
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
|
|
35086
|
+
*
|
|
35087
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
|
|
35088
|
+
*
|
|
35089
|
+
* 查询岗位信息
|
|
35090
|
+
*/
|
|
35091
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35092
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35093
|
+
return this.httpInstance
|
|
35094
|
+
.request({
|
|
35095
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
|
|
35096
|
+
method: "POST",
|
|
35097
|
+
data,
|
|
35098
|
+
params,
|
|
35099
|
+
headers,
|
|
35100
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35101
|
+
})
|
|
35102
|
+
.catch((e) => {
|
|
35103
|
+
this.logger.error(formatErrors(e));
|
|
35104
|
+
throw e;
|
|
35105
|
+
});
|
|
35106
|
+
}),
|
|
35107
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34038
35108
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34039
35109
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34040
35110
|
const res = yield this.httpInstance
|
|
34041
35111
|
.request({
|
|
34042
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34043
|
-
method: "
|
|
35112
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
|
|
35113
|
+
method: "GET",
|
|
35114
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
35115
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
35116
|
+
data,
|
|
35117
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
35118
|
+
arrayFormat: "repeat",
|
|
35119
|
+
}),
|
|
35120
|
+
})
|
|
35121
|
+
.catch((e) => {
|
|
35122
|
+
this.logger.error(formatErrors(e));
|
|
35123
|
+
});
|
|
35124
|
+
return res;
|
|
35125
|
+
});
|
|
35126
|
+
const Iterable = {
|
|
35127
|
+
[Symbol.asyncIterator]() {
|
|
35128
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35129
|
+
let hasMore = true;
|
|
35130
|
+
let pageToken;
|
|
35131
|
+
while (hasMore) {
|
|
35132
|
+
try {
|
|
35133
|
+
const res = yield __await(sendRequest({
|
|
35134
|
+
headers,
|
|
35135
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35136
|
+
data,
|
|
35137
|
+
}));
|
|
35138
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35139
|
+
// @ts-ignore
|
|
35140
|
+
has_more,
|
|
35141
|
+
// @ts-ignore
|
|
35142
|
+
page_token,
|
|
35143
|
+
// @ts-ignore
|
|
35144
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35145
|
+
yield yield __await(rest);
|
|
35146
|
+
hasMore = Boolean(has_more);
|
|
35147
|
+
pageToken = page_token || next_page_token;
|
|
35148
|
+
}
|
|
35149
|
+
catch (e) {
|
|
35150
|
+
yield yield __await(null);
|
|
35151
|
+
break;
|
|
35152
|
+
}
|
|
35153
|
+
}
|
|
35154
|
+
});
|
|
35155
|
+
},
|
|
35156
|
+
};
|
|
35157
|
+
return Iterable;
|
|
35158
|
+
}),
|
|
35159
|
+
/**
|
|
35160
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query_recent_change&version=v2 click to debug }
|
|
35161
|
+
*
|
|
35162
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=position&version=v2 document }
|
|
35163
|
+
*/
|
|
35164
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35165
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35166
|
+
return this.httpInstance
|
|
35167
|
+
.request({
|
|
35168
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
|
|
35169
|
+
method: "GET",
|
|
35170
|
+
data,
|
|
35171
|
+
params,
|
|
35172
|
+
headers,
|
|
35173
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35174
|
+
})
|
|
35175
|
+
.catch((e) => {
|
|
35176
|
+
this.logger.error(formatErrors(e));
|
|
35177
|
+
throw e;
|
|
35178
|
+
});
|
|
35179
|
+
}),
|
|
35180
|
+
},
|
|
35181
|
+
/**
|
|
35182
|
+
* 待入职
|
|
35183
|
+
*/
|
|
35184
|
+
preHire: {
|
|
35185
|
+
/**
|
|
35186
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
|
|
35187
|
+
*
|
|
35188
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
|
|
35189
|
+
*
|
|
35190
|
+
* 完成入职
|
|
35191
|
+
*/
|
|
35192
|
+
complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35193
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35194
|
+
return this.httpInstance
|
|
35195
|
+
.request({
|
|
35196
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
|
|
35197
|
+
method: "POST",
|
|
35198
|
+
data,
|
|
35199
|
+
params,
|
|
35200
|
+
headers,
|
|
35201
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35202
|
+
})
|
|
35203
|
+
.catch((e) => {
|
|
35204
|
+
this.logger.error(formatErrors(e));
|
|
35205
|
+
throw e;
|
|
35206
|
+
});
|
|
35207
|
+
}),
|
|
35208
|
+
/**
|
|
35209
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
|
|
35210
|
+
*
|
|
35211
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
|
|
35212
|
+
*
|
|
35213
|
+
* 创建待入职人员
|
|
35214
|
+
*
|
|
35215
|
+
* 创建待入职人员
|
|
35216
|
+
*/
|
|
35217
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35218
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35219
|
+
return this.httpInstance
|
|
35220
|
+
.request({
|
|
35221
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
|
|
35222
|
+
method: "POST",
|
|
35223
|
+
data,
|
|
35224
|
+
params,
|
|
35225
|
+
headers,
|
|
35226
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35227
|
+
})
|
|
35228
|
+
.catch((e) => {
|
|
35229
|
+
this.logger.error(formatErrors(e));
|
|
35230
|
+
throw e;
|
|
35231
|
+
});
|
|
35232
|
+
}),
|
|
35233
|
+
/**
|
|
35234
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
|
|
35235
|
+
*
|
|
35236
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
|
|
35237
|
+
*
|
|
35238
|
+
* 删除待入职
|
|
35239
|
+
*/
|
|
35240
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35241
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35242
|
+
return this.httpInstance
|
|
35243
|
+
.request({
|
|
35244
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
|
|
35245
|
+
method: "DELETE",
|
|
35246
|
+
data,
|
|
35247
|
+
params,
|
|
35248
|
+
headers,
|
|
35249
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35250
|
+
})
|
|
35251
|
+
.catch((e) => {
|
|
35252
|
+
this.logger.error(formatErrors(e));
|
|
35253
|
+
throw e;
|
|
35254
|
+
});
|
|
35255
|
+
}),
|
|
35256
|
+
/**
|
|
35257
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
|
|
35258
|
+
*
|
|
35259
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
|
|
35260
|
+
*
|
|
35261
|
+
* 更新待入职
|
|
35262
|
+
*/
|
|
35263
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35264
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35265
|
+
return this.httpInstance
|
|
35266
|
+
.request({
|
|
35267
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
|
|
35268
|
+
method: "PATCH",
|
|
35269
|
+
data,
|
|
35270
|
+
params,
|
|
35271
|
+
headers,
|
|
35272
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35273
|
+
})
|
|
35274
|
+
.catch((e) => {
|
|
35275
|
+
this.logger.error(formatErrors(e));
|
|
35276
|
+
throw e;
|
|
35277
|
+
});
|
|
35278
|
+
}),
|
|
35279
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35280
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35281
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35282
|
+
const res = yield this.httpInstance
|
|
35283
|
+
.request({
|
|
35284
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
35285
|
+
method: "POST",
|
|
34044
35286
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
34045
35287
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
34046
35288
|
data,
|
|
@@ -34205,6 +35447,29 @@ class Client$M extends Client$N {
|
|
|
34205
35447
|
throw e;
|
|
34206
35448
|
});
|
|
34207
35449
|
}),
|
|
35450
|
+
/**
|
|
35451
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transform_onboarding_task&version=v2 click to debug }
|
|
35452
|
+
*
|
|
35453
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transform_onboarding_task&project=corehr&resource=pre_hire&version=v2 document }
|
|
35454
|
+
*
|
|
35455
|
+
* 入职常规任务的流转,支持手动开启任务,提交任务以及审批任务
|
|
35456
|
+
*/
|
|
35457
|
+
transformOnboardingTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35458
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35459
|
+
return this.httpInstance
|
|
35460
|
+
.request({
|
|
35461
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`, path),
|
|
35462
|
+
method: "POST",
|
|
35463
|
+
data,
|
|
35464
|
+
params,
|
|
35465
|
+
headers,
|
|
35466
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35467
|
+
})
|
|
35468
|
+
.catch((e) => {
|
|
35469
|
+
this.logger.error(formatErrors(e));
|
|
35470
|
+
throw e;
|
|
35471
|
+
});
|
|
35472
|
+
}),
|
|
34208
35473
|
/**
|
|
34209
35474
|
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
|
|
34210
35475
|
*
|
|
@@ -34511,6 +35776,126 @@ class Client$M extends Client$N {
|
|
|
34511
35776
|
});
|
|
34512
35777
|
}),
|
|
34513
35778
|
},
|
|
35779
|
+
/**
|
|
35780
|
+
* process
|
|
35781
|
+
*/
|
|
35782
|
+
process: {
|
|
35783
|
+
/**
|
|
35784
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=flow_variable_data&version=v2 click to debug }
|
|
35785
|
+
*
|
|
35786
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=flow_variable_data&project=corehr&resource=process&version=v2 document }
|
|
35787
|
+
*/
|
|
35788
|
+
flowVariableData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35789
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35790
|
+
return this.httpInstance
|
|
35791
|
+
.request({
|
|
35792
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`, path),
|
|
35793
|
+
method: "GET",
|
|
35794
|
+
data,
|
|
35795
|
+
params,
|
|
35796
|
+
headers,
|
|
35797
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35798
|
+
})
|
|
35799
|
+
.catch((e) => {
|
|
35800
|
+
this.logger.error(formatErrors(e));
|
|
35801
|
+
throw e;
|
|
35802
|
+
});
|
|
35803
|
+
}),
|
|
35804
|
+
/**
|
|
35805
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=get&version=v2 click to debug }
|
|
35806
|
+
*
|
|
35807
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process&version=v2 document }
|
|
35808
|
+
*/
|
|
35809
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35810
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35811
|
+
return this.httpInstance
|
|
35812
|
+
.request({
|
|
35813
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path),
|
|
35814
|
+
method: "GET",
|
|
35815
|
+
data,
|
|
35816
|
+
params,
|
|
35817
|
+
headers,
|
|
35818
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35819
|
+
})
|
|
35820
|
+
.catch((e) => {
|
|
35821
|
+
this.logger.error(formatErrors(e));
|
|
35822
|
+
throw e;
|
|
35823
|
+
});
|
|
35824
|
+
}),
|
|
35825
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35826
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35827
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35828
|
+
const res = yield this.httpInstance
|
|
35829
|
+
.request({
|
|
35830
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
|
|
35831
|
+
method: "GET",
|
|
35832
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
35833
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
35834
|
+
data,
|
|
35835
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
35836
|
+
arrayFormat: "repeat",
|
|
35837
|
+
}),
|
|
35838
|
+
})
|
|
35839
|
+
.catch((e) => {
|
|
35840
|
+
this.logger.error(formatErrors(e));
|
|
35841
|
+
});
|
|
35842
|
+
return res;
|
|
35843
|
+
});
|
|
35844
|
+
const Iterable = {
|
|
35845
|
+
[Symbol.asyncIterator]() {
|
|
35846
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35847
|
+
let hasMore = true;
|
|
35848
|
+
let pageToken;
|
|
35849
|
+
while (hasMore) {
|
|
35850
|
+
try {
|
|
35851
|
+
const res = yield __await(sendRequest({
|
|
35852
|
+
headers,
|
|
35853
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35854
|
+
data,
|
|
35855
|
+
}));
|
|
35856
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35857
|
+
// @ts-ignore
|
|
35858
|
+
has_more,
|
|
35859
|
+
// @ts-ignore
|
|
35860
|
+
page_token,
|
|
35861
|
+
// @ts-ignore
|
|
35862
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35863
|
+
yield yield __await(rest);
|
|
35864
|
+
hasMore = Boolean(has_more);
|
|
35865
|
+
pageToken = page_token || next_page_token;
|
|
35866
|
+
}
|
|
35867
|
+
catch (e) {
|
|
35868
|
+
yield yield __await(null);
|
|
35869
|
+
break;
|
|
35870
|
+
}
|
|
35871
|
+
}
|
|
35872
|
+
});
|
|
35873
|
+
},
|
|
35874
|
+
};
|
|
35875
|
+
return Iterable;
|
|
35876
|
+
}),
|
|
35877
|
+
/**
|
|
35878
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=list&version=v2 click to debug }
|
|
35879
|
+
*
|
|
35880
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=process&version=v2 document }
|
|
35881
|
+
*/
|
|
35882
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35883
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35884
|
+
return this.httpInstance
|
|
35885
|
+
.request({
|
|
35886
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
|
|
35887
|
+
method: "GET",
|
|
35888
|
+
data,
|
|
35889
|
+
params,
|
|
35890
|
+
headers,
|
|
35891
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35892
|
+
})
|
|
35893
|
+
.catch((e) => {
|
|
35894
|
+
this.logger.error(formatErrors(e));
|
|
35895
|
+
throw e;
|
|
35896
|
+
});
|
|
35897
|
+
}),
|
|
35898
|
+
},
|
|
34514
35899
|
/**
|
|
34515
35900
|
* process.form_variable_data
|
|
34516
35901
|
*/
|
|
@@ -34538,19 +35923,250 @@ class Client$M extends Client$N {
|
|
|
34538
35923
|
}),
|
|
34539
35924
|
},
|
|
34540
35925
|
/**
|
|
34541
|
-
* process
|
|
35926
|
+
* process.transfer
|
|
34542
35927
|
*/
|
|
34543
|
-
|
|
35928
|
+
processTransfer: {
|
|
34544
35929
|
/**
|
|
34545
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=
|
|
35930
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.transfer&apiName=update&version=v2 click to debug }
|
|
34546
35931
|
*
|
|
34547
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35932
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.transfer&version=v2 document }
|
|
34548
35933
|
*/
|
|
34549
|
-
|
|
35934
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34550
35935
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34551
35936
|
return this.httpInstance
|
|
34552
35937
|
.request({
|
|
34553
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path),
|
|
35938
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`, path),
|
|
35939
|
+
method: "PUT",
|
|
35940
|
+
data,
|
|
35941
|
+
params,
|
|
35942
|
+
headers,
|
|
35943
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35944
|
+
})
|
|
35945
|
+
.catch((e) => {
|
|
35946
|
+
this.logger.error(formatErrors(e));
|
|
35947
|
+
throw e;
|
|
35948
|
+
});
|
|
35949
|
+
}),
|
|
35950
|
+
},
|
|
35951
|
+
/**
|
|
35952
|
+
* process_revoke
|
|
35953
|
+
*/
|
|
35954
|
+
processRevoke: {
|
|
35955
|
+
/**
|
|
35956
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_revoke&apiName=update&version=v2 click to debug }
|
|
35957
|
+
*
|
|
35958
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_revoke&version=v2 document }
|
|
35959
|
+
*/
|
|
35960
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35961
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35962
|
+
return this.httpInstance
|
|
35963
|
+
.request({
|
|
35964
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`, path),
|
|
35965
|
+
method: "PUT",
|
|
35966
|
+
data,
|
|
35967
|
+
params,
|
|
35968
|
+
headers,
|
|
35969
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35970
|
+
})
|
|
35971
|
+
.catch((e) => {
|
|
35972
|
+
this.logger.error(formatErrors(e));
|
|
35973
|
+
throw e;
|
|
35974
|
+
});
|
|
35975
|
+
}),
|
|
35976
|
+
},
|
|
35977
|
+
/**
|
|
35978
|
+
* process_withdraw
|
|
35979
|
+
*/
|
|
35980
|
+
processWithdraw: {
|
|
35981
|
+
/**
|
|
35982
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_withdraw&apiName=update&version=v2 click to debug }
|
|
35983
|
+
*
|
|
35984
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_withdraw&version=v2 document }
|
|
35985
|
+
*/
|
|
35986
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35987
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35988
|
+
return this.httpInstance
|
|
35989
|
+
.request({
|
|
35990
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`, path),
|
|
35991
|
+
method: "PUT",
|
|
35992
|
+
data,
|
|
35993
|
+
params,
|
|
35994
|
+
headers,
|
|
35995
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35996
|
+
})
|
|
35997
|
+
.catch((e) => {
|
|
35998
|
+
this.logger.error(formatErrors(e));
|
|
35999
|
+
throw e;
|
|
36000
|
+
});
|
|
36001
|
+
}),
|
|
36002
|
+
},
|
|
36003
|
+
/**
|
|
36004
|
+
* report_detail_row
|
|
36005
|
+
*/
|
|
36006
|
+
reportDetailRow: {
|
|
36007
|
+
/**
|
|
36008
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
|
|
36009
|
+
*
|
|
36010
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
|
|
36011
|
+
*
|
|
36012
|
+
* 批量删除填报行
|
|
36013
|
+
*/
|
|
36014
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36015
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36016
|
+
return this.httpInstance
|
|
36017
|
+
.request({
|
|
36018
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`, path),
|
|
36019
|
+
method: "POST",
|
|
36020
|
+
data,
|
|
36021
|
+
params,
|
|
36022
|
+
headers,
|
|
36023
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36024
|
+
})
|
|
36025
|
+
.catch((e) => {
|
|
36026
|
+
this.logger.error(formatErrors(e));
|
|
36027
|
+
throw e;
|
|
36028
|
+
});
|
|
36029
|
+
}),
|
|
36030
|
+
/**
|
|
36031
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchSave&version=v2 click to debug }
|
|
36032
|
+
*
|
|
36033
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchSave&project=corehr&resource=report_detail_row&version=v2 document }
|
|
36034
|
+
*
|
|
36035
|
+
* 批量创建/更新填报行
|
|
36036
|
+
*/
|
|
36037
|
+
batchSave: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36038
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36039
|
+
return this.httpInstance
|
|
36040
|
+
.request({
|
|
36041
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`, path),
|
|
36042
|
+
method: "POST",
|
|
36043
|
+
data,
|
|
36044
|
+
params,
|
|
36045
|
+
headers,
|
|
36046
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36047
|
+
})
|
|
36048
|
+
.catch((e) => {
|
|
36049
|
+
this.logger.error(formatErrors(e));
|
|
36050
|
+
throw e;
|
|
36051
|
+
});
|
|
36052
|
+
}),
|
|
36053
|
+
},
|
|
36054
|
+
/**
|
|
36055
|
+
* signature_file
|
|
36056
|
+
*/
|
|
36057
|
+
signatureFile: {
|
|
36058
|
+
/**
|
|
36059
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=download&version=v2 click to debug }
|
|
36060
|
+
*
|
|
36061
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download&project=corehr&resource=signature_file&version=v2 document }
|
|
36062
|
+
*/
|
|
36063
|
+
download: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36064
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36065
|
+
const res = yield this.httpInstance
|
|
36066
|
+
.request({
|
|
36067
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`, path),
|
|
36068
|
+
method: "POST",
|
|
36069
|
+
headers,
|
|
36070
|
+
data,
|
|
36071
|
+
params,
|
|
36072
|
+
responseType: "stream",
|
|
36073
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36074
|
+
$return_headers: true,
|
|
36075
|
+
})
|
|
36076
|
+
.catch((e) => {
|
|
36077
|
+
this.logger.error(formatErrors(e));
|
|
36078
|
+
throw e;
|
|
36079
|
+
});
|
|
36080
|
+
const checkIsReadable = () => {
|
|
36081
|
+
const consumedError = "The stream has already been consumed";
|
|
36082
|
+
if (!res.data.readable) {
|
|
36083
|
+
this.logger.error(consumedError);
|
|
36084
|
+
throw new Error(consumedError);
|
|
36085
|
+
}
|
|
36086
|
+
};
|
|
36087
|
+
return {
|
|
36088
|
+
writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
36089
|
+
checkIsReadable();
|
|
36090
|
+
return new Promise((resolve, reject) => {
|
|
36091
|
+
const writableStream = fs__default["default"].createWriteStream(filePath);
|
|
36092
|
+
writableStream.on("finish", () => {
|
|
36093
|
+
resolve(filePath);
|
|
36094
|
+
});
|
|
36095
|
+
writableStream.on("error", (e) => {
|
|
36096
|
+
reject(e);
|
|
36097
|
+
});
|
|
36098
|
+
res.data.pipe(writableStream);
|
|
36099
|
+
});
|
|
36100
|
+
}),
|
|
36101
|
+
getReadableStream: () => {
|
|
36102
|
+
checkIsReadable();
|
|
36103
|
+
return res.data;
|
|
36104
|
+
},
|
|
36105
|
+
headers: res.headers,
|
|
36106
|
+
};
|
|
36107
|
+
}),
|
|
36108
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36109
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36110
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
36111
|
+
const res = yield this.httpInstance
|
|
36112
|
+
.request({
|
|
36113
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path),
|
|
36114
|
+
method: "GET",
|
|
36115
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
36116
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
36117
|
+
data,
|
|
36118
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
36119
|
+
arrayFormat: "repeat",
|
|
36120
|
+
}),
|
|
36121
|
+
})
|
|
36122
|
+
.catch((e) => {
|
|
36123
|
+
this.logger.error(formatErrors(e));
|
|
36124
|
+
});
|
|
36125
|
+
return res;
|
|
36126
|
+
});
|
|
36127
|
+
const Iterable = {
|
|
36128
|
+
[Symbol.asyncIterator]() {
|
|
36129
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
36130
|
+
let hasMore = true;
|
|
36131
|
+
let pageToken;
|
|
36132
|
+
while (hasMore) {
|
|
36133
|
+
try {
|
|
36134
|
+
const res = yield __await(sendRequest({
|
|
36135
|
+
headers,
|
|
36136
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
36137
|
+
data,
|
|
36138
|
+
}));
|
|
36139
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
36140
|
+
// @ts-ignore
|
|
36141
|
+
has_more,
|
|
36142
|
+
// @ts-ignore
|
|
36143
|
+
page_token,
|
|
36144
|
+
// @ts-ignore
|
|
36145
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
36146
|
+
yield yield __await(rest);
|
|
36147
|
+
hasMore = Boolean(has_more);
|
|
36148
|
+
pageToken = page_token || next_page_token;
|
|
36149
|
+
}
|
|
36150
|
+
catch (e) {
|
|
36151
|
+
yield yield __await(null);
|
|
36152
|
+
break;
|
|
36153
|
+
}
|
|
36154
|
+
}
|
|
36155
|
+
});
|
|
36156
|
+
},
|
|
36157
|
+
};
|
|
36158
|
+
return Iterable;
|
|
36159
|
+
}),
|
|
36160
|
+
/**
|
|
36161
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list&version=v2 click to debug }
|
|
36162
|
+
*
|
|
36163
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=signature_file&version=v2 document }
|
|
36164
|
+
*/
|
|
36165
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36166
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36167
|
+
return this.httpInstance
|
|
36168
|
+
.request({
|
|
36169
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path),
|
|
34554
36170
|
method: "GET",
|
|
34555
36171
|
data,
|
|
34556
36172
|
params,
|
|
@@ -34562,12 +36178,184 @@ class Client$M extends Client$N {
|
|
|
34562
36178
|
throw e;
|
|
34563
36179
|
});
|
|
34564
36180
|
}),
|
|
36181
|
+
/**
|
|
36182
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list_by_biz_id&version=v2 click to debug }
|
|
36183
|
+
*
|
|
36184
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_biz_id&project=corehr&resource=signature_file&version=v2 document }
|
|
36185
|
+
*/
|
|
36186
|
+
listByBizId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36187
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36188
|
+
return this.httpInstance
|
|
36189
|
+
.request({
|
|
36190
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`, path),
|
|
36191
|
+
method: "GET",
|
|
36192
|
+
data,
|
|
36193
|
+
params,
|
|
36194
|
+
headers,
|
|
36195
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36196
|
+
})
|
|
36197
|
+
.catch((e) => {
|
|
36198
|
+
this.logger.error(formatErrors(e));
|
|
36199
|
+
throw e;
|
|
36200
|
+
});
|
|
36201
|
+
}),
|
|
36202
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36203
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36204
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
36205
|
+
const res = yield this.httpInstance
|
|
36206
|
+
.request({
|
|
36207
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
|
|
36208
|
+
method: "POST",
|
|
36209
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
36210
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
36211
|
+
data,
|
|
36212
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
36213
|
+
arrayFormat: "repeat",
|
|
36214
|
+
}),
|
|
36215
|
+
})
|
|
36216
|
+
.catch((e) => {
|
|
36217
|
+
this.logger.error(formatErrors(e));
|
|
36218
|
+
});
|
|
36219
|
+
return res;
|
|
36220
|
+
});
|
|
36221
|
+
const Iterable = {
|
|
36222
|
+
[Symbol.asyncIterator]() {
|
|
36223
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
36224
|
+
let hasMore = true;
|
|
36225
|
+
let pageToken;
|
|
36226
|
+
while (hasMore) {
|
|
36227
|
+
try {
|
|
36228
|
+
const res = yield __await(sendRequest({
|
|
36229
|
+
headers,
|
|
36230
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
36231
|
+
data,
|
|
36232
|
+
}));
|
|
36233
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
36234
|
+
// @ts-ignore
|
|
36235
|
+
has_more,
|
|
36236
|
+
// @ts-ignore
|
|
36237
|
+
page_token,
|
|
36238
|
+
// @ts-ignore
|
|
36239
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
36240
|
+
yield yield __await(rest);
|
|
36241
|
+
hasMore = Boolean(has_more);
|
|
36242
|
+
pageToken = page_token || next_page_token;
|
|
36243
|
+
}
|
|
36244
|
+
catch (e) {
|
|
36245
|
+
yield yield __await(null);
|
|
36246
|
+
break;
|
|
36247
|
+
}
|
|
36248
|
+
}
|
|
36249
|
+
});
|
|
36250
|
+
},
|
|
36251
|
+
};
|
|
36252
|
+
return Iterable;
|
|
36253
|
+
}),
|
|
36254
|
+
/**
|
|
36255
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=query&version=v2 click to debug }
|
|
36256
|
+
*
|
|
36257
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=signature_file&version=v2 document }
|
|
36258
|
+
*/
|
|
36259
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36260
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36261
|
+
return this.httpInstance
|
|
36262
|
+
.request({
|
|
36263
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
|
|
36264
|
+
method: "POST",
|
|
36265
|
+
data,
|
|
36266
|
+
params,
|
|
36267
|
+
headers,
|
|
36268
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36269
|
+
})
|
|
36270
|
+
.catch((e) => {
|
|
36271
|
+
this.logger.error(formatErrors(e));
|
|
36272
|
+
throw e;
|
|
36273
|
+
});
|
|
36274
|
+
}),
|
|
36275
|
+
/**
|
|
36276
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=terminate&version=v2 click to debug }
|
|
36277
|
+
*
|
|
36278
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=terminate&project=corehr&resource=signature_file&version=v2 document }
|
|
36279
|
+
*/
|
|
36280
|
+
terminate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36281
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36282
|
+
return this.httpInstance
|
|
36283
|
+
.request({
|
|
36284
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`, path),
|
|
36285
|
+
method: "POST",
|
|
36286
|
+
data,
|
|
36287
|
+
params,
|
|
36288
|
+
headers,
|
|
36289
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36290
|
+
})
|
|
36291
|
+
.catch((e) => {
|
|
36292
|
+
this.logger.error(formatErrors(e));
|
|
36293
|
+
throw e;
|
|
36294
|
+
});
|
|
36295
|
+
}),
|
|
36296
|
+
},
|
|
36297
|
+
/**
|
|
36298
|
+
* signature_node
|
|
36299
|
+
*/
|
|
36300
|
+
signatureNode: {
|
|
36301
|
+
/**
|
|
36302
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_node&apiName=list_by_file_id&version=v2 click to debug }
|
|
36303
|
+
*
|
|
36304
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_file_id&project=corehr&resource=signature_node&version=v2 document }
|
|
36305
|
+
*/
|
|
36306
|
+
listByFileId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36307
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36308
|
+
return this.httpInstance
|
|
36309
|
+
.request({
|
|
36310
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`, path),
|
|
36311
|
+
method: "GET",
|
|
36312
|
+
data,
|
|
36313
|
+
params,
|
|
36314
|
+
headers,
|
|
36315
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36316
|
+
})
|
|
36317
|
+
.catch((e) => {
|
|
36318
|
+
this.logger.error(formatErrors(e));
|
|
36319
|
+
throw e;
|
|
36320
|
+
});
|
|
36321
|
+
}),
|
|
36322
|
+
},
|
|
36323
|
+
/**
|
|
36324
|
+
* signature_template
|
|
36325
|
+
*/
|
|
36326
|
+
signatureTemplate: {
|
|
36327
|
+
/**
|
|
36328
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template&apiName=search&version=v2 click to debug }
|
|
36329
|
+
*
|
|
36330
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=signature_template&version=v2 document }
|
|
36331
|
+
*/
|
|
36332
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36333
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36334
|
+
return this.httpInstance
|
|
36335
|
+
.request({
|
|
36336
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_templates/search`, path),
|
|
36337
|
+
method: "GET",
|
|
36338
|
+
data,
|
|
36339
|
+
params,
|
|
36340
|
+
headers,
|
|
36341
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36342
|
+
})
|
|
36343
|
+
.catch((e) => {
|
|
36344
|
+
this.logger.error(formatErrors(e));
|
|
36345
|
+
throw e;
|
|
36346
|
+
});
|
|
36347
|
+
}),
|
|
36348
|
+
},
|
|
36349
|
+
/**
|
|
36350
|
+
* signature_template_info_with_thumbnail
|
|
36351
|
+
*/
|
|
36352
|
+
signatureTemplateInfoWithThumbnail: {
|
|
34565
36353
|
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34566
36354
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34567
36355
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34568
36356
|
const res = yield this.httpInstance
|
|
34569
36357
|
.request({
|
|
34570
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
36358
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
|
|
34571
36359
|
method: "GET",
|
|
34572
36360
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
34573
36361
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -34615,15 +36403,15 @@ class Client$M extends Client$N {
|
|
|
34615
36403
|
return Iterable;
|
|
34616
36404
|
}),
|
|
34617
36405
|
/**
|
|
34618
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36406
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template_info_with_thumbnail&apiName=list&version=v2 click to debug }
|
|
34619
36407
|
*
|
|
34620
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=
|
|
36408
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=signature_template_info_with_thumbnail&version=v2 document }
|
|
34621
36409
|
*/
|
|
34622
36410
|
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34623
36411
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34624
36412
|
return this.httpInstance
|
|
34625
36413
|
.request({
|
|
34626
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
36414
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
|
|
34627
36415
|
method: "GET",
|
|
34628
36416
|
data,
|
|
34629
36417
|
params,
|
|
@@ -34636,135 +36424,6 @@ class Client$M extends Client$N {
|
|
|
34636
36424
|
});
|
|
34637
36425
|
}),
|
|
34638
36426
|
},
|
|
34639
|
-
/**
|
|
34640
|
-
* process.transfer
|
|
34641
|
-
*/
|
|
34642
|
-
processTransfer: {
|
|
34643
|
-
/**
|
|
34644
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.transfer&apiName=update&version=v2 click to debug }
|
|
34645
|
-
*
|
|
34646
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.transfer&version=v2 document }
|
|
34647
|
-
*/
|
|
34648
|
-
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34649
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34650
|
-
return this.httpInstance
|
|
34651
|
-
.request({
|
|
34652
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`, path),
|
|
34653
|
-
method: "PUT",
|
|
34654
|
-
data,
|
|
34655
|
-
params,
|
|
34656
|
-
headers,
|
|
34657
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34658
|
-
})
|
|
34659
|
-
.catch((e) => {
|
|
34660
|
-
this.logger.error(formatErrors(e));
|
|
34661
|
-
throw e;
|
|
34662
|
-
});
|
|
34663
|
-
}),
|
|
34664
|
-
},
|
|
34665
|
-
/**
|
|
34666
|
-
* process_revoke
|
|
34667
|
-
*/
|
|
34668
|
-
processRevoke: {
|
|
34669
|
-
/**
|
|
34670
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_revoke&apiName=update&version=v2 click to debug }
|
|
34671
|
-
*
|
|
34672
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_revoke&version=v2 document }
|
|
34673
|
-
*/
|
|
34674
|
-
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34675
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34676
|
-
return this.httpInstance
|
|
34677
|
-
.request({
|
|
34678
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`, path),
|
|
34679
|
-
method: "PUT",
|
|
34680
|
-
data,
|
|
34681
|
-
params,
|
|
34682
|
-
headers,
|
|
34683
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34684
|
-
})
|
|
34685
|
-
.catch((e) => {
|
|
34686
|
-
this.logger.error(formatErrors(e));
|
|
34687
|
-
throw e;
|
|
34688
|
-
});
|
|
34689
|
-
}),
|
|
34690
|
-
},
|
|
34691
|
-
/**
|
|
34692
|
-
* process_withdraw
|
|
34693
|
-
*/
|
|
34694
|
-
processWithdraw: {
|
|
34695
|
-
/**
|
|
34696
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_withdraw&apiName=update&version=v2 click to debug }
|
|
34697
|
-
*
|
|
34698
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_withdraw&version=v2 document }
|
|
34699
|
-
*/
|
|
34700
|
-
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34701
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34702
|
-
return this.httpInstance
|
|
34703
|
-
.request({
|
|
34704
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`, path),
|
|
34705
|
-
method: "PUT",
|
|
34706
|
-
data,
|
|
34707
|
-
params,
|
|
34708
|
-
headers,
|
|
34709
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34710
|
-
})
|
|
34711
|
-
.catch((e) => {
|
|
34712
|
-
this.logger.error(formatErrors(e));
|
|
34713
|
-
throw e;
|
|
34714
|
-
});
|
|
34715
|
-
}),
|
|
34716
|
-
},
|
|
34717
|
-
/**
|
|
34718
|
-
* report_detail_row
|
|
34719
|
-
*/
|
|
34720
|
-
reportDetailRow: {
|
|
34721
|
-
/**
|
|
34722
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
|
|
34723
|
-
*
|
|
34724
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
|
|
34725
|
-
*
|
|
34726
|
-
* 批量删除填报行
|
|
34727
|
-
*/
|
|
34728
|
-
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34729
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34730
|
-
return this.httpInstance
|
|
34731
|
-
.request({
|
|
34732
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`, path),
|
|
34733
|
-
method: "POST",
|
|
34734
|
-
data,
|
|
34735
|
-
params,
|
|
34736
|
-
headers,
|
|
34737
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34738
|
-
})
|
|
34739
|
-
.catch((e) => {
|
|
34740
|
-
this.logger.error(formatErrors(e));
|
|
34741
|
-
throw e;
|
|
34742
|
-
});
|
|
34743
|
-
}),
|
|
34744
|
-
/**
|
|
34745
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchSave&version=v2 click to debug }
|
|
34746
|
-
*
|
|
34747
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchSave&project=corehr&resource=report_detail_row&version=v2 document }
|
|
34748
|
-
*
|
|
34749
|
-
* 批量创建/更新填报行
|
|
34750
|
-
*/
|
|
34751
|
-
batchSave: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34752
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34753
|
-
return this.httpInstance
|
|
34754
|
-
.request({
|
|
34755
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`, path),
|
|
34756
|
-
method: "POST",
|
|
34757
|
-
data,
|
|
34758
|
-
params,
|
|
34759
|
-
headers,
|
|
34760
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34761
|
-
})
|
|
34762
|
-
.catch((e) => {
|
|
34763
|
-
this.logger.error(formatErrors(e));
|
|
34764
|
-
throw e;
|
|
34765
|
-
});
|
|
34766
|
-
}),
|
|
34767
|
-
},
|
|
34768
36427
|
/**
|
|
34769
36428
|
* workforce_plan
|
|
34770
36429
|
*/
|
|
@@ -37995,7 +39654,7 @@ class Client$G extends Client$H {
|
|
|
37995
39654
|
}),
|
|
37996
39655
|
},
|
|
37997
39656
|
/**
|
|
37998
|
-
*
|
|
39657
|
+
* 事件
|
|
37999
39658
|
*/
|
|
38000
39659
|
file: {
|
|
38001
39660
|
/**
|
|
@@ -39821,7 +41480,7 @@ class Client$G extends Client$H {
|
|
|
39821
41480
|
}),
|
|
39822
41481
|
},
|
|
39823
41482
|
/**
|
|
39824
|
-
*
|
|
41483
|
+
* 事件
|
|
39825
41484
|
*/
|
|
39826
41485
|
file: {
|
|
39827
41486
|
/**
|
|
@@ -45517,6 +47176,27 @@ class Client$x extends Client$y {
|
|
|
45517
47176
|
* 背调 (灰度租户可见)
|
|
45518
47177
|
*/
|
|
45519
47178
|
backgroundCheckOrder: {
|
|
47179
|
+
/**
|
|
47180
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
|
|
47181
|
+
*
|
|
47182
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
|
|
47183
|
+
*/
|
|
47184
|
+
batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
47185
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
47186
|
+
return this.httpInstance
|
|
47187
|
+
.request({
|
|
47188
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path),
|
|
47189
|
+
method: "POST",
|
|
47190
|
+
data,
|
|
47191
|
+
params,
|
|
47192
|
+
headers,
|
|
47193
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
47194
|
+
})
|
|
47195
|
+
.catch((e) => {
|
|
47196
|
+
this.logger.error(formatErrors(e));
|
|
47197
|
+
throw e;
|
|
47198
|
+
});
|
|
47199
|
+
}),
|
|
45520
47200
|
/**
|
|
45521
47201
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
|
|
45522
47202
|
*
|
|
@@ -48766,6 +50446,36 @@ class Client$x extends Client$y {
|
|
|
48766
50446
|
});
|
|
48767
50447
|
}),
|
|
48768
50448
|
},
|
|
50449
|
+
/**
|
|
50450
|
+
* Offer 审批流配置(灰度租户可见)
|
|
50451
|
+
*/
|
|
50452
|
+
offerApprovalTemplate: {
|
|
50453
|
+
/**
|
|
50454
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_approval_template&apiName=list&version=v1 click to debug }
|
|
50455
|
+
*
|
|
50456
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_approval_template/list document }
|
|
50457
|
+
*
|
|
50458
|
+
* 获取 Offer 审批流配置列表
|
|
50459
|
+
*
|
|
50460
|
+
* 获取 Offer 审批流配置列表
|
|
50461
|
+
*/
|
|
50462
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50463
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50464
|
+
return this.httpInstance
|
|
50465
|
+
.request({
|
|
50466
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_approval_templates`, path),
|
|
50467
|
+
method: "GET",
|
|
50468
|
+
data,
|
|
50469
|
+
params,
|
|
50470
|
+
headers,
|
|
50471
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
50472
|
+
})
|
|
50473
|
+
.catch((e) => {
|
|
50474
|
+
this.logger.error(formatErrors(e));
|
|
50475
|
+
throw e;
|
|
50476
|
+
});
|
|
50477
|
+
}),
|
|
50478
|
+
},
|
|
48769
50479
|
/**
|
|
48770
50480
|
* offer_custom_field
|
|
48771
50481
|
*/
|
|
@@ -48822,6 +50532,82 @@ class Client$x extends Client$y {
|
|
|
48822
50532
|
});
|
|
48823
50533
|
}),
|
|
48824
50534
|
},
|
|
50535
|
+
/**
|
|
50536
|
+
* portal_apply_schema
|
|
50537
|
+
*/
|
|
50538
|
+
portalApplySchema: {
|
|
50539
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50540
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50541
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
50542
|
+
const res = yield this.httpInstance
|
|
50543
|
+
.request({
|
|
50544
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
|
|
50545
|
+
method: "GET",
|
|
50546
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
50547
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
50548
|
+
data,
|
|
50549
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
50550
|
+
})
|
|
50551
|
+
.catch((e) => {
|
|
50552
|
+
this.logger.error(formatErrors(e));
|
|
50553
|
+
});
|
|
50554
|
+
return res;
|
|
50555
|
+
});
|
|
50556
|
+
const Iterable = {
|
|
50557
|
+
[Symbol.asyncIterator]() {
|
|
50558
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
50559
|
+
let hasMore = true;
|
|
50560
|
+
let pageToken;
|
|
50561
|
+
while (hasMore) {
|
|
50562
|
+
try {
|
|
50563
|
+
const res = yield __await(sendRequest({
|
|
50564
|
+
headers,
|
|
50565
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
50566
|
+
data,
|
|
50567
|
+
}));
|
|
50568
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
50569
|
+
// @ts-ignore
|
|
50570
|
+
has_more,
|
|
50571
|
+
// @ts-ignore
|
|
50572
|
+
page_token,
|
|
50573
|
+
// @ts-ignore
|
|
50574
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
50575
|
+
yield yield __await(rest);
|
|
50576
|
+
hasMore = Boolean(has_more);
|
|
50577
|
+
pageToken = page_token || next_page_token;
|
|
50578
|
+
}
|
|
50579
|
+
catch (e) {
|
|
50580
|
+
yield yield __await(null);
|
|
50581
|
+
break;
|
|
50582
|
+
}
|
|
50583
|
+
}
|
|
50584
|
+
});
|
|
50585
|
+
},
|
|
50586
|
+
};
|
|
50587
|
+
return Iterable;
|
|
50588
|
+
}),
|
|
50589
|
+
/**
|
|
50590
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=portal_apply_schema&apiName=list&version=v1 click to debug }
|
|
50591
|
+
*
|
|
50592
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=portal_apply_schema&version=v1 document }
|
|
50593
|
+
*/
|
|
50594
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
50595
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
50596
|
+
return this.httpInstance
|
|
50597
|
+
.request({
|
|
50598
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
|
|
50599
|
+
method: "GET",
|
|
50600
|
+
data,
|
|
50601
|
+
params,
|
|
50602
|
+
headers,
|
|
50603
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
50604
|
+
})
|
|
50605
|
+
.catch((e) => {
|
|
50606
|
+
this.logger.error(formatErrors(e));
|
|
50607
|
+
throw e;
|
|
50608
|
+
});
|
|
50609
|
+
}),
|
|
50610
|
+
},
|
|
48825
50611
|
/**
|
|
48826
50612
|
* 问卷(灰度租户可见)
|
|
48827
50613
|
*/
|
|
@@ -51545,6 +53331,27 @@ class Client$x extends Client$y {
|
|
|
51545
53331
|
* 背调 (灰度租户可见)
|
|
51546
53332
|
*/
|
|
51547
53333
|
backgroundCheckOrder: {
|
|
53334
|
+
/**
|
|
53335
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
|
|
53336
|
+
*
|
|
53337
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
|
|
53338
|
+
*/
|
|
53339
|
+
batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
53340
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
53341
|
+
return this.httpInstance
|
|
53342
|
+
.request({
|
|
53343
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path),
|
|
53344
|
+
method: "POST",
|
|
53345
|
+
data,
|
|
53346
|
+
params,
|
|
53347
|
+
headers,
|
|
53348
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
53349
|
+
})
|
|
53350
|
+
.catch((e) => {
|
|
53351
|
+
this.logger.error(formatErrors(e));
|
|
53352
|
+
throw e;
|
|
53353
|
+
});
|
|
53354
|
+
}),
|
|
51548
53355
|
/**
|
|
51549
53356
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
|
|
51550
53357
|
*
|
|
@@ -54824,6 +56631,36 @@ class Client$x extends Client$y {
|
|
|
54824
56631
|
});
|
|
54825
56632
|
}),
|
|
54826
56633
|
},
|
|
56634
|
+
/**
|
|
56635
|
+
* Offer 审批流配置(灰度租户可见)
|
|
56636
|
+
*/
|
|
56637
|
+
offerApprovalTemplate: {
|
|
56638
|
+
/**
|
|
56639
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_approval_template&apiName=list&version=v1 click to debug }
|
|
56640
|
+
*
|
|
56641
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_approval_template/list document }
|
|
56642
|
+
*
|
|
56643
|
+
* 获取 Offer 审批流配置列表
|
|
56644
|
+
*
|
|
56645
|
+
* 获取 Offer 审批流配置列表
|
|
56646
|
+
*/
|
|
56647
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
56648
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
56649
|
+
return this.httpInstance
|
|
56650
|
+
.request({
|
|
56651
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_approval_templates`, path),
|
|
56652
|
+
method: "GET",
|
|
56653
|
+
data,
|
|
56654
|
+
params,
|
|
56655
|
+
headers,
|
|
56656
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
56657
|
+
})
|
|
56658
|
+
.catch((e) => {
|
|
56659
|
+
this.logger.error(formatErrors(e));
|
|
56660
|
+
throw e;
|
|
56661
|
+
});
|
|
56662
|
+
}),
|
|
56663
|
+
},
|
|
54827
56664
|
/**
|
|
54828
56665
|
* offer_custom_field
|
|
54829
56666
|
*/
|
|
@@ -54880,6 +56717,84 @@ class Client$x extends Client$y {
|
|
|
54880
56717
|
});
|
|
54881
56718
|
}),
|
|
54882
56719
|
},
|
|
56720
|
+
/**
|
|
56721
|
+
* portal_apply_schema
|
|
56722
|
+
*/
|
|
56723
|
+
portalApplySchema: {
|
|
56724
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
56725
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
56726
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
56727
|
+
const res = yield this.httpInstance
|
|
56728
|
+
.request({
|
|
56729
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
|
|
56730
|
+
method: "GET",
|
|
56731
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
56732
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
56733
|
+
data,
|
|
56734
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
56735
|
+
arrayFormat: "repeat",
|
|
56736
|
+
}),
|
|
56737
|
+
})
|
|
56738
|
+
.catch((e) => {
|
|
56739
|
+
this.logger.error(formatErrors(e));
|
|
56740
|
+
});
|
|
56741
|
+
return res;
|
|
56742
|
+
});
|
|
56743
|
+
const Iterable = {
|
|
56744
|
+
[Symbol.asyncIterator]() {
|
|
56745
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
56746
|
+
let hasMore = true;
|
|
56747
|
+
let pageToken;
|
|
56748
|
+
while (hasMore) {
|
|
56749
|
+
try {
|
|
56750
|
+
const res = yield __await(sendRequest({
|
|
56751
|
+
headers,
|
|
56752
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
56753
|
+
data,
|
|
56754
|
+
}));
|
|
56755
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
56756
|
+
// @ts-ignore
|
|
56757
|
+
has_more,
|
|
56758
|
+
// @ts-ignore
|
|
56759
|
+
page_token,
|
|
56760
|
+
// @ts-ignore
|
|
56761
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
56762
|
+
yield yield __await(rest);
|
|
56763
|
+
hasMore = Boolean(has_more);
|
|
56764
|
+
pageToken = page_token || next_page_token;
|
|
56765
|
+
}
|
|
56766
|
+
catch (e) {
|
|
56767
|
+
yield yield __await(null);
|
|
56768
|
+
break;
|
|
56769
|
+
}
|
|
56770
|
+
}
|
|
56771
|
+
});
|
|
56772
|
+
},
|
|
56773
|
+
};
|
|
56774
|
+
return Iterable;
|
|
56775
|
+
}),
|
|
56776
|
+
/**
|
|
56777
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=portal_apply_schema&apiName=list&version=v1 click to debug }
|
|
56778
|
+
*
|
|
56779
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=portal_apply_schema&version=v1 document }
|
|
56780
|
+
*/
|
|
56781
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
56782
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
56783
|
+
return this.httpInstance
|
|
56784
|
+
.request({
|
|
56785
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
|
|
56786
|
+
method: "GET",
|
|
56787
|
+
data,
|
|
56788
|
+
params,
|
|
56789
|
+
headers,
|
|
56790
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
56791
|
+
})
|
|
56792
|
+
.catch((e) => {
|
|
56793
|
+
this.logger.error(formatErrors(e));
|
|
56794
|
+
throw e;
|
|
56795
|
+
});
|
|
56796
|
+
}),
|
|
56797
|
+
},
|
|
54883
56798
|
/**
|
|
54884
56799
|
* 问卷(灰度租户可见)
|
|
54885
56800
|
*/
|
|
@@ -71109,6 +73024,217 @@ class Client$d extends Client$e {
|
|
|
71109
73024
|
}),
|
|
71110
73025
|
},
|
|
71111
73026
|
},
|
|
73027
|
+
v2: {
|
|
73028
|
+
/**
|
|
73029
|
+
* device_apply_record
|
|
73030
|
+
*/
|
|
73031
|
+
deviceApplyRecord: {
|
|
73032
|
+
/**
|
|
73033
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_apply_record&apiName=update&version=v2 click to debug }
|
|
73034
|
+
*
|
|
73035
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_apply_record&version=v2 document }
|
|
73036
|
+
*/
|
|
73037
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73038
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73039
|
+
return this.httpInstance
|
|
73040
|
+
.request({
|
|
73041
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`, path),
|
|
73042
|
+
method: "PUT",
|
|
73043
|
+
data,
|
|
73044
|
+
params,
|
|
73045
|
+
headers,
|
|
73046
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73047
|
+
})
|
|
73048
|
+
.catch((e) => {
|
|
73049
|
+
this.logger.error(formatErrors(e));
|
|
73050
|
+
throw e;
|
|
73051
|
+
});
|
|
73052
|
+
}),
|
|
73053
|
+
},
|
|
73054
|
+
/**
|
|
73055
|
+
* device_record
|
|
73056
|
+
*/
|
|
73057
|
+
deviceRecord: {
|
|
73058
|
+
/**
|
|
73059
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=create&version=v2 click to debug }
|
|
73060
|
+
*
|
|
73061
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73062
|
+
*/
|
|
73063
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73064
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73065
|
+
return this.httpInstance
|
|
73066
|
+
.request({
|
|
73067
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
|
|
73068
|
+
method: "POST",
|
|
73069
|
+
data,
|
|
73070
|
+
params,
|
|
73071
|
+
headers,
|
|
73072
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73073
|
+
})
|
|
73074
|
+
.catch((e) => {
|
|
73075
|
+
this.logger.error(formatErrors(e));
|
|
73076
|
+
throw e;
|
|
73077
|
+
});
|
|
73078
|
+
}),
|
|
73079
|
+
/**
|
|
73080
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=delete&version=v2 click to debug }
|
|
73081
|
+
*
|
|
73082
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73083
|
+
*/
|
|
73084
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73085
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73086
|
+
return this.httpInstance
|
|
73087
|
+
.request({
|
|
73088
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
|
|
73089
|
+
method: "DELETE",
|
|
73090
|
+
data,
|
|
73091
|
+
params,
|
|
73092
|
+
headers,
|
|
73093
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73094
|
+
})
|
|
73095
|
+
.catch((e) => {
|
|
73096
|
+
this.logger.error(formatErrors(e));
|
|
73097
|
+
throw e;
|
|
73098
|
+
});
|
|
73099
|
+
}),
|
|
73100
|
+
/**
|
|
73101
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=get&version=v2 click to debug }
|
|
73102
|
+
*
|
|
73103
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73104
|
+
*/
|
|
73105
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73106
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73107
|
+
return this.httpInstance
|
|
73108
|
+
.request({
|
|
73109
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
|
|
73110
|
+
method: "GET",
|
|
73111
|
+
data,
|
|
73112
|
+
params,
|
|
73113
|
+
headers,
|
|
73114
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73115
|
+
})
|
|
73116
|
+
.catch((e) => {
|
|
73117
|
+
this.logger.error(formatErrors(e));
|
|
73118
|
+
throw e;
|
|
73119
|
+
});
|
|
73120
|
+
}),
|
|
73121
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73122
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73123
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
73124
|
+
const res = yield this.httpInstance
|
|
73125
|
+
.request({
|
|
73126
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
|
|
73127
|
+
method: "GET",
|
|
73128
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
73129
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
73130
|
+
data,
|
|
73131
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
73132
|
+
arrayFormat: "repeat",
|
|
73133
|
+
}),
|
|
73134
|
+
})
|
|
73135
|
+
.catch((e) => {
|
|
73136
|
+
this.logger.error(formatErrors(e));
|
|
73137
|
+
});
|
|
73138
|
+
return res;
|
|
73139
|
+
});
|
|
73140
|
+
const Iterable = {
|
|
73141
|
+
[Symbol.asyncIterator]() {
|
|
73142
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
73143
|
+
let hasMore = true;
|
|
73144
|
+
let pageToken;
|
|
73145
|
+
while (hasMore) {
|
|
73146
|
+
try {
|
|
73147
|
+
const res = yield __await(sendRequest({
|
|
73148
|
+
headers,
|
|
73149
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
73150
|
+
data,
|
|
73151
|
+
}));
|
|
73152
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
73153
|
+
// @ts-ignore
|
|
73154
|
+
has_more,
|
|
73155
|
+
// @ts-ignore
|
|
73156
|
+
page_token,
|
|
73157
|
+
// @ts-ignore
|
|
73158
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
73159
|
+
yield yield __await(rest);
|
|
73160
|
+
hasMore = Boolean(has_more);
|
|
73161
|
+
pageToken = page_token || next_page_token;
|
|
73162
|
+
}
|
|
73163
|
+
catch (e) {
|
|
73164
|
+
yield yield __await(null);
|
|
73165
|
+
break;
|
|
73166
|
+
}
|
|
73167
|
+
}
|
|
73168
|
+
});
|
|
73169
|
+
},
|
|
73170
|
+
};
|
|
73171
|
+
return Iterable;
|
|
73172
|
+
}),
|
|
73173
|
+
/**
|
|
73174
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=list&version=v2 click to debug }
|
|
73175
|
+
*
|
|
73176
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73177
|
+
*/
|
|
73178
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73179
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73180
|
+
return this.httpInstance
|
|
73181
|
+
.request({
|
|
73182
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
|
|
73183
|
+
method: "GET",
|
|
73184
|
+
data,
|
|
73185
|
+
params,
|
|
73186
|
+
headers,
|
|
73187
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73188
|
+
})
|
|
73189
|
+
.catch((e) => {
|
|
73190
|
+
this.logger.error(formatErrors(e));
|
|
73191
|
+
throw e;
|
|
73192
|
+
});
|
|
73193
|
+
}),
|
|
73194
|
+
/**
|
|
73195
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=mine&version=v2 click to debug }
|
|
73196
|
+
*
|
|
73197
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mine&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73198
|
+
*/
|
|
73199
|
+
mine: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73200
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73201
|
+
return this.httpInstance
|
|
73202
|
+
.request({
|
|
73203
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`, path),
|
|
73204
|
+
method: "GET",
|
|
73205
|
+
data,
|
|
73206
|
+
params,
|
|
73207
|
+
headers,
|
|
73208
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73209
|
+
})
|
|
73210
|
+
.catch((e) => {
|
|
73211
|
+
this.logger.error(formatErrors(e));
|
|
73212
|
+
throw e;
|
|
73213
|
+
});
|
|
73214
|
+
}),
|
|
73215
|
+
/**
|
|
73216
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=update&version=v2 click to debug }
|
|
73217
|
+
*
|
|
73218
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73219
|
+
*/
|
|
73220
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73221
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73222
|
+
return this.httpInstance
|
|
73223
|
+
.request({
|
|
73224
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
|
|
73225
|
+
method: "PUT",
|
|
73226
|
+
data,
|
|
73227
|
+
params,
|
|
73228
|
+
headers,
|
|
73229
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
73230
|
+
})
|
|
73231
|
+
.catch((e) => {
|
|
73232
|
+
this.logger.error(formatErrors(e));
|
|
73233
|
+
throw e;
|
|
73234
|
+
});
|
|
73235
|
+
}),
|
|
73236
|
+
},
|
|
73237
|
+
},
|
|
71112
73238
|
};
|
|
71113
73239
|
}
|
|
71114
73240
|
}
|
|
@@ -81872,10 +83998,12 @@ class Client extends Client$1 {
|
|
|
81872
83998
|
const helpDeskCredential = string2Base64(`${this.helpDeskId}:${this.helpDeskToken}`);
|
|
81873
83999
|
targetOptions.headers['X-Lark-Helpdesk-Authorization'] = `Bearer ${helpDeskCredential}`;
|
|
81874
84000
|
}
|
|
84001
|
+
const payloadData = Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.data) || {})), targetOptions.data);
|
|
81875
84002
|
return {
|
|
81876
84003
|
params: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.params) || {})), targetOptions.params),
|
|
81877
84004
|
headers: Object.assign(Object.assign({ 'User-Agent': 'oapi-node-sdk/1.0.0' }, ((payload === null || payload === void 0 ? void 0 : payload.headers) || {})), targetOptions.headers),
|
|
81878
|
-
|
|
84005
|
+
// @ts-ignore
|
|
84006
|
+
data: Object.keys(payloadData).length === 0 ? undefined : payloadData,
|
|
81879
84007
|
path: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.path) || {})), targetOptions.path),
|
|
81880
84008
|
};
|
|
81881
84009
|
});
|