@larksuiteoapi/node-sdk 1.22.0 → 1.23.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.
Files changed (4) hide show
  1. package/es/index.js +3046 -624
  2. package/lib/index.js +3046 -624
  3. package/package.json +1 -1
  4. package/types/index.d.ts +5699 -1092
package/es/index.js CHANGED
@@ -70,7 +70,12 @@ function __asyncGenerator(thisArg, _arguments, generator) {
70
70
  function fulfill(value) { resume("next", value); }
71
71
  function reject(value) { resume("throw", value); }
72
72
  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
73
- }
73
+ }
74
+
75
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
76
+ var e = new Error(message);
77
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
78
+ };
74
79
 
75
80
  const defaultHttpInstance = axios.create();
76
81
  defaultHttpInstance.interceptors.request.use((req) => {
@@ -214,7 +219,7 @@ const formatErrors = (e) => {
214
219
  };
215
220
 
216
221
  // auto gen
217
- class Client$V {
222
+ class Client$X {
218
223
  constructor() {
219
224
  /**
220
225
  * 智能门禁
@@ -923,11 +928,11 @@ class Client$V {
923
928
  }
924
929
 
925
930
  // auto gen
926
- class Client$U extends Client$V {
931
+ class Client$W extends Client$X {
927
932
  constructor() {
928
933
  super(...arguments);
929
934
  /**
930
- * 管理后台-数据报表
935
+ * 管理后台-企业勋章
931
936
  */
932
937
  this.admin = {
933
938
  /**
@@ -1823,13 +1828,42 @@ class Client$U extends Client$V {
1823
1828
  }
1824
1829
 
1825
1830
  // auto gen
1826
- class Client$T extends Client$U {
1831
+ class Client$V extends Client$W {
1827
1832
  constructor() {
1828
1833
  super(...arguments);
1829
1834
  /**
1830
1835
  * 应用信息
1831
1836
  */
1832
1837
  this.application = {
1838
+ /**
1839
+ * 应用红点
1840
+ */
1841
+ appBadge: {
1842
+ /**
1843
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_badge&apiName=set&version=v6 click to debug }
1844
+ *
1845
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set document }
1846
+ *
1847
+ * 更新应用红点
1848
+ *
1849
+ * 更新应用红点信息,用于工作台场景
1850
+ */
1851
+ set: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1852
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1853
+ return this.httpInstance
1854
+ .request({
1855
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/app_badge/set`, path),
1856
+ method: "POST",
1857
+ data,
1858
+ params,
1859
+ headers,
1860
+ })
1861
+ .catch((e) => {
1862
+ this.logger.error(formatErrors(e));
1863
+ throw e;
1864
+ });
1865
+ }),
1866
+ },
1833
1867
  /**
1834
1868
  * 我的常用推荐规则
1835
1869
  */
@@ -2380,6 +2414,35 @@ class Client$T extends Client$U {
2380
2414
  }),
2381
2415
  },
2382
2416
  v6: {
2417
+ /**
2418
+ * 应用红点
2419
+ */
2420
+ appBadge: {
2421
+ /**
2422
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_badge&apiName=set&version=v6 click to debug }
2423
+ *
2424
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set document }
2425
+ *
2426
+ * 更新应用红点
2427
+ *
2428
+ * 更新应用红点信息,用于工作台场景
2429
+ */
2430
+ set: (payload, options) => __awaiter(this, void 0, void 0, function* () {
2431
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
2432
+ return this.httpInstance
2433
+ .request({
2434
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/app_badge/set`, path),
2435
+ method: "POST",
2436
+ data,
2437
+ params,
2438
+ headers,
2439
+ })
2440
+ .catch((e) => {
2441
+ this.logger.error(formatErrors(e));
2442
+ throw e;
2443
+ });
2444
+ }),
2445
+ },
2383
2446
  /**
2384
2447
  * 我的常用推荐规则
2385
2448
  */
@@ -2935,7 +2998,7 @@ class Client$T extends Client$U {
2935
2998
  }
2936
2999
 
2937
3000
  // auto gen
2938
- class Client$S extends Client$T {
3001
+ class Client$U extends Client$V {
2939
3002
  constructor() {
2940
3003
  super(...arguments);
2941
3004
  /**
@@ -3227,7 +3290,7 @@ class Client$S extends Client$T {
3227
3290
  }),
3228
3291
  },
3229
3292
  /**
3230
- * 原生审批实例
3293
+ * 审批查询
3231
3294
  */
3232
3295
  instance: {
3233
3296
  /**
@@ -3709,7 +3772,7 @@ class Client$S extends Client$T {
3709
3772
  }),
3710
3773
  },
3711
3774
  /**
3712
- * 原生审批任务
3775
+ * 审批查询
3713
3776
  */
3714
3777
  task: {
3715
3778
  /**
@@ -4191,7 +4254,7 @@ class Client$S extends Client$T {
4191
4254
  }),
4192
4255
  },
4193
4256
  /**
4194
- * 原生审批实例
4257
+ * 审批查询
4195
4258
  */
4196
4259
  instance: {
4197
4260
  /**
@@ -4673,7 +4736,7 @@ class Client$S extends Client$T {
4673
4736
  }),
4674
4737
  },
4675
4738
  /**
4676
- * 原生审批任务
4739
+ * 审批查询
4677
4740
  */
4678
4741
  task: {
4679
4742
  /**
@@ -4875,7 +4938,7 @@ class Client$S extends Client$T {
4875
4938
  }
4876
4939
 
4877
4940
  // auto gen
4878
- class Client$R extends Client$S {
4941
+ class Client$T extends Client$U {
4879
4942
  constructor() {
4880
4943
  super(...arguments);
4881
4944
  /**
@@ -6819,7 +6882,7 @@ class Client$R extends Client$S {
6819
6882
  }
6820
6883
 
6821
6884
  // auto gen
6822
- class Client$Q extends Client$R {
6885
+ class Client$S extends Client$T {
6823
6886
  constructor() {
6824
6887
  super(...arguments);
6825
6888
  /**
@@ -7063,7 +7126,7 @@ class Client$Q extends Client$R {
7063
7126
  }
7064
7127
 
7065
7128
  // auto gen
7066
- class Client$P extends Client$Q {
7129
+ class Client$R extends Client$S {
7067
7130
  constructor() {
7068
7131
  super(...arguments);
7069
7132
  /**
@@ -7095,31 +7158,6 @@ class Client$P extends Client$Q {
7095
7158
  });
7096
7159
  }),
7097
7160
  },
7098
- /**
7099
- * authorize
7100
- */
7101
- authorize: {
7102
- /**
7103
- * {@link https://open.feishu.cn/api-explorer?project=authen&resource=authorize&apiName=get&version=v1 click to debug }
7104
- *
7105
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=authorize&version=v1 document }
7106
- */
7107
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
7108
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
7109
- return this.httpInstance
7110
- .request({
7111
- url: fillApiPath(`${this.domain}/open-apis/authen/v1/authorize`, path),
7112
- method: "GET",
7113
- data,
7114
- params,
7115
- headers,
7116
- })
7117
- .catch((e) => {
7118
- this.logger.error(formatErrors(e));
7119
- throw e;
7120
- });
7121
- }),
7122
- },
7123
7161
  /**
7124
7162
  * oidc.access_token
7125
7163
  */
@@ -7246,31 +7284,6 @@ class Client$P extends Client$Q {
7246
7284
  });
7247
7285
  }),
7248
7286
  },
7249
- /**
7250
- * authorize
7251
- */
7252
- authorize: {
7253
- /**
7254
- * {@link https://open.feishu.cn/api-explorer?project=authen&resource=authorize&apiName=get&version=v1 click to debug }
7255
- *
7256
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=authorize&version=v1 document }
7257
- */
7258
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
7259
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
7260
- return this.httpInstance
7261
- .request({
7262
- url: fillApiPath(`${this.domain}/open-apis/authen/v1/authorize`, path),
7263
- method: "GET",
7264
- data,
7265
- params,
7266
- headers,
7267
- })
7268
- .catch((e) => {
7269
- this.logger.error(formatErrors(e));
7270
- throw e;
7271
- });
7272
- }),
7273
- },
7274
7287
  /**
7275
7288
  * oidc.access_token
7276
7289
  */
@@ -7377,7 +7390,7 @@ class Client$P extends Client$Q {
7377
7390
  }
7378
7391
 
7379
7392
  // auto gen
7380
- class Client$O extends Client$P {
7393
+ class Client$Q extends Client$R {
7381
7394
  constructor() {
7382
7395
  super(...arguments);
7383
7396
  /**
@@ -7388,7 +7401,7 @@ class Client$O extends Client$P {
7388
7401
  }
7389
7402
 
7390
7403
  // auto gen
7391
- class Client$N extends Client$O {
7404
+ class Client$P extends Client$Q {
7392
7405
  constructor() {
7393
7406
  super(...arguments);
7394
7407
  /**
@@ -8398,7 +8411,7 @@ class Client$N extends Client$O {
8398
8411
  }
8399
8412
 
8400
8413
  // auto gen
8401
- class Client$M extends Client$N {
8414
+ class Client$O extends Client$P {
8402
8415
  constructor() {
8403
8416
  super(...arguments);
8404
8417
  /**
@@ -11388,7 +11401,7 @@ class Client$M extends Client$N {
11388
11401
  }
11389
11402
 
11390
11403
  // auto gen
11391
- class Client$L extends Client$M {
11404
+ class Client$N extends Client$O {
11392
11405
  constructor() {
11393
11406
  super(...arguments);
11394
11407
  /**
@@ -11566,7 +11579,7 @@ class Client$L extends Client$M {
11566
11579
  }
11567
11580
 
11568
11581
  // auto gen
11569
- class Client$K extends Client$L {
11582
+ class Client$M extends Client$N {
11570
11583
  constructor() {
11571
11584
  super(...arguments);
11572
11585
  /**
@@ -12556,6 +12569,51 @@ class Client$K extends Client$L {
12556
12569
  });
12557
12570
  }),
12558
12571
  },
12572
+ /**
12573
+ * calendar.event.meeting_chat
12574
+ */
12575
+ calendarEventMeetingChat: {
12576
+ /**
12577
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=create&version=v4 click to debug }
12578
+ *
12579
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
12580
+ */
12581
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12582
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12583
+ return this.httpInstance
12584
+ .request({
12585
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
12586
+ method: "POST",
12587
+ data,
12588
+ params,
12589
+ headers,
12590
+ })
12591
+ .catch((e) => {
12592
+ this.logger.error(formatErrors(e));
12593
+ throw e;
12594
+ });
12595
+ }),
12596
+ /**
12597
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=delete&version=v4 click to debug }
12598
+ *
12599
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
12600
+ */
12601
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12602
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12603
+ return this.httpInstance
12604
+ .request({
12605
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
12606
+ method: "DELETE",
12607
+ data,
12608
+ params,
12609
+ headers,
12610
+ })
12611
+ .catch((e) => {
12612
+ this.logger.error(formatErrors(e));
12613
+ throw e;
12614
+ });
12615
+ }),
12616
+ },
12559
12617
  /**
12560
12618
  * Exchange绑定
12561
12619
  */
@@ -13734,6 +13792,51 @@ class Client$K extends Client$L {
13734
13792
  });
13735
13793
  }),
13736
13794
  },
13795
+ /**
13796
+ * calendar.event.meeting_chat
13797
+ */
13798
+ calendarEventMeetingChat: {
13799
+ /**
13800
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=create&version=v4 click to debug }
13801
+ *
13802
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
13803
+ */
13804
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13805
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13806
+ return this.httpInstance
13807
+ .request({
13808
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
13809
+ method: "POST",
13810
+ data,
13811
+ params,
13812
+ headers,
13813
+ })
13814
+ .catch((e) => {
13815
+ this.logger.error(formatErrors(e));
13816
+ throw e;
13817
+ });
13818
+ }),
13819
+ /**
13820
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=delete&version=v4 click to debug }
13821
+ *
13822
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
13823
+ */
13824
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13825
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13826
+ return this.httpInstance
13827
+ .request({
13828
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
13829
+ method: "DELETE",
13830
+ data,
13831
+ params,
13832
+ headers,
13833
+ })
13834
+ .catch((e) => {
13835
+ this.logger.error(formatErrors(e));
13836
+ throw e;
13837
+ });
13838
+ }),
13839
+ },
13737
13840
  /**
13738
13841
  * Exchange绑定
13739
13842
  */
@@ -13934,7 +14037,7 @@ class Client$K extends Client$L {
13934
14037
  }
13935
14038
 
13936
14039
  // auto gen
13937
- class Client$J extends Client$K {
14040
+ class Client$L extends Client$M {
13938
14041
  constructor() {
13939
14042
  super(...arguments);
13940
14043
  /**
@@ -13945,7 +14048,7 @@ class Client$J extends Client$K {
13945
14048
  }
13946
14049
 
13947
14050
  // auto gen
13948
- class Client$I extends Client$J {
14051
+ class Client$K extends Client$L {
13949
14052
  constructor() {
13950
14053
  super(...arguments);
13951
14054
  /**
@@ -14499,6 +14602,26 @@ class Client$I extends Client$J {
14499
14602
  throw e;
14500
14603
  });
14501
14604
  }),
14605
+ /**
14606
+ * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update_department_id&version=v3 click to debug }
14607
+ *
14608
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_department_id&project=contact&resource=department&version=v3 document }
14609
+ */
14610
+ updateDepartmentId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
14611
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
14612
+ return this.httpInstance
14613
+ .request({
14614
+ url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`, path),
14615
+ method: "PATCH",
14616
+ data,
14617
+ params,
14618
+ headers,
14619
+ })
14620
+ .catch((e) => {
14621
+ this.logger.error(formatErrors(e));
14622
+ throw e;
14623
+ });
14624
+ }),
14502
14625
  },
14503
14626
  /**
14504
14627
  * 人员类型
@@ -16872,6 +16995,26 @@ class Client$I extends Client$J {
16872
16995
  throw e;
16873
16996
  });
16874
16997
  }),
16998
+ /**
16999
+ * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update_department_id&version=v3 click to debug }
17000
+ *
17001
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_department_id&project=contact&resource=department&version=v3 document }
17002
+ */
17003
+ updateDepartmentId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
17004
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
17005
+ return this.httpInstance
17006
+ .request({
17007
+ url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`, path),
17008
+ method: "PATCH",
17009
+ data,
17010
+ params,
17011
+ headers,
17012
+ })
17013
+ .catch((e) => {
17014
+ this.logger.error(formatErrors(e));
17015
+ throw e;
17016
+ });
17017
+ }),
16875
17018
  },
16876
17019
  /**
16877
17020
  * 人员类型
@@ -18703,7 +18846,7 @@ class Client$I extends Client$J {
18703
18846
  }
18704
18847
 
18705
18848
  // auto gen
18706
- class Client$H extends Client$I {
18849
+ class Client$J extends Client$K {
18707
18850
  constructor() {
18708
18851
  super(...arguments);
18709
18852
  /**
@@ -18714,7 +18857,7 @@ class Client$H extends Client$I {
18714
18857
  }
18715
18858
 
18716
18859
  // auto gen
18717
- class Client$G extends Client$H {
18860
+ class Client$I extends Client$J {
18718
18861
  constructor() {
18719
18862
  super(...arguments);
18720
18863
  /**
@@ -18725,7 +18868,7 @@ class Client$G extends Client$H {
18725
18868
  }
18726
18869
 
18727
18870
  // auto gen
18728
- class Client$F extends Client$G {
18871
+ class Client$H extends Client$I {
18729
18872
  constructor() {
18730
18873
  super(...arguments);
18731
18874
  /**
@@ -18862,6 +19005,33 @@ class Client$F extends Client$G {
18862
19005
  });
18863
19006
  }),
18864
19007
  },
19008
+ /**
19009
+ * compensation_standard
19010
+ */
19011
+ compensationStandard: {
19012
+ /**
19013
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=compensation_standard&apiName=match&version=v1 click to debug }
19014
+ *
19015
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=corehr&resource=compensation_standard&version=v1 document }
19016
+ *
19017
+ * 分页查询地点数据
19018
+ */
19019
+ match: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19020
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19021
+ return this.httpInstance
19022
+ .request({
19023
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`, path),
19024
+ method: "GET",
19025
+ data,
19026
+ params,
19027
+ headers,
19028
+ })
19029
+ .catch((e) => {
19030
+ this.logger.error(formatErrors(e));
19031
+ throw e;
19032
+ });
19033
+ }),
19034
+ },
18865
19035
  /**
18866
19036
  * 合同
18867
19037
  */
@@ -21226,6 +21396,33 @@ class Client$F extends Client$G {
21226
21396
  });
21227
21397
  }),
21228
21398
  },
21399
+ /**
21400
+ * compensation_standard
21401
+ */
21402
+ compensationStandard: {
21403
+ /**
21404
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=compensation_standard&apiName=match&version=v1 click to debug }
21405
+ *
21406
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=corehr&resource=compensation_standard&version=v1 document }
21407
+ *
21408
+ * 分页查询地点数据
21409
+ */
21410
+ match: (payload, options) => __awaiter(this, void 0, void 0, function* () {
21411
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
21412
+ return this.httpInstance
21413
+ .request({
21414
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`, path),
21415
+ method: "GET",
21416
+ data,
21417
+ params,
21418
+ headers,
21419
+ })
21420
+ .catch((e) => {
21421
+ this.logger.error(formatErrors(e));
21422
+ throw e;
21423
+ });
21424
+ }),
21425
+ },
21229
21426
  /**
21230
21427
  * 合同
21231
21428
  */
@@ -23461,6 +23658,128 @@ class Client$F extends Client$G {
23461
23658
  },
23462
23659
  },
23463
23660
  v2: {
23661
+ /**
23662
+ * bp
23663
+ */
23664
+ bp: {
23665
+ /**
23666
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=get_by_department&version=v2 click to debug }
23667
+ *
23668
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_department&project=corehr&resource=bp&version=v2 document }
23669
+ */
23670
+ getByDepartment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23671
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23672
+ return this.httpInstance
23673
+ .request({
23674
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`, path),
23675
+ method: "POST",
23676
+ data,
23677
+ params,
23678
+ headers,
23679
+ })
23680
+ .catch((e) => {
23681
+ this.logger.error(formatErrors(e));
23682
+ throw e;
23683
+ });
23684
+ }),
23685
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23686
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23687
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
23688
+ const res = yield this.httpInstance
23689
+ .request({
23690
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
23691
+ method: "GET",
23692
+ headers: pickBy(innerPayload.headers, identity),
23693
+ params: pickBy(innerPayload.params, identity),
23694
+ })
23695
+ .catch((e) => {
23696
+ this.logger.error(formatErrors(e));
23697
+ });
23698
+ return res;
23699
+ });
23700
+ const Iterable = {
23701
+ [Symbol.asyncIterator]() {
23702
+ return __asyncGenerator(this, arguments, function* _a() {
23703
+ let hasMore = true;
23704
+ let pageToken;
23705
+ while (hasMore) {
23706
+ try {
23707
+ const res = yield __await(sendRequest({
23708
+ headers,
23709
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
23710
+ data,
23711
+ }));
23712
+ const _b = get(res, "data") || {}, {
23713
+ // @ts-ignore
23714
+ has_more,
23715
+ // @ts-ignore
23716
+ page_token,
23717
+ // @ts-ignore
23718
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
23719
+ yield yield __await(rest);
23720
+ hasMore = Boolean(has_more);
23721
+ pageToken = page_token || next_page_token;
23722
+ }
23723
+ catch (e) {
23724
+ yield yield __await(null);
23725
+ break;
23726
+ }
23727
+ }
23728
+ });
23729
+ },
23730
+ };
23731
+ return Iterable;
23732
+ }),
23733
+ /**
23734
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=list&version=v2 click to debug }
23735
+ *
23736
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
23737
+ *
23738
+ * 待补充
23739
+ */
23740
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23741
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23742
+ return this.httpInstance
23743
+ .request({
23744
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
23745
+ method: "GET",
23746
+ data,
23747
+ params,
23748
+ headers,
23749
+ })
23750
+ .catch((e) => {
23751
+ this.logger.error(formatErrors(e));
23752
+ throw e;
23753
+ });
23754
+ }),
23755
+ },
23756
+ /**
23757
+ * company
23758
+ */
23759
+ company: {
23760
+ /**
23761
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
23762
+ *
23763
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
23764
+ *
23765
+ * 通过公司 ID 批量获取公司信息
23766
+ */
23767
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23768
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23769
+ return this.httpInstance
23770
+ .request({
23771
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path),
23772
+ method: "POST",
23773
+ data,
23774
+ params,
23775
+ headers,
23776
+ })
23777
+ .catch((e) => {
23778
+ this.logger.error(formatErrors(e));
23779
+ throw e;
23780
+ });
23781
+ }),
23782
+ },
23464
23783
  /**
23465
23784
  * contract
23466
23785
  */
@@ -23728,6 +24047,31 @@ class Client$F extends Client$G {
23728
24047
  });
23729
24048
  }),
23730
24049
  },
24050
+ /**
24051
+ * employees.bp
24052
+ */
24053
+ employeesBp: {
24054
+ /**
24055
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.bp&apiName=batch_get&version=v2 click to debug }
24056
+ *
24057
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employees.bp&version=v2 document }
24058
+ */
24059
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24060
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24061
+ return this.httpInstance
24062
+ .request({
24063
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`, path),
24064
+ method: "POST",
24065
+ data,
24066
+ params,
24067
+ headers,
24068
+ })
24069
+ .catch((e) => {
24070
+ this.logger.error(formatErrors(e));
24071
+ throw e;
24072
+ });
24073
+ }),
24074
+ },
23731
24075
  /**
23732
24076
  * employees.job_data
23733
24077
  */
@@ -23773,6 +24117,55 @@ class Client$F extends Client$G {
23773
24117
  });
23774
24118
  }),
23775
24119
  },
24120
+ /**
24121
+ * job
24122
+ */
24123
+ job: {
24124
+ /**
24125
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v2 click to debug }
24126
+ *
24127
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=job&version=v2 document }
24128
+ *
24129
+ * 根据 ID 查询单个职务。
24130
+ */
24131
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24132
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24133
+ return this.httpInstance
24134
+ .request({
24135
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`, path),
24136
+ method: "GET",
24137
+ data,
24138
+ params,
24139
+ headers,
24140
+ })
24141
+ .catch((e) => {
24142
+ this.logger.error(formatErrors(e));
24143
+ throw e;
24144
+ });
24145
+ }),
24146
+ /**
24147
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v2 click to debug }
24148
+ *
24149
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
24150
+ *
24151
+ * 分页查询职务数据
24152
+ */
24153
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24154
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24155
+ return this.httpInstance
24156
+ .request({
24157
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path),
24158
+ method: "GET",
24159
+ data,
24160
+ params,
24161
+ headers,
24162
+ })
24163
+ .catch((e) => {
24164
+ this.logger.error(formatErrors(e));
24165
+ throw e;
24166
+ });
24167
+ }),
24168
+ },
23776
24169
  /**
23777
24170
  * job_change
23778
24171
  */
@@ -23826,17 +24219,332 @@ class Client$F extends Client$G {
23826
24219
  return Iterable;
23827
24220
  }),
23828
24221
  /**
23829
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
23830
- *
23831
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
24222
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
24223
+ *
24224
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
24225
+ *
24226
+ * 获取员工异动列表
24227
+ */
24228
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24229
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24230
+ return this.httpInstance
24231
+ .request({
24232
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
24233
+ method: "POST",
24234
+ data,
24235
+ params,
24236
+ headers,
24237
+ })
24238
+ .catch((e) => {
24239
+ this.logger.error(formatErrors(e));
24240
+ throw e;
24241
+ });
24242
+ }),
24243
+ },
24244
+ /**
24245
+ * job_family
24246
+ */
24247
+ jobFamily: {
24248
+ /**
24249
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=batch_get&version=v2 click to debug }
24250
+ *
24251
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
24252
+ *
24253
+ * 通过序列 ID 批量获取序列信息
24254
+ */
24255
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24256
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24257
+ return this.httpInstance
24258
+ .request({
24259
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`, path),
24260
+ method: "POST",
24261
+ data,
24262
+ params,
24263
+ headers,
24264
+ })
24265
+ .catch((e) => {
24266
+ this.logger.error(formatErrors(e));
24267
+ throw e;
24268
+ });
24269
+ }),
24270
+ },
24271
+ /**
24272
+ * job_level
24273
+ */
24274
+ jobLevel: {
24275
+ /**
24276
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=batch_get&version=v2 click to debug }
24277
+ *
24278
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
24279
+ *
24280
+ * 通过职级 ID 批量获取职级信息
24281
+ */
24282
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24283
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24284
+ return this.httpInstance
24285
+ .request({
24286
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`, path),
24287
+ method: "POST",
24288
+ data,
24289
+ params,
24290
+ headers,
24291
+ })
24292
+ .catch((e) => {
24293
+ this.logger.error(formatErrors(e));
24294
+ throw e;
24295
+ });
24296
+ }),
24297
+ },
24298
+ /**
24299
+ * location
24300
+ */
24301
+ location: {
24302
+ /**
24303
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
24304
+ *
24305
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=location&version=v2 document }
24306
+ *
24307
+ * 通过地点 ID 批量获取地点信息
24308
+ */
24309
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24310
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24311
+ return this.httpInstance
24312
+ .request({
24313
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/batch_get`, path),
24314
+ method: "POST",
24315
+ data,
24316
+ params,
24317
+ headers,
24318
+ })
24319
+ .catch((e) => {
24320
+ this.logger.error(formatErrors(e));
24321
+ throw e;
24322
+ });
24323
+ }),
24324
+ },
24325
+ /**
24326
+ * person
24327
+ */
24328
+ person: {
24329
+ /**
24330
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v2 click to debug }
24331
+ *
24332
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=person&version=v2 document }
24333
+ *
24334
+ * 创建个人信息数据
24335
+ */
24336
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24337
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24338
+ return this.httpInstance
24339
+ .request({
24340
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons`, path),
24341
+ method: "POST",
24342
+ data,
24343
+ params,
24344
+ headers,
24345
+ })
24346
+ .catch((e) => {
24347
+ this.logger.error(formatErrors(e));
24348
+ throw e;
24349
+ });
24350
+ }),
24351
+ /**
24352
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v2 click to debug }
24353
+ *
24354
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=person&version=v2 document }
24355
+ */
24356
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24357
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24358
+ return this.httpInstance
24359
+ .request({
24360
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons/:person_id`, path),
24361
+ method: "PATCH",
24362
+ data,
24363
+ params,
24364
+ headers,
24365
+ })
24366
+ .catch((e) => {
24367
+ this.logger.error(formatErrors(e));
24368
+ throw e;
24369
+ });
24370
+ }),
24371
+ },
24372
+ /**
24373
+ * 待入职
24374
+ */
24375
+ preHire: {
24376
+ /**
24377
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
24378
+ *
24379
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
24380
+ *
24381
+ * 创建待入职人员
24382
+ *
24383
+ * 创建待入职人员
24384
+ */
24385
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24386
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24387
+ return this.httpInstance
24388
+ .request({
24389
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
24390
+ method: "POST",
24391
+ data,
24392
+ params,
24393
+ headers,
24394
+ })
24395
+ .catch((e) => {
24396
+ this.logger.error(formatErrors(e));
24397
+ throw e;
24398
+ });
24399
+ }),
24400
+ },
24401
+ /**
24402
+ * probation.assessment
24403
+ */
24404
+ probationAssessment: {
24405
+ /**
24406
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
24407
+ *
24408
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
24409
+ */
24410
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24411
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24412
+ return this.httpInstance
24413
+ .request({
24414
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path),
24415
+ method: "POST",
24416
+ data,
24417
+ params,
24418
+ headers,
24419
+ })
24420
+ .catch((e) => {
24421
+ this.logger.error(formatErrors(e));
24422
+ throw e;
24423
+ });
24424
+ }),
24425
+ /**
24426
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
24427
+ *
24428
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
24429
+ */
24430
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24431
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24432
+ return this.httpInstance
24433
+ .request({
24434
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
24435
+ method: "DELETE",
24436
+ data,
24437
+ params,
24438
+ headers,
24439
+ })
24440
+ .catch((e) => {
24441
+ this.logger.error(formatErrors(e));
24442
+ throw e;
24443
+ });
24444
+ }),
24445
+ /**
24446
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
24447
+ *
24448
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
24449
+ */
24450
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24451
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24452
+ return this.httpInstance
24453
+ .request({
24454
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
24455
+ method: "PATCH",
24456
+ data,
24457
+ params,
24458
+ headers,
24459
+ })
24460
+ .catch((e) => {
24461
+ this.logger.error(formatErrors(e));
24462
+ throw e;
24463
+ });
24464
+ }),
24465
+ },
24466
+ /**
24467
+ * probation
24468
+ */
24469
+ probation: {
24470
+ /**
24471
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
24472
+ *
24473
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
24474
+ */
24475
+ enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24476
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24477
+ return this.httpInstance
24478
+ .request({
24479
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
24480
+ method: "POST",
24481
+ data,
24482
+ params,
24483
+ headers,
24484
+ })
24485
+ .catch((e) => {
24486
+ this.logger.error(formatErrors(e));
24487
+ throw e;
24488
+ });
24489
+ }),
24490
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24491
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24492
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
24493
+ const res = yield this.httpInstance
24494
+ .request({
24495
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
24496
+ method: "POST",
24497
+ headers: pickBy(innerPayload.headers, identity),
24498
+ params: pickBy(innerPayload.params, identity),
24499
+ })
24500
+ .catch((e) => {
24501
+ this.logger.error(formatErrors(e));
24502
+ });
24503
+ return res;
24504
+ });
24505
+ const Iterable = {
24506
+ [Symbol.asyncIterator]() {
24507
+ return __asyncGenerator(this, arguments, function* _a() {
24508
+ let hasMore = true;
24509
+ let pageToken;
24510
+ while (hasMore) {
24511
+ try {
24512
+ const res = yield __await(sendRequest({
24513
+ headers,
24514
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
24515
+ data,
24516
+ }));
24517
+ const _b = get(res, "data") || {}, {
24518
+ // @ts-ignore
24519
+ has_more,
24520
+ // @ts-ignore
24521
+ page_token,
24522
+ // @ts-ignore
24523
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
24524
+ yield yield __await(rest);
24525
+ hasMore = Boolean(has_more);
24526
+ pageToken = page_token || next_page_token;
24527
+ }
24528
+ catch (e) {
24529
+ yield yield __await(null);
24530
+ break;
24531
+ }
24532
+ }
24533
+ });
24534
+ },
24535
+ };
24536
+ return Iterable;
24537
+ }),
24538
+ /**
24539
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=search&version=v2 click to debug }
23832
24540
  *
23833
- * 获取员工异动列表
24541
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=probation&version=v2 document }
23834
24542
  */
23835
24543
  search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23836
24544
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23837
24545
  return this.httpInstance
23838
24546
  .request({
23839
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
24547
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
23840
24548
  method: "POST",
23841
24549
  data,
23842
24550
  params,
@@ -23848,80 +24556,419 @@ class Client$F extends Client$G {
23848
24556
  });
23849
24557
  }),
23850
24558
  },
24559
+ },
24560
+ };
24561
+ }
24562
+ }
24563
+
24564
+ // auto gen
24565
+ class Client$G extends Client$H {
24566
+ constructor() {
24567
+ super(...arguments);
24568
+ /**
24569
+
24570
+ */
24571
+ this.docs_tool = {};
24572
+ }
24573
+ }
24574
+
24575
+ // auto gen
24576
+ class Client$F extends Client$G {
24577
+ constructor() {
24578
+ super(...arguments);
24579
+ /**
24580
+
24581
+ */
24582
+ this.document_ai = {
24583
+ v1: {
23851
24584
  /**
23852
- * person
24585
+ * bank_card
23853
24586
  */
23854
- person: {
24587
+ bankCard: {
23855
24588
  /**
23856
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v2 click to debug }
24589
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=bank_card&apiName=recognize&version=v1 click to debug }
23857
24590
  *
23858
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=person&version=v2 document }
24591
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=bank_card&version=v1 document }
24592
+ */
24593
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24594
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24595
+ const res = yield this.httpInstance
24596
+ .request({
24597
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`, path),
24598
+ method: "POST",
24599
+ data,
24600
+ params,
24601
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24602
+ })
24603
+ .catch((e) => {
24604
+ this.logger.error(formatErrors(e));
24605
+ throw e;
24606
+ });
24607
+ return get(res, "data", null);
24608
+ }),
24609
+ },
24610
+ /**
24611
+ * business_card
24612
+ */
24613
+ businessCard: {
24614
+ /**
24615
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=business_card&apiName=recognize&version=v1 click to debug }
23859
24616
  *
23860
- * 创建个人信息数据
24617
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=business_card&version=v1 document }
23861
24618
  */
23862
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24619
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23863
24620
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23864
- return this.httpInstance
24621
+ const res = yield this.httpInstance
23865
24622
  .request({
23866
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons`, path),
24623
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`, path),
23867
24624
  method: "POST",
23868
24625
  data,
23869
24626
  params,
23870
- headers,
24627
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
23871
24628
  })
23872
24629
  .catch((e) => {
23873
24630
  this.logger.error(formatErrors(e));
23874
24631
  throw e;
23875
24632
  });
24633
+ return get(res, "data", null);
23876
24634
  }),
24635
+ },
24636
+ /**
24637
+ * business_license
24638
+ */
24639
+ businessLicense: {
23877
24640
  /**
23878
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v2 click to debug }
24641
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=business_license&apiName=recognize&version=v1 click to debug }
23879
24642
  *
23880
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=person&version=v2 document }
24643
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=business_license&version=v1 document }
23881
24644
  */
23882
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24645
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23883
24646
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23884
- return this.httpInstance
24647
+ const res = yield this.httpInstance
23885
24648
  .request({
23886
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons/:person_id`, path),
23887
- method: "PATCH",
24649
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`, path),
24650
+ method: "POST",
23888
24651
  data,
23889
24652
  params,
23890
- headers,
24653
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
23891
24654
  })
23892
24655
  .catch((e) => {
23893
24656
  this.logger.error(formatErrors(e));
23894
24657
  throw e;
23895
24658
  });
24659
+ return get(res, "data", null);
23896
24660
  }),
23897
24661
  },
23898
24662
  /**
23899
- * 待入职
24663
+ * chinese_passport
23900
24664
  */
23901
- preHire: {
24665
+ chinesePassport: {
23902
24666
  /**
23903
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
24667
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=chinese_passport&apiName=recognize&version=v1 click to debug }
23904
24668
  *
23905
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
24669
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=chinese_passport&version=v1 document }
24670
+ */
24671
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24672
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24673
+ const res = yield this.httpInstance
24674
+ .request({
24675
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`, path),
24676
+ method: "POST",
24677
+ data,
24678
+ params,
24679
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24680
+ })
24681
+ .catch((e) => {
24682
+ this.logger.error(formatErrors(e));
24683
+ throw e;
24684
+ });
24685
+ return get(res, "data", null);
24686
+ }),
24687
+ },
24688
+ /**
24689
+ * contract
24690
+ */
24691
+ contract: {
24692
+ /**
24693
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=contract&apiName=field_extraction&version=v1 click to debug }
23906
24694
  *
23907
- * 创建待入职人员
24695
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=field_extraction&project=document_ai&resource=contract&version=v1 document }
24696
+ */
24697
+ fieldExtraction: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24698
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24699
+ const res = yield this.httpInstance
24700
+ .request({
24701
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`, path),
24702
+ method: "POST",
24703
+ data,
24704
+ params,
24705
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24706
+ })
24707
+ .catch((e) => {
24708
+ this.logger.error(formatErrors(e));
24709
+ throw e;
24710
+ });
24711
+ return get(res, "data", null);
24712
+ }),
24713
+ },
24714
+ /**
24715
+ * driving_license
24716
+ */
24717
+ drivingLicense: {
24718
+ /**
24719
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=driving_license&apiName=recognize&version=v1 click to debug }
23908
24720
  *
23909
- * 创建待入职人员
24721
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=driving_license&version=v1 document }
23910
24722
  */
23911
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24723
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23912
24724
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23913
- return this.httpInstance
24725
+ const res = yield this.httpInstance
23914
24726
  .request({
23915
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
24727
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`, path),
23916
24728
  method: "POST",
23917
24729
  data,
23918
24730
  params,
23919
- headers,
24731
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24732
+ })
24733
+ .catch((e) => {
24734
+ this.logger.error(formatErrors(e));
24735
+ throw e;
24736
+ });
24737
+ return get(res, "data", null);
24738
+ }),
24739
+ },
24740
+ /**
24741
+ * food_manage_license
24742
+ */
24743
+ foodManageLicense: {
24744
+ /**
24745
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=food_manage_license&apiName=recognize&version=v1 click to debug }
24746
+ *
24747
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=food_manage_license&version=v1 document }
24748
+ */
24749
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24750
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24751
+ const res = yield this.httpInstance
24752
+ .request({
24753
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`, path),
24754
+ method: "POST",
24755
+ data,
24756
+ params,
24757
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24758
+ })
24759
+ .catch((e) => {
24760
+ this.logger.error(formatErrors(e));
24761
+ throw e;
24762
+ });
24763
+ return get(res, "data", null);
24764
+ }),
24765
+ },
24766
+ /**
24767
+ * food_produce_license
24768
+ */
24769
+ foodProduceLicense: {
24770
+ /**
24771
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=food_produce_license&apiName=recognize&version=v1 click to debug }
24772
+ *
24773
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=food_produce_license&version=v1 document }
24774
+ */
24775
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24776
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24777
+ const res = yield this.httpInstance
24778
+ .request({
24779
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`, path),
24780
+ method: "POST",
24781
+ data,
24782
+ params,
24783
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24784
+ })
24785
+ .catch((e) => {
24786
+ this.logger.error(formatErrors(e));
24787
+ throw e;
24788
+ });
24789
+ return get(res, "data", null);
24790
+ }),
24791
+ },
24792
+ /**
24793
+ * hkm_mainland_travel_permit
24794
+ */
24795
+ hkmMainlandTravelPermit: {
24796
+ /**
24797
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=hkm_mainland_travel_permit&apiName=recognize&version=v1 click to debug }
24798
+ *
24799
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=hkm_mainland_travel_permit&version=v1 document }
24800
+ */
24801
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24802
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24803
+ const res = yield this.httpInstance
24804
+ .request({
24805
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`, path),
24806
+ method: "POST",
24807
+ data,
24808
+ params,
24809
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24810
+ })
24811
+ .catch((e) => {
24812
+ this.logger.error(formatErrors(e));
24813
+ throw e;
24814
+ });
24815
+ return get(res, "data", null);
24816
+ }),
24817
+ },
24818
+ /**
24819
+ * id_card
24820
+ */
24821
+ idCard: {
24822
+ /**
24823
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=id_card&apiName=recognize&version=v1 click to debug }
24824
+ *
24825
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=id_card&version=v1 document }
24826
+ */
24827
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24828
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24829
+ const res = yield this.httpInstance
24830
+ .request({
24831
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`, path),
24832
+ method: "POST",
24833
+ data,
24834
+ params,
24835
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24836
+ })
24837
+ .catch((e) => {
24838
+ this.logger.error(formatErrors(e));
24839
+ throw e;
24840
+ });
24841
+ return get(res, "data", null);
24842
+ }),
24843
+ },
24844
+ /**
24845
+ * taxi_invoice
24846
+ */
24847
+ taxiInvoice: {
24848
+ /**
24849
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=taxi_invoice&apiName=recognize&version=v1 click to debug }
24850
+ *
24851
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=taxi_invoice&version=v1 document }
24852
+ */
24853
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24854
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24855
+ const res = yield this.httpInstance
24856
+ .request({
24857
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`, path),
24858
+ method: "POST",
24859
+ data,
24860
+ params,
24861
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
23920
24862
  })
23921
24863
  .catch((e) => {
23922
24864
  this.logger.error(formatErrors(e));
23923
24865
  throw e;
23924
24866
  });
24867
+ return get(res, "data", null);
24868
+ }),
24869
+ },
24870
+ /**
24871
+ * train_invoice
24872
+ */
24873
+ trainInvoice: {
24874
+ /**
24875
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=train_invoice&apiName=recognize&version=v1 click to debug }
24876
+ *
24877
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=train_invoice&version=v1 document }
24878
+ */
24879
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24880
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24881
+ const res = yield this.httpInstance
24882
+ .request({
24883
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`, path),
24884
+ method: "POST",
24885
+ data,
24886
+ params,
24887
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24888
+ })
24889
+ .catch((e) => {
24890
+ this.logger.error(formatErrors(e));
24891
+ throw e;
24892
+ });
24893
+ return get(res, "data", null);
24894
+ }),
24895
+ },
24896
+ /**
24897
+ * tw_mainland_travel_permit
24898
+ */
24899
+ twMainlandTravelPermit: {
24900
+ /**
24901
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=tw_mainland_travel_permit&apiName=recognize&version=v1 click to debug }
24902
+ *
24903
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=tw_mainland_travel_permit&version=v1 document }
24904
+ */
24905
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24906
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24907
+ const res = yield this.httpInstance
24908
+ .request({
24909
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`, path),
24910
+ method: "POST",
24911
+ data,
24912
+ params,
24913
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24914
+ })
24915
+ .catch((e) => {
24916
+ this.logger.error(formatErrors(e));
24917
+ throw e;
24918
+ });
24919
+ return get(res, "data", null);
24920
+ }),
24921
+ },
24922
+ /**
24923
+ * vat_invoice
24924
+ */
24925
+ vatInvoice: {
24926
+ /**
24927
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vat_invoice&apiName=recognize&version=v1 click to debug }
24928
+ *
24929
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vat_invoice&version=v1 document }
24930
+ */
24931
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24932
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24933
+ const res = yield this.httpInstance
24934
+ .request({
24935
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`, path),
24936
+ method: "POST",
24937
+ data,
24938
+ params,
24939
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24940
+ })
24941
+ .catch((e) => {
24942
+ this.logger.error(formatErrors(e));
24943
+ throw e;
24944
+ });
24945
+ return get(res, "data", null);
24946
+ }),
24947
+ },
24948
+ /**
24949
+ * vehicle_license
24950
+ */
24951
+ vehicleLicense: {
24952
+ /**
24953
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vehicle_license&apiName=recognize&version=v1 click to debug }
24954
+ *
24955
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vehicle_license&version=v1 document }
24956
+ */
24957
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24958
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24959
+ const res = yield this.httpInstance
24960
+ .request({
24961
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`, path),
24962
+ method: "POST",
24963
+ data,
24964
+ params,
24965
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24966
+ })
24967
+ .catch((e) => {
24968
+ this.logger.error(formatErrors(e));
24969
+ throw e;
24970
+ });
24971
+ return get(res, "data", null);
23925
24972
  }),
23926
24973
  },
23927
24974
  },
@@ -23931,17 +24978,6 @@ class Client$F extends Client$G {
23931
24978
 
23932
24979
  // auto gen
23933
24980
  class Client$E extends Client$F {
23934
- constructor() {
23935
- super(...arguments);
23936
- /**
23937
-
23938
- */
23939
- this.docs_tool = {};
23940
- }
23941
- }
23942
-
23943
- // auto gen
23944
- class Client$D extends Client$E {
23945
24981
  constructor() {
23946
24982
  super(...arguments);
23947
24983
  /**
@@ -24737,7 +25773,7 @@ class Client$D extends Client$E {
24737
25773
  }
24738
25774
 
24739
25775
  // auto gen
24740
- class Client$C extends Client$D {
25776
+ class Client$D extends Client$E {
24741
25777
  constructor() {
24742
25778
  super(...arguments);
24743
25779
  /**
@@ -25135,7 +26171,7 @@ class Client$C extends Client$D {
25135
26171
  }),
25136
26172
  },
25137
26173
  /**
25138
- * 事件
26174
+ * 分片上传
25139
26175
  */
25140
26176
  file: {
25141
26177
  /**
@@ -26829,7 +27865,7 @@ class Client$C extends Client$D {
26829
27865
  }),
26830
27866
  },
26831
27867
  /**
26832
- * 事件
27868
+ * 分片上传
26833
27869
  */
26834
27870
  file: {
26835
27871
  /**
@@ -28137,7 +29173,7 @@ class Client$C extends Client$D {
28137
29173
  }
28138
29174
 
28139
29175
  // auto gen
28140
- class Client$B extends Client$C {
29176
+ class Client$C extends Client$D {
28141
29177
  constructor() {
28142
29178
  super(...arguments);
28143
29179
  /**
@@ -28148,7 +29184,7 @@ class Client$B extends Client$C {
28148
29184
  }
28149
29185
 
28150
29186
  // auto gen
28151
- class Client$A extends Client$B {
29187
+ class Client$B extends Client$C {
28152
29188
  constructor() {
28153
29189
  super(...arguments);
28154
29190
  /**
@@ -28408,7 +29444,7 @@ class Client$A extends Client$B {
28408
29444
  }
28409
29445
 
28410
29446
  // auto gen
28411
- class Client$z extends Client$A {
29447
+ class Client$A extends Client$B {
28412
29448
  constructor() {
28413
29449
  super(...arguments);
28414
29450
  /**
@@ -28419,7 +29455,7 @@ class Client$z extends Client$A {
28419
29455
  }
28420
29456
 
28421
29457
  // auto gen
28422
- class Client$y extends Client$z {
29458
+ class Client$z extends Client$A {
28423
29459
  constructor() {
28424
29460
  super(...arguments);
28425
29461
  /**
@@ -28591,7 +29627,7 @@ class Client$y extends Client$z {
28591
29627
  }
28592
29628
 
28593
29629
  // auto gen
28594
- class Client$x extends Client$y {
29630
+ class Client$y extends Client$z {
28595
29631
  constructor() {
28596
29632
  super(...arguments);
28597
29633
  /**
@@ -28602,7 +29638,7 @@ class Client$x extends Client$y {
28602
29638
  }
28603
29639
 
28604
29640
  // auto gen
28605
- class Client$w extends Client$x {
29641
+ class Client$x extends Client$y {
28606
29642
  constructor() {
28607
29643
  super(...arguments);
28608
29644
  /**
@@ -28613,7 +29649,7 @@ class Client$w extends Client$x {
28613
29649
  }
28614
29650
 
28615
29651
  // auto gen
28616
- class Client$v extends Client$w {
29652
+ class Client$w extends Client$x {
28617
29653
  constructor() {
28618
29654
  super(...arguments);
28619
29655
  /**
@@ -28624,7 +29660,7 @@ class Client$v extends Client$w {
28624
29660
  }
28625
29661
 
28626
29662
  // auto gen
28627
- class Client$u extends Client$v {
29663
+ class Client$v extends Client$w {
28628
29664
  constructor() {
28629
29665
  super(...arguments);
28630
29666
  /**
@@ -28864,7 +29900,7 @@ class Client$u extends Client$v {
28864
29900
  }
28865
29901
 
28866
29902
  // auto gen
28867
- class Client$t extends Client$u {
29903
+ class Client$u extends Client$v {
28868
29904
  constructor() {
28869
29905
  super(...arguments);
28870
29906
  /**
@@ -31756,7 +32792,7 @@ class Client$t extends Client$u {
31756
32792
  }
31757
32793
 
31758
32794
  // auto gen
31759
- class Client$s extends Client$t {
32795
+ class Client$t extends Client$u {
31760
32796
  constructor() {
31761
32797
  super(...arguments);
31762
32798
  /**
@@ -31990,6 +33026,424 @@ class Client$s extends Client$t {
31990
33026
  });
31991
33027
  }),
31992
33028
  },
33029
+ /**
33030
+ * 生态对接账号自定义字段
33031
+ */
33032
+ ecoAccountCustomField: {
33033
+ /**
33034
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_delete&version=v1 click to debug }
33035
+ *
33036
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete document }
33037
+ *
33038
+ * 删除帐号自定义字段
33039
+ *
33040
+ * 删除用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。删除后,不影响已添加帐号对应的自定义字段的值。但在添加新帐号时,将不能再使用此自定义字段。删除不支持撤销,对应的 key 将无法再次复用。
33041
+ */
33042
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33043
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33044
+ return this.httpInstance
33045
+ .request({
33046
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`, path),
33047
+ method: "POST",
33048
+ data,
33049
+ params,
33050
+ headers,
33051
+ })
33052
+ .catch((e) => {
33053
+ this.logger.error(formatErrors(e));
33054
+ throw e;
33055
+ });
33056
+ }),
33057
+ /**
33058
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_update&version=v1 click to debug }
33059
+ *
33060
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_update document }
33061
+ *
33062
+ * 更新帐号自定义字段
33063
+ *
33064
+ * 更新用户在服务商处的身份标示字段(如用户在服务商处的租户 ID),此方法只会更新同一 scope 内 key 一致的自定义字段。
33065
+ */
33066
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33067
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33068
+ return this.httpInstance
33069
+ .request({
33070
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`, path),
33071
+ method: "PATCH",
33072
+ data,
33073
+ params,
33074
+ headers,
33075
+ })
33076
+ .catch((e) => {
33077
+ this.logger.error(formatErrors(e));
33078
+ throw e;
33079
+ });
33080
+ }),
33081
+ /**
33082
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=create&version=v1 click to debug }
33083
+ *
33084
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create document }
33085
+ *
33086
+ * 创建帐号自定义字段
33087
+ *
33088
+ * 定制用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。用户在飞书招聘后台添加帐号后,系统会推送「帐号绑定」事件给开发者,事件将携带用户填写的自定义字段信息,开发者可根据此信息识别飞书招聘用户在服务商处的身份信息,完成飞书招聘用户和服务商帐号的绑定,并以此来推送对应的套餐或试卷列表等。
33089
+ */
33090
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33091
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33092
+ return this.httpInstance
33093
+ .request({
33094
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`, path),
33095
+ method: "POST",
33096
+ data,
33097
+ params,
33098
+ headers,
33099
+ })
33100
+ .catch((e) => {
33101
+ this.logger.error(formatErrors(e));
33102
+ throw e;
33103
+ });
33104
+ }),
33105
+ },
33106
+ /**
33107
+ * 背调订单
33108
+ */
33109
+ ecoBackgroundCheck: {
33110
+ /**
33111
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=cancel&version=v1 click to debug }
33112
+ *
33113
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/cancel document }
33114
+ *
33115
+ * 终止背调订单
33116
+ *
33117
+ * 终止背调订单
33118
+ */
33119
+ cancel: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33120
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33121
+ return this.httpInstance
33122
+ .request({
33123
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`, path),
33124
+ method: "POST",
33125
+ data,
33126
+ params,
33127
+ headers,
33128
+ })
33129
+ .catch((e) => {
33130
+ this.logger.error(formatErrors(e));
33131
+ throw e;
33132
+ });
33133
+ }),
33134
+ /**
33135
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_progress&version=v1 click to debug }
33136
+ *
33137
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_progress document }
33138
+ *
33139
+ * 更新背调进度
33140
+ *
33141
+ * 更新指定背调的进度信息
33142
+ */
33143
+ updateProgress: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33144
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33145
+ return this.httpInstance
33146
+ .request({
33147
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`, path),
33148
+ method: "POST",
33149
+ data,
33150
+ params,
33151
+ headers,
33152
+ })
33153
+ .catch((e) => {
33154
+ this.logger.error(formatErrors(e));
33155
+ throw e;
33156
+ });
33157
+ }),
33158
+ /**
33159
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_result&version=v1 click to debug }
33160
+ *
33161
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_result document }
33162
+ *
33163
+ * 回传背调的最终结果
33164
+ *
33165
+ * 回传背调的最终结果
33166
+ */
33167
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33168
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33169
+ return this.httpInstance
33170
+ .request({
33171
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`, path),
33172
+ method: "POST",
33173
+ data,
33174
+ params,
33175
+ headers,
33176
+ })
33177
+ .catch((e) => {
33178
+ this.logger.error(formatErrors(e));
33179
+ throw e;
33180
+ });
33181
+ }),
33182
+ },
33183
+ /**
33184
+ * 背调自定义字段
33185
+ */
33186
+ ecoBackgroundCheckCustomField: {
33187
+ /**
33188
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_delete&version=v1 click to debug }
33189
+ *
33190
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete document }
33191
+ *
33192
+ * 删除背调自定义字段
33193
+ *
33194
+ * 删除用户在发起背调时的自定义字段,删除不影响已创建的背调,删除后对应的自定义字段的 key 不能再复用。
33195
+ */
33196
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33197
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33198
+ return this.httpInstance
33199
+ .request({
33200
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`, path),
33201
+ method: "POST",
33202
+ data,
33203
+ params,
33204
+ headers,
33205
+ })
33206
+ .catch((e) => {
33207
+ this.logger.error(formatErrors(e));
33208
+ throw e;
33209
+ });
33210
+ }),
33211
+ /**
33212
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_update&version=v1 click to debug }
33213
+ *
33214
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_update document }
33215
+ *
33216
+ * 更新背调自定义字段
33217
+ *
33218
+ * 更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型,且将影响已发起的背调表单展示。
33219
+ */
33220
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33221
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33222
+ return this.httpInstance
33223
+ .request({
33224
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`, path),
33225
+ method: "PATCH",
33226
+ data,
33227
+ params,
33228
+ headers,
33229
+ })
33230
+ .catch((e) => {
33231
+ this.logger.error(formatErrors(e));
33232
+ throw e;
33233
+ });
33234
+ }),
33235
+ /**
33236
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=create&version=v1 click to debug }
33237
+ *
33238
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/create document }
33239
+ *
33240
+ * 创建背调自定义字段
33241
+ *
33242
+ * 定制用户在发起背调时的自定义字段
33243
+ */
33244
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33245
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33246
+ return this.httpInstance
33247
+ .request({
33248
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`, path),
33249
+ method: "POST",
33250
+ data,
33251
+ params,
33252
+ headers,
33253
+ })
33254
+ .catch((e) => {
33255
+ this.logger.error(formatErrors(e));
33256
+ throw e;
33257
+ });
33258
+ }),
33259
+ },
33260
+ /**
33261
+ * 背调套餐和附加调查项
33262
+ */
33263
+ ecoBackgroundCheckPackage: {
33264
+ /**
33265
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_delete&version=v1 click to debug }
33266
+ *
33267
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_delete document }
33268
+ *
33269
+ * 删除背调套餐和附加调查项
33270
+ *
33271
+ * 删除指定帐号的指定背调套餐和附加调查项信息,删除不会影响已创建的背调。
33272
+ */
33273
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33274
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33275
+ return this.httpInstance
33276
+ .request({
33277
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`, path),
33278
+ method: "POST",
33279
+ data,
33280
+ params,
33281
+ headers,
33282
+ })
33283
+ .catch((e) => {
33284
+ this.logger.error(formatErrors(e));
33285
+ throw e;
33286
+ });
33287
+ }),
33288
+ /**
33289
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_update&version=v1 click to debug }
33290
+ *
33291
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_update document }
33292
+ *
33293
+ * 更新背调套餐和附加调查项
33294
+ *
33295
+ * 更新指定帐号可用的背调套餐和附加调查项信息,更新将影响已发起背调的表单项展示
33296
+ */
33297
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33298
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33299
+ return this.httpInstance
33300
+ .request({
33301
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`, path),
33302
+ method: "PATCH",
33303
+ data,
33304
+ params,
33305
+ headers,
33306
+ })
33307
+ .catch((e) => {
33308
+ this.logger.error(formatErrors(e));
33309
+ throw e;
33310
+ });
33311
+ }),
33312
+ /**
33313
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=create&version=v1 click to debug }
33314
+ *
33315
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/create document }
33316
+ *
33317
+ * 推送背调套餐和附加调查项
33318
+ *
33319
+ * 定制指定帐号可用的背调套餐和附加调查项信息
33320
+ */
33321
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33322
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33323
+ return this.httpInstance
33324
+ .request({
33325
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`, path),
33326
+ method: "POST",
33327
+ data,
33328
+ params,
33329
+ headers,
33330
+ })
33331
+ .catch((e) => {
33332
+ this.logger.error(formatErrors(e));
33333
+ throw e;
33334
+ });
33335
+ }),
33336
+ },
33337
+ /**
33338
+ * eco_exam
33339
+ */
33340
+ ecoExam: {
33341
+ /**
33342
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=login_info&version=v1 click to debug }
33343
+ *
33344
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=login_info&project=hire&resource=eco_exam&version=v1 document }
33345
+ */
33346
+ loginInfo: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33347
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33348
+ return this.httpInstance
33349
+ .request({
33350
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`, path),
33351
+ method: "POST",
33352
+ data,
33353
+ params,
33354
+ headers,
33355
+ })
33356
+ .catch((e) => {
33357
+ this.logger.error(formatErrors(e));
33358
+ throw e;
33359
+ });
33360
+ }),
33361
+ /**
33362
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=update_result&version=v1 click to debug }
33363
+ *
33364
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_result&project=hire&resource=eco_exam&version=v1 document }
33365
+ */
33366
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33367
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33368
+ return this.httpInstance
33369
+ .request({
33370
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`, path),
33371
+ method: "POST",
33372
+ data,
33373
+ params,
33374
+ headers,
33375
+ })
33376
+ .catch((e) => {
33377
+ this.logger.error(formatErrors(e));
33378
+ throw e;
33379
+ });
33380
+ }),
33381
+ },
33382
+ /**
33383
+ * eco_exam_paper
33384
+ */
33385
+ ecoExamPaper: {
33386
+ /**
33387
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_delete&version=v1 click to debug }
33388
+ *
33389
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=hire&resource=eco_exam_paper&version=v1 document }
33390
+ */
33391
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33392
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33393
+ return this.httpInstance
33394
+ .request({
33395
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`, path),
33396
+ method: "POST",
33397
+ data,
33398
+ params,
33399
+ headers,
33400
+ })
33401
+ .catch((e) => {
33402
+ this.logger.error(formatErrors(e));
33403
+ throw e;
33404
+ });
33405
+ }),
33406
+ /**
33407
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_update&version=v1 click to debug }
33408
+ *
33409
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=hire&resource=eco_exam_paper&version=v1 document }
33410
+ */
33411
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33412
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33413
+ return this.httpInstance
33414
+ .request({
33415
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`, path),
33416
+ method: "PATCH",
33417
+ data,
33418
+ params,
33419
+ headers,
33420
+ })
33421
+ .catch((e) => {
33422
+ this.logger.error(formatErrors(e));
33423
+ throw e;
33424
+ });
33425
+ }),
33426
+ /**
33427
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=create&version=v1 click to debug }
33428
+ *
33429
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=eco_exam_paper&version=v1 document }
33430
+ */
33431
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33432
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33433
+ return this.httpInstance
33434
+ .request({
33435
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers`, path),
33436
+ method: "POST",
33437
+ data,
33438
+ params,
33439
+ headers,
33440
+ })
33441
+ .catch((e) => {
33442
+ this.logger.error(formatErrors(e));
33443
+ throw e;
33444
+ });
33445
+ }),
33446
+ },
31993
33447
  /**
31994
33448
  * 导入 e-HR
31995
33449
  */
@@ -33099,6 +34553,91 @@ class Client$s extends Client$t {
33099
34553
  });
33100
34554
  }),
33101
34555
  },
34556
+ /**
34557
+ * referral_account
34558
+ */
34559
+ referralAccount: {
34560
+ /**
34561
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=create&version=v1 click to debug }
34562
+ *
34563
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=referral_account&version=v1 document }
34564
+ */
34565
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34566
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34567
+ return this.httpInstance
34568
+ .request({
34569
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account`, path),
34570
+ method: "POST",
34571
+ data,
34572
+ params,
34573
+ headers,
34574
+ })
34575
+ .catch((e) => {
34576
+ this.logger.error(formatErrors(e));
34577
+ throw e;
34578
+ });
34579
+ }),
34580
+ /**
34581
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=deactivate&version=v1 click to debug }
34582
+ *
34583
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=deactivate&project=hire&resource=referral_account&version=v1 document }
34584
+ */
34585
+ deactivate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34586
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34587
+ return this.httpInstance
34588
+ .request({
34589
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`, path),
34590
+ method: "POST",
34591
+ data,
34592
+ params,
34593
+ headers,
34594
+ })
34595
+ .catch((e) => {
34596
+ this.logger.error(formatErrors(e));
34597
+ throw e;
34598
+ });
34599
+ }),
34600
+ /**
34601
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=reconciliation&version=v1 click to debug }
34602
+ *
34603
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reconciliation&project=hire&resource=referral_account&version=v1 document }
34604
+ */
34605
+ reconciliation: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34606
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34607
+ return this.httpInstance
34608
+ .request({
34609
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`, path),
34610
+ method: "POST",
34611
+ data,
34612
+ params,
34613
+ headers,
34614
+ })
34615
+ .catch((e) => {
34616
+ this.logger.error(formatErrors(e));
34617
+ throw e;
34618
+ });
34619
+ }),
34620
+ /**
34621
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=withdraw&version=v1 click to debug }
34622
+ *
34623
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=hire&resource=referral_account&version=v1 document }
34624
+ */
34625
+ withdraw: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34626
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34627
+ return this.httpInstance
34628
+ .request({
34629
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`, path),
34630
+ method: "POST",
34631
+ data,
34632
+ params,
34633
+ headers,
34634
+ })
34635
+ .catch((e) => {
34636
+ this.logger.error(formatErrors(e));
34637
+ throw e;
34638
+ });
34639
+ }),
34640
+ },
33102
34641
  /**
33103
34642
  * referral_website.job_post
33104
34643
  */
@@ -33757,6 +35296,424 @@ class Client$s extends Client$t {
33757
35296
  });
33758
35297
  }),
33759
35298
  },
35299
+ /**
35300
+ * 生态对接账号自定义字段
35301
+ */
35302
+ ecoAccountCustomField: {
35303
+ /**
35304
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_delete&version=v1 click to debug }
35305
+ *
35306
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete document }
35307
+ *
35308
+ * 删除帐号自定义字段
35309
+ *
35310
+ * 删除用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。删除后,不影响已添加帐号对应的自定义字段的值。但在添加新帐号时,将不能再使用此自定义字段。删除不支持撤销,对应的 key 将无法再次复用。
35311
+ */
35312
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35313
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35314
+ return this.httpInstance
35315
+ .request({
35316
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`, path),
35317
+ method: "POST",
35318
+ data,
35319
+ params,
35320
+ headers,
35321
+ })
35322
+ .catch((e) => {
35323
+ this.logger.error(formatErrors(e));
35324
+ throw e;
35325
+ });
35326
+ }),
35327
+ /**
35328
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_update&version=v1 click to debug }
35329
+ *
35330
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_update document }
35331
+ *
35332
+ * 更新帐号自定义字段
35333
+ *
35334
+ * 更新用户在服务商处的身份标示字段(如用户在服务商处的租户 ID),此方法只会更新同一 scope 内 key 一致的自定义字段。
35335
+ */
35336
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35337
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35338
+ return this.httpInstance
35339
+ .request({
35340
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`, path),
35341
+ method: "PATCH",
35342
+ data,
35343
+ params,
35344
+ headers,
35345
+ })
35346
+ .catch((e) => {
35347
+ this.logger.error(formatErrors(e));
35348
+ throw e;
35349
+ });
35350
+ }),
35351
+ /**
35352
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=create&version=v1 click to debug }
35353
+ *
35354
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create document }
35355
+ *
35356
+ * 创建帐号自定义字段
35357
+ *
35358
+ * 定制用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。用户在飞书招聘后台添加帐号后,系统会推送「帐号绑定」事件给开发者,事件将携带用户填写的自定义字段信息,开发者可根据此信息识别飞书招聘用户在服务商处的身份信息,完成飞书招聘用户和服务商帐号的绑定,并以此来推送对应的套餐或试卷列表等。
35359
+ */
35360
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35361
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35362
+ return this.httpInstance
35363
+ .request({
35364
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`, path),
35365
+ method: "POST",
35366
+ data,
35367
+ params,
35368
+ headers,
35369
+ })
35370
+ .catch((e) => {
35371
+ this.logger.error(formatErrors(e));
35372
+ throw e;
35373
+ });
35374
+ }),
35375
+ },
35376
+ /**
35377
+ * 背调订单
35378
+ */
35379
+ ecoBackgroundCheck: {
35380
+ /**
35381
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=cancel&version=v1 click to debug }
35382
+ *
35383
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/cancel document }
35384
+ *
35385
+ * 终止背调订单
35386
+ *
35387
+ * 终止背调订单
35388
+ */
35389
+ cancel: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35390
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35391
+ return this.httpInstance
35392
+ .request({
35393
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`, path),
35394
+ method: "POST",
35395
+ data,
35396
+ params,
35397
+ headers,
35398
+ })
35399
+ .catch((e) => {
35400
+ this.logger.error(formatErrors(e));
35401
+ throw e;
35402
+ });
35403
+ }),
35404
+ /**
35405
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_progress&version=v1 click to debug }
35406
+ *
35407
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_progress document }
35408
+ *
35409
+ * 更新背调进度
35410
+ *
35411
+ * 更新指定背调的进度信息
35412
+ */
35413
+ updateProgress: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35414
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35415
+ return this.httpInstance
35416
+ .request({
35417
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`, path),
35418
+ method: "POST",
35419
+ data,
35420
+ params,
35421
+ headers,
35422
+ })
35423
+ .catch((e) => {
35424
+ this.logger.error(formatErrors(e));
35425
+ throw e;
35426
+ });
35427
+ }),
35428
+ /**
35429
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_result&version=v1 click to debug }
35430
+ *
35431
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_result document }
35432
+ *
35433
+ * 回传背调的最终结果
35434
+ *
35435
+ * 回传背调的最终结果
35436
+ */
35437
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35438
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35439
+ return this.httpInstance
35440
+ .request({
35441
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`, path),
35442
+ method: "POST",
35443
+ data,
35444
+ params,
35445
+ headers,
35446
+ })
35447
+ .catch((e) => {
35448
+ this.logger.error(formatErrors(e));
35449
+ throw e;
35450
+ });
35451
+ }),
35452
+ },
35453
+ /**
35454
+ * 背调自定义字段
35455
+ */
35456
+ ecoBackgroundCheckCustomField: {
35457
+ /**
35458
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_delete&version=v1 click to debug }
35459
+ *
35460
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete document }
35461
+ *
35462
+ * 删除背调自定义字段
35463
+ *
35464
+ * 删除用户在发起背调时的自定义字段,删除不影响已创建的背调,删除后对应的自定义字段的 key 不能再复用。
35465
+ */
35466
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35467
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35468
+ return this.httpInstance
35469
+ .request({
35470
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`, path),
35471
+ method: "POST",
35472
+ data,
35473
+ params,
35474
+ headers,
35475
+ })
35476
+ .catch((e) => {
35477
+ this.logger.error(formatErrors(e));
35478
+ throw e;
35479
+ });
35480
+ }),
35481
+ /**
35482
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_update&version=v1 click to debug }
35483
+ *
35484
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_update document }
35485
+ *
35486
+ * 更新背调自定义字段
35487
+ *
35488
+ * 更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型,且将影响已发起的背调表单展示。
35489
+ */
35490
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35491
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35492
+ return this.httpInstance
35493
+ .request({
35494
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`, path),
35495
+ method: "PATCH",
35496
+ data,
35497
+ params,
35498
+ headers,
35499
+ })
35500
+ .catch((e) => {
35501
+ this.logger.error(formatErrors(e));
35502
+ throw e;
35503
+ });
35504
+ }),
35505
+ /**
35506
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=create&version=v1 click to debug }
35507
+ *
35508
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/create document }
35509
+ *
35510
+ * 创建背调自定义字段
35511
+ *
35512
+ * 定制用户在发起背调时的自定义字段
35513
+ */
35514
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35515
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35516
+ return this.httpInstance
35517
+ .request({
35518
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`, path),
35519
+ method: "POST",
35520
+ data,
35521
+ params,
35522
+ headers,
35523
+ })
35524
+ .catch((e) => {
35525
+ this.logger.error(formatErrors(e));
35526
+ throw e;
35527
+ });
35528
+ }),
35529
+ },
35530
+ /**
35531
+ * 背调套餐和附加调查项
35532
+ */
35533
+ ecoBackgroundCheckPackage: {
35534
+ /**
35535
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_delete&version=v1 click to debug }
35536
+ *
35537
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_delete document }
35538
+ *
35539
+ * 删除背调套餐和附加调查项
35540
+ *
35541
+ * 删除指定帐号的指定背调套餐和附加调查项信息,删除不会影响已创建的背调。
35542
+ */
35543
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35544
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35545
+ return this.httpInstance
35546
+ .request({
35547
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`, path),
35548
+ method: "POST",
35549
+ data,
35550
+ params,
35551
+ headers,
35552
+ })
35553
+ .catch((e) => {
35554
+ this.logger.error(formatErrors(e));
35555
+ throw e;
35556
+ });
35557
+ }),
35558
+ /**
35559
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_update&version=v1 click to debug }
35560
+ *
35561
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_update document }
35562
+ *
35563
+ * 更新背调套餐和附加调查项
35564
+ *
35565
+ * 更新指定帐号可用的背调套餐和附加调查项信息,更新将影响已发起背调的表单项展示
35566
+ */
35567
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35568
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35569
+ return this.httpInstance
35570
+ .request({
35571
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`, path),
35572
+ method: "PATCH",
35573
+ data,
35574
+ params,
35575
+ headers,
35576
+ })
35577
+ .catch((e) => {
35578
+ this.logger.error(formatErrors(e));
35579
+ throw e;
35580
+ });
35581
+ }),
35582
+ /**
35583
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=create&version=v1 click to debug }
35584
+ *
35585
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/create document }
35586
+ *
35587
+ * 推送背调套餐和附加调查项
35588
+ *
35589
+ * 定制指定帐号可用的背调套餐和附加调查项信息
35590
+ */
35591
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35592
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35593
+ return this.httpInstance
35594
+ .request({
35595
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`, path),
35596
+ method: "POST",
35597
+ data,
35598
+ params,
35599
+ headers,
35600
+ })
35601
+ .catch((e) => {
35602
+ this.logger.error(formatErrors(e));
35603
+ throw e;
35604
+ });
35605
+ }),
35606
+ },
35607
+ /**
35608
+ * eco_exam
35609
+ */
35610
+ ecoExam: {
35611
+ /**
35612
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=login_info&version=v1 click to debug }
35613
+ *
35614
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=login_info&project=hire&resource=eco_exam&version=v1 document }
35615
+ */
35616
+ loginInfo: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35617
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35618
+ return this.httpInstance
35619
+ .request({
35620
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`, path),
35621
+ method: "POST",
35622
+ data,
35623
+ params,
35624
+ headers,
35625
+ })
35626
+ .catch((e) => {
35627
+ this.logger.error(formatErrors(e));
35628
+ throw e;
35629
+ });
35630
+ }),
35631
+ /**
35632
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=update_result&version=v1 click to debug }
35633
+ *
35634
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_result&project=hire&resource=eco_exam&version=v1 document }
35635
+ */
35636
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35637
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35638
+ return this.httpInstance
35639
+ .request({
35640
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`, path),
35641
+ method: "POST",
35642
+ data,
35643
+ params,
35644
+ headers,
35645
+ })
35646
+ .catch((e) => {
35647
+ this.logger.error(formatErrors(e));
35648
+ throw e;
35649
+ });
35650
+ }),
35651
+ },
35652
+ /**
35653
+ * eco_exam_paper
35654
+ */
35655
+ ecoExamPaper: {
35656
+ /**
35657
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_delete&version=v1 click to debug }
35658
+ *
35659
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=hire&resource=eco_exam_paper&version=v1 document }
35660
+ */
35661
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35662
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35663
+ return this.httpInstance
35664
+ .request({
35665
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`, path),
35666
+ method: "POST",
35667
+ data,
35668
+ params,
35669
+ headers,
35670
+ })
35671
+ .catch((e) => {
35672
+ this.logger.error(formatErrors(e));
35673
+ throw e;
35674
+ });
35675
+ }),
35676
+ /**
35677
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_update&version=v1 click to debug }
35678
+ *
35679
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=hire&resource=eco_exam_paper&version=v1 document }
35680
+ */
35681
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35682
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35683
+ return this.httpInstance
35684
+ .request({
35685
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`, path),
35686
+ method: "PATCH",
35687
+ data,
35688
+ params,
35689
+ headers,
35690
+ })
35691
+ .catch((e) => {
35692
+ this.logger.error(formatErrors(e));
35693
+ throw e;
35694
+ });
35695
+ }),
35696
+ /**
35697
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=create&version=v1 click to debug }
35698
+ *
35699
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=eco_exam_paper&version=v1 document }
35700
+ */
35701
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35702
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35703
+ return this.httpInstance
35704
+ .request({
35705
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers`, path),
35706
+ method: "POST",
35707
+ data,
35708
+ params,
35709
+ headers,
35710
+ })
35711
+ .catch((e) => {
35712
+ this.logger.error(formatErrors(e));
35713
+ throw e;
35714
+ });
35715
+ }),
35716
+ },
33760
35717
  /**
33761
35718
  * 导入 e-HR
33762
35719
  */
@@ -34866,6 +36823,91 @@ class Client$s extends Client$t {
34866
36823
  });
34867
36824
  }),
34868
36825
  },
36826
+ /**
36827
+ * referral_account
36828
+ */
36829
+ referralAccount: {
36830
+ /**
36831
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=create&version=v1 click to debug }
36832
+ *
36833
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=referral_account&version=v1 document }
36834
+ */
36835
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36836
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36837
+ return this.httpInstance
36838
+ .request({
36839
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account`, path),
36840
+ method: "POST",
36841
+ data,
36842
+ params,
36843
+ headers,
36844
+ })
36845
+ .catch((e) => {
36846
+ this.logger.error(formatErrors(e));
36847
+ throw e;
36848
+ });
36849
+ }),
36850
+ /**
36851
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=deactivate&version=v1 click to debug }
36852
+ *
36853
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=deactivate&project=hire&resource=referral_account&version=v1 document }
36854
+ */
36855
+ deactivate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36856
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36857
+ return this.httpInstance
36858
+ .request({
36859
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`, path),
36860
+ method: "POST",
36861
+ data,
36862
+ params,
36863
+ headers,
36864
+ })
36865
+ .catch((e) => {
36866
+ this.logger.error(formatErrors(e));
36867
+ throw e;
36868
+ });
36869
+ }),
36870
+ /**
36871
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=reconciliation&version=v1 click to debug }
36872
+ *
36873
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reconciliation&project=hire&resource=referral_account&version=v1 document }
36874
+ */
36875
+ reconciliation: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36876
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36877
+ return this.httpInstance
36878
+ .request({
36879
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`, path),
36880
+ method: "POST",
36881
+ data,
36882
+ params,
36883
+ headers,
36884
+ })
36885
+ .catch((e) => {
36886
+ this.logger.error(formatErrors(e));
36887
+ throw e;
36888
+ });
36889
+ }),
36890
+ /**
36891
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=withdraw&version=v1 click to debug }
36892
+ *
36893
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=hire&resource=referral_account&version=v1 document }
36894
+ */
36895
+ withdraw: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36896
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36897
+ return this.httpInstance
36898
+ .request({
36899
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`, path),
36900
+ method: "POST",
36901
+ data,
36902
+ params,
36903
+ headers,
36904
+ })
36905
+ .catch((e) => {
36906
+ this.logger.error(formatErrors(e));
36907
+ throw e;
36908
+ });
36909
+ }),
36910
+ },
34869
36911
  /**
34870
36912
  * referral_website.job_post
34871
36913
  */
@@ -35302,7 +37344,7 @@ class Client$s extends Client$t {
35302
37344
  }
35303
37345
 
35304
37346
  // auto gen
35305
- class Client$r extends Client$s {
37347
+ class Client$s extends Client$t {
35306
37348
  constructor() {
35307
37349
  super(...arguments);
35308
37350
  /**
@@ -35378,7 +37420,7 @@ class Client$r extends Client$s {
35378
37420
  }
35379
37421
 
35380
37422
  // auto gen
35381
- class Client$q extends Client$r {
37423
+ class Client$r extends Client$s {
35382
37424
  constructor() {
35383
37425
  super(...arguments);
35384
37426
  /**
@@ -39430,21 +41472,480 @@ class Client$q extends Client$r {
39430
41472
  return Iterable;
39431
41473
  }),
39432
41474
  /**
39433
- * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=list&version=v1 click to debug }
41475
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=list&version=v1 click to debug }
41476
+ *
41477
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list document }
41478
+ *
41479
+ * 获取群内Pin消息
41480
+ *
41481
+ * 获取所在群内指定时间范围内的所有Pin消息。
41482
+ *
41483
+ * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 获取Pin消息时,机器人必须在群组中;- 获取的Pin消息按Pin的创建时间降序排列;- 接口默认限流为==50 QPS==
41484
+ */
41485
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41486
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41487
+ return this.httpInstance
41488
+ .request({
41489
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path),
41490
+ method: "GET",
41491
+ data,
41492
+ params,
41493
+ headers,
41494
+ })
41495
+ .catch((e) => {
41496
+ this.logger.error(formatErrors(e));
41497
+ throw e;
41498
+ });
41499
+ }),
41500
+ },
41501
+ },
41502
+ };
41503
+ }
41504
+ }
41505
+
41506
+ // auto gen
41507
+ class Client$q extends Client$r {
41508
+ constructor() {
41509
+ super(...arguments);
41510
+ /**
41511
+
41512
+ */
41513
+ this.lingo = {
41514
+ v1: {
41515
+ /**
41516
+ * classification
41517
+ */
41518
+ classification: {
41519
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41520
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41521
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41522
+ const res = yield this.httpInstance
41523
+ .request({
41524
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/classifications`, path),
41525
+ method: "GET",
41526
+ headers: pickBy(innerPayload.headers, identity),
41527
+ params: pickBy(innerPayload.params, identity),
41528
+ })
41529
+ .catch((e) => {
41530
+ this.logger.error(formatErrors(e));
41531
+ });
41532
+ return res;
41533
+ });
41534
+ const Iterable = {
41535
+ [Symbol.asyncIterator]() {
41536
+ return __asyncGenerator(this, arguments, function* _a() {
41537
+ let hasMore = true;
41538
+ let pageToken;
41539
+ while (hasMore) {
41540
+ try {
41541
+ const res = yield __await(sendRequest({
41542
+ headers,
41543
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41544
+ data,
41545
+ }));
41546
+ const _b = get(res, "data") || {}, {
41547
+ // @ts-ignore
41548
+ has_more,
41549
+ // @ts-ignore
41550
+ page_token,
41551
+ // @ts-ignore
41552
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41553
+ yield yield __await(rest);
41554
+ hasMore = Boolean(has_more);
41555
+ pageToken = page_token || next_page_token;
41556
+ }
41557
+ catch (e) {
41558
+ yield yield __await(null);
41559
+ break;
41560
+ }
41561
+ }
41562
+ });
41563
+ },
41564
+ };
41565
+ return Iterable;
41566
+ }),
41567
+ /**
41568
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=classification&apiName=list&version=v1 click to debug }
41569
+ *
41570
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=classification&version=v1 document }
41571
+ */
41572
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41573
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41574
+ return this.httpInstance
41575
+ .request({
41576
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/classifications`, path),
41577
+ method: "GET",
41578
+ data,
41579
+ params,
41580
+ headers,
41581
+ })
41582
+ .catch((e) => {
41583
+ this.logger.error(formatErrors(e));
41584
+ throw e;
41585
+ });
41586
+ }),
41587
+ },
41588
+ /**
41589
+ * draft
41590
+ */
41591
+ draft: {
41592
+ /**
41593
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=draft&apiName=create&version=v1 click to debug }
41594
+ *
41595
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=lingo&resource=draft&version=v1 document }
41596
+ */
41597
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41598
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41599
+ return this.httpInstance
41600
+ .request({
41601
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/drafts`, path),
41602
+ method: "POST",
41603
+ data,
41604
+ params,
41605
+ headers,
41606
+ })
41607
+ .catch((e) => {
41608
+ this.logger.error(formatErrors(e));
41609
+ throw e;
41610
+ });
41611
+ }),
41612
+ /**
41613
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=draft&apiName=update&version=v1 click to debug }
41614
+ *
41615
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=lingo&resource=draft&version=v1 document }
41616
+ */
41617
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41618
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41619
+ return this.httpInstance
41620
+ .request({
41621
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`, path),
41622
+ method: "PUT",
41623
+ data,
41624
+ params,
41625
+ headers,
41626
+ })
41627
+ .catch((e) => {
41628
+ this.logger.error(formatErrors(e));
41629
+ throw e;
41630
+ });
41631
+ }),
41632
+ },
41633
+ /**
41634
+ * entity
41635
+ */
41636
+ entity: {
41637
+ /**
41638
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=create&version=v1 click to debug }
41639
+ *
41640
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=lingo&resource=entity&version=v1 document }
41641
+ */
41642
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41643
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41644
+ return this.httpInstance
41645
+ .request({
41646
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path),
41647
+ method: "POST",
41648
+ data,
41649
+ params,
41650
+ headers,
41651
+ })
41652
+ .catch((e) => {
41653
+ this.logger.error(formatErrors(e));
41654
+ throw e;
41655
+ });
41656
+ }),
41657
+ /**
41658
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=get&version=v1 click to debug }
41659
+ *
41660
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=lingo&resource=entity&version=v1 document }
41661
+ */
41662
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41663
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41664
+ return this.httpInstance
41665
+ .request({
41666
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path),
41667
+ method: "GET",
41668
+ data,
41669
+ params,
41670
+ headers,
41671
+ })
41672
+ .catch((e) => {
41673
+ this.logger.error(formatErrors(e));
41674
+ throw e;
41675
+ });
41676
+ }),
41677
+ /**
41678
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=highlight&version=v1 click to debug }
41679
+ *
41680
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=highlight&project=lingo&resource=entity&version=v1 document }
41681
+ */
41682
+ highlight: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41683
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41684
+ return this.httpInstance
41685
+ .request({
41686
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/highlight`, path),
41687
+ method: "POST",
41688
+ data,
41689
+ params,
41690
+ headers,
41691
+ })
41692
+ .catch((e) => {
41693
+ this.logger.error(formatErrors(e));
41694
+ throw e;
41695
+ });
41696
+ }),
41697
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41698
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41699
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41700
+ const res = yield this.httpInstance
41701
+ .request({
41702
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path),
41703
+ method: "GET",
41704
+ headers: pickBy(innerPayload.headers, identity),
41705
+ params: pickBy(innerPayload.params, identity),
41706
+ })
41707
+ .catch((e) => {
41708
+ this.logger.error(formatErrors(e));
41709
+ });
41710
+ return res;
41711
+ });
41712
+ const Iterable = {
41713
+ [Symbol.asyncIterator]() {
41714
+ return __asyncGenerator(this, arguments, function* _a() {
41715
+ let hasMore = true;
41716
+ let pageToken;
41717
+ while (hasMore) {
41718
+ try {
41719
+ const res = yield __await(sendRequest({
41720
+ headers,
41721
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41722
+ data,
41723
+ }));
41724
+ const _b = get(res, "data") || {}, {
41725
+ // @ts-ignore
41726
+ has_more,
41727
+ // @ts-ignore
41728
+ page_token,
41729
+ // @ts-ignore
41730
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41731
+ yield yield __await(rest);
41732
+ hasMore = Boolean(has_more);
41733
+ pageToken = page_token || next_page_token;
41734
+ }
41735
+ catch (e) {
41736
+ yield yield __await(null);
41737
+ break;
41738
+ }
41739
+ }
41740
+ });
41741
+ },
41742
+ };
41743
+ return Iterable;
41744
+ }),
41745
+ /**
41746
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=list&version=v1 click to debug }
41747
+ *
41748
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=entity&version=v1 document }
41749
+ */
41750
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41751
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41752
+ return this.httpInstance
41753
+ .request({
41754
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path),
41755
+ method: "GET",
41756
+ data,
41757
+ params,
41758
+ headers,
41759
+ })
41760
+ .catch((e) => {
41761
+ this.logger.error(formatErrors(e));
41762
+ throw e;
41763
+ });
41764
+ }),
41765
+ /**
41766
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=match&version=v1 click to debug }
41767
+ *
41768
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=lingo&resource=entity&version=v1 document }
41769
+ */
41770
+ match: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41771
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41772
+ return this.httpInstance
41773
+ .request({
41774
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/match`, path),
41775
+ method: "POST",
41776
+ data,
41777
+ params,
41778
+ headers,
41779
+ })
41780
+ .catch((e) => {
41781
+ this.logger.error(formatErrors(e));
41782
+ throw e;
41783
+ });
41784
+ }),
41785
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41786
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41787
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41788
+ const res = yield this.httpInstance
41789
+ .request({
41790
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/search`, path),
41791
+ method: "POST",
41792
+ headers: pickBy(innerPayload.headers, identity),
41793
+ params: pickBy(innerPayload.params, identity),
41794
+ })
41795
+ .catch((e) => {
41796
+ this.logger.error(formatErrors(e));
41797
+ });
41798
+ return res;
41799
+ });
41800
+ const Iterable = {
41801
+ [Symbol.asyncIterator]() {
41802
+ return __asyncGenerator(this, arguments, function* _a() {
41803
+ let hasMore = true;
41804
+ let pageToken;
41805
+ while (hasMore) {
41806
+ try {
41807
+ const res = yield __await(sendRequest({
41808
+ headers,
41809
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41810
+ data,
41811
+ }));
41812
+ const _b = get(res, "data") || {}, {
41813
+ // @ts-ignore
41814
+ has_more,
41815
+ // @ts-ignore
41816
+ page_token,
41817
+ // @ts-ignore
41818
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41819
+ yield yield __await(rest);
41820
+ hasMore = Boolean(has_more);
41821
+ pageToken = page_token || next_page_token;
41822
+ }
41823
+ catch (e) {
41824
+ yield yield __await(null);
41825
+ break;
41826
+ }
41827
+ }
41828
+ });
41829
+ },
41830
+ };
41831
+ return Iterable;
41832
+ }),
41833
+ /**
41834
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=search&version=v1 click to debug }
39434
41835
  *
39435
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list document }
41836
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=lingo&resource=entity&version=v1 document }
41837
+ */
41838
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41839
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41840
+ return this.httpInstance
41841
+ .request({
41842
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/search`, path),
41843
+ method: "POST",
41844
+ data,
41845
+ params,
41846
+ headers,
41847
+ })
41848
+ .catch((e) => {
41849
+ this.logger.error(formatErrors(e));
41850
+ throw e;
41851
+ });
41852
+ }),
41853
+ /**
41854
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=update&version=v1 click to debug }
39436
41855
  *
39437
- * 获取群内Pin消息
41856
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=lingo&resource=entity&version=v1 document }
41857
+ */
41858
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41859
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41860
+ return this.httpInstance
41861
+ .request({
41862
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path),
41863
+ method: "PUT",
41864
+ data,
41865
+ params,
41866
+ headers,
41867
+ })
41868
+ .catch((e) => {
41869
+ this.logger.error(formatErrors(e));
41870
+ throw e;
41871
+ });
41872
+ }),
41873
+ },
41874
+ /**
41875
+ * file
41876
+ */
41877
+ file: {
41878
+ /**
41879
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=file&apiName=download&version=v1 click to debug }
39438
41880
  *
39439
- * 获取所在群内指定时间范围内的所有Pin消息。
41881
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download&project=lingo&resource=file&version=v1 document }
41882
+ */
41883
+ download: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41884
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41885
+ const res = yield this.httpInstance
41886
+ .request({
41887
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`, path),
41888
+ method: "GET",
41889
+ headers,
41890
+ data,
41891
+ params,
41892
+ responseType: "stream",
41893
+ })
41894
+ .catch((e) => {
41895
+ this.logger.error(formatErrors(e));
41896
+ throw e;
41897
+ });
41898
+ return {
41899
+ writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
41900
+ return new Promise((resolve, reject) => {
41901
+ const writableStream = fs.createWriteStream(filePath);
41902
+ writableStream.on("finish", () => {
41903
+ resolve(filePath);
41904
+ });
41905
+ writableStream.on("error", (e) => {
41906
+ reject(e);
41907
+ });
41908
+ res.pipe(writableStream);
41909
+ });
41910
+ }),
41911
+ };
41912
+ }),
41913
+ /**
41914
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=file&apiName=upload&version=v1 click to debug }
39440
41915
  *
39441
- * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 获取Pin消息时,机器人必须在群组中;- 获取的Pin消息按Pin的创建时间降序排列;- 接口默认限流为==50 QPS==
41916
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload&project=lingo&resource=file&version=v1 document }
41917
+ */
41918
+ upload: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41919
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41920
+ const res = yield this.httpInstance
41921
+ .request({
41922
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/files/upload`, path),
41923
+ method: "POST",
41924
+ data,
41925
+ params,
41926
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
41927
+ })
41928
+ .catch((e) => {
41929
+ this.logger.error(formatErrors(e));
41930
+ throw e;
41931
+ });
41932
+ return get(res, "data", null);
41933
+ }),
41934
+ },
41935
+ /**
41936
+ * repo
41937
+ */
41938
+ repo: {
41939
+ /**
41940
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=repo&apiName=list&version=v1 click to debug }
41941
+ *
41942
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=repo&version=v1 document }
39442
41943
  */
39443
41944
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39444
41945
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
39445
41946
  return this.httpInstance
39446
41947
  .request({
39447
- url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path),
41948
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/repos`, path),
39448
41949
  method: "GET",
39449
41950
  data,
39450
41951
  params,
@@ -42549,165 +45050,6 @@ class Client$l extends Client$m {
42549
45050
  return get(res, "data", null);
42550
45051
  }),
42551
45052
  },
42552
- /**
42553
- * 指标库
42554
- */
42555
- metricSource: {
42556
- /**
42557
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source&apiName=list&version=v1 click to debug }
42558
- *
42559
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source/list document }
42560
- *
42561
- * 获取指标库
42562
- *
42563
- * 获取租户下全部 OKR 指标库(仅限 OKR 企业版使用)
42564
- */
42565
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42566
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42567
- return this.httpInstance
42568
- .request({
42569
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources`, path),
42570
- method: "GET",
42571
- data,
42572
- params,
42573
- headers,
42574
- })
42575
- .catch((e) => {
42576
- this.logger.error(formatErrors(e));
42577
- throw e;
42578
- });
42579
- }),
42580
- },
42581
- /**
42582
- * 指标项
42583
- */
42584
- metricSourceTableItem: {
42585
- /**
42586
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=batch_update&version=v1 click to debug }
42587
- *
42588
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/batch_update document }
42589
- *
42590
- * 批量更新指标项
42591
- *
42592
- * - 该接口用于批量更新多项指标,单次调用最多更新 100 条记录。接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
42593
- */
42594
- batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42595
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42596
- return this.httpInstance
42597
- .request({
42598
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/batch_update`, path),
42599
- method: "PATCH",
42600
- data,
42601
- params,
42602
- headers,
42603
- })
42604
- .catch((e) => {
42605
- this.logger.error(formatErrors(e));
42606
- throw e;
42607
- });
42608
- }),
42609
- /**
42610
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=get&version=v1 click to debug }
42611
- *
42612
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/get document }
42613
- *
42614
- * 获取指标项详情
42615
- *
42616
- * 获取某项指标的具体内容(仅限 OKR 企业版使用)
42617
- */
42618
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42619
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42620
- return this.httpInstance
42621
- .request({
42622
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
42623
- method: "GET",
42624
- data,
42625
- params,
42626
- headers,
42627
- })
42628
- .catch((e) => {
42629
- this.logger.error(formatErrors(e));
42630
- throw e;
42631
- });
42632
- }),
42633
- /**
42634
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=list&version=v1 click to debug }
42635
- *
42636
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/list document }
42637
- *
42638
- * 获取指标项
42639
- *
42640
- * 获取指定指标表下的所有指标项(仅限 OKR 企业版使用)
42641
- */
42642
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42643
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42644
- return this.httpInstance
42645
- .request({
42646
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items`, path),
42647
- method: "GET",
42648
- data,
42649
- params,
42650
- headers,
42651
- })
42652
- .catch((e) => {
42653
- this.logger.error(formatErrors(e));
42654
- throw e;
42655
- });
42656
- }),
42657
- /**
42658
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=patch&version=v1 click to debug }
42659
- *
42660
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/patch document }
42661
- *
42662
- * 更新指标项
42663
- *
42664
- * - 该接口用于更新某项指标,接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
42665
- */
42666
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42667
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42668
- return this.httpInstance
42669
- .request({
42670
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
42671
- method: "PATCH",
42672
- data,
42673
- params,
42674
- headers,
42675
- })
42676
- .catch((e) => {
42677
- this.logger.error(formatErrors(e));
42678
- throw e;
42679
- });
42680
- }),
42681
- },
42682
- /**
42683
- * 指标表
42684
- */
42685
- metricSourceTable: {
42686
- /**
42687
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table&apiName=list&version=v1 click to debug }
42688
- *
42689
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table/list document }
42690
- *
42691
- * 获取指标表
42692
- *
42693
- * 获取指定指标库下有哪些指标表(仅限 OKR 企业版使用)
42694
- */
42695
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42696
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42697
- return this.httpInstance
42698
- .request({
42699
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables`, path),
42700
- method: "GET",
42701
- data,
42702
- params,
42703
- headers,
42704
- })
42705
- .catch((e) => {
42706
- this.logger.error(formatErrors(e));
42707
- throw e;
42708
- });
42709
- }),
42710
- },
42711
45053
  /**
42712
45054
  * OKR
42713
45055
  */
@@ -42933,165 +45275,6 @@ class Client$l extends Client$m {
42933
45275
  return get(res, "data", null);
42934
45276
  }),
42935
45277
  },
42936
- /**
42937
- * 指标库
42938
- */
42939
- metricSource: {
42940
- /**
42941
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source&apiName=list&version=v1 click to debug }
42942
- *
42943
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source/list document }
42944
- *
42945
- * 获取指标库
42946
- *
42947
- * 获取租户下全部 OKR 指标库(仅限 OKR 企业版使用)
42948
- */
42949
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42950
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42951
- return this.httpInstance
42952
- .request({
42953
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources`, path),
42954
- method: "GET",
42955
- data,
42956
- params,
42957
- headers,
42958
- })
42959
- .catch((e) => {
42960
- this.logger.error(formatErrors(e));
42961
- throw e;
42962
- });
42963
- }),
42964
- },
42965
- /**
42966
- * 指标项
42967
- */
42968
- metricSourceTableItem: {
42969
- /**
42970
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=batch_update&version=v1 click to debug }
42971
- *
42972
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/batch_update document }
42973
- *
42974
- * 批量更新指标项
42975
- *
42976
- * - 该接口用于批量更新多项指标,单次调用最多更新 100 条记录。接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
42977
- */
42978
- batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42979
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42980
- return this.httpInstance
42981
- .request({
42982
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/batch_update`, path),
42983
- method: "PATCH",
42984
- data,
42985
- params,
42986
- headers,
42987
- })
42988
- .catch((e) => {
42989
- this.logger.error(formatErrors(e));
42990
- throw e;
42991
- });
42992
- }),
42993
- /**
42994
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=get&version=v1 click to debug }
42995
- *
42996
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/get document }
42997
- *
42998
- * 获取指标项详情
42999
- *
43000
- * 获取某项指标的具体内容(仅限 OKR 企业版使用)
43001
- */
43002
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43003
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43004
- return this.httpInstance
43005
- .request({
43006
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
43007
- method: "GET",
43008
- data,
43009
- params,
43010
- headers,
43011
- })
43012
- .catch((e) => {
43013
- this.logger.error(formatErrors(e));
43014
- throw e;
43015
- });
43016
- }),
43017
- /**
43018
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=list&version=v1 click to debug }
43019
- *
43020
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/list document }
43021
- *
43022
- * 获取指标项
43023
- *
43024
- * 获取指定指标表下的所有指标项(仅限 OKR 企业版使用)
43025
- */
43026
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43027
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43028
- return this.httpInstance
43029
- .request({
43030
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items`, path),
43031
- method: "GET",
43032
- data,
43033
- params,
43034
- headers,
43035
- })
43036
- .catch((e) => {
43037
- this.logger.error(formatErrors(e));
43038
- throw e;
43039
- });
43040
- }),
43041
- /**
43042
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=patch&version=v1 click to debug }
43043
- *
43044
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/patch document }
43045
- *
43046
- * 更新指标项
43047
- *
43048
- * - 该接口用于更新某项指标,接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
43049
- */
43050
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43051
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43052
- return this.httpInstance
43053
- .request({
43054
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
43055
- method: "PATCH",
43056
- data,
43057
- params,
43058
- headers,
43059
- })
43060
- .catch((e) => {
43061
- this.logger.error(formatErrors(e));
43062
- throw e;
43063
- });
43064
- }),
43065
- },
43066
- /**
43067
- * 指标表
43068
- */
43069
- metricSourceTable: {
43070
- /**
43071
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table&apiName=list&version=v1 click to debug }
43072
- *
43073
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table/list document }
43074
- *
43075
- * 获取指标表
43076
- *
43077
- * 获取指定指标库下有哪些指标表(仅限 OKR 企业版使用)
43078
- */
43079
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43080
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43081
- return this.httpInstance
43082
- .request({
43083
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables`, path),
43084
- method: "GET",
43085
- data,
43086
- params,
43087
- headers,
43088
- })
43089
- .catch((e) => {
43090
- this.logger.error(formatErrors(e));
43091
- throw e;
43092
- });
43093
- }),
43094
- },
43095
45278
  /**
43096
45279
  * OKR
43097
45280
  */
@@ -47696,19 +49879,293 @@ class Client$7 extends Client$8 {
47696
49879
  return Iterable;
47697
49880
  }),
47698
49881
  /**
47699
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=list&version=v1 click to debug }
49882
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=list&version=v1 click to debug }
49883
+ *
49884
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list document }
49885
+ *
49886
+ * 获取评论列表
49887
+ *
49888
+ * 该接口用于查询任务评论列表,支持分页,最大值为100
49889
+ */
49890
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49891
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49892
+ return this.httpInstance
49893
+ .request({
49894
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path),
49895
+ method: "GET",
49896
+ data,
49897
+ params,
49898
+ headers,
49899
+ })
49900
+ .catch((e) => {
49901
+ this.logger.error(formatErrors(e));
49902
+ throw e;
49903
+ });
49904
+ }),
49905
+ /**
49906
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=update&version=v1 click to debug }
49907
+ *
49908
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/update document }
49909
+ *
49910
+ * 更新评论
49911
+ *
49912
+ * 该接口用于更新评论内容
49913
+ */
49914
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49915
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49916
+ return this.httpInstance
49917
+ .request({
49918
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path),
49919
+ method: "PUT",
49920
+ data,
49921
+ params,
49922
+ headers,
49923
+ })
49924
+ .catch((e) => {
49925
+ this.logger.error(formatErrors(e));
49926
+ throw e;
49927
+ });
49928
+ }),
49929
+ },
49930
+ /**
49931
+ * 关注人
49932
+ */
49933
+ taskFollower: {
49934
+ /**
49935
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=create&version=v1 click to debug }
49936
+ *
49937
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create document }
49938
+ *
49939
+ * 新增关注人
49940
+ *
49941
+ * 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
49942
+ */
49943
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49944
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49945
+ return this.httpInstance
49946
+ .request({
49947
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
49948
+ method: "POST",
49949
+ data,
49950
+ params,
49951
+ headers,
49952
+ })
49953
+ .catch((e) => {
49954
+ this.logger.error(formatErrors(e));
49955
+ throw e;
49956
+ });
49957
+ }),
49958
+ /**
49959
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=delete&version=v1 click to debug }
49960
+ *
49961
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/delete document }
49962
+ *
49963
+ * 删除关注人
49964
+ *
49965
+ * 该接口用于删除任务关注人
49966
+ */
49967
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49968
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49969
+ return this.httpInstance
49970
+ .request({
49971
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`, path),
49972
+ method: "DELETE",
49973
+ data,
49974
+ params,
49975
+ headers,
49976
+ })
49977
+ .catch((e) => {
49978
+ this.logger.error(formatErrors(e));
49979
+ throw e;
49980
+ });
49981
+ }),
49982
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49983
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49984
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
49985
+ const res = yield this.httpInstance
49986
+ .request({
49987
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
49988
+ method: "GET",
49989
+ headers: pickBy(innerPayload.headers, identity),
49990
+ params: pickBy(innerPayload.params, identity),
49991
+ })
49992
+ .catch((e) => {
49993
+ this.logger.error(formatErrors(e));
49994
+ });
49995
+ return res;
49996
+ });
49997
+ const Iterable = {
49998
+ [Symbol.asyncIterator]() {
49999
+ return __asyncGenerator(this, arguments, function* _a() {
50000
+ let hasMore = true;
50001
+ let pageToken;
50002
+ while (hasMore) {
50003
+ try {
50004
+ const res = yield __await(sendRequest({
50005
+ headers,
50006
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
50007
+ data,
50008
+ }));
50009
+ const _b = get(res, "data") || {}, {
50010
+ // @ts-ignore
50011
+ has_more,
50012
+ // @ts-ignore
50013
+ page_token,
50014
+ // @ts-ignore
50015
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
50016
+ yield yield __await(rest);
50017
+ hasMore = Boolean(has_more);
50018
+ pageToken = page_token || next_page_token;
50019
+ }
50020
+ catch (e) {
50021
+ yield yield __await(null);
50022
+ break;
50023
+ }
50024
+ }
50025
+ });
50026
+ },
50027
+ };
50028
+ return Iterable;
50029
+ }),
50030
+ /**
50031
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=list&version=v1 click to debug }
50032
+ *
50033
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list document }
50034
+ *
50035
+ * 获取任务关注人列表
50036
+ *
50037
+ * 该接口用于查询任务关注人列表,支持分页,最大值为50
50038
+ */
50039
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50040
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50041
+ return this.httpInstance
50042
+ .request({
50043
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50044
+ method: "GET",
50045
+ data,
50046
+ params,
50047
+ headers,
50048
+ })
50049
+ .catch((e) => {
50050
+ this.logger.error(formatErrors(e));
50051
+ throw e;
50052
+ });
50053
+ }),
50054
+ },
50055
+ /**
50056
+ * 提醒
50057
+ */
50058
+ taskReminder: {
50059
+ /**
50060
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=create&version=v1 click to debug }
50061
+ *
50062
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create document }
50063
+ *
50064
+ * 新增提醒时间
50065
+ *
50066
+ * 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移,但是偏移后的结果不能早于当前时间。
50067
+ */
50068
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50069
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50070
+ return this.httpInstance
50071
+ .request({
50072
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
50073
+ method: "POST",
50074
+ data,
50075
+ params,
50076
+ headers,
50077
+ })
50078
+ .catch((e) => {
50079
+ this.logger.error(formatErrors(e));
50080
+ throw e;
50081
+ });
50082
+ }),
50083
+ /**
50084
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=delete&version=v1 click to debug }
50085
+ *
50086
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/delete document }
50087
+ *
50088
+ * 删除提醒时间
50089
+ *
50090
+ * 删除提醒时间,返回结果状态
50091
+ */
50092
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50093
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50094
+ return this.httpInstance
50095
+ .request({
50096
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`, path),
50097
+ method: "DELETE",
50098
+ data,
50099
+ params,
50100
+ headers,
50101
+ })
50102
+ .catch((e) => {
50103
+ this.logger.error(formatErrors(e));
50104
+ throw e;
50105
+ });
50106
+ }),
50107
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50108
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50109
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
50110
+ const res = yield this.httpInstance
50111
+ .request({
50112
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
50113
+ method: "GET",
50114
+ headers: pickBy(innerPayload.headers, identity),
50115
+ params: pickBy(innerPayload.params, identity),
50116
+ })
50117
+ .catch((e) => {
50118
+ this.logger.error(formatErrors(e));
50119
+ });
50120
+ return res;
50121
+ });
50122
+ const Iterable = {
50123
+ [Symbol.asyncIterator]() {
50124
+ return __asyncGenerator(this, arguments, function* _a() {
50125
+ let hasMore = true;
50126
+ let pageToken;
50127
+ while (hasMore) {
50128
+ try {
50129
+ const res = yield __await(sendRequest({
50130
+ headers,
50131
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
50132
+ data,
50133
+ }));
50134
+ const _b = get(res, "data") || {}, {
50135
+ // @ts-ignore
50136
+ has_more,
50137
+ // @ts-ignore
50138
+ page_token,
50139
+ // @ts-ignore
50140
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
50141
+ yield yield __await(rest);
50142
+ hasMore = Boolean(has_more);
50143
+ pageToken = page_token || next_page_token;
50144
+ }
50145
+ catch (e) {
50146
+ yield yield __await(null);
50147
+ break;
50148
+ }
50149
+ }
50150
+ });
50151
+ },
50152
+ };
50153
+ return Iterable;
50154
+ }),
50155
+ /**
50156
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=list&version=v1 click to debug }
47700
50157
  *
47701
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list document }
50158
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list document }
47702
50159
  *
47703
- * 获取评论列表
50160
+ * 查询提醒时间列表
47704
50161
  *
47705
- * 该接口用于查询任务评论列表,支持分页,最大值为100
50162
+ * 返回提醒时间列表,支持分页,最大值为50
47706
50163
  */
47707
50164
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47708
50165
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47709
50166
  return this.httpInstance
47710
50167
  .request({
47711
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path),
50168
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
47712
50169
  method: "GET",
47713
50170
  data,
47714
50171
  params,
@@ -47719,50 +50176,24 @@ class Client$7 extends Client$8 {
47719
50176
  throw e;
47720
50177
  });
47721
50178
  }),
47722
- /**
47723
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=update&version=v1 click to debug }
47724
- *
47725
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/update document }
47726
- *
47727
- * 更新评论
47728
- *
47729
- * 该接口用于更新评论内容
47730
- */
47731
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47732
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47733
- return this.httpInstance
47734
- .request({
47735
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path),
47736
- method: "PUT",
47737
- data,
47738
- params,
47739
- headers,
47740
- })
47741
- .catch((e) => {
47742
- this.logger.error(formatErrors(e));
47743
- throw e;
47744
- });
47745
- }),
47746
50179
  },
50180
+ },
50181
+ v2: {
47747
50182
  /**
47748
- * 关注人
50183
+ * attachment
47749
50184
  */
47750
- taskFollower: {
50185
+ attachment: {
47751
50186
  /**
47752
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=create&version=v1 click to debug }
47753
- *
47754
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create document }
47755
- *
47756
- * 新增关注人
50187
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=delete&version=v2 click to debug }
47757
50188
  *
47758
- * 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
50189
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=attachment&version=v2 document }
47759
50190
  */
47760
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50191
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47761
50192
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47762
50193
  return this.httpInstance
47763
50194
  .request({
47764
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
47765
- method: "POST",
50195
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`, path),
50196
+ method: "DELETE",
47766
50197
  data,
47767
50198
  params,
47768
50199
  headers,
@@ -47773,20 +50204,16 @@ class Client$7 extends Client$8 {
47773
50204
  });
47774
50205
  }),
47775
50206
  /**
47776
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=delete&version=v1 click to debug }
47777
- *
47778
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/delete document }
47779
- *
47780
- * 删除关注人
50207
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=get&version=v2 click to debug }
47781
50208
  *
47782
- * 该接口用于删除任务关注人
50209
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=attachment&version=v2 document }
47783
50210
  */
47784
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50211
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47785
50212
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47786
50213
  return this.httpInstance
47787
50214
  .request({
47788
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`, path),
47789
- method: "DELETE",
50215
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`, path),
50216
+ method: "GET",
47790
50217
  data,
47791
50218
  params,
47792
50219
  headers,
@@ -47801,7 +50228,7 @@ class Client$7 extends Client$8 {
47801
50228
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
47802
50229
  const res = yield this.httpInstance
47803
50230
  .request({
47804
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50231
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments`, path),
47805
50232
  method: "GET",
47806
50233
  headers: pickBy(innerPayload.headers, identity),
47807
50234
  params: pickBy(innerPayload.params, identity),
@@ -47845,19 +50272,15 @@ class Client$7 extends Client$8 {
47845
50272
  return Iterable;
47846
50273
  }),
47847
50274
  /**
47848
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=list&version=v1 click to debug }
47849
- *
47850
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list document }
50275
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=list&version=v2 click to debug }
47851
50276
  *
47852
- * 获取任务关注人列表
47853
- *
47854
- * 该接口用于查询任务关注人列表,支持分页,最大值为50
50277
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=attachment&version=v2 document }
47855
50278
  */
47856
50279
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47857
50280
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47858
50281
  return this.httpInstance
47859
50282
  .request({
47860
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50283
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments`, path),
47861
50284
  method: "GET",
47862
50285
  data,
47863
50286
  params,
@@ -47868,134 +50291,28 @@ class Client$7 extends Client$8 {
47868
50291
  throw e;
47869
50292
  });
47870
50293
  }),
47871
- },
47872
- /**
47873
- * 提醒
47874
- */
47875
- taskReminder: {
47876
50294
  /**
47877
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=create&version=v1 click to debug }
47878
- *
47879
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create document }
50295
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=upload&version=v2 click to debug }
47880
50296
  *
47881
- * 新增提醒时间
47882
- *
47883
- * 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移,但是偏移后的结果不能早于当前时间。
50297
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload&project=task&resource=attachment&version=v2 document }
47884
50298
  */
47885
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50299
+ upload: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47886
50300
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47887
- return this.httpInstance
50301
+ const res = yield this.httpInstance
47888
50302
  .request({
47889
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
50303
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/upload`, path),
47890
50304
  method: "POST",
47891
50305
  data,
47892
50306
  params,
47893
- headers,
47894
- })
47895
- .catch((e) => {
47896
- this.logger.error(formatErrors(e));
47897
- throw e;
47898
- });
47899
- }),
47900
- /**
47901
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=delete&version=v1 click to debug }
47902
- *
47903
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/delete document }
47904
- *
47905
- * 删除提醒时间
47906
- *
47907
- * 删除提醒时间,返回结果状态
47908
- */
47909
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47910
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47911
- return this.httpInstance
47912
- .request({
47913
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`, path),
47914
- method: "DELETE",
47915
- data,
47916
- params,
47917
- headers,
47918
- })
47919
- .catch((e) => {
47920
- this.logger.error(formatErrors(e));
47921
- throw e;
47922
- });
47923
- }),
47924
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47925
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47926
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
47927
- const res = yield this.httpInstance
47928
- .request({
47929
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
47930
- method: "GET",
47931
- headers: pickBy(innerPayload.headers, identity),
47932
- params: pickBy(innerPayload.params, identity),
47933
- })
47934
- .catch((e) => {
47935
- this.logger.error(formatErrors(e));
47936
- });
47937
- return res;
47938
- });
47939
- const Iterable = {
47940
- [Symbol.asyncIterator]() {
47941
- return __asyncGenerator(this, arguments, function* _a() {
47942
- let hasMore = true;
47943
- let pageToken;
47944
- while (hasMore) {
47945
- try {
47946
- const res = yield __await(sendRequest({
47947
- headers,
47948
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
47949
- data,
47950
- }));
47951
- const _b = get(res, "data") || {}, {
47952
- // @ts-ignore
47953
- has_more,
47954
- // @ts-ignore
47955
- page_token,
47956
- // @ts-ignore
47957
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
47958
- yield yield __await(rest);
47959
- hasMore = Boolean(has_more);
47960
- pageToken = page_token || next_page_token;
47961
- }
47962
- catch (e) {
47963
- yield yield __await(null);
47964
- break;
47965
- }
47966
- }
47967
- });
47968
- },
47969
- };
47970
- return Iterable;
47971
- }),
47972
- /**
47973
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=list&version=v1 click to debug }
47974
- *
47975
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list document }
47976
- *
47977
- * 查询提醒时间列表
47978
- *
47979
- * 返回提醒时间列表,支持分页,最大值为50
47980
- */
47981
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47982
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47983
- return this.httpInstance
47984
- .request({
47985
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
47986
- method: "GET",
47987
- data,
47988
- params,
47989
- headers,
50307
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
47990
50308
  })
47991
50309
  .catch((e) => {
47992
50310
  this.logger.error(formatErrors(e));
47993
50311
  throw e;
47994
50312
  });
50313
+ return get(res, "data", null);
47995
50314
  }),
47996
50315
  },
47997
- },
47998
- v2: {
47999
50316
  /**
48000
50317
  * comment
48001
50318
  */
@@ -49014,6 +51331,111 @@ class Client$7 extends Client$8 {
49014
51331
  });
49015
51332
  }),
49016
51333
  },
51334
+ /**
51335
+ * tasklist.activity_subscription
51336
+ */
51337
+ tasklistActivitySubscription: {
51338
+ /**
51339
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=create&version=v2 click to debug }
51340
+ *
51341
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=tasklist.activity_subscription&version=v2 document }
51342
+ */
51343
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51344
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51345
+ return this.httpInstance
51346
+ .request({
51347
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`, path),
51348
+ method: "POST",
51349
+ data,
51350
+ params,
51351
+ headers,
51352
+ })
51353
+ .catch((e) => {
51354
+ this.logger.error(formatErrors(e));
51355
+ throw e;
51356
+ });
51357
+ }),
51358
+ /**
51359
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=delete&version=v2 click to debug }
51360
+ *
51361
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=tasklist.activity_subscription&version=v2 document }
51362
+ */
51363
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51364
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51365
+ return this.httpInstance
51366
+ .request({
51367
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path),
51368
+ method: "DELETE",
51369
+ data,
51370
+ params,
51371
+ headers,
51372
+ })
51373
+ .catch((e) => {
51374
+ this.logger.error(formatErrors(e));
51375
+ throw e;
51376
+ });
51377
+ }),
51378
+ /**
51379
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=get&version=v2 click to debug }
51380
+ *
51381
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=tasklist.activity_subscription&version=v2 document }
51382
+ */
51383
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51384
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51385
+ return this.httpInstance
51386
+ .request({
51387
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path),
51388
+ method: "GET",
51389
+ data,
51390
+ params,
51391
+ headers,
51392
+ })
51393
+ .catch((e) => {
51394
+ this.logger.error(formatErrors(e));
51395
+ throw e;
51396
+ });
51397
+ }),
51398
+ /**
51399
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=list&version=v2 click to debug }
51400
+ *
51401
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=tasklist.activity_subscription&version=v2 document }
51402
+ */
51403
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51404
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51405
+ return this.httpInstance
51406
+ .request({
51407
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`, path),
51408
+ method: "GET",
51409
+ data,
51410
+ params,
51411
+ headers,
51412
+ })
51413
+ .catch((e) => {
51414
+ this.logger.error(formatErrors(e));
51415
+ throw e;
51416
+ });
51417
+ }),
51418
+ /**
51419
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=patch&version=v2 click to debug }
51420
+ *
51421
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=tasklist.activity_subscription&version=v2 document }
51422
+ */
51423
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51424
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51425
+ return this.httpInstance
51426
+ .request({
51427
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path),
51428
+ method: "PATCH",
51429
+ data,
51430
+ params,
51431
+ headers,
51432
+ })
51433
+ .catch((e) => {
51434
+ this.logger.error(formatErrors(e));
51435
+ throw e;
51436
+ });
51437
+ }),
51438
+ },
49017
51439
  /**
49018
51440
  * tasklist
49019
51441
  */