@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/es/index.js CHANGED
@@ -277,8 +277,16 @@ class Client$$ {
277
277
  this.logger.error(formatErrors(e));
278
278
  throw e;
279
279
  });
280
+ const checkIsReadable = () => {
281
+ const consumedError = "The stream has already been consumed";
282
+ if (!res.readable) {
283
+ this.logger.error(consumedError);
284
+ throw new Error(consumedError);
285
+ }
286
+ };
280
287
  return {
281
288
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
289
+ checkIsReadable();
282
290
  return new Promise((resolve, reject) => {
283
291
  const writableStream = fs.createWriteStream(filePath);
284
292
  writableStream.on("finish", () => {
@@ -290,6 +298,10 @@ class Client$$ {
290
298
  res.pipe(writableStream);
291
299
  });
292
300
  }),
301
+ getReadableStream: () => {
302
+ checkIsReadable();
303
+ return res;
304
+ },
293
305
  };
294
306
  }),
295
307
  },
@@ -513,8 +525,16 @@ class Client$$ {
513
525
  this.logger.error(formatErrors(e));
514
526
  throw e;
515
527
  });
528
+ const checkIsReadable = () => {
529
+ const consumedError = "The stream has already been consumed";
530
+ if (!res.readable) {
531
+ this.logger.error(consumedError);
532
+ throw new Error(consumedError);
533
+ }
534
+ };
516
535
  return {
517
536
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
537
+ checkIsReadable();
518
538
  return new Promise((resolve, reject) => {
519
539
  const writableStream = fs.createWriteStream(filePath);
520
540
  writableStream.on("finish", () => {
@@ -526,6 +546,10 @@ class Client$$ {
526
546
  res.pipe(writableStream);
527
547
  });
528
548
  }),
549
+ getReadableStream: () => {
550
+ checkIsReadable();
551
+ return res;
552
+ },
529
553
  };
530
554
  }),
531
555
  /**
@@ -758,8 +782,16 @@ class Client$$ {
758
782
  this.logger.error(formatErrors(e));
759
783
  throw e;
760
784
  });
785
+ const checkIsReadable = () => {
786
+ const consumedError = "The stream has already been consumed";
787
+ if (!res.readable) {
788
+ this.logger.error(consumedError);
789
+ throw new Error(consumedError);
790
+ }
791
+ };
761
792
  return {
762
793
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
794
+ checkIsReadable();
763
795
  return new Promise((resolve, reject) => {
764
796
  const writableStream = fs.createWriteStream(filePath);
765
797
  writableStream.on("finish", () => {
@@ -771,6 +803,10 @@ class Client$$ {
771
803
  res.pipe(writableStream);
772
804
  });
773
805
  }),
806
+ getReadableStream: () => {
807
+ checkIsReadable();
808
+ return res;
809
+ },
774
810
  };
775
811
  }),
776
812
  },
@@ -994,8 +1030,16 @@ class Client$$ {
994
1030
  this.logger.error(formatErrors(e));
995
1031
  throw e;
996
1032
  });
1033
+ const checkIsReadable = () => {
1034
+ const consumedError = "The stream has already been consumed";
1035
+ if (!res.readable) {
1036
+ this.logger.error(consumedError);
1037
+ throw new Error(consumedError);
1038
+ }
1039
+ };
997
1040
  return {
998
1041
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
1042
+ checkIsReadable();
999
1043
  return new Promise((resolve, reject) => {
1000
1044
  const writableStream = fs.createWriteStream(filePath);
1001
1045
  writableStream.on("finish", () => {
@@ -1007,6 +1051,10 @@ class Client$$ {
1007
1051
  res.pipe(writableStream);
1008
1052
  });
1009
1053
  }),
1054
+ getReadableStream: () => {
1055
+ checkIsReadable();
1056
+ return res;
1057
+ },
1010
1058
  };
1011
1059
  }),
1012
1060
  /**
@@ -3280,6 +3328,51 @@ class Client$Y extends Client$Z {
3280
3328
  });
3281
3329
  }),
3282
3330
  },
3331
+ /**
3332
+ * scope
3333
+ */
3334
+ scope: {
3335
+ /**
3336
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=apply&version=v6 click to debug }
3337
+ *
3338
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=apply&project=application&resource=scope&version=v6 document }
3339
+ */
3340
+ apply: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3341
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3342
+ return this.httpInstance
3343
+ .request({
3344
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes/apply`, path),
3345
+ method: "POST",
3346
+ data,
3347
+ params,
3348
+ headers,
3349
+ })
3350
+ .catch((e) => {
3351
+ this.logger.error(formatErrors(e));
3352
+ throw e;
3353
+ });
3354
+ }),
3355
+ /**
3356
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=list&version=v6 click to debug }
3357
+ *
3358
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=application&resource=scope&version=v6 document }
3359
+ */
3360
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3361
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3362
+ return this.httpInstance
3363
+ .request({
3364
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes`, path),
3365
+ method: "GET",
3366
+ data,
3367
+ params,
3368
+ headers,
3369
+ })
3370
+ .catch((e) => {
3371
+ this.logger.error(formatErrors(e));
3372
+ throw e;
3373
+ });
3374
+ }),
3375
+ },
3283
3376
  v6: {
3284
3377
  /**
3285
3378
  * 应用红点
@@ -3913,6 +4006,51 @@ class Client$Y extends Client$Z {
3913
4006
  });
3914
4007
  }),
3915
4008
  },
4009
+ /**
4010
+ * scope
4011
+ */
4012
+ scope: {
4013
+ /**
4014
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=apply&version=v6 click to debug }
4015
+ *
4016
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=apply&project=application&resource=scope&version=v6 document }
4017
+ */
4018
+ apply: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4019
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4020
+ return this.httpInstance
4021
+ .request({
4022
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes/apply`, path),
4023
+ method: "POST",
4024
+ data,
4025
+ params,
4026
+ headers,
4027
+ })
4028
+ .catch((e) => {
4029
+ this.logger.error(formatErrors(e));
4030
+ throw e;
4031
+ });
4032
+ }),
4033
+ /**
4034
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=scope&apiName=list&version=v6 click to debug }
4035
+ *
4036
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=application&resource=scope&version=v6 document }
4037
+ */
4038
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4039
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4040
+ return this.httpInstance
4041
+ .request({
4042
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/scopes`, path),
4043
+ method: "GET",
4044
+ data,
4045
+ params,
4046
+ headers,
4047
+ })
4048
+ .catch((e) => {
4049
+ this.logger.error(formatErrors(e));
4050
+ throw e;
4051
+ });
4052
+ }),
4053
+ },
3916
4054
  },
3917
4055
  };
3918
4056
  }
@@ -4697,7 +4835,7 @@ class Client$X extends Client$Y {
4697
4835
  }),
4698
4836
  },
4699
4837
  /**
4700
- * 原生审批任务
4838
+ * 审批查询
4701
4839
  */
4702
4840
  task: {
4703
4841
  /**
@@ -5666,7 +5804,7 @@ class Client$X extends Client$Y {
5666
5804
  }),
5667
5805
  },
5668
5806
  /**
5669
- * 原生审批任务
5807
+ * 审批查询
5670
5808
  */
5671
5809
  task: {
5672
5810
  /**
@@ -6069,8 +6207,16 @@ class Client$W extends Client$X {
6069
6207
  this.logger.error(formatErrors(e));
6070
6208
  throw e;
6071
6209
  });
6210
+ const checkIsReadable = () => {
6211
+ const consumedError = "The stream has already been consumed";
6212
+ if (!res.readable) {
6213
+ this.logger.error(consumedError);
6214
+ throw new Error(consumedError);
6215
+ }
6216
+ };
6072
6217
  return {
6073
6218
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
6219
+ checkIsReadable();
6074
6220
  return new Promise((resolve, reject) => {
6075
6221
  const writableStream = fs.createWriteStream(filePath);
6076
6222
  writableStream.on("finish", () => {
@@ -6082,6 +6228,10 @@ class Client$W extends Client$X {
6082
6228
  res.pipe(writableStream);
6083
6229
  });
6084
6230
  }),
6231
+ getReadableStream: () => {
6232
+ checkIsReadable();
6233
+ return res;
6234
+ },
6085
6235
  };
6086
6236
  }),
6087
6237
  /**
@@ -7171,8 +7321,16 @@ class Client$W extends Client$X {
7171
7321
  this.logger.error(formatErrors(e));
7172
7322
  throw e;
7173
7323
  });
7324
+ const checkIsReadable = () => {
7325
+ const consumedError = "The stream has already been consumed";
7326
+ if (!res.readable) {
7327
+ this.logger.error(consumedError);
7328
+ throw new Error(consumedError);
7329
+ }
7330
+ };
7174
7331
  return {
7175
7332
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
7333
+ checkIsReadable();
7176
7334
  return new Promise((resolve, reject) => {
7177
7335
  const writableStream = fs.createWriteStream(filePath);
7178
7336
  writableStream.on("finish", () => {
@@ -7184,6 +7342,10 @@ class Client$W extends Client$X {
7184
7342
  res.pipe(writableStream);
7185
7343
  });
7186
7344
  }),
7345
+ getReadableStream: () => {
7346
+ checkIsReadable();
7347
+ return res;
7348
+ },
7187
7349
  };
7188
7350
  }),
7189
7351
  /**
@@ -9071,8 +9233,16 @@ class Client$S extends Client$T {
9071
9233
  this.logger.error(formatErrors(e));
9072
9234
  throw e;
9073
9235
  });
9236
+ const checkIsReadable = () => {
9237
+ const consumedError = "The stream has already been consumed";
9238
+ if (!res.readable) {
9239
+ this.logger.error(consumedError);
9240
+ throw new Error(consumedError);
9241
+ }
9242
+ };
9074
9243
  return {
9075
9244
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
9245
+ checkIsReadable();
9076
9246
  return new Promise((resolve, reject) => {
9077
9247
  const writableStream = fs.createWriteStream(filePath);
9078
9248
  writableStream.on("finish", () => {
@@ -9084,6 +9254,10 @@ class Client$S extends Client$T {
9084
9254
  res.pipe(writableStream);
9085
9255
  });
9086
9256
  }),
9257
+ getReadableStream: () => {
9258
+ checkIsReadable();
9259
+ return res;
9260
+ },
9087
9261
  };
9088
9262
  }),
9089
9263
  /**
@@ -9573,8 +9747,16 @@ class Client$S extends Client$T {
9573
9747
  this.logger.error(formatErrors(e));
9574
9748
  throw e;
9575
9749
  });
9750
+ const checkIsReadable = () => {
9751
+ const consumedError = "The stream has already been consumed";
9752
+ if (!res.readable) {
9753
+ this.logger.error(consumedError);
9754
+ throw new Error(consumedError);
9755
+ }
9756
+ };
9576
9757
  return {
9577
9758
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
9759
+ checkIsReadable();
9578
9760
  return new Promise((resolve, reject) => {
9579
9761
  const writableStream = fs.createWriteStream(filePath);
9580
9762
  writableStream.on("finish", () => {
@@ -9586,6 +9768,10 @@ class Client$S extends Client$T {
9586
9768
  res.pipe(writableStream);
9587
9769
  });
9588
9770
  }),
9771
+ getReadableStream: () => {
9772
+ checkIsReadable();
9773
+ return res;
9774
+ },
9589
9775
  };
9590
9776
  }),
9591
9777
  /**
@@ -13024,8 +13210,16 @@ class Client$P extends Client$Q {
13024
13210
  this.logger.error(formatErrors(e));
13025
13211
  throw e;
13026
13212
  });
13213
+ const checkIsReadable = () => {
13214
+ const consumedError = "The stream has already been consumed";
13215
+ if (!res.readable) {
13216
+ this.logger.error(consumedError);
13217
+ throw new Error(consumedError);
13218
+ }
13219
+ };
13027
13220
  return {
13028
13221
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
13222
+ checkIsReadable();
13029
13223
  return new Promise((resolve, reject) => {
13030
13224
  const writableStream = fs.createWriteStream(filePath);
13031
13225
  writableStream.on("finish", () => {
@@ -13037,6 +13231,10 @@ class Client$P extends Client$Q {
13037
13231
  res.pipe(writableStream);
13038
13232
  });
13039
13233
  }),
13234
+ getReadableStream: () => {
13235
+ checkIsReadable();
13236
+ return res;
13237
+ },
13040
13238
  };
13041
13239
  }),
13042
13240
  },
@@ -22011,8 +22209,16 @@ class Client$I extends Client$J {
22011
22209
  this.logger.error(formatErrors(e));
22012
22210
  throw e;
22013
22211
  });
22212
+ const checkIsReadable = () => {
22213
+ const consumedError = "The stream has already been consumed";
22214
+ if (!res.readable) {
22215
+ this.logger.error(consumedError);
22216
+ throw new Error(consumedError);
22217
+ }
22218
+ };
22014
22219
  return {
22015
22220
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
22221
+ checkIsReadable();
22016
22222
  return new Promise((resolve, reject) => {
22017
22223
  const writableStream = fs.createWriteStream(filePath);
22018
22224
  writableStream.on("finish", () => {
@@ -22024,6 +22230,10 @@ class Client$I extends Client$J {
22024
22230
  res.pipe(writableStream);
22025
22231
  });
22026
22232
  }),
22233
+ getReadableStream: () => {
22234
+ checkIsReadable();
22235
+ return res;
22236
+ },
22027
22237
  };
22028
22238
  }),
22029
22239
  },
@@ -22560,6 +22770,26 @@ class Client$I extends Client$J {
22560
22770
  * 休假管理
22561
22771
  */
22562
22772
  leave: {
22773
+ /**
22774
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=calendar_by_scope&version=v1 click to debug }
22775
+ *
22776
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=calendar_by_scope&project=corehr&resource=leave&version=v1 document }
22777
+ */
22778
+ calendarByScope: (payload, options) => __awaiter(this, void 0, void 0, function* () {
22779
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
22780
+ return this.httpInstance
22781
+ .request({
22782
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`, path),
22783
+ method: "GET",
22784
+ data,
22785
+ params,
22786
+ headers,
22787
+ })
22788
+ .catch((e) => {
22789
+ this.logger.error(formatErrors(e));
22790
+ throw e;
22791
+ });
22792
+ }),
22563
22793
  /**
22564
22794
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
22565
22795
  *
@@ -24658,8 +24888,16 @@ class Client$I extends Client$J {
24658
24888
  this.logger.error(formatErrors(e));
24659
24889
  throw e;
24660
24890
  });
24891
+ const checkIsReadable = () => {
24892
+ const consumedError = "The stream has already been consumed";
24893
+ if (!res.readable) {
24894
+ this.logger.error(consumedError);
24895
+ throw new Error(consumedError);
24896
+ }
24897
+ };
24661
24898
  return {
24662
24899
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
24900
+ checkIsReadable();
24663
24901
  return new Promise((resolve, reject) => {
24664
24902
  const writableStream = fs.createWriteStream(filePath);
24665
24903
  writableStream.on("finish", () => {
@@ -24671,6 +24909,10 @@ class Client$I extends Client$J {
24671
24909
  res.pipe(writableStream);
24672
24910
  });
24673
24911
  }),
24912
+ getReadableStream: () => {
24913
+ checkIsReadable();
24914
+ return res;
24915
+ },
24674
24916
  };
24675
24917
  }),
24676
24918
  },
@@ -25207,6 +25449,26 @@ class Client$I extends Client$J {
25207
25449
  * 休假管理
25208
25450
  */
25209
25451
  leave: {
25452
+ /**
25453
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=calendar_by_scope&version=v1 click to debug }
25454
+ *
25455
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=calendar_by_scope&project=corehr&resource=leave&version=v1 document }
25456
+ */
25457
+ calendarByScope: (payload, options) => __awaiter(this, void 0, void 0, function* () {
25458
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
25459
+ return this.httpInstance
25460
+ .request({
25461
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/leaves/calendar_by_scope`, path),
25462
+ method: "GET",
25463
+ data,
25464
+ params,
25465
+ headers,
25466
+ })
25467
+ .catch((e) => {
25468
+ this.logger.error(formatErrors(e));
25469
+ throw e;
25470
+ });
25471
+ }),
25210
25472
  /**
25211
25473
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=leave&apiName=leave_balances&version=v1 click to debug }
25212
25474
  *
@@ -27260,6 +27522,28 @@ class Client$I extends Client$J {
27260
27522
  throw e;
27261
27523
  });
27262
27524
  }),
27525
+ /**
27526
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=delete&version=v2 click to debug }
27527
+ *
27528
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=department&version=v2 document }
27529
+ *
27530
+ * 删除部门数据
27531
+ */
27532
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
27533
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
27534
+ return this.httpInstance
27535
+ .request({
27536
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/:department_id`, path),
27537
+ method: "DELETE",
27538
+ data,
27539
+ params,
27540
+ headers,
27541
+ })
27542
+ .catch((e) => {
27543
+ this.logger.error(formatErrors(e));
27544
+ throw e;
27545
+ });
27546
+ }),
27263
27547
  /**
27264
27548
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=parents&version=v2 click to debug }
27265
27549
  *
@@ -27280,6 +27564,28 @@ class Client$I extends Client$J {
27280
27564
  throw e;
27281
27565
  });
27282
27566
  }),
27567
+ /**
27568
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=patch&version=v2 click to debug }
27569
+ *
27570
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=department&version=v2 document }
27571
+ *
27572
+ * 更新部门数据
27573
+ */
27574
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
27575
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
27576
+ return this.httpInstance
27577
+ .request({
27578
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/departments/:department_id`, path),
27579
+ method: "PATCH",
27580
+ data,
27581
+ params,
27582
+ headers,
27583
+ })
27584
+ .catch((e) => {
27585
+ this.logger.error(formatErrors(e));
27586
+ throw e;
27587
+ });
27588
+ }),
27283
27589
  /**
27284
27590
  * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=department&apiName=query_multi_timeline&version=v2 click to debug }
27285
27591
  *
@@ -29844,8 +30150,16 @@ class Client$E extends Client$F {
29844
30150
  this.logger.error(formatErrors(e));
29845
30151
  throw e;
29846
30152
  });
30153
+ const checkIsReadable = () => {
30154
+ const consumedError = "The stream has already been consumed";
30155
+ if (!res.readable) {
30156
+ this.logger.error(consumedError);
30157
+ throw new Error(consumedError);
30158
+ }
30159
+ };
29847
30160
  return {
29848
30161
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
30162
+ checkIsReadable();
29849
30163
  return new Promise((resolve, reject) => {
29850
30164
  const writableStream = fs.createWriteStream(filePath);
29851
30165
  writableStream.on("finish", () => {
@@ -29857,6 +30171,10 @@ class Client$E extends Client$F {
29857
30171
  res.pipe(writableStream);
29858
30172
  });
29859
30173
  }),
30174
+ getReadableStream: () => {
30175
+ checkIsReadable();
30176
+ return res;
30177
+ },
29860
30178
  };
29861
30179
  }),
29862
30180
  /**
@@ -30185,7 +30503,7 @@ class Client$E extends Client$F {
30185
30503
  }),
30186
30504
  },
30187
30505
  /**
30188
- * 分片上传
30506
+ * 上传
30189
30507
  */
30190
30508
  file: {
30191
30509
  /**
@@ -30338,8 +30656,16 @@ class Client$E extends Client$F {
30338
30656
  this.logger.error(formatErrors(e));
30339
30657
  throw e;
30340
30658
  });
30659
+ const checkIsReadable = () => {
30660
+ const consumedError = "The stream has already been consumed";
30661
+ if (!res.readable) {
30662
+ this.logger.error(consumedError);
30663
+ throw new Error(consumedError);
30664
+ }
30665
+ };
30341
30666
  return {
30342
30667
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
30668
+ checkIsReadable();
30343
30669
  return new Promise((resolve, reject) => {
30344
30670
  const writableStream = fs.createWriteStream(filePath);
30345
30671
  writableStream.on("finish", () => {
@@ -30351,6 +30677,10 @@ class Client$E extends Client$F {
30351
30677
  res.pipe(writableStream);
30352
30678
  });
30353
30679
  }),
30680
+ getReadableStream: () => {
30681
+ checkIsReadable();
30682
+ return res;
30683
+ },
30354
30684
  };
30355
30685
  }),
30356
30686
  /**
@@ -31072,8 +31402,16 @@ class Client$E extends Client$F {
31072
31402
  this.logger.error(formatErrors(e));
31073
31403
  throw e;
31074
31404
  });
31405
+ const checkIsReadable = () => {
31406
+ const consumedError = "The stream has already been consumed";
31407
+ if (!res.readable) {
31408
+ this.logger.error(consumedError);
31409
+ throw new Error(consumedError);
31410
+ }
31411
+ };
31075
31412
  return {
31076
31413
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
31414
+ checkIsReadable();
31077
31415
  return new Promise((resolve, reject) => {
31078
31416
  const writableStream = fs.createWriteStream(filePath);
31079
31417
  writableStream.on("finish", () => {
@@ -31085,6 +31423,10 @@ class Client$E extends Client$F {
31085
31423
  res.pipe(writableStream);
31086
31424
  });
31087
31425
  }),
31426
+ getReadableStream: () => {
31427
+ checkIsReadable();
31428
+ return res;
31429
+ },
31088
31430
  };
31089
31431
  }),
31090
31432
  /**
@@ -31563,8 +31905,16 @@ class Client$E extends Client$F {
31563
31905
  this.logger.error(formatErrors(e));
31564
31906
  throw e;
31565
31907
  });
31908
+ const checkIsReadable = () => {
31909
+ const consumedError = "The stream has already been consumed";
31910
+ if (!res.readable) {
31911
+ this.logger.error(consumedError);
31912
+ throw new Error(consumedError);
31913
+ }
31914
+ };
31566
31915
  return {
31567
31916
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
31917
+ checkIsReadable();
31568
31918
  return new Promise((resolve, reject) => {
31569
31919
  const writableStream = fs.createWriteStream(filePath);
31570
31920
  writableStream.on("finish", () => {
@@ -31576,6 +31926,10 @@ class Client$E extends Client$F {
31576
31926
  res.pipe(writableStream);
31577
31927
  });
31578
31928
  }),
31929
+ getReadableStream: () => {
31930
+ checkIsReadable();
31931
+ return res;
31932
+ },
31579
31933
  };
31580
31934
  }),
31581
31935
  /**
@@ -31904,7 +32258,7 @@ class Client$E extends Client$F {
31904
32258
  }),
31905
32259
  },
31906
32260
  /**
31907
- * 分片上传
32261
+ * 上传
31908
32262
  */
31909
32263
  file: {
31910
32264
  /**
@@ -32057,8 +32411,16 @@ class Client$E extends Client$F {
32057
32411
  this.logger.error(formatErrors(e));
32058
32412
  throw e;
32059
32413
  });
32414
+ const checkIsReadable = () => {
32415
+ const consumedError = "The stream has already been consumed";
32416
+ if (!res.readable) {
32417
+ this.logger.error(consumedError);
32418
+ throw new Error(consumedError);
32419
+ }
32420
+ };
32060
32421
  return {
32061
32422
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
32423
+ checkIsReadable();
32062
32424
  return new Promise((resolve, reject) => {
32063
32425
  const writableStream = fs.createWriteStream(filePath);
32064
32426
  writableStream.on("finish", () => {
@@ -32070,6 +32432,10 @@ class Client$E extends Client$F {
32070
32432
  res.pipe(writableStream);
32071
32433
  });
32072
32434
  }),
32435
+ getReadableStream: () => {
32436
+ checkIsReadable();
32437
+ return res;
32438
+ },
32073
32439
  };
32074
32440
  }),
32075
32441
  /**
@@ -32791,8 +33157,16 @@ class Client$E extends Client$F {
32791
33157
  this.logger.error(formatErrors(e));
32792
33158
  throw e;
32793
33159
  });
33160
+ const checkIsReadable = () => {
33161
+ const consumedError = "The stream has already been consumed";
33162
+ if (!res.readable) {
33163
+ this.logger.error(consumedError);
33164
+ throw new Error(consumedError);
33165
+ }
33166
+ };
32794
33167
  return {
32795
33168
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
33169
+ checkIsReadable();
32796
33170
  return new Promise((resolve, reject) => {
32797
33171
  const writableStream = fs.createWriteStream(filePath);
32798
33172
  writableStream.on("finish", () => {
@@ -32804,6 +33178,10 @@ class Client$E extends Client$F {
32804
33178
  res.pipe(writableStream);
32805
33179
  });
32806
33180
  }),
33181
+ getReadableStream: () => {
33182
+ checkIsReadable();
33183
+ return res;
33184
+ },
32807
33185
  };
32808
33186
  }),
32809
33187
  /**
@@ -33330,8 +33708,16 @@ class Client$C extends Client$D {
33330
33708
  this.logger.error(formatErrors(e));
33331
33709
  throw e;
33332
33710
  });
33711
+ const checkIsReadable = () => {
33712
+ const consumedError = "The stream has already been consumed";
33713
+ if (!res.readable) {
33714
+ this.logger.error(consumedError);
33715
+ throw new Error(consumedError);
33716
+ }
33717
+ };
33333
33718
  return {
33334
33719
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
33720
+ checkIsReadable();
33335
33721
  return new Promise((resolve, reject) => {
33336
33722
  const writableStream = fs.createWriteStream(filePath);
33337
33723
  writableStream.on("finish", () => {
@@ -33343,6 +33729,10 @@ class Client$C extends Client$D {
33343
33729
  res.pipe(writableStream);
33344
33730
  });
33345
33731
  }),
33732
+ getReadableStream: () => {
33733
+ checkIsReadable();
33734
+ return res;
33735
+ },
33346
33736
  };
33347
33737
  }),
33348
33738
  },
@@ -33455,8 +33845,16 @@ class Client$C extends Client$D {
33455
33845
  this.logger.error(formatErrors(e));
33456
33846
  throw e;
33457
33847
  });
33848
+ const checkIsReadable = () => {
33849
+ const consumedError = "The stream has already been consumed";
33850
+ if (!res.readable) {
33851
+ this.logger.error(consumedError);
33852
+ throw new Error(consumedError);
33853
+ }
33854
+ };
33458
33855
  return {
33459
33856
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
33857
+ checkIsReadable();
33460
33858
  return new Promise((resolve, reject) => {
33461
33859
  const writableStream = fs.createWriteStream(filePath);
33462
33860
  writableStream.on("finish", () => {
@@ -33468,6 +33866,10 @@ class Client$C extends Client$D {
33468
33866
  res.pipe(writableStream);
33469
33867
  });
33470
33868
  }),
33869
+ getReadableStream: () => {
33870
+ checkIsReadable();
33871
+ return res;
33872
+ },
33471
33873
  };
33472
33874
  }),
33473
33875
  },
@@ -34642,8 +35044,16 @@ class Client$v extends Client$w {
34642
35044
  this.logger.error(formatErrors(e));
34643
35045
  throw e;
34644
35046
  });
35047
+ const checkIsReadable = () => {
35048
+ const consumedError = "The stream has already been consumed";
35049
+ if (!res.readable) {
35050
+ this.logger.error(consumedError);
35051
+ throw new Error(consumedError);
35052
+ }
35053
+ };
34645
35054
  return {
34646
35055
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
35056
+ checkIsReadable();
34647
35057
  return new Promise((resolve, reject) => {
34648
35058
  const writableStream = fs.createWriteStream(filePath);
34649
35059
  writableStream.on("finish", () => {
@@ -34655,6 +35065,10 @@ class Client$v extends Client$w {
34655
35065
  res.pipe(writableStream);
34656
35066
  });
34657
35067
  }),
35068
+ getReadableStream: () => {
35069
+ checkIsReadable();
35070
+ return res;
35071
+ },
34658
35072
  };
34659
35073
  }),
34660
35074
  /**
@@ -35197,8 +35611,16 @@ class Client$v extends Client$w {
35197
35611
  this.logger.error(formatErrors(e));
35198
35612
  throw e;
35199
35613
  });
35614
+ const checkIsReadable = () => {
35615
+ const consumedError = "The stream has already been consumed";
35616
+ if (!res.readable) {
35617
+ this.logger.error(consumedError);
35618
+ throw new Error(consumedError);
35619
+ }
35620
+ };
35200
35621
  return {
35201
35622
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
35623
+ checkIsReadable();
35202
35624
  return new Promise((resolve, reject) => {
35203
35625
  const writableStream = fs.createWriteStream(filePath);
35204
35626
  writableStream.on("finish", () => {
@@ -35210,6 +35632,10 @@ class Client$v extends Client$w {
35210
35632
  res.pipe(writableStream);
35211
35633
  });
35212
35634
  }),
35635
+ getReadableStream: () => {
35636
+ checkIsReadable();
35637
+ return res;
35638
+ },
35213
35639
  };
35214
35640
  }),
35215
35641
  /**
@@ -36085,8 +36511,16 @@ class Client$v extends Client$w {
36085
36511
  this.logger.error(formatErrors(e));
36086
36512
  throw e;
36087
36513
  });
36514
+ const checkIsReadable = () => {
36515
+ const consumedError = "The stream has already been consumed";
36516
+ if (!res.readable) {
36517
+ this.logger.error(consumedError);
36518
+ throw new Error(consumedError);
36519
+ }
36520
+ };
36088
36521
  return {
36089
36522
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
36523
+ checkIsReadable();
36090
36524
  return new Promise((resolve, reject) => {
36091
36525
  const writableStream = fs.createWriteStream(filePath);
36092
36526
  writableStream.on("finish", () => {
@@ -36098,6 +36532,10 @@ class Client$v extends Client$w {
36098
36532
  res.pipe(writableStream);
36099
36533
  });
36100
36534
  }),
36535
+ getReadableStream: () => {
36536
+ checkIsReadable();
36537
+ return res;
36538
+ },
36101
36539
  };
36102
36540
  }),
36103
36541
  /**
@@ -36640,8 +37078,16 @@ class Client$v extends Client$w {
36640
37078
  this.logger.error(formatErrors(e));
36641
37079
  throw e;
36642
37080
  });
37081
+ const checkIsReadable = () => {
37082
+ const consumedError = "The stream has already been consumed";
37083
+ if (!res.readable) {
37084
+ this.logger.error(consumedError);
37085
+ throw new Error(consumedError);
37086
+ }
37087
+ };
36643
37088
  return {
36644
37089
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
37090
+ checkIsReadable();
36645
37091
  return new Promise((resolve, reject) => {
36646
37092
  const writableStream = fs.createWriteStream(filePath);
36647
37093
  writableStream.on("finish", () => {
@@ -36653,6 +37099,10 @@ class Client$v extends Client$w {
36653
37099
  res.pipe(writableStream);
36654
37100
  });
36655
37101
  }),
37102
+ getReadableStream: () => {
37103
+ checkIsReadable();
37104
+ return res;
37105
+ },
36656
37106
  };
36657
37107
  }),
36658
37108
  /**
@@ -37047,7 +37497,7 @@ class Client$u extends Client$v {
37047
37497
  }),
37048
37498
  },
37049
37499
  /**
37050
- * 入职
37500
+ * 投递
37051
37501
  */
37052
37502
  application: {
37053
37503
  /**
@@ -38910,6 +39360,100 @@ class Client$u extends Client$v {
38910
39360
  });
38911
39361
  }),
38912
39362
  },
39363
+ /**
39364
+ * interviewer
39365
+ */
39366
+ interviewer: {
39367
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39368
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
39369
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
39370
+ const res = yield this.httpInstance
39371
+ .request({
39372
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
39373
+ method: "GET",
39374
+ headers: pickBy(innerPayload.headers, identity),
39375
+ params: pickBy(innerPayload.params, identity),
39376
+ data,
39377
+ })
39378
+ .catch((e) => {
39379
+ this.logger.error(formatErrors(e));
39380
+ });
39381
+ return res;
39382
+ });
39383
+ const Iterable = {
39384
+ [Symbol.asyncIterator]() {
39385
+ return __asyncGenerator(this, arguments, function* _a() {
39386
+ let hasMore = true;
39387
+ let pageToken;
39388
+ while (hasMore) {
39389
+ try {
39390
+ const res = yield __await(sendRequest({
39391
+ headers,
39392
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
39393
+ data,
39394
+ }));
39395
+ const _b = get(res, "data") || {}, {
39396
+ // @ts-ignore
39397
+ has_more,
39398
+ // @ts-ignore
39399
+ page_token,
39400
+ // @ts-ignore
39401
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
39402
+ yield yield __await(rest);
39403
+ hasMore = Boolean(has_more);
39404
+ pageToken = page_token || next_page_token;
39405
+ }
39406
+ catch (e) {
39407
+ yield yield __await(null);
39408
+ break;
39409
+ }
39410
+ }
39411
+ });
39412
+ },
39413
+ };
39414
+ return Iterable;
39415
+ }),
39416
+ /**
39417
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=list&version=v1 click to debug }
39418
+ *
39419
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interviewer&version=v1 document }
39420
+ */
39421
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39422
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
39423
+ return this.httpInstance
39424
+ .request({
39425
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
39426
+ method: "GET",
39427
+ data,
39428
+ params,
39429
+ headers,
39430
+ })
39431
+ .catch((e) => {
39432
+ this.logger.error(formatErrors(e));
39433
+ throw e;
39434
+ });
39435
+ }),
39436
+ /**
39437
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=patch&version=v1 click to debug }
39438
+ *
39439
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=interviewer&version=v1 document }
39440
+ */
39441
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39442
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
39443
+ return this.httpInstance
39444
+ .request({
39445
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`, path),
39446
+ method: "PATCH",
39447
+ data,
39448
+ params,
39449
+ headers,
39450
+ })
39451
+ .catch((e) => {
39452
+ this.logger.error(formatErrors(e));
39453
+ throw e;
39454
+ });
39455
+ }),
39456
+ },
38913
39457
  /**
38914
39458
  * 职位
38915
39459
  */
@@ -39669,6 +40213,31 @@ class Client$u extends Client$v {
39669
40213
  });
39670
40214
  }),
39671
40215
  },
40216
+ /**
40217
+ * minutes
40218
+ */
40219
+ minutes: {
40220
+ /**
40221
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=minutes&apiName=get&version=v1 click to debug }
40222
+ *
40223
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=minutes&version=v1 document }
40224
+ */
40225
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
40226
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
40227
+ return this.httpInstance
40228
+ .request({
40229
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/minutes`, path),
40230
+ method: "GET",
40231
+ data,
40232
+ params,
40233
+ headers,
40234
+ })
40235
+ .catch((e) => {
40236
+ this.logger.error(formatErrors(e));
40237
+ throw e;
40238
+ });
40239
+ }),
40240
+ },
39672
40241
  /**
39673
40242
  * 备注
39674
40243
  */
@@ -41244,45 +41813,134 @@ class Client$u extends Client$v {
41244
41813
  return Iterable;
41245
41814
  }),
41246
41815
  /**
41247
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
41248
- *
41249
- * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
41250
- *
41251
- * 获取待办列表
41816
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
41817
+ *
41818
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
41819
+ *
41820
+ * 获取待办列表
41821
+ *
41822
+ * 获取待办列表
41823
+ */
41824
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41825
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41826
+ return this.httpInstance
41827
+ .request({
41828
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
41829
+ method: "GET",
41830
+ data,
41831
+ params,
41832
+ headers,
41833
+ })
41834
+ .catch((e) => {
41835
+ this.logger.error(formatErrors(e));
41836
+ throw e;
41837
+ });
41838
+ }),
41839
+ },
41840
+ /**
41841
+ * tripartite_agreement
41842
+ */
41843
+ tripartiteAgreement: {
41844
+ /**
41845
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
41846
+ *
41847
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
41848
+ */
41849
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41850
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41851
+ return this.httpInstance
41852
+ .request({
41853
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41854
+ method: "POST",
41855
+ data,
41856
+ params,
41857
+ headers,
41858
+ })
41859
+ .catch((e) => {
41860
+ this.logger.error(formatErrors(e));
41861
+ throw e;
41862
+ });
41863
+ }),
41864
+ /**
41865
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
41866
+ *
41867
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
41868
+ */
41869
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41870
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41871
+ return this.httpInstance
41872
+ .request({
41873
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
41874
+ method: "DELETE",
41875
+ data,
41876
+ params,
41877
+ headers,
41878
+ })
41879
+ .catch((e) => {
41880
+ this.logger.error(formatErrors(e));
41881
+ throw e;
41882
+ });
41883
+ }),
41884
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41885
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41886
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41887
+ const res = yield this.httpInstance
41888
+ .request({
41889
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41890
+ method: "GET",
41891
+ headers: pickBy(innerPayload.headers, identity),
41892
+ params: pickBy(innerPayload.params, identity),
41893
+ data,
41894
+ })
41895
+ .catch((e) => {
41896
+ this.logger.error(formatErrors(e));
41897
+ });
41898
+ return res;
41899
+ });
41900
+ const Iterable = {
41901
+ [Symbol.asyncIterator]() {
41902
+ return __asyncGenerator(this, arguments, function* _a() {
41903
+ let hasMore = true;
41904
+ let pageToken;
41905
+ while (hasMore) {
41906
+ try {
41907
+ const res = yield __await(sendRequest({
41908
+ headers,
41909
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41910
+ data,
41911
+ }));
41912
+ const _b = get(res, "data") || {}, {
41913
+ // @ts-ignore
41914
+ has_more,
41915
+ // @ts-ignore
41916
+ page_token,
41917
+ // @ts-ignore
41918
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41919
+ yield yield __await(rest);
41920
+ hasMore = Boolean(has_more);
41921
+ pageToken = page_token || next_page_token;
41922
+ }
41923
+ catch (e) {
41924
+ yield yield __await(null);
41925
+ break;
41926
+ }
41927
+ }
41928
+ });
41929
+ },
41930
+ };
41931
+ return Iterable;
41932
+ }),
41933
+ /**
41934
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
41252
41935
  *
41253
- * 获取待办列表
41936
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
41254
41937
  */
41255
41938
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41256
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
41257
- return this.httpInstance
41258
- .request({
41259
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
41260
- method: "GET",
41261
- data,
41262
- params,
41263
- headers,
41264
- })
41265
- .catch((e) => {
41266
- this.logger.error(formatErrors(e));
41267
- throw e;
41268
- });
41269
- }),
41270
- },
41271
- /**
41272
- * tripartite_agreement
41273
- */
41274
- tripartiteAgreement: {
41275
- /**
41276
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
41277
- *
41278
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
41279
- */
41280
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41281
41939
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41282
41940
  return this.httpInstance
41283
41941
  .request({
41284
41942
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41285
- method: "POST",
41943
+ method: "GET",
41286
41944
  data,
41287
41945
  params,
41288
41946
  headers,
@@ -41293,16 +41951,16 @@ class Client$u extends Client$v {
41293
41951
  });
41294
41952
  }),
41295
41953
  /**
41296
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
41954
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
41297
41955
  *
41298
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
41956
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
41299
41957
  */
41300
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41958
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41301
41959
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41302
41960
  return this.httpInstance
41303
41961
  .request({
41304
41962
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
41305
- method: "DELETE",
41963
+ method: "PUT",
41306
41964
  data,
41307
41965
  params,
41308
41966
  headers,
@@ -41312,12 +41970,17 @@ class Client$u extends Client$v {
41312
41970
  throw e;
41313
41971
  });
41314
41972
  }),
41973
+ },
41974
+ /**
41975
+ * 权限
41976
+ */
41977
+ userRole: {
41315
41978
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41316
41979
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41317
41980
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41318
41981
  const res = yield this.httpInstance
41319
41982
  .request({
41320
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
41983
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
41321
41984
  method: "GET",
41322
41985
  headers: pickBy(innerPayload.headers, identity),
41323
41986
  params: pickBy(innerPayload.params, identity),
@@ -41362,15 +42025,19 @@ class Client$u extends Client$v {
41362
42025
  return Iterable;
41363
42026
  }),
41364
42027
  /**
41365
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
42028
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=user_role&apiName=list&version=v1 click to debug }
41366
42029
  *
41367
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
42030
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list document }
42031
+ *
42032
+ * 获取用户角色列表
42033
+ *
42034
+ * 获取用户角色列表
41368
42035
  */
41369
42036
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41370
42037
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
41371
42038
  return this.httpInstance
41372
42039
  .request({
41373
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
42040
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
41374
42041
  method: "GET",
41375
42042
  data,
41376
42043
  params,
@@ -41381,26 +42048,6 @@ class Client$u extends Client$v {
41381
42048
  throw e;
41382
42049
  });
41383
42050
  }),
41384
- /**
41385
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
41386
- *
41387
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
41388
- */
41389
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41390
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
41391
- return this.httpInstance
41392
- .request({
41393
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
41394
- method: "PUT",
41395
- data,
41396
- params,
41397
- headers,
41398
- })
41399
- .catch((e) => {
41400
- this.logger.error(formatErrors(e));
41401
- throw e;
41402
- });
41403
- }),
41404
42051
  },
41405
42052
  /**
41406
42053
  * website.channel
@@ -41997,7 +42644,7 @@ class Client$u extends Client$v {
41997
42644
  }),
41998
42645
  },
41999
42646
  /**
42000
- * 入职
42647
+ * 投递
42001
42648
  */
42002
42649
  application: {
42003
42650
  /**
@@ -43860,6 +44507,100 @@ class Client$u extends Client$v {
43860
44507
  });
43861
44508
  }),
43862
44509
  },
44510
+ /**
44511
+ * interviewer
44512
+ */
44513
+ interviewer: {
44514
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
44515
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
44516
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
44517
+ const res = yield this.httpInstance
44518
+ .request({
44519
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
44520
+ method: "GET",
44521
+ headers: pickBy(innerPayload.headers, identity),
44522
+ params: pickBy(innerPayload.params, identity),
44523
+ data,
44524
+ })
44525
+ .catch((e) => {
44526
+ this.logger.error(formatErrors(e));
44527
+ });
44528
+ return res;
44529
+ });
44530
+ const Iterable = {
44531
+ [Symbol.asyncIterator]() {
44532
+ return __asyncGenerator(this, arguments, function* _a() {
44533
+ let hasMore = true;
44534
+ let pageToken;
44535
+ while (hasMore) {
44536
+ try {
44537
+ const res = yield __await(sendRequest({
44538
+ headers,
44539
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
44540
+ data,
44541
+ }));
44542
+ const _b = get(res, "data") || {}, {
44543
+ // @ts-ignore
44544
+ has_more,
44545
+ // @ts-ignore
44546
+ page_token,
44547
+ // @ts-ignore
44548
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
44549
+ yield yield __await(rest);
44550
+ hasMore = Boolean(has_more);
44551
+ pageToken = page_token || next_page_token;
44552
+ }
44553
+ catch (e) {
44554
+ yield yield __await(null);
44555
+ break;
44556
+ }
44557
+ }
44558
+ });
44559
+ },
44560
+ };
44561
+ return Iterable;
44562
+ }),
44563
+ /**
44564
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=list&version=v1 click to debug }
44565
+ *
44566
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=interviewer&version=v1 document }
44567
+ */
44568
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
44569
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
44570
+ return this.httpInstance
44571
+ .request({
44572
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers`, path),
44573
+ method: "GET",
44574
+ data,
44575
+ params,
44576
+ headers,
44577
+ })
44578
+ .catch((e) => {
44579
+ this.logger.error(formatErrors(e));
44580
+ throw e;
44581
+ });
44582
+ }),
44583
+ /**
44584
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=interviewer&apiName=patch&version=v1 click to debug }
44585
+ *
44586
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=hire&resource=interviewer&version=v1 document }
44587
+ */
44588
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
44589
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
44590
+ return this.httpInstance
44591
+ .request({
44592
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/interviewers/:interviewer_id`, path),
44593
+ method: "PATCH",
44594
+ data,
44595
+ params,
44596
+ headers,
44597
+ })
44598
+ .catch((e) => {
44599
+ this.logger.error(formatErrors(e));
44600
+ throw e;
44601
+ });
44602
+ }),
44603
+ },
43863
44604
  /**
43864
44605
  * 职位
43865
44606
  */
@@ -44619,6 +45360,31 @@ class Client$u extends Client$v {
44619
45360
  });
44620
45361
  }),
44621
45362
  },
45363
+ /**
45364
+ * minutes
45365
+ */
45366
+ minutes: {
45367
+ /**
45368
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=minutes&apiName=get&version=v1 click to debug }
45369
+ *
45370
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=hire&resource=minutes&version=v1 document }
45371
+ */
45372
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
45373
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
45374
+ return this.httpInstance
45375
+ .request({
45376
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/minutes`, path),
45377
+ method: "GET",
45378
+ data,
45379
+ params,
45380
+ headers,
45381
+ })
45382
+ .catch((e) => {
45383
+ this.logger.error(formatErrors(e));
45384
+ throw e;
45385
+ });
45386
+ }),
45387
+ },
44622
45388
  /**
44623
45389
  * 备注
44624
45390
  */
@@ -46116,20 +46882,98 @@ class Client$u extends Client$v {
46116
46882
  return Iterable;
46117
46883
  }),
46118
46884
  /**
46119
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=test&apiName=search&version=v1 click to debug }
46885
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=test&apiName=search&version=v1 click to debug }
46886
+ *
46887
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search document }
46888
+ *
46889
+ * 获取笔试列表
46890
+ *
46891
+ * 批量获取人才在某投递流程中的笔试信息,如作答状态、笔试得分等。(目前仅支持获取 1w 条数据,若数据量较大,可通过控制 test_start_time 查询条件分批次获取全量数据)
46892
+ */
46893
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46894
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
46895
+ return this.httpInstance
46896
+ .request({
46897
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path),
46898
+ method: "POST",
46899
+ data,
46900
+ params,
46901
+ headers,
46902
+ })
46903
+ .catch((e) => {
46904
+ this.logger.error(formatErrors(e));
46905
+ throw e;
46906
+ });
46907
+ }),
46908
+ },
46909
+ /**
46910
+ * 待办
46911
+ */
46912
+ todo: {
46913
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46914
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
46915
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
46916
+ const res = yield this.httpInstance
46917
+ .request({
46918
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
46919
+ method: "GET",
46920
+ headers: pickBy(innerPayload.headers, identity),
46921
+ params: pickBy(innerPayload.params, identity),
46922
+ data,
46923
+ })
46924
+ .catch((e) => {
46925
+ this.logger.error(formatErrors(e));
46926
+ });
46927
+ return res;
46928
+ });
46929
+ const Iterable = {
46930
+ [Symbol.asyncIterator]() {
46931
+ return __asyncGenerator(this, arguments, function* _a() {
46932
+ let hasMore = true;
46933
+ let pageToken;
46934
+ while (hasMore) {
46935
+ try {
46936
+ const res = yield __await(sendRequest({
46937
+ headers,
46938
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
46939
+ data,
46940
+ }));
46941
+ const _b = get(res, "data") || {}, {
46942
+ // @ts-ignore
46943
+ has_more,
46944
+ // @ts-ignore
46945
+ page_token,
46946
+ // @ts-ignore
46947
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
46948
+ yield yield __await(rest);
46949
+ hasMore = Boolean(has_more);
46950
+ pageToken = page_token || next_page_token;
46951
+ }
46952
+ catch (e) {
46953
+ yield yield __await(null);
46954
+ break;
46955
+ }
46956
+ }
46957
+ });
46958
+ },
46959
+ };
46960
+ return Iterable;
46961
+ }),
46962
+ /**
46963
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
46120
46964
  *
46121
- * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search document }
46965
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
46122
46966
  *
46123
- * 获取笔试列表
46967
+ * 获取待办列表
46124
46968
  *
46125
- * 批量获取人才在某投递流程中的笔试信息,如作答状态、笔试得分等。(目前仅支持获取 1w 条数据,若数据量较大,可通过控制 test_start_time 查询条件分批次获取全量数据)
46969
+ * 获取待办列表
46126
46970
  */
46127
- search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46971
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46128
46972
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46129
46973
  return this.httpInstance
46130
46974
  .request({
46131
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tests/search`, path),
46132
- method: "POST",
46975
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
46976
+ method: "GET",
46133
46977
  data,
46134
46978
  params,
46135
46979
  headers,
@@ -46141,15 +46985,55 @@ class Client$u extends Client$v {
46141
46985
  }),
46142
46986
  },
46143
46987
  /**
46144
- * 待办
46988
+ * tripartite_agreement
46145
46989
  */
46146
- todo: {
46990
+ tripartiteAgreement: {
46991
+ /**
46992
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
46993
+ *
46994
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
46995
+ */
46996
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46997
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
46998
+ return this.httpInstance
46999
+ .request({
47000
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
47001
+ method: "POST",
47002
+ data,
47003
+ params,
47004
+ headers,
47005
+ })
47006
+ .catch((e) => {
47007
+ this.logger.error(formatErrors(e));
47008
+ throw e;
47009
+ });
47010
+ }),
47011
+ /**
47012
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
47013
+ *
47014
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
47015
+ */
47016
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47017
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
47018
+ return this.httpInstance
47019
+ .request({
47020
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
47021
+ method: "DELETE",
47022
+ data,
47023
+ params,
47024
+ headers,
47025
+ })
47026
+ .catch((e) => {
47027
+ this.logger.error(formatErrors(e));
47028
+ throw e;
47029
+ });
47030
+ }),
46147
47031
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46148
47032
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46149
47033
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
46150
47034
  const res = yield this.httpInstance
46151
47035
  .request({
46152
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
47036
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
46153
47037
  method: "GET",
46154
47038
  headers: pickBy(innerPayload.headers, identity),
46155
47039
  params: pickBy(innerPayload.params, identity),
@@ -46194,45 +47078,16 @@ class Client$u extends Client$v {
46194
47078
  return Iterable;
46195
47079
  }),
46196
47080
  /**
46197
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=todo&apiName=list&version=v1 click to debug }
46198
- *
46199
- * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list document }
46200
- *
46201
- * 获取待办列表
47081
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
46202
47082
  *
46203
- * 获取待办列表
47083
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
46204
47084
  */
46205
47085
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46206
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
46207
- return this.httpInstance
46208
- .request({
46209
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/todos`, path),
46210
- method: "GET",
46211
- data,
46212
- params,
46213
- headers,
46214
- })
46215
- .catch((e) => {
46216
- this.logger.error(formatErrors(e));
46217
- throw e;
46218
- });
46219
- }),
46220
- },
46221
- /**
46222
- * tripartite_agreement
46223
- */
46224
- tripartiteAgreement: {
46225
- /**
46226
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=create&version=v1 click to debug }
46227
- *
46228
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=tripartite_agreement&version=v1 document }
46229
- */
46230
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46231
47086
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46232
47087
  return this.httpInstance
46233
47088
  .request({
46234
47089
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
46235
- method: "POST",
47090
+ method: "GET",
46236
47091
  data,
46237
47092
  params,
46238
47093
  headers,
@@ -46243,16 +47098,16 @@ class Client$u extends Client$v {
46243
47098
  });
46244
47099
  }),
46245
47100
  /**
46246
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=delete&version=v1 click to debug }
47101
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
46247
47102
  *
46248
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=hire&resource=tripartite_agreement&version=v1 document }
47103
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
46249
47104
  */
46250
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47105
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46251
47106
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46252
47107
  return this.httpInstance
46253
47108
  .request({
46254
47109
  url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
46255
- method: "DELETE",
47110
+ method: "PUT",
46256
47111
  data,
46257
47112
  params,
46258
47113
  headers,
@@ -46262,12 +47117,17 @@ class Client$u extends Client$v {
46262
47117
  throw e;
46263
47118
  });
46264
47119
  }),
47120
+ },
47121
+ /**
47122
+ * 权限
47123
+ */
47124
+ userRole: {
46265
47125
  listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46266
47126
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46267
47127
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
46268
47128
  const res = yield this.httpInstance
46269
47129
  .request({
46270
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
47130
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
46271
47131
  method: "GET",
46272
47132
  headers: pickBy(innerPayload.headers, identity),
46273
47133
  params: pickBy(innerPayload.params, identity),
@@ -46312,15 +47172,19 @@ class Client$u extends Client$v {
46312
47172
  return Iterable;
46313
47173
  }),
46314
47174
  /**
46315
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=list&version=v1 click to debug }
47175
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=user_role&apiName=list&version=v1 click to debug }
46316
47176
  *
46317
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=hire&resource=tripartite_agreement&version=v1 document }
47177
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list document }
47178
+ *
47179
+ * 获取用户角色列表
47180
+ *
47181
+ * 获取用户角色列表
46318
47182
  */
46319
47183
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46320
47184
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
46321
47185
  return this.httpInstance
46322
47186
  .request({
46323
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements`, path),
47187
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/user_roles`, path),
46324
47188
  method: "GET",
46325
47189
  data,
46326
47190
  params,
@@ -46331,26 +47195,6 @@ class Client$u extends Client$v {
46331
47195
  throw e;
46332
47196
  });
46333
47197
  }),
46334
- /**
46335
- * {@link https://open.feishu.cn/api-explorer?project=hire&resource=tripartite_agreement&apiName=update&version=v1 click to debug }
46336
- *
46337
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=hire&resource=tripartite_agreement&version=v1 document }
46338
- */
46339
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
46340
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
46341
- return this.httpInstance
46342
- .request({
46343
- url: fillApiPath(`${this.domain}/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id`, path),
46344
- method: "PUT",
46345
- data,
46346
- params,
46347
- headers,
46348
- })
46349
- .catch((e) => {
46350
- this.logger.error(formatErrors(e));
46351
- throw e;
46352
- });
46353
- }),
46354
47198
  },
46355
47199
  /**
46356
47200
  * website.channel
@@ -48069,8 +48913,16 @@ class Client$s extends Client$t {
48069
48913
  this.logger.error(formatErrors(e));
48070
48914
  throw e;
48071
48915
  });
48916
+ const checkIsReadable = () => {
48917
+ const consumedError = "The stream has already been consumed";
48918
+ if (!res.readable) {
48919
+ this.logger.error(consumedError);
48920
+ throw new Error(consumedError);
48921
+ }
48922
+ };
48072
48923
  return {
48073
48924
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
48925
+ checkIsReadable();
48074
48926
  return new Promise((resolve, reject) => {
48075
48927
  const writableStream = fs.createWriteStream(filePath);
48076
48928
  writableStream.on("finish", () => {
@@ -48082,6 +48934,10 @@ class Client$s extends Client$t {
48082
48934
  res.pipe(writableStream);
48083
48935
  });
48084
48936
  }),
48937
+ getReadableStream: () => {
48938
+ checkIsReadable();
48939
+ return res;
48940
+ },
48085
48941
  };
48086
48942
  }),
48087
48943
  },
@@ -48142,8 +48998,16 @@ class Client$s extends Client$t {
48142
48998
  this.logger.error(formatErrors(e));
48143
48999
  throw e;
48144
49000
  });
49001
+ const checkIsReadable = () => {
49002
+ const consumedError = "The stream has already been consumed";
49003
+ if (!res.readable) {
49004
+ this.logger.error(consumedError);
49005
+ throw new Error(consumedError);
49006
+ }
49007
+ };
48145
49008
  return {
48146
49009
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
49010
+ checkIsReadable();
48147
49011
  return new Promise((resolve, reject) => {
48148
49012
  const writableStream = fs.createWriteStream(filePath);
48149
49013
  writableStream.on("finish", () => {
@@ -48155,6 +49019,10 @@ class Client$s extends Client$t {
48155
49019
  res.pipe(writableStream);
48156
49020
  });
48157
49021
  }),
49022
+ getReadableStream: () => {
49023
+ checkIsReadable();
49024
+ return res;
49025
+ },
48158
49026
  };
48159
49027
  }),
48160
49028
  },
@@ -48822,8 +49690,16 @@ class Client$s extends Client$t {
48822
49690
  this.logger.error(formatErrors(e));
48823
49691
  throw e;
48824
49692
  });
49693
+ const checkIsReadable = () => {
49694
+ const consumedError = "The stream has already been consumed";
49695
+ if (!res.readable) {
49696
+ this.logger.error(consumedError);
49697
+ throw new Error(consumedError);
49698
+ }
49699
+ };
48825
49700
  return {
48826
49701
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
49702
+ checkIsReadable();
48827
49703
  return new Promise((resolve, reject) => {
48828
49704
  const writableStream = fs.createWriteStream(filePath);
48829
49705
  writableStream.on("finish", () => {
@@ -48835,6 +49711,10 @@ class Client$s extends Client$t {
48835
49711
  res.pipe(writableStream);
48836
49712
  });
48837
49713
  }),
49714
+ getReadableStream: () => {
49715
+ checkIsReadable();
49716
+ return res;
49717
+ },
48838
49718
  };
48839
49719
  }),
48840
49720
  },
@@ -50159,8 +51039,16 @@ class Client$s extends Client$t {
50159
51039
  this.logger.error(formatErrors(e));
50160
51040
  throw e;
50161
51041
  });
51042
+ const checkIsReadable = () => {
51043
+ const consumedError = "The stream has already been consumed";
51044
+ if (!res.readable) {
51045
+ this.logger.error(consumedError);
51046
+ throw new Error(consumedError);
51047
+ }
51048
+ };
50162
51049
  return {
50163
51050
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
51051
+ checkIsReadable();
50164
51052
  return new Promise((resolve, reject) => {
50165
51053
  const writableStream = fs.createWriteStream(filePath);
50166
51054
  writableStream.on("finish", () => {
@@ -50172,6 +51060,10 @@ class Client$s extends Client$t {
50172
51060
  res.pipe(writableStream);
50173
51061
  });
50174
51062
  }),
51063
+ getReadableStream: () => {
51064
+ checkIsReadable();
51065
+ return res;
51066
+ },
50175
51067
  };
50176
51068
  }),
50177
51069
  },
@@ -50232,8 +51124,16 @@ class Client$s extends Client$t {
50232
51124
  this.logger.error(formatErrors(e));
50233
51125
  throw e;
50234
51126
  });
51127
+ const checkIsReadable = () => {
51128
+ const consumedError = "The stream has already been consumed";
51129
+ if (!res.readable) {
51130
+ this.logger.error(consumedError);
51131
+ throw new Error(consumedError);
51132
+ }
51133
+ };
50235
51134
  return {
50236
51135
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
51136
+ checkIsReadable();
50237
51137
  return new Promise((resolve, reject) => {
50238
51138
  const writableStream = fs.createWriteStream(filePath);
50239
51139
  writableStream.on("finish", () => {
@@ -50245,6 +51145,10 @@ class Client$s extends Client$t {
50245
51145
  res.pipe(writableStream);
50246
51146
  });
50247
51147
  }),
51148
+ getReadableStream: () => {
51149
+ checkIsReadable();
51150
+ return res;
51151
+ },
50248
51152
  };
50249
51153
  }),
50250
51154
  },
@@ -50912,8 +51816,16 @@ class Client$s extends Client$t {
50912
51816
  this.logger.error(formatErrors(e));
50913
51817
  throw e;
50914
51818
  });
51819
+ const checkIsReadable = () => {
51820
+ const consumedError = "The stream has already been consumed";
51821
+ if (!res.readable) {
51822
+ this.logger.error(consumedError);
51823
+ throw new Error(consumedError);
51824
+ }
51825
+ };
50915
51826
  return {
50916
51827
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
51828
+ checkIsReadable();
50917
51829
  return new Promise((resolve, reject) => {
50918
51830
  const writableStream = fs.createWriteStream(filePath);
50919
51831
  writableStream.on("finish", () => {
@@ -50925,6 +51837,10 @@ class Client$s extends Client$t {
50925
51837
  res.pipe(writableStream);
50926
51838
  });
50927
51839
  }),
51840
+ getReadableStream: () => {
51841
+ checkIsReadable();
51842
+ return res;
51843
+ },
50928
51844
  };
50929
51845
  }),
50930
51846
  },
@@ -51253,6 +52169,26 @@ class Client$s extends Client$t {
51253
52169
  * feed_card
51254
52170
  */
51255
52171
  feedCard: {
52172
+ /**
52173
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=feed_card&apiName=bot_time_sentive&version=v2 click to debug }
52174
+ *
52175
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=bot_time_sentive&project=im&resource=feed_card&version=v2 document }
52176
+ */
52177
+ botTimeSentive: (payload, options) => __awaiter(this, void 0, void 0, function* () {
52178
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
52179
+ return this.httpInstance
52180
+ .request({
52181
+ url: fillApiPath(`${this.domain}/open-apis/im/v2/feed_cards/bot_time_sentive`, path),
52182
+ method: "PATCH",
52183
+ data,
52184
+ params,
52185
+ headers,
52186
+ })
52187
+ .catch((e) => {
52188
+ this.logger.error(formatErrors(e));
52189
+ throw e;
52190
+ });
52191
+ }),
51256
52192
  /**
51257
52193
  * {@link https://open.feishu.cn/api-explorer?project=im&resource=feed_card&apiName=patch&version=v2 click to debug }
51258
52194
  *
@@ -51764,8 +52700,16 @@ class Client$r extends Client$s {
51764
52700
  this.logger.error(formatErrors(e));
51765
52701
  throw e;
51766
52702
  });
52703
+ const checkIsReadable = () => {
52704
+ const consumedError = "The stream has already been consumed";
52705
+ if (!res.readable) {
52706
+ this.logger.error(consumedError);
52707
+ throw new Error(consumedError);
52708
+ }
52709
+ };
51767
52710
  return {
51768
52711
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
52712
+ checkIsReadable();
51769
52713
  return new Promise((resolve, reject) => {
51770
52714
  const writableStream = fs.createWriteStream(filePath);
51771
52715
  writableStream.on("finish", () => {
@@ -51777,6 +52721,10 @@ class Client$r extends Client$s {
51777
52721
  res.pipe(writableStream);
51778
52722
  });
51779
52723
  }),
52724
+ getReadableStream: () => {
52725
+ checkIsReadable();
52726
+ return res;
52727
+ },
51780
52728
  };
51781
52729
  }),
51782
52730
  /**
@@ -53293,6 +54241,31 @@ class Client$q extends Client$r {
53293
54241
  });
53294
54242
  }),
53295
54243
  },
54244
+ /**
54245
+ * user_mailbox.message
54246
+ */
54247
+ userMailboxMessage: {
54248
+ /**
54249
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=send&version=v1 click to debug }
54250
+ *
54251
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.message&version=v1 document }
54252
+ */
54253
+ send: (payload, options) => __awaiter(this, void 0, void 0, function* () {
54254
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
54255
+ return this.httpInstance
54256
+ .request({
54257
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`, path),
54258
+ method: "POST",
54259
+ data,
54260
+ params,
54261
+ headers,
54262
+ })
54263
+ .catch((e) => {
54264
+ this.logger.error(formatErrors(e));
54265
+ throw e;
54266
+ });
54267
+ }),
54268
+ },
53296
54269
  v1: {
53297
54270
  /**
53298
54271
  * 邮件组别名
@@ -54748,6 +55721,31 @@ class Client$q extends Client$r {
54748
55721
  });
54749
55722
  }),
54750
55723
  },
55724
+ /**
55725
+ * user_mailbox.message
55726
+ */
55727
+ userMailboxMessage: {
55728
+ /**
55729
+ * {@link https://open.feishu.cn/api-explorer?project=mail&resource=user_mailbox.message&apiName=send&version=v1 click to debug }
55730
+ *
55731
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=send&project=mail&resource=user_mailbox.message&version=v1 document }
55732
+ */
55733
+ send: (payload, options) => __awaiter(this, void 0, void 0, function* () {
55734
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
55735
+ return this.httpInstance
55736
+ .request({
55737
+ url: fillApiPath(`${this.domain}/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/messages/send`, path),
55738
+ method: "POST",
55739
+ data,
55740
+ params,
55741
+ headers,
55742
+ })
55743
+ .catch((e) => {
55744
+ this.logger.error(formatErrors(e));
55745
+ throw e;
55746
+ });
55747
+ }),
55748
+ },
54751
55749
  },
54752
55750
  };
54753
55751
  }
@@ -54891,7 +55889,60 @@ class Client$n extends Client$o {
54891
55889
  /**
54892
55890
 
54893
55891
  */
54894
- this.moments = {};
55892
+ this.moments = {
55893
+ /**
55894
+ * post
55895
+ */
55896
+ post: {
55897
+ /**
55898
+ * {@link https://open.feishu.cn/api-explorer?project=moments&resource=post&apiName=get&version=v1 click to debug }
55899
+ *
55900
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=moments&resource=post&version=v1 document }
55901
+ */
55902
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
55903
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
55904
+ return this.httpInstance
55905
+ .request({
55906
+ url: fillApiPath(`${this.domain}/open-apis/moments/v1/posts/:post_id`, path),
55907
+ method: "GET",
55908
+ data,
55909
+ params,
55910
+ headers,
55911
+ })
55912
+ .catch((e) => {
55913
+ this.logger.error(formatErrors(e));
55914
+ throw e;
55915
+ });
55916
+ }),
55917
+ },
55918
+ v1: {
55919
+ /**
55920
+ * post
55921
+ */
55922
+ post: {
55923
+ /**
55924
+ * {@link https://open.feishu.cn/api-explorer?project=moments&resource=post&apiName=get&version=v1 click to debug }
55925
+ *
55926
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=moments&resource=post&version=v1 document }
55927
+ */
55928
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
55929
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
55930
+ return this.httpInstance
55931
+ .request({
55932
+ url: fillApiPath(`${this.domain}/open-apis/moments/v1/posts/:post_id`, path),
55933
+ method: "GET",
55934
+ data,
55935
+ params,
55936
+ headers,
55937
+ })
55938
+ .catch((e) => {
55939
+ this.logger.error(formatErrors(e));
55940
+ throw e;
55941
+ });
55942
+ }),
55943
+ },
55944
+ },
55945
+ };
54895
55946
  }
54896
55947
  }
54897
55948
 
@@ -62327,8 +63378,16 @@ class Client$4 extends Client$5 {
62327
63378
  this.logger.error(formatErrors(e));
62328
63379
  throw e;
62329
63380
  });
63381
+ const checkIsReadable = () => {
63382
+ const consumedError = "The stream has already been consumed";
63383
+ if (!res.readable) {
63384
+ this.logger.error(consumedError);
63385
+ throw new Error(consumedError);
63386
+ }
63387
+ };
62330
63388
  return {
62331
63389
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
63390
+ checkIsReadable();
62332
63391
  return new Promise((resolve, reject) => {
62333
63392
  const writableStream = fs.createWriteStream(filePath);
62334
63393
  writableStream.on("finish", () => {
@@ -62340,6 +63399,10 @@ class Client$4 extends Client$5 {
62340
63399
  res.pipe(writableStream);
62341
63400
  });
62342
63401
  }),
63402
+ getReadableStream: () => {
63403
+ checkIsReadable();
63404
+ return res;
63405
+ },
62343
63406
  };
62344
63407
  }),
62345
63408
  /**
@@ -64143,8 +65206,16 @@ class Client$4 extends Client$5 {
64143
65206
  this.logger.error(formatErrors(e));
64144
65207
  throw e;
64145
65208
  });
65209
+ const checkIsReadable = () => {
65210
+ const consumedError = "The stream has already been consumed";
65211
+ if (!res.readable) {
65212
+ this.logger.error(consumedError);
65213
+ throw new Error(consumedError);
65214
+ }
65215
+ };
64146
65216
  return {
64147
65217
  writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
65218
+ checkIsReadable();
64148
65219
  return new Promise((resolve, reject) => {
64149
65220
  const writableStream = fs.createWriteStream(filePath);
64150
65221
  writableStream.on("finish", () => {
@@ -64156,6 +65227,10 @@ class Client$4 extends Client$5 {
64156
65227
  res.pipe(writableStream);
64157
65228
  });
64158
65229
  }),
65230
+ getReadableStream: () => {
65231
+ checkIsReadable();
65232
+ return res;
65233
+ },
64159
65234
  };
64160
65235
  }),
64161
65236
  /**
@@ -67512,7 +68587,7 @@ class Client extends Client$1 {
67512
68587
  }
67513
68588
  return {
67514
68589
  params: Object.assign(Object.assign({}, get(payload, 'params', {})), targetOptions.params),
67515
- headers: Object.assign(Object.assign({}, get(payload, 'headers', {})), targetOptions.headers),
68590
+ headers: Object.assign(Object.assign({ 'User-Agent': 'oapi-node-sdk/1.0.0' }, get(payload, 'headers', {})), targetOptions.headers),
67516
68591
  data: Object.assign(Object.assign({}, get(payload, 'data', {})), targetOptions.data),
67517
68592
  path: Object.assign(Object.assign({}, get(payload, 'path', {})), targetOptions.path),
67518
68593
  };