@larksuiteoapi/node-sdk 1.55.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 +2381 -898
- package/lib/index.js +2381 -898
- package/package.json +1 -1
- package/types/index.d.ts +22641 -3861
package/lib/index.js
CHANGED
|
@@ -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
|
*
|
|
@@ -19697,6 +19958,342 @@ class Client$Q extends Client$R {
|
|
|
19697
19958
|
});
|
|
19698
19959
|
}),
|
|
19699
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
|
+
},
|
|
19700
20297
|
},
|
|
19701
20298
|
};
|
|
19702
20299
|
}
|
|
@@ -30488,6 +31085,29 @@ class Client$M extends Client$N {
|
|
|
30488
31085
|
throw e;
|
|
30489
31086
|
});
|
|
30490
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
|
+
}),
|
|
30491
31111
|
},
|
|
30492
31112
|
/**
|
|
30493
31113
|
* approver
|
|
@@ -32675,6 +33295,34 @@ class Client$M extends Client$N {
|
|
|
32675
33295
|
});
|
|
32676
33296
|
}),
|
|
32677
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
|
+
},
|
|
32678
33326
|
/**
|
|
32679
33327
|
* employee
|
|
32680
33328
|
*/
|
|
@@ -34344,45 +34992,17 @@ class Client$M extends Client$N {
|
|
|
34344
34992
|
*/
|
|
34345
34993
|
position: {
|
|
34346
34994
|
/**
|
|
34347
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=
|
|
34348
|
-
*
|
|
34349
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
|
|
34350
|
-
*
|
|
34351
|
-
* 查询岗位信息
|
|
34352
|
-
*/
|
|
34353
|
-
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34354
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34355
|
-
return this.httpInstance
|
|
34356
|
-
.request({
|
|
34357
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
|
|
34358
|
-
method: "POST",
|
|
34359
|
-
data,
|
|
34360
|
-
params,
|
|
34361
|
-
headers,
|
|
34362
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34363
|
-
})
|
|
34364
|
-
.catch((e) => {
|
|
34365
|
-
this.logger.error(formatErrors(e));
|
|
34366
|
-
throw e;
|
|
34367
|
-
});
|
|
34368
|
-
}),
|
|
34369
|
-
},
|
|
34370
|
-
/**
|
|
34371
|
-
* 待入职
|
|
34372
|
-
*/
|
|
34373
|
-
preHire: {
|
|
34374
|
-
/**
|
|
34375
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
|
|
34995
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=active&version=v2 click to debug }
|
|
34376
34996
|
*
|
|
34377
|
-
* {@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 }
|
|
34378
34998
|
*
|
|
34379
|
-
*
|
|
34999
|
+
* 启/停用岗位
|
|
34380
35000
|
*/
|
|
34381
|
-
|
|
35001
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34382
35002
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34383
35003
|
return this.httpInstance
|
|
34384
35004
|
.request({
|
|
34385
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35005
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/active`, path),
|
|
34386
35006
|
method: "POST",
|
|
34387
35007
|
data,
|
|
34388
35008
|
params,
|
|
@@ -34395,19 +35015,15 @@ class Client$M extends Client$N {
|
|
|
34395
35015
|
});
|
|
34396
35016
|
}),
|
|
34397
35017
|
/**
|
|
34398
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
34399
|
-
*
|
|
34400
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
|
|
34401
|
-
*
|
|
34402
|
-
* 创建待入职人员
|
|
35018
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=create&version=v2 click to debug }
|
|
34403
35019
|
*
|
|
34404
|
-
*
|
|
35020
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=position&version=v2 document }
|
|
34405
35021
|
*/
|
|
34406
35022
|
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34407
35023
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34408
35024
|
return this.httpInstance
|
|
34409
35025
|
.request({
|
|
34410
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35026
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions`, path),
|
|
34411
35027
|
method: "POST",
|
|
34412
35028
|
data,
|
|
34413
35029
|
params,
|
|
@@ -34420,18 +35036,18 @@ class Client$M extends Client$N {
|
|
|
34420
35036
|
});
|
|
34421
35037
|
}),
|
|
34422
35038
|
/**
|
|
34423
|
-
* {@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 }
|
|
34424
35040
|
*
|
|
34425
|
-
* {@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 }
|
|
34426
35042
|
*
|
|
34427
|
-
*
|
|
35043
|
+
* 删除岗位
|
|
34428
35044
|
*/
|
|
34429
|
-
|
|
35045
|
+
delPosition: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34430
35046
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34431
35047
|
return this.httpInstance
|
|
34432
35048
|
.request({
|
|
34433
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34434
|
-
method: "
|
|
35049
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/del_position`, path),
|
|
35050
|
+
method: "POST",
|
|
34435
35051
|
data,
|
|
34436
35052
|
params,
|
|
34437
35053
|
headers,
|
|
@@ -34443,17 +35059,17 @@ class Client$M extends Client$N {
|
|
|
34443
35059
|
});
|
|
34444
35060
|
}),
|
|
34445
35061
|
/**
|
|
34446
|
-
* {@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 }
|
|
34447
35063
|
*
|
|
34448
|
-
* {@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 }
|
|
34449
35065
|
*
|
|
34450
|
-
*
|
|
35066
|
+
* 更新岗位
|
|
34451
35067
|
*/
|
|
34452
35068
|
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34453
35069
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34454
35070
|
return this.httpInstance
|
|
34455
35071
|
.request({
|
|
34456
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35072
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/:position_id`, path),
|
|
34457
35073
|
method: "PATCH",
|
|
34458
35074
|
data,
|
|
34459
35075
|
params,
|
|
@@ -34465,91 +35081,18 @@ class Client$M extends Client$N {
|
|
|
34465
35081
|
throw e;
|
|
34466
35082
|
});
|
|
34467
35083
|
}),
|
|
34468
|
-
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34469
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34470
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34471
|
-
const res = yield this.httpInstance
|
|
34472
|
-
.request({
|
|
34473
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
34474
|
-
method: "POST",
|
|
34475
|
-
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
34476
|
-
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
34477
|
-
data,
|
|
34478
|
-
paramsSerializer: (params) => qs.stringify(params, {
|
|
34479
|
-
arrayFormat: "repeat",
|
|
34480
|
-
}),
|
|
34481
|
-
})
|
|
34482
|
-
.catch((e) => {
|
|
34483
|
-
this.logger.error(formatErrors(e));
|
|
34484
|
-
});
|
|
34485
|
-
return res;
|
|
34486
|
-
});
|
|
34487
|
-
const Iterable = {
|
|
34488
|
-
[Symbol.asyncIterator]() {
|
|
34489
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
34490
|
-
let hasMore = true;
|
|
34491
|
-
let pageToken;
|
|
34492
|
-
while (hasMore) {
|
|
34493
|
-
try {
|
|
34494
|
-
const res = yield __await(sendRequest({
|
|
34495
|
-
headers,
|
|
34496
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
34497
|
-
data,
|
|
34498
|
-
}));
|
|
34499
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
34500
|
-
// @ts-ignore
|
|
34501
|
-
has_more,
|
|
34502
|
-
// @ts-ignore
|
|
34503
|
-
page_token,
|
|
34504
|
-
// @ts-ignore
|
|
34505
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
34506
|
-
yield yield __await(rest);
|
|
34507
|
-
hasMore = Boolean(has_more);
|
|
34508
|
-
pageToken = page_token || next_page_token;
|
|
34509
|
-
}
|
|
34510
|
-
catch (e) {
|
|
34511
|
-
yield yield __await(null);
|
|
34512
|
-
break;
|
|
34513
|
-
}
|
|
34514
|
-
}
|
|
34515
|
-
});
|
|
34516
|
-
},
|
|
34517
|
-
};
|
|
34518
|
-
return Iterable;
|
|
34519
|
-
}),
|
|
34520
35084
|
/**
|
|
34521
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35085
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
|
|
34522
35086
|
*
|
|
34523
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=
|
|
35087
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
|
|
34524
35088
|
*
|
|
34525
|
-
*
|
|
35089
|
+
* 查询岗位信息
|
|
34526
35090
|
*/
|
|
34527
35091
|
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34528
35092
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34529
35093
|
return this.httpInstance
|
|
34530
35094
|
.request({
|
|
34531
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34532
|
-
method: "POST",
|
|
34533
|
-
data,
|
|
34534
|
-
params,
|
|
34535
|
-
headers,
|
|
34536
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34537
|
-
})
|
|
34538
|
-
.catch((e) => {
|
|
34539
|
-
this.logger.error(formatErrors(e));
|
|
34540
|
-
throw e;
|
|
34541
|
-
});
|
|
34542
|
-
}),
|
|
34543
|
-
/**
|
|
34544
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
|
|
34545
|
-
*
|
|
34546
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
|
|
34547
|
-
*/
|
|
34548
|
-
restoreFlowInstance: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34549
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34550
|
-
return this.httpInstance
|
|
34551
|
-
.request({
|
|
34552
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path),
|
|
35095
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
|
|
34553
35096
|
method: "POST",
|
|
34554
35097
|
data,
|
|
34555
35098
|
params,
|
|
@@ -34561,13 +35104,13 @@ class Client$M extends Client$N {
|
|
|
34561
35104
|
throw e;
|
|
34562
35105
|
});
|
|
34563
35106
|
}),
|
|
34564
|
-
|
|
35107
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34565
35108
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34566
35109
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34567
35110
|
const res = yield this.httpInstance
|
|
34568
35111
|
.request({
|
|
34569
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34570
|
-
method: "
|
|
35112
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
|
|
35113
|
+
method: "GET",
|
|
34571
35114
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
34572
35115
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
34573
35116
|
data,
|
|
@@ -34614,18 +35157,16 @@ class Client$M extends Client$N {
|
|
|
34614
35157
|
return Iterable;
|
|
34615
35158
|
}),
|
|
34616
35159
|
/**
|
|
34617
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
34618
|
-
*
|
|
34619
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
|
|
35160
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query_recent_change&version=v2 click to debug }
|
|
34620
35161
|
*
|
|
34621
|
-
*
|
|
35162
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=position&version=v2 document }
|
|
34622
35163
|
*/
|
|
34623
|
-
|
|
35164
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34624
35165
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34625
35166
|
return this.httpInstance
|
|
34626
35167
|
.request({
|
|
34627
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34628
|
-
method: "
|
|
35168
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
|
|
35169
|
+
method: "GET",
|
|
34629
35170
|
data,
|
|
34630
35171
|
params,
|
|
34631
35172
|
headers,
|
|
@@ -34636,18 +35177,23 @@ class Client$M extends Client$N {
|
|
|
34636
35177
|
throw e;
|
|
34637
35178
|
});
|
|
34638
35179
|
}),
|
|
35180
|
+
},
|
|
35181
|
+
/**
|
|
35182
|
+
* 待入职
|
|
35183
|
+
*/
|
|
35184
|
+
preHire: {
|
|
34639
35185
|
/**
|
|
34640
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=
|
|
35186
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
|
|
34641
35187
|
*
|
|
34642
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35188
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
|
|
34643
35189
|
*
|
|
34644
|
-
*
|
|
35190
|
+
* 完成入职
|
|
34645
35191
|
*/
|
|
34646
|
-
|
|
35192
|
+
complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34647
35193
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34648
35194
|
return this.httpInstance
|
|
34649
35195
|
.request({
|
|
34650
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/
|
|
35196
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
|
|
34651
35197
|
method: "POST",
|
|
34652
35198
|
data,
|
|
34653
35199
|
params,
|
|
@@ -34660,41 +35206,19 @@ class Client$M extends Client$N {
|
|
|
34660
35206
|
});
|
|
34661
35207
|
}),
|
|
34662
35208
|
/**
|
|
34663
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=
|
|
35209
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
|
|
34664
35210
|
*
|
|
34665
|
-
* {@link https://open.feishu.cn/
|
|
34666
|
-
*/
|
|
34667
|
-
withdrawOnboarding: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34668
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34669
|
-
return this.httpInstance
|
|
34670
|
-
.request({
|
|
34671
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path),
|
|
34672
|
-
method: "POST",
|
|
34673
|
-
data,
|
|
34674
|
-
params,
|
|
34675
|
-
headers,
|
|
34676
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34677
|
-
})
|
|
34678
|
-
.catch((e) => {
|
|
34679
|
-
this.logger.error(formatErrors(e));
|
|
34680
|
-
throw e;
|
|
34681
|
-
});
|
|
34682
|
-
}),
|
|
34683
|
-
},
|
|
34684
|
-
/**
|
|
34685
|
-
* probation.assessment
|
|
34686
|
-
*/
|
|
34687
|
-
probationAssessment: {
|
|
34688
|
-
/**
|
|
34689
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
|
|
35211
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
|
|
34690
35212
|
*
|
|
34691
|
-
*
|
|
35213
|
+
* 创建待入职人员
|
|
35214
|
+
*
|
|
35215
|
+
* 创建待入职人员
|
|
34692
35216
|
*/
|
|
34693
35217
|
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34694
35218
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34695
35219
|
return this.httpInstance
|
|
34696
35220
|
.request({
|
|
34697
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35221
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
|
|
34698
35222
|
method: "POST",
|
|
34699
35223
|
data,
|
|
34700
35224
|
params,
|
|
@@ -34707,15 +35231,17 @@ class Client$M extends Client$N {
|
|
|
34707
35231
|
});
|
|
34708
35232
|
}),
|
|
34709
35233
|
/**
|
|
34710
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35234
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
|
|
34711
35235
|
*
|
|
34712
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=
|
|
35236
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
|
|
35237
|
+
*
|
|
35238
|
+
* 删除待入职
|
|
34713
35239
|
*/
|
|
34714
35240
|
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34715
35241
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34716
35242
|
return this.httpInstance
|
|
34717
35243
|
.request({
|
|
34718
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35244
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
|
|
34719
35245
|
method: "DELETE",
|
|
34720
35246
|
data,
|
|
34721
35247
|
params,
|
|
@@ -34728,15 +35254,17 @@ class Client$M extends Client$N {
|
|
|
34728
35254
|
});
|
|
34729
35255
|
}),
|
|
34730
35256
|
/**
|
|
34731
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35257
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
|
|
34732
35258
|
*
|
|
34733
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=
|
|
35259
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
|
|
35260
|
+
*
|
|
35261
|
+
* 更新待入职
|
|
34734
35262
|
*/
|
|
34735
35263
|
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34736
35264
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34737
35265
|
return this.httpInstance
|
|
34738
35266
|
.request({
|
|
34739
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35267
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
|
|
34740
35268
|
method: "PATCH",
|
|
34741
35269
|
data,
|
|
34742
35270
|
params,
|
|
@@ -34748,38 +35276,344 @@ class Client$M extends Client$N {
|
|
|
34748
35276
|
throw e;
|
|
34749
35277
|
});
|
|
34750
35278
|
}),
|
|
34751
|
-
|
|
34752
|
-
/**
|
|
34753
|
-
* probation
|
|
34754
|
-
*/
|
|
34755
|
-
probation: {
|
|
34756
|
-
/**
|
|
34757
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
|
|
34758
|
-
*
|
|
34759
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
|
|
34760
|
-
*/
|
|
34761
|
-
enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34762
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34763
|
-
return this.httpInstance
|
|
34764
|
-
.request({
|
|
34765
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
|
|
34766
|
-
method: "POST",
|
|
34767
|
-
data,
|
|
34768
|
-
params,
|
|
34769
|
-
headers,
|
|
34770
|
-
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
34771
|
-
})
|
|
34772
|
-
.catch((e) => {
|
|
34773
|
-
this.logger.error(formatErrors(e));
|
|
34774
|
-
throw e;
|
|
34775
|
-
});
|
|
34776
|
-
}),
|
|
34777
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35279
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34778
35280
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34779
35281
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34780
35282
|
const res = yield this.httpInstance
|
|
34781
35283
|
.request({
|
|
34782
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35284
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
35285
|
+
method: "POST",
|
|
35286
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
35287
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
35288
|
+
data,
|
|
35289
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
35290
|
+
arrayFormat: "repeat",
|
|
35291
|
+
}),
|
|
35292
|
+
})
|
|
35293
|
+
.catch((e) => {
|
|
35294
|
+
this.logger.error(formatErrors(e));
|
|
35295
|
+
});
|
|
35296
|
+
return res;
|
|
35297
|
+
});
|
|
35298
|
+
const Iterable = {
|
|
35299
|
+
[Symbol.asyncIterator]() {
|
|
35300
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35301
|
+
let hasMore = true;
|
|
35302
|
+
let pageToken;
|
|
35303
|
+
while (hasMore) {
|
|
35304
|
+
try {
|
|
35305
|
+
const res = yield __await(sendRequest({
|
|
35306
|
+
headers,
|
|
35307
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35308
|
+
data,
|
|
35309
|
+
}));
|
|
35310
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35311
|
+
// @ts-ignore
|
|
35312
|
+
has_more,
|
|
35313
|
+
// @ts-ignore
|
|
35314
|
+
page_token,
|
|
35315
|
+
// @ts-ignore
|
|
35316
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35317
|
+
yield yield __await(rest);
|
|
35318
|
+
hasMore = Boolean(has_more);
|
|
35319
|
+
pageToken = page_token || next_page_token;
|
|
35320
|
+
}
|
|
35321
|
+
catch (e) {
|
|
35322
|
+
yield yield __await(null);
|
|
35323
|
+
break;
|
|
35324
|
+
}
|
|
35325
|
+
}
|
|
35326
|
+
});
|
|
35327
|
+
},
|
|
35328
|
+
};
|
|
35329
|
+
return Iterable;
|
|
35330
|
+
}),
|
|
35331
|
+
/**
|
|
35332
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=query&version=v2 click to debug }
|
|
35333
|
+
*
|
|
35334
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=pre_hire&version=v2 document }
|
|
35335
|
+
*
|
|
35336
|
+
* 批量查询待入职数据
|
|
35337
|
+
*/
|
|
35338
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35339
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35340
|
+
return this.httpInstance
|
|
35341
|
+
.request({
|
|
35342
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
35343
|
+
method: "POST",
|
|
35344
|
+
data,
|
|
35345
|
+
params,
|
|
35346
|
+
headers,
|
|
35347
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35348
|
+
})
|
|
35349
|
+
.catch((e) => {
|
|
35350
|
+
this.logger.error(formatErrors(e));
|
|
35351
|
+
throw e;
|
|
35352
|
+
});
|
|
35353
|
+
}),
|
|
35354
|
+
/**
|
|
35355
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
|
|
35356
|
+
*
|
|
35357
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
|
|
35358
|
+
*/
|
|
35359
|
+
restoreFlowInstance: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35360
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35361
|
+
return this.httpInstance
|
|
35362
|
+
.request({
|
|
35363
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path),
|
|
35364
|
+
method: "POST",
|
|
35365
|
+
data,
|
|
35366
|
+
params,
|
|
35367
|
+
headers,
|
|
35368
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35369
|
+
})
|
|
35370
|
+
.catch((e) => {
|
|
35371
|
+
this.logger.error(formatErrors(e));
|
|
35372
|
+
throw e;
|
|
35373
|
+
});
|
|
35374
|
+
}),
|
|
35375
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35376
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35377
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35378
|
+
const res = yield this.httpInstance
|
|
35379
|
+
.request({
|
|
35380
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
|
|
35381
|
+
method: "POST",
|
|
35382
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
35383
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
35384
|
+
data,
|
|
35385
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
35386
|
+
arrayFormat: "repeat",
|
|
35387
|
+
}),
|
|
35388
|
+
})
|
|
35389
|
+
.catch((e) => {
|
|
35390
|
+
this.logger.error(formatErrors(e));
|
|
35391
|
+
});
|
|
35392
|
+
return res;
|
|
35393
|
+
});
|
|
35394
|
+
const Iterable = {
|
|
35395
|
+
[Symbol.asyncIterator]() {
|
|
35396
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35397
|
+
let hasMore = true;
|
|
35398
|
+
let pageToken;
|
|
35399
|
+
while (hasMore) {
|
|
35400
|
+
try {
|
|
35401
|
+
const res = yield __await(sendRequest({
|
|
35402
|
+
headers,
|
|
35403
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35404
|
+
data,
|
|
35405
|
+
}));
|
|
35406
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35407
|
+
// @ts-ignore
|
|
35408
|
+
has_more,
|
|
35409
|
+
// @ts-ignore
|
|
35410
|
+
page_token,
|
|
35411
|
+
// @ts-ignore
|
|
35412
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35413
|
+
yield yield __await(rest);
|
|
35414
|
+
hasMore = Boolean(has_more);
|
|
35415
|
+
pageToken = page_token || next_page_token;
|
|
35416
|
+
}
|
|
35417
|
+
catch (e) {
|
|
35418
|
+
yield yield __await(null);
|
|
35419
|
+
break;
|
|
35420
|
+
}
|
|
35421
|
+
}
|
|
35422
|
+
});
|
|
35423
|
+
},
|
|
35424
|
+
};
|
|
35425
|
+
return Iterable;
|
|
35426
|
+
}),
|
|
35427
|
+
/**
|
|
35428
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=search&version=v2 click to debug }
|
|
35429
|
+
*
|
|
35430
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
|
|
35431
|
+
*
|
|
35432
|
+
* 根据部门 ID,上级部门查询部门列表
|
|
35433
|
+
*/
|
|
35434
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35435
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35436
|
+
return this.httpInstance
|
|
35437
|
+
.request({
|
|
35438
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
|
|
35439
|
+
method: "POST",
|
|
35440
|
+
data,
|
|
35441
|
+
params,
|
|
35442
|
+
headers,
|
|
35443
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35444
|
+
})
|
|
35445
|
+
.catch((e) => {
|
|
35446
|
+
this.logger.error(formatErrors(e));
|
|
35447
|
+
throw e;
|
|
35448
|
+
});
|
|
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
|
+
}),
|
|
35473
|
+
/**
|
|
35474
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
|
|
35475
|
+
*
|
|
35476
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transit_task&project=corehr&resource=pre_hire&version=v2 document }
|
|
35477
|
+
*
|
|
35478
|
+
* 任务流转
|
|
35479
|
+
*/
|
|
35480
|
+
transitTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35481
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35482
|
+
return this.httpInstance
|
|
35483
|
+
.request({
|
|
35484
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`, path),
|
|
35485
|
+
method: "POST",
|
|
35486
|
+
data,
|
|
35487
|
+
params,
|
|
35488
|
+
headers,
|
|
35489
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35490
|
+
})
|
|
35491
|
+
.catch((e) => {
|
|
35492
|
+
this.logger.error(formatErrors(e));
|
|
35493
|
+
throw e;
|
|
35494
|
+
});
|
|
35495
|
+
}),
|
|
35496
|
+
/**
|
|
35497
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=withdraw_onboarding&version=v2 click to debug }
|
|
35498
|
+
*
|
|
35499
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw_onboarding&project=corehr&resource=pre_hire&version=v2 document }
|
|
35500
|
+
*/
|
|
35501
|
+
withdrawOnboarding: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35502
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35503
|
+
return this.httpInstance
|
|
35504
|
+
.request({
|
|
35505
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path),
|
|
35506
|
+
method: "POST",
|
|
35507
|
+
data,
|
|
35508
|
+
params,
|
|
35509
|
+
headers,
|
|
35510
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35511
|
+
})
|
|
35512
|
+
.catch((e) => {
|
|
35513
|
+
this.logger.error(formatErrors(e));
|
|
35514
|
+
throw e;
|
|
35515
|
+
});
|
|
35516
|
+
}),
|
|
35517
|
+
},
|
|
35518
|
+
/**
|
|
35519
|
+
* probation.assessment
|
|
35520
|
+
*/
|
|
35521
|
+
probationAssessment: {
|
|
35522
|
+
/**
|
|
35523
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
|
|
35524
|
+
*
|
|
35525
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
|
|
35526
|
+
*/
|
|
35527
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35528
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35529
|
+
return this.httpInstance
|
|
35530
|
+
.request({
|
|
35531
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path),
|
|
35532
|
+
method: "POST",
|
|
35533
|
+
data,
|
|
35534
|
+
params,
|
|
35535
|
+
headers,
|
|
35536
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35537
|
+
})
|
|
35538
|
+
.catch((e) => {
|
|
35539
|
+
this.logger.error(formatErrors(e));
|
|
35540
|
+
throw e;
|
|
35541
|
+
});
|
|
35542
|
+
}),
|
|
35543
|
+
/**
|
|
35544
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
|
|
35545
|
+
*
|
|
35546
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
|
|
35547
|
+
*/
|
|
35548
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35549
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35550
|
+
return this.httpInstance
|
|
35551
|
+
.request({
|
|
35552
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
|
|
35553
|
+
method: "DELETE",
|
|
35554
|
+
data,
|
|
35555
|
+
params,
|
|
35556
|
+
headers,
|
|
35557
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35558
|
+
})
|
|
35559
|
+
.catch((e) => {
|
|
35560
|
+
this.logger.error(formatErrors(e));
|
|
35561
|
+
throw e;
|
|
35562
|
+
});
|
|
35563
|
+
}),
|
|
35564
|
+
/**
|
|
35565
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
|
|
35566
|
+
*
|
|
35567
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
|
|
35568
|
+
*/
|
|
35569
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35570
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35571
|
+
return this.httpInstance
|
|
35572
|
+
.request({
|
|
35573
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
|
|
35574
|
+
method: "PATCH",
|
|
35575
|
+
data,
|
|
35576
|
+
params,
|
|
35577
|
+
headers,
|
|
35578
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35579
|
+
})
|
|
35580
|
+
.catch((e) => {
|
|
35581
|
+
this.logger.error(formatErrors(e));
|
|
35582
|
+
throw e;
|
|
35583
|
+
});
|
|
35584
|
+
}),
|
|
35585
|
+
},
|
|
35586
|
+
/**
|
|
35587
|
+
* probation
|
|
35588
|
+
*/
|
|
35589
|
+
probation: {
|
|
35590
|
+
/**
|
|
35591
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
|
|
35592
|
+
*
|
|
35593
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
|
|
35594
|
+
*/
|
|
35595
|
+
enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35596
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35597
|
+
return this.httpInstance
|
|
35598
|
+
.request({
|
|
35599
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
|
|
35600
|
+
method: "POST",
|
|
35601
|
+
data,
|
|
35602
|
+
params,
|
|
35603
|
+
headers,
|
|
35604
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
35605
|
+
})
|
|
35606
|
+
.catch((e) => {
|
|
35607
|
+
this.logger.error(formatErrors(e));
|
|
35608
|
+
throw e;
|
|
35609
|
+
});
|
|
35610
|
+
}),
|
|
35611
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35612
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35613
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35614
|
+
const res = yield this.httpInstance
|
|
35615
|
+
.request({
|
|
35616
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
|
|
34783
35617
|
method: "POST",
|
|
34784
35618
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
34785
35619
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -34942,6 +35776,126 @@ class Client$M extends Client$N {
|
|
|
34942
35776
|
});
|
|
34943
35777
|
}),
|
|
34944
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
|
+
},
|
|
34945
35899
|
/**
|
|
34946
35900
|
* process.form_variable_data
|
|
34947
35901
|
*/
|
|
@@ -34969,20 +35923,123 @@ class Client$M extends Client$N {
|
|
|
34969
35923
|
}),
|
|
34970
35924
|
},
|
|
34971
35925
|
/**
|
|
34972
|
-
* process
|
|
35926
|
+
* process.transfer
|
|
34973
35927
|
*/
|
|
34974
|
-
|
|
35928
|
+
processTransfer: {
|
|
34975
35929
|
/**
|
|
34976
|
-
* {@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 }
|
|
34977
35931
|
*
|
|
34978
|
-
* {@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 }
|
|
34979
35933
|
*/
|
|
34980
|
-
|
|
35934
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34981
35935
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34982
35936
|
return this.httpInstance
|
|
34983
35937
|
.request({
|
|
34984
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path),
|
|
34985
|
-
method: "
|
|
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",
|
|
34986
36043
|
data,
|
|
34987
36044
|
params,
|
|
34988
36045
|
headers,
|
|
@@ -34993,12 +36050,67 @@ class Client$M extends Client$N {
|
|
|
34993
36050
|
throw e;
|
|
34994
36051
|
});
|
|
34995
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
|
+
}),
|
|
34996
36108
|
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34997
36109
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34998
36110
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34999
36111
|
const res = yield this.httpInstance
|
|
35000
36112
|
.request({
|
|
35001
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
36113
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path),
|
|
35002
36114
|
method: "GET",
|
|
35003
36115
|
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
35004
36116
|
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
@@ -35046,16 +36158,110 @@ class Client$M extends Client$N {
|
|
|
35046
36158
|
return Iterable;
|
|
35047
36159
|
}),
|
|
35048
36160
|
/**
|
|
35049
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
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),
|
|
36170
|
+
method: "GET",
|
|
36171
|
+
data,
|
|
36172
|
+
params,
|
|
36173
|
+
headers,
|
|
36174
|
+
paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
|
|
36175
|
+
})
|
|
36176
|
+
.catch((e) => {
|
|
36177
|
+
this.logger.error(formatErrors(e));
|
|
36178
|
+
throw e;
|
|
36179
|
+
});
|
|
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 }
|
|
35050
36256
|
*
|
|
35051
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36257
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=signature_file&version=v2 document }
|
|
35052
36258
|
*/
|
|
35053
|
-
|
|
36259
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35054
36260
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35055
36261
|
return this.httpInstance
|
|
35056
36262
|
.request({
|
|
35057
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35058
|
-
method: "
|
|
36263
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
|
|
36264
|
+
method: "POST",
|
|
35059
36265
|
data,
|
|
35060
36266
|
params,
|
|
35061
36267
|
headers,
|
|
@@ -35066,22 +36272,17 @@ class Client$M extends Client$N {
|
|
|
35066
36272
|
throw e;
|
|
35067
36273
|
});
|
|
35068
36274
|
}),
|
|
35069
|
-
},
|
|
35070
|
-
/**
|
|
35071
|
-
* process.transfer
|
|
35072
|
-
*/
|
|
35073
|
-
processTransfer: {
|
|
35074
36275
|
/**
|
|
35075
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36276
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=terminate&version=v2 click to debug }
|
|
35076
36277
|
*
|
|
35077
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36278
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=terminate&project=corehr&resource=signature_file&version=v2 document }
|
|
35078
36279
|
*/
|
|
35079
|
-
|
|
36280
|
+
terminate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35080
36281
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35081
36282
|
return this.httpInstance
|
|
35082
36283
|
.request({
|
|
35083
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35084
|
-
method: "
|
|
36284
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`, path),
|
|
36285
|
+
method: "POST",
|
|
35085
36286
|
data,
|
|
35086
36287
|
params,
|
|
35087
36288
|
headers,
|
|
@@ -35094,20 +36295,20 @@ class Client$M extends Client$N {
|
|
|
35094
36295
|
}),
|
|
35095
36296
|
},
|
|
35096
36297
|
/**
|
|
35097
|
-
*
|
|
36298
|
+
* signature_node
|
|
35098
36299
|
*/
|
|
35099
|
-
|
|
36300
|
+
signatureNode: {
|
|
35100
36301
|
/**
|
|
35101
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36302
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_node&apiName=list_by_file_id&version=v2 click to debug }
|
|
35102
36303
|
*
|
|
35103
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
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 }
|
|
35104
36305
|
*/
|
|
35105
|
-
|
|
36306
|
+
listByFileId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35106
36307
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35107
36308
|
return this.httpInstance
|
|
35108
36309
|
.request({
|
|
35109
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35110
|
-
method: "
|
|
36310
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`, path),
|
|
36311
|
+
method: "GET",
|
|
35111
36312
|
data,
|
|
35112
36313
|
params,
|
|
35113
36314
|
headers,
|
|
@@ -35120,20 +36321,20 @@ class Client$M extends Client$N {
|
|
|
35120
36321
|
}),
|
|
35121
36322
|
},
|
|
35122
36323
|
/**
|
|
35123
|
-
*
|
|
36324
|
+
* signature_template
|
|
35124
36325
|
*/
|
|
35125
|
-
|
|
36326
|
+
signatureTemplate: {
|
|
35126
36327
|
/**
|
|
35127
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36328
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template&apiName=search&version=v2 click to debug }
|
|
35128
36329
|
*
|
|
35129
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36330
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=signature_template&version=v2 document }
|
|
35130
36331
|
*/
|
|
35131
|
-
|
|
36332
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35132
36333
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35133
36334
|
return this.httpInstance
|
|
35134
36335
|
.request({
|
|
35135
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35136
|
-
method: "
|
|
36336
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_templates/search`, path),
|
|
36337
|
+
method: "GET",
|
|
35137
36338
|
data,
|
|
35138
36339
|
params,
|
|
35139
36340
|
headers,
|
|
@@ -35146,45 +36347,72 @@ class Client$M extends Client$N {
|
|
|
35146
36347
|
}),
|
|
35147
36348
|
},
|
|
35148
36349
|
/**
|
|
35149
|
-
*
|
|
36350
|
+
* signature_template_info_with_thumbnail
|
|
35150
36351
|
*/
|
|
35151
|
-
|
|
35152
|
-
|
|
35153
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
|
|
35154
|
-
*
|
|
35155
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
|
|
35156
|
-
*
|
|
35157
|
-
* 批量删除填报行
|
|
35158
|
-
*/
|
|
35159
|
-
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36352
|
+
signatureTemplateInfoWithThumbnail: {
|
|
36353
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35160
36354
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35161
|
-
|
|
35162
|
-
.
|
|
35163
|
-
|
|
35164
|
-
|
|
35165
|
-
|
|
35166
|
-
|
|
35167
|
-
|
|
35168
|
-
|
|
35169
|
-
|
|
35170
|
-
|
|
35171
|
-
|
|
35172
|
-
|
|
36355
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
36356
|
+
const res = yield this.httpInstance
|
|
36357
|
+
.request({
|
|
36358
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
|
|
36359
|
+
method: "GET",
|
|
36360
|
+
headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
|
|
36361
|
+
params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
|
|
36362
|
+
data,
|
|
36363
|
+
paramsSerializer: (params) => qs.stringify(params, {
|
|
36364
|
+
arrayFormat: "repeat",
|
|
36365
|
+
}),
|
|
36366
|
+
})
|
|
36367
|
+
.catch((e) => {
|
|
36368
|
+
this.logger.error(formatErrors(e));
|
|
36369
|
+
});
|
|
36370
|
+
return res;
|
|
35173
36371
|
});
|
|
36372
|
+
const Iterable = {
|
|
36373
|
+
[Symbol.asyncIterator]() {
|
|
36374
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
36375
|
+
let hasMore = true;
|
|
36376
|
+
let pageToken;
|
|
36377
|
+
while (hasMore) {
|
|
36378
|
+
try {
|
|
36379
|
+
const res = yield __await(sendRequest({
|
|
36380
|
+
headers,
|
|
36381
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
36382
|
+
data,
|
|
36383
|
+
}));
|
|
36384
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
36385
|
+
// @ts-ignore
|
|
36386
|
+
has_more,
|
|
36387
|
+
// @ts-ignore
|
|
36388
|
+
page_token,
|
|
36389
|
+
// @ts-ignore
|
|
36390
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
36391
|
+
yield yield __await(rest);
|
|
36392
|
+
hasMore = Boolean(has_more);
|
|
36393
|
+
pageToken = page_token || next_page_token;
|
|
36394
|
+
}
|
|
36395
|
+
catch (e) {
|
|
36396
|
+
yield yield __await(null);
|
|
36397
|
+
break;
|
|
36398
|
+
}
|
|
36399
|
+
}
|
|
36400
|
+
});
|
|
36401
|
+
},
|
|
36402
|
+
};
|
|
36403
|
+
return Iterable;
|
|
35174
36404
|
}),
|
|
35175
36405
|
/**
|
|
35176
|
-
* {@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 }
|
|
35177
36407
|
*
|
|
35178
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35179
|
-
*
|
|
35180
|
-
* 批量创建/更新填报行
|
|
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 }
|
|
35181
36409
|
*/
|
|
35182
|
-
|
|
36410
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35183
36411
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35184
36412
|
return this.httpInstance
|
|
35185
36413
|
.request({
|
|
35186
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35187
|
-
method: "
|
|
36414
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
|
|
36415
|
+
method: "GET",
|
|
35188
36416
|
data,
|
|
35189
36417
|
params,
|
|
35190
36418
|
headers,
|
|
@@ -38426,7 +39654,7 @@ class Client$G extends Client$H {
|
|
|
38426
39654
|
}),
|
|
38427
39655
|
},
|
|
38428
39656
|
/**
|
|
38429
|
-
*
|
|
39657
|
+
* 事件
|
|
38430
39658
|
*/
|
|
38431
39659
|
file: {
|
|
38432
39660
|
/**
|
|
@@ -40252,7 +41480,7 @@ class Client$G extends Client$H {
|
|
|
40252
41480
|
}),
|
|
40253
41481
|
},
|
|
40254
41482
|
/**
|
|
40255
|
-
*
|
|
41483
|
+
* 事件
|
|
40256
41484
|
*/
|
|
40257
41485
|
file: {
|
|
40258
41486
|
/**
|
|
@@ -45595,7 +46823,7 @@ class Client$x extends Client$y {
|
|
|
45595
46823
|
}),
|
|
45596
46824
|
},
|
|
45597
46825
|
/**
|
|
45598
|
-
*
|
|
46826
|
+
* 投递
|
|
45599
46827
|
*/
|
|
45600
46828
|
application: {
|
|
45601
46829
|
/**
|
|
@@ -45948,6 +47176,27 @@ class Client$x extends Client$y {
|
|
|
45948
47176
|
* 背调 (灰度租户可见)
|
|
45949
47177
|
*/
|
|
45950
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
|
+
}),
|
|
45951
47200
|
/**
|
|
45952
47201
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
|
|
45953
47202
|
*
|
|
@@ -51729,7 +52978,7 @@ class Client$x extends Client$y {
|
|
|
51729
52978
|
}),
|
|
51730
52979
|
},
|
|
51731
52980
|
/**
|
|
51732
|
-
*
|
|
52981
|
+
* 投递
|
|
51733
52982
|
*/
|
|
51734
52983
|
application: {
|
|
51735
52984
|
/**
|
|
@@ -52082,6 +53331,27 @@ class Client$x extends Client$y {
|
|
|
52082
53331
|
* 背调 (灰度租户可见)
|
|
52083
53332
|
*/
|
|
52084
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
|
+
}),
|
|
52085
53355
|
/**
|
|
52086
53356
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
|
|
52087
53357
|
*
|
|
@@ -71754,6 +73024,217 @@ class Client$d extends Client$e {
|
|
|
71754
73024
|
}),
|
|
71755
73025
|
},
|
|
71756
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
|
+
},
|
|
71757
73238
|
};
|
|
71758
73239
|
}
|
|
71759
73240
|
}
|
|
@@ -82517,10 +83998,12 @@ class Client extends Client$1 {
|
|
|
82517
83998
|
const helpDeskCredential = string2Base64(`${this.helpDeskId}:${this.helpDeskToken}`);
|
|
82518
83999
|
targetOptions.headers['X-Lark-Helpdesk-Authorization'] = `Bearer ${helpDeskCredential}`;
|
|
82519
84000
|
}
|
|
84001
|
+
const payloadData = Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.data) || {})), targetOptions.data);
|
|
82520
84002
|
return {
|
|
82521
84003
|
params: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.params) || {})), targetOptions.params),
|
|
82522
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),
|
|
82523
|
-
|
|
84005
|
+
// @ts-ignore
|
|
84006
|
+
data: Object.keys(payloadData).length === 0 ? undefined : payloadData,
|
|
82524
84007
|
path: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.path) || {})), targetOptions.path),
|
|
82525
84008
|
};
|
|
82526
84009
|
});
|