@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/es/index.js CHANGED
@@ -1333,7 +1333,7 @@ class Client$15 extends Client$16 {
1333
1333
  constructor() {
1334
1334
  super(...arguments);
1335
1335
  /**
1336
- * 管理后台-企业勋章
1336
+ * 管理后台-行为审计
1337
1337
  */
1338
1338
  this.admin = {
1339
1339
  /**
@@ -3226,6 +3226,84 @@ class Client$13 extends Client$14 {
3226
3226
  */
3227
3227
  this.apaas = {
3228
3228
  v1: {
3229
+ /**
3230
+ * app
3231
+ */
3232
+ app: {
3233
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3234
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3235
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
3236
+ const res = yield this.httpInstance
3237
+ .request({
3238
+ url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
3239
+ method: "GET",
3240
+ headers: pickBy(innerPayload.headers, identity),
3241
+ params: pickBy(innerPayload.params, identity),
3242
+ data,
3243
+ paramsSerializer: (params) => stringify(params, {
3244
+ arrayFormat: "repeat",
3245
+ }),
3246
+ })
3247
+ .catch((e) => {
3248
+ this.logger.error(formatErrors(e));
3249
+ });
3250
+ return res;
3251
+ });
3252
+ const Iterable = {
3253
+ [Symbol.asyncIterator]() {
3254
+ return __asyncGenerator(this, arguments, function* _a() {
3255
+ let hasMore = true;
3256
+ let pageToken;
3257
+ while (hasMore) {
3258
+ try {
3259
+ const res = yield __await(sendRequest({
3260
+ headers,
3261
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
3262
+ data,
3263
+ }));
3264
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
3265
+ // @ts-ignore
3266
+ has_more,
3267
+ // @ts-ignore
3268
+ page_token,
3269
+ // @ts-ignore
3270
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
3271
+ yield yield __await(rest);
3272
+ hasMore = Boolean(has_more);
3273
+ pageToken = page_token || next_page_token;
3274
+ }
3275
+ catch (e) {
3276
+ yield yield __await(null);
3277
+ break;
3278
+ }
3279
+ }
3280
+ });
3281
+ },
3282
+ };
3283
+ return Iterable;
3284
+ }),
3285
+ /**
3286
+ * {@link https://open.feishu.cn/api-explorer?project=apaas&resource=app&apiName=list&version=v1 click to debug }
3287
+ *
3288
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=app&version=v1 document }
3289
+ */
3290
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3291
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3292
+ return this.httpInstance
3293
+ .request({
3294
+ url: fillApiPath(`${this.domain}/open-apis/apaas/v1/apps`, path),
3295
+ method: "GET",
3296
+ data,
3297
+ params,
3298
+ headers,
3299
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
3300
+ })
3301
+ .catch((e) => {
3302
+ this.logger.error(formatErrors(e));
3303
+ throw e;
3304
+ });
3305
+ }),
3306
+ },
3229
3307
  /**
3230
3308
  * application.audit_log
3231
3309
  */
@@ -4629,7 +4707,7 @@ class Client$12 extends Client$13 {
4629
4707
  }),
4630
4708
  },
4631
4709
  /**
4632
- * 应用管理
4710
+ * 应用
4633
4711
  */
4634
4712
  application: {
4635
4713
  /**
@@ -5483,7 +5561,7 @@ class Client$12 extends Client$13 {
5483
5561
  }),
5484
5562
  },
5485
5563
  /**
5486
- * 应用管理
5564
+ * 应用
5487
5565
  */
5488
5566
  application: {
5489
5567
  /**
@@ -5927,7 +6005,7 @@ class Client$11 extends Client$12 {
5927
6005
  */
5928
6006
  this.approval = {
5929
6007
  /**
5930
- * 原生审批定义
6008
+ * 事件
5931
6009
  */
5932
6010
  approval: {
5933
6011
  /**
@@ -6930,7 +7008,7 @@ class Client$11 extends Client$12 {
6930
7008
  },
6931
7009
  v4: {
6932
7010
  /**
6933
- * 原生审批定义
7011
+ * 事件
6934
7012
  */
6935
7013
  approval: {
6936
7014
  /**
@@ -12170,7 +12248,7 @@ class Client$W extends Client$X {
12170
12248
  constructor() {
12171
12249
  super(...arguments);
12172
12250
  /**
12173
- * 云文档-电子表格
12251
+ * 云文档-多维表格
12174
12252
  */
12175
12253
  this.bitable = {
12176
12254
  /**
@@ -33138,7 +33216,7 @@ class Client$M extends Client$N {
33138
33216
  *
33139
33217
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
33140
33218
  *
33141
- * 通过序列 ID 批量获取序列信息
33219
+ * 批量获取序列信息
33142
33220
  */
33143
33221
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33144
33222
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -33409,7 +33487,7 @@ class Client$M extends Client$N {
33409
33487
  *
33410
33488
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
33411
33489
  *
33412
- * 通过职级 ID 批量获取职级信息
33490
+ * 批量获取职级信息
33413
33491
  */
33414
33492
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33415
33493
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -36689,6 +36767,27 @@ class Client$H extends Client$I {
36689
36767
  * 文档
36690
36768
  */
36691
36769
  document: {
36770
+ /**
36771
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
36772
+ *
36773
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
36774
+ */
36775
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36776
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36777
+ return this.httpInstance
36778
+ .request({
36779
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
36780
+ method: "POST",
36781
+ data,
36782
+ params,
36783
+ headers,
36784
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36785
+ })
36786
+ .catch((e) => {
36787
+ this.logger.error(formatErrors(e));
36788
+ throw e;
36789
+ });
36790
+ }),
36692
36791
  /**
36693
36792
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
36694
36793
  *
@@ -37339,6 +37438,27 @@ class Client$H extends Client$I {
37339
37438
  * 文档
37340
37439
  */
37341
37440
  document: {
37441
+ /**
37442
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
37443
+ *
37444
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
37445
+ */
37446
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
37447
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
37448
+ return this.httpInstance
37449
+ .request({
37450
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
37451
+ method: "POST",
37452
+ data,
37453
+ params,
37454
+ headers,
37455
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
37456
+ })
37457
+ .catch((e) => {
37458
+ this.logger.error(formatErrors(e));
37459
+ throw e;
37460
+ });
37461
+ }),
37342
37462
  /**
37343
37463
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
37344
37464
  *
@@ -37860,7 +37980,7 @@ class Client$G extends Client$H {
37860
37980
  }),
37861
37981
  },
37862
37982
  /**
37863
- * 文件
37983
+ * 文件夹
37864
37984
  */
37865
37985
  file: {
37866
37986
  /**
@@ -38735,7 +38855,7 @@ class Client$G extends Client$H {
38735
38855
  }),
38736
38856
  },
38737
38857
  /**
38738
- * 分片上传
38858
+ * 素材
38739
38859
  */
38740
38860
  media: {
38741
38861
  /**
@@ -39686,7 +39806,7 @@ class Client$G extends Client$H {
39686
39806
  }),
39687
39807
  },
39688
39808
  /**
39689
- * 文件
39809
+ * 文件夹
39690
39810
  */
39691
39811
  file: {
39692
39812
  /**
@@ -40567,7 +40687,7 @@ class Client$G extends Client$H {
40567
40687
  }),
40568
40688
  },
40569
40689
  /**
40570
- * 分片上传
40690
+ * 素材
40571
40691
  */
40572
40692
  media: {
40573
40693
  /**
@@ -58491,7 +58611,7 @@ class Client$v extends Client$w {
58491
58611
  }),
58492
58612
  },
58493
58613
  /**
58494
- * 消息
58614
+ * 消息加急
58495
58615
  */
58496
58616
  message: {
58497
58617
  /**
@@ -60700,7 +60820,7 @@ class Client$v extends Client$w {
60700
60820
  }),
60701
60821
  },
60702
60822
  /**
60703
- * 消息
60823
+ * 消息加急
60704
60824
  */
60705
60825
  message: {
60706
60826
  /**
@@ -68026,6 +68146,86 @@ class Client$l extends Client$m {
68026
68146
  });
68027
68147
  }),
68028
68148
  },
68149
+ /**
68150
+ * cost_allocation_detail
68151
+ */
68152
+ costAllocationDetail: {
68153
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
68154
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
68155
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
68156
+ const res = yield this.httpInstance
68157
+ .request({
68158
+ url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
68159
+ method: "GET",
68160
+ headers: pickBy(innerPayload.headers, identity),
68161
+ params: pickBy(innerPayload.params, identity),
68162
+ data,
68163
+ paramsSerializer: (params) => stringify(params, {
68164
+ arrayFormat: "repeat",
68165
+ }),
68166
+ })
68167
+ .catch((e) => {
68168
+ this.logger.error(formatErrors(e));
68169
+ });
68170
+ return res;
68171
+ });
68172
+ const Iterable = {
68173
+ [Symbol.asyncIterator]() {
68174
+ return __asyncGenerator(this, arguments, function* _a() {
68175
+ let hasMore = true;
68176
+ let pageToken;
68177
+ while (hasMore) {
68178
+ try {
68179
+ const res = yield __await(sendRequest({
68180
+ headers,
68181
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
68182
+ data,
68183
+ }));
68184
+ const _b = (res === null || res === void 0 ? void 0 : res.data) || {}, {
68185
+ // @ts-ignore
68186
+ has_more,
68187
+ // @ts-ignore
68188
+ page_token,
68189
+ // @ts-ignore
68190
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
68191
+ yield yield __await(rest);
68192
+ hasMore = Boolean(has_more);
68193
+ pageToken = page_token || next_page_token;
68194
+ }
68195
+ catch (e) {
68196
+ yield yield __await(null);
68197
+ break;
68198
+ }
68199
+ }
68200
+ });
68201
+ },
68202
+ };
68203
+ return Iterable;
68204
+ }),
68205
+ /**
68206
+ * {@link https://open.feishu.cn/api-explorer?project=payroll&resource=cost_allocation_detail&apiName=list&version=v1 click to debug }
68207
+ *
68208
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=payroll&resource=cost_allocation_detail&version=v1 document }
68209
+ *
68210
+ * 获取成本分摊报表明细数据
68211
+ */
68212
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
68213
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
68214
+ return this.httpInstance
68215
+ .request({
68216
+ url: fillApiPath(`${this.domain}/open-apis/payroll/v1/cost_allocation_details`, path),
68217
+ method: "GET",
68218
+ data,
68219
+ params,
68220
+ headers,
68221
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
68222
+ })
68223
+ .catch((e) => {
68224
+ this.logger.error(formatErrors(e));
68225
+ throw e;
68226
+ });
68227
+ }),
68228
+ },
68029
68229
  /**
68030
68230
  * cost_allocation_plan
68031
68231
  */
@@ -71368,7 +71568,7 @@ class Client$c extends Client$d {
71368
71568
  }),
71369
71569
  },
71370
71570
  /**
71371
- * 单元格
71571
+ * 工作表
71372
71572
  */
71373
71573
  spreadsheetSheet: {
71374
71574
  /**
@@ -72098,7 +72298,7 @@ class Client$c extends Client$d {
72098
72298
  }),
72099
72299
  },
72100
72300
  /**
72101
- * 单元格
72301
+ * 工作表
72102
72302
  */
72103
72303
  spreadsheetSheet: {
72104
72304
  /**