@larksuiteoapi/node-sdk 1.51.0 → 1.53.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.
package/es/index.js CHANGED
@@ -4629,7 +4629,7 @@ class Client$12 extends Client$13 {
4629
4629
  }),
4630
4630
  },
4631
4631
  /**
4632
- * 应用管理
4632
+ * 应用
4633
4633
  */
4634
4634
  application: {
4635
4635
  /**
@@ -5483,7 +5483,7 @@ class Client$12 extends Client$13 {
5483
5483
  }),
5484
5484
  },
5485
5485
  /**
5486
- * 应用管理
5486
+ * 应用
5487
5487
  */
5488
5488
  application: {
5489
5489
  /**
@@ -6222,7 +6222,7 @@ class Client$11 extends Client$12 {
6222
6222
  }),
6223
6223
  },
6224
6224
  /**
6225
- * 审批查询
6225
+ * 原生审批实例
6226
6226
  */
6227
6227
  instance: {
6228
6228
  /**
@@ -7227,7 +7227,7 @@ class Client$11 extends Client$12 {
7227
7227
  }),
7228
7228
  },
7229
7229
  /**
7230
- * 审批查询
7230
+ * 原生审批实例
7231
7231
  */
7232
7232
  instance: {
7233
7233
  /**
@@ -12170,7 +12170,7 @@ class Client$W extends Client$X {
12170
12170
  constructor() {
12171
12171
  super(...arguments);
12172
12172
  /**
12173
- * 云文档-电子表格
12173
+ * 云文档-多维表格
12174
12174
  */
12175
12175
  this.bitable = {
12176
12176
  /**
@@ -33138,7 +33138,7 @@ class Client$M extends Client$N {
33138
33138
  *
33139
33139
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
33140
33140
  *
33141
- * 通过序列 ID 批量获取序列信息
33141
+ * 批量获取序列信息
33142
33142
  */
33143
33143
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33144
33144
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -33409,7 +33409,7 @@ class Client$M extends Client$N {
33409
33409
  *
33410
33410
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
33411
33411
  *
33412
- * 通过职级 ID 批量获取职级信息
33412
+ * 批量获取职级信息
33413
33413
  */
33414
33414
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33415
33415
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -36689,6 +36689,27 @@ class Client$H extends Client$I {
36689
36689
  * 文档
36690
36690
  */
36691
36691
  document: {
36692
+ /**
36693
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
36694
+ *
36695
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
36696
+ */
36697
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36698
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36699
+ return this.httpInstance
36700
+ .request({
36701
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
36702
+ method: "POST",
36703
+ data,
36704
+ params,
36705
+ headers,
36706
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
36707
+ })
36708
+ .catch((e) => {
36709
+ this.logger.error(formatErrors(e));
36710
+ throw e;
36711
+ });
36712
+ }),
36692
36713
  /**
36693
36714
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
36694
36715
  *
@@ -37339,6 +37360,27 @@ class Client$H extends Client$I {
37339
37360
  * 文档
37340
37361
  */
37341
37362
  document: {
37363
+ /**
37364
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
37365
+ *
37366
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
37367
+ */
37368
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
37369
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
37370
+ return this.httpInstance
37371
+ .request({
37372
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
37373
+ method: "POST",
37374
+ data,
37375
+ params,
37376
+ headers,
37377
+ paramsSerializer: (params) => stringify(params, { arrayFormat: "repeat" }),
37378
+ })
37379
+ .catch((e) => {
37380
+ this.logger.error(formatErrors(e));
37381
+ throw e;
37382
+ });
37383
+ }),
37342
37384
  /**
37343
37385
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
37344
37386
  *
@@ -37437,7 +37479,7 @@ class Client$G extends Client$H {
37437
37479
  constructor() {
37438
37480
  super(...arguments);
37439
37481
  /**
37440
- * 云文档-文件管理
37482
+ * 云文档-文档
37441
37483
  */
37442
37484
  this.drive = {
37443
37485
  /**
@@ -37860,7 +37902,7 @@ class Client$G extends Client$H {
37860
37902
  }),
37861
37903
  },
37862
37904
  /**
37863
- * 文件
37905
+ * 事件
37864
37906
  */
37865
37907
  file: {
37866
37908
  /**
@@ -39686,7 +39728,7 @@ class Client$G extends Client$H {
39686
39728
  }),
39687
39729
  },
39688
39730
  /**
39689
- * 文件
39731
+ * 事件
39690
39732
  */
39691
39733
  file: {
39692
39734
  /**
@@ -71368,7 +71410,7 @@ class Client$c extends Client$d {
71368
71410
  }),
71369
71411
  },
71370
71412
  /**
71371
- * 单元格
71413
+ * 工作表
71372
71414
  */
71373
71415
  spreadsheetSheet: {
71374
71416
  /**
@@ -72098,7 +72140,7 @@ class Client$c extends Client$d {
72098
72140
  }),
72099
72141
  },
72100
72142
  /**
72101
- * 单元格
72143
+ * 工作表
72102
72144
  */
72103
72145
  spreadsheetSheet: {
72104
72146
  /**
@@ -82961,10 +83003,11 @@ class WSClient {
82961
83003
  lastConnectTime: 0,
82962
83004
  nextConnectTime: 0,
82963
83005
  };
82964
- const { appId, appSecret, domain = Domain.Feishu, httpInstance = defaultHttpInstance, loggerLevel = LoggerLevel.info, logger = defaultLogger, autoReconnect = true } = params;
83006
+ const { appId, appSecret, agent, domain = Domain.Feishu, httpInstance = defaultHttpInstance, loggerLevel = LoggerLevel.info, logger = defaultLogger, autoReconnect = true } = params;
82965
83007
  this.logger = new LoggerProxy(loggerLevel, logger);
82966
83008
  assert(!appId, () => this.logger.error('appId is needed'));
82967
83009
  assert(!appSecret, () => this.logger.error('appSecret is needed'));
83010
+ this.agent = agent;
82968
83011
  this.dataCache = new DataCache({ logger: this.logger });
82969
83012
  this.httpInstance = httpInstance;
82970
83013
  this.wsConfig.updateClient({
@@ -83022,7 +83065,8 @@ class WSClient {
83022
83065
  const connectUrl = this.wsConfig.getWS('connectUrl');
83023
83066
  let wsInstance;
83024
83067
  try {
83025
- wsInstance = new WebSocket(connectUrl);
83068
+ const { agent } = this;
83069
+ wsInstance = new WebSocket(connectUrl, { agent });
83026
83070
  }
83027
83071
  catch (e) {
83028
83072
  this.logger.error('[ws]', 'new WebSocket error');
package/lib/index.js CHANGED
@@ -4644,7 +4644,7 @@ class Client$12 extends Client$13 {
4644
4644
  }),
4645
4645
  },
4646
4646
  /**
4647
- * 应用管理
4647
+ * 应用
4648
4648
  */
4649
4649
  application: {
4650
4650
  /**
@@ -5498,7 +5498,7 @@ class Client$12 extends Client$13 {
5498
5498
  }),
5499
5499
  },
5500
5500
  /**
5501
- * 应用管理
5501
+ * 应用
5502
5502
  */
5503
5503
  application: {
5504
5504
  /**
@@ -6237,7 +6237,7 @@ class Client$11 extends Client$12 {
6237
6237
  }),
6238
6238
  },
6239
6239
  /**
6240
- * 审批查询
6240
+ * 原生审批实例
6241
6241
  */
6242
6242
  instance: {
6243
6243
  /**
@@ -7242,7 +7242,7 @@ class Client$11 extends Client$12 {
7242
7242
  }),
7243
7243
  },
7244
7244
  /**
7245
- * 审批查询
7245
+ * 原生审批实例
7246
7246
  */
7247
7247
  instance: {
7248
7248
  /**
@@ -12185,7 +12185,7 @@ class Client$W extends Client$X {
12185
12185
  constructor() {
12186
12186
  super(...arguments);
12187
12187
  /**
12188
- * 云文档-电子表格
12188
+ * 云文档-多维表格
12189
12189
  */
12190
12190
  this.bitable = {
12191
12191
  /**
@@ -33153,7 +33153,7 @@ class Client$M extends Client$N {
33153
33153
  *
33154
33154
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_family&version=v2 document }
33155
33155
  *
33156
- * 通过序列 ID 批量获取序列信息
33156
+ * 批量获取序列信息
33157
33157
  */
33158
33158
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33159
33159
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -33424,7 +33424,7 @@ class Client$M extends Client$N {
33424
33424
  *
33425
33425
  * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_get&project=corehr&resource=job_level&version=v2 document }
33426
33426
  *
33427
- * 通过职级 ID 批量获取职级信息
33427
+ * 批量获取职级信息
33428
33428
  */
33429
33429
  batchGet: (payload, options) => __awaiter(this, void 0, void 0, function* () {
33430
33430
  const { headers, params, data, path } = yield this.formatPayload(payload, options);
@@ -36704,6 +36704,27 @@ class Client$H extends Client$I {
36704
36704
  * 文档
36705
36705
  */
36706
36706
  document: {
36707
+ /**
36708
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
36709
+ *
36710
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
36711
+ */
36712
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
36713
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
36714
+ return this.httpInstance
36715
+ .request({
36716
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
36717
+ method: "POST",
36718
+ data,
36719
+ params,
36720
+ headers,
36721
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
36722
+ })
36723
+ .catch((e) => {
36724
+ this.logger.error(formatErrors(e));
36725
+ throw e;
36726
+ });
36727
+ }),
36707
36728
  /**
36708
36729
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
36709
36730
  *
@@ -37354,6 +37375,27 @@ class Client$H extends Client$I {
37354
37375
  * 文档
37355
37376
  */
37356
37377
  document: {
37378
+ /**
37379
+ * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=convert&version=v1 click to debug }
37380
+ *
37381
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=convert&project=docx&resource=document&version=v1 document }
37382
+ */
37383
+ convert: (payload, options) => __awaiter(this, void 0, void 0, function* () {
37384
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
37385
+ return this.httpInstance
37386
+ .request({
37387
+ url: fillApiPath(`${this.domain}/open-apis/docx/v1/documents/blocks/convert`, path),
37388
+ method: "POST",
37389
+ data,
37390
+ params,
37391
+ headers,
37392
+ paramsSerializer: (params) => qs.stringify(params, { arrayFormat: "repeat" }),
37393
+ })
37394
+ .catch((e) => {
37395
+ this.logger.error(formatErrors(e));
37396
+ throw e;
37397
+ });
37398
+ }),
37357
37399
  /**
37358
37400
  * {@link https://open.feishu.cn/api-explorer?project=docx&resource=document&apiName=create&version=v1 click to debug }
37359
37401
  *
@@ -37452,7 +37494,7 @@ class Client$G extends Client$H {
37452
37494
  constructor() {
37453
37495
  super(...arguments);
37454
37496
  /**
37455
- * 云文档-文件管理
37497
+ * 云文档-文档
37456
37498
  */
37457
37499
  this.drive = {
37458
37500
  /**
@@ -37875,7 +37917,7 @@ class Client$G extends Client$H {
37875
37917
  }),
37876
37918
  },
37877
37919
  /**
37878
- * 文件
37920
+ * 事件
37879
37921
  */
37880
37922
  file: {
37881
37923
  /**
@@ -39701,7 +39743,7 @@ class Client$G extends Client$H {
39701
39743
  }),
39702
39744
  },
39703
39745
  /**
39704
- * 文件
39746
+ * 事件
39705
39747
  */
39706
39748
  file: {
39707
39749
  /**
@@ -71383,7 +71425,7 @@ class Client$c extends Client$d {
71383
71425
  }),
71384
71426
  },
71385
71427
  /**
71386
- * 单元格
71428
+ * 工作表
71387
71429
  */
71388
71430
  spreadsheetSheet: {
71389
71431
  /**
@@ -72113,7 +72155,7 @@ class Client$c extends Client$d {
72113
72155
  }),
72114
72156
  },
72115
72157
  /**
72116
- * 单元格
72158
+ * 工作表
72117
72159
  */
72118
72160
  spreadsheetSheet: {
72119
72161
  /**
@@ -82976,10 +83018,11 @@ class WSClient {
82976
83018
  lastConnectTime: 0,
82977
83019
  nextConnectTime: 0,
82978
83020
  };
82979
- const { appId, appSecret, domain = exports.Domain.Feishu, httpInstance = defaultHttpInstance, loggerLevel = exports.LoggerLevel.info, logger = defaultLogger, autoReconnect = true } = params;
83021
+ const { appId, appSecret, agent, domain = exports.Domain.Feishu, httpInstance = defaultHttpInstance, loggerLevel = exports.LoggerLevel.info, logger = defaultLogger, autoReconnect = true } = params;
82980
83022
  this.logger = new LoggerProxy(loggerLevel, logger);
82981
83023
  assert(!appId, () => this.logger.error('appId is needed'));
82982
83024
  assert(!appSecret, () => this.logger.error('appSecret is needed'));
83025
+ this.agent = agent;
82983
83026
  this.dataCache = new DataCache({ logger: this.logger });
82984
83027
  this.httpInstance = httpInstance;
82985
83028
  this.wsConfig.updateClient({
@@ -83037,7 +83080,8 @@ class WSClient {
83037
83080
  const connectUrl = this.wsConfig.getWS('connectUrl');
83038
83081
  let wsInstance;
83039
83082
  try {
83040
- wsInstance = new WebSocket__default["default"](connectUrl);
83083
+ const { agent } = this;
83084
+ wsInstance = new WebSocket__default["default"](connectUrl, { agent });
83041
83085
  }
83042
83086
  catch (e) {
83043
83087
  this.logger.error('[ws]', 'new WebSocket error');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larksuiteoapi/node-sdk",
3
- "version": "1.51.0",
3
+ "version": "1.53.0",
4
4
  "description": "larksuite open sdk for nodejs",
5
5
  "keywords": [
6
6
  "feishu",