@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/lib/types/search.d.ts
CHANGED
|
@@ -1,240 +1,270 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Pagination } from '../internal';
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Paginated, Pagination } from '../internal';
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
|
-
|
|
6
|
-
* 搜索消息
|
|
7
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create
|
|
8
|
-
*/
|
|
9
|
-
createSearchMessage(body: CreateSearchMessageRequest, query?: CreateSearchMessageQuery): Paginated<string>;
|
|
10
|
-
/**
|
|
11
|
-
* 搜索应用
|
|
12
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create
|
|
13
|
-
*/
|
|
14
|
-
createSearchApp(body: CreateSearchAppRequest, query?: CreateSearchAppQuery): Paginated<string>;
|
|
15
|
-
/**
|
|
16
|
-
* 创建数据源
|
|
17
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create
|
|
18
|
-
*/
|
|
19
|
-
createSearchDataSource(body: CreateSearchDataSourceRequest): Promise<CreateSearchDataSourceResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* 删除数据源
|
|
22
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete
|
|
23
|
-
*/
|
|
24
|
-
deleteSearchDataSource(data_source_id: string): Promise<void>;
|
|
25
|
-
/**
|
|
26
|
-
* 修改数据源
|
|
27
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch
|
|
28
|
-
*/
|
|
29
|
-
patchSearchDataSource(data_source_id: string, body: PatchSearchDataSourceRequest): Promise<PatchSearchDataSourceResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* 获取数据源
|
|
32
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get
|
|
33
|
-
*/
|
|
34
|
-
getSearchDataSource(data_source_id: string): Promise<GetSearchDataSourceResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* 批量获取数据源
|
|
37
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list
|
|
38
|
-
*/
|
|
39
|
-
listSearchDataSource(query?: ListSearchDataSourceQuery): Paginated<DataSource>;
|
|
40
|
-
/**
|
|
41
|
-
* 为指定数据项创建索引
|
|
42
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create
|
|
43
|
-
*/
|
|
44
|
-
createSearchDataSourceItem(data_source_id: string, body: CreateSearchDataSourceItemRequest): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* 删除数据项
|
|
47
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete
|
|
48
|
-
*/
|
|
49
|
-
deleteSearchDataSourceItem(data_source_id: string, item_id: string): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* 查询指定数据项
|
|
52
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get
|
|
53
|
-
*/
|
|
54
|
-
getSearchDataSourceItem(data_source_id: string, item_id: string): Promise<GetSearchDataSourceItemResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* 创建数据范式
|
|
57
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create
|
|
58
|
-
*/
|
|
59
|
-
createSearchSchema(body: CreateSearchSchemaRequest, query?: CreateSearchSchemaQuery): Promise<CreateSearchSchemaResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* 删除数据范式
|
|
62
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete
|
|
63
|
-
*/
|
|
64
|
-
deleteSearchSchema(schema_id: string): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* 修改数据范式
|
|
67
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch
|
|
68
|
-
*/
|
|
69
|
-
patchSearchSchema(schema_id: string, body: PatchSearchSchemaRequest): Promise<PatchSearchSchemaResponse>;
|
|
70
|
-
/**
|
|
71
|
-
* 获取数据范式
|
|
72
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get
|
|
73
|
-
*/
|
|
74
|
-
getSearchSchema(schema_id: string): Promise<GetSearchSchemaResponse>;
|
|
5
|
+
search: Search.Methods;
|
|
75
6
|
}
|
|
76
7
|
}
|
|
77
|
-
export
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
8
|
+
export declare namespace Search {
|
|
9
|
+
interface Methods {
|
|
10
|
+
message: Message.Methods;
|
|
11
|
+
app: App.Methods;
|
|
12
|
+
dataSource: DataSource.Methods;
|
|
13
|
+
schema: Schema.Methods;
|
|
14
|
+
}
|
|
15
|
+
namespace Message {
|
|
16
|
+
interface Methods {
|
|
17
|
+
/**
|
|
18
|
+
* 搜索消息
|
|
19
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create
|
|
20
|
+
*/
|
|
21
|
+
create(body: CreateRequest, query?: CreateQuery): Paginated<string>;
|
|
22
|
+
}
|
|
23
|
+
interface CreateRequest {
|
|
24
|
+
/** 搜索关键词 */
|
|
25
|
+
query: string;
|
|
26
|
+
/** 消息来自user_id列表 */
|
|
27
|
+
from_ids?: string[];
|
|
28
|
+
/** 消息所在chat_id列表 */
|
|
29
|
+
chat_ids?: string[];
|
|
30
|
+
/** 消息类型(file/image/media) */
|
|
31
|
+
message_type?: 'file' | 'image' | 'media';
|
|
32
|
+
/** at用户user_id列表 */
|
|
33
|
+
at_chatter_ids?: string[];
|
|
34
|
+
/** 消息来自类型(bot/user) */
|
|
35
|
+
from_type?: 'bot' | 'user';
|
|
36
|
+
/** 会话类型(group_chat/p2p_chat) */
|
|
37
|
+
chat_type?: 'group_chat' | 'p2p_chat';
|
|
38
|
+
/** 消息发送起始时间 */
|
|
39
|
+
start_time?: string;
|
|
40
|
+
/** 消息发送结束时间 */
|
|
41
|
+
end_time?: string;
|
|
42
|
+
}
|
|
43
|
+
interface CreateQuery extends Pagination {
|
|
44
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
45
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
namespace App {
|
|
49
|
+
interface Methods {
|
|
50
|
+
/**
|
|
51
|
+
* 搜索应用
|
|
52
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create
|
|
53
|
+
*/
|
|
54
|
+
create(body: CreateRequest, query?: CreateQuery): Paginated<string>;
|
|
55
|
+
}
|
|
56
|
+
interface CreateRequest {
|
|
57
|
+
/** 搜索关键词 */
|
|
58
|
+
query: string;
|
|
59
|
+
}
|
|
60
|
+
interface CreateQuery extends Pagination {
|
|
61
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
62
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
namespace DataSource {
|
|
66
|
+
interface Methods {
|
|
67
|
+
item: Item.Methods;
|
|
68
|
+
/**
|
|
69
|
+
* 创建数据源
|
|
70
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create
|
|
71
|
+
*/
|
|
72
|
+
create(body: CreateRequest): Promise<CreateResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* 删除数据源
|
|
75
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete
|
|
76
|
+
*/
|
|
77
|
+
delete(data_source_id: string): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* 修改数据源
|
|
80
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch
|
|
81
|
+
*/
|
|
82
|
+
patch(data_source_id: string, body: PatchRequest): Promise<PatchResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* 获取数据源
|
|
85
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get
|
|
86
|
+
*/
|
|
87
|
+
get(data_source_id: string): Promise<GetResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* 批量获取数据源
|
|
90
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list
|
|
91
|
+
*/
|
|
92
|
+
list(query?: ListQuery): Paginated<Lark.DataSource>;
|
|
93
|
+
}
|
|
94
|
+
const enum CreateRequestState {
|
|
95
|
+
/** 已上线 */
|
|
96
|
+
Online = 0,
|
|
97
|
+
/** 未上线 */
|
|
98
|
+
Offline = 1
|
|
99
|
+
}
|
|
100
|
+
const enum CreateRequestConnectType {
|
|
101
|
+
/** 调用搜索请求时,使用的是飞书搜索接口 */
|
|
102
|
+
Default = 0,
|
|
103
|
+
/** 调用搜索请求时,使用的是自定义回调函数的Uri */
|
|
104
|
+
Callback = 1
|
|
105
|
+
}
|
|
106
|
+
interface CreateRequest {
|
|
107
|
+
/** data_source的展示名称 */
|
|
108
|
+
name: string;
|
|
109
|
+
/** 数据源状态,0-已上线,1-未上线 */
|
|
110
|
+
state?: CreateRequestState;
|
|
111
|
+
/** 对于数据源的描述 */
|
|
112
|
+
description?: string;
|
|
113
|
+
/** 数据源在 search tab 上的展示图标路径 */
|
|
114
|
+
icon_url?: string;
|
|
115
|
+
/** 数据源采用的展示模版名称 */
|
|
116
|
+
template?: string;
|
|
117
|
+
/** 描述哪些字段可以被搜索 */
|
|
118
|
+
searchable_fields?: string[];
|
|
119
|
+
/** 数据源的国际化展示名称 */
|
|
120
|
+
i18n_name?: Lark.I18nMeta;
|
|
121
|
+
/** 数据源的国际化描述 */
|
|
122
|
+
i18n_description?: Lark.I18nMeta;
|
|
123
|
+
/** 数据源关联的 schema 标识 */
|
|
124
|
+
schema_id?: string;
|
|
125
|
+
/** datasource对应的开放平台应用id */
|
|
126
|
+
app_id?: string;
|
|
127
|
+
/** 搜索请求的接入方式 */
|
|
128
|
+
connect_type?: CreateRequestConnectType;
|
|
129
|
+
/** 根据连接器类型不同所需要提供的相关参数 */
|
|
130
|
+
connector_param?: Lark.ConnectorParam;
|
|
131
|
+
/** 是否使用问答服务 */
|
|
132
|
+
enable_answer?: boolean;
|
|
133
|
+
}
|
|
134
|
+
interface CreateResponse {
|
|
135
|
+
/** 数据源实例 */
|
|
136
|
+
data_source?: Lark.DataSource;
|
|
137
|
+
}
|
|
138
|
+
const enum PatchRequestState {
|
|
139
|
+
/** 已上线 */
|
|
140
|
+
Online = 0,
|
|
141
|
+
/** 未上线 */
|
|
142
|
+
Offline = 1
|
|
143
|
+
}
|
|
144
|
+
interface PatchRequest {
|
|
145
|
+
/** 数据源的展示名称 */
|
|
146
|
+
name?: string;
|
|
147
|
+
/** 数据源状态,0-已上线,1-未上线 */
|
|
148
|
+
state?: PatchRequestState;
|
|
149
|
+
/** 对于数据源的描述 */
|
|
150
|
+
description?: string;
|
|
151
|
+
/** 数据源在 search tab 上的展示图标路径 */
|
|
152
|
+
icon_url?: string;
|
|
153
|
+
/** 数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"} */
|
|
154
|
+
i18n_name?: Lark.I18nMeta;
|
|
155
|
+
/** 数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"} */
|
|
156
|
+
i18n_description?: Lark.I18nMeta;
|
|
157
|
+
/** 修改connector的相关配置 */
|
|
158
|
+
connector_param?: Lark.ConnectorParam;
|
|
159
|
+
/** 是否使用问答服务 */
|
|
160
|
+
enable_answer?: boolean;
|
|
161
|
+
}
|
|
162
|
+
interface PatchResponse {
|
|
163
|
+
/** 数据源 */
|
|
164
|
+
data_source?: Lark.DataSource;
|
|
165
|
+
}
|
|
166
|
+
interface GetResponse {
|
|
167
|
+
/** 数据源实例 */
|
|
168
|
+
data_source?: Lark.DataSource;
|
|
169
|
+
}
|
|
170
|
+
const enum ListQueryView {
|
|
171
|
+
/** 全量数据 */
|
|
172
|
+
FULL = 0,
|
|
173
|
+
/** 摘要数据 */
|
|
174
|
+
BASIC = 1
|
|
175
|
+
}
|
|
176
|
+
interface ListQuery extends Pagination {
|
|
177
|
+
/** 回包数据格式,0-全量数据;1-摘要数据。**注**:摘要数据仅包含"id","name","state"。 */
|
|
178
|
+
view?: ListQueryView;
|
|
179
|
+
}
|
|
180
|
+
namespace Item {
|
|
181
|
+
interface Methods {
|
|
182
|
+
/**
|
|
183
|
+
* 为指定数据项创建索引
|
|
184
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create
|
|
185
|
+
*/
|
|
186
|
+
create(data_source_id: string, body: CreateRequest): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* 删除数据项
|
|
189
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete
|
|
190
|
+
*/
|
|
191
|
+
delete(data_source_id: string, item_id: string): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* 查询指定数据项
|
|
194
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get
|
|
195
|
+
*/
|
|
196
|
+
get(data_source_id: string, item_id: string): Promise<GetResponse>;
|
|
197
|
+
}
|
|
198
|
+
interface CreateRequest {
|
|
199
|
+
/** item 在 datasource 中的唯一标识,只接受英文字母、数字和下划线 */
|
|
200
|
+
id: string;
|
|
201
|
+
/** item 的访问权限控制 */
|
|
202
|
+
acl: Lark.Acl[];
|
|
203
|
+
/** item 的元信息 */
|
|
204
|
+
metadata: Lark.ItemMetadata;
|
|
205
|
+
/** 结构化数据 */
|
|
206
|
+
structured_data: string;
|
|
207
|
+
/** 非结构化数据,如文档文本 */
|
|
208
|
+
content?: Lark.ItemContent;
|
|
209
|
+
}
|
|
210
|
+
interface GetResponse {
|
|
211
|
+
/** 数据项实例 */
|
|
212
|
+
item: Lark.Item;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
namespace Schema {
|
|
217
|
+
interface Methods {
|
|
218
|
+
/**
|
|
219
|
+
* 创建数据范式
|
|
220
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create
|
|
221
|
+
*/
|
|
222
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
223
|
+
/**
|
|
224
|
+
* 删除数据范式
|
|
225
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete
|
|
226
|
+
*/
|
|
227
|
+
delete(schema_id: string): Promise<void>;
|
|
228
|
+
/**
|
|
229
|
+
* 修改数据范式
|
|
230
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch
|
|
231
|
+
*/
|
|
232
|
+
patch(schema_id: string, body: PatchRequest): Promise<PatchResponse>;
|
|
233
|
+
/**
|
|
234
|
+
* 获取数据范式
|
|
235
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get
|
|
236
|
+
*/
|
|
237
|
+
get(schema_id: string): Promise<GetResponse>;
|
|
238
|
+
}
|
|
239
|
+
interface CreateRequest {
|
|
240
|
+
/** 数据范式的属性定义 */
|
|
241
|
+
properties: Lark.SchemaProperty[];
|
|
242
|
+
/** 数据展示相关配置 */
|
|
243
|
+
display: Lark.SchemaDisplay;
|
|
244
|
+
/** 用户自定义数据范式的唯一标识 */
|
|
245
|
+
schema_id: string;
|
|
246
|
+
}
|
|
247
|
+
interface CreateQuery {
|
|
248
|
+
/** 是否只用来校验合法性 */
|
|
249
|
+
validate_only?: boolean;
|
|
250
|
+
}
|
|
251
|
+
interface CreateResponse {
|
|
252
|
+
/** 数据范式实例 */
|
|
253
|
+
schema?: Lark.Schema;
|
|
254
|
+
}
|
|
255
|
+
interface PatchRequest {
|
|
256
|
+
/** 数据展示相关配置 */
|
|
257
|
+
display?: Lark.SchemaDisplay;
|
|
258
|
+
/** 数据范式的属性定义 */
|
|
259
|
+
properties?: Lark.PatchSchemaProperty[];
|
|
260
|
+
}
|
|
261
|
+
interface PatchResponse {
|
|
262
|
+
/** 数据范式实例 */
|
|
263
|
+
schema?: Lark.Schema;
|
|
264
|
+
}
|
|
265
|
+
interface GetResponse {
|
|
266
|
+
/** 数据范式 */
|
|
267
|
+
schema?: Lark.Schema;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
240
270
|
}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Paginated } from '../internal';
|
|
2
3
|
declare module '../internal' {
|
|
3
4
|
interface Internal {
|
|
4
|
-
|
|
5
|
-
* 获取OpenAPI审计日志数据
|
|
6
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/openapi_log/list_data
|
|
7
|
-
*/
|
|
8
|
-
listDataSecurityAndComplianceOpenapiLog(body: ListDataSecurityAndComplianceOpenapiLogRequest): Paginated<OpenapiLog>;
|
|
5
|
+
securityAndCompliance: SecurityAndCompliance.Methods;
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
export declare namespace SecurityAndCompliance {
|
|
9
|
+
interface Methods {
|
|
10
|
+
openapiLog: OpenapiLog.Methods;
|
|
11
|
+
}
|
|
12
|
+
namespace OpenapiLog {
|
|
13
|
+
interface Methods {
|
|
14
|
+
/**
|
|
15
|
+
* 获取OpenAPI审计日志数据
|
|
16
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/openapi_log/list_data
|
|
17
|
+
*/
|
|
18
|
+
listData(body: ListDataRequest): Paginated<Lark.OpenapiLog>;
|
|
19
|
+
}
|
|
20
|
+
interface ListDataRequest {
|
|
21
|
+
/** 飞书开放平台定义的API */
|
|
22
|
+
api_keys?: string[];
|
|
23
|
+
/** 以秒为单位的起始时间戳 */
|
|
24
|
+
start_time?: number;
|
|
25
|
+
/** 以秒为单位的终止时间戳 */
|
|
26
|
+
end_time?: number;
|
|
27
|
+
/** 在开发者后台——凭证与基础信息页面查看的app_id(cli_xxx),指调用openapi的应用 */
|
|
28
|
+
app_id?: string;
|
|
29
|
+
/** 分页大小 */
|
|
30
|
+
page_size?: number;
|
|
31
|
+
/** 分页标记,第一次请求不填,表示从头开始遍历;当返回的has_more为true时,会返回新的page_token,再次调用接口,传入这个page_token,将获得下一页数据 */
|
|
32
|
+
page_token?: string;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
24
35
|
}
|