@larksuiteoapi/node-sdk 1.20.0 → 1.21.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 +196 -105
  2. package/lib/index.js +196 -105
  3. package/package.json +1 -1
  4. package/types/index.d.ts +1087 -400
package/lib/index.js CHANGED
@@ -585,7 +585,7 @@ class Client$1 {
585
585
  },
586
586
  };
587
587
  /**
588
- * 管理后台-企业勋章
588
+ * 管理后台-数据报表
589
589
  */
590
590
  this.admin = {
591
591
  /**
@@ -1317,6 +1317,31 @@ class Client$1 {
1317
1317
  });
1318
1318
  }),
1319
1319
  },
1320
+ /**
1321
+ * application.contacts_range
1322
+ */
1323
+ applicationContactsRange: {
1324
+ /**
1325
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.contacts_range&apiName=patch&version=v6 click to debug }
1326
+ *
1327
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.contacts_range&version=v6 document }
1328
+ */
1329
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1330
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1331
+ return this.httpInstance
1332
+ .request({
1333
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/contacts_range`, path),
1334
+ method: "PATCH",
1335
+ data,
1336
+ params,
1337
+ headers,
1338
+ })
1339
+ .catch((e) => {
1340
+ this.logger.error(formatErrors(e));
1341
+ throw e;
1342
+ });
1343
+ }),
1344
+ },
1320
1345
  /**
1321
1346
  * 应用
1322
1347
  */
@@ -1539,6 +1564,26 @@ class Client$1 {
1539
1564
  throw e;
1540
1565
  });
1541
1566
  }),
1567
+ /**
1568
+ * {@link https://open.feishu.cn/api-explorer?project=application&resource=application.visibility&apiName=patch&version=v6 click to debug }
1569
+ *
1570
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=application&resource=application.visibility&version=v6 document }
1571
+ */
1572
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
1573
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
1574
+ return this.httpInstance
1575
+ .request({
1576
+ url: fillApiPath(`${this.domain}/open-apis/application/v6/applications/:app_id/visibility`, path),
1577
+ method: "PATCH",
1578
+ data,
1579
+ params,
1580
+ headers,
1581
+ })
1582
+ .catch((e) => {
1583
+ this.logger.error(formatErrors(e));
1584
+ throw e;
1585
+ });
1586
+ }),
1542
1587
  },
1543
1588
  };
1544
1589
  /**
@@ -1546,7 +1591,7 @@ class Client$1 {
1546
1591
  */
1547
1592
  this.approval = {
1548
1593
  /**
1549
- * 事件
1594
+ * 原生审批定义
1550
1595
  */
1551
1596
  approval: {
1552
1597
  /**
@@ -2312,7 +2357,7 @@ class Client$1 {
2312
2357
  }),
2313
2358
  },
2314
2359
  /**
2315
- * 审批查询
2360
+ * 原生审批任务
2316
2361
  */
2317
2362
  task: {
2318
2363
  /**
@@ -3628,6 +3673,81 @@ class Client$1 {
3628
3673
  });
3629
3674
  }),
3630
3675
  },
3676
+ /**
3677
+ * authorize
3678
+ */
3679
+ authorize: {
3680
+ /**
3681
+ * {@link https://open.feishu.cn/api-explorer?project=authen&resource=authorize&apiName=get&version=v1 click to debug }
3682
+ *
3683
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=authen&resource=authorize&version=v1 document }
3684
+ */
3685
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3686
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3687
+ return this.httpInstance
3688
+ .request({
3689
+ url: fillApiPath(`${this.domain}/open-apis/authen/v1/authorize`, path),
3690
+ method: "GET",
3691
+ data,
3692
+ params,
3693
+ headers,
3694
+ })
3695
+ .catch((e) => {
3696
+ this.logger.error(formatErrors(e));
3697
+ throw e;
3698
+ });
3699
+ }),
3700
+ },
3701
+ /**
3702
+ * oidc.access_token
3703
+ */
3704
+ oidcAccessToken: {
3705
+ /**
3706
+ * {@link https://open.feishu.cn/api-explorer?project=authen&resource=oidc.access_token&apiName=create&version=v1 click to debug }
3707
+ *
3708
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=oidc.access_token&version=v1 document }
3709
+ */
3710
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3711
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3712
+ return this.httpInstance
3713
+ .request({
3714
+ url: fillApiPath(`${this.domain}/open-apis/authen/v1/oidc/access_token`, path),
3715
+ method: "POST",
3716
+ data,
3717
+ params,
3718
+ headers,
3719
+ })
3720
+ .catch((e) => {
3721
+ this.logger.error(formatErrors(e));
3722
+ throw e;
3723
+ });
3724
+ }),
3725
+ },
3726
+ /**
3727
+ * oidc.refresh_access_token
3728
+ */
3729
+ oidcRefreshAccessToken: {
3730
+ /**
3731
+ * {@link https://open.feishu.cn/api-explorer?project=authen&resource=oidc.refresh_access_token&apiName=create&version=v1 click to debug }
3732
+ *
3733
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=authen&resource=oidc.refresh_access_token&version=v1 document }
3734
+ */
3735
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3736
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3737
+ return this.httpInstance
3738
+ .request({
3739
+ url: fillApiPath(`${this.domain}/open-apis/authen/v1/oidc/refresh_access_token`, path),
3740
+ method: "POST",
3741
+ data,
3742
+ params,
3743
+ headers,
3744
+ })
3745
+ .catch((e) => {
3746
+ this.logger.error(formatErrors(e));
3747
+ throw e;
3748
+ });
3749
+ }),
3750
+ },
3631
3751
  /**
3632
3752
  * refresh_access_token
3633
3753
  */
@@ -12402,6 +12522,78 @@ class Client$1 {
12402
12522
  throw e;
12403
12523
  });
12404
12524
  }),
12525
+ listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12526
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12527
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
12528
+ const res = yield this.httpInstance
12529
+ .request({
12530
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path),
12531
+ method: "GET",
12532
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
12533
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
12534
+ })
12535
+ .catch((e) => {
12536
+ this.logger.error(formatErrors(e));
12537
+ });
12538
+ return res;
12539
+ });
12540
+ const Iterable = {
12541
+ [Symbol.asyncIterator]() {
12542
+ return __asyncGenerator(this, arguments, function* _a() {
12543
+ let hasMore = true;
12544
+ let pageToken;
12545
+ while (hasMore) {
12546
+ try {
12547
+ const res = yield __await(sendRequest({
12548
+ headers,
12549
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
12550
+ data,
12551
+ }));
12552
+ const _b = get__default["default"](res, "data") || {}, {
12553
+ // @ts-ignore
12554
+ has_more,
12555
+ // @ts-ignore
12556
+ page_token,
12557
+ // @ts-ignore
12558
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
12559
+ yield yield __await(rest);
12560
+ hasMore = Boolean(has_more);
12561
+ pageToken = page_token || next_page_token;
12562
+ }
12563
+ catch (e) {
12564
+ yield yield __await(null);
12565
+ break;
12566
+ }
12567
+ }
12568
+ });
12569
+ },
12570
+ };
12571
+ return Iterable;
12572
+ }),
12573
+ /**
12574
+ * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=list&version=v1 click to debug }
12575
+ *
12576
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list document }
12577
+ *
12578
+ * 获取回复
12579
+ *
12580
+ * 该接口用于根据评论 ID 以及分页参数,获取回复。
12581
+ */
12582
+ list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
12583
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
12584
+ return this.httpInstance
12585
+ .request({
12586
+ url: fillApiPath(`${this.domain}/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies`, path),
12587
+ method: "GET",
12588
+ data,
12589
+ params,
12590
+ headers,
12591
+ })
12592
+ .catch((e) => {
12593
+ this.logger.error(formatErrors(e));
12594
+ throw e;
12595
+ });
12596
+ }),
12405
12597
  /**
12406
12598
  * {@link https://open.feishu.cn/api-explorer?project=drive&resource=file.comment.reply&apiName=update&version=v1 click to debug }
12407
12599
  *
@@ -18510,7 +18702,7 @@ class Client$1 {
18510
18702
  }),
18511
18703
  },
18512
18704
  /**
18513
- * 消息加急
18705
+ * 消息 - 消息卡片
18514
18706
  */
18515
18707
  message: {
18516
18708
  /**
@@ -19298,107 +19490,6 @@ class Client$1 {
19298
19490
  });
19299
19491
  }),
19300
19492
  },
19301
- /**
19302
- * 特别关注(灰度租户可见)
19303
- */
19304
- specialFocus: {
19305
- listWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19306
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
19307
- const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19308
- const res = yield this.httpInstance
19309
- .request({
19310
- url: fillApiPath(`${this.domain}/open-apis/im/v1/special_focus`, path),
19311
- method: "GET",
19312
- headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
19313
- params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
19314
- })
19315
- .catch((e) => {
19316
- this.logger.error(formatErrors(e));
19317
- });
19318
- return res;
19319
- });
19320
- const Iterable = {
19321
- [Symbol.asyncIterator]() {
19322
- return __asyncGenerator(this, arguments, function* _a() {
19323
- let hasMore = true;
19324
- let pageToken;
19325
- while (hasMore) {
19326
- try {
19327
- const res = yield __await(sendRequest({
19328
- headers,
19329
- params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19330
- data,
19331
- }));
19332
- const _b = get__default["default"](res, "data") || {}, {
19333
- // @ts-ignore
19334
- has_more,
19335
- // @ts-ignore
19336
- page_token,
19337
- // @ts-ignore
19338
- next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19339
- yield yield __await(rest);
19340
- hasMore = Boolean(has_more);
19341
- pageToken = page_token || next_page_token;
19342
- }
19343
- catch (e) {
19344
- yield yield __await(null);
19345
- break;
19346
- }
19347
- }
19348
- });
19349
- },
19350
- };
19351
- return Iterable;
19352
- }),
19353
- /**
19354
- * {@link https://open.feishu.cn/api-explorer?project=im&resource=special_focus&apiName=list&version=v1 click to debug }
19355
- *
19356
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/special_focus/list document }
19357
- *
19358
- * 获取特别关注列表
19359
- *
19360
- * 获取用户的特别关注列表。
19361
- */
19362
- list: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19363
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
19364
- return this.httpInstance
19365
- .request({
19366
- url: fillApiPath(`${this.domain}/open-apis/im/v1/special_focus`, path),
19367
- method: "GET",
19368
- data,
19369
- params,
19370
- headers,
19371
- })
19372
- .catch((e) => {
19373
- this.logger.error(formatErrors(e));
19374
- throw e;
19375
- });
19376
- }),
19377
- /**
19378
- * {@link https://open.feishu.cn/api-explorer?project=im&resource=special_focus&apiName=unread&version=v1 click to debug }
19379
- *
19380
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/special_focus/unread document }
19381
- *
19382
- * 获取特别关注未读信息
19383
- *
19384
- * 支持按单聊类型和群聊类型获取用户的特别关注未读消息数。
19385
- */
19386
- unread: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19387
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
19388
- return this.httpInstance
19389
- .request({
19390
- url: fillApiPath(`${this.domain}/open-apis/im/v1/special_focus/unread`, path),
19391
- method: "POST",
19392
- data,
19393
- params,
19394
- headers,
19395
- })
19396
- .catch((e) => {
19397
- this.logger.error(formatErrors(e));
19398
- throw e;
19399
- });
19400
- }),
19401
- },
19402
19493
  };
19403
19494
  /**
19404
19495
  * 邮箱
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larksuiteoapi/node-sdk",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "larksuite open sdk for nodejs",
5
5
  "keywords": [
6
6
  "feishu",