@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/lib/index.js CHANGED
@@ -85,7 +85,12 @@ function __asyncGenerator(thisArg, _arguments, generator) {
85
85
  function fulfill(value) { resume("next", value); }
86
86
  function reject(value) { resume("throw", value); }
87
87
  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
88
- }
88
+ }
89
+
90
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
91
+ var e = new Error(message);
92
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
93
+ };
89
94
 
90
95
  const defaultHttpInstance = axios__default["default"].create();
91
96
  defaultHttpInstance.interceptors.request.use((req) => {
@@ -229,7 +234,7 @@ const formatErrors = (e) => {
229
234
  };
230
235
 
231
236
  // auto gen
232
- class Client$V {
237
+ class Client$X {
233
238
  constructor() {
234
239
  /**
235
240
  * 智能门禁
@@ -938,11 +943,11 @@ class Client$V {
938
943
  }
939
944
 
940
945
  // auto gen
941
- class Client$U extends Client$V {
946
+ class Client$W extends Client$X {
942
947
  constructor() {
943
948
  super(...arguments);
944
949
  /**
945
- * 管理后台-数据报表
950
+ * 管理后台-企业勋章
946
951
  */
947
952
  this.admin = {
948
953
  /**
@@ -1838,13 +1843,42 @@ class Client$U extends Client$V {
1838
1843
  }
1839
1844
 
1840
1845
  // auto gen
1841
- class Client$T extends Client$U {
1846
+ class Client$V extends Client$W {
1842
1847
  constructor() {
1843
1848
  super(...arguments);
1844
1849
  /**
1845
1850
  * 应用信息
1846
1851
  */
1847
1852
  this.application = {
1853
+ /**
1854
+ * 应用红点
1855
+ */
1856
+ appBadge: {
1857
+ /**
1858
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_badge&apiName=set&version=v6 click to debug }
1859
+ *
1860
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set document }
1861
+ *
1862
+ * 更新应用红点
1863
+ *
1864
+ * 更新应用红点信息,用于工作台场景
1865
+ */
1866
+ set: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1867
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1868
+ return this.httpInstance
1869
+ .request({
1870
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/app_badge/set`, path),
1871
+ method: "POST",
1872
+ data,
1873
+ params,
1874
+ headers,
1875
+ })
1876
+ .catch((e) => {
1877
+ this.logger.error(formatErrors(e));
1878
+ throw e;
1879
+ });
1880
+ }),
1881
+ },
1848
1882
  /**
1849
1883
  * 我的常用推荐规则
1850
1884
  */
@@ -2395,6 +2429,35 @@ class Client$T extends Client$U {
2395
2429
  }),
2396
2430
  },
2397
2431
  v6: {
2432
+ /**
2433
+ * 应用红点
2434
+ */
2435
+ appBadge: {
2436
+ /**
2437
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=app_badge&apiName=set&version=v6 click to debug }
2438
+ *
2439
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set document }
2440
+ *
2441
+ * 更新应用红点
2442
+ *
2443
+ * 更新应用红点信息,用于工作台场景
2444
+ */
2445
+ set: (payload, options) => __awaiter(this, void 0, void 0, function* () {
2446
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
2447
+ return this.httpInstance
2448
+ .request({
2449
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/app_badge/set`, path),
2450
+ method: "POST",
2451
+ data,
2452
+ params,
2453
+ headers,
2454
+ })
2455
+ .catch((e) => {
2456
+ this.logger.error(formatErrors(e));
2457
+ throw e;
2458
+ });
2459
+ }),
2460
+ },
2398
2461
  /**
2399
2462
  * 我的常用推荐规则
2400
2463
  */
@@ -2950,7 +3013,7 @@ class Client$T extends Client$U {
2950
3013
  }
2951
3014
 
2952
3015
  // auto gen
2953
- class Client$S extends Client$T {
3016
+ class Client$U extends Client$V {
2954
3017
  constructor() {
2955
3018
  super(...arguments);
2956
3019
  /**
@@ -3242,7 +3305,7 @@ class Client$S extends Client$T {
3242
3305
  }),
3243
3306
  },
3244
3307
  /**
3245
- * 原生审批实例
3308
+ * 审批查询
3246
3309
  */
3247
3310
  instance: {
3248
3311
  /**
@@ -3724,7 +3787,7 @@ class Client$S extends Client$T {
3724
3787
  }),
3725
3788
  },
3726
3789
  /**
3727
- * 原生审批任务
3790
+ * 审批查询
3728
3791
  */
3729
3792
  task: {
3730
3793
  /**
@@ -4206,7 +4269,7 @@ class Client$S extends Client$T {
4206
4269
  }),
4207
4270
  },
4208
4271
  /**
4209
- * 原生审批实例
4272
+ * 审批查询
4210
4273
  */
4211
4274
  instance: {
4212
4275
  /**
@@ -4688,7 +4751,7 @@ class Client$S extends Client$T {
4688
4751
  }),
4689
4752
  },
4690
4753
  /**
4691
- * 原生审批任务
4754
+ * 审批查询
4692
4755
  */
4693
4756
  task: {
4694
4757
  /**
@@ -4890,7 +4953,7 @@ class Client$S extends Client$T {
4890
4953
  }
4891
4954
 
4892
4955
  // auto gen
4893
- class Client$R extends Client$S {
4956
+ class Client$T extends Client$U {
4894
4957
  constructor() {
4895
4958
  super(...arguments);
4896
4959
  /**
@@ -6834,7 +6897,7 @@ class Client$R extends Client$S {
6834
6897
  }
6835
6898
 
6836
6899
  // auto gen
6837
- class Client$Q extends Client$R {
6900
+ class Client$S extends Client$T {
6838
6901
  constructor() {
6839
6902
  super(...arguments);
6840
6903
  /**
@@ -7078,7 +7141,7 @@ class Client$Q extends Client$R {
7078
7141
  }
7079
7142
 
7080
7143
  // auto gen
7081
- class Client$P extends Client$Q {
7144
+ class Client$R extends Client$S {
7082
7145
  constructor() {
7083
7146
  super(...arguments);
7084
7147
  /**
@@ -7110,31 +7173,6 @@ class Client$P extends Client$Q {
7110
7173
  });
7111
7174
  }),
7112
7175
  },
7113
- /**
7114
- * authorize
7115
- */
7116
- authorize: {
7117
- /**
7118
- * {@link https://open.feishu.cn/api-explorer?project=authen&resource=authorize&apiName=get&version=v1 click to debug }
7119
- *
7120
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=authorize&version=v1 document }
7121
- */
7122
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
7123
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
7124
- return this.httpInstance
7125
- .request({
7126
- url: fillApiPath(`${this.domain}/open-apis/authen/v1/authorize`, path),
7127
- method: "GET",
7128
- data,
7129
- params,
7130
- headers,
7131
- })
7132
- .catch((e) => {
7133
- this.logger.error(formatErrors(e));
7134
- throw e;
7135
- });
7136
- }),
7137
- },
7138
7176
  /**
7139
7177
  * oidc.access_token
7140
7178
  */
@@ -7261,31 +7299,6 @@ class Client$P extends Client$Q {
7261
7299
  });
7262
7300
  }),
7263
7301
  },
7264
- /**
7265
- * authorize
7266
- */
7267
- authorize: {
7268
- /**
7269
- * {@link https://open.feishu.cn/api-explorer?project=authen&resource=authorize&apiName=get&version=v1 click to debug }
7270
- *
7271
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=authorize&version=v1 document }
7272
- */
7273
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
7274
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
7275
- return this.httpInstance
7276
- .request({
7277
- url: fillApiPath(`${this.domain}/open-apis/authen/v1/authorize`, path),
7278
- method: "GET",
7279
- data,
7280
- params,
7281
- headers,
7282
- })
7283
- .catch((e) => {
7284
- this.logger.error(formatErrors(e));
7285
- throw e;
7286
- });
7287
- }),
7288
- },
7289
7302
  /**
7290
7303
  * oidc.access_token
7291
7304
  */
@@ -7392,7 +7405,7 @@ class Client$P extends Client$Q {
7392
7405
  }
7393
7406
 
7394
7407
  // auto gen
7395
- class Client$O extends Client$P {
7408
+ class Client$Q extends Client$R {
7396
7409
  constructor() {
7397
7410
  super(...arguments);
7398
7411
  /**
@@ -7403,7 +7416,7 @@ class Client$O extends Client$P {
7403
7416
  }
7404
7417
 
7405
7418
  // auto gen
7406
- class Client$N extends Client$O {
7419
+ class Client$P extends Client$Q {
7407
7420
  constructor() {
7408
7421
  super(...arguments);
7409
7422
  /**
@@ -8413,7 +8426,7 @@ class Client$N extends Client$O {
8413
8426
  }
8414
8427
 
8415
8428
  // auto gen
8416
- class Client$M extends Client$N {
8429
+ class Client$O extends Client$P {
8417
8430
  constructor() {
8418
8431
  super(...arguments);
8419
8432
  /**
@@ -11403,7 +11416,7 @@ class Client$M extends Client$N {
11403
11416
  }
11404
11417
 
11405
11418
  // auto gen
11406
- class Client$L extends Client$M {
11419
+ class Client$N extends Client$O {
11407
11420
  constructor() {
11408
11421
  super(...arguments);
11409
11422
  /**
@@ -11581,7 +11594,7 @@ class Client$L extends Client$M {
11581
11594
  }
11582
11595
 
11583
11596
  // auto gen
11584
- class Client$K extends Client$L {
11597
+ class Client$M extends Client$N {
11585
11598
  constructor() {
11586
11599
  super(...arguments);
11587
11600
  /**
@@ -12571,6 +12584,51 @@ class Client$K extends Client$L {
12571
12584
  });
12572
12585
  }),
12573
12586
  },
12587
+ /**
12588
+ * calendar.event.meeting_chat
12589
+ */
12590
+ calendarEventMeetingChat: {
12591
+ /**
12592
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=create&version=v4 click to debug }
12593
+ *
12594
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
12595
+ */
12596
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12597
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12598
+ return this.httpInstance
12599
+ .request({
12600
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
12601
+ method: "POST",
12602
+ data,
12603
+ params,
12604
+ headers,
12605
+ })
12606
+ .catch((e) => {
12607
+ this.logger.error(formatErrors(e));
12608
+ throw e;
12609
+ });
12610
+ }),
12611
+ /**
12612
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=delete&version=v4 click to debug }
12613
+ *
12614
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
12615
+ */
12616
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12617
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12618
+ return this.httpInstance
12619
+ .request({
12620
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
12621
+ method: "DELETE",
12622
+ data,
12623
+ params,
12624
+ headers,
12625
+ })
12626
+ .catch((e) => {
12627
+ this.logger.error(formatErrors(e));
12628
+ throw e;
12629
+ });
12630
+ }),
12631
+ },
12574
12632
  /**
12575
12633
  * Exchange绑定
12576
12634
  */
@@ -13749,6 +13807,51 @@ class Client$K extends Client$L {
13749
13807
  });
13750
13808
  }),
13751
13809
  },
13810
+ /**
13811
+ * calendar.event.meeting_chat
13812
+ */
13813
+ calendarEventMeetingChat: {
13814
+ /**
13815
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=create&version=v4 click to debug }
13816
+ *
13817
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
13818
+ */
13819
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13820
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13821
+ return this.httpInstance
13822
+ .request({
13823
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
13824
+ method: "POST",
13825
+ data,
13826
+ params,
13827
+ headers,
13828
+ })
13829
+ .catch((e) => {
13830
+ this.logger.error(formatErrors(e));
13831
+ throw e;
13832
+ });
13833
+ }),
13834
+ /**
13835
+ * {@link https://open.feishu.cn/api-explorer?project=calendar&resource=calendar.event.meeting_chat&apiName=delete&version=v4 click to debug }
13836
+ *
13837
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=calendar&resource=calendar.event.meeting_chat&version=v4 document }
13838
+ */
13839
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
13840
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
13841
+ return this.httpInstance
13842
+ .request({
13843
+ url: fillApiPath(`${this.domain}/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat`, path),
13844
+ method: "DELETE",
13845
+ data,
13846
+ params,
13847
+ headers,
13848
+ })
13849
+ .catch((e) => {
13850
+ this.logger.error(formatErrors(e));
13851
+ throw e;
13852
+ });
13853
+ }),
13854
+ },
13752
13855
  /**
13753
13856
  * Exchange绑定
13754
13857
  */
@@ -13949,7 +14052,7 @@ class Client$K extends Client$L {
13949
14052
  }
13950
14053
 
13951
14054
  // auto gen
13952
- class Client$J extends Client$K {
14055
+ class Client$L extends Client$M {
13953
14056
  constructor() {
13954
14057
  super(...arguments);
13955
14058
  /**
@@ -13960,7 +14063,7 @@ class Client$J extends Client$K {
13960
14063
  }
13961
14064
 
13962
14065
  // auto gen
13963
- class Client$I extends Client$J {
14066
+ class Client$K extends Client$L {
13964
14067
  constructor() {
13965
14068
  super(...arguments);
13966
14069
  /**
@@ -14514,6 +14617,26 @@ class Client$I extends Client$J {
14514
14617
  throw e;
14515
14618
  });
14516
14619
  }),
14620
+ /**
14621
+ * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update_department_id&version=v3 click to debug }
14622
+ *
14623
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_department_id&project=contact&resource=department&version=v3 document }
14624
+ */
14625
+ updateDepartmentId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
14626
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
14627
+ return this.httpInstance
14628
+ .request({
14629
+ url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`, path),
14630
+ method: "PATCH",
14631
+ data,
14632
+ params,
14633
+ headers,
14634
+ })
14635
+ .catch((e) => {
14636
+ this.logger.error(formatErrors(e));
14637
+ throw e;
14638
+ });
14639
+ }),
14517
14640
  },
14518
14641
  /**
14519
14642
  * 人员类型
@@ -16887,6 +17010,26 @@ class Client$I extends Client$J {
16887
17010
  throw e;
16888
17011
  });
16889
17012
  }),
17013
+ /**
17014
+ * {@link https://open.feishu.cn/api-explorer?project=contact&resource=department&apiName=update_department_id&version=v3 click to debug }
17015
+ *
17016
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_department_id&project=contact&resource=department&version=v3 document }
17017
+ */
17018
+ updateDepartmentId: (payload, options) => __awaiter(this, void 0, void 0, function* () {
17019
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
17020
+ return this.httpInstance
17021
+ .request({
17022
+ url: fillApiPath(`${this.domain}/open-apis/contact/v3/departments/:department_id/update_department_id`, path),
17023
+ method: "PATCH",
17024
+ data,
17025
+ params,
17026
+ headers,
17027
+ })
17028
+ .catch((e) => {
17029
+ this.logger.error(formatErrors(e));
17030
+ throw e;
17031
+ });
17032
+ }),
16890
17033
  },
16891
17034
  /**
16892
17035
  * 人员类型
@@ -18718,7 +18861,7 @@ class Client$I extends Client$J {
18718
18861
  }
18719
18862
 
18720
18863
  // auto gen
18721
- class Client$H extends Client$I {
18864
+ class Client$J extends Client$K {
18722
18865
  constructor() {
18723
18866
  super(...arguments);
18724
18867
  /**
@@ -18729,7 +18872,7 @@ class Client$H extends Client$I {
18729
18872
  }
18730
18873
 
18731
18874
  // auto gen
18732
- class Client$G extends Client$H {
18875
+ class Client$I extends Client$J {
18733
18876
  constructor() {
18734
18877
  super(...arguments);
18735
18878
  /**
@@ -18740,7 +18883,7 @@ class Client$G extends Client$H {
18740
18883
  }
18741
18884
 
18742
18885
  // auto gen
18743
- class Client$F extends Client$G {
18886
+ class Client$H extends Client$I {
18744
18887
  constructor() {
18745
18888
  super(...arguments);
18746
18889
  /**
@@ -18877,6 +19020,33 @@ class Client$F extends Client$G {
18877
19020
  });
18878
19021
  }),
18879
19022
  },
19023
+ /**
19024
+ * compensation_standard
19025
+ */
19026
+ compensationStandard: {
19027
+ /**
19028
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=compensation_standard&apiName=match&version=v1 click to debug }
19029
+ *
19030
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=corehr&resource=compensation_standard&version=v1 document }
19031
+ *
19032
+ * 分页查询地点数据
19033
+ */
19034
+ match: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19035
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19036
+ return this.httpInstance
19037
+ .request({
19038
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`, path),
19039
+ method: "GET",
19040
+ data,
19041
+ params,
19042
+ headers,
19043
+ })
19044
+ .catch((e) => {
19045
+ this.logger.error(formatErrors(e));
19046
+ throw e;
19047
+ });
19048
+ }),
19049
+ },
18880
19050
  /**
18881
19051
  * 合同
18882
19052
  */
@@ -21241,6 +21411,33 @@ class Client$F extends Client$G {
21241
21411
  });
21242
21412
  }),
21243
21413
  },
21414
+ /**
21415
+ * compensation_standard
21416
+ */
21417
+ compensationStandard: {
21418
+ /**
21419
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=compensation_standard&apiName=match&version=v1 click to debug }
21420
+ *
21421
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=corehr&resource=compensation_standard&version=v1 document }
21422
+ *
21423
+ * 分页查询地点数据
21424
+ */
21425
+ match: (payload, options) => __awaiter(this, void 0, void 0, function* () {
21426
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
21427
+ return this.httpInstance
21428
+ .request({
21429
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v1/compensation_standards/match`, path),
21430
+ method: "GET",
21431
+ data,
21432
+ params,
21433
+ headers,
21434
+ })
21435
+ .catch((e) => {
21436
+ this.logger.error(formatErrors(e));
21437
+ throw e;
21438
+ });
21439
+ }),
21440
+ },
21244
21441
  /**
21245
21442
  * 合同
21246
21443
  */
@@ -23476,6 +23673,128 @@ class Client$F extends Client$G {
23476
23673
  },
23477
23674
  },
23478
23675
  v2: {
23676
+ /**
23677
+ * bp
23678
+ */
23679
+ bp: {
23680
+ /**
23681
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=get_by_department&version=v2 click to debug }
23682
+ *
23683
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get_by_department&project=corehr&resource=bp&version=v2 document }
23684
+ */
23685
+ getByDepartment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23686
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23687
+ return this.httpInstance
23688
+ .request({
23689
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps/get_by_department`, path),
23690
+ method: "POST",
23691
+ data,
23692
+ params,
23693
+ headers,
23694
+ })
23695
+ .catch((e) => {
23696
+ this.logger.error(formatErrors(e));
23697
+ throw e;
23698
+ });
23699
+ }),
23700
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23701
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23702
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
23703
+ const res = yield this.httpInstance
23704
+ .request({
23705
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
23706
+ method: "GET",
23707
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
23708
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
23709
+ })
23710
+ .catch((e) => {
23711
+ this.logger.error(formatErrors(e));
23712
+ });
23713
+ return res;
23714
+ });
23715
+ const Iterable = {
23716
+ [Symbol.asyncIterator]() {
23717
+ return __asyncGenerator(this, arguments, function* _a() {
23718
+ let hasMore = true;
23719
+ let pageToken;
23720
+ while (hasMore) {
23721
+ try {
23722
+ const res = yield __await(sendRequest({
23723
+ headers,
23724
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
23725
+ data,
23726
+ }));
23727
+ const _b = get__default["default"](res, "data") || {}, {
23728
+ // @ts-ignore
23729
+ has_more,
23730
+ // @ts-ignore
23731
+ page_token,
23732
+ // @ts-ignore
23733
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
23734
+ yield yield __await(rest);
23735
+ hasMore = Boolean(has_more);
23736
+ pageToken = page_token || next_page_token;
23737
+ }
23738
+ catch (e) {
23739
+ yield yield __await(null);
23740
+ break;
23741
+ }
23742
+ }
23743
+ });
23744
+ },
23745
+ };
23746
+ return Iterable;
23747
+ }),
23748
+ /**
23749
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=bp&apiName=list&version=v2 click to debug }
23750
+ *
23751
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=bp&version=v2 document }
23752
+ *
23753
+ * 待补充
23754
+ */
23755
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23756
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23757
+ return this.httpInstance
23758
+ .request({
23759
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/bps`, path),
23760
+ method: "GET",
23761
+ data,
23762
+ params,
23763
+ headers,
23764
+ })
23765
+ .catch((e) => {
23766
+ this.logger.error(formatErrors(e));
23767
+ throw e;
23768
+ });
23769
+ }),
23770
+ },
23771
+ /**
23772
+ * company
23773
+ */
23774
+ company: {
23775
+ /**
23776
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=company&apiName=batch_get&version=v2 click to debug }
23777
+ *
23778
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=company&version=v2 document }
23779
+ *
23780
+ * 通过公司 ID 批量获取公司信息
23781
+ */
23782
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23783
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
23784
+ return this.httpInstance
23785
+ .request({
23786
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/companies/batch_get`, path),
23787
+ method: "POST",
23788
+ data,
23789
+ params,
23790
+ headers,
23791
+ })
23792
+ .catch((e) => {
23793
+ this.logger.error(formatErrors(e));
23794
+ throw e;
23795
+ });
23796
+ }),
23797
+ },
23479
23798
  /**
23480
23799
  * contract
23481
23800
  */
@@ -23743,6 +24062,31 @@ class Client$F extends Client$G {
23743
24062
  });
23744
24063
  }),
23745
24064
  },
24065
+ /**
24066
+ * employees.bp
24067
+ */
24068
+ employeesBp: {
24069
+ /**
24070
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=employees.bp&apiName=batch_get&version=v2 click to debug }
24071
+ *
24072
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=employees.bp&version=v2 document }
24073
+ */
24074
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24075
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24076
+ return this.httpInstance
24077
+ .request({
24078
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/employees/bps/batch_get`, path),
24079
+ method: "POST",
24080
+ data,
24081
+ params,
24082
+ headers,
24083
+ })
24084
+ .catch((e) => {
24085
+ this.logger.error(formatErrors(e));
24086
+ throw e;
24087
+ });
24088
+ }),
24089
+ },
23746
24090
  /**
23747
24091
  * employees.job_data
23748
24092
  */
@@ -23788,6 +24132,55 @@ class Client$F extends Client$G {
23788
24132
  });
23789
24133
  }),
23790
24134
  },
24135
+ /**
24136
+ * job
24137
+ */
24138
+ job: {
24139
+ /**
24140
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=get&version=v2 click to debug }
24141
+ *
24142
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=corehr&resource=job&version=v2 document }
24143
+ *
24144
+ * 根据 ID 查询单个职务。
24145
+ */
24146
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24147
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24148
+ return this.httpInstance
24149
+ .request({
24150
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs/:job_id`, path),
24151
+ method: "GET",
24152
+ data,
24153
+ params,
24154
+ headers,
24155
+ })
24156
+ .catch((e) => {
24157
+ this.logger.error(formatErrors(e));
24158
+ throw e;
24159
+ });
24160
+ }),
24161
+ /**
24162
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job&apiName=list&version=v2 click to debug }
24163
+ *
24164
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=corehr&resource=job&version=v2 document }
24165
+ *
24166
+ * 分页查询职务数据
24167
+ */
24168
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24169
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24170
+ return this.httpInstance
24171
+ .request({
24172
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/jobs`, path),
24173
+ method: "GET",
24174
+ data,
24175
+ params,
24176
+ headers,
24177
+ })
24178
+ .catch((e) => {
24179
+ this.logger.error(formatErrors(e));
24180
+ throw e;
24181
+ });
24182
+ }),
24183
+ },
23791
24184
  /**
23792
24185
  * job_change
23793
24186
  */
@@ -23841,17 +24234,332 @@ class Client$F extends Client$G {
23841
24234
  return Iterable;
23842
24235
  }),
23843
24236
  /**
23844
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
23845
- *
23846
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
24237
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_change&apiName=search&version=v2 click to debug }
24238
+ *
24239
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=job_change&version=v2 document }
24240
+ *
24241
+ * 获取员工异动列表
24242
+ */
24243
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24244
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24245
+ return this.httpInstance
24246
+ .request({
24247
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
24248
+ method: "POST",
24249
+ data,
24250
+ params,
24251
+ headers,
24252
+ })
24253
+ .catch((e) => {
24254
+ this.logger.error(formatErrors(e));
24255
+ throw e;
24256
+ });
24257
+ }),
24258
+ },
24259
+ /**
24260
+ * job_family
24261
+ */
24262
+ jobFamily: {
24263
+ /**
24264
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_family&apiName=batch_get&version=v2 click to debug }
24265
+ *
24266
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
24267
+ *
24268
+ * 通过序列 ID 批量获取序列信息
24269
+ */
24270
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24271
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24272
+ return this.httpInstance
24273
+ .request({
24274
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_families/batch_get`, path),
24275
+ method: "POST",
24276
+ data,
24277
+ params,
24278
+ headers,
24279
+ })
24280
+ .catch((e) => {
24281
+ this.logger.error(formatErrors(e));
24282
+ throw e;
24283
+ });
24284
+ }),
24285
+ },
24286
+ /**
24287
+ * job_level
24288
+ */
24289
+ jobLevel: {
24290
+ /**
24291
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=job_level&apiName=batch_get&version=v2 click to debug }
24292
+ *
24293
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
24294
+ *
24295
+ * 通过职级 ID 批量获取职级信息
24296
+ */
24297
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24298
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24299
+ return this.httpInstance
24300
+ .request({
24301
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_levels/batch_get`, path),
24302
+ method: "POST",
24303
+ data,
24304
+ params,
24305
+ headers,
24306
+ })
24307
+ .catch((e) => {
24308
+ this.logger.error(formatErrors(e));
24309
+ throw e;
24310
+ });
24311
+ }),
24312
+ },
24313
+ /**
24314
+ * location
24315
+ */
24316
+ location: {
24317
+ /**
24318
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=location&apiName=batch_get&version=v2 click to debug }
24319
+ *
24320
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=location&version=v2 document }
24321
+ *
24322
+ * 通过地点 ID 批量获取地点信息
24323
+ */
24324
+ batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24325
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24326
+ return this.httpInstance
24327
+ .request({
24328
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/locations/batch_get`, path),
24329
+ method: "POST",
24330
+ data,
24331
+ params,
24332
+ headers,
24333
+ })
24334
+ .catch((e) => {
24335
+ this.logger.error(formatErrors(e));
24336
+ throw e;
24337
+ });
24338
+ }),
24339
+ },
24340
+ /**
24341
+ * person
24342
+ */
24343
+ person: {
24344
+ /**
24345
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v2 click to debug }
24346
+ *
24347
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=person&version=v2 document }
24348
+ *
24349
+ * 创建个人信息数据
24350
+ */
24351
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24352
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24353
+ return this.httpInstance
24354
+ .request({
24355
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons`, path),
24356
+ method: "POST",
24357
+ data,
24358
+ params,
24359
+ headers,
24360
+ })
24361
+ .catch((e) => {
24362
+ this.logger.error(formatErrors(e));
24363
+ throw e;
24364
+ });
24365
+ }),
24366
+ /**
24367
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v2 click to debug }
24368
+ *
24369
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=person&version=v2 document }
24370
+ */
24371
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24372
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24373
+ return this.httpInstance
24374
+ .request({
24375
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons/:person_id`, path),
24376
+ method: "PATCH",
24377
+ data,
24378
+ params,
24379
+ headers,
24380
+ })
24381
+ .catch((e) => {
24382
+ this.logger.error(formatErrors(e));
24383
+ throw e;
24384
+ });
24385
+ }),
24386
+ },
24387
+ /**
24388
+ * 待入职
24389
+ */
24390
+ preHire: {
24391
+ /**
24392
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
24393
+ *
24394
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
24395
+ *
24396
+ * 创建待入职人员
24397
+ *
24398
+ * 创建待入职人员
24399
+ */
24400
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24401
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24402
+ return this.httpInstance
24403
+ .request({
24404
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
24405
+ method: "POST",
24406
+ data,
24407
+ params,
24408
+ headers,
24409
+ })
24410
+ .catch((e) => {
24411
+ this.logger.error(formatErrors(e));
24412
+ throw e;
24413
+ });
24414
+ }),
24415
+ },
24416
+ /**
24417
+ * probation.assessment
24418
+ */
24419
+ probationAssessment: {
24420
+ /**
24421
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=create&version=v2 click to debug }
24422
+ *
24423
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=probation.assessment&version=v2 document }
24424
+ */
24425
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24426
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24427
+ return this.httpInstance
24428
+ .request({
24429
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments`, path),
24430
+ method: "POST",
24431
+ data,
24432
+ params,
24433
+ headers,
24434
+ })
24435
+ .catch((e) => {
24436
+ this.logger.error(formatErrors(e));
24437
+ throw e;
24438
+ });
24439
+ }),
24440
+ /**
24441
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=delete&version=v2 click to debug }
24442
+ *
24443
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=corehr&resource=probation.assessment&version=v2 document }
24444
+ */
24445
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24446
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24447
+ return this.httpInstance
24448
+ .request({
24449
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
24450
+ method: "DELETE",
24451
+ data,
24452
+ params,
24453
+ headers,
24454
+ })
24455
+ .catch((e) => {
24456
+ this.logger.error(formatErrors(e));
24457
+ throw e;
24458
+ });
24459
+ }),
24460
+ /**
24461
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation.assessment&apiName=patch&version=v2 click to debug }
24462
+ *
24463
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=probation.assessment&version=v2 document }
24464
+ */
24465
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24466
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24467
+ return this.httpInstance
24468
+ .request({
24469
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/assessments/:assessment_id`, path),
24470
+ method: "PATCH",
24471
+ data,
24472
+ params,
24473
+ headers,
24474
+ })
24475
+ .catch((e) => {
24476
+ this.logger.error(formatErrors(e));
24477
+ throw e;
24478
+ });
24479
+ }),
24480
+ },
24481
+ /**
24482
+ * probation
24483
+ */
24484
+ probation: {
24485
+ /**
24486
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=enable_disable_assessment&version=v2 click to debug }
24487
+ *
24488
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enable_disable_assessment&project=corehr&resource=probation&version=v2 document }
24489
+ */
24490
+ enableDisableAssessment: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24491
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24492
+ return this.httpInstance
24493
+ .request({
24494
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/enable_disable_assessment`, path),
24495
+ method: "POST",
24496
+ data,
24497
+ params,
24498
+ headers,
24499
+ })
24500
+ .catch((e) => {
24501
+ this.logger.error(formatErrors(e));
24502
+ throw e;
24503
+ });
24504
+ }),
24505
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24506
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24507
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
24508
+ const res = yield this.httpInstance
24509
+ .request({
24510
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
24511
+ method: "POST",
24512
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
24513
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
24514
+ })
24515
+ .catch((e) => {
24516
+ this.logger.error(formatErrors(e));
24517
+ });
24518
+ return res;
24519
+ });
24520
+ const Iterable = {
24521
+ [Symbol.asyncIterator]() {
24522
+ return __asyncGenerator(this, arguments, function* _a() {
24523
+ let hasMore = true;
24524
+ let pageToken;
24525
+ while (hasMore) {
24526
+ try {
24527
+ const res = yield __await(sendRequest({
24528
+ headers,
24529
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
24530
+ data,
24531
+ }));
24532
+ const _b = get__default["default"](res, "data") || {}, {
24533
+ // @ts-ignore
24534
+ has_more,
24535
+ // @ts-ignore
24536
+ page_token,
24537
+ // @ts-ignore
24538
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
24539
+ yield yield __await(rest);
24540
+ hasMore = Boolean(has_more);
24541
+ pageToken = page_token || next_page_token;
24542
+ }
24543
+ catch (e) {
24544
+ yield yield __await(null);
24545
+ break;
24546
+ }
24547
+ }
24548
+ });
24549
+ },
24550
+ };
24551
+ return Iterable;
24552
+ }),
24553
+ /**
24554
+ * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=probation&apiName=search&version=v2 click to debug }
23847
24555
  *
23848
- * 获取员工异动列表
24556
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=corehr&resource=probation&version=v2 document }
23849
24557
  */
23850
24558
  search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23851
24559
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23852
24560
  return this.httpInstance
23853
24561
  .request({
23854
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/job_changes/search`, path),
24562
+ url: fillApiPath(`${this.domain}/open-apis/corehr/v2/probation/search`, path),
23855
24563
  method: "POST",
23856
24564
  data,
23857
24565
  params,
@@ -23863,80 +24571,419 @@ class Client$F extends Client$G {
23863
24571
  });
23864
24572
  }),
23865
24573
  },
24574
+ },
24575
+ };
24576
+ }
24577
+ }
24578
+
24579
+ // auto gen
24580
+ class Client$G extends Client$H {
24581
+ constructor() {
24582
+ super(...arguments);
24583
+ /**
24584
+
24585
+ */
24586
+ this.docs_tool = {};
24587
+ }
24588
+ }
24589
+
24590
+ // auto gen
24591
+ class Client$F extends Client$G {
24592
+ constructor() {
24593
+ super(...arguments);
24594
+ /**
24595
+
24596
+ */
24597
+ this.document_ai = {
24598
+ v1: {
23866
24599
  /**
23867
- * person
24600
+ * bank_card
23868
24601
  */
23869
- person: {
24602
+ bankCard: {
23870
24603
  /**
23871
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=create&version=v2 click to debug }
24604
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=bank_card&apiName=recognize&version=v1 click to debug }
23872
24605
  *
23873
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=corehr&resource=person&version=v2 document }
24606
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=bank_card&version=v1 document }
24607
+ */
24608
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24609
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24610
+ const res = yield this.httpInstance
24611
+ .request({
24612
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/bank_card/recognize`, path),
24613
+ method: "POST",
24614
+ data,
24615
+ params,
24616
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24617
+ })
24618
+ .catch((e) => {
24619
+ this.logger.error(formatErrors(e));
24620
+ throw e;
24621
+ });
24622
+ return get__default["default"](res, "data", null);
24623
+ }),
24624
+ },
24625
+ /**
24626
+ * business_card
24627
+ */
24628
+ businessCard: {
24629
+ /**
24630
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=business_card&apiName=recognize&version=v1 click to debug }
23874
24631
  *
23875
- * 创建个人信息数据
24632
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=business_card&version=v1 document }
23876
24633
  */
23877
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24634
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23878
24635
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23879
- return this.httpInstance
24636
+ const res = yield this.httpInstance
23880
24637
  .request({
23881
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons`, path),
24638
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/business_card/recognize`, path),
23882
24639
  method: "POST",
23883
24640
  data,
23884
24641
  params,
23885
- headers,
24642
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
23886
24643
  })
23887
24644
  .catch((e) => {
23888
24645
  this.logger.error(formatErrors(e));
23889
24646
  throw e;
23890
24647
  });
24648
+ return get__default["default"](res, "data", null);
23891
24649
  }),
24650
+ },
24651
+ /**
24652
+ * business_license
24653
+ */
24654
+ businessLicense: {
23892
24655
  /**
23893
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=person&apiName=patch&version=v2 click to debug }
24656
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=business_license&apiName=recognize&version=v1 click to debug }
23894
24657
  *
23895
- * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=corehr&resource=person&version=v2 document }
24658
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=business_license&version=v1 document }
23896
24659
  */
23897
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24660
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23898
24661
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23899
- return this.httpInstance
24662
+ const res = yield this.httpInstance
23900
24663
  .request({
23901
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/persons/:person_id`, path),
23902
- method: "PATCH",
24664
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/business_license/recognize`, path),
24665
+ method: "POST",
23903
24666
  data,
23904
24667
  params,
23905
- headers,
24668
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
23906
24669
  })
23907
24670
  .catch((e) => {
23908
24671
  this.logger.error(formatErrors(e));
23909
24672
  throw e;
23910
24673
  });
24674
+ return get__default["default"](res, "data", null);
23911
24675
  }),
23912
24676
  },
23913
24677
  /**
23914
- * 待入职
24678
+ * chinese_passport
23915
24679
  */
23916
- preHire: {
24680
+ chinesePassport: {
23917
24681
  /**
23918
- * {@link https://open.feishu.cn/api-explorer?project=corehr&resource=pre_hire&apiName=create&version=v2 click to debug }
24682
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=chinese_passport&apiName=recognize&version=v1 click to debug }
23919
24683
  *
23920
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/create document }
24684
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=chinese_passport&version=v1 document }
24685
+ */
24686
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24687
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24688
+ const res = yield this.httpInstance
24689
+ .request({
24690
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/chinese_passport/recognize`, path),
24691
+ method: "POST",
24692
+ data,
24693
+ params,
24694
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24695
+ })
24696
+ .catch((e) => {
24697
+ this.logger.error(formatErrors(e));
24698
+ throw e;
24699
+ });
24700
+ return get__default["default"](res, "data", null);
24701
+ }),
24702
+ },
24703
+ /**
24704
+ * contract
24705
+ */
24706
+ contract: {
24707
+ /**
24708
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=contract&apiName=field_extraction&version=v1 click to debug }
23921
24709
  *
23922
- * 创建待入职人员
24710
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=field_extraction&project=document_ai&resource=contract&version=v1 document }
24711
+ */
24712
+ fieldExtraction: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24713
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24714
+ const res = yield this.httpInstance
24715
+ .request({
24716
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/contract/field_extraction`, path),
24717
+ method: "POST",
24718
+ data,
24719
+ params,
24720
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24721
+ })
24722
+ .catch((e) => {
24723
+ this.logger.error(formatErrors(e));
24724
+ throw e;
24725
+ });
24726
+ return get__default["default"](res, "data", null);
24727
+ }),
24728
+ },
24729
+ /**
24730
+ * driving_license
24731
+ */
24732
+ drivingLicense: {
24733
+ /**
24734
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=driving_license&apiName=recognize&version=v1 click to debug }
23923
24735
  *
23924
- * 创建待入职人员
24736
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=driving_license&version=v1 document }
23925
24737
  */
23926
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24738
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
23927
24739
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
23928
- return this.httpInstance
24740
+ const res = yield this.httpInstance
23929
24741
  .request({
23930
- url: fillApiPath(`${this.domain}/open-apis/corehr/v2/pre_hires`, path),
24742
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/driving_license/recognize`, path),
23931
24743
  method: "POST",
23932
24744
  data,
23933
24745
  params,
23934
- headers,
24746
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24747
+ })
24748
+ .catch((e) => {
24749
+ this.logger.error(formatErrors(e));
24750
+ throw e;
24751
+ });
24752
+ return get__default["default"](res, "data", null);
24753
+ }),
24754
+ },
24755
+ /**
24756
+ * food_manage_license
24757
+ */
24758
+ foodManageLicense: {
24759
+ /**
24760
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=food_manage_license&apiName=recognize&version=v1 click to debug }
24761
+ *
24762
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=food_manage_license&version=v1 document }
24763
+ */
24764
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24765
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24766
+ const res = yield this.httpInstance
24767
+ .request({
24768
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/food_manage_license/recognize`, path),
24769
+ method: "POST",
24770
+ data,
24771
+ params,
24772
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24773
+ })
24774
+ .catch((e) => {
24775
+ this.logger.error(formatErrors(e));
24776
+ throw e;
24777
+ });
24778
+ return get__default["default"](res, "data", null);
24779
+ }),
24780
+ },
24781
+ /**
24782
+ * food_produce_license
24783
+ */
24784
+ foodProduceLicense: {
24785
+ /**
24786
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=food_produce_license&apiName=recognize&version=v1 click to debug }
24787
+ *
24788
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=food_produce_license&version=v1 document }
24789
+ */
24790
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24791
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24792
+ const res = yield this.httpInstance
24793
+ .request({
24794
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/food_produce_license/recognize`, path),
24795
+ method: "POST",
24796
+ data,
24797
+ params,
24798
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24799
+ })
24800
+ .catch((e) => {
24801
+ this.logger.error(formatErrors(e));
24802
+ throw e;
24803
+ });
24804
+ return get__default["default"](res, "data", null);
24805
+ }),
24806
+ },
24807
+ /**
24808
+ * hkm_mainland_travel_permit
24809
+ */
24810
+ hkmMainlandTravelPermit: {
24811
+ /**
24812
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=hkm_mainland_travel_permit&apiName=recognize&version=v1 click to debug }
24813
+ *
24814
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=hkm_mainland_travel_permit&version=v1 document }
24815
+ */
24816
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24817
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24818
+ const res = yield this.httpInstance
24819
+ .request({
24820
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/hkm_mainland_travel_permit/recognize`, path),
24821
+ method: "POST",
24822
+ data,
24823
+ params,
24824
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24825
+ })
24826
+ .catch((e) => {
24827
+ this.logger.error(formatErrors(e));
24828
+ throw e;
24829
+ });
24830
+ return get__default["default"](res, "data", null);
24831
+ }),
24832
+ },
24833
+ /**
24834
+ * id_card
24835
+ */
24836
+ idCard: {
24837
+ /**
24838
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=id_card&apiName=recognize&version=v1 click to debug }
24839
+ *
24840
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=id_card&version=v1 document }
24841
+ */
24842
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24843
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24844
+ const res = yield this.httpInstance
24845
+ .request({
24846
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/id_card/recognize`, path),
24847
+ method: "POST",
24848
+ data,
24849
+ params,
24850
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24851
+ })
24852
+ .catch((e) => {
24853
+ this.logger.error(formatErrors(e));
24854
+ throw e;
24855
+ });
24856
+ return get__default["default"](res, "data", null);
24857
+ }),
24858
+ },
24859
+ /**
24860
+ * taxi_invoice
24861
+ */
24862
+ taxiInvoice: {
24863
+ /**
24864
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=taxi_invoice&apiName=recognize&version=v1 click to debug }
24865
+ *
24866
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=taxi_invoice&version=v1 document }
24867
+ */
24868
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24869
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24870
+ const res = yield this.httpInstance
24871
+ .request({
24872
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/taxi_invoice/recognize`, path),
24873
+ method: "POST",
24874
+ data,
24875
+ params,
24876
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
23935
24877
  })
23936
24878
  .catch((e) => {
23937
24879
  this.logger.error(formatErrors(e));
23938
24880
  throw e;
23939
24881
  });
24882
+ return get__default["default"](res, "data", null);
24883
+ }),
24884
+ },
24885
+ /**
24886
+ * train_invoice
24887
+ */
24888
+ trainInvoice: {
24889
+ /**
24890
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=train_invoice&apiName=recognize&version=v1 click to debug }
24891
+ *
24892
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=train_invoice&version=v1 document }
24893
+ */
24894
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24895
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24896
+ const res = yield this.httpInstance
24897
+ .request({
24898
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/train_invoice/recognize`, path),
24899
+ method: "POST",
24900
+ data,
24901
+ params,
24902
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24903
+ })
24904
+ .catch((e) => {
24905
+ this.logger.error(formatErrors(e));
24906
+ throw e;
24907
+ });
24908
+ return get__default["default"](res, "data", null);
24909
+ }),
24910
+ },
24911
+ /**
24912
+ * tw_mainland_travel_permit
24913
+ */
24914
+ twMainlandTravelPermit: {
24915
+ /**
24916
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=tw_mainland_travel_permit&apiName=recognize&version=v1 click to debug }
24917
+ *
24918
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=tw_mainland_travel_permit&version=v1 document }
24919
+ */
24920
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24921
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24922
+ const res = yield this.httpInstance
24923
+ .request({
24924
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/tw_mainland_travel_permit/recognize`, path),
24925
+ method: "POST",
24926
+ data,
24927
+ params,
24928
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24929
+ })
24930
+ .catch((e) => {
24931
+ this.logger.error(formatErrors(e));
24932
+ throw e;
24933
+ });
24934
+ return get__default["default"](res, "data", null);
24935
+ }),
24936
+ },
24937
+ /**
24938
+ * vat_invoice
24939
+ */
24940
+ vatInvoice: {
24941
+ /**
24942
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vat_invoice&apiName=recognize&version=v1 click to debug }
24943
+ *
24944
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vat_invoice&version=v1 document }
24945
+ */
24946
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24947
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24948
+ const res = yield this.httpInstance
24949
+ .request({
24950
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vat_invoice/recognize`, path),
24951
+ method: "POST",
24952
+ data,
24953
+ params,
24954
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24955
+ })
24956
+ .catch((e) => {
24957
+ this.logger.error(formatErrors(e));
24958
+ throw e;
24959
+ });
24960
+ return get__default["default"](res, "data", null);
24961
+ }),
24962
+ },
24963
+ /**
24964
+ * vehicle_license
24965
+ */
24966
+ vehicleLicense: {
24967
+ /**
24968
+ * {@link https://open.feishu.cn/api-explorer?project=document_ai&resource=vehicle_license&apiName=recognize&version=v1 click to debug }
24969
+ *
24970
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=recognize&project=document_ai&resource=vehicle_license&version=v1 document }
24971
+ */
24972
+ recognize: (payload, options) => __awaiter(this, void 0, void 0, function* () {
24973
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
24974
+ const res = yield this.httpInstance
24975
+ .request({
24976
+ url: fillApiPath(`${this.domain}/open-apis/document_ai/v1/vehicle_license/recognize`, path),
24977
+ method: "POST",
24978
+ data,
24979
+ params,
24980
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
24981
+ })
24982
+ .catch((e) => {
24983
+ this.logger.error(formatErrors(e));
24984
+ throw e;
24985
+ });
24986
+ return get__default["default"](res, "data", null);
23940
24987
  }),
23941
24988
  },
23942
24989
  },
@@ -23946,17 +24993,6 @@ class Client$F extends Client$G {
23946
24993
 
23947
24994
  // auto gen
23948
24995
  class Client$E extends Client$F {
23949
- constructor() {
23950
- super(...arguments);
23951
- /**
23952
-
23953
- */
23954
- this.docs_tool = {};
23955
- }
23956
- }
23957
-
23958
- // auto gen
23959
- class Client$D extends Client$E {
23960
24996
  constructor() {
23961
24997
  super(...arguments);
23962
24998
  /**
@@ -24752,7 +25788,7 @@ class Client$D extends Client$E {
24752
25788
  }
24753
25789
 
24754
25790
  // auto gen
24755
- class Client$C extends Client$D {
25791
+ class Client$D extends Client$E {
24756
25792
  constructor() {
24757
25793
  super(...arguments);
24758
25794
  /**
@@ -25150,7 +26186,7 @@ class Client$C extends Client$D {
25150
26186
  }),
25151
26187
  },
25152
26188
  /**
25153
- * 事件
26189
+ * 分片上传
25154
26190
  */
25155
26191
  file: {
25156
26192
  /**
@@ -26844,7 +27880,7 @@ class Client$C extends Client$D {
26844
27880
  }),
26845
27881
  },
26846
27882
  /**
26847
- * 事件
27883
+ * 分片上传
26848
27884
  */
26849
27885
  file: {
26850
27886
  /**
@@ -28152,7 +29188,7 @@ class Client$C extends Client$D {
28152
29188
  }
28153
29189
 
28154
29190
  // auto gen
28155
- class Client$B extends Client$C {
29191
+ class Client$C extends Client$D {
28156
29192
  constructor() {
28157
29193
  super(...arguments);
28158
29194
  /**
@@ -28163,7 +29199,7 @@ class Client$B extends Client$C {
28163
29199
  }
28164
29200
 
28165
29201
  // auto gen
28166
- class Client$A extends Client$B {
29202
+ class Client$B extends Client$C {
28167
29203
  constructor() {
28168
29204
  super(...arguments);
28169
29205
  /**
@@ -28423,7 +29459,7 @@ class Client$A extends Client$B {
28423
29459
  }
28424
29460
 
28425
29461
  // auto gen
28426
- class Client$z extends Client$A {
29462
+ class Client$A extends Client$B {
28427
29463
  constructor() {
28428
29464
  super(...arguments);
28429
29465
  /**
@@ -28434,7 +29470,7 @@ class Client$z extends Client$A {
28434
29470
  }
28435
29471
 
28436
29472
  // auto gen
28437
- class Client$y extends Client$z {
29473
+ class Client$z extends Client$A {
28438
29474
  constructor() {
28439
29475
  super(...arguments);
28440
29476
  /**
@@ -28606,7 +29642,7 @@ class Client$y extends Client$z {
28606
29642
  }
28607
29643
 
28608
29644
  // auto gen
28609
- class Client$x extends Client$y {
29645
+ class Client$y extends Client$z {
28610
29646
  constructor() {
28611
29647
  super(...arguments);
28612
29648
  /**
@@ -28617,7 +29653,7 @@ class Client$x extends Client$y {
28617
29653
  }
28618
29654
 
28619
29655
  // auto gen
28620
- class Client$w extends Client$x {
29656
+ class Client$x extends Client$y {
28621
29657
  constructor() {
28622
29658
  super(...arguments);
28623
29659
  /**
@@ -28628,7 +29664,7 @@ class Client$w extends Client$x {
28628
29664
  }
28629
29665
 
28630
29666
  // auto gen
28631
- class Client$v extends Client$w {
29667
+ class Client$w extends Client$x {
28632
29668
  constructor() {
28633
29669
  super(...arguments);
28634
29670
  /**
@@ -28639,7 +29675,7 @@ class Client$v extends Client$w {
28639
29675
  }
28640
29676
 
28641
29677
  // auto gen
28642
- class Client$u extends Client$v {
29678
+ class Client$v extends Client$w {
28643
29679
  constructor() {
28644
29680
  super(...arguments);
28645
29681
  /**
@@ -28879,7 +29915,7 @@ class Client$u extends Client$v {
28879
29915
  }
28880
29916
 
28881
29917
  // auto gen
28882
- class Client$t extends Client$u {
29918
+ class Client$u extends Client$v {
28883
29919
  constructor() {
28884
29920
  super(...arguments);
28885
29921
  /**
@@ -31771,7 +32807,7 @@ class Client$t extends Client$u {
31771
32807
  }
31772
32808
 
31773
32809
  // auto gen
31774
- class Client$s extends Client$t {
32810
+ class Client$t extends Client$u {
31775
32811
  constructor() {
31776
32812
  super(...arguments);
31777
32813
  /**
@@ -32005,6 +33041,424 @@ class Client$s extends Client$t {
32005
33041
  });
32006
33042
  }),
32007
33043
  },
33044
+ /**
33045
+ * 生态对接账号自定义字段
33046
+ */
33047
+ ecoAccountCustomField: {
33048
+ /**
33049
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_delete&version=v1 click to debug }
33050
+ *
33051
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete document }
33052
+ *
33053
+ * 删除帐号自定义字段
33054
+ *
33055
+ * 删除用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。删除后,不影响已添加帐号对应的自定义字段的值。但在添加新帐号时,将不能再使用此自定义字段。删除不支持撤销,对应的 key 将无法再次复用。
33056
+ */
33057
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33058
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33059
+ return this.httpInstance
33060
+ .request({
33061
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`, path),
33062
+ method: "POST",
33063
+ data,
33064
+ params,
33065
+ headers,
33066
+ })
33067
+ .catch((e) => {
33068
+ this.logger.error(formatErrors(e));
33069
+ throw e;
33070
+ });
33071
+ }),
33072
+ /**
33073
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_update&version=v1 click to debug }
33074
+ *
33075
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_update document }
33076
+ *
33077
+ * 更新帐号自定义字段
33078
+ *
33079
+ * 更新用户在服务商处的身份标示字段(如用户在服务商处的租户 ID),此方法只会更新同一 scope 内 key 一致的自定义字段。
33080
+ */
33081
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33082
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33083
+ return this.httpInstance
33084
+ .request({
33085
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`, path),
33086
+ method: "PATCH",
33087
+ data,
33088
+ params,
33089
+ headers,
33090
+ })
33091
+ .catch((e) => {
33092
+ this.logger.error(formatErrors(e));
33093
+ throw e;
33094
+ });
33095
+ }),
33096
+ /**
33097
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=create&version=v1 click to debug }
33098
+ *
33099
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create document }
33100
+ *
33101
+ * 创建帐号自定义字段
33102
+ *
33103
+ * 定制用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。用户在飞书招聘后台添加帐号后,系统会推送「帐号绑定」事件给开发者,事件将携带用户填写的自定义字段信息,开发者可根据此信息识别飞书招聘用户在服务商处的身份信息,完成飞书招聘用户和服务商帐号的绑定,并以此来推送对应的套餐或试卷列表等。
33104
+ */
33105
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33106
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33107
+ return this.httpInstance
33108
+ .request({
33109
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`, path),
33110
+ method: "POST",
33111
+ data,
33112
+ params,
33113
+ headers,
33114
+ })
33115
+ .catch((e) => {
33116
+ this.logger.error(formatErrors(e));
33117
+ throw e;
33118
+ });
33119
+ }),
33120
+ },
33121
+ /**
33122
+ * 背调订单
33123
+ */
33124
+ ecoBackgroundCheck: {
33125
+ /**
33126
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=cancel&version=v1 click to debug }
33127
+ *
33128
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/cancel document }
33129
+ *
33130
+ * 终止背调订单
33131
+ *
33132
+ * 终止背调订单
33133
+ */
33134
+ cancel: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33135
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33136
+ return this.httpInstance
33137
+ .request({
33138
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`, path),
33139
+ method: "POST",
33140
+ data,
33141
+ params,
33142
+ headers,
33143
+ })
33144
+ .catch((e) => {
33145
+ this.logger.error(formatErrors(e));
33146
+ throw e;
33147
+ });
33148
+ }),
33149
+ /**
33150
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_progress&version=v1 click to debug }
33151
+ *
33152
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_progress document }
33153
+ *
33154
+ * 更新背调进度
33155
+ *
33156
+ * 更新指定背调的进度信息
33157
+ */
33158
+ updateProgress: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33159
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33160
+ return this.httpInstance
33161
+ .request({
33162
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`, path),
33163
+ method: "POST",
33164
+ data,
33165
+ params,
33166
+ headers,
33167
+ })
33168
+ .catch((e) => {
33169
+ this.logger.error(formatErrors(e));
33170
+ throw e;
33171
+ });
33172
+ }),
33173
+ /**
33174
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_result&version=v1 click to debug }
33175
+ *
33176
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_result document }
33177
+ *
33178
+ * 回传背调的最终结果
33179
+ *
33180
+ * 回传背调的最终结果
33181
+ */
33182
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33183
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33184
+ return this.httpInstance
33185
+ .request({
33186
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`, path),
33187
+ method: "POST",
33188
+ data,
33189
+ params,
33190
+ headers,
33191
+ })
33192
+ .catch((e) => {
33193
+ this.logger.error(formatErrors(e));
33194
+ throw e;
33195
+ });
33196
+ }),
33197
+ },
33198
+ /**
33199
+ * 背调自定义字段
33200
+ */
33201
+ ecoBackgroundCheckCustomField: {
33202
+ /**
33203
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_delete&version=v1 click to debug }
33204
+ *
33205
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete document }
33206
+ *
33207
+ * 删除背调自定义字段
33208
+ *
33209
+ * 删除用户在发起背调时的自定义字段,删除不影响已创建的背调,删除后对应的自定义字段的 key 不能再复用。
33210
+ */
33211
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33212
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33213
+ return this.httpInstance
33214
+ .request({
33215
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`, path),
33216
+ method: "POST",
33217
+ data,
33218
+ params,
33219
+ headers,
33220
+ })
33221
+ .catch((e) => {
33222
+ this.logger.error(formatErrors(e));
33223
+ throw e;
33224
+ });
33225
+ }),
33226
+ /**
33227
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_update&version=v1 click to debug }
33228
+ *
33229
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_update document }
33230
+ *
33231
+ * 更新背调自定义字段
33232
+ *
33233
+ * 更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型,且将影响已发起的背调表单展示。
33234
+ */
33235
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33236
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33237
+ return this.httpInstance
33238
+ .request({
33239
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`, path),
33240
+ method: "PATCH",
33241
+ data,
33242
+ params,
33243
+ headers,
33244
+ })
33245
+ .catch((e) => {
33246
+ this.logger.error(formatErrors(e));
33247
+ throw e;
33248
+ });
33249
+ }),
33250
+ /**
33251
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=create&version=v1 click to debug }
33252
+ *
33253
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/create document }
33254
+ *
33255
+ * 创建背调自定义字段
33256
+ *
33257
+ * 定制用户在发起背调时的自定义字段
33258
+ */
33259
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33260
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33261
+ return this.httpInstance
33262
+ .request({
33263
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`, path),
33264
+ method: "POST",
33265
+ data,
33266
+ params,
33267
+ headers,
33268
+ })
33269
+ .catch((e) => {
33270
+ this.logger.error(formatErrors(e));
33271
+ throw e;
33272
+ });
33273
+ }),
33274
+ },
33275
+ /**
33276
+ * 背调套餐和附加调查项
33277
+ */
33278
+ ecoBackgroundCheckPackage: {
33279
+ /**
33280
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_delete&version=v1 click to debug }
33281
+ *
33282
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_delete document }
33283
+ *
33284
+ * 删除背调套餐和附加调查项
33285
+ *
33286
+ * 删除指定帐号的指定背调套餐和附加调查项信息,删除不会影响已创建的背调。
33287
+ */
33288
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33289
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33290
+ return this.httpInstance
33291
+ .request({
33292
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`, path),
33293
+ method: "POST",
33294
+ data,
33295
+ params,
33296
+ headers,
33297
+ })
33298
+ .catch((e) => {
33299
+ this.logger.error(formatErrors(e));
33300
+ throw e;
33301
+ });
33302
+ }),
33303
+ /**
33304
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_update&version=v1 click to debug }
33305
+ *
33306
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_update document }
33307
+ *
33308
+ * 更新背调套餐和附加调查项
33309
+ *
33310
+ * 更新指定帐号可用的背调套餐和附加调查项信息,更新将影响已发起背调的表单项展示
33311
+ */
33312
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33313
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33314
+ return this.httpInstance
33315
+ .request({
33316
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`, path),
33317
+ method: "PATCH",
33318
+ data,
33319
+ params,
33320
+ headers,
33321
+ })
33322
+ .catch((e) => {
33323
+ this.logger.error(formatErrors(e));
33324
+ throw e;
33325
+ });
33326
+ }),
33327
+ /**
33328
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=create&version=v1 click to debug }
33329
+ *
33330
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/create document }
33331
+ *
33332
+ * 推送背调套餐和附加调查项
33333
+ *
33334
+ * 定制指定帐号可用的背调套餐和附加调查项信息
33335
+ */
33336
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33337
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33338
+ return this.httpInstance
33339
+ .request({
33340
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`, path),
33341
+ method: "POST",
33342
+ data,
33343
+ params,
33344
+ headers,
33345
+ })
33346
+ .catch((e) => {
33347
+ this.logger.error(formatErrors(e));
33348
+ throw e;
33349
+ });
33350
+ }),
33351
+ },
33352
+ /**
33353
+ * eco_exam
33354
+ */
33355
+ ecoExam: {
33356
+ /**
33357
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=login_info&version=v1 click to debug }
33358
+ *
33359
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=login_info&project=hire&resource=eco_exam&version=v1 document }
33360
+ */
33361
+ loginInfo: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33362
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33363
+ return this.httpInstance
33364
+ .request({
33365
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`, path),
33366
+ method: "POST",
33367
+ data,
33368
+ params,
33369
+ headers,
33370
+ })
33371
+ .catch((e) => {
33372
+ this.logger.error(formatErrors(e));
33373
+ throw e;
33374
+ });
33375
+ }),
33376
+ /**
33377
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=update_result&version=v1 click to debug }
33378
+ *
33379
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_result&project=hire&resource=eco_exam&version=v1 document }
33380
+ */
33381
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33382
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33383
+ return this.httpInstance
33384
+ .request({
33385
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`, path),
33386
+ method: "POST",
33387
+ data,
33388
+ params,
33389
+ headers,
33390
+ })
33391
+ .catch((e) => {
33392
+ this.logger.error(formatErrors(e));
33393
+ throw e;
33394
+ });
33395
+ }),
33396
+ },
33397
+ /**
33398
+ * eco_exam_paper
33399
+ */
33400
+ ecoExamPaper: {
33401
+ /**
33402
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_delete&version=v1 click to debug }
33403
+ *
33404
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=hire&resource=eco_exam_paper&version=v1 document }
33405
+ */
33406
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33407
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33408
+ return this.httpInstance
33409
+ .request({
33410
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`, path),
33411
+ method: "POST",
33412
+ data,
33413
+ params,
33414
+ headers,
33415
+ })
33416
+ .catch((e) => {
33417
+ this.logger.error(formatErrors(e));
33418
+ throw e;
33419
+ });
33420
+ }),
33421
+ /**
33422
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_update&version=v1 click to debug }
33423
+ *
33424
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=hire&resource=eco_exam_paper&version=v1 document }
33425
+ */
33426
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33427
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33428
+ return this.httpInstance
33429
+ .request({
33430
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`, path),
33431
+ method: "PATCH",
33432
+ data,
33433
+ params,
33434
+ headers,
33435
+ })
33436
+ .catch((e) => {
33437
+ this.logger.error(formatErrors(e));
33438
+ throw e;
33439
+ });
33440
+ }),
33441
+ /**
33442
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=create&version=v1 click to debug }
33443
+ *
33444
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=eco_exam_paper&version=v1 document }
33445
+ */
33446
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33447
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
33448
+ return this.httpInstance
33449
+ .request({
33450
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers`, path),
33451
+ method: "POST",
33452
+ data,
33453
+ params,
33454
+ headers,
33455
+ })
33456
+ .catch((e) => {
33457
+ this.logger.error(formatErrors(e));
33458
+ throw e;
33459
+ });
33460
+ }),
33461
+ },
32008
33462
  /**
32009
33463
  * 导入 e-HR
32010
33464
  */
@@ -33114,6 +34568,91 @@ class Client$s extends Client$t {
33114
34568
  });
33115
34569
  }),
33116
34570
  },
34571
+ /**
34572
+ * referral_account
34573
+ */
34574
+ referralAccount: {
34575
+ /**
34576
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=create&version=v1 click to debug }
34577
+ *
34578
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=referral_account&version=v1 document }
34579
+ */
34580
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34581
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34582
+ return this.httpInstance
34583
+ .request({
34584
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account`, path),
34585
+ method: "POST",
34586
+ data,
34587
+ params,
34588
+ headers,
34589
+ })
34590
+ .catch((e) => {
34591
+ this.logger.error(formatErrors(e));
34592
+ throw e;
34593
+ });
34594
+ }),
34595
+ /**
34596
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=deactivate&version=v1 click to debug }
34597
+ *
34598
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=deactivate&project=hire&resource=referral_account&version=v1 document }
34599
+ */
34600
+ deactivate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34601
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34602
+ return this.httpInstance
34603
+ .request({
34604
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`, path),
34605
+ method: "POST",
34606
+ data,
34607
+ params,
34608
+ headers,
34609
+ })
34610
+ .catch((e) => {
34611
+ this.logger.error(formatErrors(e));
34612
+ throw e;
34613
+ });
34614
+ }),
34615
+ /**
34616
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=reconciliation&version=v1 click to debug }
34617
+ *
34618
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reconciliation&project=hire&resource=referral_account&version=v1 document }
34619
+ */
34620
+ reconciliation: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34621
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34622
+ return this.httpInstance
34623
+ .request({
34624
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`, path),
34625
+ method: "POST",
34626
+ data,
34627
+ params,
34628
+ headers,
34629
+ })
34630
+ .catch((e) => {
34631
+ this.logger.error(formatErrors(e));
34632
+ throw e;
34633
+ });
34634
+ }),
34635
+ /**
34636
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=withdraw&version=v1 click to debug }
34637
+ *
34638
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=hire&resource=referral_account&version=v1 document }
34639
+ */
34640
+ withdraw: (payload, options) => __awaiter(this, void 0, void 0, function* () {
34641
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
34642
+ return this.httpInstance
34643
+ .request({
34644
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`, path),
34645
+ method: "POST",
34646
+ data,
34647
+ params,
34648
+ headers,
34649
+ })
34650
+ .catch((e) => {
34651
+ this.logger.error(formatErrors(e));
34652
+ throw e;
34653
+ });
34654
+ }),
34655
+ },
33117
34656
  /**
33118
34657
  * referral_website.job_post
33119
34658
  */
@@ -33772,6 +35311,424 @@ class Client$s extends Client$t {
33772
35311
  });
33773
35312
  }),
33774
35313
  },
35314
+ /**
35315
+ * 生态对接账号自定义字段
35316
+ */
35317
+ ecoAccountCustomField: {
35318
+ /**
35319
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_delete&version=v1 click to debug }
35320
+ *
35321
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete document }
35322
+ *
35323
+ * 删除帐号自定义字段
35324
+ *
35325
+ * 删除用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。删除后,不影响已添加帐号对应的自定义字段的值。但在添加新帐号时,将不能再使用此自定义字段。删除不支持撤销,对应的 key 将无法再次复用。
35326
+ */
35327
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35328
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35329
+ return this.httpInstance
35330
+ .request({
35331
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_delete`, path),
35332
+ method: "POST",
35333
+ data,
35334
+ params,
35335
+ headers,
35336
+ })
35337
+ .catch((e) => {
35338
+ this.logger.error(formatErrors(e));
35339
+ throw e;
35340
+ });
35341
+ }),
35342
+ /**
35343
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=batch_update&version=v1 click to debug }
35344
+ *
35345
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_update document }
35346
+ *
35347
+ * 更新帐号自定义字段
35348
+ *
35349
+ * 更新用户在服务商处的身份标示字段(如用户在服务商处的租户 ID),此方法只会更新同一 scope 内 key 一致的自定义字段。
35350
+ */
35351
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35352
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35353
+ return this.httpInstance
35354
+ .request({
35355
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields/batch_update`, path),
35356
+ method: "PATCH",
35357
+ data,
35358
+ params,
35359
+ headers,
35360
+ })
35361
+ .catch((e) => {
35362
+ this.logger.error(formatErrors(e));
35363
+ throw e;
35364
+ });
35365
+ }),
35366
+ /**
35367
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_account_custom_field&apiName=create&version=v1 click to debug }
35368
+ *
35369
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create document }
35370
+ *
35371
+ * 创建帐号自定义字段
35372
+ *
35373
+ * 定制用户在服务商处的身份标示字段(如用户在服务商处的租户 ID)。用户在飞书招聘后台添加帐号后,系统会推送「帐号绑定」事件给开发者,事件将携带用户填写的自定义字段信息,开发者可根据此信息识别飞书招聘用户在服务商处的身份信息,完成飞书招聘用户和服务商帐号的绑定,并以此来推送对应的套餐或试卷列表等。
35374
+ */
35375
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35376
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35377
+ return this.httpInstance
35378
+ .request({
35379
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_account_custom_fields`, path),
35380
+ method: "POST",
35381
+ data,
35382
+ params,
35383
+ headers,
35384
+ })
35385
+ .catch((e) => {
35386
+ this.logger.error(formatErrors(e));
35387
+ throw e;
35388
+ });
35389
+ }),
35390
+ },
35391
+ /**
35392
+ * 背调订单
35393
+ */
35394
+ ecoBackgroundCheck: {
35395
+ /**
35396
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=cancel&version=v1 click to debug }
35397
+ *
35398
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/cancel document }
35399
+ *
35400
+ * 终止背调订单
35401
+ *
35402
+ * 终止背调订单
35403
+ */
35404
+ cancel: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35405
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35406
+ return this.httpInstance
35407
+ .request({
35408
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/cancel`, path),
35409
+ method: "POST",
35410
+ data,
35411
+ params,
35412
+ headers,
35413
+ })
35414
+ .catch((e) => {
35415
+ this.logger.error(formatErrors(e));
35416
+ throw e;
35417
+ });
35418
+ }),
35419
+ /**
35420
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_progress&version=v1 click to debug }
35421
+ *
35422
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_progress document }
35423
+ *
35424
+ * 更新背调进度
35425
+ *
35426
+ * 更新指定背调的进度信息
35427
+ */
35428
+ updateProgress: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35429
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35430
+ return this.httpInstance
35431
+ .request({
35432
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_progress`, path),
35433
+ method: "POST",
35434
+ data,
35435
+ params,
35436
+ headers,
35437
+ })
35438
+ .catch((e) => {
35439
+ this.logger.error(formatErrors(e));
35440
+ throw e;
35441
+ });
35442
+ }),
35443
+ /**
35444
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check&apiName=update_result&version=v1 click to debug }
35445
+ *
35446
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/update_result document }
35447
+ *
35448
+ * 回传背调的最终结果
35449
+ *
35450
+ * 回传背调的最终结果
35451
+ */
35452
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35453
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35454
+ return this.httpInstance
35455
+ .request({
35456
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_checks/update_result`, path),
35457
+ method: "POST",
35458
+ data,
35459
+ params,
35460
+ headers,
35461
+ })
35462
+ .catch((e) => {
35463
+ this.logger.error(formatErrors(e));
35464
+ throw e;
35465
+ });
35466
+ }),
35467
+ },
35468
+ /**
35469
+ * 背调自定义字段
35470
+ */
35471
+ ecoBackgroundCheckCustomField: {
35472
+ /**
35473
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_delete&version=v1 click to debug }
35474
+ *
35475
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete document }
35476
+ *
35477
+ * 删除背调自定义字段
35478
+ *
35479
+ * 删除用户在发起背调时的自定义字段,删除不影响已创建的背调,删除后对应的自定义字段的 key 不能再复用。
35480
+ */
35481
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35482
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35483
+ return this.httpInstance
35484
+ .request({
35485
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete`, path),
35486
+ method: "POST",
35487
+ data,
35488
+ params,
35489
+ headers,
35490
+ })
35491
+ .catch((e) => {
35492
+ this.logger.error(formatErrors(e));
35493
+ throw e;
35494
+ });
35495
+ }),
35496
+ /**
35497
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=batch_update&version=v1 click to debug }
35498
+ *
35499
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_update document }
35500
+ *
35501
+ * 更新背调自定义字段
35502
+ *
35503
+ * 更新用户在发起背调时的自定义字段。更新操作不支持更新自定义字段类型,且将影响已发起的背调表单展示。
35504
+ */
35505
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35506
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35507
+ return this.httpInstance
35508
+ .request({
35509
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields/batch_update`, path),
35510
+ method: "PATCH",
35511
+ data,
35512
+ params,
35513
+ headers,
35514
+ })
35515
+ .catch((e) => {
35516
+ this.logger.error(formatErrors(e));
35517
+ throw e;
35518
+ });
35519
+ }),
35520
+ /**
35521
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_custom_field&apiName=create&version=v1 click to debug }
35522
+ *
35523
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/create document }
35524
+ *
35525
+ * 创建背调自定义字段
35526
+ *
35527
+ * 定制用户在发起背调时的自定义字段
35528
+ */
35529
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35530
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35531
+ return this.httpInstance
35532
+ .request({
35533
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_custom_fields`, path),
35534
+ method: "POST",
35535
+ data,
35536
+ params,
35537
+ headers,
35538
+ })
35539
+ .catch((e) => {
35540
+ this.logger.error(formatErrors(e));
35541
+ throw e;
35542
+ });
35543
+ }),
35544
+ },
35545
+ /**
35546
+ * 背调套餐和附加调查项
35547
+ */
35548
+ ecoBackgroundCheckPackage: {
35549
+ /**
35550
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_delete&version=v1 click to debug }
35551
+ *
35552
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_delete document }
35553
+ *
35554
+ * 删除背调套餐和附加调查项
35555
+ *
35556
+ * 删除指定帐号的指定背调套餐和附加调查项信息,删除不会影响已创建的背调。
35557
+ */
35558
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35559
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35560
+ return this.httpInstance
35561
+ .request({
35562
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_delete`, path),
35563
+ method: "POST",
35564
+ data,
35565
+ params,
35566
+ headers,
35567
+ })
35568
+ .catch((e) => {
35569
+ this.logger.error(formatErrors(e));
35570
+ throw e;
35571
+ });
35572
+ }),
35573
+ /**
35574
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=batch_update&version=v1 click to debug }
35575
+ *
35576
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/batch_update document }
35577
+ *
35578
+ * 更新背调套餐和附加调查项
35579
+ *
35580
+ * 更新指定帐号可用的背调套餐和附加调查项信息,更新将影响已发起背调的表单项展示
35581
+ */
35582
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35583
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35584
+ return this.httpInstance
35585
+ .request({
35586
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages/batch_update`, path),
35587
+ method: "PATCH",
35588
+ data,
35589
+ params,
35590
+ headers,
35591
+ })
35592
+ .catch((e) => {
35593
+ this.logger.error(formatErrors(e));
35594
+ throw e;
35595
+ });
35596
+ }),
35597
+ /**
35598
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_background_check_package&apiName=create&version=v1 click to debug }
35599
+ *
35600
+ * {@link https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_package/create document }
35601
+ *
35602
+ * 推送背调套餐和附加调查项
35603
+ *
35604
+ * 定制指定帐号可用的背调套餐和附加调查项信息
35605
+ */
35606
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35607
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35608
+ return this.httpInstance
35609
+ .request({
35610
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_background_check_packages`, path),
35611
+ method: "POST",
35612
+ data,
35613
+ params,
35614
+ headers,
35615
+ })
35616
+ .catch((e) => {
35617
+ this.logger.error(formatErrors(e));
35618
+ throw e;
35619
+ });
35620
+ }),
35621
+ },
35622
+ /**
35623
+ * eco_exam
35624
+ */
35625
+ ecoExam: {
35626
+ /**
35627
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=login_info&version=v1 click to debug }
35628
+ *
35629
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=login_info&project=hire&resource=eco_exam&version=v1 document }
35630
+ */
35631
+ loginInfo: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35632
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35633
+ return this.httpInstance
35634
+ .request({
35635
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/login_info`, path),
35636
+ method: "POST",
35637
+ data,
35638
+ params,
35639
+ headers,
35640
+ })
35641
+ .catch((e) => {
35642
+ this.logger.error(formatErrors(e));
35643
+ throw e;
35644
+ });
35645
+ }),
35646
+ /**
35647
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam&apiName=update_result&version=v1 click to debug }
35648
+ *
35649
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update_result&project=hire&resource=eco_exam&version=v1 document }
35650
+ */
35651
+ updateResult: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35652
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35653
+ return this.httpInstance
35654
+ .request({
35655
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exams/:exam_id/update_result`, path),
35656
+ method: "POST",
35657
+ data,
35658
+ params,
35659
+ headers,
35660
+ })
35661
+ .catch((e) => {
35662
+ this.logger.error(formatErrors(e));
35663
+ throw e;
35664
+ });
35665
+ }),
35666
+ },
35667
+ /**
35668
+ * eco_exam_paper
35669
+ */
35670
+ ecoExamPaper: {
35671
+ /**
35672
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_delete&version=v1 click to debug }
35673
+ *
35674
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=hire&resource=eco_exam_paper&version=v1 document }
35675
+ */
35676
+ batchDelete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35677
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35678
+ return this.httpInstance
35679
+ .request({
35680
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_delete`, path),
35681
+ method: "POST",
35682
+ data,
35683
+ params,
35684
+ headers,
35685
+ })
35686
+ .catch((e) => {
35687
+ this.logger.error(formatErrors(e));
35688
+ throw e;
35689
+ });
35690
+ }),
35691
+ /**
35692
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=batch_update&version=v1 click to debug }
35693
+ *
35694
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=hire&resource=eco_exam_paper&version=v1 document }
35695
+ */
35696
+ batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35697
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35698
+ return this.httpInstance
35699
+ .request({
35700
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers/batch_update`, path),
35701
+ method: "PATCH",
35702
+ data,
35703
+ params,
35704
+ headers,
35705
+ })
35706
+ .catch((e) => {
35707
+ this.logger.error(formatErrors(e));
35708
+ throw e;
35709
+ });
35710
+ }),
35711
+ /**
35712
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=eco_exam_paper&apiName=create&version=v1 click to debug }
35713
+ *
35714
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=eco_exam_paper&version=v1 document }
35715
+ */
35716
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
35717
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
35718
+ return this.httpInstance
35719
+ .request({
35720
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/eco_exam_papers`, path),
35721
+ method: "POST",
35722
+ data,
35723
+ params,
35724
+ headers,
35725
+ })
35726
+ .catch((e) => {
35727
+ this.logger.error(formatErrors(e));
35728
+ throw e;
35729
+ });
35730
+ }),
35731
+ },
33775
35732
  /**
33776
35733
  * 导入 e-HR
33777
35734
  */
@@ -34881,6 +36838,91 @@ class Client$s extends Client$t {
34881
36838
  });
34882
36839
  }),
34883
36840
  },
36841
+ /**
36842
+ * referral_account
36843
+ */
36844
+ referralAccount: {
36845
+ /**
36846
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=create&version=v1 click to debug }
36847
+ *
36848
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=hire&resource=referral_account&version=v1 document }
36849
+ */
36850
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36851
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36852
+ return this.httpInstance
36853
+ .request({
36854
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account`, path),
36855
+ method: "POST",
36856
+ data,
36857
+ params,
36858
+ headers,
36859
+ })
36860
+ .catch((e) => {
36861
+ this.logger.error(formatErrors(e));
36862
+ throw e;
36863
+ });
36864
+ }),
36865
+ /**
36866
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=deactivate&version=v1 click to debug }
36867
+ *
36868
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=deactivate&project=hire&resource=referral_account&version=v1 document }
36869
+ */
36870
+ deactivate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36871
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36872
+ return this.httpInstance
36873
+ .request({
36874
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/deactivate`, path),
36875
+ method: "POST",
36876
+ data,
36877
+ params,
36878
+ headers,
36879
+ })
36880
+ .catch((e) => {
36881
+ this.logger.error(formatErrors(e));
36882
+ throw e;
36883
+ });
36884
+ }),
36885
+ /**
36886
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=reconciliation&version=v1 click to debug }
36887
+ *
36888
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reconciliation&project=hire&resource=referral_account&version=v1 document }
36889
+ */
36890
+ reconciliation: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36891
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36892
+ return this.httpInstance
36893
+ .request({
36894
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/reconciliation`, path),
36895
+ method: "POST",
36896
+ data,
36897
+ params,
36898
+ headers,
36899
+ })
36900
+ .catch((e) => {
36901
+ this.logger.error(formatErrors(e));
36902
+ throw e;
36903
+ });
36904
+ }),
36905
+ /**
36906
+ * {@link https://open.feishu.cn/api-explorer?project=hire&resource=referral_account&apiName=withdraw&version=v1 click to debug }
36907
+ *
36908
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=withdraw&project=hire&resource=referral_account&version=v1 document }
36909
+ */
36910
+ withdraw: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36911
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36912
+ return this.httpInstance
36913
+ .request({
36914
+ url: fillApiPath(`${this.domain}/open-apis/hire/v1/referral_account/:referral_account_id/withdraw`, path),
36915
+ method: "POST",
36916
+ data,
36917
+ params,
36918
+ headers,
36919
+ })
36920
+ .catch((e) => {
36921
+ this.logger.error(formatErrors(e));
36922
+ throw e;
36923
+ });
36924
+ }),
36925
+ },
34884
36926
  /**
34885
36927
  * referral_website.job_post
34886
36928
  */
@@ -35317,7 +37359,7 @@ class Client$s extends Client$t {
35317
37359
  }
35318
37360
 
35319
37361
  // auto gen
35320
- class Client$r extends Client$s {
37362
+ class Client$s extends Client$t {
35321
37363
  constructor() {
35322
37364
  super(...arguments);
35323
37365
  /**
@@ -35393,7 +37435,7 @@ class Client$r extends Client$s {
35393
37435
  }
35394
37436
 
35395
37437
  // auto gen
35396
- class Client$q extends Client$r {
37438
+ class Client$r extends Client$s {
35397
37439
  constructor() {
35398
37440
  super(...arguments);
35399
37441
  /**
@@ -39445,21 +41487,480 @@ class Client$q extends Client$r {
39445
41487
  return Iterable;
39446
41488
  }),
39447
41489
  /**
39448
- * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=list&version=v1 click to debug }
41490
+ * {@link https://open.feishu.cn/api-explorer?project=im&resource=pin&apiName=list&version=v1 click to debug }
41491
+ *
41492
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list document }
41493
+ *
41494
+ * 获取群内Pin消息
41495
+ *
41496
+ * 获取所在群内指定时间范围内的所有Pin消息。
41497
+ *
41498
+ * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 获取Pin消息时,机器人必须在群组中;- 获取的Pin消息按Pin的创建时间降序排列;- 接口默认限流为==50 QPS==
41499
+ */
41500
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41501
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41502
+ return this.httpInstance
41503
+ .request({
41504
+ url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path),
41505
+ method: "GET",
41506
+ data,
41507
+ params,
41508
+ headers,
41509
+ })
41510
+ .catch((e) => {
41511
+ this.logger.error(formatErrors(e));
41512
+ throw e;
41513
+ });
41514
+ }),
41515
+ },
41516
+ },
41517
+ };
41518
+ }
41519
+ }
41520
+
41521
+ // auto gen
41522
+ class Client$q extends Client$r {
41523
+ constructor() {
41524
+ super(...arguments);
41525
+ /**
41526
+
41527
+ */
41528
+ this.lingo = {
41529
+ v1: {
41530
+ /**
41531
+ * classification
41532
+ */
41533
+ classification: {
41534
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41535
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41536
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41537
+ const res = yield this.httpInstance
41538
+ .request({
41539
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/classifications`, path),
41540
+ method: "GET",
41541
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
41542
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
41543
+ })
41544
+ .catch((e) => {
41545
+ this.logger.error(formatErrors(e));
41546
+ });
41547
+ return res;
41548
+ });
41549
+ const Iterable = {
41550
+ [Symbol.asyncIterator]() {
41551
+ return __asyncGenerator(this, arguments, function* _a() {
41552
+ let hasMore = true;
41553
+ let pageToken;
41554
+ while (hasMore) {
41555
+ try {
41556
+ const res = yield __await(sendRequest({
41557
+ headers,
41558
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41559
+ data,
41560
+ }));
41561
+ const _b = get__default["default"](res, "data") || {}, {
41562
+ // @ts-ignore
41563
+ has_more,
41564
+ // @ts-ignore
41565
+ page_token,
41566
+ // @ts-ignore
41567
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41568
+ yield yield __await(rest);
41569
+ hasMore = Boolean(has_more);
41570
+ pageToken = page_token || next_page_token;
41571
+ }
41572
+ catch (e) {
41573
+ yield yield __await(null);
41574
+ break;
41575
+ }
41576
+ }
41577
+ });
41578
+ },
41579
+ };
41580
+ return Iterable;
41581
+ }),
41582
+ /**
41583
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=classification&apiName=list&version=v1 click to debug }
41584
+ *
41585
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=classification&version=v1 document }
41586
+ */
41587
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41588
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41589
+ return this.httpInstance
41590
+ .request({
41591
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/classifications`, path),
41592
+ method: "GET",
41593
+ data,
41594
+ params,
41595
+ headers,
41596
+ })
41597
+ .catch((e) => {
41598
+ this.logger.error(formatErrors(e));
41599
+ throw e;
41600
+ });
41601
+ }),
41602
+ },
41603
+ /**
41604
+ * draft
41605
+ */
41606
+ draft: {
41607
+ /**
41608
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=draft&apiName=create&version=v1 click to debug }
41609
+ *
41610
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=lingo&resource=draft&version=v1 document }
41611
+ */
41612
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41613
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41614
+ return this.httpInstance
41615
+ .request({
41616
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/drafts`, path),
41617
+ method: "POST",
41618
+ data,
41619
+ params,
41620
+ headers,
41621
+ })
41622
+ .catch((e) => {
41623
+ this.logger.error(formatErrors(e));
41624
+ throw e;
41625
+ });
41626
+ }),
41627
+ /**
41628
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=draft&apiName=update&version=v1 click to debug }
41629
+ *
41630
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=lingo&resource=draft&version=v1 document }
41631
+ */
41632
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41633
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41634
+ return this.httpInstance
41635
+ .request({
41636
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/drafts/:draft_id`, path),
41637
+ method: "PUT",
41638
+ data,
41639
+ params,
41640
+ headers,
41641
+ })
41642
+ .catch((e) => {
41643
+ this.logger.error(formatErrors(e));
41644
+ throw e;
41645
+ });
41646
+ }),
41647
+ },
41648
+ /**
41649
+ * entity
41650
+ */
41651
+ entity: {
41652
+ /**
41653
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=create&version=v1 click to debug }
41654
+ *
41655
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=lingo&resource=entity&version=v1 document }
41656
+ */
41657
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41658
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41659
+ return this.httpInstance
41660
+ .request({
41661
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path),
41662
+ method: "POST",
41663
+ data,
41664
+ params,
41665
+ headers,
41666
+ })
41667
+ .catch((e) => {
41668
+ this.logger.error(formatErrors(e));
41669
+ throw e;
41670
+ });
41671
+ }),
41672
+ /**
41673
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=get&version=v1 click to debug }
41674
+ *
41675
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=lingo&resource=entity&version=v1 document }
41676
+ */
41677
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41678
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41679
+ return this.httpInstance
41680
+ .request({
41681
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path),
41682
+ method: "GET",
41683
+ data,
41684
+ params,
41685
+ headers,
41686
+ })
41687
+ .catch((e) => {
41688
+ this.logger.error(formatErrors(e));
41689
+ throw e;
41690
+ });
41691
+ }),
41692
+ /**
41693
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=highlight&version=v1 click to debug }
41694
+ *
41695
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=highlight&project=lingo&resource=entity&version=v1 document }
41696
+ */
41697
+ highlight: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41698
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41699
+ return this.httpInstance
41700
+ .request({
41701
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/highlight`, path),
41702
+ method: "POST",
41703
+ data,
41704
+ params,
41705
+ headers,
41706
+ })
41707
+ .catch((e) => {
41708
+ this.logger.error(formatErrors(e));
41709
+ throw e;
41710
+ });
41711
+ }),
41712
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41713
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41714
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41715
+ const res = yield this.httpInstance
41716
+ .request({
41717
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path),
41718
+ method: "GET",
41719
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
41720
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
41721
+ })
41722
+ .catch((e) => {
41723
+ this.logger.error(formatErrors(e));
41724
+ });
41725
+ return res;
41726
+ });
41727
+ const Iterable = {
41728
+ [Symbol.asyncIterator]() {
41729
+ return __asyncGenerator(this, arguments, function* _a() {
41730
+ let hasMore = true;
41731
+ let pageToken;
41732
+ while (hasMore) {
41733
+ try {
41734
+ const res = yield __await(sendRequest({
41735
+ headers,
41736
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41737
+ data,
41738
+ }));
41739
+ const _b = get__default["default"](res, "data") || {}, {
41740
+ // @ts-ignore
41741
+ has_more,
41742
+ // @ts-ignore
41743
+ page_token,
41744
+ // @ts-ignore
41745
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41746
+ yield yield __await(rest);
41747
+ hasMore = Boolean(has_more);
41748
+ pageToken = page_token || next_page_token;
41749
+ }
41750
+ catch (e) {
41751
+ yield yield __await(null);
41752
+ break;
41753
+ }
41754
+ }
41755
+ });
41756
+ },
41757
+ };
41758
+ return Iterable;
41759
+ }),
41760
+ /**
41761
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=list&version=v1 click to debug }
41762
+ *
41763
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=entity&version=v1 document }
41764
+ */
41765
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41766
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41767
+ return this.httpInstance
41768
+ .request({
41769
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities`, path),
41770
+ method: "GET",
41771
+ data,
41772
+ params,
41773
+ headers,
41774
+ })
41775
+ .catch((e) => {
41776
+ this.logger.error(formatErrors(e));
41777
+ throw e;
41778
+ });
41779
+ }),
41780
+ /**
41781
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=match&version=v1 click to debug }
41782
+ *
41783
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=match&project=lingo&resource=entity&version=v1 document }
41784
+ */
41785
+ match: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41786
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41787
+ return this.httpInstance
41788
+ .request({
41789
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/match`, path),
41790
+ method: "POST",
41791
+ data,
41792
+ params,
41793
+ headers,
41794
+ })
41795
+ .catch((e) => {
41796
+ this.logger.error(formatErrors(e));
41797
+ throw e;
41798
+ });
41799
+ }),
41800
+ searchWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41801
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41802
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
41803
+ const res = yield this.httpInstance
41804
+ .request({
41805
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/search`, path),
41806
+ method: "POST",
41807
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
41808
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
41809
+ })
41810
+ .catch((e) => {
41811
+ this.logger.error(formatErrors(e));
41812
+ });
41813
+ return res;
41814
+ });
41815
+ const Iterable = {
41816
+ [Symbol.asyncIterator]() {
41817
+ return __asyncGenerator(this, arguments, function* _a() {
41818
+ let hasMore = true;
41819
+ let pageToken;
41820
+ while (hasMore) {
41821
+ try {
41822
+ const res = yield __await(sendRequest({
41823
+ headers,
41824
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
41825
+ data,
41826
+ }));
41827
+ const _b = get__default["default"](res, "data") || {}, {
41828
+ // @ts-ignore
41829
+ has_more,
41830
+ // @ts-ignore
41831
+ page_token,
41832
+ // @ts-ignore
41833
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
41834
+ yield yield __await(rest);
41835
+ hasMore = Boolean(has_more);
41836
+ pageToken = page_token || next_page_token;
41837
+ }
41838
+ catch (e) {
41839
+ yield yield __await(null);
41840
+ break;
41841
+ }
41842
+ }
41843
+ });
41844
+ },
41845
+ };
41846
+ return Iterable;
41847
+ }),
41848
+ /**
41849
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=search&version=v1 click to debug }
39449
41850
  *
39450
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list document }
41851
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=lingo&resource=entity&version=v1 document }
41852
+ */
41853
+ search: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41854
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41855
+ return this.httpInstance
41856
+ .request({
41857
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/search`, path),
41858
+ method: "POST",
41859
+ data,
41860
+ params,
41861
+ headers,
41862
+ })
41863
+ .catch((e) => {
41864
+ this.logger.error(formatErrors(e));
41865
+ throw e;
41866
+ });
41867
+ }),
41868
+ /**
41869
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=entity&apiName=update&version=v1 click to debug }
39451
41870
  *
39452
- * 获取群内Pin消息
41871
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=lingo&resource=entity&version=v1 document }
41872
+ */
41873
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41874
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41875
+ return this.httpInstance
41876
+ .request({
41877
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/entities/:entity_id`, path),
41878
+ method: "PUT",
41879
+ data,
41880
+ params,
41881
+ headers,
41882
+ })
41883
+ .catch((e) => {
41884
+ this.logger.error(formatErrors(e));
41885
+ throw e;
41886
+ });
41887
+ }),
41888
+ },
41889
+ /**
41890
+ * file
41891
+ */
41892
+ file: {
41893
+ /**
41894
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=file&apiName=download&version=v1 click to debug }
39453
41895
  *
39454
- * 获取所在群内指定时间范围内的所有Pin消息。
41896
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=download&project=lingo&resource=file&version=v1 document }
41897
+ */
41898
+ download: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41899
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41900
+ const res = yield this.httpInstance
41901
+ .request({
41902
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/files/:file_token/download`, path),
41903
+ method: "GET",
41904
+ headers,
41905
+ data,
41906
+ params,
41907
+ responseType: "stream",
41908
+ })
41909
+ .catch((e) => {
41910
+ this.logger.error(formatErrors(e));
41911
+ throw e;
41912
+ });
41913
+ return {
41914
+ writeFile: (filePath) => __awaiter(this, void 0, void 0, function* () {
41915
+ return new Promise((resolve, reject) => {
41916
+ const writableStream = fs__default["default"].createWriteStream(filePath);
41917
+ writableStream.on("finish", () => {
41918
+ resolve(filePath);
41919
+ });
41920
+ writableStream.on("error", (e) => {
41921
+ reject(e);
41922
+ });
41923
+ res.pipe(writableStream);
41924
+ });
41925
+ }),
41926
+ };
41927
+ }),
41928
+ /**
41929
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=file&apiName=upload&version=v1 click to debug }
39455
41930
  *
39456
- * 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 获取Pin消息时,机器人必须在群组中;- 获取的Pin消息按Pin的创建时间降序排列;- 接口默认限流为==50 QPS==
41931
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload&project=lingo&resource=file&version=v1 document }
41932
+ */
41933
+ upload: (payload, options) => __awaiter(this, void 0, void 0, function* () {
41934
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
41935
+ const res = yield this.httpInstance
41936
+ .request({
41937
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/files/upload`, path),
41938
+ method: "POST",
41939
+ data,
41940
+ params,
41941
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
41942
+ })
41943
+ .catch((e) => {
41944
+ this.logger.error(formatErrors(e));
41945
+ throw e;
41946
+ });
41947
+ return get__default["default"](res, "data", null);
41948
+ }),
41949
+ },
41950
+ /**
41951
+ * repo
41952
+ */
41953
+ repo: {
41954
+ /**
41955
+ * {@link https://open.feishu.cn/api-explorer?project=lingo&resource=repo&apiName=list&version=v1 click to debug }
41956
+ *
41957
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=lingo&resource=repo&version=v1 document }
39457
41958
  */
39458
41959
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
39459
41960
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
39460
41961
  return this.httpInstance
39461
41962
  .request({
39462
- url: fillApiPath(`${this.domain}/open-apis/im/v1/pins`, path),
41963
+ url: fillApiPath(`${this.domain}/open-apis/lingo/v1/repos`, path),
39463
41964
  method: "GET",
39464
41965
  data,
39465
41966
  params,
@@ -42564,165 +45065,6 @@ class Client$l extends Client$m {
42564
45065
  return get__default["default"](res, "data", null);
42565
45066
  }),
42566
45067
  },
42567
- /**
42568
- * 指标库
42569
- */
42570
- metricSource: {
42571
- /**
42572
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source&apiName=list&version=v1 click to debug }
42573
- *
42574
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source/list document }
42575
- *
42576
- * 获取指标库
42577
- *
42578
- * 获取租户下全部 OKR 指标库(仅限 OKR 企业版使用)
42579
- */
42580
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42581
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42582
- return this.httpInstance
42583
- .request({
42584
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources`, path),
42585
- method: "GET",
42586
- data,
42587
- params,
42588
- headers,
42589
- })
42590
- .catch((e) => {
42591
- this.logger.error(formatErrors(e));
42592
- throw e;
42593
- });
42594
- }),
42595
- },
42596
- /**
42597
- * 指标项
42598
- */
42599
- metricSourceTableItem: {
42600
- /**
42601
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=batch_update&version=v1 click to debug }
42602
- *
42603
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/batch_update document }
42604
- *
42605
- * 批量更新指标项
42606
- *
42607
- * - 该接口用于批量更新多项指标,单次调用最多更新 100 条记录。接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
42608
- */
42609
- batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42610
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42611
- return this.httpInstance
42612
- .request({
42613
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/batch_update`, path),
42614
- method: "PATCH",
42615
- data,
42616
- params,
42617
- headers,
42618
- })
42619
- .catch((e) => {
42620
- this.logger.error(formatErrors(e));
42621
- throw e;
42622
- });
42623
- }),
42624
- /**
42625
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=get&version=v1 click to debug }
42626
- *
42627
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/get document }
42628
- *
42629
- * 获取指标项详情
42630
- *
42631
- * 获取某项指标的具体内容(仅限 OKR 企业版使用)
42632
- */
42633
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42634
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42635
- return this.httpInstance
42636
- .request({
42637
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
42638
- method: "GET",
42639
- data,
42640
- params,
42641
- headers,
42642
- })
42643
- .catch((e) => {
42644
- this.logger.error(formatErrors(e));
42645
- throw e;
42646
- });
42647
- }),
42648
- /**
42649
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=list&version=v1 click to debug }
42650
- *
42651
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/list document }
42652
- *
42653
- * 获取指标项
42654
- *
42655
- * 获取指定指标表下的所有指标项(仅限 OKR 企业版使用)
42656
- */
42657
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42658
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42659
- return this.httpInstance
42660
- .request({
42661
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items`, path),
42662
- method: "GET",
42663
- data,
42664
- params,
42665
- headers,
42666
- })
42667
- .catch((e) => {
42668
- this.logger.error(formatErrors(e));
42669
- throw e;
42670
- });
42671
- }),
42672
- /**
42673
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=patch&version=v1 click to debug }
42674
- *
42675
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/patch document }
42676
- *
42677
- * 更新指标项
42678
- *
42679
- * - 该接口用于更新某项指标,接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
42680
- */
42681
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42682
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42683
- return this.httpInstance
42684
- .request({
42685
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
42686
- method: "PATCH",
42687
- data,
42688
- params,
42689
- headers,
42690
- })
42691
- .catch((e) => {
42692
- this.logger.error(formatErrors(e));
42693
- throw e;
42694
- });
42695
- }),
42696
- },
42697
- /**
42698
- * 指标表
42699
- */
42700
- metricSourceTable: {
42701
- /**
42702
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table&apiName=list&version=v1 click to debug }
42703
- *
42704
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table/list document }
42705
- *
42706
- * 获取指标表
42707
- *
42708
- * 获取指定指标库下有哪些指标表(仅限 OKR 企业版使用)
42709
- */
42710
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42711
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42712
- return this.httpInstance
42713
- .request({
42714
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables`, path),
42715
- method: "GET",
42716
- data,
42717
- params,
42718
- headers,
42719
- })
42720
- .catch((e) => {
42721
- this.logger.error(formatErrors(e));
42722
- throw e;
42723
- });
42724
- }),
42725
- },
42726
45068
  /**
42727
45069
  * OKR
42728
45070
  */
@@ -42948,165 +45290,6 @@ class Client$l extends Client$m {
42948
45290
  return get__default["default"](res, "data", null);
42949
45291
  }),
42950
45292
  },
42951
- /**
42952
- * 指标库
42953
- */
42954
- metricSource: {
42955
- /**
42956
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source&apiName=list&version=v1 click to debug }
42957
- *
42958
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source/list document }
42959
- *
42960
- * 获取指标库
42961
- *
42962
- * 获取租户下全部 OKR 指标库(仅限 OKR 企业版使用)
42963
- */
42964
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42965
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42966
- return this.httpInstance
42967
- .request({
42968
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources`, path),
42969
- method: "GET",
42970
- data,
42971
- params,
42972
- headers,
42973
- })
42974
- .catch((e) => {
42975
- this.logger.error(formatErrors(e));
42976
- throw e;
42977
- });
42978
- }),
42979
- },
42980
- /**
42981
- * 指标项
42982
- */
42983
- metricSourceTableItem: {
42984
- /**
42985
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=batch_update&version=v1 click to debug }
42986
- *
42987
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/batch_update document }
42988
- *
42989
- * 批量更新指标项
42990
- *
42991
- * - 该接口用于批量更新多项指标,单次调用最多更新 100 条记录。接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
42992
- */
42993
- batchUpdate: (payload, options) => __awaiter(this, void 0, void 0, function* () {
42994
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
42995
- return this.httpInstance
42996
- .request({
42997
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/batch_update`, path),
42998
- method: "PATCH",
42999
- data,
43000
- params,
43001
- headers,
43002
- })
43003
- .catch((e) => {
43004
- this.logger.error(formatErrors(e));
43005
- throw e;
43006
- });
43007
- }),
43008
- /**
43009
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=get&version=v1 click to debug }
43010
- *
43011
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/get document }
43012
- *
43013
- * 获取指标项详情
43014
- *
43015
- * 获取某项指标的具体内容(仅限 OKR 企业版使用)
43016
- */
43017
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43018
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43019
- return this.httpInstance
43020
- .request({
43021
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
43022
- method: "GET",
43023
- data,
43024
- params,
43025
- headers,
43026
- })
43027
- .catch((e) => {
43028
- this.logger.error(formatErrors(e));
43029
- throw e;
43030
- });
43031
- }),
43032
- /**
43033
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=list&version=v1 click to debug }
43034
- *
43035
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/list document }
43036
- *
43037
- * 获取指标项
43038
- *
43039
- * 获取指定指标表下的所有指标项(仅限 OKR 企业版使用)
43040
- */
43041
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43042
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43043
- return this.httpInstance
43044
- .request({
43045
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items`, path),
43046
- method: "GET",
43047
- data,
43048
- params,
43049
- headers,
43050
- })
43051
- .catch((e) => {
43052
- this.logger.error(formatErrors(e));
43053
- throw e;
43054
- });
43055
- }),
43056
- /**
43057
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table.item&apiName=patch&version=v1 click to debug }
43058
- *
43059
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table-item/patch document }
43060
- *
43061
- * 更新指标项
43062
- *
43063
- * - 该接口用于更新某项指标,接口仅限 OKR 企业版使用。;; 更新成功后 OKR 系统会给以下人员发送消息通知:;; - 首次更新目标值的人员 ;; - 已经将指标添加为 KR、且本次目标值/起始值/支撑的上级有变更的人员,不包含仅更新了进度值的人员
43064
- */
43065
- patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43066
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43067
- return this.httpInstance
43068
- .request({
43069
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables/:metric_table_id/items/:metric_item_id`, path),
43070
- method: "PATCH",
43071
- data,
43072
- params,
43073
- headers,
43074
- })
43075
- .catch((e) => {
43076
- this.logger.error(formatErrors(e));
43077
- throw e;
43078
- });
43079
- }),
43080
- },
43081
- /**
43082
- * 指标表
43083
- */
43084
- metricSourceTable: {
43085
- /**
43086
- * {@link https://open.feishu.cn/api-explorer?project=okr&resource=metric_source.table&apiName=list&version=v1 click to debug }
43087
- *
43088
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/metric_source-table/list document }
43089
- *
43090
- * 获取指标表
43091
- *
43092
- * 获取指定指标库下有哪些指标表(仅限 OKR 企业版使用)
43093
- */
43094
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
43095
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
43096
- return this.httpInstance
43097
- .request({
43098
- url: fillApiPath(`${this.domain}/open-apis/okr/v1/metric_sources/:metric_source_id/tables`, path),
43099
- method: "GET",
43100
- data,
43101
- params,
43102
- headers,
43103
- })
43104
- .catch((e) => {
43105
- this.logger.error(formatErrors(e));
43106
- throw e;
43107
- });
43108
- }),
43109
- },
43110
45293
  /**
43111
45294
  * OKR
43112
45295
  */
@@ -47711,19 +49894,293 @@ class Client$7 extends Client$8 {
47711
49894
  return Iterable;
47712
49895
  }),
47713
49896
  /**
47714
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=list&version=v1 click to debug }
49897
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=list&version=v1 click to debug }
49898
+ *
49899
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list document }
49900
+ *
49901
+ * 获取评论列表
49902
+ *
49903
+ * 该接口用于查询任务评论列表,支持分页,最大值为100
49904
+ */
49905
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49906
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49907
+ return this.httpInstance
49908
+ .request({
49909
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path),
49910
+ method: "GET",
49911
+ data,
49912
+ params,
49913
+ headers,
49914
+ })
49915
+ .catch((e) => {
49916
+ this.logger.error(formatErrors(e));
49917
+ throw e;
49918
+ });
49919
+ }),
49920
+ /**
49921
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=update&version=v1 click to debug }
49922
+ *
49923
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/update document }
49924
+ *
49925
+ * 更新评论
49926
+ *
49927
+ * 该接口用于更新评论内容
49928
+ */
49929
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49930
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49931
+ return this.httpInstance
49932
+ .request({
49933
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path),
49934
+ method: "PUT",
49935
+ data,
49936
+ params,
49937
+ headers,
49938
+ })
49939
+ .catch((e) => {
49940
+ this.logger.error(formatErrors(e));
49941
+ throw e;
49942
+ });
49943
+ }),
49944
+ },
49945
+ /**
49946
+ * 关注人
49947
+ */
49948
+ taskFollower: {
49949
+ /**
49950
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=create&version=v1 click to debug }
49951
+ *
49952
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create document }
49953
+ *
49954
+ * 新增关注人
49955
+ *
49956
+ * 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
49957
+ */
49958
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49959
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49960
+ return this.httpInstance
49961
+ .request({
49962
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
49963
+ method: "POST",
49964
+ data,
49965
+ params,
49966
+ headers,
49967
+ })
49968
+ .catch((e) => {
49969
+ this.logger.error(formatErrors(e));
49970
+ throw e;
49971
+ });
49972
+ }),
49973
+ /**
49974
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=delete&version=v1 click to debug }
49975
+ *
49976
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/delete document }
49977
+ *
49978
+ * 删除关注人
49979
+ *
49980
+ * 该接口用于删除任务关注人
49981
+ */
49982
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49983
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49984
+ return this.httpInstance
49985
+ .request({
49986
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`, path),
49987
+ method: "DELETE",
49988
+ data,
49989
+ params,
49990
+ headers,
49991
+ })
49992
+ .catch((e) => {
49993
+ this.logger.error(formatErrors(e));
49994
+ throw e;
49995
+ });
49996
+ }),
49997
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
49998
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
49999
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
50000
+ const res = yield this.httpInstance
50001
+ .request({
50002
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50003
+ method: "GET",
50004
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
50005
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
50006
+ })
50007
+ .catch((e) => {
50008
+ this.logger.error(formatErrors(e));
50009
+ });
50010
+ return res;
50011
+ });
50012
+ const Iterable = {
50013
+ [Symbol.asyncIterator]() {
50014
+ return __asyncGenerator(this, arguments, function* _a() {
50015
+ let hasMore = true;
50016
+ let pageToken;
50017
+ while (hasMore) {
50018
+ try {
50019
+ const res = yield __await(sendRequest({
50020
+ headers,
50021
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
50022
+ data,
50023
+ }));
50024
+ const _b = get__default["default"](res, "data") || {}, {
50025
+ // @ts-ignore
50026
+ has_more,
50027
+ // @ts-ignore
50028
+ page_token,
50029
+ // @ts-ignore
50030
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
50031
+ yield yield __await(rest);
50032
+ hasMore = Boolean(has_more);
50033
+ pageToken = page_token || next_page_token;
50034
+ }
50035
+ catch (e) {
50036
+ yield yield __await(null);
50037
+ break;
50038
+ }
50039
+ }
50040
+ });
50041
+ },
50042
+ };
50043
+ return Iterable;
50044
+ }),
50045
+ /**
50046
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=list&version=v1 click to debug }
50047
+ *
50048
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list document }
50049
+ *
50050
+ * 获取任务关注人列表
50051
+ *
50052
+ * 该接口用于查询任务关注人列表,支持分页,最大值为50
50053
+ */
50054
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50055
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50056
+ return this.httpInstance
50057
+ .request({
50058
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50059
+ method: "GET",
50060
+ data,
50061
+ params,
50062
+ headers,
50063
+ })
50064
+ .catch((e) => {
50065
+ this.logger.error(formatErrors(e));
50066
+ throw e;
50067
+ });
50068
+ }),
50069
+ },
50070
+ /**
50071
+ * 提醒
50072
+ */
50073
+ taskReminder: {
50074
+ /**
50075
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=create&version=v1 click to debug }
50076
+ *
50077
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create document }
50078
+ *
50079
+ * 新增提醒时间
50080
+ *
50081
+ * 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移,但是偏移后的结果不能早于当前时间。
50082
+ */
50083
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50084
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50085
+ return this.httpInstance
50086
+ .request({
50087
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
50088
+ method: "POST",
50089
+ data,
50090
+ params,
50091
+ headers,
50092
+ })
50093
+ .catch((e) => {
50094
+ this.logger.error(formatErrors(e));
50095
+ throw e;
50096
+ });
50097
+ }),
50098
+ /**
50099
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=delete&version=v1 click to debug }
50100
+ *
50101
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/delete document }
50102
+ *
50103
+ * 删除提醒时间
50104
+ *
50105
+ * 删除提醒时间,返回结果状态
50106
+ */
50107
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50108
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50109
+ return this.httpInstance
50110
+ .request({
50111
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`, path),
50112
+ method: "DELETE",
50113
+ data,
50114
+ params,
50115
+ headers,
50116
+ })
50117
+ .catch((e) => {
50118
+ this.logger.error(formatErrors(e));
50119
+ throw e;
50120
+ });
50121
+ }),
50122
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50123
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
50124
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
50125
+ const res = yield this.httpInstance
50126
+ .request({
50127
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
50128
+ method: "GET",
50129
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
50130
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
50131
+ })
50132
+ .catch((e) => {
50133
+ this.logger.error(formatErrors(e));
50134
+ });
50135
+ return res;
50136
+ });
50137
+ const Iterable = {
50138
+ [Symbol.asyncIterator]() {
50139
+ return __asyncGenerator(this, arguments, function* _a() {
50140
+ let hasMore = true;
50141
+ let pageToken;
50142
+ while (hasMore) {
50143
+ try {
50144
+ const res = yield __await(sendRequest({
50145
+ headers,
50146
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
50147
+ data,
50148
+ }));
50149
+ const _b = get__default["default"](res, "data") || {}, {
50150
+ // @ts-ignore
50151
+ has_more,
50152
+ // @ts-ignore
50153
+ page_token,
50154
+ // @ts-ignore
50155
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
50156
+ yield yield __await(rest);
50157
+ hasMore = Boolean(has_more);
50158
+ pageToken = page_token || next_page_token;
50159
+ }
50160
+ catch (e) {
50161
+ yield yield __await(null);
50162
+ break;
50163
+ }
50164
+ }
50165
+ });
50166
+ },
50167
+ };
50168
+ return Iterable;
50169
+ }),
50170
+ /**
50171
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=list&version=v1 click to debug }
47715
50172
  *
47716
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list document }
50173
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list document }
47717
50174
  *
47718
- * 获取评论列表
50175
+ * 查询提醒时间列表
47719
50176
  *
47720
- * 该接口用于查询任务评论列表,支持分页,最大值为100
50177
+ * 返回提醒时间列表,支持分页,最大值为50
47721
50178
  */
47722
50179
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47723
50180
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47724
50181
  return this.httpInstance
47725
50182
  .request({
47726
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments`, path),
50183
+ url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
47727
50184
  method: "GET",
47728
50185
  data,
47729
50186
  params,
@@ -47734,50 +50191,24 @@ class Client$7 extends Client$8 {
47734
50191
  throw e;
47735
50192
  });
47736
50193
  }),
47737
- /**
47738
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.comment&apiName=update&version=v1 click to debug }
47739
- *
47740
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/update document }
47741
- *
47742
- * 更新评论
47743
- *
47744
- * 该接口用于更新评论内容
47745
- */
47746
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47747
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47748
- return this.httpInstance
47749
- .request({
47750
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/comments/:comment_id`, path),
47751
- method: "PUT",
47752
- data,
47753
- params,
47754
- headers,
47755
- })
47756
- .catch((e) => {
47757
- this.logger.error(formatErrors(e));
47758
- throw e;
47759
- });
47760
- }),
47761
50194
  },
50195
+ },
50196
+ v2: {
47762
50197
  /**
47763
- * 关注人
50198
+ * attachment
47764
50199
  */
47765
- taskFollower: {
50200
+ attachment: {
47766
50201
  /**
47767
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=create&version=v1 click to debug }
47768
- *
47769
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create document }
47770
- *
47771
- * 新增关注人
50202
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=delete&version=v2 click to debug }
47772
50203
  *
47773
- * 该接口用于创建任务关注人。可以一次性添加多位关注人。关注人ID要使用表示用户的ID。
50204
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=attachment&version=v2 document }
47774
50205
  */
47775
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50206
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47776
50207
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47777
50208
  return this.httpInstance
47778
50209
  .request({
47779
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
47780
- method: "POST",
50210
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`, path),
50211
+ method: "DELETE",
47781
50212
  data,
47782
50213
  params,
47783
50214
  headers,
@@ -47788,20 +50219,16 @@ class Client$7 extends Client$8 {
47788
50219
  });
47789
50220
  }),
47790
50221
  /**
47791
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=delete&version=v1 click to debug }
47792
- *
47793
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/delete document }
47794
- *
47795
- * 删除关注人
50222
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=get&version=v2 click to debug }
47796
50223
  *
47797
- * 该接口用于删除任务关注人
50224
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=attachment&version=v2 document }
47798
50225
  */
47799
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50226
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47800
50227
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47801
50228
  return this.httpInstance
47802
50229
  .request({
47803
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers/:follower_id`, path),
47804
- method: "DELETE",
50230
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/:attachment_guid`, path),
50231
+ method: "GET",
47805
50232
  data,
47806
50233
  params,
47807
50234
  headers,
@@ -47816,7 +50243,7 @@ class Client$7 extends Client$8 {
47816
50243
  const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
47817
50244
  const res = yield this.httpInstance
47818
50245
  .request({
47819
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50246
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments`, path),
47820
50247
  method: "GET",
47821
50248
  headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
47822
50249
  params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
@@ -47860,19 +50287,15 @@ class Client$7 extends Client$8 {
47860
50287
  return Iterable;
47861
50288
  }),
47862
50289
  /**
47863
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.follower&apiName=list&version=v1 click to debug }
47864
- *
47865
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list document }
50290
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=list&version=v2 click to debug }
47866
50291
  *
47867
- * 获取任务关注人列表
47868
- *
47869
- * 该接口用于查询任务关注人列表,支持分页,最大值为50
50292
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=attachment&version=v2 document }
47870
50293
  */
47871
50294
  list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47872
50295
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47873
50296
  return this.httpInstance
47874
50297
  .request({
47875
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/followers`, path),
50298
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments`, path),
47876
50299
  method: "GET",
47877
50300
  data,
47878
50301
  params,
@@ -47883,134 +50306,28 @@ class Client$7 extends Client$8 {
47883
50306
  throw e;
47884
50307
  });
47885
50308
  }),
47886
- },
47887
- /**
47888
- * 提醒
47889
- */
47890
- taskReminder: {
47891
50309
  /**
47892
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=create&version=v1 click to debug }
47893
- *
47894
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create document }
50310
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=attachment&apiName=upload&version=v2 click to debug }
47895
50311
  *
47896
- * 新增提醒时间
47897
- *
47898
- * 该接口用于创建任务的提醒时间。提醒时间在截止时间基础上做偏移,但是偏移后的结果不能早于当前时间。
50312
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload&project=task&resource=attachment&version=v2 document }
47899
50313
  */
47900
- create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
50314
+ upload: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47901
50315
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
47902
- return this.httpInstance
50316
+ const res = yield this.httpInstance
47903
50317
  .request({
47904
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
50318
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/attachments/upload`, path),
47905
50319
  method: "POST",
47906
50320
  data,
47907
50321
  params,
47908
- headers,
47909
- })
47910
- .catch((e) => {
47911
- this.logger.error(formatErrors(e));
47912
- throw e;
47913
- });
47914
- }),
47915
- /**
47916
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=delete&version=v1 click to debug }
47917
- *
47918
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/delete document }
47919
- *
47920
- * 删除提醒时间
47921
- *
47922
- * 删除提醒时间,返回结果状态
47923
- */
47924
- delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47925
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47926
- return this.httpInstance
47927
- .request({
47928
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders/:reminder_id`, path),
47929
- method: "DELETE",
47930
- data,
47931
- params,
47932
- headers,
47933
- })
47934
- .catch((e) => {
47935
- this.logger.error(formatErrors(e));
47936
- throw e;
47937
- });
47938
- }),
47939
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47940
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47941
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
47942
- const res = yield this.httpInstance
47943
- .request({
47944
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
47945
- method: "GET",
47946
- headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
47947
- params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
47948
- })
47949
- .catch((e) => {
47950
- this.logger.error(formatErrors(e));
47951
- });
47952
- return res;
47953
- });
47954
- const Iterable = {
47955
- [Symbol.asyncIterator]() {
47956
- return __asyncGenerator(this, arguments, function* _a() {
47957
- let hasMore = true;
47958
- let pageToken;
47959
- while (hasMore) {
47960
- try {
47961
- const res = yield __await(sendRequest({
47962
- headers,
47963
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
47964
- data,
47965
- }));
47966
- const _b = get__default["default"](res, "data") || {}, {
47967
- // @ts-ignore
47968
- has_more,
47969
- // @ts-ignore
47970
- page_token,
47971
- // @ts-ignore
47972
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
47973
- yield yield __await(rest);
47974
- hasMore = Boolean(has_more);
47975
- pageToken = page_token || next_page_token;
47976
- }
47977
- catch (e) {
47978
- yield yield __await(null);
47979
- break;
47980
- }
47981
- }
47982
- });
47983
- },
47984
- };
47985
- return Iterable;
47986
- }),
47987
- /**
47988
- * {@link https://open.feishu.cn/api-explorer?project=task&resource=task.reminder&apiName=list&version=v1 click to debug }
47989
- *
47990
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list document }
47991
- *
47992
- * 查询提醒时间列表
47993
- *
47994
- * 返回提醒时间列表,支持分页,最大值为50
47995
- */
47996
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
47997
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
47998
- return this.httpInstance
47999
- .request({
48000
- url: fillApiPath(`${this.domain}/open-apis/task/v1/tasks/:task_id/reminders`, path),
48001
- method: "GET",
48002
- data,
48003
- params,
48004
- headers,
50322
+ headers: Object.assign(Object.assign({}, headers), { "Content-Type": "multipart/form-data" }),
48005
50323
  })
48006
50324
  .catch((e) => {
48007
50325
  this.logger.error(formatErrors(e));
48008
50326
  throw e;
48009
50327
  });
50328
+ return get__default["default"](res, "data", null);
48010
50329
  }),
48011
50330
  },
48012
- },
48013
- v2: {
48014
50331
  /**
48015
50332
  * comment
48016
50333
  */
@@ -49029,6 +51346,111 @@ class Client$7 extends Client$8 {
49029
51346
  });
49030
51347
  }),
49031
51348
  },
51349
+ /**
51350
+ * tasklist.activity_subscription
51351
+ */
51352
+ tasklistActivitySubscription: {
51353
+ /**
51354
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=create&version=v2 click to debug }
51355
+ *
51356
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=task&resource=tasklist.activity_subscription&version=v2 document }
51357
+ */
51358
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51359
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51360
+ return this.httpInstance
51361
+ .request({
51362
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`, path),
51363
+ method: "POST",
51364
+ data,
51365
+ params,
51366
+ headers,
51367
+ })
51368
+ .catch((e) => {
51369
+ this.logger.error(formatErrors(e));
51370
+ throw e;
51371
+ });
51372
+ }),
51373
+ /**
51374
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=delete&version=v2 click to debug }
51375
+ *
51376
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=task&resource=tasklist.activity_subscription&version=v2 document }
51377
+ */
51378
+ delete: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51379
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51380
+ return this.httpInstance
51381
+ .request({
51382
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path),
51383
+ method: "DELETE",
51384
+ data,
51385
+ params,
51386
+ headers,
51387
+ })
51388
+ .catch((e) => {
51389
+ this.logger.error(formatErrors(e));
51390
+ throw e;
51391
+ });
51392
+ }),
51393
+ /**
51394
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=get&version=v2 click to debug }
51395
+ *
51396
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=task&resource=tasklist.activity_subscription&version=v2 document }
51397
+ */
51398
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51399
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51400
+ return this.httpInstance
51401
+ .request({
51402
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path),
51403
+ method: "GET",
51404
+ data,
51405
+ params,
51406
+ headers,
51407
+ })
51408
+ .catch((e) => {
51409
+ this.logger.error(formatErrors(e));
51410
+ throw e;
51411
+ });
51412
+ }),
51413
+ /**
51414
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=list&version=v2 click to debug }
51415
+ *
51416
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=task&resource=tasklist.activity_subscription&version=v2 document }
51417
+ */
51418
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51419
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51420
+ return this.httpInstance
51421
+ .request({
51422
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions`, path),
51423
+ method: "GET",
51424
+ data,
51425
+ params,
51426
+ headers,
51427
+ })
51428
+ .catch((e) => {
51429
+ this.logger.error(formatErrors(e));
51430
+ throw e;
51431
+ });
51432
+ }),
51433
+ /**
51434
+ * {@link https://open.feishu.cn/api-explorer?project=task&resource=tasklist.activity_subscription&apiName=patch&version=v2 click to debug }
51435
+ *
51436
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=task&resource=tasklist.activity_subscription&version=v2 document }
51437
+ */
51438
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
51439
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
51440
+ return this.httpInstance
51441
+ .request({
51442
+ url: fillApiPath(`${this.domain}/open-apis/task/v2/tasklists/:tasklist_guid/activity_subscriptions/:activity_subscription_guid`, path),
51443
+ method: "PATCH",
51444
+ data,
51445
+ params,
51446
+ headers,
51447
+ })
51448
+ .catch((e) => {
51449
+ this.logger.error(formatErrors(e));
51450
+ throw e;
51451
+ });
51452
+ }),
51453
+ },
49032
51454
  /**
49033
51455
  * tasklist
49034
51456
  */