@satorijs/adapter-lark 3.12.3 → 3.12.5

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.
@@ -0,0 +1,432 @@
1
+ import * as Lark from '.'
2
+ import { Internal, Paginated, Pagination } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ spark: Spark.Methods
7
+ }
8
+ }
9
+
10
+ export namespace Spark {
11
+ export interface Methods {
12
+ app: App.Methods
13
+ directory: Directory.Methods
14
+ }
15
+
16
+ export namespace App {
17
+ export interface Methods {
18
+ table: Table.Methods
19
+ view: View.Methods
20
+ enum: Enum.Methods
21
+ storage: Storage.Methods
22
+ /**
23
+ * 执行 SQL
24
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app/sql_commands
25
+ */
26
+ sqlCommands(app_id: string, body: SqlCommandsRequest, query?: SqlCommandsQuery): Promise<SqlCommandsResponse>
27
+ }
28
+
29
+ export interface SqlCommandsRequest {
30
+ /** 要执行的 SQL 语句 */
31
+ sql: string
32
+ }
33
+
34
+ export interface SqlCommandsQuery {
35
+ /** 访问的 database 环境,默认为 online(线上环境) */
36
+ env?: string
37
+ }
38
+
39
+ export interface SqlCommandsResponse {
40
+ /** 如果是 SELECT 命令,返回的是查询结果的 JSON 序列化字符串。如果是其他无返回的命令,如 DELETE 等,result 为空 */
41
+ result: string
42
+ }
43
+
44
+ export namespace Table {
45
+ export interface Methods {
46
+ /**
47
+ * 获取数据表列表
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/get_table_list
49
+ */
50
+ getTableList(app_id: string, query?: GetTableListQuery): Paginated<Lark.AppTable>
51
+ /**
52
+ * 获取数据表详细信息
53
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/get_table_detail
54
+ */
55
+ getTableDetail(app_id: string, table_name: string, query?: GetTableDetailQuery): Promise<GetTableDetailResponse>
56
+ /**
57
+ * 查询数据表数据记录
58
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/get_table_record_list
59
+ */
60
+ getTableRecordList(app_id: string, table_name: string, query?: GetTableRecordListQuery): Promise<GetTableRecordListResponse>
61
+ /**
62
+ * 向数据表中添加或更新记录
63
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/post_table_records
64
+ */
65
+ postTableRecords(app_id: string, table_name: string, body: PostTableRecordsRequest, query?: PostTableRecordsQuery): Promise<PostTableRecordsResponse>
66
+ /**
67
+ * 按条件更新数据表中的记录
68
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/patch_table_records
69
+ */
70
+ patchTableRecords(app_id: string, table_name: string, body: PatchTableRecordsRequest, query?: PatchTableRecordsQuery): Promise<PatchTableRecordsResponse>
71
+ /**
72
+ * 批量更新数据表中的记录
73
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/batch_update_table_records
74
+ */
75
+ batchUpdateTableRecords(app_id: string, table_name: string, body: BatchUpdateTableRecordsRequest, query?: BatchUpdateTableRecordsQuery): Promise<BatchUpdateTableRecordsResponse>
76
+ /**
77
+ * 删除数据表中的记录
78
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/delete_table_records
79
+ */
80
+ deleteTableRecords(app_id: string, table_name: string, query?: DeleteTableRecordsQuery): Promise<void>
81
+ }
82
+
83
+ export interface GetTableListQuery extends Pagination {
84
+ /** 访问的 database 环境,默认为 online(线上环境) */
85
+ env?: string
86
+ }
87
+
88
+ export interface GetTableDetailQuery {
89
+ /** 访问的 database 环境,默认为 online(线上环境) */
90
+ env?: string
91
+ }
92
+
93
+ export interface GetTableDetailResponse {
94
+ /** 数据表名,如 student */
95
+ name: string
96
+ /** 数据表描述 */
97
+ description: string
98
+ /** 数据表列 */
99
+ columns: Lark.AppTableColumn[]
100
+ }
101
+
102
+ export interface GetTableRecordListQuery extends Pagination {
103
+ /**
104
+ * 返回的列,默认为 *,即返回所有列。
105
+ * 遵循 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
106
+ */
107
+ select?: string
108
+ /** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
109
+ filter?: string
110
+ /**
111
+ * 排序条件,如果没指定 asc/desc,默认为 asc,null 值可排在最前或最后。
112
+ * 尊许 PostgREST 语法,详情可查看
113
+ * https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
114
+ */
115
+ order?: string
116
+ /** 访问的 database 环境,默认为 online(线上环境) */
117
+ env?: string
118
+ /**
119
+ * 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
120
+ * 示例值:`miaoda_user_id`
121
+ * 可选值:
122
+ * - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
123
+ * - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
124
+ * - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
125
+ * 默认值:`miaoda_user_id`
126
+ */
127
+ user_identifier_type?: string
128
+ }
129
+
130
+ export interface GetTableRecordListResponse {
131
+ /** 是否还有更多项 */
132
+ has_more: boolean
133
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
134
+ page_token: string
135
+ /** 符合条件的记录总数 */
136
+ total: number
137
+ /** 数据记录列表,格式为数组序列化后的 JSONString */
138
+ items: string
139
+ }
140
+
141
+ export interface PostTableRecordsRequest {
142
+ /** 要插入的数据记录列表,单次支持最多 500 条 */
143
+ records: string
144
+ }
145
+
146
+ export interface PostTableRecordsQuery {
147
+ /** UPSERT 时使用,指定列,多列英文逗号拼接 */
148
+ columns?: string
149
+ /**
150
+ * UPSERT 时使用,指定使用哪一个或多个具有唯一约束的字段作为冲突判断依据,默认为表主键。
151
+ * 假设 user_products 表有一个由 user_id 和 product_id 组成的复合唯一约束
152
+ */
153
+ on_conflict?: string
154
+ /** 访问的 database 环境,默认为 online(线上环境) */
155
+ env?: string
156
+ /**
157
+ * 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
158
+ * 示例值:`miaoda_user_id`
159
+ * 可选值:
160
+ * - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
161
+ * - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
162
+ * - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
163
+ * 默认值:`miaoda_user_id`
164
+ */
165
+ user_identifier_type?: string
166
+ }
167
+
168
+ export interface PostTableRecordsResponse {
169
+ /** 按照记录顺序创建或更新的记录 ID 列表 */
170
+ record_ids: Lark.Uuid[]
171
+ }
172
+
173
+ export interface PatchTableRecordsRequest {
174
+ /** 要更新的数据记录信息 */
175
+ record: string
176
+ }
177
+
178
+ export interface PatchTableRecordsQuery {
179
+ /** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
180
+ filter: string
181
+ /** 访问的 database 环境,默认为 online(线上环境) */
182
+ env?: string
183
+ /**
184
+ * 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
185
+ * 示例值:`miaoda_user_id`
186
+ * 可选值:
187
+ * - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
188
+ * - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
189
+ * - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
190
+ * 默认值:`miaoda_user_id`
191
+ */
192
+ user_identifier_type?: string
193
+ }
194
+
195
+ export interface PatchTableRecordsResponse {
196
+ /** 更新的记录唯一ID列表 */
197
+ record_ids: Lark.Uuid[]
198
+ }
199
+
200
+ export interface BatchUpdateTableRecordsRequest {
201
+ /** 要更新的数据记录列表,单次支持最多 500条,每行 record 都必须包含主键 _id,且不同行要更新的字段需保持一致 */
202
+ records: string
203
+ }
204
+
205
+ export interface BatchUpdateTableRecordsQuery {
206
+ /** 访问的 database 环境,默认为 online(线上环境) */
207
+ env?: string
208
+ /**
209
+ * 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
210
+ * 示例值:`miaoda_user_id`
211
+ * 可选值:
212
+ * - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
213
+ * - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
214
+ * - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
215
+ * 默认值:`miaoda_user_id`
216
+ */
217
+ user_identifier_type?: string
218
+ }
219
+
220
+ export interface BatchUpdateTableRecordsResponse {
221
+ /** 更新的记录唯一ID列表 */
222
+ record_ids: Lark.Uuid[]
223
+ }
224
+
225
+ export interface DeleteTableRecordsQuery {
226
+ /**
227
+ * 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering
228
+ * 此处用法和查询数据记录一致
229
+ */
230
+ filter: string
231
+ /** 访问的 database 环境,默认为 online(线上环境) */
232
+ env?: string
233
+ }
234
+ }
235
+
236
+ export namespace View {
237
+ export interface Methods {
238
+ /**
239
+ * 查询视图数据记录
240
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-view/get_view_record_list
241
+ */
242
+ getViewRecordList(app_id: string, view_name: string, query?: GetViewRecordListQuery): Promise<GetViewRecordListResponse>
243
+ }
244
+
245
+ export interface GetViewRecordListQuery extends Pagination {
246
+ /**
247
+ * 返回的列,默认为 *,即返回所有列。
248
+ * 遵循 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
249
+ */
250
+ select?: string
251
+ /** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
252
+ filter?: string
253
+ /**
254
+ * 排序条件,如果没指定 asc/desc,默认为 asc,null 值可排在最前或最后。
255
+ * 尊许 PostgREST 语法,详情可查看
256
+ * https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
257
+ */
258
+ order?: string
259
+ /** 访问的 database 环境,默认为 online(线上环境) */
260
+ env?: string
261
+ /**
262
+ * 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
263
+ * 示例值:`miaoda_user_id`
264
+ * 可选值:
265
+ * - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
266
+ * - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
267
+ * - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
268
+ * 默认值:`miaoda_user_id`
269
+ */
270
+ user_identifier_type?: string
271
+ }
272
+
273
+ export interface GetViewRecordListResponse {
274
+ /** 是否还有更多项 */
275
+ has_more: boolean
276
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
277
+ page_token: string
278
+ /** 符合条件的记录总数 */
279
+ total: number
280
+ /** 数据记录列表,格式为数组序列化后的 JSONString */
281
+ items: string
282
+ }
283
+ }
284
+
285
+ export namespace Enum {
286
+ export interface Methods {
287
+ /**
288
+ * 获取自定义枚举列表
289
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-enum/get_enum_list
290
+ */
291
+ getEnumList(app_id: string, query?: GetEnumListQuery): Paginated<Lark.AppEnum>
292
+ /**
293
+ * 获取自定义枚举详细信息
294
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-enum/get_enum_detail
295
+ */
296
+ getEnumDetail(app_id: string, enum_name: string, query?: GetEnumDetailQuery): Promise<GetEnumDetailResponse>
297
+ }
298
+
299
+ export interface GetEnumListQuery extends Pagination {
300
+ /** 访问的 database 环境,默认为 online(线上环境) */
301
+ env?: string
302
+ }
303
+
304
+ export interface GetEnumDetailQuery {
305
+ /** 访问的 database 环境,默认为 online(线上环境) */
306
+ env?: string
307
+ }
308
+
309
+ export interface GetEnumDetailResponse {
310
+ /** 枚举名称 */
311
+ name: string
312
+ /** 枚举描述 */
313
+ description: string
314
+ /** 枚举值列表 */
315
+ options: string[]
316
+ /** 创建时间,毫秒时间戳 */
317
+ created_at: string
318
+ }
319
+ }
320
+
321
+ export namespace Storage {
322
+ export interface Methods {
323
+ /**
324
+ * 上传文件
325
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-storage/upload
326
+ */
327
+ upload(app_id: string, form: UploadForm): Promise<UploadResponse>
328
+ /**
329
+ * 下载文件
330
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-storage/download
331
+ */
332
+ download(app_id: string, query?: DownloadQuery): Promise<ArrayBuffer>
333
+ }
334
+
335
+ export interface UploadForm {
336
+ /** 文件名称 */
337
+ file_name: string
338
+ /** 文件的十六进制 SHA-256 值,用于文件一致性校验。如果传入此值,服务端会在上传完成后对比接收到文件的 SHA-256 值,如果不一致,会返回上传失败。 */
339
+ check_sum?: string
340
+ /** 文件二进制 */
341
+ file: Blob
342
+ }
343
+
344
+ export interface UploadResponse {
345
+ /** 文件 ID */
346
+ file_key: string
347
+ /** 文件 URL,相对路径 */
348
+ file_url: string
349
+ /** 文件名称 */
350
+ file_name: string
351
+ /** 文件大小,单位字节 */
352
+ file_size: number
353
+ /** 文件 MIME 类型 */
354
+ mime_type: string
355
+ }
356
+
357
+ export interface DownloadQuery {
358
+ /** 文件 ID,ID 和 URL 不能同时为空,都提供的情况下,使用 file_key */
359
+ file_key?: string
360
+ /** 文件 URL,ID 和 URL 不能同时为空 */
361
+ file_url?: string
362
+ }
363
+ }
364
+ }
365
+
366
+ export namespace Directory {
367
+ export interface Methods {
368
+ user: User.Methods
369
+ }
370
+
371
+ export namespace User {
372
+ export interface Methods {
373
+ /**
374
+ * 妙搭和飞书用户 ID 转换
375
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/directory-user/id_convert
376
+ */
377
+ idConvert(body: IdConvertRequest): Promise<IdConvertResponse>
378
+ }
379
+
380
+ export interface IdConvertRequest {
381
+ /** ID 转换类型,枚举 */
382
+ id_convert_type: Lark.IdConvertType
383
+ /** 长度最大100 */
384
+ ids?: string[]
385
+ }
386
+
387
+ export interface IdConvertResponse {
388
+ /** ID 映射,查询不到或者查询出错的不返回 */
389
+ items?: Lark.IdMapItem[]
390
+ }
391
+ }
392
+ }
393
+ }
394
+
395
+ Internal.define({
396
+ '/spark/v1/apps/{app_id}/tables': {
397
+ GET: { name: 'spark.app.table.getTableList', pagination: { argIndex: 1 } },
398
+ },
399
+ '/spark/v1/apps/{app_id}/tables/{table_name}': {
400
+ GET: 'spark.app.table.getTableDetail',
401
+ },
402
+ '/spark/v1/apps/{app_id}/tables/{table_name}/records': {
403
+ GET: 'spark.app.table.getTableRecordList',
404
+ POST: 'spark.app.table.postTableRecords',
405
+ PATCH: 'spark.app.table.patchTableRecords',
406
+ DELETE: 'spark.app.table.deleteTableRecords',
407
+ },
408
+ '/spark/v1/apps/{app_id}/tables/{table_name}/records_batch_update': {
409
+ PATCH: 'spark.app.table.batchUpdateTableRecords',
410
+ },
411
+ '/spark/v1/apps/{app_id}/views/{view_name}/records': {
412
+ GET: 'spark.app.view.getViewRecordList',
413
+ },
414
+ '/spark/v1/apps/{app_id}/enums': {
415
+ GET: { name: 'spark.app.enum.getEnumList', pagination: { argIndex: 1 } },
416
+ },
417
+ '/spark/v1/apps/{app_id}/enums/{enum_name}': {
418
+ GET: 'spark.app.enum.getEnumDetail',
419
+ },
420
+ '/spark/v1/apps/{app_id}/storage/upload': {
421
+ POST: { name: 'spark.app.storage.upload', multipart: true },
422
+ },
423
+ '/spark/v1/apps/{app_id}/storage': {
424
+ GET: { name: 'spark.app.storage.download', type: 'binary' },
425
+ },
426
+ '/spark/v1/apps/{app_id}/sql_commands': {
427
+ POST: 'spark.app.sqlCommands',
428
+ },
429
+ '/spark/v1/directory/user/id_convert': {
430
+ POST: 'spark.directory.user.idConvert',
431
+ },
432
+ })
package/src/types/vc.ts CHANGED
@@ -9,6 +9,7 @@ declare module '../internal' {
9
9
 
10
10
  export namespace Vc {
11
11
  export interface Methods {
12
+ note: Note.Methods
12
13
  reserve: Reserve.Methods
13
14
  meeting: Meeting.Methods
14
15
  report: Report.Methods
@@ -25,6 +26,26 @@ export namespace Vc {
25
26
  roomConfig: RoomConfig.Methods
26
27
  }
27
28
 
29
+ export namespace Note {
30
+ export interface Methods {
31
+ /**
32
+ * 获取纪要详情
33
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/note/get
34
+ */
35
+ get(note_id: string, query?: GetQuery): Promise<GetResponse>
36
+ }
37
+
38
+ export interface GetQuery {
39
+ /** 此次调用中使用的用户ID的类型 */
40
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
41
+ }
42
+
43
+ export interface GetResponse {
44
+ /** 纪要信息 */
45
+ note?: Lark.Note
46
+ }
47
+ }
48
+
28
49
  export namespace Reserve {
29
50
  export interface Methods {
30
51
  /**
@@ -114,6 +135,11 @@ export namespace Vc {
114
135
  export namespace Meeting {
115
136
  export interface Methods {
116
137
  recording: Recording.Methods
138
+ /**
139
+ * 搜索会议记录
140
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/search
141
+ */
142
+ search(body: SearchRequest, query?: Pagination): Promise<SearchResponse> & AsyncIterableIterator<Lark.MeetingSearchItem>
117
143
  /**
118
144
  * 邀请参会人
119
145
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/invite
@@ -146,6 +172,27 @@ export namespace Vc {
146
172
  listByNo(query?: ListByNoQuery): Paginated<Lark.Meeting, 'meeting_briefs'>
147
173
  }
148
174
 
175
+ export interface SearchRequest {
176
+ /**
177
+ * 搜索关键词
178
+ * **数据校验规则:** 长度范围:1 字符 ~ 50 字符
179
+ */
180
+ query?: string
181
+ /** 视频会议过滤参数 */
182
+ meeting_filter?: Lark.MeetingFilter
183
+ }
184
+
185
+ export interface SearchResponse {
186
+ /** 匹配结果总数(辅助分页参考) */
187
+ total?: number
188
+ /** 是否有更多数据可供加载 */
189
+ has_more: boolean
190
+ /** 返回结果列表 */
191
+ items?: Lark.MeetingSearchItem[]
192
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
193
+ page_token?: string
194
+ }
195
+
149
196
  export interface InviteRequest {
150
197
  /** 被邀请的用户列表 */
151
198
  invitees: Lark.MeetingUser[]
@@ -1362,6 +1409,9 @@ export namespace Vc {
1362
1409
  }
1363
1410
 
1364
1411
  Internal.define({
1412
+ '/vc/v1/notes/{note_id}': {
1413
+ GET: 'vc.note.get',
1414
+ },
1365
1415
  '/vc/v1/reserves/apply': {
1366
1416
  POST: 'vc.reserve.apply',
1367
1417
  },
@@ -1373,6 +1423,9 @@ Internal.define({
1373
1423
  '/vc/v1/reserves/{reserve_id}/get_active_meeting': {
1374
1424
  GET: 'vc.reserve.getActiveMeeting',
1375
1425
  },
1426
+ '/vc/v1/meetings/search': {
1427
+ POST: { name: 'vc.meeting.search', pagination: { argIndex: 1 } },
1428
+ },
1376
1429
  '/vc/v1/meetings/{meeting_id}/invite': {
1377
1430
  PATCH: 'vc.meeting.invite',
1378
1431
  },
package/src/utils.ts CHANGED
@@ -220,7 +220,8 @@ export async function adaptMessage<C extends Context = Context>(
220
220
  session.guildId = data.message.chat_id
221
221
  session.content = content.map((c) => c.toString()).join(' ')
222
222
 
223
- if (data.message.parent_id && details) {
223
+ // thread messages should not be treated as quotes
224
+ if (data.message.parent_id && !data.message.thread_id && details) {
224
225
  session.quote = await bot.getMessage(session.channelId, data.message.parent_id, false)
225
226
  }
226
227
  return session