@larksuiteoapi/node-sdk 1.33.1 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -294,8 +294,16 @@ class Client$$ {
294
294
  this.logger.error(formatErrors(e));
295
295
  throw e;
296
296
  });
297
+ const checkIsReadable = () => {
298
+ const consumedError = "The stream has already been consumed";
299
+ if (!res.readable) {
300
+ this.logger.error(consumedError);
301
+ throw new Error(consumedError);
302
+ }
303
+ };
297
304
  return {
298
305
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
306
+ checkIsReadable();
299
307
  return new Promise((resolve, reject) => {
300
308
  const writableStream = fs__default["default"].createWriteStream(filePath);
301
309
  writableStream.on("finish", () => {
@@ -307,6 +315,10 @@ class Client$$ {
307
315
  res.pipe(writableStream);
308
316
  });
309
317
  }),
318
+ getReadableStream: () => {
319
+ checkIsReadable();
320
+ return res;
321
+ },
310
322
  };
311
323
  }),
312
324
  },
@@ -530,8 +542,16 @@ class Client$$ {
530
542
  this.logger.error(formatErrors(e));
531
543
  throw e;
532
544
  });
545
+ const checkIsReadable = () => {
546
+ const consumedError = "The stream has already been consumed";
547
+ if (!res.readable) {
548
+ this.logger.error(consumedError);
549
+ throw new Error(consumedError);
550
+ }
551
+ };
533
552
  return {
534
553
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
554
+ checkIsReadable();
535
555
  return new Promise((resolve, reject) => {
536
556
  const writableStream = fs__default["default"].createWriteStream(filePath);
537
557
  writableStream.on("finish", () => {
@@ -543,6 +563,10 @@ class Client$$ {
543
563
  res.pipe(writableStream);
544
564
  });
545
565
  }),
566
+ getReadableStream: () => {
567
+ checkIsReadable();
568
+ return res;
569
+ },
546
570
  };
547
571
  }),
548
572
  /**
@@ -775,8 +799,16 @@ class Client$$ {
775
799
  this.logger.error(formatErrors(e));
776
800
  throw e;
777
801
  });
802
+ const checkIsReadable = () => {
803
+ const consumedError = "The stream has already been consumed";
804
+ if (!res.readable) {
805
+ this.logger.error(consumedError);
806
+ throw new Error(consumedError);
807
+ }
808
+ };
778
809
  return {
779
810
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
811
+ checkIsReadable();
780
812
  return new Promise((resolve, reject) => {
781
813
  const writableStream = fs__default["default"].createWriteStream(filePath);
782
814
  writableStream.on("finish", () => {
@@ -788,6 +820,10 @@ class Client$$ {
788
820
  res.pipe(writableStream);
789
821
  });
790
822
  }),
823
+ getReadableStream: () => {
824
+ checkIsReadable();
825
+ return res;
826
+ },
791
827
  };
792
828
  }),
793
829
  },
@@ -1011,8 +1047,16 @@ class Client$$ {
1011
1047
  this.logger.error(formatErrors(e));
1012
1048
  throw e;
1013
1049
  });
1050
+ const checkIsReadable = () => {
1051
+ const consumedError = "The stream has already been consumed";
1052
+ if (!res.readable) {
1053
+ this.logger.error(consumedError);
1054
+ throw new Error(consumedError);
1055
+ }
1056
+ };
1014
1057
  return {
1015
1058
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
1059
+ checkIsReadable();
1016
1060
  return new Promise((resolve, reject) => {
1017
1061
  const writableStream = fs__default["default"].createWriteStream(filePath);
1018
1062
  writableStream.on("finish", () => {
@@ -1024,6 +1068,10 @@ class Client$$ {
1024
1068
  res.pipe(writableStream);
1025
1069
  });
1026
1070
  }),
1071
+ getReadableStream: () => {
1072
+ checkIsReadable();
1073
+ return res;
1074
+ },
1027
1075
  };
1028
1076
  }),
1029
1077
  /**
@@ -3297,6 +3345,51 @@ class Client$Y extends Client$Z {
3297
3345
  });
3298
3346
  }),
3299
3347
  },
3348
+ /**
3349
+ * scope
3350
+ */
3351
+ scope: {
3352
+ /**
3353
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=apply&version=v6 click to debug }
3354
+ *
3355
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=apply&project=application&resource=scope&version=v6 document }
3356
+ */
3357
+ apply: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3358
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3359
+ return this.httpInstance
3360
+ .request({
3361
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes/apply`, path),
3362
+ method: "POST",
3363
+ data,
3364
+ params,
3365
+ headers,
3366
+ })
3367
+ .catch((e) => {
3368
+ this.logger.error(formatErrors(e));
3369
+ throw e;
3370
+ });
3371
+ }),
3372
+ /**
3373
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=list&version=v6 click to debug }
3374
+ *
3375
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=application&resource=scope&version=v6 document }
3376
+ */
3377
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3378
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3379
+ return this.httpInstance
3380
+ .request({
3381
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes`, path),
3382
+ method: "GET",
3383
+ data,
3384
+ params,
3385
+ headers,
3386
+ })
3387
+ .catch((e) => {
3388
+ this.logger.error(formatErrors(e));
3389
+ throw e;
3390
+ });
3391
+ }),
3392
+ },
3300
3393
  v6: {
3301
3394
  /**
3302
3395
  * 应用红点
@@ -3930,6 +4023,51 @@ class Client$Y extends Client$Z {
3930
4023
  });
3931
4024
  }),
3932
4025
  },
4026
+ /**
4027
+ * scope
4028
+ */
4029
+ scope: {
4030
+ /**
4031
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=apply&version=v6 click to debug }
4032
+ *
4033
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=apply&project=application&resource=scope&version=v6 document }
4034
+ */
4035
+ apply: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4036
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4037
+ return this.httpInstance
4038
+ .request({
4039
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes/apply`, path),
4040
+ method: "POST",
4041
+ data,
4042
+ params,
4043
+ headers,
4044
+ })
4045
+ .catch((e) => {
4046
+ this.logger.error(formatErrors(e));
4047
+ throw e;
4048
+ });
4049
+ }),
4050
+ /**
4051
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=list&version=v6 click to debug }
4052
+ *
4053
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=application&resource=scope&version=v6 document }
4054
+ */
4055
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4056
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4057
+ return this.httpInstance
4058
+ .request({
4059
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes`, path),
4060
+ method: "GET",
4061
+ data,
4062
+ params,
4063
+ headers,
4064
+ })
4065
+ .catch((e) => {
4066
+ this.logger.error(formatErrors(e));
4067
+ throw e;
4068
+ });
4069
+ }),
4070
+ },
3933
4071
  },
3934
4072
  };
3935
4073
  }
@@ -4714,7 +4852,7 @@ class Client$X extends Client$Y {
4714
4852
  }),
4715
4853
  },
4716
4854
  /**
4717
- * 原生审批任务
4855
+ * 审批查询
4718
4856
  */
4719
4857
  task: {
4720
4858
  /**
@@ -5683,7 +5821,7 @@ class Client$X extends Client$Y {
5683
5821
  }),
5684
5822
  },
5685
5823
  /**
5686
- * 原生审批任务
5824
+ * 审批查询
5687
5825
  */
5688
5826
  task: {
5689
5827
  /**
@@ -6086,8 +6224,16 @@ class Client$W extends Client$X {
6086
6224
  this.logger.error(formatErrors(e));
6087
6225
  throw e;
6088
6226
  });
6227
+ const checkIsReadable = () => {
6228
+ const consumedError = "The stream has already been consumed";
6229
+ if (!res.readable) {
6230
+ this.logger.error(consumedError);
6231
+ throw new Error(consumedError);
6232
+ }
6233
+ };
6089
6234
  return {
6090
6235
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
6236
+ checkIsReadable();
6091
6237
  return new Promise((resolve, reject) => {
6092
6238
  const writableStream = fs__default["default"].createWriteStream(filePath);
6093
6239
  writableStream.on("finish", () => {
@@ -6099,6 +6245,10 @@ class Client$W extends Client$X {
6099
6245
  res.pipe(writableStream);
6100
6246
  });
6101
6247
  }),
6248
+ getReadableStream: () => {
6249
+ checkIsReadable();
6250
+ return res;
6251
+ },
6102
6252
  };
6103
6253
  }),
6104
6254
  /**
@@ -7188,8 +7338,16 @@ class Client$W extends Client$X {
7188
7338
  this.logger.error(formatErrors(e));
7189
7339
  throw e;
7190
7340
  });
7341
+ const checkIsReadable = () => {
7342
+ const consumedError = "The stream has already been consumed";
7343
+ if (!res.readable) {
7344
+ this.logger.error(consumedError);
7345
+ throw new Error(consumedError);
7346
+ }
7347
+ };
7191
7348
  return {
7192
7349
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
7350
+ checkIsReadable();
7193
7351
  return new Promise((resolve, reject) => {
7194
7352
  const writableStream = fs__default["default"].createWriteStream(filePath);
7195
7353
  writableStream.on("finish", () => {
@@ -7201,6 +7359,10 @@ class Client$W extends Client$X {
7201
7359
  res.pipe(writableStream);
7202
7360
  });
7203
7361
  }),
7362
+ getReadableStream: () => {
7363
+ checkIsReadable();
7364
+ return res;
7365
+ },
7204
7366
  };
7205
7367
  }),
7206
7368
  /**
@@ -9088,8 +9250,16 @@ class Client$S extends Client$T {
9088
9250
  this.logger.error(formatErrors(e));
9089
9251
  throw e;
9090
9252
  });
9253
+ const checkIsReadable = () => {
9254
+ const consumedError = "The stream has already been consumed";
9255
+ if (!res.readable) {
9256
+ this.logger.error(consumedError);
9257
+ throw new Error(consumedError);
9258
+ }
9259
+ };
9091
9260
  return {
9092
9261
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
9262
+ checkIsReadable();
9093
9263
  return new Promise((resolve, reject) => {
9094
9264
  const writableStream = fs__default["default"].createWriteStream(filePath);
9095
9265
  writableStream.on("finish", () => {
@@ -9101,6 +9271,10 @@ class Client$S extends Client$T {
9101
9271
  res.pipe(writableStream);
9102
9272
  });
9103
9273
  }),
9274
+ getReadableStream: () => {
9275
+ checkIsReadable();
9276
+ return res;
9277
+ },
9104
9278
  };
9105
9279
  }),
9106
9280
  /**
@@ -9590,8 +9764,16 @@ class Client$S extends Client$T {
9590
9764
  this.logger.error(formatErrors(e));
9591
9765
  throw e;
9592
9766
  });
9767
+ const checkIsReadable = () => {
9768
+ const consumedError = "The stream has already been consumed";
9769
+ if (!res.readable) {
9770
+ this.logger.error(consumedError);
9771
+ throw new Error(consumedError);
9772
+ }
9773
+ };
9593
9774
  return {
9594
9775
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
9776
+ checkIsReadable();
9595
9777
  return new Promise((resolve, reject) => {
9596
9778
  const writableStream = fs__default["default"].createWriteStream(filePath);
9597
9779
  writableStream.on("finish", () => {
@@ -9603,6 +9785,10 @@ class Client$S extends Client$T {
9603
9785
  res.pipe(writableStream);
9604
9786
  });
9605
9787
  }),
9788
+ getReadableStream: () => {
9789
+ checkIsReadable();
9790
+ return res;
9791
+ },
9606
9792
  };
9607
9793
  }),
9608
9794
  /**
@@ -13041,8 +13227,16 @@ class Client$P extends Client$Q {
13041
13227
  this.logger.error(formatErrors(e));
13042
13228
  throw e;
13043
13229
  });
13230
+ const checkIsReadable = () => {
13231
+ const consumedError = "The stream has already been consumed";
13232
+ if (!res.readable) {
13233
+ this.logger.error(consumedError);
13234
+ throw new Error(consumedError);
13235
+ }
13236
+ };
13044
13237
  return {
13045
13238
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
13239
+ checkIsReadable();
13046
13240
  return new Promise((resolve, reject) => {
13047
13241
  const writableStream = fs__default["default"].createWriteStream(filePath);
13048
13242
  writableStream.on("finish", () => {
@@ -13054,6 +13248,10 @@ class Client$P extends Client$Q {
13054
13248
  res.pipe(writableStream);
13055
13249
  });
13056
13250
  }),
13251
+ getReadableStream: () => {
13252
+ checkIsReadable();
13253
+ return res;
13254
+ },
13057
13255
  };
13058
13256
  }),
13059
13257
  },
@@ -22028,8 +22226,16 @@ class Client$I extends Client$J {
22028
22226
  this.logger.error(formatErrors(e));
22029
22227
  throw e;
22030
22228
  });
22229
+ const checkIsReadable = () => {
22230
+ const consumedError = "The stream has already been consumed";
22231
+ if (!res.readable) {
22232
+ this.logger.error(consumedError);
22233
+ throw new Error(consumedError);
22234
+ }
22235
+ };
22031
22236
  return {
22032
22237
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
22238
+ checkIsReadable();
22033
22239
  return new Promise((resolve, reject) => {
22034
22240
  const writableStream = fs__default["default"].createWriteStream(filePath);
22035
22241
  writableStream.on("finish", () => {
@@ -22041,6 +22247,10 @@ class Client$I extends Client$J {
22041
22247
  res.pipe(writableStream);
22042
22248
  });
22043
22249
  }),
22250
+ getReadableStream: () => {
22251
+ checkIsReadable();
22252
+ return res;
22253
+ },
22044
22254
  };
22045
22255
  }),
22046
22256
  },
@@ -22577,6 +22787,26 @@ class Client$I extends Client$J {
22577
22787
  * 休假管理
22578
22788
  */
22579
22789
  leave: {
22790
+ /**
22791
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=calendar_by_scope&version=v1 click to debug }
22792
+ *
22793
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=calendar_by_scope&project=corehr&resource=leave&version=v1 document }
22794
+ */
22795
+ calendarByScope: (payload, options) => __awaiter(this, void 0, void 0, function* () {
22796
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
22797
+ return this.httpInstance
22798
+ .request({
22799
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`, path),
22800
+ method: "GET",
22801
+ data,
22802
+ params,
22803
+ headers,
22804
+ })
22805
+ .catch((e) => {
22806
+ this.logger.error(formatErrors(e));
22807
+ throw e;
22808
+ });
22809
+ }),
22580
22810
  /**
22581
22811
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
22582
22812
  *
@@ -24675,8 +24905,16 @@ class Client$I extends Client$J {
24675
24905
  this.logger.error(formatErrors(e));
24676
24906
  throw e;
24677
24907
  });
24908
+ const checkIsReadable = () => {
24909
+ const consumedError = "The stream has already been consumed";
24910
+ if (!res.readable) {
24911
+ this.logger.error(consumedError);
24912
+ throw new Error(consumedError);
24913
+ }
24914
+ };
24678
24915
  return {
24679
24916
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
24917
+ checkIsReadable();
24680
24918
  return new Promise((resolve, reject) => {
24681
24919
  const writableStream = fs__default["default"].createWriteStream(filePath);
24682
24920
  writableStream.on("finish", () => {
@@ -24688,6 +24926,10 @@ class Client$I extends Client$J {
24688
24926
  res.pipe(writableStream);
24689
24927
  });
24690
24928
  }),
24929
+ getReadableStream: () => {
24930
+ checkIsReadable();
24931
+ return res;
24932
+ },
24691
24933
  };
24692
24934
  }),
24693
24935
  },
@@ -25224,6 +25466,26 @@ class Client$I extends Client$J {
25224
25466
  * 休假管理
25225
25467
  */
25226
25468
  leave: {
25469
+ /**
25470
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=calendar_by_scope&version=v1 click to debug }
25471
+ *
25472
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=calendar_by_scope&project=corehr&resource=leave&version=v1 document }
25473
+ */
25474
+ calendarByScope: (payload, options) => __awaiter(this, void 0, void 0, function* () {
25475
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
25476
+ return this.httpInstance
25477
+ .request({
25478
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`, path),
25479
+ method: "GET",
25480
+ data,
25481
+ params,
25482
+ headers,
25483
+ })
25484
+ .catch((e) => {
25485
+ this.logger.error(formatErrors(e));
25486
+ throw e;
25487
+ });
25488
+ }),
25227
25489
  /**
25228
25490
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
25229
25491
  *
@@ -27277,6 +27539,28 @@ class Client$I extends Client$J {
27277
27539
  throw e;
27278
27540
  });
27279
27541
  }),
27542
+ /**
27543
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v2 click to debug }
27544
+ *
27545
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=department&version=v2 document }
27546
+ *
27547
+ * 删除部门数据
27548
+ */
27549
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
27550
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
27551
+ return this.httpInstance
27552
+ .request({
27553
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/:department_id`, path),
27554
+ method: "DELETE",
27555
+ data,
27556
+ params,
27557
+ headers,
27558
+ })
27559
+ .catch((e) => {
27560
+ this.logger.error(formatErrors(e));
27561
+ throw e;
27562
+ });
27563
+ }),
27280
27564
  /**
27281
27565
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=parents&version=v2 click to debug }
27282
27566
  *
@@ -27297,6 +27581,28 @@ class Client$I extends Client$J {
27297
27581
  throw e;
27298
27582
  });
27299
27583
  }),
27584
+ /**
27585
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v2 click to debug }
27586
+ *
27587
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=department&version=v2 document }
27588
+ *
27589
+ * 更新部门数据
27590
+ */
27591
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
27592
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
27593
+ return this.httpInstance
27594
+ .request({
27595
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/:department_id`, path),
27596
+ method: "PATCH",
27597
+ data,
27598
+ params,
27599
+ headers,
27600
+ })
27601
+ .catch((e) => {
27602
+ this.logger.error(formatErrors(e));
27603
+ throw e;
27604
+ });
27605
+ }),
27300
27606
  /**
27301
27607
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_multi_timeline&version=v2 click to debug }
27302
27608
  *
@@ -29861,8 +30167,16 @@ class Client$E extends Client$F {
29861
30167
  this.logger.error(formatErrors(e));
29862
30168
  throw e;
29863
30169
  });
30170
+ const checkIsReadable = () => {
30171
+ const consumedError = "The stream has already been consumed";
30172
+ if (!res.readable) {
30173
+ this.logger.error(consumedError);
30174
+ throw new Error(consumedError);
30175
+ }
30176
+ };
29864
30177
  return {
29865
30178
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
30179
+ checkIsReadable();
29866
30180
  return new Promise((resolve, reject) => {
29867
30181
  const writableStream = fs__default["default"].createWriteStream(filePath);
29868
30182
  writableStream.on("finish", () => {
@@ -29874,6 +30188,10 @@ class Client$E extends Client$F {
29874
30188
  res.pipe(writableStream);
29875
30189
  });
29876
30190
  }),
30191
+ getReadableStream: () => {
30192
+ checkIsReadable();
30193
+ return res;
30194
+ },
29877
30195
  };
29878
30196
  }),
29879
30197
  /**
@@ -30202,7 +30520,7 @@ class Client$E extends Client$F {
30202
30520
  }),
30203
30521
  },
30204
30522
  /**
30205
- * 分片上传
30523
+ * 上传
30206
30524
  */
30207
30525
  file: {
30208
30526
  /**
@@ -30355,8 +30673,16 @@ class Client$E extends Client$F {
30355
30673
  this.logger.error(formatErrors(e));
30356
30674
  throw e;
30357
30675
  });
30676
+ const checkIsReadable = () => {
30677
+ const consumedError = "The stream has already been consumed";
30678
+ if (!res.readable) {
30679
+ this.logger.error(consumedError);
30680
+ throw new Error(consumedError);
30681
+ }
30682
+ };
30358
30683
  return {
30359
30684
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
30685
+ checkIsReadable();
30360
30686
  return new Promise((resolve, reject) => {
30361
30687
  const writableStream = fs__default["default"].createWriteStream(filePath);
30362
30688
  writableStream.on("finish", () => {
@@ -30368,6 +30694,10 @@ class Client$E extends Client$F {
30368
30694
  res.pipe(writableStream);
30369
30695
  });
30370
30696
  }),
30697
+ getReadableStream: () => {
30698
+ checkIsReadable();
30699
+ return res;
30700
+ },
30371
30701
  };
30372
30702
  }),
30373
30703
  /**
@@ -31089,8 +31419,16 @@ class Client$E extends Client$F {
31089
31419
  this.logger.error(formatErrors(e));
31090
31420
  throw e;
31091
31421
  });
31422
+ const checkIsReadable = () => {
31423
+ const consumedError = "The stream has already been consumed";
31424
+ if (!res.readable) {
31425
+ this.logger.error(consumedError);
31426
+ throw new Error(consumedError);
31427
+ }
31428
+ };
31092
31429
  return {
31093
31430
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
31431
+ checkIsReadable();
31094
31432
  return new Promise((resolve, reject) => {
31095
31433
  const writableStream = fs__default["default"].createWriteStream(filePath);
31096
31434
  writableStream.on("finish", () => {
@@ -31102,6 +31440,10 @@ class Client$E extends Client$F {
31102
31440
  res.pipe(writableStream);
31103
31441
  });
31104
31442
  }),
31443
+ getReadableStream: () => {
31444
+ checkIsReadable();
31445
+ return res;
31446
+ },
31105
31447
  };
31106
31448
  }),
31107
31449
  /**
@@ -31580,8 +31922,16 @@ class Client$E extends Client$F {
31580
31922
  this.logger.error(formatErrors(e));
31581
31923
  throw e;
31582
31924
  });
31925
+ const checkIsReadable = () => {
31926
+ const consumedError = "The stream has already been consumed";
31927
+ if (!res.readable) {
31928
+ this.logger.error(consumedError);
31929
+ throw new Error(consumedError);
31930
+ }
31931
+ };
31583
31932
  return {
31584
31933
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
31934
+ checkIsReadable();
31585
31935
  return new Promise((resolve, reject) => {
31586
31936
  const writableStream = fs__default["default"].createWriteStream(filePath);
31587
31937
  writableStream.on("finish", () => {
@@ -31593,6 +31943,10 @@ class Client$E extends Client$F {
31593
31943
  res.pipe(writableStream);
31594
31944
  });
31595
31945
  }),
31946
+ getReadableStream: () => {
31947
+ checkIsReadable();
31948
+ return res;
31949
+ },
31596
31950
  };
31597
31951
  }),
31598
31952
  /**
@@ -31921,7 +32275,7 @@ class Client$E extends Client$F {
31921
32275
  }),
31922
32276
  },
31923
32277
  /**
31924
- * 分片上传
32278
+ * 上传
31925
32279
  */
31926
32280
  file: {
31927
32281
  /**
@@ -32074,8 +32428,16 @@ class Client$E extends Client$F {
32074
32428
  this.logger.error(formatErrors(e));
32075
32429
  throw e;
32076
32430
  });
32431
+ const checkIsReadable = () => {
32432
+ const consumedError = "The stream has already been consumed";
32433
+ if (!res.readable) {
32434
+ this.logger.error(consumedError);
32435
+ throw new Error(consumedError);
32436
+ }
32437
+ };
32077
32438
  return {
32078
32439
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
32440
+ checkIsReadable();
32079
32441
  return new Promise((resolve, reject) => {
32080
32442
  const writableStream = fs__default["default"].createWriteStream(filePath);
32081
32443
  writableStream.on("finish", () => {
@@ -32087,6 +32449,10 @@ class Client$E extends Client$F {
32087
32449
  res.pipe(writableStream);
32088
32450
  });
32089
32451
  }),
32452
+ getReadableStream: () => {
32453
+ checkIsReadable();
32454
+ return res;
32455
+ },
32090
32456
  };
32091
32457
  }),
32092
32458
  /**
@@ -32808,8 +33174,16 @@ class Client$E extends Client$F {
32808
33174
  this.logger.error(formatErrors(e));
32809
33175
  throw e;
32810
33176
  });
33177
+ const checkIsReadable = () => {
33178
+ const consumedError = "The stream has already been consumed";
33179
+ if (!res.readable) {
33180
+ this.logger.error(consumedError);
33181
+ throw new Error(consumedError);
33182
+ }
33183
+ };
32811
33184
  return {
32812
33185
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
33186
+ checkIsReadable();
32813
33187
  return new Promise((resolve, reject) => {
32814
33188
  const writableStream = fs__default["default"].createWriteStream(filePath);
32815
33189
  writableStream.on("finish", () => {
@@ -32821,6 +33195,10 @@ class Client$E extends Client$F {
32821
33195
  res.pipe(writableStream);
32822
33196
  });
32823
33197
  }),
33198
+ getReadableStream: () => {
33199
+ checkIsReadable();
33200
+ return res;
33201
+ },
32824
33202
  };
32825
33203
  }),
32826
33204
  /**
@@ -33347,8 +33725,16 @@ class Client$C extends Client$D {
33347
33725
  this.logger.error(formatErrors(e));
33348
33726
  throw e;
33349
33727
  });
33728
+ const checkIsReadable = () => {
33729
+ const consumedError = "The stream has already been consumed";
33730
+ if (!res.readable) {
33731
+ this.logger.error(consumedError);
33732
+ throw new Error(consumedError);
33733
+ }
33734
+ };
33350
33735
  return {
33351
33736
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
33737
+ checkIsReadable();
33352
33738
  return new Promise((resolve, reject) => {
33353
33739
  const writableStream = fs__default["default"].createWriteStream(filePath);
33354
33740
  writableStream.on("finish", () => {
@@ -33360,6 +33746,10 @@ class Client$C extends Client$D {
33360
33746
  res.pipe(writableStream);
33361
33747
  });
33362
33748
  }),
33749
+ getReadableStream: () => {
33750
+ checkIsReadable();
33751
+ return res;
33752
+ },
33363
33753
  };
33364
33754
  }),
33365
33755
  },
@@ -33472,8 +33862,16 @@ class Client$C extends Client$D {
33472
33862
  this.logger.error(formatErrors(e));
33473
33863
  throw e;
33474
33864
  });
33865
+ const checkIsReadable = () => {
33866
+ const consumedError = "The stream has already been consumed";
33867
+ if (!res.readable) {
33868
+ this.logger.error(consumedError);
33869
+ throw new Error(consumedError);
33870
+ }
33871
+ };
33475
33872
  return {
33476
33873
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
33874
+ checkIsReadable();
33477
33875
  return new Promise((resolve, reject) => {
33478
33876
  const writableStream = fs__default["default"].createWriteStream(filePath);
33479
33877
  writableStream.on("finish", () => {
@@ -33485,6 +33883,10 @@ class Client$C extends Client$D {
33485
33883
  res.pipe(writableStream);
33486
33884
  });
33487
33885
  }),
33886
+ getReadableStream: () => {
33887
+ checkIsReadable();
33888
+ return res;
33889
+ },
33488
33890
  };
33489
33891
  }),
33490
33892
  },
@@ -34659,8 +35061,16 @@ class Client$v extends Client$w {
34659
35061
  this.logger.error(formatErrors(e));
34660
35062
  throw e;
34661
35063
  });
35064
+ const checkIsReadable = () => {
35065
+ const consumedError = "The stream has already been consumed";
35066
+ if (!res.readable) {
35067
+ this.logger.error(consumedError);
35068
+ throw new Error(consumedError);
35069
+ }
35070
+ };
34662
35071
  return {
34663
35072
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
35073
+ checkIsReadable();
34664
35074
  return new Promise((resolve, reject) => {
34665
35075
  const writableStream = fs__default["default"].createWriteStream(filePath);
34666
35076
  writableStream.on("finish", () => {
@@ -34672,6 +35082,10 @@ class Client$v extends Client$w {
34672
35082
  res.pipe(writableStream);
34673
35083
  });
34674
35084
  }),
35085
+ getReadableStream: () => {
35086
+ checkIsReadable();
35087
+ return res;
35088
+ },
34675
35089
  };
34676
35090
  }),
34677
35091
  /**
@@ -35214,8 +35628,16 @@ class Client$v extends Client$w {
35214
35628
  this.logger.error(formatErrors(e));
35215
35629
  throw e;
35216
35630
  });
35631
+ const checkIsReadable = () => {
35632
+ const consumedError = "The stream has already been consumed";
35633
+ if (!res.readable) {
35634
+ this.logger.error(consumedError);
35635
+ throw new Error(consumedError);
35636
+ }
35637
+ };
35217
35638
  return {
35218
35639
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
35640
+ checkIsReadable();
35219
35641
  return new Promise((resolve, reject) => {
35220
35642
  const writableStream = fs__default["default"].createWriteStream(filePath);
35221
35643
  writableStream.on("finish", () => {
@@ -35227,6 +35649,10 @@ class Client$v extends Client$w {
35227
35649
  res.pipe(writableStream);
35228
35650
  });
35229
35651
  }),
35652
+ getReadableStream: () => {
35653
+ checkIsReadable();
35654
+ return res;
35655
+ },
35230
35656
  };
35231
35657
  }),
35232
35658
  /**
@@ -36102,8 +36528,16 @@ class Client$v extends Client$w {
36102
36528
  this.logger.error(formatErrors(e));
36103
36529
  throw e;
36104
36530
  });
36531
+ const checkIsReadable = () => {
36532
+ const consumedError = "The stream has already been consumed";
36533
+ if (!res.readable) {
36534
+ this.logger.error(consumedError);
36535
+ throw new Error(consumedError);
36536
+ }
36537
+ };
36105
36538
  return {
36106
36539
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
36540
+ checkIsReadable();
36107
36541
  return new Promise((resolve, reject) => {
36108
36542
  const writableStream = fs__default["default"].createWriteStream(filePath);
36109
36543
  writableStream.on("finish", () => {
@@ -36115,6 +36549,10 @@ class Client$v extends Client$w {
36115
36549
  res.pipe(writableStream);
36116
36550
  });
36117
36551
  }),
36552
+ getReadableStream: () => {
36553
+ checkIsReadable();
36554
+ return res;
36555
+ },
36118
36556
  };
36119
36557
  }),
36120
36558
  /**
@@ -36657,8 +37095,16 @@ class Client$v extends Client$w {
36657
37095
  this.logger.error(formatErrors(e));
36658
37096
  throw e;
36659
37097
  });
37098
+ const checkIsReadable = () => {
37099
+ const consumedError = "The stream has already been consumed";
37100
+ if (!res.readable) {
37101
+ this.logger.error(consumedError);
37102
+ throw new Error(consumedError);
37103
+ }
37104
+ };
36660
37105
  return {
36661
37106
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
37107
+ checkIsReadable();
36662
37108
  return new Promise((resolve, reject) => {
36663
37109
  const writableStream = fs__default["default"].createWriteStream(filePath);
36664
37110
  writableStream.on("finish", () => {
@@ -36670,6 +37116,10 @@ class Client$v extends Client$w {
36670
37116
  res.pipe(writableStream);
36671
37117
  });
36672
37118
  }),
37119
+ getReadableStream: () => {
37120
+ checkIsReadable();
37121
+ return res;
37122
+ },
36673
37123
  };
36674
37124
  }),
36675
37125
  /**
@@ -37064,7 +37514,7 @@ class Client$u extends Client$v {
37064
37514
  }),
37065
37515
  },
37066
37516
  /**
37067
- * 入职
37517
+ * 投递
37068
37518
  */
37069
37519
  application: {
37070
37520
  /**
@@ -38927,6 +39377,100 @@ class Client$u extends Client$v {
38927
39377
  });
38928
39378
  }),
38929
39379
  },
39380
+ /**
39381
+ * interviewer
39382
+ */
39383
+ interviewer: {
39384
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39385
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
39386
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
39387
+ const res = yield this.httpInstance
39388
+ .request({
39389
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
39390
+ method: "GET",
39391
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
39392
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
39393
+ data,
39394
+ })
39395
+ .catch((e) => {
39396
+ this.logger.error(formatErrors(e));
39397
+ });
39398
+ return res;
39399
+ });
39400
+ const Iterable = {
39401
+ [Symbol.asyncIterator]() {
39402
+ return __asyncGenerator(this, arguments, function* _a() {
39403
+ let hasMore = true;
39404
+ let pageToken;
39405
+ while (hasMore) {
39406
+ try {
39407
+ const res = yield __await(sendRequest({
39408
+ headers,
39409
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
39410
+ data,
39411
+ }));
39412
+ const _b = get__default["default"](res, "data") || {}, {
39413
+ // @ts-ignore
39414
+ has_more,
39415
+ // @ts-ignore
39416
+ page_token,
39417
+ // @ts-ignore
39418
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
39419
+ yield yield __await(rest);
39420
+ hasMore = Boolean(has_more);
39421
+ pageToken = page_token || next_page_token;
39422
+ }
39423
+ catch (e) {
39424
+ yield yield __await(null);
39425
+ break;
39426
+ }
39427
+ }
39428
+ });
39429
+ },
39430
+ };
39431
+ return Iterable;
39432
+ }),
39433
+ /**
39434
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=list&version=v1 click to debug }
39435
+ *
39436
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interviewer&version=v1 document }
39437
+ */
39438
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39439
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
39440
+ return this.httpInstance
39441
+ .request({
39442
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
39443
+ method: "GET",
39444
+ data,
39445
+ params,
39446
+ headers,
39447
+ })
39448
+ .catch((e) => {
39449
+ this.logger.error(formatErrors(e));
39450
+ throw e;
39451
+ });
39452
+ }),
39453
+ /**
39454
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=patch&version=v1 click to debug }
39455
+ *
39456
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=interviewer&version=v1 document }
39457
+ */
39458
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39459
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
39460
+ return this.httpInstance
39461
+ .request({
39462
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`, path),
39463
+ method: "PATCH",
39464
+ data,
39465
+ params,
39466
+ headers,
39467
+ })
39468
+ .catch((e) => {
39469
+ this.logger.error(formatErrors(e));
39470
+ throw e;
39471
+ });
39472
+ }),
39473
+ },
38930
39474
  /**
38931
39475
  * 职位
38932
39476
  */
@@ -39686,6 +40230,31 @@ class Client$u extends Client$v {
39686
40230
  });
39687
40231
  }),
39688
40232
  },
40233
+ /**
40234
+ * minutes
40235
+ */
40236
+ minutes: {
40237
+ /**
40238
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=minutes&apiName=get&version=v1 click to debug }
40239
+ *
40240
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=minutes&version=v1 document }
40241
+ */
40242
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
40243
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
40244
+ return this.httpInstance
40245
+ .request({
40246
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/minutes`, path),
40247
+ method: "GET",
40248
+ data,
40249
+ params,
40250
+ headers,
40251
+ })
40252
+ .catch((e) => {
40253
+ this.logger.error(formatErrors(e));
40254
+ throw e;
40255
+ });
40256
+ }),
40257
+ },
39689
40258
  /**
39690
40259
  * 备注
39691
40260
  */
@@ -41261,45 +41830,134 @@ class Client$u extends Client$v {
41261
41830
  return Iterable;
41262
41831
  }),
41263
41832
  /**
41264
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
41265
- *
41266
- * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
41267
- *
41268
- * 获取待办列表
41833
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
41834
+ *
41835
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
41836
+ *
41837
+ * 获取待办列表
41838
+ *
41839
+ * 获取待办列表
41840
+ */
41841
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41842
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41843
+ return this.httpInstance
41844
+ .request({
41845
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
41846
+ method: "GET",
41847
+ data,
41848
+ params,
41849
+ headers,
41850
+ })
41851
+ .catch((e) => {
41852
+ this.logger.error(formatErrors(e));
41853
+ throw e;
41854
+ });
41855
+ }),
41856
+ },
41857
+ /**
41858
+ * tripartite_agreement
41859
+ */
41860
+ tripartiteAgreement: {
41861
+ /**
41862
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
41863
+ *
41864
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
41865
+ */
41866
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41867
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41868
+ return this.httpInstance
41869
+ .request({
41870
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41871
+ method: "POST",
41872
+ data,
41873
+ params,
41874
+ headers,
41875
+ })
41876
+ .catch((e) => {
41877
+ this.logger.error(formatErrors(e));
41878
+ throw e;
41879
+ });
41880
+ }),
41881
+ /**
41882
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
41883
+ *
41884
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
41885
+ */
41886
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41887
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41888
+ return this.httpInstance
41889
+ .request({
41890
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
41891
+ method: "DELETE",
41892
+ data,
41893
+ params,
41894
+ headers,
41895
+ })
41896
+ .catch((e) => {
41897
+ this.logger.error(formatErrors(e));
41898
+ throw e;
41899
+ });
41900
+ }),
41901
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41902
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41903
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41904
+ const res = yield this.httpInstance
41905
+ .request({
41906
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41907
+ method: "GET",
41908
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
41909
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
41910
+ data,
41911
+ })
41912
+ .catch((e) => {
41913
+ this.logger.error(formatErrors(e));
41914
+ });
41915
+ return res;
41916
+ });
41917
+ const Iterable = {
41918
+ [Symbol.asyncIterator]() {
41919
+ return __asyncGenerator(this, arguments, function* _a() {
41920
+ let hasMore = true;
41921
+ let pageToken;
41922
+ while (hasMore) {
41923
+ try {
41924
+ const res = yield __await(sendRequest({
41925
+ headers,
41926
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41927
+ data,
41928
+ }));
41929
+ const _b = get__default["default"](res, "data") || {}, {
41930
+ // @ts-ignore
41931
+ has_more,
41932
+ // @ts-ignore
41933
+ page_token,
41934
+ // @ts-ignore
41935
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41936
+ yield yield __await(rest);
41937
+ hasMore = Boolean(has_more);
41938
+ pageToken = page_token || next_page_token;
41939
+ }
41940
+ catch (e) {
41941
+ yield yield __await(null);
41942
+ break;
41943
+ }
41944
+ }
41945
+ });
41946
+ },
41947
+ };
41948
+ return Iterable;
41949
+ }),
41950
+ /**
41951
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
41269
41952
  *
41270
- * 获取待办列表
41953
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
41271
41954
  */
41272
41955
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41273
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
41274
- return this.httpInstance
41275
- .request({
41276
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
41277
- method: "GET",
41278
- data,
41279
- params,
41280
- headers,
41281
- })
41282
- .catch((e) => {
41283
- this.logger.error(formatErrors(e));
41284
- throw e;
41285
- });
41286
- }),
41287
- },
41288
- /**
41289
- * tripartite_agreement
41290
- */
41291
- tripartiteAgreement: {
41292
- /**
41293
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
41294
- *
41295
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
41296
- */
41297
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41298
41956
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41299
41957
  return this.httpInstance
41300
41958
  .request({
41301
41959
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41302
- method: "POST",
41960
+ method: "GET",
41303
41961
  data,
41304
41962
  params,
41305
41963
  headers,
@@ -41310,16 +41968,16 @@ class Client$u extends Client$v {
41310
41968
  });
41311
41969
  }),
41312
41970
  /**
41313
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
41971
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
41314
41972
  *
41315
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
41973
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
41316
41974
  */
41317
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41975
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41318
41976
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41319
41977
  return this.httpInstance
41320
41978
  .request({
41321
41979
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
41322
- method: "DELETE",
41980
+ method: "PUT",
41323
41981
  data,
41324
41982
  params,
41325
41983
  headers,
@@ -41329,12 +41987,17 @@ class Client$u extends Client$v {
41329
41987
  throw e;
41330
41988
  });
41331
41989
  }),
41990
+ },
41991
+ /**
41992
+ * 权限
41993
+ */
41994
+ userRole: {
41332
41995
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41333
41996
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41334
41997
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41335
41998
  const res = yield this.httpInstance
41336
41999
  .request({
41337
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
42000
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
41338
42001
  method: "GET",
41339
42002
  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
41340
42003
  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
@@ -41379,15 +42042,19 @@ class Client$u extends Client$v {
41379
42042
  return Iterable;
41380
42043
  }),
41381
42044
  /**
41382
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
42045
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=user_role&apiName=list&version=v1 click to debug }
41383
42046
  *
41384
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
42047
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list document }
42048
+ *
42049
+ * 获取用户角色列表
42050
+ *
42051
+ * 获取用户角色列表
41385
42052
  */
41386
42053
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41387
42054
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41388
42055
  return this.httpInstance
41389
42056
  .request({
41390
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
42057
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
41391
42058
  method: "GET",
41392
42059
  data,
41393
42060
  params,
@@ -41398,26 +42065,6 @@ class Client$u extends Client$v {
41398
42065
  throw e;
41399
42066
  });
41400
42067
  }),
41401
- /**
41402
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
41403
- *
41404
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
41405
- */
41406
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41407
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
41408
- return this.httpInstance
41409
- .request({
41410
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
41411
- method: "PUT",
41412
- data,
41413
- params,
41414
- headers,
41415
- })
41416
- .catch((e) => {
41417
- this.logger.error(formatErrors(e));
41418
- throw e;
41419
- });
41420
- }),
41421
42068
  },
41422
42069
  /**
41423
42070
  * website.channel
@@ -42014,7 +42661,7 @@ class Client$u extends Client$v {
42014
42661
  }),
42015
42662
  },
42016
42663
  /**
42017
- * 入职
42664
+ * 投递
42018
42665
  */
42019
42666
  application: {
42020
42667
  /**
@@ -43877,6 +44524,100 @@ class Client$u extends Client$v {
43877
44524
  });
43878
44525
  }),
43879
44526
  },
44527
+ /**
44528
+ * interviewer
44529
+ */
44530
+ interviewer: {
44531
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
44532
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
44533
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
44534
+ const res = yield this.httpInstance
44535
+ .request({
44536
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
44537
+ method: "GET",
44538
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
44539
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
44540
+ data,
44541
+ })
44542
+ .catch((e) => {
44543
+ this.logger.error(formatErrors(e));
44544
+ });
44545
+ return res;
44546
+ });
44547
+ const Iterable = {
44548
+ [Symbol.asyncIterator]() {
44549
+ return __asyncGenerator(this, arguments, function* _a() {
44550
+ let hasMore = true;
44551
+ let pageToken;
44552
+ while (hasMore) {
44553
+ try {
44554
+ const res = yield __await(sendRequest({
44555
+ headers,
44556
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
44557
+ data,
44558
+ }));
44559
+ const _b = get__default["default"](res, "data") || {}, {
44560
+ // @ts-ignore
44561
+ has_more,
44562
+ // @ts-ignore
44563
+ page_token,
44564
+ // @ts-ignore
44565
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
44566
+ yield yield __await(rest);
44567
+ hasMore = Boolean(has_more);
44568
+ pageToken = page_token || next_page_token;
44569
+ }
44570
+ catch (e) {
44571
+ yield yield __await(null);
44572
+ break;
44573
+ }
44574
+ }
44575
+ });
44576
+ },
44577
+ };
44578
+ return Iterable;
44579
+ }),
44580
+ /**
44581
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=list&version=v1 click to debug }
44582
+ *
44583
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interviewer&version=v1 document }
44584
+ */
44585
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
44586
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
44587
+ return this.httpInstance
44588
+ .request({
44589
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
44590
+ method: "GET",
44591
+ data,
44592
+ params,
44593
+ headers,
44594
+ })
44595
+ .catch((e) => {
44596
+ this.logger.error(formatErrors(e));
44597
+ throw e;
44598
+ });
44599
+ }),
44600
+ /**
44601
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=patch&version=v1 click to debug }
44602
+ *
44603
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=interviewer&version=v1 document }
44604
+ */
44605
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
44606
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
44607
+ return this.httpInstance
44608
+ .request({
44609
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`, path),
44610
+ method: "PATCH",
44611
+ data,
44612
+ params,
44613
+ headers,
44614
+ })
44615
+ .catch((e) => {
44616
+ this.logger.error(formatErrors(e));
44617
+ throw e;
44618
+ });
44619
+ }),
44620
+ },
43880
44621
  /**
43881
44622
  * 职位
43882
44623
  */
@@ -44636,6 +45377,31 @@ class Client$u extends Client$v {
44636
45377
  });
44637
45378
  }),
44638
45379
  },
45380
+ /**
45381
+ * minutes
45382
+ */
45383
+ minutes: {
45384
+ /**
45385
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=minutes&apiName=get&version=v1 click to debug }
45386
+ *
45387
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=minutes&version=v1 document }
45388
+ */
45389
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
45390
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
45391
+ return this.httpInstance
45392
+ .request({
45393
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/minutes`, path),
45394
+ method: "GET",
45395
+ data,
45396
+ params,
45397
+ headers,
45398
+ })
45399
+ .catch((e) => {
45400
+ this.logger.error(formatErrors(e));
45401
+ throw e;
45402
+ });
45403
+ }),
45404
+ },
44639
45405
  /**
44640
45406
  * 备注
44641
45407
  */
@@ -46133,20 +46899,98 @@ class Client$u extends Client$v {
46133
46899
  return Iterable;
46134
46900
  }),
46135
46901
  /**
46136
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=test&apiName=search&version=v1 click to debug }
46902
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=test&apiName=search&version=v1 click to debug }
46903
+ *
46904
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search document }
46905
+ *
46906
+ * 获取笔试列表
46907
+ *
46908
+ * 批量获取人才在某投递流程中的笔试信息,如作答状态、笔试得分等。(目前仅支持获取 1w 条数据,若数据量较大,可通过控制 test_start_time 查询条件分批次获取全量数据)
46909
+ */
46910
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46911
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
46912
+ return this.httpInstance
46913
+ .request({
46914
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path),
46915
+ method: "POST",
46916
+ data,
46917
+ params,
46918
+ headers,
46919
+ })
46920
+ .catch((e) => {
46921
+ this.logger.error(formatErrors(e));
46922
+ throw e;
46923
+ });
46924
+ }),
46925
+ },
46926
+ /**
46927
+ * 待办
46928
+ */
46929
+ todo: {
46930
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46931
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
46932
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
46933
+ const res = yield this.httpInstance
46934
+ .request({
46935
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
46936
+ method: "GET",
46937
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
46938
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
46939
+ data,
46940
+ })
46941
+ .catch((e) => {
46942
+ this.logger.error(formatErrors(e));
46943
+ });
46944
+ return res;
46945
+ });
46946
+ const Iterable = {
46947
+ [Symbol.asyncIterator]() {
46948
+ return __asyncGenerator(this, arguments, function* _a() {
46949
+ let hasMore = true;
46950
+ let pageToken;
46951
+ while (hasMore) {
46952
+ try {
46953
+ const res = yield __await(sendRequest({
46954
+ headers,
46955
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
46956
+ data,
46957
+ }));
46958
+ const _b = get__default["default"](res, "data") || {}, {
46959
+ // @ts-ignore
46960
+ has_more,
46961
+ // @ts-ignore
46962
+ page_token,
46963
+ // @ts-ignore
46964
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
46965
+ yield yield __await(rest);
46966
+ hasMore = Boolean(has_more);
46967
+ pageToken = page_token || next_page_token;
46968
+ }
46969
+ catch (e) {
46970
+ yield yield __await(null);
46971
+ break;
46972
+ }
46973
+ }
46974
+ });
46975
+ },
46976
+ };
46977
+ return Iterable;
46978
+ }),
46979
+ /**
46980
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
46137
46981
  *
46138
- * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search document }
46982
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
46139
46983
  *
46140
- * 获取笔试列表
46984
+ * 获取待办列表
46141
46985
  *
46142
- * 批量获取人才在某投递流程中的笔试信息,如作答状态、笔试得分等。(目前仅支持获取 1w 条数据,若数据量较大,可通过控制 test_start_time 查询条件分批次获取全量数据)
46986
+ * 获取待办列表
46143
46987
  */
46144
- search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46988
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46145
46989
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46146
46990
  return this.httpInstance
46147
46991
  .request({
46148
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path),
46149
- method: "POST",
46992
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
46993
+ method: "GET",
46150
46994
  data,
46151
46995
  params,
46152
46996
  headers,
@@ -46158,15 +47002,55 @@ class Client$u extends Client$v {
46158
47002
  }),
46159
47003
  },
46160
47004
  /**
46161
- * 待办
47005
+ * tripartite_agreement
46162
47006
  */
46163
- todo: {
47007
+ tripartiteAgreement: {
47008
+ /**
47009
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
47010
+ *
47011
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
47012
+ */
47013
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47014
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
47015
+ return this.httpInstance
47016
+ .request({
47017
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
47018
+ method: "POST",
47019
+ data,
47020
+ params,
47021
+ headers,
47022
+ })
47023
+ .catch((e) => {
47024
+ this.logger.error(formatErrors(e));
47025
+ throw e;
47026
+ });
47027
+ }),
47028
+ /**
47029
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
47030
+ *
47031
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
47032
+ */
47033
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47034
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
47035
+ return this.httpInstance
47036
+ .request({
47037
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
47038
+ method: "DELETE",
47039
+ data,
47040
+ params,
47041
+ headers,
47042
+ })
47043
+ .catch((e) => {
47044
+ this.logger.error(formatErrors(e));
47045
+ throw e;
47046
+ });
47047
+ }),
46164
47048
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46165
47049
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46166
47050
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
46167
47051
  const res = yield this.httpInstance
46168
47052
  .request({
46169
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
47053
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
46170
47054
  method: "GET",
46171
47055
  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
46172
47056
  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
@@ -46211,45 +47095,16 @@ class Client$u extends Client$v {
46211
47095
  return Iterable;
46212
47096
  }),
46213
47097
  /**
46214
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
46215
- *
46216
- * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
46217
- *
46218
- * 获取待办列表
47098
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
46219
47099
  *
46220
- * 获取待办列表
47100
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
46221
47101
  */
46222
47102
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46223
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
46224
- return this.httpInstance
46225
- .request({
46226
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
46227
- method: "GET",
46228
- data,
46229
- params,
46230
- headers,
46231
- })
46232
- .catch((e) => {
46233
- this.logger.error(formatErrors(e));
46234
- throw e;
46235
- });
46236
- }),
46237
- },
46238
- /**
46239
- * tripartite_agreement
46240
- */
46241
- tripartiteAgreement: {
46242
- /**
46243
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
46244
- *
46245
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
46246
- */
46247
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46248
47103
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46249
47104
  return this.httpInstance
46250
47105
  .request({
46251
47106
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
46252
- method: "POST",
47107
+ method: "GET",
46253
47108
  data,
46254
47109
  params,
46255
47110
  headers,
@@ -46260,16 +47115,16 @@ class Client$u extends Client$v {
46260
47115
  });
46261
47116
  }),
46262
47117
  /**
46263
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
47118
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
46264
47119
  *
46265
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
47120
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
46266
47121
  */
46267
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47122
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46268
47123
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46269
47124
  return this.httpInstance
46270
47125
  .request({
46271
47126
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
46272
- method: "DELETE",
47127
+ method: "PUT",
46273
47128
  data,
46274
47129
  params,
46275
47130
  headers,
@@ -46279,12 +47134,17 @@ class Client$u extends Client$v {
46279
47134
  throw e;
46280
47135
  });
46281
47136
  }),
47137
+ },
47138
+ /**
47139
+ * 权限
47140
+ */
47141
+ userRole: {
46282
47142
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46283
47143
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46284
47144
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
46285
47145
  const res = yield this.httpInstance
46286
47146
  .request({
46287
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
47147
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
46288
47148
  method: "GET",
46289
47149
  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
46290
47150
  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
@@ -46329,15 +47189,19 @@ class Client$u extends Client$v {
46329
47189
  return Iterable;
46330
47190
  }),
46331
47191
  /**
46332
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
47192
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=user_role&apiName=list&version=v1 click to debug }
46333
47193
  *
46334
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
47194
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list document }
47195
+ *
47196
+ * 获取用户角色列表
47197
+ *
47198
+ * 获取用户角色列表
46335
47199
  */
46336
47200
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46337
47201
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46338
47202
  return this.httpInstance
46339
47203
  .request({
46340
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
47204
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
46341
47205
  method: "GET",
46342
47206
  data,
46343
47207
  params,
@@ -46348,26 +47212,6 @@ class Client$u extends Client$v {
46348
47212
  throw e;
46349
47213
  });
46350
47214
  }),
46351
- /**
46352
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
46353
- *
46354
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
46355
- */
46356
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46357
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
46358
- return this.httpInstance
46359
- .request({
46360
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
46361
- method: "PUT",
46362
- data,
46363
- params,
46364
- headers,
46365
- })
46366
- .catch((e) => {
46367
- this.logger.error(formatErrors(e));
46368
- throw e;
46369
- });
46370
- }),
46371
47215
  },
46372
47216
  /**
46373
47217
  * website.channel
@@ -48086,8 +48930,16 @@ class Client$s extends Client$t {
48086
48930
  this.logger.error(formatErrors(e));
48087
48931
  throw e;
48088
48932
  });
48933
+ const checkIsReadable = () => {
48934
+ const consumedError = "The stream has already been consumed";
48935
+ if (!res.readable) {
48936
+ this.logger.error(consumedError);
48937
+ throw new Error(consumedError);
48938
+ }
48939
+ };
48089
48940
  return {
48090
48941
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
48942
+ checkIsReadable();
48091
48943
  return new Promise((resolve, reject) => {
48092
48944
  const writableStream = fs__default["default"].createWriteStream(filePath);
48093
48945
  writableStream.on("finish", () => {
@@ -48099,6 +48951,10 @@ class Client$s extends Client$t {
48099
48951
  res.pipe(writableStream);
48100
48952
  });
48101
48953
  }),
48954
+ getReadableStream: () => {
48955
+ checkIsReadable();
48956
+ return res;
48957
+ },
48102
48958
  };
48103
48959
  }),
48104
48960
  },
@@ -48159,8 +49015,16 @@ class Client$s extends Client$t {
48159
49015
  this.logger.error(formatErrors(e));
48160
49016
  throw e;
48161
49017
  });
49018
+ const checkIsReadable = () => {
49019
+ const consumedError = "The stream has already been consumed";
49020
+ if (!res.readable) {
49021
+ this.logger.error(consumedError);
49022
+ throw new Error(consumedError);
49023
+ }
49024
+ };
48162
49025
  return {
48163
49026
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
49027
+ checkIsReadable();
48164
49028
  return new Promise((resolve, reject) => {
48165
49029
  const writableStream = fs__default["default"].createWriteStream(filePath);
48166
49030
  writableStream.on("finish", () => {
@@ -48172,6 +49036,10 @@ class Client$s extends Client$t {
48172
49036
  res.pipe(writableStream);
48173
49037
  });
48174
49038
  }),
49039
+ getReadableStream: () => {
49040
+ checkIsReadable();
49041
+ return res;
49042
+ },
48175
49043
  };
48176
49044
  }),
48177
49045
  },
@@ -48839,8 +49707,16 @@ class Client$s extends Client$t {
48839
49707
  this.logger.error(formatErrors(e));
48840
49708
  throw e;
48841
49709
  });
49710
+ const checkIsReadable = () => {
49711
+ const consumedError = "The stream has already been consumed";
49712
+ if (!res.readable) {
49713
+ this.logger.error(consumedError);
49714
+ throw new Error(consumedError);
49715
+ }
49716
+ };
48842
49717
  return {
48843
49718
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
49719
+ checkIsReadable();
48844
49720
  return new Promise((resolve, reject) => {
48845
49721
  const writableStream = fs__default["default"].createWriteStream(filePath);
48846
49722
  writableStream.on("finish", () => {
@@ -48852,6 +49728,10 @@ class Client$s extends Client$t {
48852
49728
  res.pipe(writableStream);
48853
49729
  });
48854
49730
  }),
49731
+ getReadableStream: () => {
49732
+ checkIsReadable();
49733
+ return res;
49734
+ },
48855
49735
  };
48856
49736
  }),
48857
49737
  },
@@ -50176,8 +51056,16 @@ class Client$s extends Client$t {
50176
51056
  this.logger.error(formatErrors(e));
50177
51057
  throw e;
50178
51058
  });
51059
+ const checkIsReadable = () => {
51060
+ const consumedError = "The stream has already been consumed";
51061
+ if (!res.readable) {
51062
+ this.logger.error(consumedError);
51063
+ throw new Error(consumedError);
51064
+ }
51065
+ };
50179
51066
  return {
50180
51067
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
51068
+ checkIsReadable();
50181
51069
  return new Promise((resolve, reject) => {
50182
51070
  const writableStream = fs__default["default"].createWriteStream(filePath);
50183
51071
  writableStream.on("finish", () => {
@@ -50189,6 +51077,10 @@ class Client$s extends Client$t {
50189
51077
  res.pipe(writableStream);
50190
51078
  });
50191
51079
  }),
51080
+ getReadableStream: () => {
51081
+ checkIsReadable();
51082
+ return res;
51083
+ },
50192
51084
  };
50193
51085
  }),
50194
51086
  },
@@ -50249,8 +51141,16 @@ class Client$s extends Client$t {
50249
51141
  this.logger.error(formatErrors(e));
50250
51142
  throw e;
50251
51143
  });
51144
+ const checkIsReadable = () => {
51145
+ const consumedError = "The stream has already been consumed";
51146
+ if (!res.readable) {
51147
+ this.logger.error(consumedError);
51148
+ throw new Error(consumedError);
51149
+ }
51150
+ };
50252
51151
  return {
50253
51152
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
51153
+ checkIsReadable();
50254
51154
  return new Promise((resolve, reject) => {
50255
51155
  const writableStream = fs__default["default"].createWriteStream(filePath);
50256
51156
  writableStream.on("finish", () => {
@@ -50262,6 +51162,10 @@ class Client$s extends Client$t {
50262
51162
  res.pipe(writableStream);
50263
51163
  });
50264
51164
  }),
51165
+ getReadableStream: () => {
51166
+ checkIsReadable();
51167
+ return res;
51168
+ },
50265
51169
  };
50266
51170
  }),
50267
51171
  },
@@ -50929,8 +51833,16 @@ class Client$s extends Client$t {
50929
51833
  this.logger.error(formatErrors(e));
50930
51834
  throw e;
50931
51835
  });
51836
+ const checkIsReadable = () => {
51837
+ const consumedError = "The stream has already been consumed";
51838
+ if (!res.readable) {
51839
+ this.logger.error(consumedError);
51840
+ throw new Error(consumedError);
51841
+ }
51842
+ };
50932
51843
  return {
50933
51844
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
51845
+ checkIsReadable();
50934
51846
  return new Promise((resolve, reject) => {
50935
51847
  const writableStream = fs__default["default"].createWriteStream(filePath);
50936
51848
  writableStream.on("finish", () => {
@@ -50942,6 +51854,10 @@ class Client$s extends Client$t {
50942
51854
  res.pipe(writableStream);
50943
51855
  });
50944
51856
  }),
51857
+ getReadableStream: () => {
51858
+ checkIsReadable();
51859
+ return res;
51860
+ },
50945
51861
  };
50946
51862
  }),
50947
51863
  },
@@ -51270,6 +52186,26 @@ class Client$s extends Client$t {
51270
52186
  * feed_card
51271
52187
  */
51272
52188
  feedCard: {
52189
+ /**
52190
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=feed_card&apiName=bot_time_sentive&version=v2 click to debug }
52191
+ *
52192
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=bot_time_sentive&project=im&resource=feed_card&version=v2 document }
52193
+ */
52194
+ botTimeSentive: (payload, options) => __awaiter(this, void 0, void 0, function* () {
52195
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
52196
+ return this.httpInstance
52197
+ .request({
52198
+ url: fillApiPath(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`, path),
52199
+ method: "PATCH",
52200
+ data,
52201
+ params,
52202
+ headers,
52203
+ })
52204
+ .catch((e) => {
52205
+ this.logger.error(formatErrors(e));
52206
+ throw e;
52207
+ });
52208
+ }),
51273
52209
  /**
51274
52210
  * {@link https://open.feishu.cn/api-explorer?project=im&resource=feed_card&apiName=patch&version=v2 click to debug }
51275
52211
  *
@@ -51781,8 +52717,16 @@ class Client$r extends Client$s {
51781
52717
  this.logger.error(formatErrors(e));
51782
52718
  throw e;
51783
52719
  });
52720
+ const checkIsReadable = () => {
52721
+ const consumedError = "The stream has already been consumed";
52722
+ if (!res.readable) {
52723
+ this.logger.error(consumedError);
52724
+ throw new Error(consumedError);
52725
+ }
52726
+ };
51784
52727
  return {
51785
52728
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
52729
+ checkIsReadable();
51786
52730
  return new Promise((resolve, reject) => {
51787
52731
  const writableStream = fs__default["default"].createWriteStream(filePath);
51788
52732
  writableStream.on("finish", () => {
@@ -51794,6 +52738,10 @@ class Client$r extends Client$s {
51794
52738
  res.pipe(writableStream);
51795
52739
  });
51796
52740
  }),
52741
+ getReadableStream: () => {
52742
+ checkIsReadable();
52743
+ return res;
52744
+ },
51797
52745
  };
51798
52746
  }),
51799
52747
  /**
@@ -53310,6 +54258,31 @@ class Client$q extends Client$r {
53310
54258
  });
53311
54259
  }),
53312
54260
  },
54261
+ /**
54262
+ * user_mailbox.message
54263
+ */
54264
+ userMailboxMessage: {
54265
+ /**
54266
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=send&version=v1 click to debug }
54267
+ *
54268
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.message&version=v1 document }
54269
+ */
54270
+ send: (payload, options) => __awaiter(this, void 0, void 0, function* () {
54271
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
54272
+ return this.httpInstance
54273
+ .request({
54274
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`, path),
54275
+ method: "POST",
54276
+ data,
54277
+ params,
54278
+ headers,
54279
+ })
54280
+ .catch((e) => {
54281
+ this.logger.error(formatErrors(e));
54282
+ throw e;
54283
+ });
54284
+ }),
54285
+ },
53313
54286
  v1: {
53314
54287
  /**
53315
54288
  * 邮件组别名
@@ -54765,6 +55738,31 @@ class Client$q extends Client$r {
54765
55738
  });
54766
55739
  }),
54767
55740
  },
55741
+ /**
55742
+ * user_mailbox.message
55743
+ */
55744
+ userMailboxMessage: {
55745
+ /**
55746
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=send&version=v1 click to debug }
55747
+ *
55748
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.message&version=v1 document }
55749
+ */
55750
+ send: (payload, options) => __awaiter(this, void 0, void 0, function* () {
55751
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
55752
+ return this.httpInstance
55753
+ .request({
55754
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`, path),
55755
+ method: "POST",
55756
+ data,
55757
+ params,
55758
+ headers,
55759
+ })
55760
+ .catch((e) => {
55761
+ this.logger.error(formatErrors(e));
55762
+ throw e;
55763
+ });
55764
+ }),
55765
+ },
54768
55766
  },
54769
55767
  };
54770
55768
  }
@@ -54908,7 +55906,60 @@ class Client$n extends Client$o {
54908
55906
  /**
54909
55907
 
54910
55908
  */
54911
- this.moments = {};
55909
+ this.moments = {
55910
+ /**
55911
+ * post
55912
+ */
55913
+ post: {
55914
+ /**
55915
+ * {@link https://open.feishu.cn/api-explorer?project=moments&resource=post&apiName=get&version=v1 click to debug }
55916
+ *
55917
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=moments&resource=post&version=v1 document }
55918
+ */
55919
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
55920
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
55921
+ return this.httpInstance
55922
+ .request({
55923
+ url: fillApiPath(`${this.domain}/open-apis/moments/v1/posts/:post_id`, path),
55924
+ method: "GET",
55925
+ data,
55926
+ params,
55927
+ headers,
55928
+ })
55929
+ .catch((e) => {
55930
+ this.logger.error(formatErrors(e));
55931
+ throw e;
55932
+ });
55933
+ }),
55934
+ },
55935
+ v1: {
55936
+ /**
55937
+ * post
55938
+ */
55939
+ post: {
55940
+ /**
55941
+ * {@link https://open.feishu.cn/api-explorer?project=moments&resource=post&apiName=get&version=v1 click to debug }
55942
+ *
55943
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=moments&resource=post&version=v1 document }
55944
+ */
55945
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
55946
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
55947
+ return this.httpInstance
55948
+ .request({
55949
+ url: fillApiPath(`${this.domain}/open-apis/moments/v1/posts/:post_id`, path),
55950
+ method: "GET",
55951
+ data,
55952
+ params,
55953
+ headers,
55954
+ })
55955
+ .catch((e) => {
55956
+ this.logger.error(formatErrors(e));
55957
+ throw e;
55958
+ });
55959
+ }),
55960
+ },
55961
+ },
55962
+ };
54912
55963
  }
54913
55964
  }
54914
55965
 
@@ -62344,8 +63395,16 @@ class Client$4 extends Client$5 {
62344
63395
  this.logger.error(formatErrors(e));
62345
63396
  throw e;
62346
63397
  });
63398
+ const checkIsReadable = () => {
63399
+ const consumedError = "The stream has already been consumed";
63400
+ if (!res.readable) {
63401
+ this.logger.error(consumedError);
63402
+ throw new Error(consumedError);
63403
+ }
63404
+ };
62347
63405
  return {
62348
63406
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
63407
+ checkIsReadable();
62349
63408
  return new Promise((resolve, reject) => {
62350
63409
  const writableStream = fs__default["default"].createWriteStream(filePath);
62351
63410
  writableStream.on("finish", () => {
@@ -62357,6 +63416,10 @@ class Client$4 extends Client$5 {
62357
63416
  res.pipe(writableStream);
62358
63417
  });
62359
63418
  }),
63419
+ getReadableStream: () => {
63420
+ checkIsReadable();
63421
+ return res;
63422
+ },
62360
63423
  };
62361
63424
  }),
62362
63425
  /**
@@ -64160,8 +65223,16 @@ class Client$4 extends Client$5 {
64160
65223
  this.logger.error(formatErrors(e));
64161
65224
  throw e;
64162
65225
  });
65226
+ const checkIsReadable = () => {
65227
+ const consumedError = "The stream has already been consumed";
65228
+ if (!res.readable) {
65229
+ this.logger.error(consumedError);
65230
+ throw new Error(consumedError);
65231
+ }
65232
+ };
64163
65233
  return {
64164
65234
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
65235
+ checkIsReadable();
64165
65236
  return new Promise((resolve, reject) => {
64166
65237
  const writableStream = fs__default["default"].createWriteStream(filePath);
64167
65238
  writableStream.on("finish", () => {
@@ -64173,6 +65244,10 @@ class Client$4 extends Client$5 {
64173
65244
  res.pipe(writableStream);
64174
65245
  });
64175
65246
  }),
65247
+ getReadableStream: () => {
65248
+ checkIsReadable();
65249
+ return res;
65250
+ },
64176
65251
  };
64177
65252
  }),
64178
65253
  /**
@@ -67529,7 +68604,7 @@ class Client extends Client$1 {
67529
68604
  }
67530
68605
  return {
67531
68606
  params: Object.assign(Object.assign({}, get__default["default"](payload, 'params', {})), targetOptions.params),
67532
- headers: Object.assign(Object.assign({}, get__default["default"](payload, 'headers', {})), targetOptions.headers),
68607
+ headers: Object.assign(Object.assign({ 'User-Agent': 'oapi-node-sdk/1.0.0' }, get__default["default"](payload, 'headers', {})), targetOptions.headers),
67533
68608
  data: Object.assign(Object.assign({}, get__default["default"](payload, 'data', {})), targetOptions.data),
67534
68609
  path: Object.assign(Object.assign({}, get__default["default"](payload, 'path', {})), targetOptions.path),
67535
68610
  };