@satorijs/adapter-lark 3.10.6 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +2880 -2370
- package/lib/internal.d.ts +4 -4
- 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/internal.ts +29 -12
- package/src/message.ts +10 -10
- 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/lingo.d.ts
CHANGED
|
@@ -1,254 +1,284 @@
|
|
|
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/lingo-v1/draft/create
|
|
8
|
-
*/
|
|
9
|
-
createLingoDraft(body: CreateLingoDraftRequest, query?: CreateLingoDraftQuery): Promise<CreateLingoDraftResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* 更新草稿
|
|
12
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/draft/update
|
|
13
|
-
*/
|
|
14
|
-
updateLingoDraft(draft_id: string, body: UpdateLingoDraftRequest, query?: UpdateLingoDraftQuery): Promise<UpdateLingoDraftResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* 创建免审词条
|
|
17
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/create
|
|
18
|
-
*/
|
|
19
|
-
createLingoEntity(body: CreateLingoEntityRequest, query?: CreateLingoEntityQuery): Promise<CreateLingoEntityResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* 更新免审词条
|
|
22
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/update
|
|
23
|
-
*/
|
|
24
|
-
updateLingoEntity(entity_id: string, body: UpdateLingoEntityRequest, query?: UpdateLingoEntityQuery): Promise<UpdateLingoEntityResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* 删除免审词条
|
|
27
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/delete
|
|
28
|
-
*/
|
|
29
|
-
deleteLingoEntity(entity_id: string, query?: DeleteLingoEntityQuery): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* 获取词条详情
|
|
32
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/get
|
|
33
|
-
*/
|
|
34
|
-
getLingoEntity(entity_id: string, query?: GetLingoEntityQuery): Promise<GetLingoEntityResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* 获取词条列表
|
|
37
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/list
|
|
38
|
-
*/
|
|
39
|
-
listLingoEntity(query?: ListLingoEntityQuery): Paginated<Entity, 'entities'>;
|
|
40
|
-
/**
|
|
41
|
-
* 精准搜索词条
|
|
42
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/match
|
|
43
|
-
*/
|
|
44
|
-
matchLingoEntity(body: MatchLingoEntityRequest, query?: MatchLingoEntityQuery): Promise<MatchLingoEntityResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* 模糊搜索词条
|
|
47
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/search
|
|
48
|
-
*/
|
|
49
|
-
searchLingoEntity(body: SearchLingoEntityRequest, query?: SearchLingoEntityQuery): Paginated<Entity, 'entities'>;
|
|
50
|
-
/**
|
|
51
|
-
* 词条高亮
|
|
52
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/highlight
|
|
53
|
-
*/
|
|
54
|
-
highlightLingoEntity(body: HighlightLingoEntityRequest): Promise<HighlightLingoEntityResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* 获取词典分类
|
|
57
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/classification/list
|
|
58
|
-
*/
|
|
59
|
-
listLingoClassification(query?: ListLingoClassificationQuery): Paginated<Classification>;
|
|
60
|
-
/**
|
|
61
|
-
* 获取词库列表
|
|
62
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/repo/list
|
|
63
|
-
*/
|
|
64
|
-
listLingoRepo(): Promise<ListLingoRepoResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* 上传图片
|
|
67
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/file/upload
|
|
68
|
-
*/
|
|
69
|
-
uploadLingoFile(form: UploadLingoFileForm): Promise<UploadLingoFileResponse>;
|
|
70
|
-
/**
|
|
71
|
-
* 下载图片
|
|
72
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/file/download
|
|
73
|
-
*/
|
|
74
|
-
downloadLingoFile(file_token: string): Promise<ArrayBuffer>;
|
|
5
|
+
lingo: Lingo.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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
8
|
+
export declare namespace Lingo {
|
|
9
|
+
interface Methods {
|
|
10
|
+
draft: Draft.Methods;
|
|
11
|
+
entity: Entity.Methods;
|
|
12
|
+
classification: Classification.Methods;
|
|
13
|
+
repo: Repo.Methods;
|
|
14
|
+
file: File.Methods;
|
|
15
|
+
}
|
|
16
|
+
namespace Draft {
|
|
17
|
+
interface Methods {
|
|
18
|
+
/**
|
|
19
|
+
* 创建草稿
|
|
20
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/draft/create
|
|
21
|
+
*/
|
|
22
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* 更新草稿
|
|
25
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/draft/update
|
|
26
|
+
*/
|
|
27
|
+
update(draft_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>;
|
|
28
|
+
}
|
|
29
|
+
interface CreateRequest {
|
|
30
|
+
/** 实体词 Id */
|
|
31
|
+
id?: string;
|
|
32
|
+
/** 词条名 */
|
|
33
|
+
main_keys: Lark.Term[];
|
|
34
|
+
/** 别名 */
|
|
35
|
+
aliases?: Lark.Term[];
|
|
36
|
+
/** 详情描述 */
|
|
37
|
+
description?: string;
|
|
38
|
+
/** 相关数据 */
|
|
39
|
+
related_meta?: Lark.RelatedMeta;
|
|
40
|
+
/** 外部 id 关联数据 */
|
|
41
|
+
outer_info?: Lark.OuterInfo;
|
|
42
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
43
|
+
rich_text?: string;
|
|
44
|
+
/** 国际化的词条释义 */
|
|
45
|
+
i18n_descs?: Lark.I18nEntryDesc[];
|
|
46
|
+
}
|
|
47
|
+
interface CreateQuery {
|
|
48
|
+
/** 词库ID */
|
|
49
|
+
repo_id?: string;
|
|
50
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
51
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
52
|
+
}
|
|
53
|
+
interface CreateResponse {
|
|
54
|
+
draft?: Lark.Draft;
|
|
55
|
+
}
|
|
56
|
+
interface UpdateRequest {
|
|
57
|
+
/** 实体词 Id */
|
|
58
|
+
id?: string;
|
|
59
|
+
/** 词条名 */
|
|
60
|
+
main_keys: Lark.Term[];
|
|
61
|
+
/** 别名 */
|
|
62
|
+
aliases?: Lark.Term[];
|
|
63
|
+
/** 详情描述 */
|
|
64
|
+
description?: string;
|
|
65
|
+
/** 相关数据 */
|
|
66
|
+
related_meta?: Lark.RelatedMeta;
|
|
67
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
68
|
+
rich_text?: string;
|
|
69
|
+
/** 国际化的词条释义 */
|
|
70
|
+
i18n_descs?: Lark.I18nEntryDesc[];
|
|
71
|
+
}
|
|
72
|
+
interface UpdateQuery {
|
|
73
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
74
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
75
|
+
}
|
|
76
|
+
interface UpdateResponse {
|
|
77
|
+
draft?: Lark.Draft;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
namespace Entity {
|
|
81
|
+
interface Methods {
|
|
82
|
+
/**
|
|
83
|
+
* 创建免审词条
|
|
84
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/create
|
|
85
|
+
*/
|
|
86
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* 更新免审词条
|
|
89
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/update
|
|
90
|
+
*/
|
|
91
|
+
update(entity_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* 删除免审词条
|
|
94
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/delete
|
|
95
|
+
*/
|
|
96
|
+
delete(entity_id: string, query?: DeleteQuery): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* 获取词条详情
|
|
99
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/get
|
|
100
|
+
*/
|
|
101
|
+
get(entity_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* 获取词条列表
|
|
104
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/list
|
|
105
|
+
*/
|
|
106
|
+
list(query?: ListQuery): Paginated<Lark.Entity, 'entities'>;
|
|
107
|
+
/**
|
|
108
|
+
* 精准搜索词条
|
|
109
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/match
|
|
110
|
+
*/
|
|
111
|
+
match(body: MatchRequest, query?: MatchQuery): Promise<MatchResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* 模糊搜索词条
|
|
114
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/search
|
|
115
|
+
*/
|
|
116
|
+
search(body: SearchRequest, query?: SearchQuery): Paginated<Lark.Entity, 'entities'>;
|
|
117
|
+
/**
|
|
118
|
+
* 词条高亮
|
|
119
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/highlight
|
|
120
|
+
*/
|
|
121
|
+
highlight(body: HighlightRequest): Promise<HighlightResponse>;
|
|
122
|
+
}
|
|
123
|
+
interface CreateRequest {
|
|
124
|
+
/** 词条名 */
|
|
125
|
+
main_keys: Lark.Term[];
|
|
126
|
+
/** 别名 */
|
|
127
|
+
aliases?: Lark.Term[];
|
|
128
|
+
/** 详情描述 */
|
|
129
|
+
description?: string;
|
|
130
|
+
/** 相关数据 */
|
|
131
|
+
related_meta?: Lark.RelatedMeta;
|
|
132
|
+
/** 外部 id 关联数据 */
|
|
133
|
+
outer_info?: Lark.OuterInfo;
|
|
134
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
135
|
+
rich_text?: string;
|
|
136
|
+
/** 国际化的词条释义 */
|
|
137
|
+
i18n_descs?: Lark.I18nEntryDesc[];
|
|
138
|
+
}
|
|
139
|
+
interface CreateQuery {
|
|
140
|
+
/** 词库 ID */
|
|
141
|
+
repo_id?: string;
|
|
142
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
143
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
144
|
+
}
|
|
145
|
+
interface CreateResponse {
|
|
146
|
+
entity?: Lark.Entity;
|
|
147
|
+
}
|
|
148
|
+
interface UpdateRequest {
|
|
149
|
+
/** 词条名 */
|
|
150
|
+
main_keys: Lark.Term[];
|
|
151
|
+
/** 别名 */
|
|
152
|
+
aliases?: Lark.Term[];
|
|
153
|
+
/** 详情描述 */
|
|
154
|
+
description?: string;
|
|
155
|
+
/** 相关数据 */
|
|
156
|
+
related_meta?: Lark.RelatedMeta;
|
|
157
|
+
/** 外部 id 关联数据 */
|
|
158
|
+
outer_info?: Lark.OuterInfo;
|
|
159
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
160
|
+
rich_text?: string;
|
|
161
|
+
/** 国际化的词条释义 */
|
|
162
|
+
i18n_descs?: Lark.I18nEntryDesc[];
|
|
163
|
+
}
|
|
164
|
+
interface UpdateQuery {
|
|
165
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
166
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
167
|
+
}
|
|
168
|
+
interface UpdateResponse {
|
|
169
|
+
entity?: Lark.Entity;
|
|
170
|
+
}
|
|
171
|
+
interface DeleteQuery {
|
|
172
|
+
/** 数据提供方(使用时需要将路径中的词条 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
|
|
173
|
+
provider?: string;
|
|
174
|
+
/** 外部唯一 id(使用时需要将路径中的词条 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
|
|
175
|
+
outer_id?: string;
|
|
176
|
+
}
|
|
177
|
+
interface GetQuery {
|
|
178
|
+
/** 数据提供方(使用时需要将路径中的实体词 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
|
|
179
|
+
provider?: string;
|
|
180
|
+
/** 外部唯一 id(使用时需要将路径中的实体词 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
|
|
181
|
+
outer_id?: string;
|
|
182
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
183
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
184
|
+
}
|
|
185
|
+
interface GetResponse {
|
|
186
|
+
/** 实体词 */
|
|
187
|
+
entity?: Lark.Entity;
|
|
188
|
+
}
|
|
189
|
+
interface ListQuery extends Pagination {
|
|
190
|
+
/** 数据提供方【可用来过滤数据】 */
|
|
191
|
+
provider?: string;
|
|
192
|
+
/** 词库 id */
|
|
193
|
+
repo_id?: string;
|
|
194
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
195
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
196
|
+
}
|
|
197
|
+
interface MatchRequest {
|
|
198
|
+
/** 实体词主关键词、全称、别名全匹配 */
|
|
199
|
+
word: string;
|
|
200
|
+
}
|
|
201
|
+
interface MatchQuery {
|
|
202
|
+
/** 词库ID */
|
|
203
|
+
repo_id?: string;
|
|
204
|
+
}
|
|
205
|
+
interface MatchResponse {
|
|
206
|
+
/** 匹配结果 */
|
|
207
|
+
results?: Lark.MatchInfo[];
|
|
208
|
+
}
|
|
209
|
+
interface SearchRequest {
|
|
210
|
+
/** 搜索关键词 */
|
|
211
|
+
query?: string;
|
|
212
|
+
/** 分类筛选 */
|
|
213
|
+
classification_filter?: Lark.ClassificationFilter;
|
|
214
|
+
/** 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建 */
|
|
215
|
+
sources?: number[];
|
|
216
|
+
/** 创建者 */
|
|
217
|
+
creators?: string[];
|
|
218
|
+
}
|
|
219
|
+
interface SearchQuery extends Pagination {
|
|
220
|
+
/** 词库ID */
|
|
221
|
+
repo_id?: string;
|
|
222
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
223
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
224
|
+
}
|
|
225
|
+
interface HighlightRequest {
|
|
226
|
+
/** 需要被识别实体词内容的一句话(不要超过1000字) */
|
|
227
|
+
text: string;
|
|
228
|
+
}
|
|
229
|
+
interface HighlightResponse {
|
|
230
|
+
/** 返回识别到的实体词信息 */
|
|
231
|
+
phrases?: Lark.Phrase[];
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
namespace Classification {
|
|
235
|
+
interface Methods {
|
|
236
|
+
/**
|
|
237
|
+
* 获取词典分类
|
|
238
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/classification/list
|
|
239
|
+
*/
|
|
240
|
+
list(query?: ListQuery): Paginated<Lark.Classification>;
|
|
241
|
+
}
|
|
242
|
+
interface ListQuery extends Pagination {
|
|
243
|
+
/** 词库ID */
|
|
244
|
+
repo_id?: string;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
namespace Repo {
|
|
248
|
+
interface Methods {
|
|
249
|
+
/**
|
|
250
|
+
* 获取词库列表
|
|
251
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/repo/list
|
|
252
|
+
*/
|
|
253
|
+
list(): Promise<ListResponse>;
|
|
254
|
+
}
|
|
255
|
+
interface ListResponse {
|
|
256
|
+
/** 词库列表 */
|
|
257
|
+
items?: Lark.Repo[];
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
namespace File {
|
|
261
|
+
interface Methods {
|
|
262
|
+
/**
|
|
263
|
+
* 上传图片
|
|
264
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/file/upload
|
|
265
|
+
*/
|
|
266
|
+
upload(form: UploadForm): Promise<UploadResponse>;
|
|
267
|
+
/**
|
|
268
|
+
* 下载图片
|
|
269
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/file/download
|
|
270
|
+
*/
|
|
271
|
+
download(file_token: string): Promise<ArrayBuffer>;
|
|
272
|
+
}
|
|
273
|
+
interface UploadForm {
|
|
274
|
+
/** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
|
|
275
|
+
name: string;
|
|
276
|
+
/** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
|
|
277
|
+
file: Blob;
|
|
278
|
+
}
|
|
279
|
+
interface UploadResponse {
|
|
280
|
+
/** 文件 token */
|
|
281
|
+
file_token?: string;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
254
284
|
}
|