@larksuiteoapi/node-sdk 1.55.0 → 1.56.1

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
@@ -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
  *
@@ -19682,6 +19943,342 @@ class Client$Q extends Client$R {
19682
19943
  });
19683
19944
  }),
19684
19945
  },
19946
+ /**
19947
+ * recurring_payment
19948
+ */
19949
+ recurringPayment: {
19950
+ /**
19951
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_create&version=v1 click to debug }
19952
+ *
19953
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=compensation&resource=recurring_payment&version=v1 document }
19954
+ *
19955
+ * 创建经常性支付记录
19956
+ */
19957
+ batchCreate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19958
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19959
+ return this.httpInstance
19960
+ .request({
19961
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_create`, path),
19962
+ method: "POST",
19963
+ data,
19964
+ params,
19965
+ headers,
19966
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19967
+ })
19968
+ .catch((e) => {
19969
+ this.logger.error(formatErrors(e));
19970
+ throw e;
19971
+ });
19972
+ }),
19973
+ /**
19974
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_remove&version=v1 click to debug }
19975
+ *
19976
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove&project=compensation&resource=recurring_payment&version=v1 document }
19977
+ *
19978
+ * 删除经常性支付记录
19979
+ */
19980
+ batchRemove: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19981
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19982
+ return this.httpInstance
19983
+ .request({
19984
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_remove`, path),
19985
+ method: "POST",
19986
+ data,
19987
+ params,
19988
+ headers,
19989
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
19990
+ })
19991
+ .catch((e) => {
19992
+ this.logger.error(formatErrors(e));
19993
+ throw e;
19994
+ });
19995
+ }),
19996
+ /**
19997
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=batch_update&version=v1 click to debug }
19998
+ *
19999
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=compensation&resource=recurring_payment&version=v1 document }
20000
+ *
20001
+ * 更新经常性支付记录
20002
+ */
20003
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20004
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20005
+ return this.httpInstance
20006
+ .request({
20007
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/batch_update`, path),
20008
+ method: "POST",
20009
+ data,
20010
+ params,
20011
+ headers,
20012
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20013
+ })
20014
+ .catch((e) => {
20015
+ this.logger.error(formatErrors(e));
20016
+ throw e;
20017
+ });
20018
+ }),
20019
+ queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20020
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20021
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
20022
+ const res = yield this.httpInstance
20023
+ .request({
20024
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path),
20025
+ method: "POST",
20026
+ headers: pickBy(innerPayload.headers, identity),
20027
+ params: pickBy(innerPayload.params, identity),
20028
+ data,
20029
+ paramsSerializer: (params) => stringify(params, {
20030
+ arrayFormat: "repeat",
20031
+ }),
20032
+ })
20033
+ .catch((e) => {
20034
+ this.logger.error(formatErrors(e));
20035
+ });
20036
+ return res;
20037
+ });
20038
+ const Iterable = {
20039
+ [Symbol.asyncIterator]() {
20040
+ return __asyncGenerator(this, arguments, function* _a() {
20041
+ let hasMore = true;
20042
+ let pageToken;
20043
+ while (hasMore) {
20044
+ try {
20045
+ const res = yield __await(sendRequest({
20046
+ headers,
20047
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
20048
+ data,
20049
+ }));
20050
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
20051
+ // @ts-ignore
20052
+ has_more,
20053
+ // @ts-ignore
20054
+ page_token,
20055
+ // @ts-ignore
20056
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
20057
+ yield yield __await(rest);
20058
+ hasMore = Boolean(has_more);
20059
+ pageToken = page_token || next_page_token;
20060
+ }
20061
+ catch (e) {
20062
+ yield yield __await(null);
20063
+ break;
20064
+ }
20065
+ }
20066
+ });
20067
+ },
20068
+ };
20069
+ return Iterable;
20070
+ }),
20071
+ /**
20072
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=recurring_payment&apiName=query&version=v1 click to debug }
20073
+ *
20074
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=recurring_payment&version=v1 document }
20075
+ *
20076
+ * 查询经常性支付记录
20077
+ */
20078
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20079
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20080
+ return this.httpInstance
20081
+ .request({
20082
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/recurring_payment/query`, path),
20083
+ method: "POST",
20084
+ data,
20085
+ params,
20086
+ headers,
20087
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20088
+ })
20089
+ .catch((e) => {
20090
+ this.logger.error(formatErrors(e));
20091
+ throw e;
20092
+ });
20093
+ }),
20094
+ },
20095
+ /**
20096
+ * social_archive
20097
+ */
20098
+ socialArchive: {
20099
+ /**
20100
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive&apiName=query&version=v1 click to debug }
20101
+ *
20102
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive&version=v1 document }
20103
+ *
20104
+ * 通过员工ID和生效时间查询参保档案
20105
+ */
20106
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20107
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20108
+ return this.httpInstance
20109
+ .request({
20110
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive/query`, path),
20111
+ method: "POST",
20112
+ data,
20113
+ params,
20114
+ headers,
20115
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20116
+ })
20117
+ .catch((e) => {
20118
+ this.logger.error(formatErrors(e));
20119
+ throw e;
20120
+ });
20121
+ }),
20122
+ },
20123
+ /**
20124
+ * social_archive_adjust_record
20125
+ */
20126
+ socialArchiveAdjustRecord: {
20127
+ /**
20128
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_archive_adjust_record&apiName=query&version=v1 click to debug }
20129
+ *
20130
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_archive_adjust_record&version=v1 document }
20131
+ *
20132
+ * 根据员工ID查询待增员、待减员记录
20133
+ */
20134
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20135
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20136
+ return this.httpInstance
20137
+ .request({
20138
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_archive_adjust_record/query`, path),
20139
+ method: "POST",
20140
+ data,
20141
+ params,
20142
+ headers,
20143
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20144
+ })
20145
+ .catch((e) => {
20146
+ this.logger.error(formatErrors(e));
20147
+ throw e;
20148
+ });
20149
+ }),
20150
+ },
20151
+ /**
20152
+ * social_insurance
20153
+ */
20154
+ socialInsurance: {
20155
+ /**
20156
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_insurance&apiName=list&version=v1 click to debug }
20157
+ *
20158
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_insurance&version=v1 document }
20159
+ *
20160
+ * 获取险种列表
20161
+ */
20162
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20163
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20164
+ return this.httpInstance
20165
+ .request({
20166
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_insurances`, path),
20167
+ method: "GET",
20168
+ data,
20169
+ params,
20170
+ headers,
20171
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20172
+ })
20173
+ .catch((e) => {
20174
+ this.logger.error(formatErrors(e));
20175
+ throw e;
20176
+ });
20177
+ }),
20178
+ },
20179
+ /**
20180
+ * social_plan
20181
+ */
20182
+ socialPlan: {
20183
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20184
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20185
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
20186
+ const res = yield this.httpInstance
20187
+ .request({
20188
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path),
20189
+ method: "GET",
20190
+ headers: pickBy(innerPayload.headers, identity),
20191
+ params: pickBy(innerPayload.params, identity),
20192
+ data,
20193
+ paramsSerializer: (params) => stringify(params, {
20194
+ arrayFormat: "repeat",
20195
+ }),
20196
+ })
20197
+ .catch((e) => {
20198
+ this.logger.error(formatErrors(e));
20199
+ });
20200
+ return res;
20201
+ });
20202
+ const Iterable = {
20203
+ [Symbol.asyncIterator]() {
20204
+ return __asyncGenerator(this, arguments, function* _a() {
20205
+ let hasMore = true;
20206
+ let pageToken;
20207
+ while (hasMore) {
20208
+ try {
20209
+ const res = yield __await(sendRequest({
20210
+ headers,
20211
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
20212
+ data,
20213
+ }));
20214
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
20215
+ // @ts-ignore
20216
+ has_more,
20217
+ // @ts-ignore
20218
+ page_token,
20219
+ // @ts-ignore
20220
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
20221
+ yield yield __await(rest);
20222
+ hasMore = Boolean(has_more);
20223
+ pageToken = page_token || next_page_token;
20224
+ }
20225
+ catch (e) {
20226
+ yield yield __await(null);
20227
+ break;
20228
+ }
20229
+ }
20230
+ });
20231
+ },
20232
+ };
20233
+ return Iterable;
20234
+ }),
20235
+ /**
20236
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=list&version=v1 click to debug }
20237
+ *
20238
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=compensation&resource=social_plan&version=v1 document }
20239
+ *
20240
+ * 分页获取参保方案列表
20241
+ */
20242
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20243
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20244
+ return this.httpInstance
20245
+ .request({
20246
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans`, path),
20247
+ method: "GET",
20248
+ data,
20249
+ params,
20250
+ headers,
20251
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20252
+ })
20253
+ .catch((e) => {
20254
+ this.logger.error(formatErrors(e));
20255
+ throw e;
20256
+ });
20257
+ }),
20258
+ /**
20259
+ * {@link https://open.feishu.cn/api-explorer?project=compensation&resource=social_plan&apiName=query&version=v1 click to debug }
20260
+ *
20261
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=compensation&resource=social_plan&version=v1 document }
20262
+ *
20263
+ * 批量查询参保方案
20264
+ */
20265
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
20266
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
20267
+ return this.httpInstance
20268
+ .request({
20269
+ url: fillApiPath(`${this.domain}/open-apis/compensation/v1/social_plans/query`, path),
20270
+ method: "POST",
20271
+ data,
20272
+ params,
20273
+ headers,
20274
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
20275
+ })
20276
+ .catch((e) => {
20277
+ this.logger.error(formatErrors(e));
20278
+ throw e;
20279
+ });
20280
+ }),
20281
+ },
19685
20282
  },
19686
20283
  };
19687
20284
  }
@@ -30473,6 +31070,29 @@ class Client$M extends Client$N {
30473
31070
  throw e;
30474
31071
  });
30475
31072
  }),
31073
+ /**
31074
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=approval_groups&apiName=open_query_position_change_list_by_ids&version=v2 click to debug }
31075
+ *
31076
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=open_query_position_change_list_by_ids&project=corehr&resource=approval_groups&version=v2 document }
31077
+ *
31078
+ * 获取岗位调整信息详情
31079
+ */
31080
+ openQueryPositionChangeListByIds: (payload, options) => __awaiter(this, void 0, void 0, function* () {
31081
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
31082
+ return this.httpInstance
31083
+ .request({
31084
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/approval_groups/open_query_position_change_list_by_ids`, path),
31085
+ method: "POST",
31086
+ data,
31087
+ params,
31088
+ headers,
31089
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
31090
+ })
31091
+ .catch((e) => {
31092
+ this.logger.error(formatErrors(e));
31093
+ throw e;
31094
+ });
31095
+ }),
30476
31096
  },
30477
31097
  /**
30478
31098
  * approver
@@ -32660,6 +33280,34 @@ class Client$M extends Client$N {
32660
33280
  });
32661
33281
  }),
32662
33282
  },
33283
+ /**
33284
+ * draft
33285
+ */
33286
+ draft: {
33287
+ /**
33288
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=draft&apiName=get&version=v2 click to debug }
33289
+ *
33290
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=draft&version=v2 document }
33291
+ *
33292
+ * 根据组织架构调整 ID 查询调整流程信息
33293
+ */
33294
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33295
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33296
+ return this.httpInstance
33297
+ .request({
33298
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/drafts/:draft_id`, path),
33299
+ method: "GET",
33300
+ data,
33301
+ params,
33302
+ headers,
33303
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
33304
+ })
33305
+ .catch((e) => {
33306
+ this.logger.error(formatErrors(e));
33307
+ throw e;
33308
+ });
33309
+ }),
33310
+ },
32663
33311
  /**
32664
33312
  * employee
32665
33313
  */
@@ -34329,45 +34977,17 @@ class Client$M extends Client$N {
34329
34977
  */
34330
34978
  position: {
34331
34979
  /**
34332
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
34333
- *
34334
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
34335
- *
34336
- * 查询岗位信息
34337
- */
34338
- query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34339
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34340
- return this.httpInstance
34341
- .request({
34342
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
34343
- method: "POST",
34344
- data,
34345
- params,
34346
- headers,
34347
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34348
- })
34349
- .catch((e) => {
34350
- this.logger.error(formatErrors(e));
34351
- throw e;
34352
- });
34353
- }),
34354
- },
34355
- /**
34356
- * 待入职
34357
- */
34358
- preHire: {
34359
- /**
34360
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
34980
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=active&version=v2 click to debug }
34361
34981
  *
34362
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=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 }
34363
34983
  *
34364
- * 完成入职
34984
+ * 启/停用岗位
34365
34985
  */
34366
- complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34986
+ active: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34367
34987
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34368
34988
  return this.httpInstance
34369
34989
  .request({
34370
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
34990
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/active`, path),
34371
34991
  method: "POST",
34372
34992
  data,
34373
34993
  params,
@@ -34380,19 +35000,15 @@ class Client$M extends Client$N {
34380
35000
  });
34381
35001
  }),
34382
35002
  /**
34383
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
34384
- *
34385
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
34386
- *
34387
- * 创建待入职人员
35003
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=create&version=v2 click to debug }
34388
35004
  *
34389
- * 创建待入职人员
35005
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=position&version=v2 document }
34390
35006
  */
34391
35007
  create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34392
35008
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34393
35009
  return this.httpInstance
34394
35010
  .request({
34395
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
35011
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions`, path),
34396
35012
  method: "POST",
34397
35013
  data,
34398
35014
  params,
@@ -34405,18 +35021,18 @@ class Client$M extends Client$N {
34405
35021
  });
34406
35022
  }),
34407
35023
  /**
34408
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=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 }
34409
35025
  *
34410
- * {@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 }
34411
35027
  *
34412
- * 删除待入职
35028
+ * 删除岗位
34413
35029
  */
34414
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35030
+ delPosition: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34415
35031
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34416
35032
  return this.httpInstance
34417
35033
  .request({
34418
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
34419
- method: "DELETE",
35034
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/del_position`, path),
35035
+ method: "POST",
34420
35036
  data,
34421
35037
  params,
34422
35038
  headers,
@@ -34428,17 +35044,17 @@ class Client$M extends Client$N {
34428
35044
  });
34429
35045
  }),
34430
35046
  /**
34431
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=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 }
34432
35048
  *
34433
- * {@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 }
34434
35050
  *
34435
- * 更新待入职
35051
+ * 更新岗位
34436
35052
  */
34437
35053
  patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34438
35054
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34439
35055
  return this.httpInstance
34440
35056
  .request({
34441
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
35057
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/:position_id`, path),
34442
35058
  method: "PATCH",
34443
35059
  data,
34444
35060
  params,
@@ -34450,91 +35066,18 @@ class Client$M extends Client$N {
34450
35066
  throw e;
34451
35067
  });
34452
35068
  }),
34453
- queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34454
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34455
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34456
- const res = yield this.httpInstance
34457
- .request({
34458
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
34459
- method: "POST",
34460
- headers: pickBy(innerPayload.headers, identity),
34461
- params: pickBy(innerPayload.params, identity),
34462
- data,
34463
- paramsSerializer: (params) => stringify(params, {
34464
- arrayFormat: "repeat",
34465
- }),
34466
- })
34467
- .catch((e) => {
34468
- this.logger.error(formatErrors(e));
34469
- });
34470
- return res;
34471
- });
34472
- const Iterable = {
34473
- [Symbol.asyncIterator]() {
34474
- return __asyncGenerator(this, arguments, function* _a() {
34475
- let hasMore = true;
34476
- let pageToken;
34477
- while (hasMore) {
34478
- try {
34479
- const res = yield __await(sendRequest({
34480
- headers,
34481
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
34482
- data,
34483
- }));
34484
- const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
34485
- // @ts-ignore
34486
- has_more,
34487
- // @ts-ignore
34488
- page_token,
34489
- // @ts-ignore
34490
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
34491
- yield yield __await(rest);
34492
- hasMore = Boolean(has_more);
34493
- pageToken = page_token || next_page_token;
34494
- }
34495
- catch (e) {
34496
- yield yield __await(null);
34497
- break;
34498
- }
34499
- }
34500
- });
34501
- },
34502
- };
34503
- return Iterable;
34504
- }),
34505
35069
  /**
34506
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=query&version=v2 click to debug }
35070
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query&version=v2 click to debug }
34507
35071
  *
34508
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=pre_hire&version=v2 document }
35072
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=position&version=v2 document }
34509
35073
  *
34510
- * 批量查询待入职数据
35074
+ * 查询岗位信息
34511
35075
  */
34512
35076
  query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34513
35077
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34514
35078
  return this.httpInstance
34515
35079
  .request({
34516
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
34517
- method: "POST",
34518
- data,
34519
- params,
34520
- headers,
34521
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34522
- })
34523
- .catch((e) => {
34524
- this.logger.error(formatErrors(e));
34525
- throw e;
34526
- });
34527
- }),
34528
- /**
34529
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
34530
- *
34531
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
34532
- */
34533
- restoreFlowInstance: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34534
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34535
- return this.httpInstance
34536
- .request({
34537
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path),
35080
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query`, path),
34538
35081
  method: "POST",
34539
35082
  data,
34540
35083
  params,
@@ -34546,13 +35089,13 @@ class Client$M extends Client$N {
34546
35089
  throw e;
34547
35090
  });
34548
35091
  }),
34549
- searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35092
+ queryRecentChangeWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34550
35093
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34551
35094
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34552
35095
  const res = yield this.httpInstance
34553
35096
  .request({
34554
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
34555
- method: "POST",
35097
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
35098
+ method: "GET",
34556
35099
  headers: pickBy(innerPayload.headers, identity),
34557
35100
  params: pickBy(innerPayload.params, identity),
34558
35101
  data,
@@ -34599,18 +35142,16 @@ class Client$M extends Client$N {
34599
35142
  return Iterable;
34600
35143
  }),
34601
35144
  /**
34602
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=search&version=v2 click to debug }
34603
- *
34604
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
35145
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=position&apiName=query_recent_change&version=v2 click to debug }
34605
35146
  *
34606
- * 根据部门 ID,上级部门查询部门列表
35147
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query_recent_change&project=corehr&resource=position&version=v2 document }
34607
35148
  */
34608
- search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35149
+ queryRecentChange: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34609
35150
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34610
35151
  return this.httpInstance
34611
35152
  .request({
34612
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
34613
- method: "POST",
35153
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/positions/query_recent_change`, path),
35154
+ method: "GET",
34614
35155
  data,
34615
35156
  params,
34616
35157
  headers,
@@ -34621,18 +35162,23 @@ class Client$M extends Client$N {
34621
35162
  throw e;
34622
35163
  });
34623
35164
  }),
35165
+ },
35166
+ /**
35167
+ * 待入职
35168
+ */
35169
+ preHire: {
34624
35170
  /**
34625
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
35171
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=complete&version=v2 click to debug }
34626
35172
  *
34627
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transit_task&project=corehr&resource=pre_hire&version=v2 document }
35173
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=complete&project=corehr&resource=pre_hire&version=v2 document }
34628
35174
  *
34629
- * 任务流转
35175
+ * 完成入职
34630
35176
  */
34631
- transitTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35177
+ complete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34632
35178
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34633
35179
  return this.httpInstance
34634
35180
  .request({
34635
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`, path),
35181
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/complete`, path),
34636
35182
  method: "POST",
34637
35183
  data,
34638
35184
  params,
@@ -34645,41 +35191,19 @@ class Client$M extends Client$N {
34645
35191
  });
34646
35192
  }),
34647
35193
  /**
34648
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=withdraw_onboarding&version=v2 click to debug }
35194
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
34649
35195
  *
34650
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw_onboarding&project=corehr&resource=pre_hire&version=v2 document }
34651
- */
34652
- withdrawOnboarding: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34653
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34654
- return this.httpInstance
34655
- .request({
34656
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path),
34657
- method: "POST",
34658
- data,
34659
- params,
34660
- headers,
34661
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34662
- })
34663
- .catch((e) => {
34664
- this.logger.error(formatErrors(e));
34665
- throw e;
34666
- });
34667
- }),
34668
- },
34669
- /**
34670
- * probation.assessment
34671
- */
34672
- probationAssessment: {
34673
- /**
34674
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
35196
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
34675
35197
  *
34676
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
35198
+ * 创建待入职人员
35199
+ *
35200
+ * 创建待入职人员
34677
35201
  */
34678
35202
  create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34679
35203
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34680
35204
  return this.httpInstance
34681
35205
  .request({
34682
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path),
35206
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
34683
35207
  method: "POST",
34684
35208
  data,
34685
35209
  params,
@@ -34692,15 +35216,17 @@ class Client$M extends Client$N {
34692
35216
  });
34693
35217
  }),
34694
35218
  /**
34695
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
35219
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=delete&version=v2 click to debug }
34696
35220
  *
34697
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
35221
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=pre_hire&version=v2 document }
35222
+ *
35223
+ * 删除待入职
34698
35224
  */
34699
35225
  delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34700
35226
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34701
35227
  return this.httpInstance
34702
35228
  .request({
34703
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
35229
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
34704
35230
  method: "DELETE",
34705
35231
  data,
34706
35232
  params,
@@ -34713,15 +35239,17 @@ class Client$M extends Client$N {
34713
35239
  });
34714
35240
  }),
34715
35241
  /**
34716
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
35242
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=patch&version=v2 click to debug }
34717
35243
  *
34718
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
35244
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=pre_hire&version=v2 document }
35245
+ *
35246
+ * 更新待入职
34719
35247
  */
34720
35248
  patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34721
35249
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34722
35250
  return this.httpInstance
34723
35251
  .request({
34724
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
35252
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id`, path),
34725
35253
  method: "PATCH",
34726
35254
  data,
34727
35255
  params,
@@ -34733,38 +35261,344 @@ class Client$M extends Client$N {
34733
35261
  throw e;
34734
35262
  });
34735
35263
  }),
34736
- },
34737
- /**
34738
- * probation
34739
- */
34740
- probation: {
34741
- /**
34742
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
34743
- *
34744
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
34745
- */
34746
- enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34747
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
34748
- return this.httpInstance
34749
- .request({
34750
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
34751
- method: "POST",
34752
- data,
34753
- params,
34754
- headers,
34755
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
34756
- })
34757
- .catch((e) => {
34758
- this.logger.error(formatErrors(e));
34759
- throw e;
34760
- });
34761
- }),
34762
- searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35264
+ queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34763
35265
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34764
35266
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
34765
35267
  const res = yield this.httpInstance
34766
35268
  .request({
34767
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
35269
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
35270
+ method: "POST",
35271
+ headers: pickBy(innerPayload.headers, identity),
35272
+ params: pickBy(innerPayload.params, identity),
35273
+ data,
35274
+ paramsSerializer: (params) => stringify(params, {
35275
+ arrayFormat: "repeat",
35276
+ }),
35277
+ })
35278
+ .catch((e) => {
35279
+ this.logger.error(formatErrors(e));
35280
+ });
35281
+ return res;
35282
+ });
35283
+ const Iterable = {
35284
+ [Symbol.asyncIterator]() {
35285
+ return __asyncGenerator(this, arguments, function* _a() {
35286
+ let hasMore = true;
35287
+ let pageToken;
35288
+ while (hasMore) {
35289
+ try {
35290
+ const res = yield __await(sendRequest({
35291
+ headers,
35292
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
35293
+ data,
35294
+ }));
35295
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
35296
+ // @ts-ignore
35297
+ has_more,
35298
+ // @ts-ignore
35299
+ page_token,
35300
+ // @ts-ignore
35301
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
35302
+ yield yield __await(rest);
35303
+ hasMore = Boolean(has_more);
35304
+ pageToken = page_token || next_page_token;
35305
+ }
35306
+ catch (e) {
35307
+ yield yield __await(null);
35308
+ break;
35309
+ }
35310
+ }
35311
+ });
35312
+ },
35313
+ };
35314
+ return Iterable;
35315
+ }),
35316
+ /**
35317
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=query&version=v2 click to debug }
35318
+ *
35319
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=corehr&resource=pre_hire&version=v2 document }
35320
+ *
35321
+ * 批量查询待入职数据
35322
+ */
35323
+ query: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35324
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35325
+ return this.httpInstance
35326
+ .request({
35327
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/query`, path),
35328
+ method: "POST",
35329
+ data,
35330
+ params,
35331
+ headers,
35332
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35333
+ })
35334
+ .catch((e) => {
35335
+ this.logger.error(formatErrors(e));
35336
+ throw e;
35337
+ });
35338
+ }),
35339
+ /**
35340
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=restore_flow_instance&version=v2 click to debug }
35341
+ *
35342
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=restore_flow_instance&project=corehr&resource=pre_hire&version=v2 document }
35343
+ */
35344
+ restoreFlowInstance: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35345
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35346
+ return this.httpInstance
35347
+ .request({
35348
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/restore_flow_instance`, path),
35349
+ method: "POST",
35350
+ data,
35351
+ params,
35352
+ headers,
35353
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35354
+ })
35355
+ .catch((e) => {
35356
+ this.logger.error(formatErrors(e));
35357
+ throw e;
35358
+ });
35359
+ }),
35360
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35361
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35362
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
35363
+ const res = yield this.httpInstance
35364
+ .request({
35365
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
35366
+ method: "POST",
35367
+ headers: pickBy(innerPayload.headers, identity),
35368
+ params: pickBy(innerPayload.params, identity),
35369
+ data,
35370
+ paramsSerializer: (params) => stringify(params, {
35371
+ arrayFormat: "repeat",
35372
+ }),
35373
+ })
35374
+ .catch((e) => {
35375
+ this.logger.error(formatErrors(e));
35376
+ });
35377
+ return res;
35378
+ });
35379
+ const Iterable = {
35380
+ [Symbol.asyncIterator]() {
35381
+ return __asyncGenerator(this, arguments, function* _a() {
35382
+ let hasMore = true;
35383
+ let pageToken;
35384
+ while (hasMore) {
35385
+ try {
35386
+ const res = yield __await(sendRequest({
35387
+ headers,
35388
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
35389
+ data,
35390
+ }));
35391
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
35392
+ // @ts-ignore
35393
+ has_more,
35394
+ // @ts-ignore
35395
+ page_token,
35396
+ // @ts-ignore
35397
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
35398
+ yield yield __await(rest);
35399
+ hasMore = Boolean(has_more);
35400
+ pageToken = page_token || next_page_token;
35401
+ }
35402
+ catch (e) {
35403
+ yield yield __await(null);
35404
+ break;
35405
+ }
35406
+ }
35407
+ });
35408
+ },
35409
+ };
35410
+ return Iterable;
35411
+ }),
35412
+ /**
35413
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=search&version=v2 click to debug }
35414
+ *
35415
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=pre_hire&version=v2 document }
35416
+ *
35417
+ * 根据部门 ID,上级部门查询部门列表
35418
+ */
35419
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35420
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35421
+ return this.httpInstance
35422
+ .request({
35423
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/search`, path),
35424
+ method: "POST",
35425
+ data,
35426
+ params,
35427
+ headers,
35428
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35429
+ })
35430
+ .catch((e) => {
35431
+ this.logger.error(formatErrors(e));
35432
+ throw e;
35433
+ });
35434
+ }),
35435
+ /**
35436
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transform_onboarding_task&version=v2 click to debug }
35437
+ *
35438
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transform_onboarding_task&project=corehr&resource=pre_hire&version=v2 document }
35439
+ *
35440
+ * 入职常规任务的流转,支持手动开启任务,提交任务以及审批任务
35441
+ */
35442
+ transformOnboardingTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35443
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35444
+ return this.httpInstance
35445
+ .request({
35446
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/transform_onboarding_task`, path),
35447
+ method: "POST",
35448
+ data,
35449
+ params,
35450
+ headers,
35451
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35452
+ })
35453
+ .catch((e) => {
35454
+ this.logger.error(formatErrors(e));
35455
+ throw e;
35456
+ });
35457
+ }),
35458
+ /**
35459
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=transit_task&version=v2 click to debug }
35460
+ *
35461
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transit_task&project=corehr&resource=pre_hire&version=v2 document }
35462
+ *
35463
+ * 任务流转
35464
+ */
35465
+ transitTask: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35466
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35467
+ return this.httpInstance
35468
+ .request({
35469
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/:pre_hire_id/transit_task`, path),
35470
+ method: "POST",
35471
+ data,
35472
+ params,
35473
+ headers,
35474
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35475
+ })
35476
+ .catch((e) => {
35477
+ this.logger.error(formatErrors(e));
35478
+ throw e;
35479
+ });
35480
+ }),
35481
+ /**
35482
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=withdraw_onboarding&version=v2 click to debug }
35483
+ *
35484
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw_onboarding&project=corehr&resource=pre_hire&version=v2 document }
35485
+ */
35486
+ withdrawOnboarding: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35487
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35488
+ return this.httpInstance
35489
+ .request({
35490
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires/withdraw_onboarding`, path),
35491
+ method: "POST",
35492
+ data,
35493
+ params,
35494
+ headers,
35495
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35496
+ })
35497
+ .catch((e) => {
35498
+ this.logger.error(formatErrors(e));
35499
+ throw e;
35500
+ });
35501
+ }),
35502
+ },
35503
+ /**
35504
+ * probation.assessment
35505
+ */
35506
+ probationAssessment: {
35507
+ /**
35508
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
35509
+ *
35510
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
35511
+ */
35512
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35513
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35514
+ return this.httpInstance
35515
+ .request({
35516
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path),
35517
+ method: "POST",
35518
+ data,
35519
+ params,
35520
+ headers,
35521
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35522
+ })
35523
+ .catch((e) => {
35524
+ this.logger.error(formatErrors(e));
35525
+ throw e;
35526
+ });
35527
+ }),
35528
+ /**
35529
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
35530
+ *
35531
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
35532
+ */
35533
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35534
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35535
+ return this.httpInstance
35536
+ .request({
35537
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
35538
+ method: "DELETE",
35539
+ data,
35540
+ params,
35541
+ headers,
35542
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35543
+ })
35544
+ .catch((e) => {
35545
+ this.logger.error(formatErrors(e));
35546
+ throw e;
35547
+ });
35548
+ }),
35549
+ /**
35550
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
35551
+ *
35552
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
35553
+ */
35554
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35555
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35556
+ return this.httpInstance
35557
+ .request({
35558
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
35559
+ method: "PATCH",
35560
+ data,
35561
+ params,
35562
+ headers,
35563
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35564
+ })
35565
+ .catch((e) => {
35566
+ this.logger.error(formatErrors(e));
35567
+ throw e;
35568
+ });
35569
+ }),
35570
+ },
35571
+ /**
35572
+ * probation
35573
+ */
35574
+ probation: {
35575
+ /**
35576
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
35577
+ *
35578
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
35579
+ */
35580
+ enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35581
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35582
+ return this.httpInstance
35583
+ .request({
35584
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
35585
+ method: "POST",
35586
+ data,
35587
+ params,
35588
+ headers,
35589
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35590
+ })
35591
+ .catch((e) => {
35592
+ this.logger.error(formatErrors(e));
35593
+ throw e;
35594
+ });
35595
+ }),
35596
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35597
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35598
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
35599
+ const res = yield this.httpInstance
35600
+ .request({
35601
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
34768
35602
  method: "POST",
34769
35603
  headers: pickBy(innerPayload.headers, identity),
34770
35604
  params: pickBy(innerPayload.params, identity),
@@ -34928,19 +35762,19 @@ class Client$M extends Client$N {
34928
35762
  }),
34929
35763
  },
34930
35764
  /**
34931
- * process.form_variable_data
35765
+ * process
34932
35766
  */
34933
- processFormVariableData: {
35767
+ process: {
34934
35768
  /**
34935
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v2 click to debug }
35769
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=flow_variable_data&version=v2 click to debug }
34936
35770
  *
34937
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process.form_variable_data&version=v2 document }
35771
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=flow_variable_data&project=corehr&resource=process&version=v2 document }
34938
35772
  */
34939
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35773
+ flowVariableData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34940
35774
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
34941
35775
  return this.httpInstance
34942
35776
  .request({
34943
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`, path),
35777
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/flow_variable_data`, path),
34944
35778
  method: "GET",
34945
35779
  data,
34946
35780
  params,
@@ -34952,11 +35786,6 @@ class Client$M extends Client$N {
34952
35786
  throw e;
34953
35787
  });
34954
35788
  }),
34955
- },
34956
- /**
34957
- * process
34958
- */
34959
- process: {
34960
35789
  /**
34961
35790
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process&apiName=get&version=v2 click to debug }
34962
35791
  *
@@ -35052,6 +35881,32 @@ class Client$M extends Client$N {
35052
35881
  });
35053
35882
  }),
35054
35883
  },
35884
+ /**
35885
+ * process.form_variable_data
35886
+ */
35887
+ processFormVariableData: {
35888
+ /**
35889
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=process.form_variable_data&apiName=get&version=v2 click to debug }
35890
+ *
35891
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=process.form_variable_data&version=v2 document }
35892
+ */
35893
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35894
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35895
+ return this.httpInstance
35896
+ .request({
35897
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/processes/:process_id/form_variable_data`, path),
35898
+ method: "GET",
35899
+ data,
35900
+ params,
35901
+ headers,
35902
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
35903
+ })
35904
+ .catch((e) => {
35905
+ this.logger.error(formatErrors(e));
35906
+ throw e;
35907
+ });
35908
+ }),
35909
+ },
35055
35910
  /**
35056
35911
  * process.transfer
35057
35912
  */
@@ -35181,6 +36036,379 @@ class Client$M extends Client$N {
35181
36036
  });
35182
36037
  }),
35183
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),
36155
+ method: "GET",
36156
+ data,
36157
+ params,
36158
+ headers,
36159
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36160
+ })
36161
+ .catch((e) => {
36162
+ this.logger.error(formatErrors(e));
36163
+ throw e;
36164
+ });
36165
+ }),
36166
+ /**
36167
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=list_by_biz_id&version=v2 click to debug }
36168
+ *
36169
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_by_biz_id&project=corehr&resource=signature_file&version=v2 document }
36170
+ */
36171
+ listByBizId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36172
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36173
+ return this.httpInstance
36174
+ .request({
36175
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/list_by_biz_id`, path),
36176
+ method: "GET",
36177
+ data,
36178
+ params,
36179
+ headers,
36180
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36181
+ })
36182
+ .catch((e) => {
36183
+ this.logger.error(formatErrors(e));
36184
+ throw e;
36185
+ });
36186
+ }),
36187
+ queryWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36188
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36189
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
36190
+ const res = yield this.httpInstance
36191
+ .request({
36192
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_files/query`, path),
36193
+ method: "POST",
36194
+ headers: pickBy(innerPayload.headers, identity),
36195
+ params: pickBy(innerPayload.params, identity),
36196
+ data,
36197
+ paramsSerializer: (params) => stringify(params, {
36198
+ arrayFormat: "repeat",
36199
+ }),
36200
+ })
36201
+ .catch((e) => {
36202
+ this.logger.error(formatErrors(e));
36203
+ });
36204
+ return res;
36205
+ });
36206
+ const Iterable = {
36207
+ [Symbol.asyncIterator]() {
36208
+ return __asyncGenerator(this, arguments, function* _a() {
36209
+ let hasMore = true;
36210
+ let pageToken;
36211
+ while (hasMore) {
36212
+ try {
36213
+ const res = yield __await(sendRequest({
36214
+ headers,
36215
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
36216
+ data,
36217
+ }));
36218
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
36219
+ // @ts-ignore
36220
+ has_more,
36221
+ // @ts-ignore
36222
+ page_token,
36223
+ // @ts-ignore
36224
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
36225
+ yield yield __await(rest);
36226
+ hasMore = Boolean(has_more);
36227
+ pageToken = page_token || next_page_token;
36228
+ }
36229
+ catch (e) {
36230
+ yield yield __await(null);
36231
+ break;
36232
+ }
36233
+ }
36234
+ });
36235
+ },
36236
+ };
36237
+ return Iterable;
36238
+ }),
36239
+ /**
36240
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_file&apiName=query&version=v2 click to debug }
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: {
36338
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36339
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36340
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
36341
+ const res = yield this.httpInstance
36342
+ .request({
36343
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
36344
+ method: "GET",
36345
+ headers: pickBy(innerPayload.headers, identity),
36346
+ params: pickBy(innerPayload.params, identity),
36347
+ data,
36348
+ paramsSerializer: (params) => stringify(params, {
36349
+ arrayFormat: "repeat",
36350
+ }),
36351
+ })
36352
+ .catch((e) => {
36353
+ this.logger.error(formatErrors(e));
36354
+ });
36355
+ return res;
36356
+ });
36357
+ const Iterable = {
36358
+ [Symbol.asyncIterator]() {
36359
+ return __asyncGenerator(this, arguments, function* _a() {
36360
+ let hasMore = true;
36361
+ let pageToken;
36362
+ while (hasMore) {
36363
+ try {
36364
+ const res = yield __await(sendRequest({
36365
+ headers,
36366
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
36367
+ data,
36368
+ }));
36369
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
36370
+ // @ts-ignore
36371
+ has_more,
36372
+ // @ts-ignore
36373
+ page_token,
36374
+ // @ts-ignore
36375
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
36376
+ yield yield __await(rest);
36377
+ hasMore = Boolean(has_more);
36378
+ pageToken = page_token || next_page_token;
36379
+ }
36380
+ catch (e) {
36381
+ yield yield __await(null);
36382
+ break;
36383
+ }
36384
+ }
36385
+ });
36386
+ },
36387
+ };
36388
+ return Iterable;
36389
+ }),
36390
+ /**
36391
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=signature_template_info_with_thumbnail&apiName=list&version=v2 click to debug }
36392
+ *
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 }
36394
+ */
36395
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36396
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36397
+ return this.httpInstance
36398
+ .request({
36399
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/signature_template_info_with_thumbnails`, path),
36400
+ method: "GET",
36401
+ data,
36402
+ params,
36403
+ headers,
36404
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36405
+ })
36406
+ .catch((e) => {
36407
+ this.logger.error(formatErrors(e));
36408
+ throw e;
36409
+ });
36410
+ }),
36411
+ },
35184
36412
  /**
35185
36413
  * workforce_plan
35186
36414
  */
@@ -38411,7 +39639,7 @@ class Client$G extends Client$H {
38411
39639
  }),
38412
39640
  },
38413
39641
  /**
38414
- * 文件
39642
+ * 事件
38415
39643
  */
38416
39644
  file: {
38417
39645
  /**
@@ -40237,7 +41465,7 @@ class Client$G extends Client$H {
40237
41465
  }),
40238
41466
  },
40239
41467
  /**
40240
- * 文件
41468
+ * 事件
40241
41469
  */
40242
41470
  file: {
40243
41471
  /**
@@ -45580,7 +46808,7 @@ class Client$x extends Client$y {
45580
46808
  }),
45581
46809
  },
45582
46810
  /**
45583
- * 入职
46811
+ * 投递
45584
46812
  */
45585
46813
  application: {
45586
46814
  /**
@@ -45933,6 +47161,27 @@ class Client$x extends Client$y {
45933
47161
  * 背调 (灰度租户可见)
45934
47162
  */
45935
47163
  backgroundCheckOrder: {
47164
+ /**
47165
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
47166
+ *
47167
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
47168
+ */
47169
+ batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47170
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
47171
+ return this.httpInstance
47172
+ .request({
47173
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path),
47174
+ method: "POST",
47175
+ data,
47176
+ params,
47177
+ headers,
47178
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
47179
+ })
47180
+ .catch((e) => {
47181
+ this.logger.error(formatErrors(e));
47182
+ throw e;
47183
+ });
47184
+ }),
45936
47185
  /**
45937
47186
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
45938
47187
  *
@@ -51714,7 +52963,7 @@ class Client$x extends Client$y {
51714
52963
  }),
51715
52964
  },
51716
52965
  /**
51717
- * 入职
52966
+ * 投递
51718
52967
  */
51719
52968
  application: {
51720
52969
  /**
@@ -52067,6 +53316,27 @@ class Client$x extends Client$y {
52067
53316
  * 背调 (灰度租户可见)
52068
53317
  */
52069
53318
  backgroundCheckOrder: {
53319
+ /**
53320
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=batch_query&version=v1 click to debug }
53321
+ *
53322
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=hire&resource=background_check_order&version=v1 document }
53323
+ */
53324
+ batchQuery: (payload, options) => __awaiter(this, void 0, void 0, function* () {
53325
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
53326
+ return this.httpInstance
53327
+ .request({
53328
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/background_check_orders/batch_query`, path),
53329
+ method: "POST",
53330
+ data,
53331
+ params,
53332
+ headers,
53333
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
53334
+ })
53335
+ .catch((e) => {
53336
+ this.logger.error(formatErrors(e));
53337
+ throw e;
53338
+ });
53339
+ }),
52070
53340
  /**
52071
53341
  * {@link https://open.feishu.cn/api-explorer?project=hire&resource=background_check_order&apiName=list&version=v1 click to debug }
52072
53342
  *
@@ -71411,19 +72681,490 @@ class Client$e extends Client$f {
71411
72681
  return Iterable;
71412
72682
  }),
71413
72683
  /**
71414
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=list&version=v2 click to debug }
71415
- *
71416
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list document }
71417
- *
71418
- * 批量获取数据源
72684
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=list&version=v2 click to debug }
72685
+ *
72686
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list document }
72687
+ *
72688
+ * 批量获取数据源
72689
+ *
72690
+ * 批量获取创建的数据源信息
72691
+ */
72692
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72693
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72694
+ return this.httpInstance
72695
+ .request({
72696
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path),
72697
+ method: "GET",
72698
+ data,
72699
+ params,
72700
+ headers,
72701
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72702
+ })
72703
+ .catch((e) => {
72704
+ this.logger.error(formatErrors(e));
72705
+ throw e;
72706
+ });
72707
+ }),
72708
+ /**
72709
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=patch&version=v2 click to debug }
72710
+ *
72711
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch document }
72712
+ *
72713
+ * 修改数据源
72714
+ *
72715
+ * 更新一个已经存在的数据源
72716
+ */
72717
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72718
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72719
+ return this.httpInstance
72720
+ .request({
72721
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path),
72722
+ method: "PATCH",
72723
+ data,
72724
+ params,
72725
+ headers,
72726
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72727
+ })
72728
+ .catch((e) => {
72729
+ this.logger.error(formatErrors(e));
72730
+ throw e;
72731
+ });
72732
+ }),
72733
+ },
72734
+ /**
72735
+ * 数据项
72736
+ */
72737
+ dataSourceItem: {
72738
+ /**
72739
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=create&version=v2 click to debug }
72740
+ *
72741
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create document }
72742
+ *
72743
+ * 索引数据项
72744
+ *
72745
+ * 索引一条数据记录
72746
+ */
72747
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72748
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72749
+ return this.httpInstance
72750
+ .request({
72751
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`, path),
72752
+ method: "POST",
72753
+ data,
72754
+ params,
72755
+ headers,
72756
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72757
+ })
72758
+ .catch((e) => {
72759
+ this.logger.error(formatErrors(e));
72760
+ throw e;
72761
+ });
72762
+ }),
72763
+ /**
72764
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=delete&version=v2 click to debug }
72765
+ *
72766
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete document }
72767
+ *
72768
+ * 删除数据项
72769
+ *
72770
+ * 删除数据项
72771
+ */
72772
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72773
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72774
+ return this.httpInstance
72775
+ .request({
72776
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path),
72777
+ method: "DELETE",
72778
+ data,
72779
+ params,
72780
+ headers,
72781
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72782
+ })
72783
+ .catch((e) => {
72784
+ this.logger.error(formatErrors(e));
72785
+ throw e;
72786
+ });
72787
+ }),
72788
+ /**
72789
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=get&version=v2 click to debug }
72790
+ *
72791
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get document }
72792
+ *
72793
+ * 获取数据项
72794
+ *
72795
+ * 获取单个数据记录
72796
+ */
72797
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72798
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72799
+ return this.httpInstance
72800
+ .request({
72801
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path),
72802
+ method: "GET",
72803
+ data,
72804
+ params,
72805
+ headers,
72806
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72807
+ })
72808
+ .catch((e) => {
72809
+ this.logger.error(formatErrors(e));
72810
+ throw e;
72811
+ });
72812
+ }),
72813
+ },
72814
+ /**
72815
+ * message
72816
+ */
72817
+ message: {
72818
+ /**
72819
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=message&apiName=create&version=v2 click to debug }
72820
+ *
72821
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=message&version=v2 document }
72822
+ */
72823
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72824
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72825
+ return this.httpInstance
72826
+ .request({
72827
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/message`, path),
72828
+ method: "POST",
72829
+ data,
72830
+ params,
72831
+ headers,
72832
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72833
+ })
72834
+ .catch((e) => {
72835
+ this.logger.error(formatErrors(e));
72836
+ throw e;
72837
+ });
72838
+ }),
72839
+ },
72840
+ /**
72841
+ * 数据范式
72842
+ */
72843
+ schema: {
72844
+ /**
72845
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=create&version=v2 click to debug }
72846
+ *
72847
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create document }
72848
+ *
72849
+ * 创建数据范式
72850
+ *
72851
+ * 创建一个数据范式
72852
+ */
72853
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72854
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72855
+ return this.httpInstance
72856
+ .request({
72857
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas`, path),
72858
+ method: "POST",
72859
+ data,
72860
+ params,
72861
+ headers,
72862
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72863
+ })
72864
+ .catch((e) => {
72865
+ this.logger.error(formatErrors(e));
72866
+ throw e;
72867
+ });
72868
+ }),
72869
+ /**
72870
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=delete&version=v2 click to debug }
72871
+ *
72872
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete document }
72873
+ *
72874
+ * 删除数据范式
72875
+ *
72876
+ * 删除已存在的数据范式
72877
+ */
72878
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72879
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72880
+ return this.httpInstance
72881
+ .request({
72882
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path),
72883
+ method: "DELETE",
72884
+ data,
72885
+ params,
72886
+ headers,
72887
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72888
+ })
72889
+ .catch((e) => {
72890
+ this.logger.error(formatErrors(e));
72891
+ throw e;
72892
+ });
72893
+ }),
72894
+ /**
72895
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=get&version=v2 click to debug }
72896
+ *
72897
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get document }
72898
+ *
72899
+ * 获取数据范式
72900
+ *
72901
+ * 获取单个数据范式
72902
+ */
72903
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72904
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72905
+ return this.httpInstance
72906
+ .request({
72907
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path),
72908
+ method: "GET",
72909
+ data,
72910
+ params,
72911
+ headers,
72912
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72913
+ })
72914
+ .catch((e) => {
72915
+ this.logger.error(formatErrors(e));
72916
+ throw e;
72917
+ });
72918
+ }),
72919
+ /**
72920
+ * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=patch&version=v2 click to debug }
72921
+ *
72922
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch document }
72923
+ *
72924
+ * 修改数据范式
72925
+ *
72926
+ * 修改数据范式
72927
+ */
72928
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72929
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72930
+ return this.httpInstance
72931
+ .request({
72932
+ url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path),
72933
+ method: "PATCH",
72934
+ data,
72935
+ params,
72936
+ headers,
72937
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72938
+ })
72939
+ .catch((e) => {
72940
+ this.logger.error(formatErrors(e));
72941
+ throw e;
72942
+ });
72943
+ }),
72944
+ },
72945
+ },
72946
+ };
72947
+ }
72948
+ }
72949
+
72950
+ // auto gen
72951
+ class Client$d extends Client$e {
72952
+ constructor() {
72953
+ super(...arguments);
72954
+ /**
72955
+
72956
+ */
72957
+ this.security_and_compliance = {
72958
+ /**
72959
+ * openapi_log
72960
+ */
72961
+ openapiLog: {
72962
+ /**
72963
+ * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=openapi_log&apiName=list_data&version=v1 click to debug }
72964
+ *
72965
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_data&project=security_and_compliance&resource=openapi_log&version=v1 document }
72966
+ */
72967
+ listData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72968
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72969
+ return this.httpInstance
72970
+ .request({
72971
+ url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`, path),
72972
+ method: "POST",
72973
+ data,
72974
+ params,
72975
+ headers,
72976
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
72977
+ })
72978
+ .catch((e) => {
72979
+ this.logger.error(formatErrors(e));
72980
+ throw e;
72981
+ });
72982
+ }),
72983
+ },
72984
+ v1: {
72985
+ /**
72986
+ * openapi_log
72987
+ */
72988
+ openapiLog: {
72989
+ /**
72990
+ * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=openapi_log&apiName=list_data&version=v1 click to debug }
72991
+ *
72992
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_data&project=security_and_compliance&resource=openapi_log&version=v1 document }
72993
+ */
72994
+ listData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
72995
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
72996
+ return this.httpInstance
72997
+ .request({
72998
+ url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`, path),
72999
+ method: "POST",
73000
+ data,
73001
+ params,
73002
+ headers,
73003
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
73004
+ })
73005
+ .catch((e) => {
73006
+ this.logger.error(formatErrors(e));
73007
+ throw e;
73008
+ });
73009
+ }),
73010
+ },
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 }
71419
73160
  *
71420
- * 批量获取创建的数据源信息
73161
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=security_and_compliance&resource=device_record&version=v2 document }
71421
73162
  */
71422
73163
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71423
73164
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
71424
73165
  return this.httpInstance
71425
73166
  .request({
71426
- url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources`, path),
73167
+ url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records`, path),
71427
73168
  method: "GET",
71428
73169
  data,
71429
73170
  params,
@@ -71436,99 +73177,15 @@ class Client$e extends Client$f {
71436
73177
  });
71437
73178
  }),
71438
73179
  /**
71439
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source&apiName=patch&version=v2 click to debug }
71440
- *
71441
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch document }
71442
- *
71443
- * 修改数据源
71444
- *
71445
- * 更新一个已经存在的数据源
71446
- */
71447
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71448
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71449
- return this.httpInstance
71450
- .request({
71451
- url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id`, path),
71452
- method: "PATCH",
71453
- data,
71454
- params,
71455
- headers,
71456
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71457
- })
71458
- .catch((e) => {
71459
- this.logger.error(formatErrors(e));
71460
- throw e;
71461
- });
71462
- }),
71463
- },
71464
- /**
71465
- * 数据项
71466
- */
71467
- dataSourceItem: {
71468
- /**
71469
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=create&version=v2 click to debug }
71470
- *
71471
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create document }
71472
- *
71473
- * 索引数据项
71474
- *
71475
- * 索引一条数据记录
71476
- */
71477
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71478
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71479
- return this.httpInstance
71480
- .request({
71481
- url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items`, path),
71482
- method: "POST",
71483
- data,
71484
- params,
71485
- headers,
71486
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71487
- })
71488
- .catch((e) => {
71489
- this.logger.error(formatErrors(e));
71490
- throw e;
71491
- });
71492
- }),
71493
- /**
71494
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=delete&version=v2 click to debug }
71495
- *
71496
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete document }
71497
- *
71498
- * 删除数据项
71499
- *
71500
- * 删除数据项
71501
- */
71502
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71503
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71504
- return this.httpInstance
71505
- .request({
71506
- url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path),
71507
- method: "DELETE",
71508
- data,
71509
- params,
71510
- headers,
71511
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71512
- })
71513
- .catch((e) => {
71514
- this.logger.error(formatErrors(e));
71515
- throw e;
71516
- });
71517
- }),
71518
- /**
71519
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=data_source.item&apiName=get&version=v2 click to debug }
73180
+ * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=mine&version=v2 click to debug }
71520
73181
  *
71521
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get document }
71522
- *
71523
- * 获取数据项
71524
- *
71525
- * 获取单个数据记录
73182
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=mine&project=security_and_compliance&resource=device_record&version=v2 document }
71526
73183
  */
71527
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
73184
+ mine: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71528
73185
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
71529
73186
  return this.httpInstance
71530
73187
  .request({
71531
- url: fillApiPath(`${this.domain}/open-apis/search/v2/data_sources/:data_source_id/items/:item_id`, path),
73188
+ url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/mine`, path),
71532
73189
  method: "GET",
71533
73190
  data,
71534
73191
  params,
@@ -71540,193 +73197,17 @@ class Client$e extends Client$f {
71540
73197
  throw e;
71541
73198
  });
71542
73199
  }),
71543
- },
71544
- /**
71545
- * message
71546
- */
71547
- message: {
71548
- /**
71549
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=message&apiName=create&version=v2 click to debug }
71550
- *
71551
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=search&resource=message&version=v2 document }
71552
- */
71553
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71554
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71555
- return this.httpInstance
71556
- .request({
71557
- url: fillApiPath(`${this.domain}/open-apis/search/v2/message`, path),
71558
- method: "POST",
71559
- data,
71560
- params,
71561
- headers,
71562
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71563
- })
71564
- .catch((e) => {
71565
- this.logger.error(formatErrors(e));
71566
- throw e;
71567
- });
71568
- }),
71569
- },
71570
- /**
71571
- * 数据范式
71572
- */
71573
- schema: {
71574
73200
  /**
71575
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=create&version=v2 click to debug }
73201
+ * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=device_record&apiName=update&version=v2 click to debug }
71576
73202
  *
71577
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create document }
71578
- *
71579
- * 创建数据范式
71580
- *
71581
- * 创建一个数据范式
73203
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=security_and_compliance&resource=device_record&version=v2 document }
71582
73204
  */
71583
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71584
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71585
- return this.httpInstance
71586
- .request({
71587
- url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas`, path),
71588
- method: "POST",
71589
- data,
71590
- params,
71591
- headers,
71592
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71593
- })
71594
- .catch((e) => {
71595
- this.logger.error(formatErrors(e));
71596
- throw e;
71597
- });
71598
- }),
71599
- /**
71600
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=delete&version=v2 click to debug }
71601
- *
71602
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete document }
71603
- *
71604
- * 删除数据范式
71605
- *
71606
- * 删除已存在的数据范式
71607
- */
71608
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71609
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71610
- return this.httpInstance
71611
- .request({
71612
- url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path),
71613
- method: "DELETE",
71614
- data,
71615
- params,
71616
- headers,
71617
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71618
- })
71619
- .catch((e) => {
71620
- this.logger.error(formatErrors(e));
71621
- throw e;
71622
- });
71623
- }),
71624
- /**
71625
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=get&version=v2 click to debug }
71626
- *
71627
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get document }
71628
- *
71629
- * 获取数据范式
71630
- *
71631
- * 获取单个数据范式
71632
- */
71633
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71634
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71635
- return this.httpInstance
71636
- .request({
71637
- url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path),
71638
- method: "GET",
71639
- data,
71640
- params,
71641
- headers,
71642
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71643
- })
71644
- .catch((e) => {
71645
- this.logger.error(formatErrors(e));
71646
- throw e;
71647
- });
71648
- }),
71649
- /**
71650
- * {@link https://open.feishu.cn/api-explorer?project=search&resource=schema&apiName=patch&version=v2 click to debug }
71651
- *
71652
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch document }
71653
- *
71654
- * 修改数据范式
71655
- *
71656
- * 修改数据范式
71657
- */
71658
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71659
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71660
- return this.httpInstance
71661
- .request({
71662
- url: fillApiPath(`${this.domain}/open-apis/search/v2/schemas/:schema_id`, path),
71663
- method: "PATCH",
71664
- data,
71665
- params,
71666
- headers,
71667
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71668
- })
71669
- .catch((e) => {
71670
- this.logger.error(formatErrors(e));
71671
- throw e;
71672
- });
71673
- }),
71674
- },
71675
- },
71676
- };
71677
- }
71678
- }
71679
-
71680
- // auto gen
71681
- class Client$d extends Client$e {
71682
- constructor() {
71683
- super(...arguments);
71684
- /**
71685
-
71686
- */
71687
- this.security_and_compliance = {
71688
- /**
71689
- * openapi_log
71690
- */
71691
- openapiLog: {
71692
- /**
71693
- * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=openapi_log&apiName=list_data&version=v1 click to debug }
71694
- *
71695
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_data&project=security_and_compliance&resource=openapi_log&version=v1 document }
71696
- */
71697
- listData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71698
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
71699
- return this.httpInstance
71700
- .request({
71701
- url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`, path),
71702
- method: "POST",
71703
- data,
71704
- params,
71705
- headers,
71706
- paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
71707
- })
71708
- .catch((e) => {
71709
- this.logger.error(formatErrors(e));
71710
- throw e;
71711
- });
71712
- }),
71713
- },
71714
- v1: {
71715
- /**
71716
- * openapi_log
71717
- */
71718
- openapiLog: {
71719
- /**
71720
- * {@link https://open.feishu.cn/api-explorer?project=security_and_compliance&resource=openapi_log&apiName=list_data&version=v1 click to debug }
71721
- *
71722
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list_data&project=security_and_compliance&resource=openapi_log&version=v1 document }
71723
- */
71724
- listData: (payload, options) => __awaiter(this, void 0, void 0, function* () {
73205
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
71725
73206
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
71726
73207
  return this.httpInstance
71727
73208
  .request({
71728
- url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v1/openapi_logs/list_data`, path),
71729
- method: "POST",
73209
+ url: fillApiPath(`${this.domain}/open-apis/security_and_compliance/v2/device_records/:device_record_id`, path),
73210
+ method: "PUT",
71730
73211
  data,
71731
73212
  params,
71732
73213
  headers,
@@ -82511,6 +83992,7 @@ class Client extends Client$1 {
82511
83992
  });
82512
83993
  }
82513
83994
  request(payload, options) {
83995
+ var _a;
82514
83996
  return __awaiter(this, void 0, void 0, function* () {
82515
83997
  const { data, params, headers, url } = payload, rest = __rest(payload, ["data", "params", "headers", "url"]);
82516
83998
  const formatPayload = yield this.formatPayload({
@@ -82518,6 +84000,8 @@ class Client extends Client$1 {
82518
84000
  params,
82519
84001
  headers,
82520
84002
  }, options);
84003
+ // fix: #153
84004
+ const targetData = (((_a = payload.method) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'get' && Object.keys(formatPayload.data).length === 0) ? undefined : formatPayload.data;
82521
84005
  this.logger.trace(`send request [${payload.method}]: ${payload.url}`);
82522
84006
  const res = yield this.httpInstance
82523
84007
  .request(Object.assign(Object.assign({}, rest), {
@@ -82525,7 +84009,7 @@ class Client extends Client$1 {
82525
84009
  ? url
82526
84010
  : `${this.domain}/${formatUrl(url)}`,
82527
84011
  headers: formatPayload.headers,
82528
- data: formatPayload.data,
84012
+ data: targetData,
82529
84013
  params: formatPayload.params,
82530
84014
  }))
82531
84015
  .catch((e) => {