@larksuiteoapi/node-sdk 1.9.0 → 1.11.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 +461 -111
  2. package/lib/index.js +461 -111
  3. package/package.json +1 -1
  4. package/types/index.d.ts +901 -310
package/es/index.js CHANGED
@@ -114,9 +114,17 @@ class DefaultCache {
114
114
  constructor() {
115
115
  this.values = new Map();
116
116
  }
117
- get(key) {
117
+ // When there is a namespace, splice the namespace and key to form a new key
118
+ getCacheKey(key, namespace) {
119
+ if (namespace) {
120
+ return `${namespace}/${key.toString()}`;
121
+ }
122
+ return key;
123
+ }
124
+ get(key, options) {
118
125
  return __awaiter(this, void 0, void 0, function* () {
119
- const data = this.values.get(key);
126
+ const cacheKey = this.getCacheKey(key, get(options, 'namespace'));
127
+ const data = this.values.get(cacheKey);
120
128
  if (data) {
121
129
  const { value, expiredTime } = data;
122
130
  if (!expiredTime || expiredTime - new Date().getTime() > 0) {
@@ -126,9 +134,10 @@ class DefaultCache {
126
134
  return undefined;
127
135
  });
128
136
  }
129
- set(key, value, expiredTime) {
137
+ set(key, value, expiredTime, options) {
130
138
  return __awaiter(this, void 0, void 0, function* () {
131
- this.values.set(key, {
139
+ const cacheKey = this.getCacheKey(key, get(options, 'namespace'));
140
+ this.values.set(cacheKey, {
132
141
  value,
133
142
  expiredTime,
134
143
  });
@@ -561,7 +570,7 @@ class Client$1 {
561
570
  },
562
571
  };
563
572
  /**
564
- * 管理后台-密码
573
+ * 管理后台-企业勋章
565
574
  */
566
575
  this.admin = {
567
576
  /**
@@ -1429,7 +1438,7 @@ class Client$1 {
1429
1438
  */
1430
1439
  this.approval = {
1431
1440
  /**
1432
- * 原生审批定义
1441
+ * 事件
1433
1442
  */
1434
1443
  approval: {
1435
1444
  /**
@@ -1765,7 +1774,7 @@ class Client$1 {
1765
1774
  }),
1766
1775
  },
1767
1776
  /**
1768
- * 审批查询
1777
+ * 原生审批实例
1769
1778
  */
1770
1779
  instance: {
1771
1780
  /**
@@ -3955,6 +3964,85 @@ class Client$1 {
3955
3964
  * 云文档-多维表格
3956
3965
  */
3957
3966
  this.bitable = {
3967
+ /**
3968
+ * 多维表格
3969
+ */
3970
+ app: {
3971
+ /**
3972
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=create&version=v1 click to debug }
3973
+ *
3974
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=bitable&resource=app&version=v1 document }
3975
+ */
3976
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3977
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3978
+ return httpInstance
3979
+ .request({
3980
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps`, path),
3981
+ method: "POST",
3982
+ data,
3983
+ params,
3984
+ headers,
3985
+ })
3986
+ .catch((e) => {
3987
+ this.logger.error(formatErrors(e));
3988
+ throw e;
3989
+ });
3990
+ }),
3991
+ /**
3992
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=get&version=v1 click to debug }
3993
+ *
3994
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/get document }
3995
+ *
3996
+ * 获取多维表格元数据
3997
+ *
3998
+ * 获取指定多维表格的元数据信息,包括多维表格名称,多维表格版本号,多维表格是否开启高级权限等。
3999
+ *
4000
+ * 该接口支持调用频率上限为 20 QPS(Query Per Second,每秒请求率)
4001
+ */
4002
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4003
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4004
+ return httpInstance
4005
+ .request({
4006
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4007
+ method: "GET",
4008
+ data,
4009
+ params,
4010
+ headers,
4011
+ })
4012
+ .catch((e) => {
4013
+ this.logger.error(formatErrors(e));
4014
+ throw e;
4015
+ });
4016
+ }),
4017
+ /**
4018
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=update&version=v1 click to debug }
4019
+ *
4020
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/update document }
4021
+ *
4022
+ * 更新多维表格元数据
4023
+ *
4024
+ * 通过 app_token 更新多维表格元数据
4025
+ *
4026
+ * 该接口支持调用频率上限为 10 QPS
4027
+ *
4028
+ * - 飞书文档、飞书表格、知识库中的多维表格不支持开启高级权限;- 此接口非原子操作,先修改多维表格名字,后开关高级权限。可能存在部分成功的情况
4029
+ */
4030
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4031
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4032
+ return httpInstance
4033
+ .request({
4034
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4035
+ method: "PUT",
4036
+ data,
4037
+ params,
4038
+ headers,
4039
+ })
4040
+ .catch((e) => {
4041
+ this.logger.error(formatErrors(e));
4042
+ throw e;
4043
+ });
4044
+ }),
4045
+ },
3958
4046
  /**
3959
4047
  * 仪表盘
3960
4048
  */
@@ -4058,65 +4146,6 @@ class Client$1 {
4058
4146
  });
4059
4147
  }),
4060
4148
  },
4061
- /**
4062
- * 多维表格
4063
- */
4064
- app: {
4065
- /**
4066
- * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=get&version=v1 click to debug }
4067
- *
4068
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/get document }
4069
- *
4070
- * 获取多维表格元数据
4071
- *
4072
- * 获取指定多维表格的元数据信息,包括多维表格名称,多维表格版本号,多维表格是否开启高级权限等。
4073
- *
4074
- * 该接口支持调用频率上限为 20 QPS(Query Per Second,每秒请求率)
4075
- */
4076
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4077
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
4078
- return httpInstance
4079
- .request({
4080
- url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4081
- method: "GET",
4082
- data,
4083
- params,
4084
- headers,
4085
- })
4086
- .catch((e) => {
4087
- this.logger.error(formatErrors(e));
4088
- throw e;
4089
- });
4090
- }),
4091
- /**
4092
- * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=update&version=v1 click to debug }
4093
- *
4094
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/update document }
4095
- *
4096
- * 更新多维表格元数据
4097
- *
4098
- * 通过 app_token 更新多维表格元数据
4099
- *
4100
- * 该接口支持调用频率上限为 10 QPS
4101
- *
4102
- * - 飞书文档、飞书表格、知识库中的多维表格不支持开启高级权限;- 此接口非原子操作,先修改多维表格名字,后开关高级权限。可能存在部分成功的情况
4103
- */
4104
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4105
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
4106
- return httpInstance
4107
- .request({
4108
- url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4109
- method: "PUT",
4110
- data,
4111
- params,
4112
- headers,
4113
- })
4114
- .catch((e) => {
4115
- this.logger.error(formatErrors(e));
4116
- throw e;
4117
- });
4118
- }),
4119
- },
4120
4149
  /**
4121
4150
  * 自定义角色
4122
4151
  */
@@ -10369,41 +10398,9 @@ class Client$1 {
10369
10398
  */
10370
10399
  this.exam = {};
10371
10400
  /**
10372
- * AI能力
10373
- */
10374
- this.face_detection = {
10375
- /**
10376
- * 图片
10401
+
10377
10402
  */
10378
- image: {
10379
- /**
10380
- * {@link https://open.feishu.cn/api-explorer?project=face_detection&resource=image&apiName=detect_face_attributes&version=v1 click to debug }
10381
- *
10382
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/face_detection-v1/image/detect_face_attributes document }
10383
- *
10384
- * 人脸检测和属性分析
10385
- *
10386
- * 检测图片中的人脸属性和质量等信息
10387
- *
10388
- * 注意:返回值为 -1 表示该功能还暂未实现
10389
- */
10390
- detectFaceAttributes: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10391
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
10392
- return httpInstance
10393
- .request({
10394
- url: fillApiPath(`${this.domain}/open-apis/face_detection/v1/image/detect_face_attributes`, path),
10395
- method: "POST",
10396
- data,
10397
- params,
10398
- headers,
10399
- })
10400
- .catch((e) => {
10401
- this.logger.error(formatErrors(e));
10402
- throw e;
10403
- });
10404
- }),
10405
- },
10406
- };
10403
+ this.face_detection = {};
10407
10404
  /**
10408
10405
 
10409
10406
  */
@@ -11975,7 +11972,7 @@ class Client$1 {
11975
11972
  */
11976
11973
  this.hire = {
11977
11974
  /**
11978
- * 入职
11975
+ * 投递
11979
11976
  */
11980
11977
  application: {
11981
11978
  /**
@@ -19052,6 +19049,225 @@ class Client$1 {
19052
19049
  });
19053
19050
  }),
19054
19051
  },
19052
+ /**
19053
+ * meeting_list
19054
+ */
19055
+ meetingList: {
19056
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19057
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19058
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19059
+ const res = yield httpInstance
19060
+ .request({
19061
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path),
19062
+ method: "GET",
19063
+ headers: pickBy(innerPayload.headers, identity),
19064
+ params: pickBy(innerPayload.params, identity),
19065
+ })
19066
+ .catch((e) => {
19067
+ this.logger.error(formatErrors(e));
19068
+ });
19069
+ return res;
19070
+ });
19071
+ const Iterable = {
19072
+ [Symbol.asyncIterator]() {
19073
+ return __asyncGenerator(this, arguments, function* _a() {
19074
+ let hasMore = true;
19075
+ let pageToken;
19076
+ while (hasMore) {
19077
+ try {
19078
+ const res = yield __await(sendRequest({
19079
+ headers,
19080
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19081
+ data,
19082
+ }));
19083
+ const _b = get(res, "data") || {}, {
19084
+ // @ts-ignore
19085
+ has_more,
19086
+ // @ts-ignore
19087
+ page_token,
19088
+ // @ts-ignore
19089
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19090
+ yield yield __await(rest);
19091
+ hasMore = Boolean(has_more);
19092
+ pageToken = page_token || next_page_token;
19093
+ }
19094
+ catch (e) {
19095
+ yield yield __await(null);
19096
+ break;
19097
+ }
19098
+ }
19099
+ });
19100
+ },
19101
+ };
19102
+ return Iterable;
19103
+ }),
19104
+ /**
19105
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting_list&apiName=get&version=v1 click to debug }
19106
+ *
19107
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=meeting_list&version=v1 document }
19108
+ */
19109
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19110
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19111
+ return httpInstance
19112
+ .request({
19113
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path),
19114
+ method: "GET",
19115
+ data,
19116
+ params,
19117
+ headers,
19118
+ })
19119
+ .catch((e) => {
19120
+ this.logger.error(formatErrors(e));
19121
+ throw e;
19122
+ });
19123
+ }),
19124
+ },
19125
+ /**
19126
+ * participant_list
19127
+ */
19128
+ participantList: {
19129
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19130
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19131
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19132
+ const res = yield httpInstance
19133
+ .request({
19134
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path),
19135
+ method: "GET",
19136
+ headers: pickBy(innerPayload.headers, identity),
19137
+ params: pickBy(innerPayload.params, identity),
19138
+ })
19139
+ .catch((e) => {
19140
+ this.logger.error(formatErrors(e));
19141
+ });
19142
+ return res;
19143
+ });
19144
+ const Iterable = {
19145
+ [Symbol.asyncIterator]() {
19146
+ return __asyncGenerator(this, arguments, function* _a() {
19147
+ let hasMore = true;
19148
+ let pageToken;
19149
+ while (hasMore) {
19150
+ try {
19151
+ const res = yield __await(sendRequest({
19152
+ headers,
19153
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19154
+ data,
19155
+ }));
19156
+ const _b = get(res, "data") || {}, {
19157
+ // @ts-ignore
19158
+ has_more,
19159
+ // @ts-ignore
19160
+ page_token,
19161
+ // @ts-ignore
19162
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19163
+ yield yield __await(rest);
19164
+ hasMore = Boolean(has_more);
19165
+ pageToken = page_token || next_page_token;
19166
+ }
19167
+ catch (e) {
19168
+ yield yield __await(null);
19169
+ break;
19170
+ }
19171
+ }
19172
+ });
19173
+ },
19174
+ };
19175
+ return Iterable;
19176
+ }),
19177
+ /**
19178
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_list&apiName=get&version=v1 click to debug }
19179
+ *
19180
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_list&version=v1 document }
19181
+ */
19182
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19183
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19184
+ return httpInstance
19185
+ .request({
19186
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path),
19187
+ method: "GET",
19188
+ data,
19189
+ params,
19190
+ headers,
19191
+ })
19192
+ .catch((e) => {
19193
+ this.logger.error(formatErrors(e));
19194
+ throw e;
19195
+ });
19196
+ }),
19197
+ },
19198
+ /**
19199
+ * participant_quality_list
19200
+ */
19201
+ participantQualityList: {
19202
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19203
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19204
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19205
+ const res = yield httpInstance
19206
+ .request({
19207
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path),
19208
+ method: "GET",
19209
+ headers: pickBy(innerPayload.headers, identity),
19210
+ params: pickBy(innerPayload.params, identity),
19211
+ })
19212
+ .catch((e) => {
19213
+ this.logger.error(formatErrors(e));
19214
+ });
19215
+ return res;
19216
+ });
19217
+ const Iterable = {
19218
+ [Symbol.asyncIterator]() {
19219
+ return __asyncGenerator(this, arguments, function* _a() {
19220
+ let hasMore = true;
19221
+ let pageToken;
19222
+ while (hasMore) {
19223
+ try {
19224
+ const res = yield __await(sendRequest({
19225
+ headers,
19226
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19227
+ data,
19228
+ }));
19229
+ const _b = get(res, "data") || {}, {
19230
+ // @ts-ignore
19231
+ has_more,
19232
+ // @ts-ignore
19233
+ page_token,
19234
+ // @ts-ignore
19235
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19236
+ yield yield __await(rest);
19237
+ hasMore = Boolean(has_more);
19238
+ pageToken = page_token || next_page_token;
19239
+ }
19240
+ catch (e) {
19241
+ yield yield __await(null);
19242
+ break;
19243
+ }
19244
+ }
19245
+ });
19246
+ },
19247
+ };
19248
+ return Iterable;
19249
+ }),
19250
+ /**
19251
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_quality_list&apiName=get&version=v1 click to debug }
19252
+ *
19253
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_quality_list&version=v1 document }
19254
+ */
19255
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19256
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19257
+ return httpInstance
19258
+ .request({
19259
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path),
19260
+ method: "GET",
19261
+ data,
19262
+ params,
19263
+ headers,
19264
+ })
19265
+ .catch((e) => {
19266
+ this.logger.error(formatErrors(e));
19267
+ throw e;
19268
+ });
19269
+ }),
19270
+ },
19055
19271
  /**
19056
19272
  * 会议报告
19057
19273
  */
@@ -19244,6 +19460,51 @@ class Client$1 {
19244
19460
  });
19245
19461
  }),
19246
19462
  },
19463
+ /**
19464
+ * reserve_config.admin
19465
+ */
19466
+ reserveConfigAdmin: {
19467
+ /**
19468
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=get&version=v1 click to debug }
19469
+ *
19470
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.admin&version=v1 document }
19471
+ */
19472
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19473
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19474
+ return httpInstance
19475
+ .request({
19476
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path),
19477
+ method: "GET",
19478
+ data,
19479
+ params,
19480
+ headers,
19481
+ })
19482
+ .catch((e) => {
19483
+ this.logger.error(formatErrors(e));
19484
+ throw e;
19485
+ });
19486
+ }),
19487
+ /**
19488
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=patch&version=v1 click to debug }
19489
+ *
19490
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.admin&version=v1 document }
19491
+ */
19492
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19493
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19494
+ return httpInstance
19495
+ .request({
19496
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path),
19497
+ method: "PATCH",
19498
+ data,
19499
+ params,
19500
+ headers,
19501
+ })
19502
+ .catch((e) => {
19503
+ this.logger.error(formatErrors(e));
19504
+ throw e;
19505
+ });
19506
+ }),
19507
+ },
19247
19508
  /**
19248
19509
  * reserve_config
19249
19510
  */
@@ -19297,6 +19558,79 @@ class Client$1 {
19297
19558
  });
19298
19559
  }),
19299
19560
  },
19561
+ /**
19562
+ * resource_reservation_list
19563
+ */
19564
+ resourceReservationList: {
19565
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19566
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19567
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19568
+ const res = yield httpInstance
19569
+ .request({
19570
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path),
19571
+ method: "GET",
19572
+ headers: pickBy(innerPayload.headers, identity),
19573
+ params: pickBy(innerPayload.params, identity),
19574
+ })
19575
+ .catch((e) => {
19576
+ this.logger.error(formatErrors(e));
19577
+ });
19578
+ return res;
19579
+ });
19580
+ const Iterable = {
19581
+ [Symbol.asyncIterator]() {
19582
+ return __asyncGenerator(this, arguments, function* _a() {
19583
+ let hasMore = true;
19584
+ let pageToken;
19585
+ while (hasMore) {
19586
+ try {
19587
+ const res = yield __await(sendRequest({
19588
+ headers,
19589
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19590
+ data,
19591
+ }));
19592
+ const _b = get(res, "data") || {}, {
19593
+ // @ts-ignore
19594
+ has_more,
19595
+ // @ts-ignore
19596
+ page_token,
19597
+ // @ts-ignore
19598
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19599
+ yield yield __await(rest);
19600
+ hasMore = Boolean(has_more);
19601
+ pageToken = page_token || next_page_token;
19602
+ }
19603
+ catch (e) {
19604
+ yield yield __await(null);
19605
+ break;
19606
+ }
19607
+ }
19608
+ });
19609
+ },
19610
+ };
19611
+ return Iterable;
19612
+ }),
19613
+ /**
19614
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=resource_reservation_list&apiName=get&version=v1 click to debug }
19615
+ *
19616
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=resource_reservation_list&version=v1 document }
19617
+ */
19618
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19619
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19620
+ return httpInstance
19621
+ .request({
19622
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path),
19623
+ method: "GET",
19624
+ data,
19625
+ params,
19626
+ headers,
19627
+ })
19628
+ .catch((e) => {
19629
+ this.logger.error(formatErrors(e));
19630
+ throw e;
19631
+ });
19632
+ }),
19633
+ },
19300
19634
  /**
19301
19635
  * 会议室
19302
19636
  */
@@ -20400,7 +20734,9 @@ class AppTicketManager {
20400
20734
  var _a;
20401
20735
  return __awaiter(this, void 0, void 0, function* () {
20402
20736
  if (this.appType === AppType.ISV) {
20403
- const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket));
20737
+ const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket, {
20738
+ namespace: this.appId
20739
+ }));
20404
20740
  if (!appTicket) {
20405
20741
  this.requestAppTicket();
20406
20742
  }
@@ -20423,7 +20759,9 @@ class AppTicketManager {
20423
20759
  getAppTicket() {
20424
20760
  var _a;
20425
20761
  return __awaiter(this, void 0, void 0, function* () {
20426
- const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket));
20762
+ const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket, {
20763
+ namespace: this.appId
20764
+ }));
20427
20765
  if (appTicket) {
20428
20766
  this.logger.debug('use cache app ticket');
20429
20767
  return appTicket;
@@ -20455,7 +20793,9 @@ class TokenManager {
20455
20793
  getCustomTenantAccessToken() {
20456
20794
  var _a, _b;
20457
20795
  return __awaiter(this, void 0, void 0, function* () {
20458
- const cachedTenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CTenantAccessToken));
20796
+ const cachedTenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CTenantAccessToken, {
20797
+ namespace: this.appId
20798
+ }));
20459
20799
  if (cachedTenantAccessToken) {
20460
20800
  this.logger.debug('use cache token');
20461
20801
  return cachedTenantAccessToken;
@@ -20472,7 +20812,9 @@ class TokenManager {
20472
20812
  });
20473
20813
  yield ((_b = this.cache) === null || _b === void 0 ? void 0 : _b.set(CTenantAccessToken, tenant_access_token,
20474
20814
  // Due to the time-consuming network, the expiration time needs to be 3 minutes earlier
20475
- new Date().getTime() + expire * 1000 - 3 * 60 * 1000));
20815
+ new Date().getTime() + expire * 1000 - 3 * 60 * 1000, {
20816
+ namespace: this.appId
20817
+ }));
20476
20818
  return tenant_access_token;
20477
20819
  });
20478
20820
  }
@@ -20483,7 +20825,9 @@ class TokenManager {
20483
20825
  this.logger.error('market app request need tenant key');
20484
20826
  return undefined;
20485
20827
  }
20486
- const tenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(`larkMarketAccessToken${tenantKey}`));
20828
+ const tenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(`larkMarketAccessToken${tenantKey}`, {
20829
+ namespace: this.appId
20830
+ }));
20487
20831
  if (tenantAccessToken) {
20488
20832
  this.logger.debug('use cache token');
20489
20833
  return tenantAccessToken;
@@ -20520,7 +20864,9 @@ class TokenManager {
20520
20864
  // 设置tenant_access_token
20521
20865
  yield this.cache.set(`larkMarketAccessToken${tenantKey}`, tenant_access_token,
20522
20866
  // Due to the time-consuming network, the expiration time needs to be 3 minutes earlier
20523
- new Date().getTime() + expire * 1000 - 3 * 60 * 1000);
20867
+ new Date().getTime() + expire * 1000 - 3 * 60 * 1000, {
20868
+ namespace: this.appId
20869
+ });
20524
20870
  return tenant_access_token;
20525
20871
  });
20526
20872
  }
@@ -20746,9 +21092,11 @@ class EventDispatcher {
20746
21092
  registerAppTicketHandle() {
20747
21093
  this.register({
20748
21094
  app_ticket: (data) => __awaiter(this, void 0, void 0, function* () {
20749
- const { app_ticket } = data;
21095
+ const { app_ticket, app_id } = data;
20750
21096
  if (app_ticket) {
20751
- yield this.cache.set(CAppTicket, app_ticket);
21097
+ yield this.cache.set(CAppTicket, app_ticket, undefined, {
21098
+ namespace: app_id
21099
+ });
20752
21100
  this.logger.debug('set app ticket');
20753
21101
  }
20754
21102
  else {
@@ -20809,9 +21157,11 @@ class CardActionHandler {
20809
21157
  registerAppTicketHandle() {
20810
21158
  this.register({
20811
21159
  app_ticket: (data) => __awaiter(this, void 0, void 0, function* () {
20812
- const { app_ticket } = data;
21160
+ const { app_ticket, app_id } = data;
20813
21161
  if (app_ticket) {
20814
- yield this.cache.set(CAppTicket, app_ticket);
21162
+ yield this.cache.set(CAppTicket, app_ticket, undefined, {
21163
+ namespace: app_id
21164
+ });
20815
21165
  this.logger.debug('set app ticket');
20816
21166
  }
20817
21167
  else {