@larksuiteoapi/node-sdk 1.52.0 → 1.54.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 +216 -16
  2. package/lib/index.js +216 -16
  3. package/package.json +1 -1
  4. package/types/index.d.ts +12062 -5646
package/lib/index.js CHANGED
@@ -1348,7 +1348,7 @@ class Client$15 extends Client$16 {
1348
1348
  constructor() {
1349
1349
  super(...arguments);
1350
1350
  /**
1351
- * 管理后台-企业勋章
1351
+ * 管理后台-行为审计
1352
1352
  */
1353
1353
  this.admin = {
1354
1354
  /**
@@ -3241,6 +3241,84 @@ class Client$13 extends Client$14 {
3241
3241
  */
3242
3242
  this.apaas = {
3243
3243
  v1: {
3244
+ /**
3245
+ * app
3246
+ */
3247
+ app: {
3248
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3249
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3250
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
3251
+ const res = yield this.httpInstance
3252
+ .request({
3253
+ url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
3254
+ method: "GET",
3255
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
3256
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
3257
+ data,
3258
+ paramsSerializer: (params) => qs.stringify(params, {
3259
+ arrayFormat: "repeat",
3260
+ }),
3261
+ })
3262
+ .catch((e) => {
3263
+ this.logger.error(formatErrors(e));
3264
+ });
3265
+ return res;
3266
+ });
3267
+ const Iterable = {
3268
+ [Symbol.asyncIterator]() {
3269
+ return __asyncGenerator(this, arguments, function* _a() {
3270
+ let hasMore = true;
3271
+ let pageToken;
3272
+ while (hasMore) {
3273
+ try {
3274
+ const res = yield __await(sendRequest({
3275
+ headers,
3276
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
3277
+ data,
3278
+ }));
3279
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
3280
+ // @ts-ignore
3281
+ has_more,
3282
+ // @ts-ignore
3283
+ page_token,
3284
+ // @ts-ignore
3285
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
3286
+ yield yield __await(rest);
3287
+ hasMore = Boolean(has_more);
3288
+ pageToken = page_token || next_page_token;
3289
+ }
3290
+ catch (e) {
3291
+ yield yield __await(null);
3292
+ break;
3293
+ }
3294
+ }
3295
+ });
3296
+ },
3297
+ };
3298
+ return Iterable;
3299
+ }),
3300
+ /**
3301
+ * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=app&apiName=list&version=v1 click to debug }
3302
+ *
3303
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=app&version=v1 document }
3304
+ */
3305
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3306
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3307
+ return this.httpInstance
3308
+ .request({
3309
+ url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
3310
+ method: "GET",
3311
+ data,
3312
+ params,
3313
+ headers,
3314
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
3315
+ })
3316
+ .catch((e) => {
3317
+ this.logger.error(formatErrors(e));
3318
+ throw e;
3319
+ });
3320
+ }),
3321
+ },
3244
3322
  /**
3245
3323
  * application.audit_log
3246
3324
  */
@@ -4644,7 +4722,7 @@ class Client$12 extends Client$13 {
4644
4722
  }),
4645
4723
  },
4646
4724
  /**
4647
- * 应用管理
4725
+ * 应用
4648
4726
  */
4649
4727
  application: {
4650
4728
  /**
@@ -5498,7 +5576,7 @@ class Client$12 extends Client$13 {
5498
5576
  }),
5499
5577
  },
5500
5578
  /**
5501
- * 应用管理
5579
+ * 应用
5502
5580
  */
5503
5581
  application: {
5504
5582
  /**
@@ -5942,7 +6020,7 @@ class Client$11 extends Client$12 {
5942
6020
  */
5943
6021
  this.approval = {
5944
6022
  /**
5945
- * 原生审批定义
6023
+ * 事件
5946
6024
  */
5947
6025
  approval: {
5948
6026
  /**
@@ -6945,7 +7023,7 @@ class Client$11 extends Client$12 {
6945
7023
  },
6946
7024
  v4: {
6947
7025
  /**
6948
- * 原生审批定义
7026
+ * 事件
6949
7027
  */
6950
7028
  approval: {
6951
7029
  /**
@@ -12185,7 +12263,7 @@ class Client$W extends Client$X {
12185
12263
  constructor() {
12186
12264
  super(...arguments);
12187
12265
  /**
12188
- * 云文档-电子表格
12266
+ * 云文档-多维表格
12189
12267
  */
12190
12268
  this.bitable = {
12191
12269
  /**
@@ -33153,7 +33231,7 @@ class Client$M extends Client$N {
33153
33231
  *
33154
33232
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
33155
33233
  *
33156
- * 通过序列 ID 批量获取序列信息
33234
+ * 批量获取序列信息
33157
33235
  */
33158
33236
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33159
33237
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -33424,7 +33502,7 @@ class Client$M extends Client$N {
33424
33502
  *
33425
33503
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
33426
33504
  *
33427
- * 通过职级 ID 批量获取职级信息
33505
+ * 批量获取职级信息
33428
33506
  */
33429
33507
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33430
33508
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -36704,6 +36782,27 @@ class Client$H extends Client$I {
36704
36782
  * 文档
36705
36783
  */
36706
36784
  document: {
36785
+ /**
36786
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
36787
+ *
36788
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
36789
+ */
36790
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36791
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36792
+ return this.httpInstance
36793
+ .request({
36794
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
36795
+ method: "POST",
36796
+ data,
36797
+ params,
36798
+ headers,
36799
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
36800
+ })
36801
+ .catch((e) => {
36802
+ this.logger.error(formatErrors(e));
36803
+ throw e;
36804
+ });
36805
+ }),
36707
36806
  /**
36708
36807
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
36709
36808
  *
@@ -37354,6 +37453,27 @@ class Client$H extends Client$I {
37354
37453
  * 文档
37355
37454
  */
37356
37455
  document: {
37456
+ /**
37457
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
37458
+ *
37459
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
37460
+ */
37461
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
37462
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
37463
+ return this.httpInstance
37464
+ .request({
37465
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
37466
+ method: "POST",
37467
+ data,
37468
+ params,
37469
+ headers,
37470
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
37471
+ })
37472
+ .catch((e) => {
37473
+ this.logger.error(formatErrors(e));
37474
+ throw e;
37475
+ });
37476
+ }),
37357
37477
  /**
37358
37478
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
37359
37479
  *
@@ -37875,7 +37995,7 @@ class Client$G extends Client$H {
37875
37995
  }),
37876
37996
  },
37877
37997
  /**
37878
- * 文件
37998
+ * 文件夹
37879
37999
  */
37880
38000
  file: {
37881
38001
  /**
@@ -38750,7 +38870,7 @@ class Client$G extends Client$H {
38750
38870
  }),
38751
38871
  },
38752
38872
  /**
38753
- * 分片上传
38873
+ * 素材
38754
38874
  */
38755
38875
  media: {
38756
38876
  /**
@@ -39701,7 +39821,7 @@ class Client$G extends Client$H {
39701
39821
  }),
39702
39822
  },
39703
39823
  /**
39704
- * 文件
39824
+ * 文件夹
39705
39825
  */
39706
39826
  file: {
39707
39827
  /**
@@ -40582,7 +40702,7 @@ class Client$G extends Client$H {
40582
40702
  }),
40583
40703
  },
40584
40704
  /**
40585
- * 分片上传
40705
+ * 素材
40586
40706
  */
40587
40707
  media: {
40588
40708
  /**
@@ -58506,7 +58626,7 @@ class Client$v extends Client$w {
58506
58626
  }),
58507
58627
  },
58508
58628
  /**
58509
- * 消息
58629
+ * 消息加急
58510
58630
  */
58511
58631
  message: {
58512
58632
  /**
@@ -60715,7 +60835,7 @@ class Client$v extends Client$w {
60715
60835
  }),
60716
60836
  },
60717
60837
  /**
60718
- * 消息
60838
+ * 消息加急
60719
60839
  */
60720
60840
  message: {
60721
60841
  /**
@@ -68041,6 +68161,86 @@ class Client$l extends Client$m {
68041
68161
  });
68042
68162
  }),
68043
68163
  },
68164
+ /**
68165
+ * cost_allocation_detail
68166
+ */
68167
+ costAllocationDetail: {
68168
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
68169
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
68170
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
68171
+ const res = yield this.httpInstance
68172
+ .request({
68173
+ url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
68174
+ method: "GET",
68175
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
68176
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
68177
+ data,
68178
+ paramsSerializer: (params) => qs.stringify(params, {
68179
+ arrayFormat: "repeat",
68180
+ }),
68181
+ })
68182
+ .catch((e) => {
68183
+ this.logger.error(formatErrors(e));
68184
+ });
68185
+ return res;
68186
+ });
68187
+ const Iterable = {
68188
+ [Symbol.asyncIterator]() {
68189
+ return __asyncGenerator(this, arguments, function* _a() {
68190
+ let hasMore = true;
68191
+ let pageToken;
68192
+ while (hasMore) {
68193
+ try {
68194
+ const res = yield __await(sendRequest({
68195
+ headers,
68196
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
68197
+ data,
68198
+ }));
68199
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
68200
+ // @ts-ignore
68201
+ has_more,
68202
+ // @ts-ignore
68203
+ page_token,
68204
+ // @ts-ignore
68205
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
68206
+ yield yield __await(rest);
68207
+ hasMore = Boolean(has_more);
68208
+ pageToken = page_token || next_page_token;
68209
+ }
68210
+ catch (e) {
68211
+ yield yield __await(null);
68212
+ break;
68213
+ }
68214
+ }
68215
+ });
68216
+ },
68217
+ };
68218
+ return Iterable;
68219
+ }),
68220
+ /**
68221
+ * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_detail&apiName=list&version=v1 click to debug }
68222
+ *
68223
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_detail&version=v1 document }
68224
+ *
68225
+ * 获取成本分摊报表明细数据
68226
+ */
68227
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
68228
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
68229
+ return this.httpInstance
68230
+ .request({
68231
+ url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
68232
+ method: "GET",
68233
+ data,
68234
+ params,
68235
+ headers,
68236
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
68237
+ })
68238
+ .catch((e) => {
68239
+ this.logger.error(formatErrors(e));
68240
+ throw e;
68241
+ });
68242
+ }),
68243
+ },
68044
68244
  /**
68045
68245
  * cost_allocation_plan
68046
68246
  */
@@ -71383,7 +71583,7 @@ class Client$c extends Client$d {
71383
71583
  }),
71384
71584
  },
71385
71585
  /**
71386
- * 单元格
71586
+ * 工作表
71387
71587
  */
71388
71588
  spreadsheetSheet: {
71389
71589
  /**
@@ -72113,7 +72313,7 @@ class Client$c extends Client$d {
72113
72313
  }),
72114
72314
  },
72115
72315
  /**
72116
- * 单元格
72316
+ * 工作表
72117
72317
  */
72118
72318
  spreadsheetSheet: {
72119
72319
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larksuiteoapi/node-sdk",
3
- "version": "1.52.0",
3
+ "version": "1.54.0",
4
4
  "description": "larksuite open sdk for nodejs",
5
5
  "keywords": [
6
6
  "feishu",