@larksuiteoapi/node-sdk 1.55.0 → 1.57.0-beta.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 +2 -2
- package/types/index.d.ts +22644 -3864
package/es/index.js
CHANGED
|
@@ -4271,6 +4271,180 @@ class Client$13 extends Client$14 {
|
|
|
4271
4271
|
});
|
|
4272
4272
|
}),
|
|
4273
4273
|
},
|
|
4274
|
+
/**
|
|
4275
|
+
* workspace
|
|
4276
|
+
*/
|
|
4277
|
+
workspace: {
|
|
4278
|
+
/**
|
|
4279
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace&apiName=sql_commands&version=v1 click to debug }
|
|
4280
|
+
*
|
|
4281
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=sql_commands&project=apaas&resource=workspace&version=v1 document }
|
|
4282
|
+
*
|
|
4283
|
+
* 执行 SQL
|
|
4284
|
+
*/
|
|
4285
|
+
sqlCommands: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4286
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4287
|
+
return this.httpInstance
|
|
4288
|
+
.request({
|
|
4289
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands`, path),
|
|
4290
|
+
method: "POST",
|
|
4291
|
+
data,
|
|
4292
|
+
params,
|
|
4293
|
+
headers,
|
|
4294
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4295
|
+
})
|
|
4296
|
+
.catch((e) => {
|
|
4297
|
+
this.logger.error(formatErrors(e));
|
|
4298
|
+
throw e;
|
|
4299
|
+
});
|
|
4300
|
+
}),
|
|
4301
|
+
},
|
|
4302
|
+
/**
|
|
4303
|
+
* workspace.table
|
|
4304
|
+
*/
|
|
4305
|
+
workspaceTable: {
|
|
4306
|
+
/**
|
|
4307
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_batch_update&version=v1 click to debug }
|
|
4308
|
+
*
|
|
4309
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_batch_update&project=apaas&resource=workspace.table&version=v1 document }
|
|
4310
|
+
*
|
|
4311
|
+
* 批量更新数据表中的记录
|
|
4312
|
+
*/
|
|
4313
|
+
recordsBatchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4314
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4315
|
+
return this.httpInstance
|
|
4316
|
+
.request({
|
|
4317
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update`, path),
|
|
4318
|
+
method: "PATCH",
|
|
4319
|
+
data,
|
|
4320
|
+
params,
|
|
4321
|
+
headers,
|
|
4322
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4323
|
+
})
|
|
4324
|
+
.catch((e) => {
|
|
4325
|
+
this.logger.error(formatErrors(e));
|
|
4326
|
+
throw e;
|
|
4327
|
+
});
|
|
4328
|
+
}),
|
|
4329
|
+
/**
|
|
4330
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_delete&version=v1 click to debug }
|
|
4331
|
+
*
|
|
4332
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_delete&project=apaas&resource=workspace.table&version=v1 document }
|
|
4333
|
+
*
|
|
4334
|
+
* 删除数据表中的记录
|
|
4335
|
+
*/
|
|
4336
|
+
recordsDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4337
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4338
|
+
return this.httpInstance
|
|
4339
|
+
.request({
|
|
4340
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4341
|
+
method: "DELETE",
|
|
4342
|
+
data,
|
|
4343
|
+
params,
|
|
4344
|
+
headers,
|
|
4345
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4346
|
+
})
|
|
4347
|
+
.catch((e) => {
|
|
4348
|
+
this.logger.error(formatErrors(e));
|
|
4349
|
+
throw e;
|
|
4350
|
+
});
|
|
4351
|
+
}),
|
|
4352
|
+
/**
|
|
4353
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_get&version=v1 click to debug }
|
|
4354
|
+
*
|
|
4355
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_get&project=apaas&resource=workspace.table&version=v1 document }
|
|
4356
|
+
*
|
|
4357
|
+
* 查询数据表数据记录
|
|
4358
|
+
*/
|
|
4359
|
+
recordsGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4360
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4361
|
+
return this.httpInstance
|
|
4362
|
+
.request({
|
|
4363
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4364
|
+
method: "GET",
|
|
4365
|
+
data,
|
|
4366
|
+
params,
|
|
4367
|
+
headers,
|
|
4368
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4369
|
+
})
|
|
4370
|
+
.catch((e) => {
|
|
4371
|
+
this.logger.error(formatErrors(e));
|
|
4372
|
+
throw e;
|
|
4373
|
+
});
|
|
4374
|
+
}),
|
|
4375
|
+
/**
|
|
4376
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_patch&version=v1 click to debug }
|
|
4377
|
+
*
|
|
4378
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_patch&project=apaas&resource=workspace.table&version=v1 document }
|
|
4379
|
+
*
|
|
4380
|
+
* 按条件更新数据表中的记录
|
|
4381
|
+
*/
|
|
4382
|
+
recordsPatch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4383
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4384
|
+
return this.httpInstance
|
|
4385
|
+
.request({
|
|
4386
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4387
|
+
method: "PATCH",
|
|
4388
|
+
data,
|
|
4389
|
+
params,
|
|
4390
|
+
headers,
|
|
4391
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4392
|
+
})
|
|
4393
|
+
.catch((e) => {
|
|
4394
|
+
this.logger.error(formatErrors(e));
|
|
4395
|
+
throw e;
|
|
4396
|
+
});
|
|
4397
|
+
}),
|
|
4398
|
+
/**
|
|
4399
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.table&apiName=records_post&version=v1 click to debug }
|
|
4400
|
+
*
|
|
4401
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_post&project=apaas&resource=workspace.table&version=v1 document }
|
|
4402
|
+
*
|
|
4403
|
+
* 向数据表中添加或更新记录
|
|
4404
|
+
*/
|
|
4405
|
+
recordsPost: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4406
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4407
|
+
return this.httpInstance
|
|
4408
|
+
.request({
|
|
4409
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records`, path),
|
|
4410
|
+
method: "POST",
|
|
4411
|
+
data,
|
|
4412
|
+
params,
|
|
4413
|
+
headers,
|
|
4414
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4415
|
+
})
|
|
4416
|
+
.catch((e) => {
|
|
4417
|
+
this.logger.error(formatErrors(e));
|
|
4418
|
+
throw e;
|
|
4419
|
+
});
|
|
4420
|
+
}),
|
|
4421
|
+
},
|
|
4422
|
+
/**
|
|
4423
|
+
* workspace.view
|
|
4424
|
+
*/
|
|
4425
|
+
workspaceView: {
|
|
4426
|
+
/**
|
|
4427
|
+
* {@link https://open.feishu.cn/api-explorer?project=apaas&resource=workspace.view&apiName=views_get&version=v1 click to debug }
|
|
4428
|
+
*
|
|
4429
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=views_get&project=apaas&resource=workspace.view&version=v1 document }
|
|
4430
|
+
*/
|
|
4431
|
+
viewsGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
4432
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
4433
|
+
return this.httpInstance
|
|
4434
|
+
.request({
|
|
4435
|
+
url: fillApiPath(`${this.domain}/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records`, path),
|
|
4436
|
+
method: "GET",
|
|
4437
|
+
data,
|
|
4438
|
+
params,
|
|
4439
|
+
headers,
|
|
4440
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
4441
|
+
})
|
|
4442
|
+
.catch((e) => {
|
|
4443
|
+
this.logger.error(formatErrors(e));
|
|
4444
|
+
throw e;
|
|
4445
|
+
});
|
|
4446
|
+
}),
|
|
4447
|
+
},
|
|
4274
4448
|
},
|
|
4275
4449
|
};
|
|
4276
4450
|
}
|
|
@@ -4707,7 +4881,7 @@ class Client$12 extends Client$13 {
|
|
|
4707
4881
|
}),
|
|
4708
4882
|
},
|
|
4709
4883
|
/**
|
|
4710
|
-
*
|
|
4884
|
+
* 应用管理
|
|
4711
4885
|
*/
|
|
4712
4886
|
application: {
|
|
4713
4887
|
/**
|
|
@@ -5561,7 +5735,7 @@ class Client$12 extends Client$13 {
|
|
|
5561
5735
|
}),
|
|
5562
5736
|
},
|
|
5563
5737
|
/**
|
|
5564
|
-
*
|
|
5738
|
+
* 应用管理
|
|
5565
5739
|
*/
|
|
5566
5740
|
application: {
|
|
5567
5741
|
/**
|
|
@@ -6300,7 +6474,7 @@ class Client$11 extends Client$12 {
|
|
|
6300
6474
|
}),
|
|
6301
6475
|
},
|
|
6302
6476
|
/**
|
|
6303
|
-
*
|
|
6477
|
+
* 原生审批实例
|
|
6304
6478
|
*/
|
|
6305
6479
|
instance: {
|
|
6306
6480
|
/**
|
|
@@ -6424,13 +6598,34 @@ class Client$11 extends Client$12 {
|
|
|
6424
6598
|
throw e;
|
|
6425
6599
|
});
|
|
6426
6600
|
}),
|
|
6427
|
-
|
|
6601
|
+
/**
|
|
6602
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=preview&version=v4 click to debug }
|
|
6603
|
+
*
|
|
6604
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview document }
|
|
6605
|
+
*/
|
|
6606
|
+
preview: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6607
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6608
|
+
return this.httpInstance
|
|
6609
|
+
.request({
|
|
6610
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/preview`, path),
|
|
6611
|
+
method: "POST",
|
|
6612
|
+
data,
|
|
6613
|
+
params,
|
|
6614
|
+
headers,
|
|
6615
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6616
|
+
})
|
|
6617
|
+
.catch((e) => {
|
|
6618
|
+
this.logger.error(formatErrors(e));
|
|
6619
|
+
throw e;
|
|
6620
|
+
});
|
|
6621
|
+
}),
|
|
6622
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6428
6623
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6429
6624
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
6430
6625
|
const res = yield this.httpInstance
|
|
6431
6626
|
.request({
|
|
6432
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
6433
|
-
method: "
|
|
6627
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
6628
|
+
method: "POST",
|
|
6434
6629
|
headers: pickBy(innerPayload.headers, identity),
|
|
6435
6630
|
params: pickBy(innerPayload.params, identity),
|
|
6436
6631
|
data,
|
|
@@ -6475,20 +6670,20 @@ class Client$11 extends Client$12 {
|
|
|
6475
6670
|
return Iterable;
|
|
6476
6671
|
}),
|
|
6477
6672
|
/**
|
|
6478
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
6673
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
6479
6674
|
*
|
|
6480
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/
|
|
6675
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
6481
6676
|
*
|
|
6482
|
-
*
|
|
6677
|
+
* 查询实例列表
|
|
6483
6678
|
*
|
|
6484
|
-
*
|
|
6679
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
6485
6680
|
*/
|
|
6486
|
-
|
|
6681
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6487
6682
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6488
6683
|
return this.httpInstance
|
|
6489
6684
|
.request({
|
|
6490
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
6491
|
-
method: "
|
|
6685
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
6686
|
+
method: "POST",
|
|
6492
6687
|
data,
|
|
6493
6688
|
params,
|
|
6494
6689
|
headers,
|
|
@@ -6500,15 +6695,19 @@ class Client$11 extends Client$12 {
|
|
|
6500
6695
|
});
|
|
6501
6696
|
}),
|
|
6502
6697
|
/**
|
|
6503
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
6698
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
6504
6699
|
*
|
|
6505
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
6700
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
6701
|
+
*
|
|
6702
|
+
* 查询抄送列表
|
|
6703
|
+
*
|
|
6704
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
6506
6705
|
*/
|
|
6507
|
-
|
|
6706
|
+
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6508
6707
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6509
6708
|
return this.httpInstance
|
|
6510
6709
|
.request({
|
|
6511
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
6710
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
6512
6711
|
method: "POST",
|
|
6513
6712
|
data,
|
|
6514
6713
|
params,
|
|
@@ -6520,193 +6719,93 @@ class Client$11 extends Client$12 {
|
|
|
6520
6719
|
throw e;
|
|
6521
6720
|
});
|
|
6522
6721
|
}),
|
|
6523
|
-
|
|
6722
|
+
/**
|
|
6723
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
6724
|
+
*
|
|
6725
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
6726
|
+
*
|
|
6727
|
+
* 审批任务退回
|
|
6728
|
+
*
|
|
6729
|
+
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
6730
|
+
*/
|
|
6731
|
+
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6732
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6733
|
+
return this.httpInstance
|
|
6734
|
+
.request({
|
|
6735
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
6736
|
+
method: "POST",
|
|
6737
|
+
data,
|
|
6738
|
+
params,
|
|
6739
|
+
headers,
|
|
6740
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6741
|
+
})
|
|
6742
|
+
.catch((e) => {
|
|
6743
|
+
this.logger.error(formatErrors(e));
|
|
6744
|
+
throw e;
|
|
6745
|
+
});
|
|
6746
|
+
}),
|
|
6747
|
+
},
|
|
6748
|
+
/**
|
|
6749
|
+
* 原生审批评论
|
|
6750
|
+
*/
|
|
6751
|
+
instanceComment: {
|
|
6752
|
+
/**
|
|
6753
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
6754
|
+
*
|
|
6755
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
6756
|
+
*
|
|
6757
|
+
* 创建评论
|
|
6758
|
+
*
|
|
6759
|
+
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6760
|
+
*/
|
|
6761
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6762
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6763
|
+
return this.httpInstance
|
|
6764
|
+
.request({
|
|
6765
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6766
|
+
method: "POST",
|
|
6767
|
+
data,
|
|
6768
|
+
params,
|
|
6769
|
+
headers,
|
|
6770
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6771
|
+
})
|
|
6772
|
+
.catch((e) => {
|
|
6773
|
+
this.logger.error(formatErrors(e));
|
|
6774
|
+
throw e;
|
|
6775
|
+
});
|
|
6776
|
+
}),
|
|
6777
|
+
/**
|
|
6778
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
6779
|
+
*
|
|
6780
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
6781
|
+
*
|
|
6782
|
+
* 删除评论
|
|
6783
|
+
*
|
|
6784
|
+
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6785
|
+
*/
|
|
6786
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6787
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6788
|
+
return this.httpInstance
|
|
6789
|
+
.request({
|
|
6790
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
6791
|
+
method: "DELETE",
|
|
6792
|
+
data,
|
|
6793
|
+
params,
|
|
6794
|
+
headers,
|
|
6795
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6796
|
+
})
|
|
6797
|
+
.catch((e) => {
|
|
6798
|
+
this.logger.error(formatErrors(e));
|
|
6799
|
+
throw e;
|
|
6800
|
+
});
|
|
6801
|
+
}),
|
|
6802
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6524
6803
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6525
6804
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
6526
6805
|
const res = yield this.httpInstance
|
|
6527
6806
|
.request({
|
|
6528
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
6529
|
-
method: "
|
|
6530
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
6531
|
-
params: pickBy(innerPayload.params, identity),
|
|
6532
|
-
data,
|
|
6533
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6534
|
-
})
|
|
6535
|
-
.catch((e) => {
|
|
6536
|
-
this.logger.error(formatErrors(e));
|
|
6537
|
-
});
|
|
6538
|
-
return res;
|
|
6539
|
-
});
|
|
6540
|
-
const Iterable = {
|
|
6541
|
-
[Symbol.asyncIterator]() {
|
|
6542
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
6543
|
-
let hasMore = true;
|
|
6544
|
-
let pageToken;
|
|
6545
|
-
while (hasMore) {
|
|
6546
|
-
try {
|
|
6547
|
-
const res = yield __await(sendRequest({
|
|
6548
|
-
headers,
|
|
6549
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
6550
|
-
data,
|
|
6551
|
-
}));
|
|
6552
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
6553
|
-
// @ts-ignore
|
|
6554
|
-
has_more,
|
|
6555
|
-
// @ts-ignore
|
|
6556
|
-
page_token,
|
|
6557
|
-
// @ts-ignore
|
|
6558
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
6559
|
-
yield yield __await(rest);
|
|
6560
|
-
hasMore = Boolean(has_more);
|
|
6561
|
-
pageToken = page_token || next_page_token;
|
|
6562
|
-
}
|
|
6563
|
-
catch (e) {
|
|
6564
|
-
yield yield __await(null);
|
|
6565
|
-
break;
|
|
6566
|
-
}
|
|
6567
|
-
}
|
|
6568
|
-
});
|
|
6569
|
-
},
|
|
6570
|
-
};
|
|
6571
|
-
return Iterable;
|
|
6572
|
-
}),
|
|
6573
|
-
/**
|
|
6574
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
6575
|
-
*
|
|
6576
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
6577
|
-
*
|
|
6578
|
-
* 查询实例列表
|
|
6579
|
-
*
|
|
6580
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
6581
|
-
*/
|
|
6582
|
-
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6583
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6584
|
-
return this.httpInstance
|
|
6585
|
-
.request({
|
|
6586
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
6587
|
-
method: "POST",
|
|
6588
|
-
data,
|
|
6589
|
-
params,
|
|
6590
|
-
headers,
|
|
6591
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6592
|
-
})
|
|
6593
|
-
.catch((e) => {
|
|
6594
|
-
this.logger.error(formatErrors(e));
|
|
6595
|
-
throw e;
|
|
6596
|
-
});
|
|
6597
|
-
}),
|
|
6598
|
-
/**
|
|
6599
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
6600
|
-
*
|
|
6601
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
6602
|
-
*
|
|
6603
|
-
* 查询抄送列表
|
|
6604
|
-
*
|
|
6605
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
6606
|
-
*/
|
|
6607
|
-
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6608
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6609
|
-
return this.httpInstance
|
|
6610
|
-
.request({
|
|
6611
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
6612
|
-
method: "POST",
|
|
6613
|
-
data,
|
|
6614
|
-
params,
|
|
6615
|
-
headers,
|
|
6616
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6617
|
-
})
|
|
6618
|
-
.catch((e) => {
|
|
6619
|
-
this.logger.error(formatErrors(e));
|
|
6620
|
-
throw e;
|
|
6621
|
-
});
|
|
6622
|
-
}),
|
|
6623
|
-
/**
|
|
6624
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
6625
|
-
*
|
|
6626
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
6627
|
-
*
|
|
6628
|
-
* 审批任务退回
|
|
6629
|
-
*
|
|
6630
|
-
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
6631
|
-
*/
|
|
6632
|
-
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6633
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6634
|
-
return this.httpInstance
|
|
6635
|
-
.request({
|
|
6636
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
6637
|
-
method: "POST",
|
|
6638
|
-
data,
|
|
6639
|
-
params,
|
|
6640
|
-
headers,
|
|
6641
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6642
|
-
})
|
|
6643
|
-
.catch((e) => {
|
|
6644
|
-
this.logger.error(formatErrors(e));
|
|
6645
|
-
throw e;
|
|
6646
|
-
});
|
|
6647
|
-
}),
|
|
6648
|
-
},
|
|
6649
|
-
/**
|
|
6650
|
-
* 原生审批评论
|
|
6651
|
-
*/
|
|
6652
|
-
instanceComment: {
|
|
6653
|
-
/**
|
|
6654
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
6655
|
-
*
|
|
6656
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
6657
|
-
*
|
|
6658
|
-
* 创建评论
|
|
6659
|
-
*
|
|
6660
|
-
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6661
|
-
*/
|
|
6662
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6663
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6664
|
-
return this.httpInstance
|
|
6665
|
-
.request({
|
|
6666
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6667
|
-
method: "POST",
|
|
6668
|
-
data,
|
|
6669
|
-
params,
|
|
6670
|
-
headers,
|
|
6671
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6672
|
-
})
|
|
6673
|
-
.catch((e) => {
|
|
6674
|
-
this.logger.error(formatErrors(e));
|
|
6675
|
-
throw e;
|
|
6676
|
-
});
|
|
6677
|
-
}),
|
|
6678
|
-
/**
|
|
6679
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
6680
|
-
*
|
|
6681
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
6682
|
-
*
|
|
6683
|
-
* 删除评论
|
|
6684
|
-
*
|
|
6685
|
-
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
6686
|
-
*/
|
|
6687
|
-
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6688
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6689
|
-
return this.httpInstance
|
|
6690
|
-
.request({
|
|
6691
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
6692
|
-
method: "DELETE",
|
|
6693
|
-
data,
|
|
6694
|
-
params,
|
|
6695
|
-
headers,
|
|
6696
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
6697
|
-
})
|
|
6698
|
-
.catch((e) => {
|
|
6699
|
-
this.logger.error(formatErrors(e));
|
|
6700
|
-
throw e;
|
|
6701
|
-
});
|
|
6702
|
-
}),
|
|
6703
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
6704
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
6705
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
6706
|
-
const res = yield this.httpInstance
|
|
6707
|
-
.request({
|
|
6708
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6709
|
-
method: "GET",
|
|
6807
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
6808
|
+
method: "GET",
|
|
6710
6809
|
headers: pickBy(innerPayload.headers, identity),
|
|
6711
6810
|
params: pickBy(innerPayload.params, identity),
|
|
6712
6811
|
data,
|
|
@@ -7305,7 +7404,7 @@ class Client$11 extends Client$12 {
|
|
|
7305
7404
|
}),
|
|
7306
7405
|
},
|
|
7307
7406
|
/**
|
|
7308
|
-
*
|
|
7407
|
+
* 原生审批实例
|
|
7309
7408
|
*/
|
|
7310
7409
|
instance: {
|
|
7311
7410
|
/**
|
|
@@ -7429,13 +7528,34 @@ class Client$11 extends Client$12 {
|
|
|
7429
7528
|
throw e;
|
|
7430
7529
|
});
|
|
7431
7530
|
}),
|
|
7432
|
-
|
|
7531
|
+
/**
|
|
7532
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=preview&version=v4 click to debug }
|
|
7533
|
+
*
|
|
7534
|
+
* {@link https://open.feishu.cn/document/ukTMukTMukTM/ukTM5UjL5ETO14SOxkTN/approval-preview document }
|
|
7535
|
+
*/
|
|
7536
|
+
preview: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7537
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7538
|
+
return this.httpInstance
|
|
7539
|
+
.request({
|
|
7540
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/preview`, path),
|
|
7541
|
+
method: "POST",
|
|
7542
|
+
data,
|
|
7543
|
+
params,
|
|
7544
|
+
headers,
|
|
7545
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7546
|
+
})
|
|
7547
|
+
.catch((e) => {
|
|
7548
|
+
this.logger.error(formatErrors(e));
|
|
7549
|
+
throw e;
|
|
7550
|
+
});
|
|
7551
|
+
}),
|
|
7552
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7433
7553
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7434
7554
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7435
7555
|
const res = yield this.httpInstance
|
|
7436
7556
|
.request({
|
|
7437
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
7438
|
-
method: "
|
|
7557
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
7558
|
+
method: "POST",
|
|
7439
7559
|
headers: pickBy(innerPayload.headers, identity),
|
|
7440
7560
|
params: pickBy(innerPayload.params, identity),
|
|
7441
7561
|
data,
|
|
@@ -7482,20 +7602,20 @@ class Client$11 extends Client$12 {
|
|
|
7482
7602
|
return Iterable;
|
|
7483
7603
|
}),
|
|
7484
7604
|
/**
|
|
7485
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
7605
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
7486
7606
|
*
|
|
7487
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/
|
|
7607
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
7488
7608
|
*
|
|
7489
|
-
*
|
|
7609
|
+
* 查询实例列表
|
|
7490
7610
|
*
|
|
7491
|
-
*
|
|
7611
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
7492
7612
|
*/
|
|
7493
|
-
|
|
7613
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7494
7614
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7495
7615
|
return this.httpInstance
|
|
7496
7616
|
.request({
|
|
7497
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances`, path),
|
|
7498
|
-
method: "
|
|
7617
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
7618
|
+
method: "POST",
|
|
7499
7619
|
data,
|
|
7500
7620
|
params,
|
|
7501
7621
|
headers,
|
|
@@ -7507,15 +7627,19 @@ class Client$11 extends Client$12 {
|
|
|
7507
7627
|
});
|
|
7508
7628
|
}),
|
|
7509
7629
|
/**
|
|
7510
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=
|
|
7630
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
7511
7631
|
*
|
|
7512
|
-
* {@link https://open.feishu.cn/document/ukTMukTMukTM/
|
|
7632
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
7633
|
+
*
|
|
7634
|
+
* 查询抄送列表
|
|
7635
|
+
*
|
|
7636
|
+
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
7513
7637
|
*/
|
|
7514
|
-
|
|
7638
|
+
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7515
7639
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7516
7640
|
return this.httpInstance
|
|
7517
7641
|
.request({
|
|
7518
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
7642
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
7519
7643
|
method: "POST",
|
|
7520
7644
|
data,
|
|
7521
7645
|
params,
|
|
@@ -7527,195 +7651,93 @@ class Client$11 extends Client$12 {
|
|
|
7527
7651
|
throw e;
|
|
7528
7652
|
});
|
|
7529
7653
|
}),
|
|
7530
|
-
|
|
7654
|
+
/**
|
|
7655
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
7656
|
+
*
|
|
7657
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
7658
|
+
*
|
|
7659
|
+
* 审批任务退回
|
|
7660
|
+
*
|
|
7661
|
+
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
7662
|
+
*/
|
|
7663
|
+
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7664
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7665
|
+
return this.httpInstance
|
|
7666
|
+
.request({
|
|
7667
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
7668
|
+
method: "POST",
|
|
7669
|
+
data,
|
|
7670
|
+
params,
|
|
7671
|
+
headers,
|
|
7672
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7673
|
+
})
|
|
7674
|
+
.catch((e) => {
|
|
7675
|
+
this.logger.error(formatErrors(e));
|
|
7676
|
+
throw e;
|
|
7677
|
+
});
|
|
7678
|
+
}),
|
|
7679
|
+
},
|
|
7680
|
+
/**
|
|
7681
|
+
* 原生审批评论
|
|
7682
|
+
*/
|
|
7683
|
+
instanceComment: {
|
|
7684
|
+
/**
|
|
7685
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
7686
|
+
*
|
|
7687
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
7688
|
+
*
|
|
7689
|
+
* 创建评论
|
|
7690
|
+
*
|
|
7691
|
+
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7692
|
+
*/
|
|
7693
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7694
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7695
|
+
return this.httpInstance
|
|
7696
|
+
.request({
|
|
7697
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7698
|
+
method: "POST",
|
|
7699
|
+
data,
|
|
7700
|
+
params,
|
|
7701
|
+
headers,
|
|
7702
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7703
|
+
})
|
|
7704
|
+
.catch((e) => {
|
|
7705
|
+
this.logger.error(formatErrors(e));
|
|
7706
|
+
throw e;
|
|
7707
|
+
});
|
|
7708
|
+
}),
|
|
7709
|
+
/**
|
|
7710
|
+
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
7711
|
+
*
|
|
7712
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
7713
|
+
*
|
|
7714
|
+
* 删除评论
|
|
7715
|
+
*
|
|
7716
|
+
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7717
|
+
*/
|
|
7718
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7719
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7720
|
+
return this.httpInstance
|
|
7721
|
+
.request({
|
|
7722
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
7723
|
+
method: "DELETE",
|
|
7724
|
+
data,
|
|
7725
|
+
params,
|
|
7726
|
+
headers,
|
|
7727
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7728
|
+
})
|
|
7729
|
+
.catch((e) => {
|
|
7730
|
+
this.logger.error(formatErrors(e));
|
|
7731
|
+
throw e;
|
|
7732
|
+
});
|
|
7733
|
+
}),
|
|
7734
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7531
7735
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7532
7736
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7533
7737
|
const res = yield this.httpInstance
|
|
7534
7738
|
.request({
|
|
7535
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/
|
|
7536
|
-
method: "
|
|
7537
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
7538
|
-
params: pickBy(innerPayload.params, identity),
|
|
7539
|
-
data,
|
|
7540
|
-
paramsSerializer: (params) => stringify(params, {
|
|
7541
|
-
arrayFormat: "repeat",
|
|
7542
|
-
}),
|
|
7543
|
-
})
|
|
7544
|
-
.catch((e) => {
|
|
7545
|
-
this.logger.error(formatErrors(e));
|
|
7546
|
-
});
|
|
7547
|
-
return res;
|
|
7548
|
-
});
|
|
7549
|
-
const Iterable = {
|
|
7550
|
-
[Symbol.asyncIterator]() {
|
|
7551
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
7552
|
-
let hasMore = true;
|
|
7553
|
-
let pageToken;
|
|
7554
|
-
while (hasMore) {
|
|
7555
|
-
try {
|
|
7556
|
-
const res = yield __await(sendRequest({
|
|
7557
|
-
headers,
|
|
7558
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
7559
|
-
data,
|
|
7560
|
-
}));
|
|
7561
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
7562
|
-
// @ts-ignore
|
|
7563
|
-
has_more,
|
|
7564
|
-
// @ts-ignore
|
|
7565
|
-
page_token,
|
|
7566
|
-
// @ts-ignore
|
|
7567
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
7568
|
-
yield yield __await(rest);
|
|
7569
|
-
hasMore = Boolean(has_more);
|
|
7570
|
-
pageToken = page_token || next_page_token;
|
|
7571
|
-
}
|
|
7572
|
-
catch (e) {
|
|
7573
|
-
yield yield __await(null);
|
|
7574
|
-
break;
|
|
7575
|
-
}
|
|
7576
|
-
}
|
|
7577
|
-
});
|
|
7578
|
-
},
|
|
7579
|
-
};
|
|
7580
|
-
return Iterable;
|
|
7581
|
-
}),
|
|
7582
|
-
/**
|
|
7583
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=query&version=v4 click to debug }
|
|
7584
|
-
*
|
|
7585
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
|
|
7586
|
-
*
|
|
7587
|
-
* 查询实例列表
|
|
7588
|
-
*
|
|
7589
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
|
|
7590
|
-
*/
|
|
7591
|
-
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7592
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7593
|
-
return this.httpInstance
|
|
7594
|
-
.request({
|
|
7595
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/query`, path),
|
|
7596
|
-
method: "POST",
|
|
7597
|
-
data,
|
|
7598
|
-
params,
|
|
7599
|
-
headers,
|
|
7600
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7601
|
-
})
|
|
7602
|
-
.catch((e) => {
|
|
7603
|
-
this.logger.error(formatErrors(e));
|
|
7604
|
-
throw e;
|
|
7605
|
-
});
|
|
7606
|
-
}),
|
|
7607
|
-
/**
|
|
7608
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=search_cc&version=v4 click to debug }
|
|
7609
|
-
*
|
|
7610
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
|
|
7611
|
-
*
|
|
7612
|
-
* 查询抄送列表
|
|
7613
|
-
*
|
|
7614
|
-
* 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
|
|
7615
|
-
*/
|
|
7616
|
-
searchCc: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7617
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7618
|
-
return this.httpInstance
|
|
7619
|
-
.request({
|
|
7620
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/search_cc`, path),
|
|
7621
|
-
method: "POST",
|
|
7622
|
-
data,
|
|
7623
|
-
params,
|
|
7624
|
-
headers,
|
|
7625
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7626
|
-
})
|
|
7627
|
-
.catch((e) => {
|
|
7628
|
-
this.logger.error(formatErrors(e));
|
|
7629
|
-
throw e;
|
|
7630
|
-
});
|
|
7631
|
-
}),
|
|
7632
|
-
/**
|
|
7633
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance&apiName=specified_rollback&version=v4 click to debug }
|
|
7634
|
-
*
|
|
7635
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/specified_rollback document }
|
|
7636
|
-
*
|
|
7637
|
-
* 审批任务退回
|
|
7638
|
-
*
|
|
7639
|
-
* 从当前审批任务,退回到已审批的一个或多个任务节点。退回后,已审批节点重新生成审批任务
|
|
7640
|
-
*/
|
|
7641
|
-
specifiedRollback: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7642
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7643
|
-
return this.httpInstance
|
|
7644
|
-
.request({
|
|
7645
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/specified_rollback`, path),
|
|
7646
|
-
method: "POST",
|
|
7647
|
-
data,
|
|
7648
|
-
params,
|
|
7649
|
-
headers,
|
|
7650
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7651
|
-
})
|
|
7652
|
-
.catch((e) => {
|
|
7653
|
-
this.logger.error(formatErrors(e));
|
|
7654
|
-
throw e;
|
|
7655
|
-
});
|
|
7656
|
-
}),
|
|
7657
|
-
},
|
|
7658
|
-
/**
|
|
7659
|
-
* 原生审批评论
|
|
7660
|
-
*/
|
|
7661
|
-
instanceComment: {
|
|
7662
|
-
/**
|
|
7663
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=create&version=v4 click to debug }
|
|
7664
|
-
*
|
|
7665
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/create document }
|
|
7666
|
-
*
|
|
7667
|
-
* 创建评论
|
|
7668
|
-
*
|
|
7669
|
-
* 在某审批实例下创建、修改评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7670
|
-
*/
|
|
7671
|
-
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7672
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7673
|
-
return this.httpInstance
|
|
7674
|
-
.request({
|
|
7675
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7676
|
-
method: "POST",
|
|
7677
|
-
data,
|
|
7678
|
-
params,
|
|
7679
|
-
headers,
|
|
7680
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7681
|
-
})
|
|
7682
|
-
.catch((e) => {
|
|
7683
|
-
this.logger.error(formatErrors(e));
|
|
7684
|
-
throw e;
|
|
7685
|
-
});
|
|
7686
|
-
}),
|
|
7687
|
-
/**
|
|
7688
|
-
* {@link https://open.feishu.cn/api-explorer?project=approval&resource=instance.comment&apiName=delete&version=v4 click to debug }
|
|
7689
|
-
*
|
|
7690
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/delete document }
|
|
7691
|
-
*
|
|
7692
|
-
* 删除评论
|
|
7693
|
-
*
|
|
7694
|
-
* 逻辑删除某审批实例下的一条评论或评论回复(不包含审批同意、拒绝、转交等附加的理由或意见)。
|
|
7695
|
-
*/
|
|
7696
|
-
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7697
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7698
|
-
return this.httpInstance
|
|
7699
|
-
.request({
|
|
7700
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments/:comment_id`, path),
|
|
7701
|
-
method: "DELETE",
|
|
7702
|
-
data,
|
|
7703
|
-
params,
|
|
7704
|
-
headers,
|
|
7705
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
7706
|
-
})
|
|
7707
|
-
.catch((e) => {
|
|
7708
|
-
this.logger.error(formatErrors(e));
|
|
7709
|
-
throw e;
|
|
7710
|
-
});
|
|
7711
|
-
}),
|
|
7712
|
-
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
7713
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
7714
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
7715
|
-
const res = yield this.httpInstance
|
|
7716
|
-
.request({
|
|
7717
|
-
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7718
|
-
method: "GET",
|
|
7739
|
+
url: fillApiPath(`${this.domain}/open-apis/approval/v4/instances/:instance_id/comments`, path),
|
|
7740
|
+
method: "GET",
|
|
7719
7741
|
headers: pickBy(innerPayload.headers, identity),
|
|
7720
7742
|
params: pickBy(innerPayload.params, identity),
|
|
7721
7743
|
data,
|
|
@@ -16004,11 +16026,103 @@ class Client$U extends Client$V {
|
|
|
16004
16026
|
headers: res.headers,
|
|
16005
16027
|
};
|
|
16006
16028
|
}),
|
|
16029
|
+
/**
|
|
16030
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=theme&version=v1 click to debug }
|
|
16031
|
+
*
|
|
16032
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=theme&project=board&resource=whiteboard&version=v1 document }
|
|
16033
|
+
*
|
|
16034
|
+
* 获取画板的主题
|
|
16035
|
+
*/
|
|
16036
|
+
theme: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16037
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16038
|
+
return this.httpInstance
|
|
16039
|
+
.request({
|
|
16040
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/theme`, path),
|
|
16041
|
+
method: "GET",
|
|
16042
|
+
data,
|
|
16043
|
+
params,
|
|
16044
|
+
headers,
|
|
16045
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
16046
|
+
})
|
|
16047
|
+
.catch((e) => {
|
|
16048
|
+
this.logger.error(formatErrors(e));
|
|
16049
|
+
throw e;
|
|
16050
|
+
});
|
|
16051
|
+
}),
|
|
16052
|
+
/**
|
|
16053
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard&apiName=update_theme&version=v1 click to debug }
|
|
16054
|
+
*
|
|
16055
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_theme&project=board&resource=whiteboard&version=v1 document }
|
|
16056
|
+
*
|
|
16057
|
+
* 更新画板主题
|
|
16058
|
+
*/
|
|
16059
|
+
updateTheme: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16060
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16061
|
+
return this.httpInstance
|
|
16062
|
+
.request({
|
|
16063
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/update_theme`, path),
|
|
16064
|
+
method: "POST",
|
|
16065
|
+
data,
|
|
16066
|
+
params,
|
|
16067
|
+
headers,
|
|
16068
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
16069
|
+
})
|
|
16070
|
+
.catch((e) => {
|
|
16071
|
+
this.logger.error(formatErrors(e));
|
|
16072
|
+
throw e;
|
|
16073
|
+
});
|
|
16074
|
+
}),
|
|
16007
16075
|
},
|
|
16008
16076
|
/**
|
|
16009
16077
|
* whiteboard.node
|
|
16010
16078
|
*/
|
|
16011
16079
|
whiteboardNode: {
|
|
16080
|
+
/**
|
|
16081
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=create&version=v1 click to debug }
|
|
16082
|
+
*
|
|
16083
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=board&resource=whiteboard.node&version=v1 document }
|
|
16084
|
+
*
|
|
16085
|
+
* 在画板中创建节点
|
|
16086
|
+
*/
|
|
16087
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16088
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16089
|
+
return this.httpInstance
|
|
16090
|
+
.request({
|
|
16091
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes`, path),
|
|
16092
|
+
method: "POST",
|
|
16093
|
+
data,
|
|
16094
|
+
params,
|
|
16095
|
+
headers,
|
|
16096
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
16097
|
+
})
|
|
16098
|
+
.catch((e) => {
|
|
16099
|
+
this.logger.error(formatErrors(e));
|
|
16100
|
+
throw e;
|
|
16101
|
+
});
|
|
16102
|
+
}),
|
|
16103
|
+
/**
|
|
16104
|
+
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=create_plantuml&version=v1 click to debug }
|
|
16105
|
+
*
|
|
16106
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create_plantuml&project=board&resource=whiteboard.node&version=v1 document }
|
|
16107
|
+
*
|
|
16108
|
+
* 创建 plant uml 图形
|
|
16109
|
+
*/
|
|
16110
|
+
createPlantuml: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16111
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16112
|
+
return this.httpInstance
|
|
16113
|
+
.request({
|
|
16114
|
+
url: fillApiPath(`${this.domain}/open-apis/board/v1/whiteboards/:whiteboard_id/nodes/plantuml`, path),
|
|
16115
|
+
method: "POST",
|
|
16116
|
+
data,
|
|
16117
|
+
params,
|
|
16118
|
+
headers,
|
|
16119
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
16120
|
+
})
|
|
16121
|
+
.catch((e) => {
|
|
16122
|
+
this.logger.error(formatErrors(e));
|
|
16123
|
+
throw e;
|
|
16124
|
+
});
|
|
16125
|
+
}),
|
|
16012
16126
|
/**
|
|
16013
16127
|
* {@link https://open.feishu.cn/api-explorer?project=board&resource=whiteboard.node&apiName=list&version=v1 click to debug }
|
|
16014
16128
|
*
|
|
@@ -16346,6 +16460,27 @@ class Client$T extends Client$U {
|
|
|
16346
16460
|
throw e;
|
|
16347
16461
|
});
|
|
16348
16462
|
}),
|
|
16463
|
+
/**
|
|
16464
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=mget&version=v4 click to debug }
|
|
16465
|
+
*
|
|
16466
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=calendar&resource=calendar&version=v4 document }
|
|
16467
|
+
*/
|
|
16468
|
+
mget: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16469
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16470
|
+
return this.httpInstance
|
|
16471
|
+
.request({
|
|
16472
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/mget`, path),
|
|
16473
|
+
method: "POST",
|
|
16474
|
+
data,
|
|
16475
|
+
params,
|
|
16476
|
+
headers,
|
|
16477
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
16478
|
+
})
|
|
16479
|
+
.catch((e) => {
|
|
16480
|
+
this.logger.error(formatErrors(e));
|
|
16481
|
+
throw e;
|
|
16482
|
+
});
|
|
16483
|
+
}),
|
|
16349
16484
|
/**
|
|
16350
16485
|
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=patch&version=v4 click to debug }
|
|
16351
16486
|
*
|
|
@@ -16398,6 +16533,27 @@ class Client$T extends Client$U {
|
|
|
16398
16533
|
throw e;
|
|
16399
16534
|
});
|
|
16400
16535
|
}),
|
|
16536
|
+
/**
|
|
16537
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primarys&version=v4 click to debug }
|
|
16538
|
+
*
|
|
16539
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=primarys&project=calendar&resource=calendar&version=v4 document }
|
|
16540
|
+
*/
|
|
16541
|
+
primarys: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16542
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16543
|
+
return this.httpInstance
|
|
16544
|
+
.request({
|
|
16545
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primarys`, path),
|
|
16546
|
+
method: "POST",
|
|
16547
|
+
data,
|
|
16548
|
+
params,
|
|
16549
|
+
headers,
|
|
16550
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
16551
|
+
})
|
|
16552
|
+
.catch((e) => {
|
|
16553
|
+
this.logger.error(formatErrors(e));
|
|
16554
|
+
throw e;
|
|
16555
|
+
});
|
|
16556
|
+
}),
|
|
16401
16557
|
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
16402
16558
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
16403
16559
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -17293,6 +17449,27 @@ class Client$T extends Client$U {
|
|
|
17293
17449
|
* freebusy
|
|
17294
17450
|
*/
|
|
17295
17451
|
freebusy: {
|
|
17452
|
+
/**
|
|
17453
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=batch&version=v4 click to debug }
|
|
17454
|
+
*
|
|
17455
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=calendar&resource=freebusy&version=v4 document }
|
|
17456
|
+
*/
|
|
17457
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17458
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17459
|
+
return this.httpInstance
|
|
17460
|
+
.request({
|
|
17461
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/batch`, path),
|
|
17462
|
+
method: "POST",
|
|
17463
|
+
data,
|
|
17464
|
+
params,
|
|
17465
|
+
headers,
|
|
17466
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
17467
|
+
})
|
|
17468
|
+
.catch((e) => {
|
|
17469
|
+
this.logger.error(formatErrors(e));
|
|
17470
|
+
throw e;
|
|
17471
|
+
});
|
|
17472
|
+
}),
|
|
17296
17473
|
/**
|
|
17297
17474
|
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=list&version=v4 click to debug }
|
|
17298
17475
|
*
|
|
@@ -17708,175 +17885,15 @@ class Client$T extends Client$U {
|
|
|
17708
17885
|
});
|
|
17709
17886
|
}),
|
|
17710
17887
|
/**
|
|
17711
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=
|
|
17712
|
-
*
|
|
17713
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch document }
|
|
17714
|
-
*
|
|
17715
|
-
* 更新日历信息
|
|
17716
|
-
*
|
|
17717
|
-
* 该接口用于以当前身份(应用 / 用户)修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17718
|
-
*
|
|
17719
|
-
* 当前身份对日历有 owner 权限时,可修改全局字段:summary, description, permission。;;当前身份对日历不具有 owner 权限时,仅可修改对自己生效的字段:color, summary_alias。
|
|
17720
|
-
*/
|
|
17721
|
-
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17722
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17723
|
-
return this.httpInstance
|
|
17724
|
-
.request({
|
|
17725
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path),
|
|
17726
|
-
method: "PATCH",
|
|
17727
|
-
data,
|
|
17728
|
-
params,
|
|
17729
|
-
headers,
|
|
17730
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
17731
|
-
})
|
|
17732
|
-
.catch((e) => {
|
|
17733
|
-
this.logger.error(formatErrors(e));
|
|
17734
|
-
throw e;
|
|
17735
|
-
});
|
|
17736
|
-
}),
|
|
17737
|
-
/**
|
|
17738
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primary&version=v4 click to debug }
|
|
17739
|
-
*
|
|
17740
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary document }
|
|
17741
|
-
*
|
|
17742
|
-
* 查询主日历信息
|
|
17743
|
-
*
|
|
17744
|
-
* 获取当前身份的主日历信息。
|
|
17745
|
-
*/
|
|
17746
|
-
primary: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17747
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17748
|
-
return this.httpInstance
|
|
17749
|
-
.request({
|
|
17750
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primary`, path),
|
|
17751
|
-
method: "POST",
|
|
17752
|
-
data,
|
|
17753
|
-
params,
|
|
17754
|
-
headers,
|
|
17755
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
17756
|
-
})
|
|
17757
|
-
.catch((e) => {
|
|
17758
|
-
this.logger.error(formatErrors(e));
|
|
17759
|
-
throw e;
|
|
17760
|
-
});
|
|
17761
|
-
}),
|
|
17762
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17763
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17764
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
17765
|
-
const res = yield this.httpInstance
|
|
17766
|
-
.request({
|
|
17767
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
17768
|
-
method: "POST",
|
|
17769
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
17770
|
-
params: pickBy(innerPayload.params, identity),
|
|
17771
|
-
data,
|
|
17772
|
-
paramsSerializer: (params) => stringify(params, {
|
|
17773
|
-
arrayFormat: "repeat",
|
|
17774
|
-
}),
|
|
17775
|
-
})
|
|
17776
|
-
.catch((e) => {
|
|
17777
|
-
this.logger.error(formatErrors(e));
|
|
17778
|
-
});
|
|
17779
|
-
return res;
|
|
17780
|
-
});
|
|
17781
|
-
const Iterable = {
|
|
17782
|
-
[Symbol.asyncIterator]() {
|
|
17783
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
17784
|
-
let hasMore = true;
|
|
17785
|
-
let pageToken;
|
|
17786
|
-
while (hasMore) {
|
|
17787
|
-
try {
|
|
17788
|
-
const res = yield __await(sendRequest({
|
|
17789
|
-
headers,
|
|
17790
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
17791
|
-
data,
|
|
17792
|
-
}));
|
|
17793
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
17794
|
-
// @ts-ignore
|
|
17795
|
-
has_more,
|
|
17796
|
-
// @ts-ignore
|
|
17797
|
-
page_token,
|
|
17798
|
-
// @ts-ignore
|
|
17799
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
17800
|
-
yield yield __await(rest);
|
|
17801
|
-
hasMore = Boolean(has_more);
|
|
17802
|
-
pageToken = page_token || next_page_token;
|
|
17803
|
-
}
|
|
17804
|
-
catch (e) {
|
|
17805
|
-
yield yield __await(null);
|
|
17806
|
-
break;
|
|
17807
|
-
}
|
|
17808
|
-
}
|
|
17809
|
-
});
|
|
17810
|
-
},
|
|
17811
|
-
};
|
|
17812
|
-
return Iterable;
|
|
17813
|
-
}),
|
|
17814
|
-
/**
|
|
17815
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=search&version=v4 click to debug }
|
|
17816
|
-
*
|
|
17817
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search document }
|
|
17818
|
-
*
|
|
17819
|
-
* 搜索日历
|
|
17820
|
-
*
|
|
17821
|
-
* 该接口用于通过关键字查询公共日历或用户主日历。
|
|
17822
|
-
*/
|
|
17823
|
-
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17824
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17825
|
-
return this.httpInstance
|
|
17826
|
-
.request({
|
|
17827
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
17828
|
-
method: "POST",
|
|
17829
|
-
data,
|
|
17830
|
-
params,
|
|
17831
|
-
headers,
|
|
17832
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
17833
|
-
})
|
|
17834
|
-
.catch((e) => {
|
|
17835
|
-
this.logger.error(formatErrors(e));
|
|
17836
|
-
throw e;
|
|
17837
|
-
});
|
|
17838
|
-
}),
|
|
17839
|
-
/**
|
|
17840
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscribe&version=v4 click to debug }
|
|
17888
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=mget&version=v4 click to debug }
|
|
17841
17889
|
*
|
|
17842
|
-
* {@link https://open.feishu.cn/
|
|
17843
|
-
*
|
|
17844
|
-
* 订阅日历
|
|
17845
|
-
*
|
|
17846
|
-
* 该接口用于以当前身份(应用 / 用户)订阅某个日历。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17847
|
-
*
|
|
17848
|
-
* - 仅可订阅类型为 primary 或 shared 的公开日历。;- 可订阅日历数量上限为1000。
|
|
17890
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mget&project=calendar&resource=calendar&version=v4 document }
|
|
17849
17891
|
*/
|
|
17850
|
-
|
|
17851
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17852
|
-
return this.httpInstance
|
|
17853
|
-
.request({
|
|
17854
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`, path),
|
|
17855
|
-
method: "POST",
|
|
17856
|
-
data,
|
|
17857
|
-
params,
|
|
17858
|
-
headers,
|
|
17859
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
17860
|
-
})
|
|
17861
|
-
.catch((e) => {
|
|
17862
|
-
this.logger.error(formatErrors(e));
|
|
17863
|
-
throw e;
|
|
17864
|
-
});
|
|
17865
|
-
}),
|
|
17866
|
-
/**
|
|
17867
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscription&version=v4 click to debug }
|
|
17868
|
-
*
|
|
17869
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription document }
|
|
17870
|
-
*
|
|
17871
|
-
* 订阅日历变更事件
|
|
17872
|
-
*
|
|
17873
|
-
* 该接口用于以用户身份订阅当前身份下日历列表中的所有日历变更。
|
|
17874
|
-
*/
|
|
17875
|
-
subscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17892
|
+
mget: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17876
17893
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17877
17894
|
return this.httpInstance
|
|
17878
17895
|
.request({
|
|
17879
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/
|
|
17896
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/mget`, path),
|
|
17880
17897
|
method: "POST",
|
|
17881
17898
|
data,
|
|
17882
17899
|
params,
|
|
@@ -17889,47 +17906,22 @@ class Client$T extends Client$U {
|
|
|
17889
17906
|
});
|
|
17890
17907
|
}),
|
|
17891
17908
|
/**
|
|
17892
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=
|
|
17893
|
-
*
|
|
17894
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscribe document }
|
|
17895
|
-
*
|
|
17896
|
-
* 取消订阅日历
|
|
17897
|
-
*
|
|
17898
|
-
* 该接口用于以当前身份(应用 / 用户)取消对某日历的订阅状态。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17909
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=patch&version=v4 click to debug }
|
|
17899
17910
|
*
|
|
17900
|
-
*
|
|
17901
|
-
*/
|
|
17902
|
-
unsubscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17903
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17904
|
-
return this.httpInstance
|
|
17905
|
-
.request({
|
|
17906
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`, path),
|
|
17907
|
-
method: "POST",
|
|
17908
|
-
data,
|
|
17909
|
-
params,
|
|
17910
|
-
headers,
|
|
17911
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
17912
|
-
})
|
|
17913
|
-
.catch((e) => {
|
|
17914
|
-
this.logger.error(formatErrors(e));
|
|
17915
|
-
throw e;
|
|
17916
|
-
});
|
|
17917
|
-
}),
|
|
17918
|
-
/**
|
|
17919
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscription&version=v4 click to debug }
|
|
17911
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch document }
|
|
17920
17912
|
*
|
|
17921
|
-
*
|
|
17913
|
+
* 更新日历信息
|
|
17922
17914
|
*
|
|
17923
|
-
*
|
|
17915
|
+
* 该接口用于以当前身份(应用 / 用户)修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
|
|
17924
17916
|
*
|
|
17925
|
-
*
|
|
17917
|
+
* 当前身份对日历有 owner 权限时,可修改全局字段:summary, description, permission。;;当前身份对日历不具有 owner 权限时,仅可修改对自己生效的字段:color, summary_alias。
|
|
17926
17918
|
*/
|
|
17927
|
-
|
|
17919
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17928
17920
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17929
17921
|
return this.httpInstance
|
|
17930
17922
|
.request({
|
|
17931
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
17932
|
-
method: "
|
|
17923
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id`, path),
|
|
17924
|
+
method: "PATCH",
|
|
17933
17925
|
data,
|
|
17934
17926
|
params,
|
|
17935
17927
|
headers,
|
|
@@ -17940,27 +17932,20 @@ class Client$T extends Client$U {
|
|
|
17940
17932
|
throw e;
|
|
17941
17933
|
});
|
|
17942
17934
|
}),
|
|
17943
|
-
},
|
|
17944
|
-
/**
|
|
17945
|
-
* 日程参与人
|
|
17946
|
-
*/
|
|
17947
|
-
calendarEventAttendee: {
|
|
17948
17935
|
/**
|
|
17949
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar
|
|
17950
|
-
*
|
|
17951
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete document }
|
|
17936
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primary&version=v4 click to debug }
|
|
17952
17937
|
*
|
|
17953
|
-
*
|
|
17938
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary document }
|
|
17954
17939
|
*
|
|
17955
|
-
*
|
|
17940
|
+
* 查询主日历信息
|
|
17956
17941
|
*
|
|
17957
|
-
*
|
|
17942
|
+
* 获取当前身份的主日历信息。
|
|
17958
17943
|
*/
|
|
17959
|
-
|
|
17944
|
+
primary: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17960
17945
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17961
17946
|
return this.httpInstance
|
|
17962
17947
|
.request({
|
|
17963
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
17948
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primary`, path),
|
|
17964
17949
|
method: "POST",
|
|
17965
17950
|
data,
|
|
17966
17951
|
params,
|
|
@@ -17973,21 +17958,15 @@ class Client$T extends Client$U {
|
|
|
17973
17958
|
});
|
|
17974
17959
|
}),
|
|
17975
17960
|
/**
|
|
17976
|
-
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar
|
|
17961
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=primarys&version=v4 click to debug }
|
|
17977
17962
|
*
|
|
17978
|
-
* {@link https://open.feishu.cn/
|
|
17979
|
-
*
|
|
17980
|
-
* 创建日程参与人;
|
|
17981
|
-
*
|
|
17982
|
-
* 批量给日程添加参与人。
|
|
17983
|
-
*
|
|
17984
|
-
* - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者,或日程设置了「参与人可邀请其它参与人」权限。;;- 新添加的日程参与人必须与日程组织者在同一个企业内。;;- 使用该接口添加会议室后,会议室会进入异步的预约流程,请求结束不代表会议室预约成功,需后续再查询预约状态。;;- 每个日程最多只能有 3000 名参与人。;;- 开启管理员能力后预约会议室可不受会议室预约范围的限制(当前不支持用管理员身份给其他人的日程预约会议室)
|
|
17963
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=primarys&project=calendar&resource=calendar&version=v4 document }
|
|
17985
17964
|
*/
|
|
17986
|
-
|
|
17965
|
+
primarys: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
17987
17966
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
17988
17967
|
return this.httpInstance
|
|
17989
17968
|
.request({
|
|
17990
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
17969
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/primarys`, path),
|
|
17991
17970
|
method: "POST",
|
|
17992
17971
|
data,
|
|
17993
17972
|
params,
|
|
@@ -17999,13 +17978,253 @@ class Client$T extends Client$U {
|
|
|
17999
17978
|
throw e;
|
|
18000
17979
|
});
|
|
18001
17980
|
}),
|
|
18002
|
-
|
|
17981
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18003
17982
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18004
17983
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
18005
17984
|
const res = yield this.httpInstance
|
|
18006
17985
|
.request({
|
|
18007
|
-
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars
|
|
18008
|
-
method: "
|
|
17986
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
17987
|
+
method: "POST",
|
|
17988
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
17989
|
+
params: pickBy(innerPayload.params, identity),
|
|
17990
|
+
data,
|
|
17991
|
+
paramsSerializer: (params) => stringify(params, {
|
|
17992
|
+
arrayFormat: "repeat",
|
|
17993
|
+
}),
|
|
17994
|
+
})
|
|
17995
|
+
.catch((e) => {
|
|
17996
|
+
this.logger.error(formatErrors(e));
|
|
17997
|
+
});
|
|
17998
|
+
return res;
|
|
17999
|
+
});
|
|
18000
|
+
const Iterable = {
|
|
18001
|
+
[Symbol.asyncIterator]() {
|
|
18002
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
18003
|
+
let hasMore = true;
|
|
18004
|
+
let pageToken;
|
|
18005
|
+
while (hasMore) {
|
|
18006
|
+
try {
|
|
18007
|
+
const res = yield __await(sendRequest({
|
|
18008
|
+
headers,
|
|
18009
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
18010
|
+
data,
|
|
18011
|
+
}));
|
|
18012
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
18013
|
+
// @ts-ignore
|
|
18014
|
+
has_more,
|
|
18015
|
+
// @ts-ignore
|
|
18016
|
+
page_token,
|
|
18017
|
+
// @ts-ignore
|
|
18018
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
18019
|
+
yield yield __await(rest);
|
|
18020
|
+
hasMore = Boolean(has_more);
|
|
18021
|
+
pageToken = page_token || next_page_token;
|
|
18022
|
+
}
|
|
18023
|
+
catch (e) {
|
|
18024
|
+
yield yield __await(null);
|
|
18025
|
+
break;
|
|
18026
|
+
}
|
|
18027
|
+
}
|
|
18028
|
+
});
|
|
18029
|
+
},
|
|
18030
|
+
};
|
|
18031
|
+
return Iterable;
|
|
18032
|
+
}),
|
|
18033
|
+
/**
|
|
18034
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=search&version=v4 click to debug }
|
|
18035
|
+
*
|
|
18036
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search document }
|
|
18037
|
+
*
|
|
18038
|
+
* 搜索日历
|
|
18039
|
+
*
|
|
18040
|
+
* 该接口用于通过关键字查询公共日历或用户主日历。
|
|
18041
|
+
*/
|
|
18042
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18043
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18044
|
+
return this.httpInstance
|
|
18045
|
+
.request({
|
|
18046
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/search`, path),
|
|
18047
|
+
method: "POST",
|
|
18048
|
+
data,
|
|
18049
|
+
params,
|
|
18050
|
+
headers,
|
|
18051
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18052
|
+
})
|
|
18053
|
+
.catch((e) => {
|
|
18054
|
+
this.logger.error(formatErrors(e));
|
|
18055
|
+
throw e;
|
|
18056
|
+
});
|
|
18057
|
+
}),
|
|
18058
|
+
/**
|
|
18059
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscribe&version=v4 click to debug }
|
|
18060
|
+
*
|
|
18061
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscribe document }
|
|
18062
|
+
*
|
|
18063
|
+
* 订阅日历
|
|
18064
|
+
*
|
|
18065
|
+
* 该接口用于以当前身份(应用 / 用户)订阅某个日历。;;身份由 Header Authorization 的 Token 类型决定。
|
|
18066
|
+
*
|
|
18067
|
+
* - 仅可订阅类型为 primary 或 shared 的公开日历。;- 可订阅日历数量上限为1000。
|
|
18068
|
+
*/
|
|
18069
|
+
subscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18070
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18071
|
+
return this.httpInstance
|
|
18072
|
+
.request({
|
|
18073
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/subscribe`, path),
|
|
18074
|
+
method: "POST",
|
|
18075
|
+
data,
|
|
18076
|
+
params,
|
|
18077
|
+
headers,
|
|
18078
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18079
|
+
})
|
|
18080
|
+
.catch((e) => {
|
|
18081
|
+
this.logger.error(formatErrors(e));
|
|
18082
|
+
throw e;
|
|
18083
|
+
});
|
|
18084
|
+
}),
|
|
18085
|
+
/**
|
|
18086
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=subscription&version=v4 click to debug }
|
|
18087
|
+
*
|
|
18088
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscription document }
|
|
18089
|
+
*
|
|
18090
|
+
* 订阅日历变更事件
|
|
18091
|
+
*
|
|
18092
|
+
* 该接口用于以用户身份订阅当前身份下日历列表中的所有日历变更。
|
|
18093
|
+
*/
|
|
18094
|
+
subscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18095
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18096
|
+
return this.httpInstance
|
|
18097
|
+
.request({
|
|
18098
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/subscription`, path),
|
|
18099
|
+
method: "POST",
|
|
18100
|
+
data,
|
|
18101
|
+
params,
|
|
18102
|
+
headers,
|
|
18103
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18104
|
+
})
|
|
18105
|
+
.catch((e) => {
|
|
18106
|
+
this.logger.error(formatErrors(e));
|
|
18107
|
+
throw e;
|
|
18108
|
+
});
|
|
18109
|
+
}),
|
|
18110
|
+
/**
|
|
18111
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscribe&version=v4 click to debug }
|
|
18112
|
+
*
|
|
18113
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscribe document }
|
|
18114
|
+
*
|
|
18115
|
+
* 取消订阅日历
|
|
18116
|
+
*
|
|
18117
|
+
* 该接口用于以当前身份(应用 / 用户)取消对某日历的订阅状态。;;身份由 Header Authorization 的 Token 类型决定。
|
|
18118
|
+
*
|
|
18119
|
+
* 仅可操作已经被当前身份订阅的日历。
|
|
18120
|
+
*/
|
|
18121
|
+
unsubscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18122
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18123
|
+
return this.httpInstance
|
|
18124
|
+
.request({
|
|
18125
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/unsubscribe`, path),
|
|
18126
|
+
method: "POST",
|
|
18127
|
+
data,
|
|
18128
|
+
params,
|
|
18129
|
+
headers,
|
|
18130
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18131
|
+
})
|
|
18132
|
+
.catch((e) => {
|
|
18133
|
+
this.logger.error(formatErrors(e));
|
|
18134
|
+
throw e;
|
|
18135
|
+
});
|
|
18136
|
+
}),
|
|
18137
|
+
/**
|
|
18138
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar&apiName=unsubscription&version=v4 click to debug }
|
|
18139
|
+
*
|
|
18140
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscription document }
|
|
18141
|
+
*
|
|
18142
|
+
* 取消订阅日历变更事件
|
|
18143
|
+
*
|
|
18144
|
+
* 该接口用于以用户身份取消订阅当前身份下日历列表中的日历变更事件。
|
|
18145
|
+
*/
|
|
18146
|
+
unsubscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18147
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18148
|
+
return this.httpInstance
|
|
18149
|
+
.request({
|
|
18150
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/unsubscription`, path),
|
|
18151
|
+
method: "POST",
|
|
18152
|
+
data,
|
|
18153
|
+
params,
|
|
18154
|
+
headers,
|
|
18155
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18156
|
+
})
|
|
18157
|
+
.catch((e) => {
|
|
18158
|
+
this.logger.error(formatErrors(e));
|
|
18159
|
+
throw e;
|
|
18160
|
+
});
|
|
18161
|
+
}),
|
|
18162
|
+
},
|
|
18163
|
+
/**
|
|
18164
|
+
* 日程参与人
|
|
18165
|
+
*/
|
|
18166
|
+
calendarEventAttendee: {
|
|
18167
|
+
/**
|
|
18168
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=batch_delete&version=v4 click to debug }
|
|
18169
|
+
*
|
|
18170
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/batch_delete document }
|
|
18171
|
+
*
|
|
18172
|
+
* 删除日程参与人
|
|
18173
|
+
*
|
|
18174
|
+
* 批量删除日程的参与人。
|
|
18175
|
+
*
|
|
18176
|
+
* - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者。
|
|
18177
|
+
*/
|
|
18178
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18179
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18180
|
+
return this.httpInstance
|
|
18181
|
+
.request({
|
|
18182
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees/batch_delete`, path),
|
|
18183
|
+
method: "POST",
|
|
18184
|
+
data,
|
|
18185
|
+
params,
|
|
18186
|
+
headers,
|
|
18187
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18188
|
+
})
|
|
18189
|
+
.catch((e) => {
|
|
18190
|
+
this.logger.error(formatErrors(e));
|
|
18191
|
+
throw e;
|
|
18192
|
+
});
|
|
18193
|
+
}),
|
|
18194
|
+
/**
|
|
18195
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.attendee&apiName=create&version=v4 click to debug }
|
|
18196
|
+
*
|
|
18197
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/create document }
|
|
18198
|
+
*
|
|
18199
|
+
* 创建日程参与人;
|
|
18200
|
+
*
|
|
18201
|
+
* 批量给日程添加参与人。
|
|
18202
|
+
*
|
|
18203
|
+
* - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者,或日程设置了「参与人可邀请其它参与人」权限。;;- 新添加的日程参与人必须与日程组织者在同一个企业内。;;- 使用该接口添加会议室后,会议室会进入异步的预约流程,请求结束不代表会议室预约成功,需后续再查询预约状态。;;- 每个日程最多只能有 3000 名参与人。;;- 开启管理员能力后预约会议室可不受会议室预约范围的限制(当前不支持用管理员身份给其他人的日程预约会议室)
|
|
18204
|
+
*/
|
|
18205
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18206
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18207
|
+
return this.httpInstance
|
|
18208
|
+
.request({
|
|
18209
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path),
|
|
18210
|
+
method: "POST",
|
|
18211
|
+
data,
|
|
18212
|
+
params,
|
|
18213
|
+
headers,
|
|
18214
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18215
|
+
})
|
|
18216
|
+
.catch((e) => {
|
|
18217
|
+
this.logger.error(formatErrors(e));
|
|
18218
|
+
throw e;
|
|
18219
|
+
});
|
|
18220
|
+
}),
|
|
18221
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18222
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18223
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
18224
|
+
const res = yield this.httpInstance
|
|
18225
|
+
.request({
|
|
18226
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/attendees`, path),
|
|
18227
|
+
method: "GET",
|
|
18009
18228
|
headers: pickBy(innerPayload.headers, identity),
|
|
18010
18229
|
params: pickBy(innerPayload.params, identity),
|
|
18011
18230
|
data,
|
|
@@ -18662,6 +18881,27 @@ class Client$T extends Client$U {
|
|
|
18662
18881
|
* freebusy
|
|
18663
18882
|
*/
|
|
18664
18883
|
freebusy: {
|
|
18884
|
+
/**
|
|
18885
|
+
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=batch&version=v4 click to debug }
|
|
18886
|
+
*
|
|
18887
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch&project=calendar&resource=freebusy&version=v4 document }
|
|
18888
|
+
*/
|
|
18889
|
+
batch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
18890
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
18891
|
+
return this.httpInstance
|
|
18892
|
+
.request({
|
|
18893
|
+
url: fillApiPath(`${this.domain}/open-apis/calendar/v4/freebusy/batch`, path),
|
|
18894
|
+
method: "POST",
|
|
18895
|
+
data,
|
|
18896
|
+
params,
|
|
18897
|
+
headers,
|
|
18898
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
18899
|
+
})
|
|
18900
|
+
.catch((e) => {
|
|
18901
|
+
this.logger.error(formatErrors(e));
|
|
18902
|
+
throw e;
|
|
18903
|
+
});
|
|
18904
|
+
}),
|
|
18665
18905
|
/**
|
|
18666
18906
|
* {@link https://open.feishu.cn/api-explorer?project=calendar&resource=freebusy&apiName=list&version=v4 click to debug }
|
|
18667
18907
|
*
|
|
@@ -19056,6 +19296,27 @@ class Client$Q extends Client$R {
|
|
|
19056
19296
|
* archive
|
|
19057
19297
|
*/
|
|
19058
19298
|
archive: {
|
|
19299
|
+
/**
|
|
19300
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=archive&apiName=create&version=v1 click to debug }
|
|
19301
|
+
*
|
|
19302
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=compensation&resource=archive&version=v1 document }
|
|
19303
|
+
*/
|
|
19304
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19305
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19306
|
+
return this.httpInstance
|
|
19307
|
+
.request({
|
|
19308
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/archives`, path),
|
|
19309
|
+
method: "POST",
|
|
19310
|
+
data,
|
|
19311
|
+
params,
|
|
19312
|
+
headers,
|
|
19313
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
19314
|
+
})
|
|
19315
|
+
.catch((e) => {
|
|
19316
|
+
this.logger.error(formatErrors(e));
|
|
19317
|
+
throw e;
|
|
19318
|
+
});
|
|
19319
|
+
}),
|
|
19059
19320
|
/**
|
|
19060
19321
|
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=archive&apiName=query&version=v1 click to debug }
|
|
19061
19322
|
*
|
|
@@ -19682,6 +19943,342 @@ class Client$Q extends Client$R {
|
|
|
19682
19943
|
});
|
|
19683
19944
|
}),
|
|
19684
19945
|
},
|
|
19946
|
+
/**
|
|
19947
|
+
* recurring_payment
|
|
19948
|
+
*/
|
|
19949
|
+
recurringPayment: {
|
|
19950
|
+
/**
|
|
19951
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_create&version=v1 click to debug }
|
|
19952
|
+
*
|
|
19953
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=recurring_payment&version=v1 document }
|
|
19954
|
+
*
|
|
19955
|
+
* 创建经常性支付记录
|
|
19956
|
+
*/
|
|
19957
|
+
batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19958
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19959
|
+
return this.httpInstance
|
|
19960
|
+
.request({
|
|
19961
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`, path),
|
|
19962
|
+
method: "POST",
|
|
19963
|
+
data,
|
|
19964
|
+
params,
|
|
19965
|
+
headers,
|
|
19966
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
19967
|
+
})
|
|
19968
|
+
.catch((e) => {
|
|
19969
|
+
this.logger.error(formatErrors(e));
|
|
19970
|
+
throw e;
|
|
19971
|
+
});
|
|
19972
|
+
}),
|
|
19973
|
+
/**
|
|
19974
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_remove&version=v1 click to debug }
|
|
19975
|
+
*
|
|
19976
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=recurring_payment&version=v1 document }
|
|
19977
|
+
*
|
|
19978
|
+
* 删除经常性支付记录
|
|
19979
|
+
*/
|
|
19980
|
+
batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
19981
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
19982
|
+
return this.httpInstance
|
|
19983
|
+
.request({
|
|
19984
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`, path),
|
|
19985
|
+
method: "POST",
|
|
19986
|
+
data,
|
|
19987
|
+
params,
|
|
19988
|
+
headers,
|
|
19989
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
19990
|
+
})
|
|
19991
|
+
.catch((e) => {
|
|
19992
|
+
this.logger.error(formatErrors(e));
|
|
19993
|
+
throw e;
|
|
19994
|
+
});
|
|
19995
|
+
}),
|
|
19996
|
+
/**
|
|
19997
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_update&version=v1 click to debug }
|
|
19998
|
+
*
|
|
19999
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=recurring_payment&version=v1 document }
|
|
20000
|
+
*
|
|
20001
|
+
* 更新经常性支付记录
|
|
20002
|
+
*/
|
|
20003
|
+
batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20004
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20005
|
+
return this.httpInstance
|
|
20006
|
+
.request({
|
|
20007
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`, path),
|
|
20008
|
+
method: "POST",
|
|
20009
|
+
data,
|
|
20010
|
+
params,
|
|
20011
|
+
headers,
|
|
20012
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20013
|
+
})
|
|
20014
|
+
.catch((e) => {
|
|
20015
|
+
this.logger.error(formatErrors(e));
|
|
20016
|
+
throw e;
|
|
20017
|
+
});
|
|
20018
|
+
}),
|
|
20019
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20020
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20021
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
20022
|
+
const res = yield this.httpInstance
|
|
20023
|
+
.request({
|
|
20024
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path),
|
|
20025
|
+
method: "POST",
|
|
20026
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
20027
|
+
params: pickBy(innerPayload.params, identity),
|
|
20028
|
+
data,
|
|
20029
|
+
paramsSerializer: (params) => stringify(params, {
|
|
20030
|
+
arrayFormat: "repeat",
|
|
20031
|
+
}),
|
|
20032
|
+
})
|
|
20033
|
+
.catch((e) => {
|
|
20034
|
+
this.logger.error(formatErrors(e));
|
|
20035
|
+
});
|
|
20036
|
+
return res;
|
|
20037
|
+
});
|
|
20038
|
+
const Iterable = {
|
|
20039
|
+
[Symbol.asyncIterator]() {
|
|
20040
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
20041
|
+
let hasMore = true;
|
|
20042
|
+
let pageToken;
|
|
20043
|
+
while (hasMore) {
|
|
20044
|
+
try {
|
|
20045
|
+
const res = yield __await(sendRequest({
|
|
20046
|
+
headers,
|
|
20047
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
20048
|
+
data,
|
|
20049
|
+
}));
|
|
20050
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
20051
|
+
// @ts-ignore
|
|
20052
|
+
has_more,
|
|
20053
|
+
// @ts-ignore
|
|
20054
|
+
page_token,
|
|
20055
|
+
// @ts-ignore
|
|
20056
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
20057
|
+
yield yield __await(rest);
|
|
20058
|
+
hasMore = Boolean(has_more);
|
|
20059
|
+
pageToken = page_token || next_page_token;
|
|
20060
|
+
}
|
|
20061
|
+
catch (e) {
|
|
20062
|
+
yield yield __await(null);
|
|
20063
|
+
break;
|
|
20064
|
+
}
|
|
20065
|
+
}
|
|
20066
|
+
});
|
|
20067
|
+
},
|
|
20068
|
+
};
|
|
20069
|
+
return Iterable;
|
|
20070
|
+
}),
|
|
20071
|
+
/**
|
|
20072
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=query&version=v1 click to debug }
|
|
20073
|
+
*
|
|
20074
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=recurring_payment&version=v1 document }
|
|
20075
|
+
*
|
|
20076
|
+
* 查询经常性支付记录
|
|
20077
|
+
*/
|
|
20078
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20079
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20080
|
+
return this.httpInstance
|
|
20081
|
+
.request({
|
|
20082
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path),
|
|
20083
|
+
method: "POST",
|
|
20084
|
+
data,
|
|
20085
|
+
params,
|
|
20086
|
+
headers,
|
|
20087
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20088
|
+
})
|
|
20089
|
+
.catch((e) => {
|
|
20090
|
+
this.logger.error(formatErrors(e));
|
|
20091
|
+
throw e;
|
|
20092
|
+
});
|
|
20093
|
+
}),
|
|
20094
|
+
},
|
|
20095
|
+
/**
|
|
20096
|
+
* social_archive
|
|
20097
|
+
*/
|
|
20098
|
+
socialArchive: {
|
|
20099
|
+
/**
|
|
20100
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive&apiName=query&version=v1 click to debug }
|
|
20101
|
+
*
|
|
20102
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive&version=v1 document }
|
|
20103
|
+
*
|
|
20104
|
+
* 通过员工ID和生效时间查询参保档案
|
|
20105
|
+
*/
|
|
20106
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20107
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20108
|
+
return this.httpInstance
|
|
20109
|
+
.request({
|
|
20110
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive/query`, path),
|
|
20111
|
+
method: "POST",
|
|
20112
|
+
data,
|
|
20113
|
+
params,
|
|
20114
|
+
headers,
|
|
20115
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20116
|
+
})
|
|
20117
|
+
.catch((e) => {
|
|
20118
|
+
this.logger.error(formatErrors(e));
|
|
20119
|
+
throw e;
|
|
20120
|
+
});
|
|
20121
|
+
}),
|
|
20122
|
+
},
|
|
20123
|
+
/**
|
|
20124
|
+
* social_archive_adjust_record
|
|
20125
|
+
*/
|
|
20126
|
+
socialArchiveAdjustRecord: {
|
|
20127
|
+
/**
|
|
20128
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive_adjust_record&apiName=query&version=v1 click to debug }
|
|
20129
|
+
*
|
|
20130
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive_adjust_record&version=v1 document }
|
|
20131
|
+
*
|
|
20132
|
+
* 根据员工ID查询待增员、待减员记录
|
|
20133
|
+
*/
|
|
20134
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20135
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20136
|
+
return this.httpInstance
|
|
20137
|
+
.request({
|
|
20138
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`, path),
|
|
20139
|
+
method: "POST",
|
|
20140
|
+
data,
|
|
20141
|
+
params,
|
|
20142
|
+
headers,
|
|
20143
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20144
|
+
})
|
|
20145
|
+
.catch((e) => {
|
|
20146
|
+
this.logger.error(formatErrors(e));
|
|
20147
|
+
throw e;
|
|
20148
|
+
});
|
|
20149
|
+
}),
|
|
20150
|
+
},
|
|
20151
|
+
/**
|
|
20152
|
+
* social_insurance
|
|
20153
|
+
*/
|
|
20154
|
+
socialInsurance: {
|
|
20155
|
+
/**
|
|
20156
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_insurance&apiName=list&version=v1 click to debug }
|
|
20157
|
+
*
|
|
20158
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_insurance&version=v1 document }
|
|
20159
|
+
*
|
|
20160
|
+
* 获取险种列表
|
|
20161
|
+
*/
|
|
20162
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20163
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20164
|
+
return this.httpInstance
|
|
20165
|
+
.request({
|
|
20166
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_insurances`, path),
|
|
20167
|
+
method: "GET",
|
|
20168
|
+
data,
|
|
20169
|
+
params,
|
|
20170
|
+
headers,
|
|
20171
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20172
|
+
})
|
|
20173
|
+
.catch((e) => {
|
|
20174
|
+
this.logger.error(formatErrors(e));
|
|
20175
|
+
throw e;
|
|
20176
|
+
});
|
|
20177
|
+
}),
|
|
20178
|
+
},
|
|
20179
|
+
/**
|
|
20180
|
+
* social_plan
|
|
20181
|
+
*/
|
|
20182
|
+
socialPlan: {
|
|
20183
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20184
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20185
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
20186
|
+
const res = yield this.httpInstance
|
|
20187
|
+
.request({
|
|
20188
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path),
|
|
20189
|
+
method: "GET",
|
|
20190
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
20191
|
+
params: pickBy(innerPayload.params, identity),
|
|
20192
|
+
data,
|
|
20193
|
+
paramsSerializer: (params) => stringify(params, {
|
|
20194
|
+
arrayFormat: "repeat",
|
|
20195
|
+
}),
|
|
20196
|
+
})
|
|
20197
|
+
.catch((e) => {
|
|
20198
|
+
this.logger.error(formatErrors(e));
|
|
20199
|
+
});
|
|
20200
|
+
return res;
|
|
20201
|
+
});
|
|
20202
|
+
const Iterable = {
|
|
20203
|
+
[Symbol.asyncIterator]() {
|
|
20204
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
20205
|
+
let hasMore = true;
|
|
20206
|
+
let pageToken;
|
|
20207
|
+
while (hasMore) {
|
|
20208
|
+
try {
|
|
20209
|
+
const res = yield __await(sendRequest({
|
|
20210
|
+
headers,
|
|
20211
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
20212
|
+
data,
|
|
20213
|
+
}));
|
|
20214
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
20215
|
+
// @ts-ignore
|
|
20216
|
+
has_more,
|
|
20217
|
+
// @ts-ignore
|
|
20218
|
+
page_token,
|
|
20219
|
+
// @ts-ignore
|
|
20220
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
20221
|
+
yield yield __await(rest);
|
|
20222
|
+
hasMore = Boolean(has_more);
|
|
20223
|
+
pageToken = page_token || next_page_token;
|
|
20224
|
+
}
|
|
20225
|
+
catch (e) {
|
|
20226
|
+
yield yield __await(null);
|
|
20227
|
+
break;
|
|
20228
|
+
}
|
|
20229
|
+
}
|
|
20230
|
+
});
|
|
20231
|
+
},
|
|
20232
|
+
};
|
|
20233
|
+
return Iterable;
|
|
20234
|
+
}),
|
|
20235
|
+
/**
|
|
20236
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=list&version=v1 click to debug }
|
|
20237
|
+
*
|
|
20238
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_plan&version=v1 document }
|
|
20239
|
+
*
|
|
20240
|
+
* 分页获取参保方案列表
|
|
20241
|
+
*/
|
|
20242
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20243
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20244
|
+
return this.httpInstance
|
|
20245
|
+
.request({
|
|
20246
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path),
|
|
20247
|
+
method: "GET",
|
|
20248
|
+
data,
|
|
20249
|
+
params,
|
|
20250
|
+
headers,
|
|
20251
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20252
|
+
})
|
|
20253
|
+
.catch((e) => {
|
|
20254
|
+
this.logger.error(formatErrors(e));
|
|
20255
|
+
throw e;
|
|
20256
|
+
});
|
|
20257
|
+
}),
|
|
20258
|
+
/**
|
|
20259
|
+
* {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=query&version=v1 click to debug }
|
|
20260
|
+
*
|
|
20261
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_plan&version=v1 document }
|
|
20262
|
+
*
|
|
20263
|
+
* 批量查询参保方案
|
|
20264
|
+
*/
|
|
20265
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
20266
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
20267
|
+
return this.httpInstance
|
|
20268
|
+
.request({
|
|
20269
|
+
url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans/query`, path),
|
|
20270
|
+
method: "POST",
|
|
20271
|
+
data,
|
|
20272
|
+
params,
|
|
20273
|
+
headers,
|
|
20274
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
20275
|
+
})
|
|
20276
|
+
.catch((e) => {
|
|
20277
|
+
this.logger.error(formatErrors(e));
|
|
20278
|
+
throw e;
|
|
20279
|
+
});
|
|
20280
|
+
}),
|
|
20281
|
+
},
|
|
19685
20282
|
},
|
|
19686
20283
|
};
|
|
19687
20284
|
}
|
|
@@ -30473,6 +31070,29 @@ class Client$M extends Client$N {
|
|
|
30473
31070
|
throw e;
|
|
30474
31071
|
});
|
|
30475
31072
|
}),
|
|
31073
|
+
/**
|
|
31074
|
+
* {@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 }
|
|
31075
|
+
*
|
|
31076
|
+
* {@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 }
|
|
31077
|
+
*
|
|
31078
|
+
* 获取岗位调整信息详情
|
|
31079
|
+
*/
|
|
31080
|
+
openQueryPositionChangeListByIds: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
31081
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
31082
|
+
return this.httpInstance
|
|
31083
|
+
.request({
|
|
31084
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`, path),
|
|
31085
|
+
method: "POST",
|
|
31086
|
+
data,
|
|
31087
|
+
params,
|
|
31088
|
+
headers,
|
|
31089
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
31090
|
+
})
|
|
31091
|
+
.catch((e) => {
|
|
31092
|
+
this.logger.error(formatErrors(e));
|
|
31093
|
+
throw e;
|
|
31094
|
+
});
|
|
31095
|
+
}),
|
|
30476
31096
|
},
|
|
30477
31097
|
/**
|
|
30478
31098
|
* approver
|
|
@@ -32660,6 +33280,34 @@ class Client$M extends Client$N {
|
|
|
32660
33280
|
});
|
|
32661
33281
|
}),
|
|
32662
33282
|
},
|
|
33283
|
+
/**
|
|
33284
|
+
* draft
|
|
33285
|
+
*/
|
|
33286
|
+
draft: {
|
|
33287
|
+
/**
|
|
33288
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=draft&apiName=get&version=v2 click to debug }
|
|
33289
|
+
*
|
|
33290
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=draft&version=v2 document }
|
|
33291
|
+
*
|
|
33292
|
+
* 根据组织架构调整 ID 查询调整流程信息
|
|
33293
|
+
*/
|
|
33294
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
33295
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
33296
|
+
return this.httpInstance
|
|
33297
|
+
.request({
|
|
33298
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`, path),
|
|
33299
|
+
method: "GET",
|
|
33300
|
+
data,
|
|
33301
|
+
params,
|
|
33302
|
+
headers,
|
|
33303
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
33304
|
+
})
|
|
33305
|
+
.catch((e) => {
|
|
33306
|
+
this.logger.error(formatErrors(e));
|
|
33307
|
+
throw e;
|
|
33308
|
+
});
|
|
33309
|
+
}),
|
|
33310
|
+
},
|
|
32663
33311
|
/**
|
|
32664
33312
|
* employee
|
|
32665
33313
|
*/
|
|
@@ -34329,45 +34977,17 @@ class Client$M extends Client$N {
|
|
|
34329
34977
|
*/
|
|
34330
34978
|
position: {
|
|
34331
34979
|
/**
|
|
34332
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=
|
|
34333
|
-
*
|
|
34334
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
|
|
34335
|
-
*
|
|
34336
|
-
* 查询岗位信息
|
|
34337
|
-
*/
|
|
34338
|
-
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34339
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34340
|
-
return this.httpInstance
|
|
34341
|
-
.request({
|
|
34342
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
|
|
34343
|
-
method: "POST",
|
|
34344
|
-
data,
|
|
34345
|
-
params,
|
|
34346
|
-
headers,
|
|
34347
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
34348
|
-
})
|
|
34349
|
-
.catch((e) => {
|
|
34350
|
-
this.logger.error(formatErrors(e));
|
|
34351
|
-
throw e;
|
|
34352
|
-
});
|
|
34353
|
-
}),
|
|
34354
|
-
},
|
|
34355
|
-
/**
|
|
34356
|
-
* 待入职
|
|
34357
|
-
*/
|
|
34358
|
-
preHire: {
|
|
34359
|
-
/**
|
|
34360
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
|
|
34980
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=active&version=v2 click to debug }
|
|
34361
34981
|
*
|
|
34362
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
34982
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=position&version=v2 document }
|
|
34363
34983
|
*
|
|
34364
|
-
*
|
|
34984
|
+
* 启/停用岗位
|
|
34365
34985
|
*/
|
|
34366
|
-
|
|
34986
|
+
active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34367
34987
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34368
34988
|
return this.httpInstance
|
|
34369
34989
|
.request({
|
|
34370
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34990
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/active`, path),
|
|
34371
34991
|
method: "POST",
|
|
34372
34992
|
data,
|
|
34373
34993
|
params,
|
|
@@ -34380,19 +35000,15 @@ class Client$M extends Client$N {
|
|
|
34380
35000
|
});
|
|
34381
35001
|
}),
|
|
34382
35002
|
/**
|
|
34383
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
34384
|
-
*
|
|
34385
|
-
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
|
|
34386
|
-
*
|
|
34387
|
-
* 创建待入职人员
|
|
35003
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=create&version=v2 click to debug }
|
|
34388
35004
|
*
|
|
34389
|
-
*
|
|
35005
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=position&version=v2 document }
|
|
34390
35006
|
*/
|
|
34391
35007
|
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34392
35008
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34393
35009
|
return this.httpInstance
|
|
34394
35010
|
.request({
|
|
34395
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35011
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions`, path),
|
|
34396
35012
|
method: "POST",
|
|
34397
35013
|
data,
|
|
34398
35014
|
params,
|
|
@@ -34405,18 +35021,18 @@ class Client$M extends Client$N {
|
|
|
34405
35021
|
});
|
|
34406
35022
|
}),
|
|
34407
35023
|
/**
|
|
34408
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35024
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=del_position&version=v2 click to debug }
|
|
34409
35025
|
*
|
|
34410
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35026
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del_position&project=corehr&resource=position&version=v2 document }
|
|
34411
35027
|
*
|
|
34412
|
-
*
|
|
35028
|
+
* 删除岗位
|
|
34413
35029
|
*/
|
|
34414
|
-
|
|
35030
|
+
delPosition: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34415
35031
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34416
35032
|
return this.httpInstance
|
|
34417
35033
|
.request({
|
|
34418
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34419
|
-
method: "
|
|
35034
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/del_position`, path),
|
|
35035
|
+
method: "POST",
|
|
34420
35036
|
data,
|
|
34421
35037
|
params,
|
|
34422
35038
|
headers,
|
|
@@ -34428,17 +35044,17 @@ class Client$M extends Client$N {
|
|
|
34428
35044
|
});
|
|
34429
35045
|
}),
|
|
34430
35046
|
/**
|
|
34431
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35047
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=patch&version=v2 click to debug }
|
|
34432
35048
|
*
|
|
34433
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=
|
|
35049
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=position&version=v2 document }
|
|
34434
35050
|
*
|
|
34435
|
-
*
|
|
35051
|
+
* 更新岗位
|
|
34436
35052
|
*/
|
|
34437
35053
|
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34438
35054
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34439
35055
|
return this.httpInstance
|
|
34440
35056
|
.request({
|
|
34441
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35057
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/:position_id`, path),
|
|
34442
35058
|
method: "PATCH",
|
|
34443
35059
|
data,
|
|
34444
35060
|
params,
|
|
@@ -34450,91 +35066,18 @@ class Client$M extends Client$N {
|
|
|
34450
35066
|
throw e;
|
|
34451
35067
|
});
|
|
34452
35068
|
}),
|
|
34453
|
-
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34454
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34455
|
-
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34456
|
-
const res = yield this.httpInstance
|
|
34457
|
-
.request({
|
|
34458
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
34459
|
-
method: "POST",
|
|
34460
|
-
headers: pickBy(innerPayload.headers, identity),
|
|
34461
|
-
params: pickBy(innerPayload.params, identity),
|
|
34462
|
-
data,
|
|
34463
|
-
paramsSerializer: (params) => stringify(params, {
|
|
34464
|
-
arrayFormat: "repeat",
|
|
34465
|
-
}),
|
|
34466
|
-
})
|
|
34467
|
-
.catch((e) => {
|
|
34468
|
-
this.logger.error(formatErrors(e));
|
|
34469
|
-
});
|
|
34470
|
-
return res;
|
|
34471
|
-
});
|
|
34472
|
-
const Iterable = {
|
|
34473
|
-
[Symbol.asyncIterator]() {
|
|
34474
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
34475
|
-
let hasMore = true;
|
|
34476
|
-
let pageToken;
|
|
34477
|
-
while (hasMore) {
|
|
34478
|
-
try {
|
|
34479
|
-
const res = yield __await(sendRequest({
|
|
34480
|
-
headers,
|
|
34481
|
-
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
34482
|
-
data,
|
|
34483
|
-
}));
|
|
34484
|
-
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
34485
|
-
// @ts-ignore
|
|
34486
|
-
has_more,
|
|
34487
|
-
// @ts-ignore
|
|
34488
|
-
page_token,
|
|
34489
|
-
// @ts-ignore
|
|
34490
|
-
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
34491
|
-
yield yield __await(rest);
|
|
34492
|
-
hasMore = Boolean(has_more);
|
|
34493
|
-
pageToken = page_token || next_page_token;
|
|
34494
|
-
}
|
|
34495
|
-
catch (e) {
|
|
34496
|
-
yield yield __await(null);
|
|
34497
|
-
break;
|
|
34498
|
-
}
|
|
34499
|
-
}
|
|
34500
|
-
});
|
|
34501
|
-
},
|
|
34502
|
-
};
|
|
34503
|
-
return Iterable;
|
|
34504
|
-
}),
|
|
34505
35069
|
/**
|
|
34506
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35070
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
|
|
34507
35071
|
*
|
|
34508
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=
|
|
35072
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
|
|
34509
35073
|
*
|
|
34510
|
-
*
|
|
35074
|
+
* 查询岗位信息
|
|
34511
35075
|
*/
|
|
34512
35076
|
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34513
35077
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34514
35078
|
return this.httpInstance
|
|
34515
35079
|
.request({
|
|
34516
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34517
|
-
method: "POST",
|
|
34518
|
-
data,
|
|
34519
|
-
params,
|
|
34520
|
-
headers,
|
|
34521
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
34522
|
-
})
|
|
34523
|
-
.catch((e) => {
|
|
34524
|
-
this.logger.error(formatErrors(e));
|
|
34525
|
-
throw e;
|
|
34526
|
-
});
|
|
34527
|
-
}),
|
|
34528
|
-
/**
|
|
34529
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
|
|
34530
|
-
*
|
|
34531
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
|
|
34532
|
-
*/
|
|
34533
|
-
restoreFlowInstance: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34534
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34535
|
-
return this.httpInstance
|
|
34536
|
-
.request({
|
|
34537
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path),
|
|
35080
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
|
|
34538
35081
|
method: "POST",
|
|
34539
35082
|
data,
|
|
34540
35083
|
params,
|
|
@@ -34546,13 +35089,13 @@ class Client$M extends Client$N {
|
|
|
34546
35089
|
throw e;
|
|
34547
35090
|
});
|
|
34548
35091
|
}),
|
|
34549
|
-
|
|
35092
|
+
queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34550
35093
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34551
35094
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34552
35095
|
const res = yield this.httpInstance
|
|
34553
35096
|
.request({
|
|
34554
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34555
|
-
method: "
|
|
35097
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
|
|
35098
|
+
method: "GET",
|
|
34556
35099
|
headers: pickBy(innerPayload.headers, identity),
|
|
34557
35100
|
params: pickBy(innerPayload.params, identity),
|
|
34558
35101
|
data,
|
|
@@ -34599,18 +35142,16 @@ class Client$M extends Client$N {
|
|
|
34599
35142
|
return Iterable;
|
|
34600
35143
|
}),
|
|
34601
35144
|
/**
|
|
34602
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
34603
|
-
*
|
|
34604
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
|
|
35145
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query_recent_change&version=v2 click to debug }
|
|
34605
35146
|
*
|
|
34606
|
-
*
|
|
35147
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=position&version=v2 document }
|
|
34607
35148
|
*/
|
|
34608
|
-
|
|
35149
|
+
queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34609
35150
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34610
35151
|
return this.httpInstance
|
|
34611
35152
|
.request({
|
|
34612
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
34613
|
-
method: "
|
|
35153
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
|
|
35154
|
+
method: "GET",
|
|
34614
35155
|
data,
|
|
34615
35156
|
params,
|
|
34616
35157
|
headers,
|
|
@@ -34621,18 +35162,23 @@ class Client$M extends Client$N {
|
|
|
34621
35162
|
throw e;
|
|
34622
35163
|
});
|
|
34623
35164
|
}),
|
|
35165
|
+
},
|
|
35166
|
+
/**
|
|
35167
|
+
* 待入职
|
|
35168
|
+
*/
|
|
35169
|
+
preHire: {
|
|
34624
35170
|
/**
|
|
34625
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=
|
|
35171
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
|
|
34626
35172
|
*
|
|
34627
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35173
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
|
|
34628
35174
|
*
|
|
34629
|
-
*
|
|
35175
|
+
* 完成入职
|
|
34630
35176
|
*/
|
|
34631
|
-
|
|
35177
|
+
complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34632
35178
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34633
35179
|
return this.httpInstance
|
|
34634
35180
|
.request({
|
|
34635
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/
|
|
35181
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
|
|
34636
35182
|
method: "POST",
|
|
34637
35183
|
data,
|
|
34638
35184
|
params,
|
|
@@ -34645,41 +35191,19 @@ class Client$M extends Client$N {
|
|
|
34645
35191
|
});
|
|
34646
35192
|
}),
|
|
34647
35193
|
/**
|
|
34648
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=
|
|
35194
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
|
|
34649
35195
|
*
|
|
34650
|
-
* {@link https://open.feishu.cn/
|
|
34651
|
-
*/
|
|
34652
|
-
withdrawOnboarding: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34653
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34654
|
-
return this.httpInstance
|
|
34655
|
-
.request({
|
|
34656
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path),
|
|
34657
|
-
method: "POST",
|
|
34658
|
-
data,
|
|
34659
|
-
params,
|
|
34660
|
-
headers,
|
|
34661
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
34662
|
-
})
|
|
34663
|
-
.catch((e) => {
|
|
34664
|
-
this.logger.error(formatErrors(e));
|
|
34665
|
-
throw e;
|
|
34666
|
-
});
|
|
34667
|
-
}),
|
|
34668
|
-
},
|
|
34669
|
-
/**
|
|
34670
|
-
* probation.assessment
|
|
34671
|
-
*/
|
|
34672
|
-
probationAssessment: {
|
|
34673
|
-
/**
|
|
34674
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
|
|
35196
|
+
* {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
|
|
34675
35197
|
*
|
|
34676
|
-
*
|
|
35198
|
+
* 创建待入职人员
|
|
35199
|
+
*
|
|
35200
|
+
* 创建待入职人员
|
|
34677
35201
|
*/
|
|
34678
35202
|
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34679
35203
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34680
35204
|
return this.httpInstance
|
|
34681
35205
|
.request({
|
|
34682
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35206
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
|
|
34683
35207
|
method: "POST",
|
|
34684
35208
|
data,
|
|
34685
35209
|
params,
|
|
@@ -34692,15 +35216,17 @@ class Client$M extends Client$N {
|
|
|
34692
35216
|
});
|
|
34693
35217
|
}),
|
|
34694
35218
|
/**
|
|
34695
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35219
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
|
|
34696
35220
|
*
|
|
34697
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=
|
|
35221
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
|
|
35222
|
+
*
|
|
35223
|
+
* 删除待入职
|
|
34698
35224
|
*/
|
|
34699
35225
|
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34700
35226
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34701
35227
|
return this.httpInstance
|
|
34702
35228
|
.request({
|
|
34703
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35229
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
|
|
34704
35230
|
method: "DELETE",
|
|
34705
35231
|
data,
|
|
34706
35232
|
params,
|
|
@@ -34713,15 +35239,17 @@ class Client$M extends Client$N {
|
|
|
34713
35239
|
});
|
|
34714
35240
|
}),
|
|
34715
35241
|
/**
|
|
34716
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
35242
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
|
|
34717
35243
|
*
|
|
34718
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=
|
|
35244
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
|
|
35245
|
+
*
|
|
35246
|
+
* 更新待入职
|
|
34719
35247
|
*/
|
|
34720
35248
|
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34721
35249
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34722
35250
|
return this.httpInstance
|
|
34723
35251
|
.request({
|
|
34724
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35252
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
|
|
34725
35253
|
method: "PATCH",
|
|
34726
35254
|
data,
|
|
34727
35255
|
params,
|
|
@@ -34733,38 +35261,344 @@ class Client$M extends Client$N {
|
|
|
34733
35261
|
throw e;
|
|
34734
35262
|
});
|
|
34735
35263
|
}),
|
|
34736
|
-
|
|
34737
|
-
/**
|
|
34738
|
-
* probation
|
|
34739
|
-
*/
|
|
34740
|
-
probation: {
|
|
34741
|
-
/**
|
|
34742
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
|
|
34743
|
-
*
|
|
34744
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
|
|
34745
|
-
*/
|
|
34746
|
-
enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34747
|
-
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34748
|
-
return this.httpInstance
|
|
34749
|
-
.request({
|
|
34750
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
|
|
34751
|
-
method: "POST",
|
|
34752
|
-
data,
|
|
34753
|
-
params,
|
|
34754
|
-
headers,
|
|
34755
|
-
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
34756
|
-
})
|
|
34757
|
-
.catch((e) => {
|
|
34758
|
-
this.logger.error(formatErrors(e));
|
|
34759
|
-
throw e;
|
|
34760
|
-
});
|
|
34761
|
-
}),
|
|
34762
|
-
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35264
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34763
35265
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34764
35266
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34765
35267
|
const res = yield this.httpInstance
|
|
34766
35268
|
.request({
|
|
34767
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35269
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
35270
|
+
method: "POST",
|
|
35271
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
35272
|
+
params: pickBy(innerPayload.params, identity),
|
|
35273
|
+
data,
|
|
35274
|
+
paramsSerializer: (params) => stringify(params, {
|
|
35275
|
+
arrayFormat: "repeat",
|
|
35276
|
+
}),
|
|
35277
|
+
})
|
|
35278
|
+
.catch((e) => {
|
|
35279
|
+
this.logger.error(formatErrors(e));
|
|
35280
|
+
});
|
|
35281
|
+
return res;
|
|
35282
|
+
});
|
|
35283
|
+
const Iterable = {
|
|
35284
|
+
[Symbol.asyncIterator]() {
|
|
35285
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35286
|
+
let hasMore = true;
|
|
35287
|
+
let pageToken;
|
|
35288
|
+
while (hasMore) {
|
|
35289
|
+
try {
|
|
35290
|
+
const res = yield __await(sendRequest({
|
|
35291
|
+
headers,
|
|
35292
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35293
|
+
data,
|
|
35294
|
+
}));
|
|
35295
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35296
|
+
// @ts-ignore
|
|
35297
|
+
has_more,
|
|
35298
|
+
// @ts-ignore
|
|
35299
|
+
page_token,
|
|
35300
|
+
// @ts-ignore
|
|
35301
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35302
|
+
yield yield __await(rest);
|
|
35303
|
+
hasMore = Boolean(has_more);
|
|
35304
|
+
pageToken = page_token || next_page_token;
|
|
35305
|
+
}
|
|
35306
|
+
catch (e) {
|
|
35307
|
+
yield yield __await(null);
|
|
35308
|
+
break;
|
|
35309
|
+
}
|
|
35310
|
+
}
|
|
35311
|
+
});
|
|
35312
|
+
},
|
|
35313
|
+
};
|
|
35314
|
+
return Iterable;
|
|
35315
|
+
}),
|
|
35316
|
+
/**
|
|
35317
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=query&version=v2 click to debug }
|
|
35318
|
+
*
|
|
35319
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=pre_hire&version=v2 document }
|
|
35320
|
+
*
|
|
35321
|
+
* 批量查询待入职数据
|
|
35322
|
+
*/
|
|
35323
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35324
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35325
|
+
return this.httpInstance
|
|
35326
|
+
.request({
|
|
35327
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
|
|
35328
|
+
method: "POST",
|
|
35329
|
+
data,
|
|
35330
|
+
params,
|
|
35331
|
+
headers,
|
|
35332
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35333
|
+
})
|
|
35334
|
+
.catch((e) => {
|
|
35335
|
+
this.logger.error(formatErrors(e));
|
|
35336
|
+
throw e;
|
|
35337
|
+
});
|
|
35338
|
+
}),
|
|
35339
|
+
/**
|
|
35340
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
|
|
35341
|
+
*
|
|
35342
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
|
|
35343
|
+
*/
|
|
35344
|
+
restoreFlowInstance: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35345
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35346
|
+
return this.httpInstance
|
|
35347
|
+
.request({
|
|
35348
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path),
|
|
35349
|
+
method: "POST",
|
|
35350
|
+
data,
|
|
35351
|
+
params,
|
|
35352
|
+
headers,
|
|
35353
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35354
|
+
})
|
|
35355
|
+
.catch((e) => {
|
|
35356
|
+
this.logger.error(formatErrors(e));
|
|
35357
|
+
throw e;
|
|
35358
|
+
});
|
|
35359
|
+
}),
|
|
35360
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35361
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35362
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35363
|
+
const res = yield this.httpInstance
|
|
35364
|
+
.request({
|
|
35365
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
|
|
35366
|
+
method: "POST",
|
|
35367
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
35368
|
+
params: pickBy(innerPayload.params, identity),
|
|
35369
|
+
data,
|
|
35370
|
+
paramsSerializer: (params) => stringify(params, {
|
|
35371
|
+
arrayFormat: "repeat",
|
|
35372
|
+
}),
|
|
35373
|
+
})
|
|
35374
|
+
.catch((e) => {
|
|
35375
|
+
this.logger.error(formatErrors(e));
|
|
35376
|
+
});
|
|
35377
|
+
return res;
|
|
35378
|
+
});
|
|
35379
|
+
const Iterable = {
|
|
35380
|
+
[Symbol.asyncIterator]() {
|
|
35381
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35382
|
+
let hasMore = true;
|
|
35383
|
+
let pageToken;
|
|
35384
|
+
while (hasMore) {
|
|
35385
|
+
try {
|
|
35386
|
+
const res = yield __await(sendRequest({
|
|
35387
|
+
headers,
|
|
35388
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35389
|
+
data,
|
|
35390
|
+
}));
|
|
35391
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35392
|
+
// @ts-ignore
|
|
35393
|
+
has_more,
|
|
35394
|
+
// @ts-ignore
|
|
35395
|
+
page_token,
|
|
35396
|
+
// @ts-ignore
|
|
35397
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35398
|
+
yield yield __await(rest);
|
|
35399
|
+
hasMore = Boolean(has_more);
|
|
35400
|
+
pageToken = page_token || next_page_token;
|
|
35401
|
+
}
|
|
35402
|
+
catch (e) {
|
|
35403
|
+
yield yield __await(null);
|
|
35404
|
+
break;
|
|
35405
|
+
}
|
|
35406
|
+
}
|
|
35407
|
+
});
|
|
35408
|
+
},
|
|
35409
|
+
};
|
|
35410
|
+
return Iterable;
|
|
35411
|
+
}),
|
|
35412
|
+
/**
|
|
35413
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=search&version=v2 click to debug }
|
|
35414
|
+
*
|
|
35415
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
|
|
35416
|
+
*
|
|
35417
|
+
* 根据部门 ID,上级部门查询部门列表
|
|
35418
|
+
*/
|
|
35419
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35420
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35421
|
+
return this.httpInstance
|
|
35422
|
+
.request({
|
|
35423
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
|
|
35424
|
+
method: "POST",
|
|
35425
|
+
data,
|
|
35426
|
+
params,
|
|
35427
|
+
headers,
|
|
35428
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35429
|
+
})
|
|
35430
|
+
.catch((e) => {
|
|
35431
|
+
this.logger.error(formatErrors(e));
|
|
35432
|
+
throw e;
|
|
35433
|
+
});
|
|
35434
|
+
}),
|
|
35435
|
+
/**
|
|
35436
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transform_onboarding_task&version=v2 click to debug }
|
|
35437
|
+
*
|
|
35438
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transform_onboarding_task&project=corehr&resource=pre_hire&version=v2 document }
|
|
35439
|
+
*
|
|
35440
|
+
* 入职常规任务的流转,支持手动开启任务,提交任务以及审批任务
|
|
35441
|
+
*/
|
|
35442
|
+
transformOnboardingTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35443
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35444
|
+
return this.httpInstance
|
|
35445
|
+
.request({
|
|
35446
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`, path),
|
|
35447
|
+
method: "POST",
|
|
35448
|
+
data,
|
|
35449
|
+
params,
|
|
35450
|
+
headers,
|
|
35451
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35452
|
+
})
|
|
35453
|
+
.catch((e) => {
|
|
35454
|
+
this.logger.error(formatErrors(e));
|
|
35455
|
+
throw e;
|
|
35456
|
+
});
|
|
35457
|
+
}),
|
|
35458
|
+
/**
|
|
35459
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
|
|
35460
|
+
*
|
|
35461
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transit_task&project=corehr&resource=pre_hire&version=v2 document }
|
|
35462
|
+
*
|
|
35463
|
+
* 任务流转
|
|
35464
|
+
*/
|
|
35465
|
+
transitTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35466
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35467
|
+
return this.httpInstance
|
|
35468
|
+
.request({
|
|
35469
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`, path),
|
|
35470
|
+
method: "POST",
|
|
35471
|
+
data,
|
|
35472
|
+
params,
|
|
35473
|
+
headers,
|
|
35474
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35475
|
+
})
|
|
35476
|
+
.catch((e) => {
|
|
35477
|
+
this.logger.error(formatErrors(e));
|
|
35478
|
+
throw e;
|
|
35479
|
+
});
|
|
35480
|
+
}),
|
|
35481
|
+
/**
|
|
35482
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=withdraw_onboarding&version=v2 click to debug }
|
|
35483
|
+
*
|
|
35484
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw_onboarding&project=corehr&resource=pre_hire&version=v2 document }
|
|
35485
|
+
*/
|
|
35486
|
+
withdrawOnboarding: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35487
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35488
|
+
return this.httpInstance
|
|
35489
|
+
.request({
|
|
35490
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path),
|
|
35491
|
+
method: "POST",
|
|
35492
|
+
data,
|
|
35493
|
+
params,
|
|
35494
|
+
headers,
|
|
35495
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35496
|
+
})
|
|
35497
|
+
.catch((e) => {
|
|
35498
|
+
this.logger.error(formatErrors(e));
|
|
35499
|
+
throw e;
|
|
35500
|
+
});
|
|
35501
|
+
}),
|
|
35502
|
+
},
|
|
35503
|
+
/**
|
|
35504
|
+
* probation.assessment
|
|
35505
|
+
*/
|
|
35506
|
+
probationAssessment: {
|
|
35507
|
+
/**
|
|
35508
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
|
|
35509
|
+
*
|
|
35510
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
|
|
35511
|
+
*/
|
|
35512
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35513
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35514
|
+
return this.httpInstance
|
|
35515
|
+
.request({
|
|
35516
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path),
|
|
35517
|
+
method: "POST",
|
|
35518
|
+
data,
|
|
35519
|
+
params,
|
|
35520
|
+
headers,
|
|
35521
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35522
|
+
})
|
|
35523
|
+
.catch((e) => {
|
|
35524
|
+
this.logger.error(formatErrors(e));
|
|
35525
|
+
throw e;
|
|
35526
|
+
});
|
|
35527
|
+
}),
|
|
35528
|
+
/**
|
|
35529
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
|
|
35530
|
+
*
|
|
35531
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
|
|
35532
|
+
*/
|
|
35533
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35534
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35535
|
+
return this.httpInstance
|
|
35536
|
+
.request({
|
|
35537
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
|
|
35538
|
+
method: "DELETE",
|
|
35539
|
+
data,
|
|
35540
|
+
params,
|
|
35541
|
+
headers,
|
|
35542
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35543
|
+
})
|
|
35544
|
+
.catch((e) => {
|
|
35545
|
+
this.logger.error(formatErrors(e));
|
|
35546
|
+
throw e;
|
|
35547
|
+
});
|
|
35548
|
+
}),
|
|
35549
|
+
/**
|
|
35550
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
|
|
35551
|
+
*
|
|
35552
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
|
|
35553
|
+
*/
|
|
35554
|
+
patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35555
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35556
|
+
return this.httpInstance
|
|
35557
|
+
.request({
|
|
35558
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
|
|
35559
|
+
method: "PATCH",
|
|
35560
|
+
data,
|
|
35561
|
+
params,
|
|
35562
|
+
headers,
|
|
35563
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35564
|
+
})
|
|
35565
|
+
.catch((e) => {
|
|
35566
|
+
this.logger.error(formatErrors(e));
|
|
35567
|
+
throw e;
|
|
35568
|
+
});
|
|
35569
|
+
}),
|
|
35570
|
+
},
|
|
35571
|
+
/**
|
|
35572
|
+
* probation
|
|
35573
|
+
*/
|
|
35574
|
+
probation: {
|
|
35575
|
+
/**
|
|
35576
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
|
|
35577
|
+
*
|
|
35578
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
|
|
35579
|
+
*/
|
|
35580
|
+
enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35581
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35582
|
+
return this.httpInstance
|
|
35583
|
+
.request({
|
|
35584
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
|
|
35585
|
+
method: "POST",
|
|
35586
|
+
data,
|
|
35587
|
+
params,
|
|
35588
|
+
headers,
|
|
35589
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35590
|
+
})
|
|
35591
|
+
.catch((e) => {
|
|
35592
|
+
this.logger.error(formatErrors(e));
|
|
35593
|
+
throw e;
|
|
35594
|
+
});
|
|
35595
|
+
}),
|
|
35596
|
+
searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35597
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35598
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35599
|
+
const res = yield this.httpInstance
|
|
35600
|
+
.request({
|
|
35601
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
|
|
34768
35602
|
method: "POST",
|
|
34769
35603
|
headers: pickBy(innerPayload.headers, identity),
|
|
34770
35604
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -34927,6 +35761,126 @@ class Client$M extends Client$N {
|
|
|
34927
35761
|
});
|
|
34928
35762
|
}),
|
|
34929
35763
|
},
|
|
35764
|
+
/**
|
|
35765
|
+
* process
|
|
35766
|
+
*/
|
|
35767
|
+
process: {
|
|
35768
|
+
/**
|
|
35769
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=flow_variable_data&version=v2 click to debug }
|
|
35770
|
+
*
|
|
35771
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=flow_variable_data&project=corehr&resource=process&version=v2 document }
|
|
35772
|
+
*/
|
|
35773
|
+
flowVariableData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35774
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35775
|
+
return this.httpInstance
|
|
35776
|
+
.request({
|
|
35777
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`, path),
|
|
35778
|
+
method: "GET",
|
|
35779
|
+
data,
|
|
35780
|
+
params,
|
|
35781
|
+
headers,
|
|
35782
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35783
|
+
})
|
|
35784
|
+
.catch((e) => {
|
|
35785
|
+
this.logger.error(formatErrors(e));
|
|
35786
|
+
throw e;
|
|
35787
|
+
});
|
|
35788
|
+
}),
|
|
35789
|
+
/**
|
|
35790
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=get&version=v2 click to debug }
|
|
35791
|
+
*
|
|
35792
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process&version=v2 document }
|
|
35793
|
+
*/
|
|
35794
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35795
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35796
|
+
return this.httpInstance
|
|
35797
|
+
.request({
|
|
35798
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path),
|
|
35799
|
+
method: "GET",
|
|
35800
|
+
data,
|
|
35801
|
+
params,
|
|
35802
|
+
headers,
|
|
35803
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35804
|
+
})
|
|
35805
|
+
.catch((e) => {
|
|
35806
|
+
this.logger.error(formatErrors(e));
|
|
35807
|
+
throw e;
|
|
35808
|
+
});
|
|
35809
|
+
}),
|
|
35810
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35811
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35812
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
35813
|
+
const res = yield this.httpInstance
|
|
35814
|
+
.request({
|
|
35815
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
|
|
35816
|
+
method: "GET",
|
|
35817
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
35818
|
+
params: pickBy(innerPayload.params, identity),
|
|
35819
|
+
data,
|
|
35820
|
+
paramsSerializer: (params) => stringify(params, {
|
|
35821
|
+
arrayFormat: "repeat",
|
|
35822
|
+
}),
|
|
35823
|
+
})
|
|
35824
|
+
.catch((e) => {
|
|
35825
|
+
this.logger.error(formatErrors(e));
|
|
35826
|
+
});
|
|
35827
|
+
return res;
|
|
35828
|
+
});
|
|
35829
|
+
const Iterable = {
|
|
35830
|
+
[Symbol.asyncIterator]() {
|
|
35831
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
35832
|
+
let hasMore = true;
|
|
35833
|
+
let pageToken;
|
|
35834
|
+
while (hasMore) {
|
|
35835
|
+
try {
|
|
35836
|
+
const res = yield __await(sendRequest({
|
|
35837
|
+
headers,
|
|
35838
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
35839
|
+
data,
|
|
35840
|
+
}));
|
|
35841
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
35842
|
+
// @ts-ignore
|
|
35843
|
+
has_more,
|
|
35844
|
+
// @ts-ignore
|
|
35845
|
+
page_token,
|
|
35846
|
+
// @ts-ignore
|
|
35847
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
35848
|
+
yield yield __await(rest);
|
|
35849
|
+
hasMore = Boolean(has_more);
|
|
35850
|
+
pageToken = page_token || next_page_token;
|
|
35851
|
+
}
|
|
35852
|
+
catch (e) {
|
|
35853
|
+
yield yield __await(null);
|
|
35854
|
+
break;
|
|
35855
|
+
}
|
|
35856
|
+
}
|
|
35857
|
+
});
|
|
35858
|
+
},
|
|
35859
|
+
};
|
|
35860
|
+
return Iterable;
|
|
35861
|
+
}),
|
|
35862
|
+
/**
|
|
35863
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=list&version=v2 click to debug }
|
|
35864
|
+
*
|
|
35865
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=process&version=v2 document }
|
|
35866
|
+
*/
|
|
35867
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35868
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35869
|
+
return this.httpInstance
|
|
35870
|
+
.request({
|
|
35871
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
|
|
35872
|
+
method: "GET",
|
|
35873
|
+
data,
|
|
35874
|
+
params,
|
|
35875
|
+
headers,
|
|
35876
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35877
|
+
})
|
|
35878
|
+
.catch((e) => {
|
|
35879
|
+
this.logger.error(formatErrors(e));
|
|
35880
|
+
throw e;
|
|
35881
|
+
});
|
|
35882
|
+
}),
|
|
35883
|
+
},
|
|
34930
35884
|
/**
|
|
34931
35885
|
* process.form_variable_data
|
|
34932
35886
|
*/
|
|
@@ -34954,20 +35908,123 @@ class Client$M extends Client$N {
|
|
|
34954
35908
|
}),
|
|
34955
35909
|
},
|
|
34956
35910
|
/**
|
|
34957
|
-
* process
|
|
35911
|
+
* process.transfer
|
|
34958
35912
|
*/
|
|
34959
|
-
|
|
35913
|
+
processTransfer: {
|
|
34960
35914
|
/**
|
|
34961
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=
|
|
35915
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.transfer&apiName=update&version=v2 click to debug }
|
|
34962
35916
|
*
|
|
34963
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35917
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.transfer&version=v2 document }
|
|
34964
35918
|
*/
|
|
34965
|
-
|
|
35919
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34966
35920
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34967
35921
|
return this.httpInstance
|
|
34968
35922
|
.request({
|
|
34969
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path),
|
|
34970
|
-
method: "
|
|
35923
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`, path),
|
|
35924
|
+
method: "PUT",
|
|
35925
|
+
data,
|
|
35926
|
+
params,
|
|
35927
|
+
headers,
|
|
35928
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35929
|
+
})
|
|
35930
|
+
.catch((e) => {
|
|
35931
|
+
this.logger.error(formatErrors(e));
|
|
35932
|
+
throw e;
|
|
35933
|
+
});
|
|
35934
|
+
}),
|
|
35935
|
+
},
|
|
35936
|
+
/**
|
|
35937
|
+
* process_revoke
|
|
35938
|
+
*/
|
|
35939
|
+
processRevoke: {
|
|
35940
|
+
/**
|
|
35941
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_revoke&apiName=update&version=v2 click to debug }
|
|
35942
|
+
*
|
|
35943
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_revoke&version=v2 document }
|
|
35944
|
+
*/
|
|
35945
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35946
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35947
|
+
return this.httpInstance
|
|
35948
|
+
.request({
|
|
35949
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`, path),
|
|
35950
|
+
method: "PUT",
|
|
35951
|
+
data,
|
|
35952
|
+
params,
|
|
35953
|
+
headers,
|
|
35954
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35955
|
+
})
|
|
35956
|
+
.catch((e) => {
|
|
35957
|
+
this.logger.error(formatErrors(e));
|
|
35958
|
+
throw e;
|
|
35959
|
+
});
|
|
35960
|
+
}),
|
|
35961
|
+
},
|
|
35962
|
+
/**
|
|
35963
|
+
* process_withdraw
|
|
35964
|
+
*/
|
|
35965
|
+
processWithdraw: {
|
|
35966
|
+
/**
|
|
35967
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_withdraw&apiName=update&version=v2 click to debug }
|
|
35968
|
+
*
|
|
35969
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_withdraw&version=v2 document }
|
|
35970
|
+
*/
|
|
35971
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35972
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35973
|
+
return this.httpInstance
|
|
35974
|
+
.request({
|
|
35975
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`, path),
|
|
35976
|
+
method: "PUT",
|
|
35977
|
+
data,
|
|
35978
|
+
params,
|
|
35979
|
+
headers,
|
|
35980
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
35981
|
+
})
|
|
35982
|
+
.catch((e) => {
|
|
35983
|
+
this.logger.error(formatErrors(e));
|
|
35984
|
+
throw e;
|
|
35985
|
+
});
|
|
35986
|
+
}),
|
|
35987
|
+
},
|
|
35988
|
+
/**
|
|
35989
|
+
* report_detail_row
|
|
35990
|
+
*/
|
|
35991
|
+
reportDetailRow: {
|
|
35992
|
+
/**
|
|
35993
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
|
|
35994
|
+
*
|
|
35995
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
|
|
35996
|
+
*
|
|
35997
|
+
* 批量删除填报行
|
|
35998
|
+
*/
|
|
35999
|
+
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36000
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36001
|
+
return this.httpInstance
|
|
36002
|
+
.request({
|
|
36003
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`, path),
|
|
36004
|
+
method: "POST",
|
|
36005
|
+
data,
|
|
36006
|
+
params,
|
|
36007
|
+
headers,
|
|
36008
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
36009
|
+
})
|
|
36010
|
+
.catch((e) => {
|
|
36011
|
+
this.logger.error(formatErrors(e));
|
|
36012
|
+
throw e;
|
|
36013
|
+
});
|
|
36014
|
+
}),
|
|
36015
|
+
/**
|
|
36016
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchSave&version=v2 click to debug }
|
|
36017
|
+
*
|
|
36018
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchSave&project=corehr&resource=report_detail_row&version=v2 document }
|
|
36019
|
+
*
|
|
36020
|
+
* 批量创建/更新填报行
|
|
36021
|
+
*/
|
|
36022
|
+
batchSave: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36023
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36024
|
+
return this.httpInstance
|
|
36025
|
+
.request({
|
|
36026
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`, path),
|
|
36027
|
+
method: "POST",
|
|
34971
36028
|
data,
|
|
34972
36029
|
params,
|
|
34973
36030
|
headers,
|
|
@@ -34978,12 +36035,67 @@ class Client$M extends Client$N {
|
|
|
34978
36035
|
throw e;
|
|
34979
36036
|
});
|
|
34980
36037
|
}),
|
|
36038
|
+
},
|
|
36039
|
+
/**
|
|
36040
|
+
* signature_file
|
|
36041
|
+
*/
|
|
36042
|
+
signatureFile: {
|
|
36043
|
+
/**
|
|
36044
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=download&version=v2 click to debug }
|
|
36045
|
+
*
|
|
36046
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download&project=corehr&resource=signature_file&version=v2 document }
|
|
36047
|
+
*/
|
|
36048
|
+
download: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36049
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36050
|
+
const res = yield this.httpInstance
|
|
36051
|
+
.request({
|
|
36052
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/:signature_file_id/download`, path),
|
|
36053
|
+
method: "POST",
|
|
36054
|
+
headers,
|
|
36055
|
+
data,
|
|
36056
|
+
params,
|
|
36057
|
+
responseType: "stream",
|
|
36058
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
36059
|
+
$return_headers: true,
|
|
36060
|
+
})
|
|
36061
|
+
.catch((e) => {
|
|
36062
|
+
this.logger.error(formatErrors(e));
|
|
36063
|
+
throw e;
|
|
36064
|
+
});
|
|
36065
|
+
const checkIsReadable = () => {
|
|
36066
|
+
const consumedError = "The stream has already been consumed";
|
|
36067
|
+
if (!res.data.readable) {
|
|
36068
|
+
this.logger.error(consumedError);
|
|
36069
|
+
throw new Error(consumedError);
|
|
36070
|
+
}
|
|
36071
|
+
};
|
|
36072
|
+
return {
|
|
36073
|
+
writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
|
|
36074
|
+
checkIsReadable();
|
|
36075
|
+
return new Promise((resolve, reject) => {
|
|
36076
|
+
const writableStream = fs.createWriteStream(filePath);
|
|
36077
|
+
writableStream.on("finish", () => {
|
|
36078
|
+
resolve(filePath);
|
|
36079
|
+
});
|
|
36080
|
+
writableStream.on("error", (e) => {
|
|
36081
|
+
reject(e);
|
|
36082
|
+
});
|
|
36083
|
+
res.data.pipe(writableStream);
|
|
36084
|
+
});
|
|
36085
|
+
}),
|
|
36086
|
+
getReadableStream: () => {
|
|
36087
|
+
checkIsReadable();
|
|
36088
|
+
return res.data;
|
|
36089
|
+
},
|
|
36090
|
+
headers: res.headers,
|
|
36091
|
+
};
|
|
36092
|
+
}),
|
|
34981
36093
|
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
34982
36094
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
34983
36095
|
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
34984
36096
|
const res = yield this.httpInstance
|
|
34985
36097
|
.request({
|
|
34986
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
36098
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path),
|
|
34987
36099
|
method: "GET",
|
|
34988
36100
|
headers: pickBy(innerPayload.headers, identity),
|
|
34989
36101
|
params: pickBy(innerPayload.params, identity),
|
|
@@ -35031,16 +36143,110 @@ class Client$M extends Client$N {
|
|
|
35031
36143
|
return Iterable;
|
|
35032
36144
|
}),
|
|
35033
36145
|
/**
|
|
35034
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36146
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list&version=v2 click to debug }
|
|
36147
|
+
*
|
|
36148
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=signature_file&version=v2 document }
|
|
36149
|
+
*/
|
|
36150
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36151
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36152
|
+
return this.httpInstance
|
|
36153
|
+
.request({
|
|
36154
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path),
|
|
36155
|
+
method: "GET",
|
|
36156
|
+
data,
|
|
36157
|
+
params,
|
|
36158
|
+
headers,
|
|
36159
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
36160
|
+
})
|
|
36161
|
+
.catch((e) => {
|
|
36162
|
+
this.logger.error(formatErrors(e));
|
|
36163
|
+
throw e;
|
|
36164
|
+
});
|
|
36165
|
+
}),
|
|
36166
|
+
/**
|
|
36167
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list_by_biz_id&version=v2 click to debug }
|
|
36168
|
+
*
|
|
36169
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_biz_id&project=corehr&resource=signature_file&version=v2 document }
|
|
36170
|
+
*/
|
|
36171
|
+
listByBizId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36172
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36173
|
+
return this.httpInstance
|
|
36174
|
+
.request({
|
|
36175
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`, path),
|
|
36176
|
+
method: "GET",
|
|
36177
|
+
data,
|
|
36178
|
+
params,
|
|
36179
|
+
headers,
|
|
36180
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
36181
|
+
})
|
|
36182
|
+
.catch((e) => {
|
|
36183
|
+
this.logger.error(formatErrors(e));
|
|
36184
|
+
throw e;
|
|
36185
|
+
});
|
|
36186
|
+
}),
|
|
36187
|
+
queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36188
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
36189
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
36190
|
+
const res = yield this.httpInstance
|
|
36191
|
+
.request({
|
|
36192
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
|
|
36193
|
+
method: "POST",
|
|
36194
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
36195
|
+
params: pickBy(innerPayload.params, identity),
|
|
36196
|
+
data,
|
|
36197
|
+
paramsSerializer: (params) => stringify(params, {
|
|
36198
|
+
arrayFormat: "repeat",
|
|
36199
|
+
}),
|
|
36200
|
+
})
|
|
36201
|
+
.catch((e) => {
|
|
36202
|
+
this.logger.error(formatErrors(e));
|
|
36203
|
+
});
|
|
36204
|
+
return res;
|
|
36205
|
+
});
|
|
36206
|
+
const Iterable = {
|
|
36207
|
+
[Symbol.asyncIterator]() {
|
|
36208
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
36209
|
+
let hasMore = true;
|
|
36210
|
+
let pageToken;
|
|
36211
|
+
while (hasMore) {
|
|
36212
|
+
try {
|
|
36213
|
+
const res = yield __await(sendRequest({
|
|
36214
|
+
headers,
|
|
36215
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
36216
|
+
data,
|
|
36217
|
+
}));
|
|
36218
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
36219
|
+
// @ts-ignore
|
|
36220
|
+
has_more,
|
|
36221
|
+
// @ts-ignore
|
|
36222
|
+
page_token,
|
|
36223
|
+
// @ts-ignore
|
|
36224
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
36225
|
+
yield yield __await(rest);
|
|
36226
|
+
hasMore = Boolean(has_more);
|
|
36227
|
+
pageToken = page_token || next_page_token;
|
|
36228
|
+
}
|
|
36229
|
+
catch (e) {
|
|
36230
|
+
yield yield __await(null);
|
|
36231
|
+
break;
|
|
36232
|
+
}
|
|
36233
|
+
}
|
|
36234
|
+
});
|
|
36235
|
+
},
|
|
36236
|
+
};
|
|
36237
|
+
return Iterable;
|
|
36238
|
+
}),
|
|
36239
|
+
/**
|
|
36240
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=query&version=v2 click to debug }
|
|
35035
36241
|
*
|
|
35036
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36242
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=signature_file&version=v2 document }
|
|
35037
36243
|
*/
|
|
35038
|
-
|
|
36244
|
+
query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35039
36245
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35040
36246
|
return this.httpInstance
|
|
35041
36247
|
.request({
|
|
35042
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35043
|
-
method: "
|
|
36248
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
|
|
36249
|
+
method: "POST",
|
|
35044
36250
|
data,
|
|
35045
36251
|
params,
|
|
35046
36252
|
headers,
|
|
@@ -35051,22 +36257,17 @@ class Client$M extends Client$N {
|
|
|
35051
36257
|
throw e;
|
|
35052
36258
|
});
|
|
35053
36259
|
}),
|
|
35054
|
-
},
|
|
35055
|
-
/**
|
|
35056
|
-
* process.transfer
|
|
35057
|
-
*/
|
|
35058
|
-
processTransfer: {
|
|
35059
36260
|
/**
|
|
35060
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36261
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=terminate&version=v2 click to debug }
|
|
35061
36262
|
*
|
|
35062
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36263
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=terminate&project=corehr&resource=signature_file&version=v2 document }
|
|
35063
36264
|
*/
|
|
35064
|
-
|
|
36265
|
+
terminate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35065
36266
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35066
36267
|
return this.httpInstance
|
|
35067
36268
|
.request({
|
|
35068
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35069
|
-
method: "
|
|
36269
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`, path),
|
|
36270
|
+
method: "POST",
|
|
35070
36271
|
data,
|
|
35071
36272
|
params,
|
|
35072
36273
|
headers,
|
|
@@ -35079,20 +36280,20 @@ class Client$M extends Client$N {
|
|
|
35079
36280
|
}),
|
|
35080
36281
|
},
|
|
35081
36282
|
/**
|
|
35082
|
-
*
|
|
36283
|
+
* signature_node
|
|
35083
36284
|
*/
|
|
35084
|
-
|
|
36285
|
+
signatureNode: {
|
|
35085
36286
|
/**
|
|
35086
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36287
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_node&apiName=list_by_file_id&version=v2 click to debug }
|
|
35087
36288
|
*
|
|
35088
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36289
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_file_id&project=corehr&resource=signature_node&version=v2 document }
|
|
35089
36290
|
*/
|
|
35090
|
-
|
|
36291
|
+
listByFileId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35091
36292
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35092
36293
|
return this.httpInstance
|
|
35093
36294
|
.request({
|
|
35094
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35095
|
-
method: "
|
|
36295
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`, path),
|
|
36296
|
+
method: "GET",
|
|
35096
36297
|
data,
|
|
35097
36298
|
params,
|
|
35098
36299
|
headers,
|
|
@@ -35105,20 +36306,20 @@ class Client$M extends Client$N {
|
|
|
35105
36306
|
}),
|
|
35106
36307
|
},
|
|
35107
36308
|
/**
|
|
35108
|
-
*
|
|
36309
|
+
* signature_template
|
|
35109
36310
|
*/
|
|
35110
|
-
|
|
36311
|
+
signatureTemplate: {
|
|
35111
36312
|
/**
|
|
35112
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36313
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template&apiName=search&version=v2 click to debug }
|
|
35113
36314
|
*
|
|
35114
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
36315
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=signature_template&version=v2 document }
|
|
35115
36316
|
*/
|
|
35116
|
-
|
|
36317
|
+
search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35117
36318
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35118
36319
|
return this.httpInstance
|
|
35119
36320
|
.request({
|
|
35120
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35121
|
-
method: "
|
|
36321
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_templates/search`, path),
|
|
36322
|
+
method: "GET",
|
|
35122
36323
|
data,
|
|
35123
36324
|
params,
|
|
35124
36325
|
headers,
|
|
@@ -35131,45 +36332,72 @@ class Client$M extends Client$N {
|
|
|
35131
36332
|
}),
|
|
35132
36333
|
},
|
|
35133
36334
|
/**
|
|
35134
|
-
*
|
|
36335
|
+
* signature_template_info_with_thumbnail
|
|
35135
36336
|
*/
|
|
35136
|
-
|
|
35137
|
-
|
|
35138
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
|
|
35139
|
-
*
|
|
35140
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
|
|
35141
|
-
*
|
|
35142
|
-
* 批量删除填报行
|
|
35143
|
-
*/
|
|
35144
|
-
batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
36337
|
+
signatureTemplateInfoWithThumbnail: {
|
|
36338
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35145
36339
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35146
|
-
|
|
35147
|
-
.
|
|
35148
|
-
|
|
35149
|
-
|
|
35150
|
-
|
|
35151
|
-
|
|
35152
|
-
|
|
35153
|
-
|
|
35154
|
-
|
|
35155
|
-
|
|
35156
|
-
|
|
35157
|
-
|
|
36340
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
36341
|
+
const res = yield this.httpInstance
|
|
36342
|
+
.request({
|
|
36343
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
|
|
36344
|
+
method: "GET",
|
|
36345
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
36346
|
+
params: pickBy(innerPayload.params, identity),
|
|
36347
|
+
data,
|
|
36348
|
+
paramsSerializer: (params) => stringify(params, {
|
|
36349
|
+
arrayFormat: "repeat",
|
|
36350
|
+
}),
|
|
36351
|
+
})
|
|
36352
|
+
.catch((e) => {
|
|
36353
|
+
this.logger.error(formatErrors(e));
|
|
36354
|
+
});
|
|
36355
|
+
return res;
|
|
35158
36356
|
});
|
|
36357
|
+
const Iterable = {
|
|
36358
|
+
[Symbol.asyncIterator]() {
|
|
36359
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
36360
|
+
let hasMore = true;
|
|
36361
|
+
let pageToken;
|
|
36362
|
+
while (hasMore) {
|
|
36363
|
+
try {
|
|
36364
|
+
const res = yield __await(sendRequest({
|
|
36365
|
+
headers,
|
|
36366
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
36367
|
+
data,
|
|
36368
|
+
}));
|
|
36369
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
36370
|
+
// @ts-ignore
|
|
36371
|
+
has_more,
|
|
36372
|
+
// @ts-ignore
|
|
36373
|
+
page_token,
|
|
36374
|
+
// @ts-ignore
|
|
36375
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
36376
|
+
yield yield __await(rest);
|
|
36377
|
+
hasMore = Boolean(has_more);
|
|
36378
|
+
pageToken = page_token || next_page_token;
|
|
36379
|
+
}
|
|
36380
|
+
catch (e) {
|
|
36381
|
+
yield yield __await(null);
|
|
36382
|
+
break;
|
|
36383
|
+
}
|
|
36384
|
+
}
|
|
36385
|
+
});
|
|
36386
|
+
},
|
|
36387
|
+
};
|
|
36388
|
+
return Iterable;
|
|
35159
36389
|
}),
|
|
35160
36390
|
/**
|
|
35161
|
-
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=
|
|
36391
|
+
* {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template_info_with_thumbnail&apiName=list&version=v2 click to debug }
|
|
35162
36392
|
*
|
|
35163
|
-
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=
|
|
35164
|
-
*
|
|
35165
|
-
* 批量创建/更新填报行
|
|
36393
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=signature_template_info_with_thumbnail&version=v2 document }
|
|
35166
36394
|
*/
|
|
35167
|
-
|
|
36395
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
35168
36396
|
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
35169
36397
|
return this.httpInstance
|
|
35170
36398
|
.request({
|
|
35171
|
-
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/
|
|
35172
|
-
method: "
|
|
36399
|
+
url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
|
|
36400
|
+
method: "GET",
|
|
35173
36401
|
data,
|
|
35174
36402
|
params,
|
|
35175
36403
|
headers,
|
|
@@ -38411,7 +39639,7 @@ class Client$G extends Client$H {
|
|
|
38411
39639
|
}),
|
|
38412
39640
|
},
|
|
38413
39641
|
/**
|
|
38414
|
-
*
|
|
39642
|
+
* 事件
|
|
38415
39643
|
*/
|
|
38416
39644
|
file: {
|
|
38417
39645
|
/**
|
|
@@ -40237,7 +41465,7 @@ class Client$G extends Client$H {
|
|
|
40237
41465
|
}),
|
|
40238
41466
|
},
|
|
40239
41467
|
/**
|
|
40240
|
-
*
|
|
41468
|
+
* 事件
|
|
40241
41469
|
*/
|
|
40242
41470
|
file: {
|
|
40243
41471
|
/**
|
|
@@ -45580,7 +46808,7 @@ class Client$x extends Client$y {
|
|
|
45580
46808
|
}),
|
|
45581
46809
|
},
|
|
45582
46810
|
/**
|
|
45583
|
-
*
|
|
46811
|
+
* 投递
|
|
45584
46812
|
*/
|
|
45585
46813
|
application: {
|
|
45586
46814
|
/**
|
|
@@ -45933,6 +47161,27 @@ class Client$x extends Client$y {
|
|
|
45933
47161
|
* 背调 (灰度租户可见)
|
|
45934
47162
|
*/
|
|
45935
47163
|
backgroundCheckOrder: {
|
|
47164
|
+
/**
|
|
47165
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
|
|
47166
|
+
*
|
|
47167
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
|
|
47168
|
+
*/
|
|
47169
|
+
batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
47170
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
47171
|
+
return this.httpInstance
|
|
47172
|
+
.request({
|
|
47173
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path),
|
|
47174
|
+
method: "POST",
|
|
47175
|
+
data,
|
|
47176
|
+
params,
|
|
47177
|
+
headers,
|
|
47178
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
47179
|
+
})
|
|
47180
|
+
.catch((e) => {
|
|
47181
|
+
this.logger.error(formatErrors(e));
|
|
47182
|
+
throw e;
|
|
47183
|
+
});
|
|
47184
|
+
}),
|
|
45936
47185
|
/**
|
|
45937
47186
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
|
|
45938
47187
|
*
|
|
@@ -51714,7 +52963,7 @@ class Client$x extends Client$y {
|
|
|
51714
52963
|
}),
|
|
51715
52964
|
},
|
|
51716
52965
|
/**
|
|
51717
|
-
*
|
|
52966
|
+
* 投递
|
|
51718
52967
|
*/
|
|
51719
52968
|
application: {
|
|
51720
52969
|
/**
|
|
@@ -52067,6 +53316,27 @@ class Client$x extends Client$y {
|
|
|
52067
53316
|
* 背调 (灰度租户可见)
|
|
52068
53317
|
*/
|
|
52069
53318
|
backgroundCheckOrder: {
|
|
53319
|
+
/**
|
|
53320
|
+
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
|
|
53321
|
+
*
|
|
53322
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
|
|
53323
|
+
*/
|
|
53324
|
+
batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
53325
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
53326
|
+
return this.httpInstance
|
|
53327
|
+
.request({
|
|
53328
|
+
url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path),
|
|
53329
|
+
method: "POST",
|
|
53330
|
+
data,
|
|
53331
|
+
params,
|
|
53332
|
+
headers,
|
|
53333
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
53334
|
+
})
|
|
53335
|
+
.catch((e) => {
|
|
53336
|
+
this.logger.error(formatErrors(e));
|
|
53337
|
+
throw e;
|
|
53338
|
+
});
|
|
53339
|
+
}),
|
|
52070
53340
|
/**
|
|
52071
53341
|
* {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
|
|
52072
53342
|
*
|
|
@@ -71739,6 +73009,217 @@ class Client$d extends Client$e {
|
|
|
71739
73009
|
}),
|
|
71740
73010
|
},
|
|
71741
73011
|
},
|
|
73012
|
+
v2: {
|
|
73013
|
+
/**
|
|
73014
|
+
* device_apply_record
|
|
73015
|
+
*/
|
|
73016
|
+
deviceApplyRecord: {
|
|
73017
|
+
/**
|
|
73018
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_apply_record&apiName=update&version=v2 click to debug }
|
|
73019
|
+
*
|
|
73020
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_apply_record&version=v2 document }
|
|
73021
|
+
*/
|
|
73022
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73023
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73024
|
+
return this.httpInstance
|
|
73025
|
+
.request({
|
|
73026
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_apply_records/:device_apply_record_id`, path),
|
|
73027
|
+
method: "PUT",
|
|
73028
|
+
data,
|
|
73029
|
+
params,
|
|
73030
|
+
headers,
|
|
73031
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73032
|
+
})
|
|
73033
|
+
.catch((e) => {
|
|
73034
|
+
this.logger.error(formatErrors(e));
|
|
73035
|
+
throw e;
|
|
73036
|
+
});
|
|
73037
|
+
}),
|
|
73038
|
+
},
|
|
73039
|
+
/**
|
|
73040
|
+
* device_record
|
|
73041
|
+
*/
|
|
73042
|
+
deviceRecord: {
|
|
73043
|
+
/**
|
|
73044
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=create&version=v2 click to debug }
|
|
73045
|
+
*
|
|
73046
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73047
|
+
*/
|
|
73048
|
+
create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73049
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73050
|
+
return this.httpInstance
|
|
73051
|
+
.request({
|
|
73052
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
|
|
73053
|
+
method: "POST",
|
|
73054
|
+
data,
|
|
73055
|
+
params,
|
|
73056
|
+
headers,
|
|
73057
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73058
|
+
})
|
|
73059
|
+
.catch((e) => {
|
|
73060
|
+
this.logger.error(formatErrors(e));
|
|
73061
|
+
throw e;
|
|
73062
|
+
});
|
|
73063
|
+
}),
|
|
73064
|
+
/**
|
|
73065
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=delete&version=v2 click to debug }
|
|
73066
|
+
*
|
|
73067
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73068
|
+
*/
|
|
73069
|
+
delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73070
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73071
|
+
return this.httpInstance
|
|
73072
|
+
.request({
|
|
73073
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
|
|
73074
|
+
method: "DELETE",
|
|
73075
|
+
data,
|
|
73076
|
+
params,
|
|
73077
|
+
headers,
|
|
73078
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73079
|
+
})
|
|
73080
|
+
.catch((e) => {
|
|
73081
|
+
this.logger.error(formatErrors(e));
|
|
73082
|
+
throw e;
|
|
73083
|
+
});
|
|
73084
|
+
}),
|
|
73085
|
+
/**
|
|
73086
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=get&version=v2 click to debug }
|
|
73087
|
+
*
|
|
73088
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73089
|
+
*/
|
|
73090
|
+
get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73091
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73092
|
+
return this.httpInstance
|
|
73093
|
+
.request({
|
|
73094
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
|
|
73095
|
+
method: "GET",
|
|
73096
|
+
data,
|
|
73097
|
+
params,
|
|
73098
|
+
headers,
|
|
73099
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73100
|
+
})
|
|
73101
|
+
.catch((e) => {
|
|
73102
|
+
this.logger.error(formatErrors(e));
|
|
73103
|
+
throw e;
|
|
73104
|
+
});
|
|
73105
|
+
}),
|
|
73106
|
+
listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73107
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73108
|
+
const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
|
|
73109
|
+
const res = yield this.httpInstance
|
|
73110
|
+
.request({
|
|
73111
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
|
|
73112
|
+
method: "GET",
|
|
73113
|
+
headers: pickBy(innerPayload.headers, identity),
|
|
73114
|
+
params: pickBy(innerPayload.params, identity),
|
|
73115
|
+
data,
|
|
73116
|
+
paramsSerializer: (params) => stringify(params, {
|
|
73117
|
+
arrayFormat: "repeat",
|
|
73118
|
+
}),
|
|
73119
|
+
})
|
|
73120
|
+
.catch((e) => {
|
|
73121
|
+
this.logger.error(formatErrors(e));
|
|
73122
|
+
});
|
|
73123
|
+
return res;
|
|
73124
|
+
});
|
|
73125
|
+
const Iterable = {
|
|
73126
|
+
[Symbol.asyncIterator]() {
|
|
73127
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
|
73128
|
+
let hasMore = true;
|
|
73129
|
+
let pageToken;
|
|
73130
|
+
while (hasMore) {
|
|
73131
|
+
try {
|
|
73132
|
+
const res = yield __await(sendRequest({
|
|
73133
|
+
headers,
|
|
73134
|
+
params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
|
|
73135
|
+
data,
|
|
73136
|
+
}));
|
|
73137
|
+
const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
|
|
73138
|
+
// @ts-ignore
|
|
73139
|
+
has_more,
|
|
73140
|
+
// @ts-ignore
|
|
73141
|
+
page_token,
|
|
73142
|
+
// @ts-ignore
|
|
73143
|
+
next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
|
|
73144
|
+
yield yield __await(rest);
|
|
73145
|
+
hasMore = Boolean(has_more);
|
|
73146
|
+
pageToken = page_token || next_page_token;
|
|
73147
|
+
}
|
|
73148
|
+
catch (e) {
|
|
73149
|
+
yield yield __await(null);
|
|
73150
|
+
break;
|
|
73151
|
+
}
|
|
73152
|
+
}
|
|
73153
|
+
});
|
|
73154
|
+
},
|
|
73155
|
+
};
|
|
73156
|
+
return Iterable;
|
|
73157
|
+
}),
|
|
73158
|
+
/**
|
|
73159
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=list&version=v2 click to debug }
|
|
73160
|
+
*
|
|
73161
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73162
|
+
*/
|
|
73163
|
+
list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73164
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73165
|
+
return this.httpInstance
|
|
73166
|
+
.request({
|
|
73167
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
|
|
73168
|
+
method: "GET",
|
|
73169
|
+
data,
|
|
73170
|
+
params,
|
|
73171
|
+
headers,
|
|
73172
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73173
|
+
})
|
|
73174
|
+
.catch((e) => {
|
|
73175
|
+
this.logger.error(formatErrors(e));
|
|
73176
|
+
throw e;
|
|
73177
|
+
});
|
|
73178
|
+
}),
|
|
73179
|
+
/**
|
|
73180
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=mine&version=v2 click to debug }
|
|
73181
|
+
*
|
|
73182
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mine&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73183
|
+
*/
|
|
73184
|
+
mine: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73185
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73186
|
+
return this.httpInstance
|
|
73187
|
+
.request({
|
|
73188
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`, path),
|
|
73189
|
+
method: "GET",
|
|
73190
|
+
data,
|
|
73191
|
+
params,
|
|
73192
|
+
headers,
|
|
73193
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73194
|
+
})
|
|
73195
|
+
.catch((e) => {
|
|
73196
|
+
this.logger.error(formatErrors(e));
|
|
73197
|
+
throw e;
|
|
73198
|
+
});
|
|
73199
|
+
}),
|
|
73200
|
+
/**
|
|
73201
|
+
* {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=update&version=v2 click to debug }
|
|
73202
|
+
*
|
|
73203
|
+
* {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_record&version=v2 document }
|
|
73204
|
+
*/
|
|
73205
|
+
update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
73206
|
+
const { headers, params, data, path } = yield this.formatPayload(payload, options);
|
|
73207
|
+
return this.httpInstance
|
|
73208
|
+
.request({
|
|
73209
|
+
url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
|
|
73210
|
+
method: "PUT",
|
|
73211
|
+
data,
|
|
73212
|
+
params,
|
|
73213
|
+
headers,
|
|
73214
|
+
paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
|
|
73215
|
+
})
|
|
73216
|
+
.catch((e) => {
|
|
73217
|
+
this.logger.error(formatErrors(e));
|
|
73218
|
+
throw e;
|
|
73219
|
+
});
|
|
73220
|
+
}),
|
|
73221
|
+
},
|
|
73222
|
+
},
|
|
71742
73223
|
};
|
|
71743
73224
|
}
|
|
71744
73225
|
}
|
|
@@ -82502,10 +83983,12 @@ class Client extends Client$1 {
|
|
|
82502
83983
|
const helpDeskCredential = string2Base64(`${this.helpDeskId}:${this.helpDeskToken}`);
|
|
82503
83984
|
targetOptions.headers['X-Lark-Helpdesk-Authorization'] = `Bearer ${helpDeskCredential}`;
|
|
82504
83985
|
}
|
|
83986
|
+
const payloadData = Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.data) || {})), targetOptions.data);
|
|
82505
83987
|
return {
|
|
82506
83988
|
params: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.params) || {})), targetOptions.params),
|
|
82507
83989
|
headers: Object.assign(Object.assign({ 'User-Agent': 'oapi-node-sdk/1.0.0' }, ((payload === null || payload === void 0 ? void 0 : payload.headers) || {})), targetOptions.headers),
|
|
82508
|
-
|
|
83990
|
+
// @ts-ignore
|
|
83991
|
+
data: Object.keys(payloadData).length === 0 ? undefined : payloadData,
|
|
82509
83992
|
path: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.path) || {})), targetOptions.path),
|
|
82510
83993
|
};
|
|
82511
83994
|
});
|