@larksuiteoapi/node-sdk 1.54.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.js CHANGED
@@ -1333,7 +1333,7 @@ class Client$15 extends Client$16 {
1333
1333
  constructor() {
1334
1334
  super(...arguments);
1335
1335
  /**
1336
- * 管理后台-行为审计
1336
+ * 管理后台-企业勋章
1337
1337
  */
1338
1338
  this.admin = {
1339
1339
  /**
@@ -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
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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: "GET",
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=list&version=v4 click to debug }
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/list document }
6675
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
6481
6676
  *
6482
- * 批量获取审批实例ID
6677
+ * 查询实例列表
6483
6678
  *
6484
- * 根据 approval_code 批量获取审批实例的 instance_code,用于拉取租户下某个审批定义的全部审批实例。默认以审批创建时间先后顺序排列
6679
+ * 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
6485
6680
  */
6486
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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: "GET",
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=preview&version=v4 click to debug }
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/ukTM5UjL5ETO14SOxkTN/approval-preview document }
6700
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
6701
+ *
6702
+ * 查询抄送列表
6703
+ *
6704
+ * 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
6506
6705
  */
6507
- preview: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/preview`, path),
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
- queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/query`, path),
6529
- method: "POST",
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
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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: "GET",
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=list&version=v4 click to debug }
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/list document }
7607
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query document }
7488
7608
  *
7489
- * 批量获取审批实例ID
7609
+ * 查询实例列表
7490
7610
  *
7491
- * 根据 approval_code 批量获取审批实例的 instance_code,用于拉取租户下某个审批定义的全部审批实例。默认以审批创建时间先后顺序排列
7611
+ * 该接口通过不同条件查询审批系统中符合条件的审批实例列表。
7492
7612
  */
7493
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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: "GET",
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=preview&version=v4 click to debug }
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/ukTM5UjL5ETO14SOxkTN/approval-preview document }
7632
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc document }
7633
+ *
7634
+ * 查询抄送列表
7635
+ *
7636
+ * 该接口通过不同条件查询审批系统中符合条件的审批抄送列表。
7513
7637
  */
7514
- preview: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/preview`, path),
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
- queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/query`, path),
7536
- method: "POST",
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=patch&version=v4 click to debug }
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/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscribe document }
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
- subscribe: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/subscription`, path),
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=unsubscribe&version=v4 click to debug }
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
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/unsubscription document }
17913
+ * 更新日历信息
17922
17914
  *
17923
- * 取消订阅日历变更事件
17915
+ * 该接口用于以当前身份(应用 / 用户)修改日历信息。;;身份由 Header Authorization 的 Token 类型决定。
17924
17916
  *
17925
- * 该接口用于以用户身份取消订阅当前身份下日历列表中的日历变更事件。
17917
+ * 当前身份对日历有 owner 权限时,可修改全局字段:summary, description, permission。;;当前身份对日历不具有 owner 权限时,仅可修改对自己生效的字段:color, summary_alias。
17926
17918
  */
17927
- unsubscription: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/unsubscription`, path),
17932
- method: "POST",
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.event.attendee&apiName=batch_delete&version=v4 click to debug }
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
- * - 当前身份需要有日历的 writer 或 owner 权限,并且日历的类型只能为 primary 或 shared。;;- 当前身份需要是日程的组织者。
17942
+ * 获取当前身份的主日历信息。
17958
17943
  */
17959
- batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/:calendar_id/events/:event_id/attendees/batch_delete`, path),
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.event.attendee&apiName=create&version=v4 click to debug }
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/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/create document }
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
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/:calendar_id/events/:event_id/attendees`, path),
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
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
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/:calendar_id/events/:event_id/attendees`, path),
18008
- method: "GET",
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
  *
@@ -19390,6 +19651,220 @@ class Client$Q extends Client$R {
19390
19651
  });
19391
19652
  }),
19392
19653
  },
19654
+ /**
19655
+ * lump_sum_payment
19656
+ */
19657
+ lumpSumPayment: {
19658
+ /**
19659
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_create&version=v1 click to debug }
19660
+ *
19661
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=lump_sum_payment&version=v1 document }
19662
+ */
19663
+ batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19664
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19665
+ return this.httpInstance
19666
+ .request({
19667
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_create`, path),
19668
+ method: "POST",
19669
+ data,
19670
+ params,
19671
+ headers,
19672
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19673
+ })
19674
+ .catch((e) => {
19675
+ this.logger.error(formatErrors(e));
19676
+ throw e;
19677
+ });
19678
+ }),
19679
+ /**
19680
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_remove&version=v1 click to debug }
19681
+ *
19682
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=lump_sum_payment&version=v1 document }
19683
+ */
19684
+ batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19685
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19686
+ return this.httpInstance
19687
+ .request({
19688
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_remove`, path),
19689
+ method: "POST",
19690
+ data,
19691
+ params,
19692
+ headers,
19693
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19694
+ })
19695
+ .catch((e) => {
19696
+ this.logger.error(formatErrors(e));
19697
+ throw e;
19698
+ });
19699
+ }),
19700
+ /**
19701
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=batch_update&version=v1 click to debug }
19702
+ *
19703
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=lump_sum_payment&version=v1 document }
19704
+ */
19705
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19706
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19707
+ return this.httpInstance
19708
+ .request({
19709
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/batch_update`, path),
19710
+ method: "POST",
19711
+ data,
19712
+ params,
19713
+ headers,
19714
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19715
+ })
19716
+ .catch((e) => {
19717
+ this.logger.error(formatErrors(e));
19718
+ throw e;
19719
+ });
19720
+ }),
19721
+ queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19722
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19723
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19724
+ const res = yield this.httpInstance
19725
+ .request({
19726
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`, path),
19727
+ method: "POST",
19728
+ headers: pickBy(innerPayload.headers, identity),
19729
+ params: pickBy(innerPayload.params, identity),
19730
+ data,
19731
+ paramsSerializer: (params) => stringify(params, {
19732
+ arrayFormat: "repeat",
19733
+ }),
19734
+ })
19735
+ .catch((e) => {
19736
+ this.logger.error(formatErrors(e));
19737
+ });
19738
+ return res;
19739
+ });
19740
+ const Iterable = {
19741
+ [Symbol.asyncIterator]() {
19742
+ return __asyncGenerator(this, arguments, function* _a() {
19743
+ let hasMore = true;
19744
+ let pageToken;
19745
+ while (hasMore) {
19746
+ try {
19747
+ const res = yield __await(sendRequest({
19748
+ headers,
19749
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19750
+ data,
19751
+ }));
19752
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
19753
+ // @ts-ignore
19754
+ has_more,
19755
+ // @ts-ignore
19756
+ page_token,
19757
+ // @ts-ignore
19758
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19759
+ yield yield __await(rest);
19760
+ hasMore = Boolean(has_more);
19761
+ pageToken = page_token || next_page_token;
19762
+ }
19763
+ catch (e) {
19764
+ yield yield __await(null);
19765
+ break;
19766
+ }
19767
+ }
19768
+ });
19769
+ },
19770
+ };
19771
+ return Iterable;
19772
+ }),
19773
+ /**
19774
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=query&version=v1 click to debug }
19775
+ *
19776
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=lump_sum_payment&version=v1 document }
19777
+ */
19778
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19779
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19780
+ return this.httpInstance
19781
+ .request({
19782
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query`, path),
19783
+ method: "POST",
19784
+ data,
19785
+ params,
19786
+ headers,
19787
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19788
+ })
19789
+ .catch((e) => {
19790
+ this.logger.error(formatErrors(e));
19791
+ throw e;
19792
+ });
19793
+ }),
19794
+ queryDetailWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19795
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19796
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19797
+ const res = yield this.httpInstance
19798
+ .request({
19799
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`, path),
19800
+ method: "POST",
19801
+ headers: pickBy(innerPayload.headers, identity),
19802
+ params: pickBy(innerPayload.params, identity),
19803
+ data,
19804
+ paramsSerializer: (params) => stringify(params, {
19805
+ arrayFormat: "repeat",
19806
+ }),
19807
+ })
19808
+ .catch((e) => {
19809
+ this.logger.error(formatErrors(e));
19810
+ });
19811
+ return res;
19812
+ });
19813
+ const Iterable = {
19814
+ [Symbol.asyncIterator]() {
19815
+ return __asyncGenerator(this, arguments, function* _a() {
19816
+ let hasMore = true;
19817
+ let pageToken;
19818
+ while (hasMore) {
19819
+ try {
19820
+ const res = yield __await(sendRequest({
19821
+ headers,
19822
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19823
+ data,
19824
+ }));
19825
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
19826
+ // @ts-ignore
19827
+ has_more,
19828
+ // @ts-ignore
19829
+ page_token,
19830
+ // @ts-ignore
19831
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19832
+ yield yield __await(rest);
19833
+ hasMore = Boolean(has_more);
19834
+ pageToken = page_token || next_page_token;
19835
+ }
19836
+ catch (e) {
19837
+ yield yield __await(null);
19838
+ break;
19839
+ }
19840
+ }
19841
+ });
19842
+ },
19843
+ };
19844
+ return Iterable;
19845
+ }),
19846
+ /**
19847
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=lump_sum_payment&apiName=query_detail&version=v1 click to debug }
19848
+ *
19849
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_detail&project=compensation&resource=lump_sum_payment&version=v1 document }
19850
+ */
19851
+ queryDetail: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19852
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19853
+ return this.httpInstance
19854
+ .request({
19855
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/lump_sum_payment/query_detail`, path),
19856
+ method: "POST",
19857
+ data,
19858
+ params,
19859
+ headers,
19860
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19861
+ })
19862
+ .catch((e) => {
19863
+ this.logger.error(formatErrors(e));
19864
+ throw e;
19865
+ });
19866
+ }),
19867
+ },
19393
19868
  /**
19394
19869
  * plan
19395
19870
  */
@@ -19468,6 +19943,342 @@ class Client$Q extends Client$R {
19468
19943
  });
19469
19944
  }),
19470
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
+ },
19471
20282
  },
19472
20283
  };
19473
20284
  }
@@ -30259,6 +31070,29 @@ class Client$M extends Client$N {
30259
31070
  throw e;
30260
31071
  });
30261
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
+ }),
30262
31096
  },
30263
31097
  /**
30264
31098
  * approver
@@ -32446,6 +33280,34 @@ class Client$M extends Client$N {
32446
33280
  });
32447
33281
  }),
32448
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
+ },
32449
33311
  /**
32450
33312
  * employee
32451
33313
  */
@@ -32966,18 +33828,18 @@ class Client$M extends Client$N {
32966
33828
  */
32967
33829
  job: {
32968
33830
  /**
32969
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v2 click to debug }
33831
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=batch_get&version=v2 click to debug }
32970
33832
  *
32971
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=job&version=v2 document }
33833
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job&version=v2 document }
32972
33834
  *
32973
- * 根据 ID 查询单个职务。
33835
+ * 批量获取职务信息
32974
33836
  */
32975
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33837
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
32976
33838
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
32977
33839
  return this.httpInstance
32978
33840
  .request({
32979
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`, path),
32980
- method: "GET",
33841
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/batch_get`, path),
33842
+ method: "POST",
32981
33843
  data,
32982
33844
  params,
32983
33845
  headers,
@@ -32989,90 +33851,17 @@ class Client$M extends Client$N {
32989
33851
  });
32990
33852
  }),
32991
33853
  /**
32992
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v2 click to debug }
32993
- *
32994
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
33854
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v2 click to debug }
32995
33855
  *
32996
- * 分页查询职务数据
32997
- */
32998
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
32999
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
33000
- return this.httpInstance
33001
- .request({
33002
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path),
33003
- method: "GET",
33004
- data,
33005
- params,
33006
- headers,
33007
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
33008
- })
33009
- .catch((e) => {
33010
- this.logger.error(formatErrors(e));
33011
- throw e;
33012
- });
33013
- }),
33014
- queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33015
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
33016
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
33017
- const res = yield this.httpInstance
33018
- .request({
33019
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
33020
- method: "GET",
33021
- headers: pickBy(innerPayload.headers, identity),
33022
- params: pickBy(innerPayload.params, identity),
33023
- data,
33024
- paramsSerializer: (params) => stringify(params, {
33025
- arrayFormat: "repeat",
33026
- }),
33027
- })
33028
- .catch((e) => {
33029
- this.logger.error(formatErrors(e));
33030
- });
33031
- return res;
33032
- });
33033
- const Iterable = {
33034
- [Symbol.asyncIterator]() {
33035
- return __asyncGenerator(this, arguments, function* _a() {
33036
- let hasMore = true;
33037
- let pageToken;
33038
- while (hasMore) {
33039
- try {
33040
- const res = yield __await(sendRequest({
33041
- headers,
33042
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
33043
- data,
33044
- }));
33045
- const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
33046
- // @ts-ignore
33047
- has_more,
33048
- // @ts-ignore
33049
- page_token,
33050
- // @ts-ignore
33051
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
33052
- yield yield __await(rest);
33053
- hasMore = Boolean(has_more);
33054
- pageToken = page_token || next_page_token;
33055
- }
33056
- catch (e) {
33057
- yield yield __await(null);
33058
- break;
33059
- }
33060
- }
33061
- });
33062
- },
33063
- };
33064
- return Iterable;
33065
- }),
33066
- /**
33067
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_recent_change&version=v2 click to debug }
33856
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=job&version=v2 document }
33068
33857
  *
33069
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job&version=v2 document }
33858
+ * 根据 ID 查询单个职务。
33070
33859
  */
33071
- queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33860
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33072
33861
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
33073
33862
  return this.httpInstance
33074
33863
  .request({
33075
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
33864
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`, path),
33076
33865
  method: "GET",
33077
33866
  data,
33078
33867
  params,
@@ -33084,118 +33873,19 @@ class Client$M extends Client$N {
33084
33873
  throw e;
33085
33874
  });
33086
33875
  }),
33087
- },
33088
- /**
33089
- * job_change
33090
- */
33091
- jobChange: {
33092
- /**
33093
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v2 click to debug }
33094
- *
33095
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_change&version=v2 document }
33096
- */
33097
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33098
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
33099
- return this.httpInstance
33100
- .request({
33101
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes`, path),
33102
- method: "POST",
33103
- data,
33104
- params,
33105
- headers,
33106
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
33107
- })
33108
- .catch((e) => {
33109
- this.logger.error(formatErrors(e));
33110
- throw e;
33111
- });
33112
- }),
33113
- /**
33114
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=revoke&version=v2 click to debug }
33115
- *
33116
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=revoke&project=corehr&resource=job_change&version=v2 document }
33117
- */
33118
- revoke: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33119
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
33120
- return this.httpInstance
33121
- .request({
33122
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`, path),
33123
- method: "POST",
33124
- data,
33125
- params,
33126
- headers,
33127
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
33128
- })
33129
- .catch((e) => {
33130
- this.logger.error(formatErrors(e));
33131
- throw e;
33132
- });
33133
- }),
33134
- searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33135
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
33136
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
33137
- const res = yield this.httpInstance
33138
- .request({
33139
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
33140
- method: "POST",
33141
- headers: pickBy(innerPayload.headers, identity),
33142
- params: pickBy(innerPayload.params, identity),
33143
- data,
33144
- paramsSerializer: (params) => stringify(params, {
33145
- arrayFormat: "repeat",
33146
- }),
33147
- })
33148
- .catch((e) => {
33149
- this.logger.error(formatErrors(e));
33150
- });
33151
- return res;
33152
- });
33153
- const Iterable = {
33154
- [Symbol.asyncIterator]() {
33155
- return __asyncGenerator(this, arguments, function* _a() {
33156
- let hasMore = true;
33157
- let pageToken;
33158
- while (hasMore) {
33159
- try {
33160
- const res = yield __await(sendRequest({
33161
- headers,
33162
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
33163
- data,
33164
- }));
33165
- const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
33166
- // @ts-ignore
33167
- has_more,
33168
- // @ts-ignore
33169
- page_token,
33170
- // @ts-ignore
33171
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
33172
- yield yield __await(rest);
33173
- hasMore = Boolean(has_more);
33174
- pageToken = page_token || next_page_token;
33175
- }
33176
- catch (e) {
33177
- yield yield __await(null);
33178
- break;
33179
- }
33180
- }
33181
- });
33182
- },
33183
- };
33184
- return Iterable;
33185
- }),
33186
33876
  /**
33187
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
33877
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v2 click to debug }
33188
33878
  *
33189
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
33879
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
33190
33880
  *
33191
- * 获取员工异动列表
33881
+ * 分页查询职务数据
33192
33882
  */
33193
- search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33883
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33194
33884
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
33195
33885
  return this.httpInstance
33196
33886
  .request({
33197
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
33198
- method: "POST",
33887
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path),
33888
+ method: "GET",
33199
33889
  data,
33200
33890
  params,
33201
33891
  headers,
@@ -33206,23 +33896,18 @@ class Client$M extends Client$N {
33206
33896
  throw e;
33207
33897
  });
33208
33898
  }),
33209
- },
33210
- /**
33211
- * job_family
33212
- */
33213
- jobFamily: {
33214
33899
  /**
33215
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=batch_get&version=v2 click to debug }
33900
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_multi_timeline&version=v2 click to debug }
33216
33901
  *
33217
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
33902
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=job&version=v2 document }
33218
33903
  *
33219
- * 批量获取序列信息
33904
+ * 查询生效时间在指定时间范围的职务
33220
33905
  */
33221
- batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33906
+ queryMultiTimeline: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33222
33907
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
33223
33908
  return this.httpInstance
33224
33909
  .request({
33225
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`, path),
33910
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_multi_timeline`, path),
33226
33911
  method: "POST",
33227
33912
  data,
33228
33913
  params,
@@ -33239,7 +33924,253 @@ class Client$M extends Client$N {
33239
33924
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
33240
33925
  const res = yield this.httpInstance
33241
33926
  .request({
33242
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`, path),
33927
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
33928
+ method: "GET",
33929
+ headers: pickBy(innerPayload.headers, identity),
33930
+ params: pickBy(innerPayload.params, identity),
33931
+ data,
33932
+ paramsSerializer: (params) => stringify(params, {
33933
+ arrayFormat: "repeat",
33934
+ }),
33935
+ })
33936
+ .catch((e) => {
33937
+ this.logger.error(formatErrors(e));
33938
+ });
33939
+ return res;
33940
+ });
33941
+ const Iterable = {
33942
+ [Symbol.asyncIterator]() {
33943
+ return __asyncGenerator(this, arguments, function* _a() {
33944
+ let hasMore = true;
33945
+ let pageToken;
33946
+ while (hasMore) {
33947
+ try {
33948
+ const res = yield __await(sendRequest({
33949
+ headers,
33950
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
33951
+ data,
33952
+ }));
33953
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
33954
+ // @ts-ignore
33955
+ has_more,
33956
+ // @ts-ignore
33957
+ page_token,
33958
+ // @ts-ignore
33959
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
33960
+ yield yield __await(rest);
33961
+ hasMore = Boolean(has_more);
33962
+ pageToken = page_token || next_page_token;
33963
+ }
33964
+ catch (e) {
33965
+ yield yield __await(null);
33966
+ break;
33967
+ }
33968
+ }
33969
+ });
33970
+ },
33971
+ };
33972
+ return Iterable;
33973
+ }),
33974
+ /**
33975
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=query_recent_change&version=v2 click to debug }
33976
+ *
33977
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=job&version=v2 document }
33978
+ */
33979
+ queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33980
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33981
+ return this.httpInstance
33982
+ .request({
33983
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/query_recent_change`, path),
33984
+ method: "GET",
33985
+ data,
33986
+ params,
33987
+ headers,
33988
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
33989
+ })
33990
+ .catch((e) => {
33991
+ this.logger.error(formatErrors(e));
33992
+ throw e;
33993
+ });
33994
+ }),
33995
+ },
33996
+ /**
33997
+ * job_change
33998
+ */
33999
+ jobChange: {
34000
+ /**
34001
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=create&version=v2 click to debug }
34002
+ *
34003
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=job_change&version=v2 document }
34004
+ */
34005
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34006
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34007
+ return this.httpInstance
34008
+ .request({
34009
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes`, path),
34010
+ method: "POST",
34011
+ data,
34012
+ params,
34013
+ headers,
34014
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34015
+ })
34016
+ .catch((e) => {
34017
+ this.logger.error(formatErrors(e));
34018
+ throw e;
34019
+ });
34020
+ }),
34021
+ /**
34022
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=revoke&version=v2 click to debug }
34023
+ *
34024
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=revoke&project=corehr&resource=job_change&version=v2 document }
34025
+ */
34026
+ revoke: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34027
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34028
+ return this.httpInstance
34029
+ .request({
34030
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/:job_change_id/revoke`, path),
34031
+ method: "POST",
34032
+ data,
34033
+ params,
34034
+ headers,
34035
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34036
+ })
34037
+ .catch((e) => {
34038
+ this.logger.error(formatErrors(e));
34039
+ throw e;
34040
+ });
34041
+ }),
34042
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34043
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34044
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34045
+ const res = yield this.httpInstance
34046
+ .request({
34047
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
34048
+ method: "POST",
34049
+ headers: pickBy(innerPayload.headers, identity),
34050
+ params: pickBy(innerPayload.params, identity),
34051
+ data,
34052
+ paramsSerializer: (params) => stringify(params, {
34053
+ arrayFormat: "repeat",
34054
+ }),
34055
+ })
34056
+ .catch((e) => {
34057
+ this.logger.error(formatErrors(e));
34058
+ });
34059
+ return res;
34060
+ });
34061
+ const Iterable = {
34062
+ [Symbol.asyncIterator]() {
34063
+ return __asyncGenerator(this, arguments, function* _a() {
34064
+ let hasMore = true;
34065
+ let pageToken;
34066
+ while (hasMore) {
34067
+ try {
34068
+ const res = yield __await(sendRequest({
34069
+ headers,
34070
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
34071
+ data,
34072
+ }));
34073
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
34074
+ // @ts-ignore
34075
+ has_more,
34076
+ // @ts-ignore
34077
+ page_token,
34078
+ // @ts-ignore
34079
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
34080
+ yield yield __await(rest);
34081
+ hasMore = Boolean(has_more);
34082
+ pageToken = page_token || next_page_token;
34083
+ }
34084
+ catch (e) {
34085
+ yield yield __await(null);
34086
+ break;
34087
+ }
34088
+ }
34089
+ });
34090
+ },
34091
+ };
34092
+ return Iterable;
34093
+ }),
34094
+ /**
34095
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
34096
+ *
34097
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
34098
+ *
34099
+ * 获取员工异动列表
34100
+ */
34101
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34102
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34103
+ return this.httpInstance
34104
+ .request({
34105
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
34106
+ method: "POST",
34107
+ data,
34108
+ params,
34109
+ headers,
34110
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34111
+ })
34112
+ .catch((e) => {
34113
+ this.logger.error(formatErrors(e));
34114
+ throw e;
34115
+ });
34116
+ }),
34117
+ },
34118
+ /**
34119
+ * job_family
34120
+ */
34121
+ jobFamily: {
34122
+ /**
34123
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=batch_get&version=v2 click to debug }
34124
+ *
34125
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
34126
+ *
34127
+ * 批量获取序列信息
34128
+ */
34129
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34130
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34131
+ return this.httpInstance
34132
+ .request({
34133
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`, path),
34134
+ method: "POST",
34135
+ data,
34136
+ params,
34137
+ headers,
34138
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34139
+ })
34140
+ .catch((e) => {
34141
+ this.logger.error(formatErrors(e));
34142
+ throw e;
34143
+ });
34144
+ }),
34145
+ /**
34146
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=query_multi_timeline&version=v2 click to debug }
34147
+ *
34148
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_multi_timeline&project=corehr&resource=job_family&version=v2 document }
34149
+ *
34150
+ * 查询生效时间在指定时间范围的序列
34151
+ */
34152
+ queryMultiTimeline: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34153
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34154
+ return this.httpInstance
34155
+ .request({
34156
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_multi_timeline`, path),
34157
+ method: "POST",
34158
+ data,
34159
+ params,
34160
+ headers,
34161
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34162
+ })
34163
+ .catch((e) => {
34164
+ this.logger.error(formatErrors(e));
34165
+ throw e;
34166
+ });
34167
+ }),
34168
+ queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34169
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34170
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34171
+ const res = yield this.httpInstance
34172
+ .request({
34173
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/query_recent_change`, path),
33243
34174
  method: "GET",
33244
34175
  headers: pickBy(innerPayload.headers, identity),
33245
34176
  params: pickBy(innerPayload.params, identity),
@@ -33872,6 +34803,126 @@ class Client$M extends Client$N {
33872
34803
  });
33873
34804
  }),
33874
34805
  },
34806
+ /**
34807
+ * pathway
34808
+ */
34809
+ pathway: {
34810
+ /**
34811
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=active&version=v2 click to debug }
34812
+ *
34813
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=pathway&version=v2 document }
34814
+ *
34815
+ * 启/停用通道
34816
+ */
34817
+ active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34818
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34819
+ return this.httpInstance
34820
+ .request({
34821
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/active`, path),
34822
+ method: "POST",
34823
+ data,
34824
+ params,
34825
+ headers,
34826
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34827
+ })
34828
+ .catch((e) => {
34829
+ this.logger.error(formatErrors(e));
34830
+ throw e;
34831
+ });
34832
+ }),
34833
+ /**
34834
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=batch_get&version=v2 click to debug }
34835
+ *
34836
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=pathway&version=v2 document }
34837
+ *
34838
+ * 通过通道 ID 批量获取通道信息
34839
+ */
34840
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34841
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34842
+ return this.httpInstance
34843
+ .request({
34844
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/batch_get`, path),
34845
+ method: "POST",
34846
+ data,
34847
+ params,
34848
+ headers,
34849
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34850
+ })
34851
+ .catch((e) => {
34852
+ this.logger.error(formatErrors(e));
34853
+ throw e;
34854
+ });
34855
+ }),
34856
+ /**
34857
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=create&version=v2 click to debug }
34858
+ *
34859
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=pathway&version=v2 document }
34860
+ *
34861
+ * 创建通道
34862
+ */
34863
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34864
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34865
+ return this.httpInstance
34866
+ .request({
34867
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways`, path),
34868
+ method: "POST",
34869
+ data,
34870
+ params,
34871
+ headers,
34872
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34873
+ })
34874
+ .catch((e) => {
34875
+ this.logger.error(formatErrors(e));
34876
+ throw e;
34877
+ });
34878
+ }),
34879
+ /**
34880
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=delete&version=v2 click to debug }
34881
+ *
34882
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pathway&version=v2 document }
34883
+ *
34884
+ * 删除通道
34885
+ */
34886
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34887
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34888
+ return this.httpInstance
34889
+ .request({
34890
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`, path),
34891
+ method: "DELETE",
34892
+ data,
34893
+ params,
34894
+ headers,
34895
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34896
+ })
34897
+ .catch((e) => {
34898
+ this.logger.error(formatErrors(e));
34899
+ throw e;
34900
+ });
34901
+ }),
34902
+ /**
34903
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pathway&apiName=patch&version=v2 click to debug }
34904
+ *
34905
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pathway&version=v2 document }
34906
+ *
34907
+ * 更新通道信息
34908
+ */
34909
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34910
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34911
+ return this.httpInstance
34912
+ .request({
34913
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pathways/:pathway_id`, path),
34914
+ method: "PATCH",
34915
+ data,
34916
+ params,
34917
+ headers,
34918
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34919
+ })
34920
+ .catch((e) => {
34921
+ this.logger.error(formatErrors(e));
34922
+ throw e;
34923
+ });
34924
+ }),
34925
+ },
33875
34926
  /**
33876
34927
  * person
33877
34928
  */
@@ -33922,21 +34973,21 @@ class Client$M extends Client$N {
33922
34973
  }),
33923
34974
  },
33924
34975
  /**
33925
- * 待入职
34976
+ * position
33926
34977
  */
33927
- preHire: {
34978
+ position: {
33928
34979
  /**
33929
- * {@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 }
33930
34981
  *
33931
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
34982
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=active&project=corehr&resource=position&version=v2 document }
33932
34983
  *
33933
- * 完成入职
34984
+ * 启/停用岗位
33934
34985
  */
33935
- complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34986
+ active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33936
34987
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
33937
34988
  return this.httpInstance
33938
34989
  .request({
33939
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
34990
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/active`, path),
33940
34991
  method: "POST",
33941
34992
  data,
33942
34993
  params,
@@ -33949,19 +35000,15 @@ class Client$M extends Client$N {
33949
35000
  });
33950
35001
  }),
33951
35002
  /**
33952
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
33953
- *
33954
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
35003
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=create&version=v2 click to debug }
33955
35004
  *
33956
- * 创建待入职人员
33957
- *
33958
- * 创建待入职人员
35005
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=position&version=v2 document }
33959
35006
  */
33960
35007
  create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33961
35008
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
33962
35009
  return this.httpInstance
33963
35010
  .request({
33964
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
35011
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions`, path),
33965
35012
  method: "POST",
33966
35013
  data,
33967
35014
  params,
@@ -33974,18 +35021,18 @@ class Client$M extends Client$N {
33974
35021
  });
33975
35022
  }),
33976
35023
  /**
33977
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
35024
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=del_position&version=v2 click to debug }
33978
35025
  *
33979
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
35026
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=del_position&project=corehr&resource=position&version=v2 document }
33980
35027
  *
33981
- * 删除待入职
35028
+ * 删除岗位
33982
35029
  */
33983
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35030
+ delPosition: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33984
35031
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
33985
35032
  return this.httpInstance
33986
35033
  .request({
33987
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
33988
- method: "DELETE",
35034
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/del_position`, path),
35035
+ method: "POST",
33989
35036
  data,
33990
35037
  params,
33991
35038
  headers,
@@ -33997,17 +35044,17 @@ class Client$M extends Client$N {
33997
35044
  });
33998
35045
  }),
33999
35046
  /**
34000
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
35047
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=patch&version=v2 click to debug }
34001
35048
  *
34002
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
35049
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=position&version=v2 document }
34003
35050
  *
34004
- * 更新待入职
35051
+ * 更新岗位
34005
35052
  */
34006
35053
  patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34007
35054
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34008
35055
  return this.httpInstance
34009
35056
  .request({
34010
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
35057
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/:position_id`, path),
34011
35058
  method: "PATCH",
34012
35059
  data,
34013
35060
  params,
@@ -34019,13 +35066,208 @@ class Client$M extends Client$N {
34019
35066
  throw e;
34020
35067
  });
34021
35068
  }),
34022
- queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35069
+ /**
35070
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
35071
+ *
35072
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
35073
+ *
35074
+ * 查询岗位信息
35075
+ */
35076
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35077
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35078
+ return this.httpInstance
35079
+ .request({
35080
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
35081
+ method: "POST",
35082
+ data,
35083
+ params,
35084
+ headers,
35085
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35086
+ })
35087
+ .catch((e) => {
35088
+ this.logger.error(formatErrors(e));
35089
+ throw e;
35090
+ });
35091
+ }),
35092
+ queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34023
35093
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34024
35094
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34025
35095
  const res = yield this.httpInstance
34026
35096
  .request({
34027
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
34028
- method: "POST",
35097
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
35098
+ method: "GET",
35099
+ headers: pickBy(innerPayload.headers, identity),
35100
+ params: pickBy(innerPayload.params, identity),
35101
+ data,
35102
+ paramsSerializer: (params) => stringify(params, {
35103
+ arrayFormat: "repeat",
35104
+ }),
35105
+ })
35106
+ .catch((e) => {
35107
+ this.logger.error(formatErrors(e));
35108
+ });
35109
+ return res;
35110
+ });
35111
+ const Iterable = {
35112
+ [Symbol.asyncIterator]() {
35113
+ return __asyncGenerator(this, arguments, function* _a() {
35114
+ let hasMore = true;
35115
+ let pageToken;
35116
+ while (hasMore) {
35117
+ try {
35118
+ const res = yield __await(sendRequest({
35119
+ headers,
35120
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
35121
+ data,
35122
+ }));
35123
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
35124
+ // @ts-ignore
35125
+ has_more,
35126
+ // @ts-ignore
35127
+ page_token,
35128
+ // @ts-ignore
35129
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
35130
+ yield yield __await(rest);
35131
+ hasMore = Boolean(has_more);
35132
+ pageToken = page_token || next_page_token;
35133
+ }
35134
+ catch (e) {
35135
+ yield yield __await(null);
35136
+ break;
35137
+ }
35138
+ }
35139
+ });
35140
+ },
35141
+ };
35142
+ return Iterable;
35143
+ }),
35144
+ /**
35145
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query_recent_change&version=v2 click to debug }
35146
+ *
35147
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=position&version=v2 document }
35148
+ */
35149
+ queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35150
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35151
+ return this.httpInstance
35152
+ .request({
35153
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
35154
+ method: "GET",
35155
+ data,
35156
+ params,
35157
+ headers,
35158
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35159
+ })
35160
+ .catch((e) => {
35161
+ this.logger.error(formatErrors(e));
35162
+ throw e;
35163
+ });
35164
+ }),
35165
+ },
35166
+ /**
35167
+ * 待入职
35168
+ */
35169
+ preHire: {
35170
+ /**
35171
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
35172
+ *
35173
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
35174
+ *
35175
+ * 完成入职
35176
+ */
35177
+ complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35178
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35179
+ return this.httpInstance
35180
+ .request({
35181
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
35182
+ method: "POST",
35183
+ data,
35184
+ params,
35185
+ headers,
35186
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35187
+ })
35188
+ .catch((e) => {
35189
+ this.logger.error(formatErrors(e));
35190
+ throw e;
35191
+ });
35192
+ }),
35193
+ /**
35194
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
35195
+ *
35196
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
35197
+ *
35198
+ * 创建待入职人员
35199
+ *
35200
+ * 创建待入职人员
35201
+ */
35202
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35203
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35204
+ return this.httpInstance
35205
+ .request({
35206
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
35207
+ method: "POST",
35208
+ data,
35209
+ params,
35210
+ headers,
35211
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35212
+ })
35213
+ .catch((e) => {
35214
+ this.logger.error(formatErrors(e));
35215
+ throw e;
35216
+ });
35217
+ }),
35218
+ /**
35219
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
35220
+ *
35221
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
35222
+ *
35223
+ * 删除待入职
35224
+ */
35225
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35226
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35227
+ return this.httpInstance
35228
+ .request({
35229
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
35230
+ method: "DELETE",
35231
+ data,
35232
+ params,
35233
+ headers,
35234
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35235
+ })
35236
+ .catch((e) => {
35237
+ this.logger.error(formatErrors(e));
35238
+ throw e;
35239
+ });
35240
+ }),
35241
+ /**
35242
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
35243
+ *
35244
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
35245
+ *
35246
+ * 更新待入职
35247
+ */
35248
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35249
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35250
+ return this.httpInstance
35251
+ .request({
35252
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
35253
+ method: "PATCH",
35254
+ data,
35255
+ params,
35256
+ headers,
35257
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35258
+ })
35259
+ .catch((e) => {
35260
+ this.logger.error(formatErrors(e));
35261
+ throw e;
35262
+ });
35263
+ }),
35264
+ queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35265
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35266
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
35267
+ const res = yield this.httpInstance
35268
+ .request({
35269
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
35270
+ method: "POST",
34029
35271
  headers: pickBy(innerPayload.headers, identity),
34030
35272
  params: pickBy(innerPayload.params, identity),
34031
35273
  data,
@@ -34190,6 +35432,29 @@ class Client$M extends Client$N {
34190
35432
  throw e;
34191
35433
  });
34192
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
+ }),
34193
35458
  /**
34194
35459
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
34195
35460
  *
@@ -34496,6 +35761,126 @@ class Client$M extends Client$N {
34496
35761
  });
34497
35762
  }),
34498
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
+ },
34499
35884
  /**
34500
35885
  * process.form_variable_data
34501
35886
  */
@@ -34523,19 +35908,250 @@ class Client$M extends Client$N {
34523
35908
  }),
34524
35909
  },
34525
35910
  /**
34526
- * process
35911
+ * process.transfer
34527
35912
  */
34528
- process: {
35913
+ processTransfer: {
34529
35914
  /**
34530
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=get&version=v2 click to debug }
35915
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.transfer&apiName=update&version=v2 click to debug }
34531
35916
  *
34532
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process&version=v2 document }
35917
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.transfer&version=v2 document }
34533
35918
  */
34534
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35919
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34535
35920
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34536
35921
  return this.httpInstance
34537
35922
  .request({
34538
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id`, path),
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",
36028
+ data,
36029
+ params,
36030
+ headers,
36031
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36032
+ })
36033
+ .catch((e) => {
36034
+ this.logger.error(formatErrors(e));
36035
+ throw e;
36036
+ });
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
+ }),
36093
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36094
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36095
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
36096
+ const res = yield this.httpInstance
36097
+ .request({
36098
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files`, path),
36099
+ method: "GET",
36100
+ headers: pickBy(innerPayload.headers, identity),
36101
+ params: pickBy(innerPayload.params, identity),
36102
+ data,
36103
+ paramsSerializer: (params) => stringify(params, {
36104
+ arrayFormat: "repeat",
36105
+ }),
36106
+ })
36107
+ .catch((e) => {
36108
+ this.logger.error(formatErrors(e));
36109
+ });
36110
+ return res;
36111
+ });
36112
+ const Iterable = {
36113
+ [Symbol.asyncIterator]() {
36114
+ return __asyncGenerator(this, arguments, function* _a() {
36115
+ let hasMore = true;
36116
+ let pageToken;
36117
+ while (hasMore) {
36118
+ try {
36119
+ const res = yield __await(sendRequest({
36120
+ headers,
36121
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
36122
+ data,
36123
+ }));
36124
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
36125
+ // @ts-ignore
36126
+ has_more,
36127
+ // @ts-ignore
36128
+ page_token,
36129
+ // @ts-ignore
36130
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
36131
+ yield yield __await(rest);
36132
+ hasMore = Boolean(has_more);
36133
+ pageToken = page_token || next_page_token;
36134
+ }
36135
+ catch (e) {
36136
+ yield yield __await(null);
36137
+ break;
36138
+ }
36139
+ }
36140
+ });
36141
+ },
36142
+ };
36143
+ return Iterable;
36144
+ }),
36145
+ /**
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),
34539
36155
  method: "GET",
34540
36156
  data,
34541
36157
  params,
@@ -34547,12 +36163,184 @@ class Client$M extends Client$N {
34547
36163
  throw e;
34548
36164
  });
34549
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 }
36241
+ *
36242
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=signature_file&version=v2 document }
36243
+ */
36244
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36245
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36246
+ return this.httpInstance
36247
+ .request({
36248
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
36249
+ method: "POST",
36250
+ data,
36251
+ params,
36252
+ headers,
36253
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36254
+ })
36255
+ .catch((e) => {
36256
+ this.logger.error(formatErrors(e));
36257
+ throw e;
36258
+ });
36259
+ }),
36260
+ /**
36261
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=terminate&version=v2 click to debug }
36262
+ *
36263
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=terminate&project=corehr&resource=signature_file&version=v2 document }
36264
+ */
36265
+ terminate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36266
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36267
+ return this.httpInstance
36268
+ .request({
36269
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/terminate`, path),
36270
+ method: "POST",
36271
+ data,
36272
+ params,
36273
+ headers,
36274
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36275
+ })
36276
+ .catch((e) => {
36277
+ this.logger.error(formatErrors(e));
36278
+ throw e;
36279
+ });
36280
+ }),
36281
+ },
36282
+ /**
36283
+ * signature_node
36284
+ */
36285
+ signatureNode: {
36286
+ /**
36287
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_node&apiName=list_by_file_id&version=v2 click to debug }
36288
+ *
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 }
36290
+ */
36291
+ listByFileId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36292
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36293
+ return this.httpInstance
36294
+ .request({
36295
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_nodes/list_by_file_id`, path),
36296
+ method: "GET",
36297
+ data,
36298
+ params,
36299
+ headers,
36300
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36301
+ })
36302
+ .catch((e) => {
36303
+ this.logger.error(formatErrors(e));
36304
+ throw e;
36305
+ });
36306
+ }),
36307
+ },
36308
+ /**
36309
+ * signature_template
36310
+ */
36311
+ signatureTemplate: {
36312
+ /**
36313
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template&apiName=search&version=v2 click to debug }
36314
+ *
36315
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=signature_template&version=v2 document }
36316
+ */
36317
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36318
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36319
+ return this.httpInstance
36320
+ .request({
36321
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_templates/search`, path),
36322
+ method: "GET",
36323
+ data,
36324
+ params,
36325
+ headers,
36326
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36327
+ })
36328
+ .catch((e) => {
36329
+ this.logger.error(formatErrors(e));
36330
+ throw e;
36331
+ });
36332
+ }),
36333
+ },
36334
+ /**
36335
+ * signature_template_info_with_thumbnail
36336
+ */
36337
+ signatureTemplateInfoWithThumbnail: {
34550
36338
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34551
36339
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34552
36340
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34553
36341
  const res = yield this.httpInstance
34554
36342
  .request({
34555
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
36343
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
34556
36344
  method: "GET",
34557
36345
  headers: pickBy(innerPayload.headers, identity),
34558
36346
  params: pickBy(innerPayload.params, identity),
@@ -34600,15 +36388,15 @@ class Client$M extends Client$N {
34600
36388
  return Iterable;
34601
36389
  }),
34602
36390
  /**
34603
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=list&version=v2 click to debug }
36391
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template_info_with_thumbnail&apiName=list&version=v2 click to debug }
34604
36392
  *
34605
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=process&version=v2 document }
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 }
34606
36394
  */
34607
36395
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34608
36396
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34609
36397
  return this.httpInstance
34610
36398
  .request({
34611
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes`, path),
36399
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
34612
36400
  method: "GET",
34613
36401
  data,
34614
36402
  params,
@@ -34621,135 +36409,6 @@ class Client$M extends Client$N {
34621
36409
  });
34622
36410
  }),
34623
36411
  },
34624
- /**
34625
- * process.transfer
34626
- */
34627
- processTransfer: {
34628
- /**
34629
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.transfer&apiName=update&version=v2 click to debug }
34630
- *
34631
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process.transfer&version=v2 document }
34632
- */
34633
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34634
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34635
- return this.httpInstance
34636
- .request({
34637
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/transfer`, path),
34638
- method: "PUT",
34639
- data,
34640
- params,
34641
- headers,
34642
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34643
- })
34644
- .catch((e) => {
34645
- this.logger.error(formatErrors(e));
34646
- throw e;
34647
- });
34648
- }),
34649
- },
34650
- /**
34651
- * process_revoke
34652
- */
34653
- processRevoke: {
34654
- /**
34655
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_revoke&apiName=update&version=v2 click to debug }
34656
- *
34657
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_revoke&version=v2 document }
34658
- */
34659
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34660
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34661
- return this.httpInstance
34662
- .request({
34663
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_revoke/:process_id`, path),
34664
- method: "PUT",
34665
- data,
34666
- params,
34667
- headers,
34668
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34669
- })
34670
- .catch((e) => {
34671
- this.logger.error(formatErrors(e));
34672
- throw e;
34673
- });
34674
- }),
34675
- },
34676
- /**
34677
- * process_withdraw
34678
- */
34679
- processWithdraw: {
34680
- /**
34681
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process_withdraw&apiName=update&version=v2 click to debug }
34682
- *
34683
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=corehr&resource=process_withdraw&version=v2 document }
34684
- */
34685
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34686
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34687
- return this.httpInstance
34688
- .request({
34689
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/process_withdraw/:process_id`, path),
34690
- method: "PUT",
34691
- data,
34692
- params,
34693
- headers,
34694
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34695
- })
34696
- .catch((e) => {
34697
- this.logger.error(formatErrors(e));
34698
- throw e;
34699
- });
34700
- }),
34701
- },
34702
- /**
34703
- * report_detail_row
34704
- */
34705
- reportDetailRow: {
34706
- /**
34707
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchDelete&version=v2 click to debug }
34708
- *
34709
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchDelete&project=corehr&resource=report_detail_row&version=v2 document }
34710
- *
34711
- * 批量删除填报行
34712
- */
34713
- batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34714
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34715
- return this.httpInstance
34716
- .request({
34717
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchDelete`, path),
34718
- method: "POST",
34719
- data,
34720
- params,
34721
- headers,
34722
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34723
- })
34724
- .catch((e) => {
34725
- this.logger.error(formatErrors(e));
34726
- throw e;
34727
- });
34728
- }),
34729
- /**
34730
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=report_detail_row&apiName=batchSave&version=v2 click to debug }
34731
- *
34732
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batchSave&project=corehr&resource=report_detail_row&version=v2 document }
34733
- *
34734
- * 批量创建/更新填报行
34735
- */
34736
- batchSave: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34737
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34738
- return this.httpInstance
34739
- .request({
34740
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/report_detail_row/batchSave`, path),
34741
- method: "POST",
34742
- data,
34743
- params,
34744
- headers,
34745
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34746
- })
34747
- .catch((e) => {
34748
- this.logger.error(formatErrors(e));
34749
- throw e;
34750
- });
34751
- }),
34752
- },
34753
36412
  /**
34754
36413
  * workforce_plan
34755
36414
  */
@@ -37980,7 +39639,7 @@ class Client$G extends Client$H {
37980
39639
  }),
37981
39640
  },
37982
39641
  /**
37983
- * 文件夹
39642
+ * 事件
37984
39643
  */
37985
39644
  file: {
37986
39645
  /**
@@ -39806,7 +41465,7 @@ class Client$G extends Client$H {
39806
41465
  }),
39807
41466
  },
39808
41467
  /**
39809
- * 文件夹
41468
+ * 事件
39810
41469
  */
39811
41470
  file: {
39812
41471
  /**
@@ -45502,6 +47161,27 @@ class Client$x extends Client$y {
45502
47161
  * 背调 (灰度租户可见)
45503
47162
  */
45504
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
+ }),
45505
47185
  /**
45506
47186
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
45507
47187
  *
@@ -48751,6 +50431,36 @@ class Client$x extends Client$y {
48751
50431
  });
48752
50432
  }),
48753
50433
  },
50434
+ /**
50435
+ * Offer 审批流配置(灰度租户可见)
50436
+ */
50437
+ offerApprovalTemplate: {
50438
+ /**
50439
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_approval_template&apiName=list&version=v1 click to debug }
50440
+ *
50441
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_approval_template/list document }
50442
+ *
50443
+ * 获取 Offer 审批流配置列表
50444
+ *
50445
+ * 获取 Offer 审批流配置列表
50446
+ */
50447
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50448
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50449
+ return this.httpInstance
50450
+ .request({
50451
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_approval_templates`, path),
50452
+ method: "GET",
50453
+ data,
50454
+ params,
50455
+ headers,
50456
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
50457
+ })
50458
+ .catch((e) => {
50459
+ this.logger.error(formatErrors(e));
50460
+ throw e;
50461
+ });
50462
+ }),
50463
+ },
48754
50464
  /**
48755
50465
  * offer_custom_field
48756
50466
  */
@@ -48807,6 +50517,82 @@ class Client$x extends Client$y {
48807
50517
  });
48808
50518
  }),
48809
50519
  },
50520
+ /**
50521
+ * portal_apply_schema
50522
+ */
50523
+ portalApplySchema: {
50524
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50525
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50526
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
50527
+ const res = yield this.httpInstance
50528
+ .request({
50529
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
50530
+ method: "GET",
50531
+ headers: pickBy(innerPayload.headers, identity),
50532
+ params: pickBy(innerPayload.params, identity),
50533
+ data,
50534
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
50535
+ })
50536
+ .catch((e) => {
50537
+ this.logger.error(formatErrors(e));
50538
+ });
50539
+ return res;
50540
+ });
50541
+ const Iterable = {
50542
+ [Symbol.asyncIterator]() {
50543
+ return __asyncGenerator(this, arguments, function* _a() {
50544
+ let hasMore = true;
50545
+ let pageToken;
50546
+ while (hasMore) {
50547
+ try {
50548
+ const res = yield __await(sendRequest({
50549
+ headers,
50550
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
50551
+ data,
50552
+ }));
50553
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
50554
+ // @ts-ignore
50555
+ has_more,
50556
+ // @ts-ignore
50557
+ page_token,
50558
+ // @ts-ignore
50559
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
50560
+ yield yield __await(rest);
50561
+ hasMore = Boolean(has_more);
50562
+ pageToken = page_token || next_page_token;
50563
+ }
50564
+ catch (e) {
50565
+ yield yield __await(null);
50566
+ break;
50567
+ }
50568
+ }
50569
+ });
50570
+ },
50571
+ };
50572
+ return Iterable;
50573
+ }),
50574
+ /**
50575
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=portal_apply_schema&apiName=list&version=v1 click to debug }
50576
+ *
50577
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=portal_apply_schema&version=v1 document }
50578
+ */
50579
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50580
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50581
+ return this.httpInstance
50582
+ .request({
50583
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
50584
+ method: "GET",
50585
+ data,
50586
+ params,
50587
+ headers,
50588
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
50589
+ })
50590
+ .catch((e) => {
50591
+ this.logger.error(formatErrors(e));
50592
+ throw e;
50593
+ });
50594
+ }),
50595
+ },
48810
50596
  /**
48811
50597
  * 问卷(灰度租户可见)
48812
50598
  */
@@ -51530,6 +53316,27 @@ class Client$x extends Client$y {
51530
53316
  * 背调 (灰度租户可见)
51531
53317
  */
51532
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
+ }),
51533
53340
  /**
51534
53341
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
51535
53342
  *
@@ -54809,6 +56616,36 @@ class Client$x extends Client$y {
54809
56616
  });
54810
56617
  }),
54811
56618
  },
56619
+ /**
56620
+ * Offer 审批流配置(灰度租户可见)
56621
+ */
56622
+ offerApprovalTemplate: {
56623
+ /**
56624
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=offer_approval_template&apiName=list&version=v1 click to debug }
56625
+ *
56626
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_approval_template/list document }
56627
+ *
56628
+ * 获取 Offer 审批流配置列表
56629
+ *
56630
+ * 获取 Offer 审批流配置列表
56631
+ */
56632
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
56633
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
56634
+ return this.httpInstance
56635
+ .request({
56636
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/offer_approval_templates`, path),
56637
+ method: "GET",
56638
+ data,
56639
+ params,
56640
+ headers,
56641
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
56642
+ })
56643
+ .catch((e) => {
56644
+ this.logger.error(formatErrors(e));
56645
+ throw e;
56646
+ });
56647
+ }),
56648
+ },
54812
56649
  /**
54813
56650
  * offer_custom_field
54814
56651
  */
@@ -54865,6 +56702,84 @@ class Client$x extends Client$y {
54865
56702
  });
54866
56703
  }),
54867
56704
  },
56705
+ /**
56706
+ * portal_apply_schema
56707
+ */
56708
+ portalApplySchema: {
56709
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
56710
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
56711
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
56712
+ const res = yield this.httpInstance
56713
+ .request({
56714
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
56715
+ method: "GET",
56716
+ headers: pickBy(innerPayload.headers, identity),
56717
+ params: pickBy(innerPayload.params, identity),
56718
+ data,
56719
+ paramsSerializer: (params) => stringify(params, {
56720
+ arrayFormat: "repeat",
56721
+ }),
56722
+ })
56723
+ .catch((e) => {
56724
+ this.logger.error(formatErrors(e));
56725
+ });
56726
+ return res;
56727
+ });
56728
+ const Iterable = {
56729
+ [Symbol.asyncIterator]() {
56730
+ return __asyncGenerator(this, arguments, function* _a() {
56731
+ let hasMore = true;
56732
+ let pageToken;
56733
+ while (hasMore) {
56734
+ try {
56735
+ const res = yield __await(sendRequest({
56736
+ headers,
56737
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
56738
+ data,
56739
+ }));
56740
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
56741
+ // @ts-ignore
56742
+ has_more,
56743
+ // @ts-ignore
56744
+ page_token,
56745
+ // @ts-ignore
56746
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
56747
+ yield yield __await(rest);
56748
+ hasMore = Boolean(has_more);
56749
+ pageToken = page_token || next_page_token;
56750
+ }
56751
+ catch (e) {
56752
+ yield yield __await(null);
56753
+ break;
56754
+ }
56755
+ }
56756
+ });
56757
+ },
56758
+ };
56759
+ return Iterable;
56760
+ }),
56761
+ /**
56762
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=portal_apply_schema&apiName=list&version=v1 click to debug }
56763
+ *
56764
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=portal_apply_schema&version=v1 document }
56765
+ */
56766
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
56767
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
56768
+ return this.httpInstance
56769
+ .request({
56770
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/portal_apply_schemas`, path),
56771
+ method: "GET",
56772
+ data,
56773
+ params,
56774
+ headers,
56775
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
56776
+ })
56777
+ .catch((e) => {
56778
+ this.logger.error(formatErrors(e));
56779
+ throw e;
56780
+ });
56781
+ }),
56782
+ },
54868
56783
  /**
54869
56784
  * 问卷(灰度租户可见)
54870
56785
  */
@@ -71094,6 +73009,217 @@ class Client$d extends Client$e {
71094
73009
  }),
71095
73010
  },
71096
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
+ },
71097
73223
  };
71098
73224
  }
71099
73225
  }
@@ -81857,10 +83983,12 @@ class Client extends Client$1 {
81857
83983
  const helpDeskCredential = string2Base64(`${this.helpDeskId}:${this.helpDeskToken}`);
81858
83984
  targetOptions.headers['X-Lark-Helpdesk-Authorization'] = `Bearer ${helpDeskCredential}`;
81859
83985
  }
83986
+ const payloadData = Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.data) || {})), targetOptions.data);
81860
83987
  return {
81861
83988
  params: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.params) || {})), targetOptions.params),
81862
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),
81863
- data: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.data) || {})), targetOptions.data),
83990
+ // @ts-ignore
83991
+ data: Object.keys(payloadData).length === 0 ? undefined : payloadData,
81864
83992
  path: Object.assign(Object.assign({}, ((payload === null || payload === void 0 ? void 0 : payload.path) || {})), targetOptions.path),
81865
83993
  };
81866
83994
  });