@satorijs/adapter-lark 3.10.6 → 3.11.1
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/content.d.ts +211 -93
- package/lib/index.cjs +2954 -2474
- package/lib/internal.d.ts +4 -4
- package/lib/message.d.ts +2 -3
- package/lib/types/acs.d.ts +212 -172
- package/lib/types/admin.d.ts +331 -291
- package/lib/types/aily.d.ts +331 -216
- package/lib/types/apaas.d.ts +646 -494
- package/lib/types/application.d.ts +559 -458
- package/lib/types/approval.d.ts +826 -791
- package/lib/types/attendance.d.ts +1094 -994
- package/lib/types/auth.d.ts +66 -61
- package/lib/types/authen.d.ts +221 -186
- package/lib/types/baike.d.ts +258 -233
- package/lib/types/base.d.ts +74 -0
- package/lib/types/bitable.d.ts +830 -770
- package/lib/types/board.d.ts +29 -14
- package/lib/types/calendar.d.ts +660 -605
- package/lib/types/cardkit.d.ts +149 -134
- package/lib/types/compensation.d.ts +84 -49
- package/lib/types/contact.d.ts +1279 -1204
- package/lib/types/corehr.d.ts +4982 -4526
- package/lib/types/directory.d.ts +447 -0
- package/lib/types/docs.d.ts +28 -18
- package/lib/types/document_ai.d.ts +347 -252
- package/lib/types/docx.d.ts +428 -383
- package/lib/types/drive.d.ts +1093 -1048
- package/lib/types/ehr.d.ts +66 -51
- package/lib/types/event.d.ts +16 -6
- package/lib/types/helpdesk.d.ts +816 -741
- package/lib/types/hire.d.ts +3955 -3589
- package/lib/types/human_authentication.d.ts +32 -22
- package/lib/types/im.d.ts +1420 -1295
- package/lib/types/index.d.ts +1422 -330
- package/lib/types/lingo.d.ts +279 -249
- package/lib/types/mail.d.ts +1032 -675
- package/lib/types/mdm.d.ts +105 -37
- package/lib/types/minutes.d.ts +73 -26
- package/lib/types/moments.d.ts +23 -13
- package/lib/types/okr.d.ts +266 -225
- package/lib/types/optical_char_recognition.d.ts +22 -12
- package/lib/types/passport.d.ts +58 -48
- package/lib/types/payroll.d.ts +210 -53
- package/lib/types/performance.d.ts +463 -414
- package/lib/types/personal_settings.d.ts +93 -82
- package/lib/types/report.d.ts +79 -58
- package/lib/types/search.d.ts +265 -235
- package/lib/types/security_and_compliance.d.ts +30 -19
- package/lib/types/sheets.d.ts +356 -321
- package/lib/types/speech_to_text.d.ts +44 -34
- package/lib/types/task.d.ts +998 -1087
- package/lib/types/tenant.d.ts +25 -15
- package/lib/types/translation.d.ts +42 -32
- package/lib/types/trust_party.d.ts +81 -0
- package/lib/types/vc.d.ts +1218 -1123
- package/lib/types/verification.d.ts +11 -6
- package/lib/types/wiki.d.ts +270 -235
- package/lib/types/workplace.d.ts +58 -38
- package/lib/utils.d.ts +2 -2
- package/package.json +4 -4
- package/src/bot.ts +15 -15
- package/src/content.ts +230 -107
- package/src/internal.ts +29 -12
- package/src/message.ts +82 -111
- package/src/types/acs.ts +234 -186
- package/src/types/admin.ts +353 -305
- package/src/types/aily.ts +375 -233
- package/src/types/apaas.ts +754 -568
- package/src/types/application.ts +633 -507
- package/src/types/approval.ts +914 -872
- package/src/types/attendance.ts +1226 -1104
- package/src/types/auth.ts +72 -66
- package/src/types/authen.ts +233 -191
- package/src/types/baike.ts +276 -246
- package/src/types/base.ts +93 -0
- package/src/types/bitable.ts +966 -894
- package/src/types/board.ts +34 -16
- package/src/types/calendar.ts +751 -685
- package/src/types/cardkit.ts +164 -146
- package/src/types/compensation.ts +97 -55
- package/src/types/contact.ts +1465 -1375
- package/src/types/corehr.ts +5664 -5077
- package/src/types/directory.ts +569 -0
- package/src/types/docs.ts +31 -19
- package/src/types/document_ai.ts +401 -287
- package/src/types/docx.ts +492 -438
- package/src/types/drive.ts +1266 -1213
- package/src/types/ehr.ts +71 -53
- package/src/types/event.ts +19 -7
- package/src/types/helpdesk.ts +930 -840
- package/src/types/hire.ts +4453 -4019
- package/src/types/human_authentication.ts +35 -23
- package/src/types/im.ts +1626 -1476
- package/src/types/index.ts +1532 -346
- package/src/types/lingo.ts +299 -263
- package/src/types/mail.ts +1231 -779
- package/src/types/mdm.ts +122 -39
- package/src/types/minutes.ts +88 -28
- package/src/types/moments.ts +26 -14
- package/src/types/okr.ts +286 -238
- package/src/types/optical_char_recognition.ts +25 -13
- package/src/types/passport.ts +62 -50
- package/src/types/payroll.ts +254 -57
- package/src/types/performance.ts +528 -467
- package/src/types/personal_settings.ts +101 -89
- package/src/types/report.ts +86 -62
- package/src/types/search.ts +285 -249
- package/src/types/security_and_compliance.ts +33 -21
- package/src/types/sheets.ts +421 -379
- package/src/types/speech_to_text.ts +48 -36
- package/src/types/task.ts +1152 -1260
- package/src/types/tenant.ts +29 -17
- package/src/types/translation.ts +46 -34
- package/src/types/trust_party.ts +110 -0
- package/src/types/vc.ts +1397 -1283
- package/src/types/verification.ts +13 -7
- package/src/types/wiki.ts +293 -251
- package/src/types/workplace.ts +65 -41
- package/src/utils.ts +3 -3
package/src/types/search.ts
CHANGED
|
@@ -1,296 +1,332 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Internal, Pagination } from '../internal'
|
|
1
|
+
import * as Lark from '.'
|
|
2
|
+
import { Internal, Paginated, Pagination } from '../internal'
|
|
3
3
|
|
|
4
4
|
declare module '../internal' {
|
|
5
5
|
interface Internal {
|
|
6
|
-
|
|
7
|
-
* 搜索消息
|
|
8
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create
|
|
9
|
-
*/
|
|
10
|
-
createSearchMessage(body: CreateSearchMessageRequest, query?: CreateSearchMessageQuery): Paginated<string>
|
|
11
|
-
/**
|
|
12
|
-
* 搜索应用
|
|
13
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create
|
|
14
|
-
*/
|
|
15
|
-
createSearchApp(body: CreateSearchAppRequest, query?: CreateSearchAppQuery): Paginated<string>
|
|
16
|
-
/**
|
|
17
|
-
* 创建数据源
|
|
18
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create
|
|
19
|
-
*/
|
|
20
|
-
createSearchDataSource(body: CreateSearchDataSourceRequest): Promise<CreateSearchDataSourceResponse>
|
|
21
|
-
/**
|
|
22
|
-
* 删除数据源
|
|
23
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete
|
|
24
|
-
*/
|
|
25
|
-
deleteSearchDataSource(data_source_id: string): Promise<void>
|
|
26
|
-
/**
|
|
27
|
-
* 修改数据源
|
|
28
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch
|
|
29
|
-
*/
|
|
30
|
-
patchSearchDataSource(data_source_id: string, body: PatchSearchDataSourceRequest): Promise<PatchSearchDataSourceResponse>
|
|
31
|
-
/**
|
|
32
|
-
* 获取数据源
|
|
33
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get
|
|
34
|
-
*/
|
|
35
|
-
getSearchDataSource(data_source_id: string): Promise<GetSearchDataSourceResponse>
|
|
36
|
-
/**
|
|
37
|
-
* 批量获取数据源
|
|
38
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list
|
|
39
|
-
*/
|
|
40
|
-
listSearchDataSource(query?: ListSearchDataSourceQuery): Paginated<DataSource>
|
|
41
|
-
/**
|
|
42
|
-
* 为指定数据项创建索引
|
|
43
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create
|
|
44
|
-
*/
|
|
45
|
-
createSearchDataSourceItem(data_source_id: string, body: CreateSearchDataSourceItemRequest): Promise<void>
|
|
46
|
-
/**
|
|
47
|
-
* 删除数据项
|
|
48
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete
|
|
49
|
-
*/
|
|
50
|
-
deleteSearchDataSourceItem(data_source_id: string, item_id: string): Promise<void>
|
|
51
|
-
/**
|
|
52
|
-
* 查询指定数据项
|
|
53
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get
|
|
54
|
-
*/
|
|
55
|
-
getSearchDataSourceItem(data_source_id: string, item_id: string): Promise<GetSearchDataSourceItemResponse>
|
|
56
|
-
/**
|
|
57
|
-
* 创建数据范式
|
|
58
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create
|
|
59
|
-
*/
|
|
60
|
-
createSearchSchema(body: CreateSearchSchemaRequest, query?: CreateSearchSchemaQuery): Promise<CreateSearchSchemaResponse>
|
|
61
|
-
/**
|
|
62
|
-
* 删除数据范式
|
|
63
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete
|
|
64
|
-
*/
|
|
65
|
-
deleteSearchSchema(schema_id: string): Promise<void>
|
|
66
|
-
/**
|
|
67
|
-
* 修改数据范式
|
|
68
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch
|
|
69
|
-
*/
|
|
70
|
-
patchSearchSchema(schema_id: string, body: PatchSearchSchemaRequest): Promise<PatchSearchSchemaResponse>
|
|
71
|
-
/**
|
|
72
|
-
* 获取数据范式
|
|
73
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get
|
|
74
|
-
*/
|
|
75
|
-
getSearchSchema(schema_id: string): Promise<GetSearchSchemaResponse>
|
|
6
|
+
search: Search.Methods
|
|
76
7
|
}
|
|
77
8
|
}
|
|
78
9
|
|
|
79
|
-
export
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/** 消息类型(file/image/media) */
|
|
87
|
-
message_type?: 'file' | 'image' | 'media'
|
|
88
|
-
/** at用户user_id列表 */
|
|
89
|
-
at_chatter_ids?: string[]
|
|
90
|
-
/** 消息来自类型(bot/user) */
|
|
91
|
-
from_type?: 'bot' | 'user'
|
|
92
|
-
/** 会话类型(group_chat/p2p_chat) */
|
|
93
|
-
chat_type?: 'group_chat' | 'p2p_chat'
|
|
94
|
-
/** 消息发送起始时间 */
|
|
95
|
-
start_time?: string
|
|
96
|
-
/** 消息发送结束时间 */
|
|
97
|
-
end_time?: string
|
|
98
|
-
}
|
|
10
|
+
export namespace Search {
|
|
11
|
+
export interface Methods {
|
|
12
|
+
message: Message.Methods
|
|
13
|
+
app: App.Methods
|
|
14
|
+
dataSource: DataSource.Methods
|
|
15
|
+
schema: Schema.Methods
|
|
16
|
+
}
|
|
99
17
|
|
|
100
|
-
export
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
18
|
+
export namespace Message {
|
|
19
|
+
export interface Methods {
|
|
20
|
+
/**
|
|
21
|
+
* 搜索消息
|
|
22
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create
|
|
23
|
+
*/
|
|
24
|
+
create(body: CreateRequest, query?: CreateQuery): Paginated<string>
|
|
25
|
+
}
|
|
104
26
|
|
|
105
|
-
export interface
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
27
|
+
export interface CreateRequest {
|
|
28
|
+
/** 搜索关键词 */
|
|
29
|
+
query: string
|
|
30
|
+
/** 消息来自user_id列表 */
|
|
31
|
+
from_ids?: string[]
|
|
32
|
+
/** 消息所在chat_id列表 */
|
|
33
|
+
chat_ids?: string[]
|
|
34
|
+
/** 消息类型(file/image/media) */
|
|
35
|
+
message_type?: 'file' | 'image' | 'media'
|
|
36
|
+
/** at用户user_id列表 */
|
|
37
|
+
at_chatter_ids?: string[]
|
|
38
|
+
/** 消息来自类型(bot/user) */
|
|
39
|
+
from_type?: 'bot' | 'user'
|
|
40
|
+
/** 会话类型(group_chat/p2p_chat) */
|
|
41
|
+
chat_type?: 'group_chat' | 'p2p_chat'
|
|
42
|
+
/** 消息发送起始时间 */
|
|
43
|
+
start_time?: string
|
|
44
|
+
/** 消息发送结束时间 */
|
|
45
|
+
end_time?: string
|
|
46
|
+
}
|
|
109
47
|
|
|
110
|
-
export interface
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
48
|
+
export interface CreateQuery extends Pagination {
|
|
49
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
50
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
114
53
|
|
|
115
|
-
export
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
54
|
+
export namespace App {
|
|
55
|
+
export interface Methods {
|
|
56
|
+
/**
|
|
57
|
+
* 搜索应用
|
|
58
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create
|
|
59
|
+
*/
|
|
60
|
+
create(body: CreateRequest, query?: CreateQuery): Paginated<string>
|
|
61
|
+
}
|
|
121
62
|
|
|
122
|
-
export
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Callback = 1,
|
|
127
|
-
}
|
|
63
|
+
export interface CreateRequest {
|
|
64
|
+
/** 搜索关键词 */
|
|
65
|
+
query: string
|
|
66
|
+
}
|
|
128
67
|
|
|
129
|
-
export interface
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/** 对于数据源的描述 */
|
|
135
|
-
description?: string
|
|
136
|
-
/** 数据源在 search tab 上的展示图标路径 */
|
|
137
|
-
icon_url?: string
|
|
138
|
-
/** 数据源采用的展示模版名称 */
|
|
139
|
-
template?: string
|
|
140
|
-
/** 描述哪些字段可以被搜索 */
|
|
141
|
-
searchable_fields?: string[]
|
|
142
|
-
/** 数据源的国际化展示名称 */
|
|
143
|
-
i18n_name?: I18nMeta
|
|
144
|
-
/** 数据源的国际化描述 */
|
|
145
|
-
i18n_description?: I18nMeta
|
|
146
|
-
/** 数据源关联的 schema 标识 */
|
|
147
|
-
schema_id?: string
|
|
148
|
-
/** datasource对应的开放平台应用id */
|
|
149
|
-
app_id?: string
|
|
150
|
-
/** 搜索请求的接入方式 */
|
|
151
|
-
connect_type?: CreateSearchDataSourceRequestConnectType
|
|
152
|
-
/** 根据连接器类型不同所需要提供的相关参数 */
|
|
153
|
-
connector_param?: ConnectorParam
|
|
154
|
-
/** 是否使用问答服务 */
|
|
155
|
-
enable_answer?: boolean
|
|
156
|
-
}
|
|
68
|
+
export interface CreateQuery extends Pagination {
|
|
69
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
70
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
157
73
|
|
|
158
|
-
export
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
74
|
+
export namespace DataSource {
|
|
75
|
+
export interface Methods {
|
|
76
|
+
item: Item.Methods
|
|
77
|
+
/**
|
|
78
|
+
* 创建数据源
|
|
79
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create
|
|
80
|
+
*/
|
|
81
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
82
|
+
/**
|
|
83
|
+
* 删除数据源
|
|
84
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete
|
|
85
|
+
*/
|
|
86
|
+
delete(data_source_id: string): Promise<void>
|
|
87
|
+
/**
|
|
88
|
+
* 修改数据源
|
|
89
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch
|
|
90
|
+
*/
|
|
91
|
+
patch(data_source_id: string, body: PatchRequest): Promise<PatchResponse>
|
|
92
|
+
/**
|
|
93
|
+
* 获取数据源
|
|
94
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get
|
|
95
|
+
*/
|
|
96
|
+
get(data_source_id: string): Promise<GetResponse>
|
|
97
|
+
/**
|
|
98
|
+
* 批量获取数据源
|
|
99
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list
|
|
100
|
+
*/
|
|
101
|
+
list(query?: ListQuery): Paginated<Lark.DataSource>
|
|
102
|
+
}
|
|
162
103
|
|
|
163
|
-
export const enum
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
104
|
+
export const enum CreateRequestState {
|
|
105
|
+
/** 已上线 */
|
|
106
|
+
Online = 0,
|
|
107
|
+
/** 未上线 */
|
|
108
|
+
Offline = 1,
|
|
109
|
+
}
|
|
169
110
|
|
|
170
|
-
export
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
description?: string
|
|
177
|
-
/** 数据源在 search tab 上的展示图标路径 */
|
|
178
|
-
icon_url?: string
|
|
179
|
-
/** 数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"} */
|
|
180
|
-
i18n_name?: I18nMeta
|
|
181
|
-
/** 数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"} */
|
|
182
|
-
i18n_description?: I18nMeta
|
|
183
|
-
/** 修改connector的相关配置 */
|
|
184
|
-
connector_param?: ConnectorParam
|
|
185
|
-
/** 是否使用问答服务 */
|
|
186
|
-
enable_answer?: boolean
|
|
187
|
-
}
|
|
111
|
+
export const enum CreateRequestConnectType {
|
|
112
|
+
/** 调用搜索请求时,使用的是飞书搜索接口 */
|
|
113
|
+
Default = 0,
|
|
114
|
+
/** 调用搜索请求时,使用的是自定义回调函数的Uri */
|
|
115
|
+
Callback = 1,
|
|
116
|
+
}
|
|
188
117
|
|
|
189
|
-
export interface
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
118
|
+
export interface CreateRequest {
|
|
119
|
+
/** data_source的展示名称 */
|
|
120
|
+
name: string
|
|
121
|
+
/** 数据源状态,0-已上线,1-未上线 */
|
|
122
|
+
state?: CreateRequestState
|
|
123
|
+
/** 对于数据源的描述 */
|
|
124
|
+
description?: string
|
|
125
|
+
/** 数据源在 search tab 上的展示图标路径 */
|
|
126
|
+
icon_url?: string
|
|
127
|
+
/** 数据源采用的展示模版名称 */
|
|
128
|
+
template?: string
|
|
129
|
+
/** 描述哪些字段可以被搜索 */
|
|
130
|
+
searchable_fields?: string[]
|
|
131
|
+
/** 数据源的国际化展示名称 */
|
|
132
|
+
i18n_name?: Lark.I18nMeta
|
|
133
|
+
/** 数据源的国际化描述 */
|
|
134
|
+
i18n_description?: Lark.I18nMeta
|
|
135
|
+
/** 数据源关联的 schema 标识 */
|
|
136
|
+
schema_id?: string
|
|
137
|
+
/** datasource对应的开放平台应用id */
|
|
138
|
+
app_id?: string
|
|
139
|
+
/** 搜索请求的接入方式 */
|
|
140
|
+
connect_type?: CreateRequestConnectType
|
|
141
|
+
/** 根据连接器类型不同所需要提供的相关参数 */
|
|
142
|
+
connector_param?: Lark.ConnectorParam
|
|
143
|
+
/** 是否使用问答服务 */
|
|
144
|
+
enable_answer?: boolean
|
|
145
|
+
}
|
|
193
146
|
|
|
194
|
-
export interface
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
147
|
+
export interface CreateResponse {
|
|
148
|
+
/** 数据源实例 */
|
|
149
|
+
data_source?: Lark.DataSource
|
|
150
|
+
}
|
|
198
151
|
|
|
199
|
-
export const enum
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
152
|
+
export const enum PatchRequestState {
|
|
153
|
+
/** 已上线 */
|
|
154
|
+
Online = 0,
|
|
155
|
+
/** 未上线 */
|
|
156
|
+
Offline = 1,
|
|
157
|
+
}
|
|
205
158
|
|
|
206
|
-
export interface
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
159
|
+
export interface PatchRequest {
|
|
160
|
+
/** 数据源的展示名称 */
|
|
161
|
+
name?: string
|
|
162
|
+
/** 数据源状态,0-已上线,1-未上线 */
|
|
163
|
+
state?: PatchRequestState
|
|
164
|
+
/** 对于数据源的描述 */
|
|
165
|
+
description?: string
|
|
166
|
+
/** 数据源在 search tab 上的展示图标路径 */
|
|
167
|
+
icon_url?: string
|
|
168
|
+
/** 数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"} */
|
|
169
|
+
i18n_name?: Lark.I18nMeta
|
|
170
|
+
/** 数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"} */
|
|
171
|
+
i18n_description?: Lark.I18nMeta
|
|
172
|
+
/** 修改connector的相关配置 */
|
|
173
|
+
connector_param?: Lark.ConnectorParam
|
|
174
|
+
/** 是否使用问答服务 */
|
|
175
|
+
enable_answer?: boolean
|
|
176
|
+
}
|
|
210
177
|
|
|
211
|
-
export interface
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
acl: Acl[]
|
|
216
|
-
/** item 的元信息 */
|
|
217
|
-
metadata: ItemMetadata
|
|
218
|
-
/** 结构化数据 */
|
|
219
|
-
structured_data: string
|
|
220
|
-
/** 非结构化数据,如文档文本 */
|
|
221
|
-
content?: ItemContent
|
|
222
|
-
}
|
|
178
|
+
export interface PatchResponse {
|
|
179
|
+
/** 数据源 */
|
|
180
|
+
data_source?: Lark.DataSource
|
|
181
|
+
}
|
|
223
182
|
|
|
224
|
-
export interface
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
183
|
+
export interface GetResponse {
|
|
184
|
+
/** 数据源实例 */
|
|
185
|
+
data_source?: Lark.DataSource
|
|
186
|
+
}
|
|
228
187
|
|
|
229
|
-
export
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
schema_id: string
|
|
236
|
-
}
|
|
188
|
+
export const enum ListQueryView {
|
|
189
|
+
/** 全量数据 */
|
|
190
|
+
FULL = 0,
|
|
191
|
+
/** 摘要数据 */
|
|
192
|
+
BASIC = 1,
|
|
193
|
+
}
|
|
237
194
|
|
|
238
|
-
export interface
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
195
|
+
export interface ListQuery extends Pagination {
|
|
196
|
+
/** 回包数据格式,0-全量数据;1-摘要数据。**注**:摘要数据仅包含"id","name","state"。 */
|
|
197
|
+
view?: ListQueryView
|
|
198
|
+
}
|
|
242
199
|
|
|
243
|
-
export
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
200
|
+
export namespace Item {
|
|
201
|
+
export interface Methods {
|
|
202
|
+
/**
|
|
203
|
+
* 为指定数据项创建索引
|
|
204
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create
|
|
205
|
+
*/
|
|
206
|
+
create(data_source_id: string, body: CreateRequest): Promise<void>
|
|
207
|
+
/**
|
|
208
|
+
* 删除数据项
|
|
209
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete
|
|
210
|
+
*/
|
|
211
|
+
delete(data_source_id: string, item_id: string): Promise<void>
|
|
212
|
+
/**
|
|
213
|
+
* 查询指定数据项
|
|
214
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get
|
|
215
|
+
*/
|
|
216
|
+
get(data_source_id: string, item_id: string): Promise<GetResponse>
|
|
217
|
+
}
|
|
247
218
|
|
|
248
|
-
export interface
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
219
|
+
export interface CreateRequest {
|
|
220
|
+
/** item 在 datasource 中的唯一标识,只接受英文字母、数字和下划线 */
|
|
221
|
+
id: string
|
|
222
|
+
/** item 的访问权限控制 */
|
|
223
|
+
acl: Lark.Acl[]
|
|
224
|
+
/** item 的元信息 */
|
|
225
|
+
metadata: Lark.ItemMetadata
|
|
226
|
+
/** 结构化数据 */
|
|
227
|
+
structured_data: string
|
|
228
|
+
/** 非结构化数据,如文档文本 */
|
|
229
|
+
content?: Lark.ItemContent
|
|
230
|
+
}
|
|
254
231
|
|
|
255
|
-
export interface
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
232
|
+
export interface GetResponse {
|
|
233
|
+
/** 数据项实例 */
|
|
234
|
+
item: Lark.Item
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export namespace Schema {
|
|
240
|
+
export interface Methods {
|
|
241
|
+
/**
|
|
242
|
+
* 创建数据范式
|
|
243
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create
|
|
244
|
+
*/
|
|
245
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
|
|
246
|
+
/**
|
|
247
|
+
* 删除数据范式
|
|
248
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete
|
|
249
|
+
*/
|
|
250
|
+
delete(schema_id: string): Promise<void>
|
|
251
|
+
/**
|
|
252
|
+
* 修改数据范式
|
|
253
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch
|
|
254
|
+
*/
|
|
255
|
+
patch(schema_id: string, body: PatchRequest): Promise<PatchResponse>
|
|
256
|
+
/**
|
|
257
|
+
* 获取数据范式
|
|
258
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get
|
|
259
|
+
*/
|
|
260
|
+
get(schema_id: string): Promise<GetResponse>
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface CreateRequest {
|
|
264
|
+
/** 数据范式的属性定义 */
|
|
265
|
+
properties: Lark.SchemaProperty[]
|
|
266
|
+
/** 数据展示相关配置 */
|
|
267
|
+
display: Lark.SchemaDisplay
|
|
268
|
+
/** 用户自定义数据范式的唯一标识 */
|
|
269
|
+
schema_id: string
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface CreateQuery {
|
|
273
|
+
/** 是否只用来校验合法性 */
|
|
274
|
+
validate_only?: boolean
|
|
275
|
+
}
|
|
259
276
|
|
|
260
|
-
export interface
|
|
261
|
-
|
|
262
|
-
|
|
277
|
+
export interface CreateResponse {
|
|
278
|
+
/** 数据范式实例 */
|
|
279
|
+
schema?: Lark.Schema
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface PatchRequest {
|
|
283
|
+
/** 数据展示相关配置 */
|
|
284
|
+
display?: Lark.SchemaDisplay
|
|
285
|
+
/** 数据范式的属性定义 */
|
|
286
|
+
properties?: Lark.PatchSchemaProperty[]
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface PatchResponse {
|
|
290
|
+
/** 数据范式实例 */
|
|
291
|
+
schema?: Lark.Schema
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface GetResponse {
|
|
295
|
+
/** 数据范式 */
|
|
296
|
+
schema?: Lark.Schema
|
|
297
|
+
}
|
|
298
|
+
}
|
|
263
299
|
}
|
|
264
300
|
|
|
265
301
|
Internal.define({
|
|
266
302
|
'/search/v2/message': {
|
|
267
|
-
POST: { name: '
|
|
303
|
+
POST: { name: 'search.message.create', pagination: { argIndex: 1 } },
|
|
268
304
|
},
|
|
269
305
|
'/search/v2/app': {
|
|
270
|
-
POST: { name: '
|
|
306
|
+
POST: { name: 'search.app.create', pagination: { argIndex: 1 } },
|
|
271
307
|
},
|
|
272
308
|
'/search/v2/data_sources': {
|
|
273
|
-
POST: '
|
|
274
|
-
GET: { name: '
|
|
309
|
+
POST: 'search.dataSource.create',
|
|
310
|
+
GET: { name: 'search.dataSource.list', pagination: { argIndex: 0 } },
|
|
275
311
|
},
|
|
276
312
|
'/search/v2/data_sources/{data_source_id}': {
|
|
277
|
-
DELETE: '
|
|
278
|
-
PATCH: '
|
|
279
|
-
GET: '
|
|
313
|
+
DELETE: 'search.dataSource.delete',
|
|
314
|
+
PATCH: 'search.dataSource.patch',
|
|
315
|
+
GET: 'search.dataSource.get',
|
|
280
316
|
},
|
|
281
317
|
'/search/v2/data_sources/{data_source_id}/items': {
|
|
282
|
-
POST: '
|
|
318
|
+
POST: 'search.dataSource.item.create',
|
|
283
319
|
},
|
|
284
320
|
'/search/v2/data_sources/{data_source_id}/items/{item_id}': {
|
|
285
|
-
DELETE: '
|
|
286
|
-
GET: '
|
|
321
|
+
DELETE: 'search.dataSource.item.delete',
|
|
322
|
+
GET: 'search.dataSource.item.get',
|
|
287
323
|
},
|
|
288
324
|
'/search/v2/schemas': {
|
|
289
|
-
POST: '
|
|
325
|
+
POST: 'search.schema.create',
|
|
290
326
|
},
|
|
291
327
|
'/search/v2/schemas/{schema_id}': {
|
|
292
|
-
DELETE: '
|
|
293
|
-
PATCH: '
|
|
294
|
-
GET: '
|
|
328
|
+
DELETE: 'search.schema.delete',
|
|
329
|
+
PATCH: 'search.schema.patch',
|
|
330
|
+
GET: 'search.schema.get',
|
|
295
331
|
},
|
|
296
332
|
})
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Internal } from '../internal'
|
|
1
|
+
import * as Lark from '.'
|
|
2
|
+
import { Internal, Paginated } from '../internal'
|
|
3
3
|
|
|
4
4
|
declare module '../internal' {
|
|
5
5
|
interface Internal {
|
|
6
|
-
|
|
7
|
-
* 获取OpenAPI审计日志数据
|
|
8
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/openapi_log/list_data
|
|
9
|
-
*/
|
|
10
|
-
listDataSecurityAndComplianceOpenapiLog(body: ListDataSecurityAndComplianceOpenapiLogRequest): Paginated<OpenapiLog>
|
|
6
|
+
securityAndCompliance: SecurityAndCompliance.Methods
|
|
11
7
|
}
|
|
12
8
|
}
|
|
13
9
|
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
export namespace SecurityAndCompliance {
|
|
11
|
+
export interface Methods {
|
|
12
|
+
openapiLog: OpenapiLog.Methods
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace OpenapiLog {
|
|
16
|
+
export interface Methods {
|
|
17
|
+
/**
|
|
18
|
+
* 获取OpenAPI审计日志数据
|
|
19
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/openapi_log/list_data
|
|
20
|
+
*/
|
|
21
|
+
listData(body: ListDataRequest): Paginated<Lark.OpenapiLog>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ListDataRequest {
|
|
25
|
+
/** 飞书开放平台定义的API */
|
|
26
|
+
api_keys?: string[]
|
|
27
|
+
/** 以秒为单位的起始时间戳 */
|
|
28
|
+
start_time?: number
|
|
29
|
+
/** 以秒为单位的终止时间戳 */
|
|
30
|
+
end_time?: number
|
|
31
|
+
/** 在开发者后台——凭证与基础信息页面查看的app_id(cli_xxx),指调用openapi的应用 */
|
|
32
|
+
app_id?: string
|
|
33
|
+
/** 分页大小 */
|
|
34
|
+
page_size?: number
|
|
35
|
+
/** 分页标记,第一次请求不填,表示从头开始遍历;当返回的has_more为true时,会返回新的page_token,再次调用接口,传入这个page_token,将获得下一页数据 */
|
|
36
|
+
page_token?: string
|
|
37
|
+
}
|
|
38
|
+
}
|
|
27
39
|
}
|
|
28
40
|
|
|
29
41
|
Internal.define({
|
|
30
42
|
'/security_and_compliance/v1/openapi_logs/list_data': {
|
|
31
|
-
POST: '
|
|
43
|
+
POST: 'securityAndCompliance.openapiLog.listData',
|
|
32
44
|
},
|
|
33
45
|
})
|