@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/lib/index.js CHANGED
@@ -129,9 +129,17 @@ class DefaultCache {
129
129
  constructor() {
130
130
  this.values = new Map();
131
131
  }
132
- get(key) {
132
+ // When there is a namespace, splice the namespace and key to form a new key
133
+ getCacheKey(key, namespace) {
134
+ if (namespace) {
135
+ return `${namespace}/${key.toString()}`;
136
+ }
137
+ return key;
138
+ }
139
+ get(key, options) {
133
140
  return __awaiter(this, void 0, void 0, function* () {
134
- const data = this.values.get(key);
141
+ const cacheKey = this.getCacheKey(key, get__default["default"](options, 'namespace'));
142
+ const data = this.values.get(cacheKey);
135
143
  if (data) {
136
144
  const { value, expiredTime } = data;
137
145
  if (!expiredTime || expiredTime - new Date().getTime() > 0) {
@@ -141,9 +149,10 @@ class DefaultCache {
141
149
  return undefined;
142
150
  });
143
151
  }
144
- set(key, value, expiredTime) {
152
+ set(key, value, expiredTime, options) {
145
153
  return __awaiter(this, void 0, void 0, function* () {
146
- this.values.set(key, {
154
+ const cacheKey = this.getCacheKey(key, get__default["default"](options, 'namespace'));
155
+ this.values.set(cacheKey, {
147
156
  value,
148
157
  expiredTime,
149
158
  });
@@ -576,7 +585,7 @@ class Client$1 {
576
585
  },
577
586
  };
578
587
  /**
579
- * 管理后台-密码
588
+ * 管理后台-企业勋章
580
589
  */
581
590
  this.admin = {
582
591
  /**
@@ -1444,7 +1453,7 @@ class Client$1 {
1444
1453
  */
1445
1454
  this.approval = {
1446
1455
  /**
1447
- * 原生审批定义
1456
+ * 事件
1448
1457
  */
1449
1458
  approval: {
1450
1459
  /**
@@ -1780,7 +1789,7 @@ class Client$1 {
1780
1789
  }),
1781
1790
  },
1782
1791
  /**
1783
- * 审批查询
1792
+ * 原生审批实例
1784
1793
  */
1785
1794
  instance: {
1786
1795
  /**
@@ -3970,6 +3979,85 @@ class Client$1 {
3970
3979
  * 云文档-多维表格
3971
3980
  */
3972
3981
  this.bitable = {
3982
+ /**
3983
+ * 多维表格
3984
+ */
3985
+ app: {
3986
+ /**
3987
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=create&version=v1 click to debug }
3988
+ *
3989
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=bitable&resource=app&version=v1 document }
3990
+ */
3991
+ create: (payload, options) => __awaiter(this, void 0, void 0, function* () {
3992
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
3993
+ return httpInstance
3994
+ .request({
3995
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps`, path),
3996
+ method: "POST",
3997
+ data,
3998
+ params,
3999
+ headers,
4000
+ })
4001
+ .catch((e) => {
4002
+ this.logger.error(formatErrors(e));
4003
+ throw e;
4004
+ });
4005
+ }),
4006
+ /**
4007
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=get&version=v1 click to debug }
4008
+ *
4009
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/get document }
4010
+ *
4011
+ * 获取多维表格元数据
4012
+ *
4013
+ * 获取指定多维表格的元数据信息,包括多维表格名称,多维表格版本号,多维表格是否开启高级权限等。
4014
+ *
4015
+ * 该接口支持调用频率上限为 20 QPS(Query Per Second,每秒请求率)
4016
+ */
4017
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4018
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4019
+ return httpInstance
4020
+ .request({
4021
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4022
+ method: "GET",
4023
+ data,
4024
+ params,
4025
+ headers,
4026
+ })
4027
+ .catch((e) => {
4028
+ this.logger.error(formatErrors(e));
4029
+ throw e;
4030
+ });
4031
+ }),
4032
+ /**
4033
+ * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=update&version=v1 click to debug }
4034
+ *
4035
+ * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/update document }
4036
+ *
4037
+ * 更新多维表格元数据
4038
+ *
4039
+ * 通过 app_token 更新多维表格元数据
4040
+ *
4041
+ * 该接口支持调用频率上限为 10 QPS
4042
+ *
4043
+ * - 飞书文档、飞书表格、知识库中的多维表格不支持开启高级权限;- 此接口非原子操作,先修改多维表格名字,后开关高级权限。可能存在部分成功的情况
4044
+ */
4045
+ update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4046
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
4047
+ return httpInstance
4048
+ .request({
4049
+ url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4050
+ method: "PUT",
4051
+ data,
4052
+ params,
4053
+ headers,
4054
+ })
4055
+ .catch((e) => {
4056
+ this.logger.error(formatErrors(e));
4057
+ throw e;
4058
+ });
4059
+ }),
4060
+ },
3973
4061
  /**
3974
4062
  * 仪表盘
3975
4063
  */
@@ -4073,65 +4161,6 @@ class Client$1 {
4073
4161
  });
4074
4162
  }),
4075
4163
  },
4076
- /**
4077
- * 多维表格
4078
- */
4079
- app: {
4080
- /**
4081
- * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=get&version=v1 click to debug }
4082
- *
4083
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/get document }
4084
- *
4085
- * 获取多维表格元数据
4086
- *
4087
- * 获取指定多维表格的元数据信息,包括多维表格名称,多维表格版本号,多维表格是否开启高级权限等。
4088
- *
4089
- * 该接口支持调用频率上限为 20 QPS(Query Per Second,每秒请求率)
4090
- */
4091
- get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4092
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
4093
- return httpInstance
4094
- .request({
4095
- url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4096
- method: "GET",
4097
- data,
4098
- params,
4099
- headers,
4100
- })
4101
- .catch((e) => {
4102
- this.logger.error(formatErrors(e));
4103
- throw e;
4104
- });
4105
- }),
4106
- /**
4107
- * {@link https://open.feishu.cn/api-explorer?project=bitable&resource=app&apiName=update&version=v1 click to debug }
4108
- *
4109
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app/update document }
4110
- *
4111
- * 更新多维表格元数据
4112
- *
4113
- * 通过 app_token 更新多维表格元数据
4114
- *
4115
- * 该接口支持调用频率上限为 10 QPS
4116
- *
4117
- * - 飞书文档、飞书表格、知识库中的多维表格不支持开启高级权限;- 此接口非原子操作,先修改多维表格名字,后开关高级权限。可能存在部分成功的情况
4118
- */
4119
- update: (payload, options) => __awaiter(this, void 0, void 0, function* () {
4120
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
4121
- return httpInstance
4122
- .request({
4123
- url: fillApiPath(`${this.domain}/open-apis/bitable/v1/apps/:app_token`, path),
4124
- method: "PUT",
4125
- data,
4126
- params,
4127
- headers,
4128
- })
4129
- .catch((e) => {
4130
- this.logger.error(formatErrors(e));
4131
- throw e;
4132
- });
4133
- }),
4134
- },
4135
4164
  /**
4136
4165
  * 自定义角色
4137
4166
  */
@@ -10384,41 +10413,9 @@ class Client$1 {
10384
10413
  */
10385
10414
  this.exam = {};
10386
10415
  /**
10387
- * AI能力
10388
- */
10389
- this.face_detection = {
10390
- /**
10391
- * 图片
10416
+
10392
10417
  */
10393
- image: {
10394
- /**
10395
- * {@link https://open.feishu.cn/api-explorer?project=face_detection&resource=image&apiName=detect_face_attributes&version=v1 click to debug }
10396
- *
10397
- * {@link https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/face_detection-v1/image/detect_face_attributes document }
10398
- *
10399
- * 人脸检测和属性分析
10400
- *
10401
- * 检测图片中的人脸属性和质量等信息
10402
- *
10403
- * 注意:返回值为 -1 表示该功能还暂未实现
10404
- */
10405
- detectFaceAttributes: (payload, options) => __awaiter(this, void 0, void 0, function* () {
10406
- const { headers, params, data, path } = yield this.formatPayload(payload, options);
10407
- return httpInstance
10408
- .request({
10409
- url: fillApiPath(`${this.domain}/open-apis/face_detection/v1/image/detect_face_attributes`, path),
10410
- method: "POST",
10411
- data,
10412
- params,
10413
- headers,
10414
- })
10415
- .catch((e) => {
10416
- this.logger.error(formatErrors(e));
10417
- throw e;
10418
- });
10419
- }),
10420
- },
10421
- };
10418
+ this.face_detection = {};
10422
10419
  /**
10423
10420
 
10424
10421
  */
@@ -11990,7 +11987,7 @@ class Client$1 {
11990
11987
  */
11991
11988
  this.hire = {
11992
11989
  /**
11993
- * 入职
11990
+ * 投递
11994
11991
  */
11995
11992
  application: {
11996
11993
  /**
@@ -19067,6 +19064,225 @@ class Client$1 {
19067
19064
  });
19068
19065
  }),
19069
19066
  },
19067
+ /**
19068
+ * meeting_list
19069
+ */
19070
+ meetingList: {
19071
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19072
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19073
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19074
+ const res = yield httpInstance
19075
+ .request({
19076
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path),
19077
+ method: "GET",
19078
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
19079
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
19080
+ })
19081
+ .catch((e) => {
19082
+ this.logger.error(formatErrors(e));
19083
+ });
19084
+ return res;
19085
+ });
19086
+ const Iterable = {
19087
+ [Symbol.asyncIterator]() {
19088
+ return __asyncGenerator(this, arguments, function* _a() {
19089
+ let hasMore = true;
19090
+ let pageToken;
19091
+ while (hasMore) {
19092
+ try {
19093
+ const res = yield __await(sendRequest({
19094
+ headers,
19095
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19096
+ data,
19097
+ }));
19098
+ const _b = get__default["default"](res, "data") || {}, {
19099
+ // @ts-ignore
19100
+ has_more,
19101
+ // @ts-ignore
19102
+ page_token,
19103
+ // @ts-ignore
19104
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19105
+ yield yield __await(rest);
19106
+ hasMore = Boolean(has_more);
19107
+ pageToken = page_token || next_page_token;
19108
+ }
19109
+ catch (e) {
19110
+ yield yield __await(null);
19111
+ break;
19112
+ }
19113
+ }
19114
+ });
19115
+ },
19116
+ };
19117
+ return Iterable;
19118
+ }),
19119
+ /**
19120
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=meeting_list&apiName=get&version=v1 click to debug }
19121
+ *
19122
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=meeting_list&version=v1 document }
19123
+ */
19124
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19125
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19126
+ return httpInstance
19127
+ .request({
19128
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/meeting_list`, path),
19129
+ method: "GET",
19130
+ data,
19131
+ params,
19132
+ headers,
19133
+ })
19134
+ .catch((e) => {
19135
+ this.logger.error(formatErrors(e));
19136
+ throw e;
19137
+ });
19138
+ }),
19139
+ },
19140
+ /**
19141
+ * participant_list
19142
+ */
19143
+ participantList: {
19144
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19145
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19146
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19147
+ const res = yield httpInstance
19148
+ .request({
19149
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path),
19150
+ method: "GET",
19151
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
19152
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
19153
+ })
19154
+ .catch((e) => {
19155
+ this.logger.error(formatErrors(e));
19156
+ });
19157
+ return res;
19158
+ });
19159
+ const Iterable = {
19160
+ [Symbol.asyncIterator]() {
19161
+ return __asyncGenerator(this, arguments, function* _a() {
19162
+ let hasMore = true;
19163
+ let pageToken;
19164
+ while (hasMore) {
19165
+ try {
19166
+ const res = yield __await(sendRequest({
19167
+ headers,
19168
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19169
+ data,
19170
+ }));
19171
+ const _b = get__default["default"](res, "data") || {}, {
19172
+ // @ts-ignore
19173
+ has_more,
19174
+ // @ts-ignore
19175
+ page_token,
19176
+ // @ts-ignore
19177
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19178
+ yield yield __await(rest);
19179
+ hasMore = Boolean(has_more);
19180
+ pageToken = page_token || next_page_token;
19181
+ }
19182
+ catch (e) {
19183
+ yield yield __await(null);
19184
+ break;
19185
+ }
19186
+ }
19187
+ });
19188
+ },
19189
+ };
19190
+ return Iterable;
19191
+ }),
19192
+ /**
19193
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_list&apiName=get&version=v1 click to debug }
19194
+ *
19195
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_list&version=v1 document }
19196
+ */
19197
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19198
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19199
+ return httpInstance
19200
+ .request({
19201
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_list`, path),
19202
+ method: "GET",
19203
+ data,
19204
+ params,
19205
+ headers,
19206
+ })
19207
+ .catch((e) => {
19208
+ this.logger.error(formatErrors(e));
19209
+ throw e;
19210
+ });
19211
+ }),
19212
+ },
19213
+ /**
19214
+ * participant_quality_list
19215
+ */
19216
+ participantQualityList: {
19217
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19218
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19219
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19220
+ const res = yield httpInstance
19221
+ .request({
19222
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path),
19223
+ method: "GET",
19224
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
19225
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
19226
+ })
19227
+ .catch((e) => {
19228
+ this.logger.error(formatErrors(e));
19229
+ });
19230
+ return res;
19231
+ });
19232
+ const Iterable = {
19233
+ [Symbol.asyncIterator]() {
19234
+ return __asyncGenerator(this, arguments, function* _a() {
19235
+ let hasMore = true;
19236
+ let pageToken;
19237
+ while (hasMore) {
19238
+ try {
19239
+ const res = yield __await(sendRequest({
19240
+ headers,
19241
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19242
+ data,
19243
+ }));
19244
+ const _b = get__default["default"](res, "data") || {}, {
19245
+ // @ts-ignore
19246
+ has_more,
19247
+ // @ts-ignore
19248
+ page_token,
19249
+ // @ts-ignore
19250
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19251
+ yield yield __await(rest);
19252
+ hasMore = Boolean(has_more);
19253
+ pageToken = page_token || next_page_token;
19254
+ }
19255
+ catch (e) {
19256
+ yield yield __await(null);
19257
+ break;
19258
+ }
19259
+ }
19260
+ });
19261
+ },
19262
+ };
19263
+ return Iterable;
19264
+ }),
19265
+ /**
19266
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=participant_quality_list&apiName=get&version=v1 click to debug }
19267
+ *
19268
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=participant_quality_list&version=v1 document }
19269
+ */
19270
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19271
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19272
+ return httpInstance
19273
+ .request({
19274
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/participant_quality_list`, path),
19275
+ method: "GET",
19276
+ data,
19277
+ params,
19278
+ headers,
19279
+ })
19280
+ .catch((e) => {
19281
+ this.logger.error(formatErrors(e));
19282
+ throw e;
19283
+ });
19284
+ }),
19285
+ },
19070
19286
  /**
19071
19287
  * 会议报告
19072
19288
  */
@@ -19259,6 +19475,51 @@ class Client$1 {
19259
19475
  });
19260
19476
  }),
19261
19477
  },
19478
+ /**
19479
+ * reserve_config.admin
19480
+ */
19481
+ reserveConfigAdmin: {
19482
+ /**
19483
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=get&version=v1 click to debug }
19484
+ *
19485
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=reserve_config.admin&version=v1 document }
19486
+ */
19487
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19488
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19489
+ return httpInstance
19490
+ .request({
19491
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path),
19492
+ method: "GET",
19493
+ data,
19494
+ params,
19495
+ headers,
19496
+ })
19497
+ .catch((e) => {
19498
+ this.logger.error(formatErrors(e));
19499
+ throw e;
19500
+ });
19501
+ }),
19502
+ /**
19503
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=reserve_config.admin&apiName=patch&version=v1 click to debug }
19504
+ *
19505
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=vc&resource=reserve_config.admin&version=v1 document }
19506
+ */
19507
+ patch: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19508
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19509
+ return httpInstance
19510
+ .request({
19511
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/reserve_configs/:reserve_config_id/admin`, path),
19512
+ method: "PATCH",
19513
+ data,
19514
+ params,
19515
+ headers,
19516
+ })
19517
+ .catch((e) => {
19518
+ this.logger.error(formatErrors(e));
19519
+ throw e;
19520
+ });
19521
+ }),
19522
+ },
19262
19523
  /**
19263
19524
  * reserve_config
19264
19525
  */
@@ -19312,6 +19573,79 @@ class Client$1 {
19312
19573
  });
19313
19574
  }),
19314
19575
  },
19576
+ /**
19577
+ * resource_reservation_list
19578
+ */
19579
+ resourceReservationList: {
19580
+ getWithIterator: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19581
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19582
+ const sendRequest = (innerPayload) => __awaiter(this, void 0, void 0, function* () {
19583
+ const res = yield httpInstance
19584
+ .request({
19585
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path),
19586
+ method: "GET",
19587
+ headers: pickBy__default["default"](innerPayload.headers, identity__default["default"]),
19588
+ params: pickBy__default["default"](innerPayload.params, identity__default["default"]),
19589
+ })
19590
+ .catch((e) => {
19591
+ this.logger.error(formatErrors(e));
19592
+ });
19593
+ return res;
19594
+ });
19595
+ const Iterable = {
19596
+ [Symbol.asyncIterator]() {
19597
+ return __asyncGenerator(this, arguments, function* _a() {
19598
+ let hasMore = true;
19599
+ let pageToken;
19600
+ while (hasMore) {
19601
+ try {
19602
+ const res = yield __await(sendRequest({
19603
+ headers,
19604
+ params: Object.assign(Object.assign({}, params), { page_token: pageToken }),
19605
+ data,
19606
+ }));
19607
+ const _b = get__default["default"](res, "data") || {}, {
19608
+ // @ts-ignore
19609
+ has_more,
19610
+ // @ts-ignore
19611
+ page_token,
19612
+ // @ts-ignore
19613
+ next_page_token } = _b, rest = __rest(_b, ["has_more", "page_token", "next_page_token"]);
19614
+ yield yield __await(rest);
19615
+ hasMore = Boolean(has_more);
19616
+ pageToken = page_token || next_page_token;
19617
+ }
19618
+ catch (e) {
19619
+ yield yield __await(null);
19620
+ break;
19621
+ }
19622
+ }
19623
+ });
19624
+ },
19625
+ };
19626
+ return Iterable;
19627
+ }),
19628
+ /**
19629
+ * {@link https://open.feishu.cn/api-explorer?project=vc&resource=resource_reservation_list&apiName=get&version=v1 click to debug }
19630
+ *
19631
+ * {@link https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=vc&resource=resource_reservation_list&version=v1 document }
19632
+ */
19633
+ get: (payload, options) => __awaiter(this, void 0, void 0, function* () {
19634
+ const { headers, params, data, path } = yield this.formatPayload(payload, options);
19635
+ return httpInstance
19636
+ .request({
19637
+ url: fillApiPath(`${this.domain}/open-apis/vc/v1/resource_reservation_list`, path),
19638
+ method: "GET",
19639
+ data,
19640
+ params,
19641
+ headers,
19642
+ })
19643
+ .catch((e) => {
19644
+ this.logger.error(formatErrors(e));
19645
+ throw e;
19646
+ });
19647
+ }),
19648
+ },
19315
19649
  /**
19316
19650
  * 会议室
19317
19651
  */
@@ -20415,7 +20749,9 @@ class AppTicketManager {
20415
20749
  var _a;
20416
20750
  return __awaiter(this, void 0, void 0, function* () {
20417
20751
  if (this.appType === exports.AppType.ISV) {
20418
- const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket));
20752
+ const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket, {
20753
+ namespace: this.appId
20754
+ }));
20419
20755
  if (!appTicket) {
20420
20756
  this.requestAppTicket();
20421
20757
  }
@@ -20438,7 +20774,9 @@ class AppTicketManager {
20438
20774
  getAppTicket() {
20439
20775
  var _a;
20440
20776
  return __awaiter(this, void 0, void 0, function* () {
20441
- const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket));
20777
+ const appTicket = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CAppTicket, {
20778
+ namespace: this.appId
20779
+ }));
20442
20780
  if (appTicket) {
20443
20781
  this.logger.debug('use cache app ticket');
20444
20782
  return appTicket;
@@ -20470,7 +20808,9 @@ class TokenManager {
20470
20808
  getCustomTenantAccessToken() {
20471
20809
  var _a, _b;
20472
20810
  return __awaiter(this, void 0, void 0, function* () {
20473
- const cachedTenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CTenantAccessToken));
20811
+ const cachedTenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(CTenantAccessToken, {
20812
+ namespace: this.appId
20813
+ }));
20474
20814
  if (cachedTenantAccessToken) {
20475
20815
  this.logger.debug('use cache token');
20476
20816
  return cachedTenantAccessToken;
@@ -20487,7 +20827,9 @@ class TokenManager {
20487
20827
  });
20488
20828
  yield ((_b = this.cache) === null || _b === void 0 ? void 0 : _b.set(CTenantAccessToken, tenant_access_token,
20489
20829
  // Due to the time-consuming network, the expiration time needs to be 3 minutes earlier
20490
- new Date().getTime() + expire * 1000 - 3 * 60 * 1000));
20830
+ new Date().getTime() + expire * 1000 - 3 * 60 * 1000, {
20831
+ namespace: this.appId
20832
+ }));
20491
20833
  return tenant_access_token;
20492
20834
  });
20493
20835
  }
@@ -20498,7 +20840,9 @@ class TokenManager {
20498
20840
  this.logger.error('market app request need tenant key');
20499
20841
  return undefined;
20500
20842
  }
20501
- const tenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(`larkMarketAccessToken${tenantKey}`));
20843
+ const tenantAccessToken = yield ((_a = this.cache) === null || _a === void 0 ? void 0 : _a.get(`larkMarketAccessToken${tenantKey}`, {
20844
+ namespace: this.appId
20845
+ }));
20502
20846
  if (tenantAccessToken) {
20503
20847
  this.logger.debug('use cache token');
20504
20848
  return tenantAccessToken;
@@ -20535,7 +20879,9 @@ class TokenManager {
20535
20879
  // 设置tenant_access_token
20536
20880
  yield this.cache.set(`larkMarketAccessToken${tenantKey}`, tenant_access_token,
20537
20881
  // Due to the time-consuming network, the expiration time needs to be 3 minutes earlier
20538
- new Date().getTime() + expire * 1000 - 3 * 60 * 1000);
20882
+ new Date().getTime() + expire * 1000 - 3 * 60 * 1000, {
20883
+ namespace: this.appId
20884
+ });
20539
20885
  return tenant_access_token;
20540
20886
  });
20541
20887
  }
@@ -20761,9 +21107,11 @@ class EventDispatcher {
20761
21107
  registerAppTicketHandle() {
20762
21108
  this.register({
20763
21109
  app_ticket: (data) => __awaiter(this, void 0, void 0, function* () {
20764
- const { app_ticket } = data;
21110
+ const { app_ticket, app_id } = data;
20765
21111
  if (app_ticket) {
20766
- yield this.cache.set(CAppTicket, app_ticket);
21112
+ yield this.cache.set(CAppTicket, app_ticket, undefined, {
21113
+ namespace: app_id
21114
+ });
20767
21115
  this.logger.debug('set app ticket');
20768
21116
  }
20769
21117
  else {
@@ -20824,9 +21172,11 @@ class CardActionHandler {
20824
21172
  registerAppTicketHandle() {
20825
21173
  this.register({
20826
21174
  app_ticket: (data) => __awaiter(this, void 0, void 0, function* () {
20827
- const { app_ticket } = data;
21175
+ const { app_ticket, app_id } = data;
20828
21176
  if (app_ticket) {
20829
- yield this.cache.set(CAppTicket, app_ticket);
21177
+ yield this.cache.set(CAppTicket, app_ticket, undefined, {
21178
+ namespace: app_id
21179
+ });
20830
21180
  this.logger.debug('set app ticket');
20831
21181
  }
20832
21182
  else {