@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.
- package/lib/index.cjs +183 -3
- package/lib/types/apaas.d.ts +45 -0
- package/lib/types/application.d.ts +117 -0
- package/lib/types/approval.d.ts +58 -0
- package/lib/types/bitable.d.ts +51 -0
- package/lib/types/contact.d.ts +17 -0
- package/lib/types/corehr.d.ts +249 -0
- package/lib/types/drive.d.ts +89 -0
- package/lib/types/im.d.ts +26 -1
- package/lib/types/index.d.ts +591 -32
- package/lib/types/minutes.d.ts +13 -0
- package/lib/types/performance.d.ts +27 -0
- package/lib/types/search.d.ts +32 -0
- package/lib/types/security_and_compliance.d.ts +86 -0
- package/lib/types/spark.d.ts +356 -0
- package/lib/types/vc.d.ts +42 -0
- package/package.json +3 -3
- package/src/bot.ts +0 -1
- package/src/types/apaas.ts +60 -0
- package/src/types/application.ts +146 -0
- package/src/types/approval.ts +72 -0
- package/src/types/bitable.ts +67 -0
- package/src/types/contact.ts +23 -0
- package/src/types/corehr.ts +307 -0
- package/src/types/drive.ts +113 -0
- package/src/types/im.ts +32 -1
- package/src/types/index.ts +647 -32
- package/src/types/minutes.ts +17 -0
- package/src/types/performance.ts +34 -0
- package/src/types/search.ts +38 -0
- package/src/types/security_and_compliance.ts +115 -0
- package/src/types/spark.ts +432 -0
- package/src/types/vc.ts +53 -0
- package/src/utils.ts +2 -1
package/lib/types/minutes.d.ts
CHANGED
|
@@ -13,12 +13,25 @@ export declare namespace Minutes {
|
|
|
13
13
|
media: Media.Methods;
|
|
14
14
|
transcript: Transcript.Methods;
|
|
15
15
|
statistics: Statistics.Methods;
|
|
16
|
+
/**
|
|
17
|
+
* 获取妙记AI产物
|
|
18
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/minutes-v1/minute/artifacts
|
|
19
|
+
*/
|
|
20
|
+
artifacts(minute_token: string): Promise<ArtifactsResponse>;
|
|
16
21
|
/**
|
|
17
22
|
* 获取妙记信息
|
|
18
23
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/minutes-v1/minute/get
|
|
19
24
|
*/
|
|
20
25
|
get(minute_token: string, query?: GetQuery): Promise<GetResponse>;
|
|
21
26
|
}
|
|
27
|
+
interface ArtifactsResponse {
|
|
28
|
+
/** 妙记总结 */
|
|
29
|
+
summary?: string;
|
|
30
|
+
/** 妙记章节 */
|
|
31
|
+
minute_chapters?: Lark.MinuteChapter[];
|
|
32
|
+
/** 妙记待办 */
|
|
33
|
+
minute_todos?: Lark.MinuteTodo[];
|
|
34
|
+
}
|
|
22
35
|
interface GetQuery {
|
|
23
36
|
/** 此次调用中使用的用户ID的类型 */
|
|
24
37
|
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
@@ -13,6 +13,7 @@ export declare namespace Performance {
|
|
|
13
13
|
additionalInformations: AdditionalInformations.Methods;
|
|
14
14
|
userGroupUserRel: UserGroupUserRel.Methods;
|
|
15
15
|
reviewee: Reviewee.Methods;
|
|
16
|
+
userInfo: UserInfo.Methods;
|
|
16
17
|
reviewTemplate: ReviewTemplate.Methods;
|
|
17
18
|
indicator: Indicator.Methods;
|
|
18
19
|
question: Question.Methods;
|
|
@@ -209,6 +210,32 @@ export declare namespace Performance {
|
|
|
209
210
|
page_token?: string;
|
|
210
211
|
}
|
|
211
212
|
}
|
|
213
|
+
namespace UserInfo {
|
|
214
|
+
interface Methods {
|
|
215
|
+
/**
|
|
216
|
+
* 获取绩效周期的人员信息
|
|
217
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/user_info/query
|
|
218
|
+
*/
|
|
219
|
+
query(body: QueryRequest, query?: QueryQuery): Promise<QueryResponse>;
|
|
220
|
+
}
|
|
221
|
+
interface QueryRequest {
|
|
222
|
+
/** 评估周期 ID 列表,semester_id 可通过【获取周期】获得 */
|
|
223
|
+
semester_id: string;
|
|
224
|
+
/** 人员 ID 列表,ID 类型与user_id_type 的取值一致 */
|
|
225
|
+
user_ids: string[];
|
|
226
|
+
}
|
|
227
|
+
interface QueryQuery {
|
|
228
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
229
|
+
/** 指定查询结果中的部门 ID 类型。关于部门 ID 的详细介绍,可参见部门 ID 说明。 */
|
|
230
|
+
department_id_type?: string;
|
|
231
|
+
}
|
|
232
|
+
interface QueryResponse {
|
|
233
|
+
/** 评估周期 ID */
|
|
234
|
+
semester_id?: string;
|
|
235
|
+
/** 人员的快照信息列表 */
|
|
236
|
+
user_infos?: Lark.UserInfo[];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
212
239
|
namespace ReviewTemplate {
|
|
213
240
|
interface Methods {
|
|
214
241
|
/**
|
package/lib/types/search.d.ts
CHANGED
|
@@ -7,11 +7,43 @@ declare module '../internal' {
|
|
|
7
7
|
}
|
|
8
8
|
export declare namespace Search {
|
|
9
9
|
interface Methods {
|
|
10
|
+
docWiki: DocWiki.Methods;
|
|
10
11
|
message: Message.Methods;
|
|
11
12
|
app: App.Methods;
|
|
12
13
|
dataSource: DataSource.Methods;
|
|
13
14
|
schema: Schema.Methods;
|
|
14
15
|
}
|
|
16
|
+
namespace DocWiki {
|
|
17
|
+
interface Methods {
|
|
18
|
+
/**
|
|
19
|
+
* 搜索文档
|
|
20
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/doc_wiki/search
|
|
21
|
+
*/
|
|
22
|
+
search(body: SearchRequest): Promise<SearchResponse> & AsyncIterableIterator<Lark.DocResUnit>;
|
|
23
|
+
}
|
|
24
|
+
interface SearchRequest {
|
|
25
|
+
/** 搜索关键词 */
|
|
26
|
+
query: string;
|
|
27
|
+
/** 文档过滤参数 */
|
|
28
|
+
doc_filter?: Lark.DocFilter;
|
|
29
|
+
/** Wiki过滤参数 */
|
|
30
|
+
wiki_filter?: Lark.WikiFilter;
|
|
31
|
+
/** 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该page_token获取查询结果 */
|
|
32
|
+
page_token?: string;
|
|
33
|
+
/** 分页大小 */
|
|
34
|
+
page_size?: number;
|
|
35
|
+
}
|
|
36
|
+
interface SearchResponse {
|
|
37
|
+
/** 匹配结果总数(辅助分页参考) */
|
|
38
|
+
total?: number;
|
|
39
|
+
/** 是否有更多数据可供加载 */
|
|
40
|
+
has_more: boolean;
|
|
41
|
+
/** 搜索结果列表 */
|
|
42
|
+
res_units?: Lark.DocResUnit[];
|
|
43
|
+
/** 下一页分页标记,无更多结果时为空 */
|
|
44
|
+
page_token?: string;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
15
47
|
namespace Message {
|
|
16
48
|
interface Methods {
|
|
17
49
|
/**
|
|
@@ -10,6 +10,8 @@ export declare namespace SecurityAndCompliance {
|
|
|
10
10
|
deviceRecord: DeviceRecord.Methods;
|
|
11
11
|
deviceApplyRecord: DeviceApplyRecord.Methods;
|
|
12
12
|
openapiLog: OpenapiLog.Methods;
|
|
13
|
+
multiGeoEntity: MultiGeoEntity.Methods;
|
|
14
|
+
userMigration: UserMigration.Methods;
|
|
13
15
|
}
|
|
14
16
|
namespace DeviceRecord {
|
|
15
17
|
interface Methods {
|
|
@@ -285,4 +287,88 @@ export declare namespace SecurityAndCompliance {
|
|
|
285
287
|
page_token?: string;
|
|
286
288
|
}
|
|
287
289
|
}
|
|
290
|
+
namespace MultiGeoEntity {
|
|
291
|
+
interface Methods {
|
|
292
|
+
tenant: Tenant.Methods;
|
|
293
|
+
}
|
|
294
|
+
namespace Tenant {
|
|
295
|
+
interface Methods {
|
|
296
|
+
/**
|
|
297
|
+
* 获取地理位置列表
|
|
298
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/multi_geo_entity-tenant/get
|
|
299
|
+
*/
|
|
300
|
+
get(): Promise<GetResponse>;
|
|
301
|
+
}
|
|
302
|
+
interface GetResponse {
|
|
303
|
+
/** 多地理位置租户信息 */
|
|
304
|
+
tenant?: Lark.Tenant;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
namespace UserMigration {
|
|
309
|
+
interface Methods {
|
|
310
|
+
/**
|
|
311
|
+
* 迁移用户
|
|
312
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/create
|
|
313
|
+
*/
|
|
314
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
315
|
+
/**
|
|
316
|
+
* 获取单个用户迁移状态
|
|
317
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/get
|
|
318
|
+
*/
|
|
319
|
+
get(user_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
320
|
+
/**
|
|
321
|
+
* 批量获取用户迁移状态
|
|
322
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/search
|
|
323
|
+
*/
|
|
324
|
+
search(body: SearchRequest, query?: SearchQuery): Promise<SearchResponse>;
|
|
325
|
+
/**
|
|
326
|
+
* 取消用户迁移
|
|
327
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/user_migration/cancel
|
|
328
|
+
*/
|
|
329
|
+
cancel(body: CancelRequest, query?: CancelQuery): Promise<void>;
|
|
330
|
+
}
|
|
331
|
+
interface CreateRequest {
|
|
332
|
+
/** 迁移用户 id 列表 */
|
|
333
|
+
user_ids: string[];
|
|
334
|
+
/** 迁移目标地理位置区域 */
|
|
335
|
+
dest_geo: string;
|
|
336
|
+
}
|
|
337
|
+
interface CreateQuery {
|
|
338
|
+
/** 此次调用中使用的用户 ID 的类型 */
|
|
339
|
+
user_id_type: 'user_id' | 'union_id' | 'open_id';
|
|
340
|
+
}
|
|
341
|
+
interface CreateResponse {
|
|
342
|
+
/** 用户迁移列表 */
|
|
343
|
+
user_migrations?: Lark.UserMigration[];
|
|
344
|
+
}
|
|
345
|
+
interface GetQuery {
|
|
346
|
+
/** 用户 id 类型 */
|
|
347
|
+
user_id_type: 'user_id' | 'union_id' | 'open_id';
|
|
348
|
+
}
|
|
349
|
+
interface GetResponse {
|
|
350
|
+
/** 用户迁移 */
|
|
351
|
+
user_migration?: Lark.UserMigration;
|
|
352
|
+
}
|
|
353
|
+
interface SearchRequest {
|
|
354
|
+
/** 用户 id 列表 */
|
|
355
|
+
user_ids: string[];
|
|
356
|
+
}
|
|
357
|
+
interface SearchQuery {
|
|
358
|
+
/** 此次调用中使用的用户 ID 的类型 */
|
|
359
|
+
user_id_type: 'user_id' | 'union_id' | 'open_id';
|
|
360
|
+
}
|
|
361
|
+
interface SearchResponse {
|
|
362
|
+
/** 用户迁移列表 */
|
|
363
|
+
items?: Lark.UserMigration[];
|
|
364
|
+
}
|
|
365
|
+
interface CancelRequest {
|
|
366
|
+
/** 取消迁移用户 id 列表 */
|
|
367
|
+
user_ids: string[];
|
|
368
|
+
}
|
|
369
|
+
interface CancelQuery {
|
|
370
|
+
/** 此次调用中使用的用户 ID 的类型 */
|
|
371
|
+
user_id_type: 'user_id' | 'union_id' | 'open_id';
|
|
372
|
+
}
|
|
373
|
+
}
|
|
288
374
|
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Paginated, Pagination } from '../internal';
|
|
3
|
+
declare module '../internal' {
|
|
4
|
+
interface Internal {
|
|
5
|
+
spark: Spark.Methods;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Spark {
|
|
9
|
+
interface Methods {
|
|
10
|
+
app: App.Methods;
|
|
11
|
+
directory: Directory.Methods;
|
|
12
|
+
}
|
|
13
|
+
namespace App {
|
|
14
|
+
interface Methods {
|
|
15
|
+
table: Table.Methods;
|
|
16
|
+
view: View.Methods;
|
|
17
|
+
enum: Enum.Methods;
|
|
18
|
+
storage: Storage.Methods;
|
|
19
|
+
/**
|
|
20
|
+
* 执行 SQL
|
|
21
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app/sql_commands
|
|
22
|
+
*/
|
|
23
|
+
sqlCommands(app_id: string, body: SqlCommandsRequest, query?: SqlCommandsQuery): Promise<SqlCommandsResponse>;
|
|
24
|
+
}
|
|
25
|
+
interface SqlCommandsRequest {
|
|
26
|
+
/** 要执行的 SQL 语句 */
|
|
27
|
+
sql: string;
|
|
28
|
+
}
|
|
29
|
+
interface SqlCommandsQuery {
|
|
30
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
31
|
+
env?: string;
|
|
32
|
+
}
|
|
33
|
+
interface SqlCommandsResponse {
|
|
34
|
+
/** 如果是 SELECT 命令,返回的是查询结果的 JSON 序列化字符串。如果是其他无返回的命令,如 DELETE 等,result 为空 */
|
|
35
|
+
result: string;
|
|
36
|
+
}
|
|
37
|
+
namespace Table {
|
|
38
|
+
interface Methods {
|
|
39
|
+
/**
|
|
40
|
+
* 获取数据表列表
|
|
41
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/get_table_list
|
|
42
|
+
*/
|
|
43
|
+
getTableList(app_id: string, query?: GetTableListQuery): Paginated<Lark.AppTable>;
|
|
44
|
+
/**
|
|
45
|
+
* 获取数据表详细信息
|
|
46
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/get_table_detail
|
|
47
|
+
*/
|
|
48
|
+
getTableDetail(app_id: string, table_name: string, query?: GetTableDetailQuery): Promise<GetTableDetailResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* 查询数据表数据记录
|
|
51
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/get_table_record_list
|
|
52
|
+
*/
|
|
53
|
+
getTableRecordList(app_id: string, table_name: string, query?: GetTableRecordListQuery): Promise<GetTableRecordListResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* 向数据表中添加或更新记录
|
|
56
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/post_table_records
|
|
57
|
+
*/
|
|
58
|
+
postTableRecords(app_id: string, table_name: string, body: PostTableRecordsRequest, query?: PostTableRecordsQuery): Promise<PostTableRecordsResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* 按条件更新数据表中的记录
|
|
61
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/patch_table_records
|
|
62
|
+
*/
|
|
63
|
+
patchTableRecords(app_id: string, table_name: string, body: PatchTableRecordsRequest, query?: PatchTableRecordsQuery): Promise<PatchTableRecordsResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* 批量更新数据表中的记录
|
|
66
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/batch_update_table_records
|
|
67
|
+
*/
|
|
68
|
+
batchUpdateTableRecords(app_id: string, table_name: string, body: BatchUpdateTableRecordsRequest, query?: BatchUpdateTableRecordsQuery): Promise<BatchUpdateTableRecordsResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* 删除数据表中的记录
|
|
71
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-table/delete_table_records
|
|
72
|
+
*/
|
|
73
|
+
deleteTableRecords(app_id: string, table_name: string, query?: DeleteTableRecordsQuery): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
interface GetTableListQuery extends Pagination {
|
|
76
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
77
|
+
env?: string;
|
|
78
|
+
}
|
|
79
|
+
interface GetTableDetailQuery {
|
|
80
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
81
|
+
env?: string;
|
|
82
|
+
}
|
|
83
|
+
interface GetTableDetailResponse {
|
|
84
|
+
/** 数据表名,如 student */
|
|
85
|
+
name: string;
|
|
86
|
+
/** 数据表描述 */
|
|
87
|
+
description: string;
|
|
88
|
+
/** 数据表列 */
|
|
89
|
+
columns: Lark.AppTableColumn[];
|
|
90
|
+
}
|
|
91
|
+
interface GetTableRecordListQuery extends Pagination {
|
|
92
|
+
/**
|
|
93
|
+
* 返回的列,默认为 *,即返回所有列。
|
|
94
|
+
* 遵循 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
|
|
95
|
+
*/
|
|
96
|
+
select?: string;
|
|
97
|
+
/** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
|
|
98
|
+
filter?: string;
|
|
99
|
+
/**
|
|
100
|
+
* 排序条件,如果没指定 asc/desc,默认为 asc,null 值可排在最前或最后。
|
|
101
|
+
* 尊许 PostgREST 语法,详情可查看
|
|
102
|
+
* https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
|
|
103
|
+
*/
|
|
104
|
+
order?: string;
|
|
105
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
106
|
+
env?: string;
|
|
107
|
+
/**
|
|
108
|
+
* 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
|
|
109
|
+
* 示例值:`miaoda_user_id`
|
|
110
|
+
* 可选值:
|
|
111
|
+
* - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
|
|
112
|
+
* - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
|
|
113
|
+
* - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
|
|
114
|
+
* 默认值:`miaoda_user_id`
|
|
115
|
+
*/
|
|
116
|
+
user_identifier_type?: string;
|
|
117
|
+
}
|
|
118
|
+
interface GetTableRecordListResponse {
|
|
119
|
+
/** 是否还有更多项 */
|
|
120
|
+
has_more: boolean;
|
|
121
|
+
/** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
|
|
122
|
+
page_token: string;
|
|
123
|
+
/** 符合条件的记录总数 */
|
|
124
|
+
total: number;
|
|
125
|
+
/** 数据记录列表,格式为数组序列化后的 JSONString */
|
|
126
|
+
items: string;
|
|
127
|
+
}
|
|
128
|
+
interface PostTableRecordsRequest {
|
|
129
|
+
/** 要插入的数据记录列表,单次支持最多 500 条 */
|
|
130
|
+
records: string;
|
|
131
|
+
}
|
|
132
|
+
interface PostTableRecordsQuery {
|
|
133
|
+
/** UPSERT 时使用,指定列,多列英文逗号拼接 */
|
|
134
|
+
columns?: string;
|
|
135
|
+
/**
|
|
136
|
+
* UPSERT 时使用,指定使用哪一个或多个具有唯一约束的字段作为冲突判断依据,默认为表主键。
|
|
137
|
+
* 假设 user_products 表有一个由 user_id 和 product_id 组成的复合唯一约束
|
|
138
|
+
*/
|
|
139
|
+
on_conflict?: string;
|
|
140
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
141
|
+
env?: string;
|
|
142
|
+
/**
|
|
143
|
+
* 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
|
|
144
|
+
* 示例值:`miaoda_user_id`
|
|
145
|
+
* 可选值:
|
|
146
|
+
* - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
|
|
147
|
+
* - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
|
|
148
|
+
* - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
|
|
149
|
+
* 默认值:`miaoda_user_id`
|
|
150
|
+
*/
|
|
151
|
+
user_identifier_type?: string;
|
|
152
|
+
}
|
|
153
|
+
interface PostTableRecordsResponse {
|
|
154
|
+
/** 按照记录顺序创建或更新的记录 ID 列表 */
|
|
155
|
+
record_ids: Lark.Uuid[];
|
|
156
|
+
}
|
|
157
|
+
interface PatchTableRecordsRequest {
|
|
158
|
+
/** 要更新的数据记录信息 */
|
|
159
|
+
record: string;
|
|
160
|
+
}
|
|
161
|
+
interface PatchTableRecordsQuery {
|
|
162
|
+
/** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
|
|
163
|
+
filter: string;
|
|
164
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
165
|
+
env?: string;
|
|
166
|
+
/**
|
|
167
|
+
* 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
|
|
168
|
+
* 示例值:`miaoda_user_id`
|
|
169
|
+
* 可选值:
|
|
170
|
+
* - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
|
|
171
|
+
* - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
|
|
172
|
+
* - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
|
|
173
|
+
* 默认值:`miaoda_user_id`
|
|
174
|
+
*/
|
|
175
|
+
user_identifier_type?: string;
|
|
176
|
+
}
|
|
177
|
+
interface PatchTableRecordsResponse {
|
|
178
|
+
/** 更新的记录唯一ID列表 */
|
|
179
|
+
record_ids: Lark.Uuid[];
|
|
180
|
+
}
|
|
181
|
+
interface BatchUpdateTableRecordsRequest {
|
|
182
|
+
/** 要更新的数据记录列表,单次支持最多 500条,每行 record 都必须包含主键 _id,且不同行要更新的字段需保持一致 */
|
|
183
|
+
records: string;
|
|
184
|
+
}
|
|
185
|
+
interface BatchUpdateTableRecordsQuery {
|
|
186
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
187
|
+
env?: string;
|
|
188
|
+
/**
|
|
189
|
+
* 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
|
|
190
|
+
* 示例值:`miaoda_user_id`
|
|
191
|
+
* 可选值:
|
|
192
|
+
* - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
|
|
193
|
+
* - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
|
|
194
|
+
* - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
|
|
195
|
+
* 默认值:`miaoda_user_id`
|
|
196
|
+
*/
|
|
197
|
+
user_identifier_type?: string;
|
|
198
|
+
}
|
|
199
|
+
interface BatchUpdateTableRecordsResponse {
|
|
200
|
+
/** 更新的记录唯一ID列表 */
|
|
201
|
+
record_ids: Lark.Uuid[];
|
|
202
|
+
}
|
|
203
|
+
interface DeleteTableRecordsQuery {
|
|
204
|
+
/**
|
|
205
|
+
* 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering
|
|
206
|
+
* 此处用法和查询数据记录一致
|
|
207
|
+
*/
|
|
208
|
+
filter: string;
|
|
209
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
210
|
+
env?: string;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
namespace View {
|
|
214
|
+
interface Methods {
|
|
215
|
+
/**
|
|
216
|
+
* 查询视图数据记录
|
|
217
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-view/get_view_record_list
|
|
218
|
+
*/
|
|
219
|
+
getViewRecordList(app_id: string, view_name: string, query?: GetViewRecordListQuery): Promise<GetViewRecordListResponse>;
|
|
220
|
+
}
|
|
221
|
+
interface GetViewRecordListQuery extends Pagination {
|
|
222
|
+
/**
|
|
223
|
+
* 返回的列,默认为 *,即返回所有列。
|
|
224
|
+
* 遵循 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#vertical-filtering
|
|
225
|
+
*/
|
|
226
|
+
select?: string;
|
|
227
|
+
/** 筛选条件,尊许 PostgREST 语法,详情可查看 https://docs.postgrest.org/en/v13/references/api/tables_views.html#horizontal-filtering */
|
|
228
|
+
filter?: string;
|
|
229
|
+
/**
|
|
230
|
+
* 排序条件,如果没指定 asc/desc,默认为 asc,null 值可排在最前或最后。
|
|
231
|
+
* 尊许 PostgREST 语法,详情可查看
|
|
232
|
+
* https://docs.postgrest.org/en/v13/references/api/tables_views.html#ordering
|
|
233
|
+
*/
|
|
234
|
+
order?: string;
|
|
235
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
236
|
+
env?: string;
|
|
237
|
+
/**
|
|
238
|
+
* 此次调用使用的用户 ID 类型,将使用指定的 ID 来标示某个用户在接口入参和出参中的值。
|
|
239
|
+
* 示例值:`miaoda_user_id`
|
|
240
|
+
* 可选值:
|
|
241
|
+
* - `miaoda_user_id`:标识一个用户在飞书开发套件应用中的身份。示例值:1838493619298330
|
|
242
|
+
* - `open_id`:标识一个用户在某个应用中的身份。同一个用户在不同应用中的 Open ID 不同。示例值:ou_bdbbd8f3f919829064b3ffc1b9476105 了解更多:如何获取 Open ID
|
|
243
|
+
* - `union_id`:标识一个用户在某个应用开发商下的身份。同一用户在同一开发商下的应用中的 Union ID 是相同的,在不同开发商下的应用中的 Union ID 是不同的。通过 Union ID,应用开发商可以把同个用户在多个应用中的身份关联起来。示例值:on_b1b44199e8f3def4ebda5355409e2033 了解更多:如何获取 Union ID?
|
|
244
|
+
* 默认值:`miaoda_user_id`
|
|
245
|
+
*/
|
|
246
|
+
user_identifier_type?: string;
|
|
247
|
+
}
|
|
248
|
+
interface GetViewRecordListResponse {
|
|
249
|
+
/** 是否还有更多项 */
|
|
250
|
+
has_more: boolean;
|
|
251
|
+
/** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
|
|
252
|
+
page_token: string;
|
|
253
|
+
/** 符合条件的记录总数 */
|
|
254
|
+
total: number;
|
|
255
|
+
/** 数据记录列表,格式为数组序列化后的 JSONString */
|
|
256
|
+
items: string;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
namespace Enum {
|
|
260
|
+
interface Methods {
|
|
261
|
+
/**
|
|
262
|
+
* 获取自定义枚举列表
|
|
263
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-enum/get_enum_list
|
|
264
|
+
*/
|
|
265
|
+
getEnumList(app_id: string, query?: GetEnumListQuery): Paginated<Lark.AppEnum>;
|
|
266
|
+
/**
|
|
267
|
+
* 获取自定义枚举详细信息
|
|
268
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-enum/get_enum_detail
|
|
269
|
+
*/
|
|
270
|
+
getEnumDetail(app_id: string, enum_name: string, query?: GetEnumDetailQuery): Promise<GetEnumDetailResponse>;
|
|
271
|
+
}
|
|
272
|
+
interface GetEnumListQuery extends Pagination {
|
|
273
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
274
|
+
env?: string;
|
|
275
|
+
}
|
|
276
|
+
interface GetEnumDetailQuery {
|
|
277
|
+
/** 访问的 database 环境,默认为 online(线上环境) */
|
|
278
|
+
env?: string;
|
|
279
|
+
}
|
|
280
|
+
interface GetEnumDetailResponse {
|
|
281
|
+
/** 枚举名称 */
|
|
282
|
+
name: string;
|
|
283
|
+
/** 枚举描述 */
|
|
284
|
+
description: string;
|
|
285
|
+
/** 枚举值列表 */
|
|
286
|
+
options: string[];
|
|
287
|
+
/** 创建时间,毫秒时间戳 */
|
|
288
|
+
created_at: string;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
namespace Storage {
|
|
292
|
+
interface Methods {
|
|
293
|
+
/**
|
|
294
|
+
* 上传文件
|
|
295
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-storage/upload
|
|
296
|
+
*/
|
|
297
|
+
upload(app_id: string, form: UploadForm): Promise<UploadResponse>;
|
|
298
|
+
/**
|
|
299
|
+
* 下载文件
|
|
300
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/app-storage/download
|
|
301
|
+
*/
|
|
302
|
+
download(app_id: string, query?: DownloadQuery): Promise<ArrayBuffer>;
|
|
303
|
+
}
|
|
304
|
+
interface UploadForm {
|
|
305
|
+
/** 文件名称 */
|
|
306
|
+
file_name: string;
|
|
307
|
+
/** 文件的十六进制 SHA-256 值,用于文件一致性校验。如果传入此值,服务端会在上传完成后对比接收到文件的 SHA-256 值,如果不一致,会返回上传失败。 */
|
|
308
|
+
check_sum?: string;
|
|
309
|
+
/** 文件二进制 */
|
|
310
|
+
file: Blob;
|
|
311
|
+
}
|
|
312
|
+
interface UploadResponse {
|
|
313
|
+
/** 文件 ID */
|
|
314
|
+
file_key: string;
|
|
315
|
+
/** 文件 URL,相对路径 */
|
|
316
|
+
file_url: string;
|
|
317
|
+
/** 文件名称 */
|
|
318
|
+
file_name: string;
|
|
319
|
+
/** 文件大小,单位字节 */
|
|
320
|
+
file_size: number;
|
|
321
|
+
/** 文件 MIME 类型 */
|
|
322
|
+
mime_type: string;
|
|
323
|
+
}
|
|
324
|
+
interface DownloadQuery {
|
|
325
|
+
/** 文件 ID,ID 和 URL 不能同时为空,都提供的情况下,使用 file_key */
|
|
326
|
+
file_key?: string;
|
|
327
|
+
/** 文件 URL,ID 和 URL 不能同时为空 */
|
|
328
|
+
file_url?: string;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
namespace Directory {
|
|
333
|
+
interface Methods {
|
|
334
|
+
user: User.Methods;
|
|
335
|
+
}
|
|
336
|
+
namespace User {
|
|
337
|
+
interface Methods {
|
|
338
|
+
/**
|
|
339
|
+
* 妙搭和飞书用户 ID 转换
|
|
340
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/spark-v1/directory-user/id_convert
|
|
341
|
+
*/
|
|
342
|
+
idConvert(body: IdConvertRequest): Promise<IdConvertResponse>;
|
|
343
|
+
}
|
|
344
|
+
interface IdConvertRequest {
|
|
345
|
+
/** ID 转换类型,枚举 */
|
|
346
|
+
id_convert_type: Lark.IdConvertType;
|
|
347
|
+
/** 长度最大100 */
|
|
348
|
+
ids?: string[];
|
|
349
|
+
}
|
|
350
|
+
interface IdConvertResponse {
|
|
351
|
+
/** ID 映射,查询不到或者查询出错的不返回 */
|
|
352
|
+
items?: Lark.IdMapItem[];
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
package/lib/types/vc.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ declare module '../internal' {
|
|
|
7
7
|
}
|
|
8
8
|
export declare namespace Vc {
|
|
9
9
|
interface Methods {
|
|
10
|
+
note: Note.Methods;
|
|
10
11
|
reserve: Reserve.Methods;
|
|
11
12
|
meeting: Meeting.Methods;
|
|
12
13
|
report: Report.Methods;
|
|
@@ -22,6 +23,23 @@ export declare namespace Vc {
|
|
|
22
23
|
alert: Alert.Methods;
|
|
23
24
|
roomConfig: RoomConfig.Methods;
|
|
24
25
|
}
|
|
26
|
+
namespace Note {
|
|
27
|
+
interface Methods {
|
|
28
|
+
/**
|
|
29
|
+
* 获取纪要详情
|
|
30
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/note/get
|
|
31
|
+
*/
|
|
32
|
+
get(note_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
33
|
+
}
|
|
34
|
+
interface GetQuery {
|
|
35
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
36
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
37
|
+
}
|
|
38
|
+
interface GetResponse {
|
|
39
|
+
/** 纪要信息 */
|
|
40
|
+
note?: Lark.Note;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
25
43
|
namespace Reserve {
|
|
26
44
|
interface Methods {
|
|
27
45
|
/**
|
|
@@ -100,6 +118,11 @@ export declare namespace Vc {
|
|
|
100
118
|
namespace Meeting {
|
|
101
119
|
interface Methods {
|
|
102
120
|
recording: Recording.Methods;
|
|
121
|
+
/**
|
|
122
|
+
* 搜索会议记录
|
|
123
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/search
|
|
124
|
+
*/
|
|
125
|
+
search(body: SearchRequest, query?: Pagination): Promise<SearchResponse> & AsyncIterableIterator<Lark.MeetingSearchItem>;
|
|
103
126
|
/**
|
|
104
127
|
* 邀请参会人
|
|
105
128
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/invite
|
|
@@ -131,6 +154,25 @@ export declare namespace Vc {
|
|
|
131
154
|
*/
|
|
132
155
|
listByNo(query?: ListByNoQuery): Paginated<Lark.Meeting, 'meeting_briefs'>;
|
|
133
156
|
}
|
|
157
|
+
interface SearchRequest {
|
|
158
|
+
/**
|
|
159
|
+
* 搜索关键词
|
|
160
|
+
* **数据校验规则:** 长度范围:1 字符 ~ 50 字符
|
|
161
|
+
*/
|
|
162
|
+
query?: string;
|
|
163
|
+
/** 视频会议过滤参数 */
|
|
164
|
+
meeting_filter?: Lark.MeetingFilter;
|
|
165
|
+
}
|
|
166
|
+
interface SearchResponse {
|
|
167
|
+
/** 匹配结果总数(辅助分页参考) */
|
|
168
|
+
total?: number;
|
|
169
|
+
/** 是否有更多数据可供加载 */
|
|
170
|
+
has_more: boolean;
|
|
171
|
+
/** 返回结果列表 */
|
|
172
|
+
items?: Lark.MeetingSearchItem[];
|
|
173
|
+
/** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
|
|
174
|
+
page_token?: string;
|
|
175
|
+
}
|
|
134
176
|
interface InviteRequest {
|
|
135
177
|
/** 被邀请的用户列表 */
|
|
136
178
|
invitees: Lark.MeetingUser[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@satorijs/adapter-lark",
|
|
3
3
|
"description": "Lark (飞书) Adapter for Satorijs",
|
|
4
|
-
"version": "3.12.
|
|
4
|
+
"version": "3.12.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
],
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@cordisjs/plugin-server": "^0.2.9",
|
|
38
|
-
"@satorijs/core": "^4.
|
|
38
|
+
"@satorijs/core": "^4.6.0",
|
|
39
39
|
"cordis": "^3.18.1",
|
|
40
40
|
"cosmokit": "^1.8.1",
|
|
41
41
|
"dedent": "^1.5.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@satorijs/core": "^4.
|
|
44
|
+
"@satorijs/core": "^4.6.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"protobufjs": "^8.0.0"
|
package/src/bot.ts
CHANGED
|
@@ -83,7 +83,6 @@ export class LarkBot<C extends Context = Context, T extends LarkBot.Config = Lar
|
|
|
83
83
|
// 剩余有效期小于 30 分钟时,调用本接口会返回一个新的 tenant_access_token,此时会同时存在两个有效的 tenant_access_token。
|
|
84
84
|
// 剩余有效期大于等于 30 分钟时,调用本接口会返回原有的 tenant_access_token。
|
|
85
85
|
// 初次获得 token 后的半小时内必须刷新一次,因为初次获得的 token 可能是 1.5 小时前生成的。
|
|
86
|
-
if (!this.isActive) return
|
|
87
86
|
let timeout = Time.minute * 20
|
|
88
87
|
try {
|
|
89
88
|
const { tenant_access_token: token } = await this.internal.auth.tenantAccessTokenInternal({
|