@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/baike.d.ts
CHANGED
|
@@ -1,239 +1,264 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Lark from '.';
|
|
2
2
|
import { Pagination } from '../internal';
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
|
-
|
|
6
|
-
* 创建草稿
|
|
7
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/create
|
|
8
|
-
*/
|
|
9
|
-
createBaikeDraft(body: CreateBaikeDraftRequest, query?: CreateBaikeDraftQuery): Promise<CreateBaikeDraftResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* 更新草稿
|
|
12
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/update
|
|
13
|
-
*/
|
|
14
|
-
updateBaikeDraft(draft_id: string, body: UpdateBaikeDraftRequest, query?: UpdateBaikeDraftQuery): Promise<UpdateBaikeDraftResponse>;
|
|
15
|
-
/**
|
|
16
|
-
* 创建免审词条
|
|
17
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/create
|
|
18
|
-
*/
|
|
19
|
-
createBaikeEntity(body: CreateBaikeEntityRequest, query?: CreateBaikeEntityQuery): Promise<CreateBaikeEntityResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* 更新免审词条
|
|
22
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/update
|
|
23
|
-
*/
|
|
24
|
-
updateBaikeEntity(entity_id: string, body: UpdateBaikeEntityRequest, query?: UpdateBaikeEntityQuery): Promise<UpdateBaikeEntityResponse>;
|
|
25
|
-
/**
|
|
26
|
-
* 获取词条详情
|
|
27
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/get
|
|
28
|
-
*/
|
|
29
|
-
getBaikeEntity(entity_id: string, query?: GetBaikeEntityQuery): Promise<GetBaikeEntityResponse>;
|
|
30
|
-
/**
|
|
31
|
-
* 获取词条列表
|
|
32
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list
|
|
33
|
-
*/
|
|
34
|
-
listBaikeEntity(query?: ListBaikeEntityQuery): Promise<ListBaikeEntityResponse> & AsyncIterableIterator<Entity>;
|
|
35
|
-
/**
|
|
36
|
-
* 精准搜索词条
|
|
37
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match
|
|
38
|
-
*/
|
|
39
|
-
matchBaikeEntity(body: MatchBaikeEntityRequest): Promise<MatchBaikeEntityResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* 模糊搜索词条
|
|
42
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search
|
|
43
|
-
*/
|
|
44
|
-
searchBaikeEntity(body: SearchBaikeEntityRequest, query?: SearchBaikeEntityQuery): Promise<SearchBaikeEntityResponse> & AsyncIterableIterator<Entity>;
|
|
45
|
-
/**
|
|
46
|
-
* 词条高亮
|
|
47
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight
|
|
48
|
-
*/
|
|
49
|
-
highlightBaikeEntity(body: HighlightBaikeEntityRequest): Promise<HighlightBaikeEntityResponse>;
|
|
50
|
-
/**
|
|
51
|
-
* 提取潜在的词条
|
|
52
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/extract
|
|
53
|
-
*/
|
|
54
|
-
extractBaikeEntity(body: ExtractBaikeEntityRequest): Promise<ExtractBaikeEntityResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* 获取词典分类
|
|
57
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list
|
|
58
|
-
*/
|
|
59
|
-
listBaikeClassification(query?: Pagination): Promise<ListBaikeClassificationResponse> & AsyncIterableIterator<Classification>;
|
|
60
|
-
/**
|
|
61
|
-
* 上传图片
|
|
62
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload
|
|
63
|
-
*/
|
|
64
|
-
uploadBaikeFile(form: UploadBaikeFileForm): Promise<UploadBaikeFileResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* 下载图片
|
|
67
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/download
|
|
68
|
-
*/
|
|
69
|
-
downloadBaikeFile(file_token: string): Promise<ArrayBuffer>;
|
|
5
|
+
baike: Baike.Methods;
|
|
70
6
|
}
|
|
71
7
|
}
|
|
72
|
-
export
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
8
|
+
export declare namespace Baike {
|
|
9
|
+
interface Methods {
|
|
10
|
+
draft: Draft.Methods;
|
|
11
|
+
entity: Entity.Methods;
|
|
12
|
+
classification: Classification.Methods;
|
|
13
|
+
file: File.Methods;
|
|
14
|
+
}
|
|
15
|
+
namespace Draft {
|
|
16
|
+
interface Methods {
|
|
17
|
+
/**
|
|
18
|
+
* 创建草稿
|
|
19
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/create
|
|
20
|
+
*/
|
|
21
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* 更新草稿
|
|
24
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/update
|
|
25
|
+
*/
|
|
26
|
+
update(draft_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>;
|
|
27
|
+
}
|
|
28
|
+
interface CreateRequest {
|
|
29
|
+
/** 实体词 Id */
|
|
30
|
+
id?: string;
|
|
31
|
+
/** 词条名 */
|
|
32
|
+
main_keys: Lark.Term[];
|
|
33
|
+
/** 别名 */
|
|
34
|
+
aliases?: Lark.Term[];
|
|
35
|
+
/** 详情描述 */
|
|
36
|
+
description?: string;
|
|
37
|
+
/** 相关数据 */
|
|
38
|
+
related_meta?: Lark.RelatedMeta;
|
|
39
|
+
/** 外部 id 关联数据 */
|
|
40
|
+
outer_info?: Lark.OuterInfo;
|
|
41
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
42
|
+
rich_text?: string;
|
|
43
|
+
}
|
|
44
|
+
interface CreateQuery {
|
|
45
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
46
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
47
|
+
}
|
|
48
|
+
interface CreateResponse {
|
|
49
|
+
draft?: Lark.Draft;
|
|
50
|
+
}
|
|
51
|
+
interface UpdateRequest {
|
|
52
|
+
/** 实体词 Id */
|
|
53
|
+
id?: string;
|
|
54
|
+
/** 词条名 */
|
|
55
|
+
main_keys: Lark.Term[];
|
|
56
|
+
/** 别名 */
|
|
57
|
+
aliases?: Lark.Term[];
|
|
58
|
+
/** 详情描述 */
|
|
59
|
+
description?: string;
|
|
60
|
+
/** 相关数据 */
|
|
61
|
+
related_meta?: Lark.RelatedMeta;
|
|
62
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
63
|
+
rich_text?: string;
|
|
64
|
+
}
|
|
65
|
+
interface UpdateQuery {
|
|
66
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
67
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
68
|
+
}
|
|
69
|
+
interface UpdateResponse {
|
|
70
|
+
draft?: Lark.Draft;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
namespace Entity {
|
|
74
|
+
interface Methods {
|
|
75
|
+
/**
|
|
76
|
+
* 创建免审词条
|
|
77
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/create
|
|
78
|
+
*/
|
|
79
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* 更新免审词条
|
|
82
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/update
|
|
83
|
+
*/
|
|
84
|
+
update(entity_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* 获取词条详情
|
|
87
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/get
|
|
88
|
+
*/
|
|
89
|
+
get(entity_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* 获取词条列表
|
|
92
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list
|
|
93
|
+
*/
|
|
94
|
+
list(query?: ListQuery): Promise<ListResponse> & AsyncIterableIterator<Lark.Entity>;
|
|
95
|
+
/**
|
|
96
|
+
* 精准搜索词条
|
|
97
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match
|
|
98
|
+
*/
|
|
99
|
+
match(body: MatchRequest): Promise<MatchResponse>;
|
|
100
|
+
/**
|
|
101
|
+
* 模糊搜索词条
|
|
102
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search
|
|
103
|
+
*/
|
|
104
|
+
search(body: SearchRequest, query?: SearchQuery): Promise<SearchResponse> & AsyncIterableIterator<Lark.Entity>;
|
|
105
|
+
/**
|
|
106
|
+
* 词条高亮
|
|
107
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight
|
|
108
|
+
*/
|
|
109
|
+
highlight(body: HighlightRequest): Promise<HighlightResponse>;
|
|
110
|
+
/**
|
|
111
|
+
* 提取潜在的词条
|
|
112
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/extract
|
|
113
|
+
*/
|
|
114
|
+
extract(body: ExtractRequest): Promise<ExtractResponse>;
|
|
115
|
+
}
|
|
116
|
+
interface CreateRequest {
|
|
117
|
+
/** 词条名 */
|
|
118
|
+
main_keys: Lark.Term[];
|
|
119
|
+
/** 别名 */
|
|
120
|
+
aliases?: Lark.Term[];
|
|
121
|
+
/** 详情描述 */
|
|
122
|
+
description?: string;
|
|
123
|
+
/** 相关数据 */
|
|
124
|
+
related_meta?: Lark.RelatedMeta;
|
|
125
|
+
/** 外部 id 关联数据 */
|
|
126
|
+
outer_info?: Lark.OuterInfo;
|
|
127
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
128
|
+
rich_text?: string;
|
|
129
|
+
}
|
|
130
|
+
interface CreateQuery {
|
|
131
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
132
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
133
|
+
}
|
|
134
|
+
interface CreateResponse {
|
|
135
|
+
entity?: Lark.Entity;
|
|
136
|
+
}
|
|
137
|
+
interface UpdateRequest {
|
|
138
|
+
/** 词条名 */
|
|
139
|
+
main_keys: Lark.Term[];
|
|
140
|
+
/** 别名 */
|
|
141
|
+
aliases?: Lark.Term[];
|
|
142
|
+
/** 详情描述 */
|
|
143
|
+
description?: string;
|
|
144
|
+
/** 相关数据 */
|
|
145
|
+
related_meta?: Lark.RelatedMeta;
|
|
146
|
+
/** 外部 id 关联数据 */
|
|
147
|
+
outer_info?: Lark.OuterInfo;
|
|
148
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
149
|
+
rich_text?: string;
|
|
150
|
+
}
|
|
151
|
+
interface UpdateQuery {
|
|
152
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
153
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
154
|
+
}
|
|
155
|
+
interface UpdateResponse {
|
|
156
|
+
entity?: Lark.Entity;
|
|
157
|
+
}
|
|
158
|
+
interface GetQuery {
|
|
159
|
+
/** 外部系统 */
|
|
160
|
+
provider?: string;
|
|
161
|
+
/** 词条在外部系统中对应的唯一 ID */
|
|
162
|
+
outer_id?: string;
|
|
163
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
164
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
165
|
+
}
|
|
166
|
+
interface GetResponse {
|
|
167
|
+
/** 实体词 */
|
|
168
|
+
entity?: Lark.Entity;
|
|
169
|
+
}
|
|
170
|
+
interface ListQuery extends Pagination {
|
|
171
|
+
/** 相关外部系统【可用来过滤词条数据】 */
|
|
172
|
+
provider?: string;
|
|
173
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
174
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
175
|
+
}
|
|
176
|
+
interface ListResponse {
|
|
177
|
+
entities?: Lark.Entity[];
|
|
178
|
+
/** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
|
|
179
|
+
page_token?: string;
|
|
180
|
+
}
|
|
181
|
+
interface MatchRequest {
|
|
182
|
+
/** 搜索关键词,将与词条名、别名进行精准匹配 */
|
|
183
|
+
word: string;
|
|
184
|
+
}
|
|
185
|
+
interface MatchResponse {
|
|
186
|
+
/** 匹配结果 */
|
|
187
|
+
results?: Lark.MatchInfo[];
|
|
188
|
+
}
|
|
189
|
+
interface SearchRequest {
|
|
190
|
+
/** 搜索关键词 */
|
|
191
|
+
query?: string;
|
|
192
|
+
/** 分类筛选 */
|
|
193
|
+
classification_filter?: Lark.ClassificationFilter;
|
|
194
|
+
/** 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建 */
|
|
195
|
+
sources?: number[];
|
|
196
|
+
/** 创建者 */
|
|
197
|
+
creators?: string[];
|
|
198
|
+
}
|
|
199
|
+
interface SearchQuery extends Pagination {
|
|
200
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
201
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
202
|
+
}
|
|
203
|
+
interface SearchResponse {
|
|
204
|
+
/** 数据数组 */
|
|
205
|
+
entities?: Lark.Entity[];
|
|
206
|
+
/** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
|
|
207
|
+
page_token?: string;
|
|
208
|
+
}
|
|
209
|
+
interface HighlightRequest {
|
|
210
|
+
/** 需要识别百科词条的内容(不超过1000字) */
|
|
211
|
+
text: string;
|
|
212
|
+
}
|
|
213
|
+
interface HighlightResponse {
|
|
214
|
+
/** 返回识别到的实体词信息 */
|
|
215
|
+
phrases?: Lark.Phrase[];
|
|
216
|
+
}
|
|
217
|
+
interface ExtractRequest {
|
|
218
|
+
/** 需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容) */
|
|
219
|
+
text?: string;
|
|
220
|
+
}
|
|
221
|
+
interface ExtractResponse {
|
|
222
|
+
/** 文本中可能的成为百科词条的实体词 */
|
|
223
|
+
entity_word: Lark.EntityWord[];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
namespace Classification {
|
|
227
|
+
interface Methods {
|
|
228
|
+
/**
|
|
229
|
+
* 获取词典分类
|
|
230
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list
|
|
231
|
+
*/
|
|
232
|
+
list(query?: Pagination): Promise<ListResponse> & AsyncIterableIterator<Lark.Classification>;
|
|
233
|
+
}
|
|
234
|
+
interface ListResponse {
|
|
235
|
+
items?: Lark.Classification[];
|
|
236
|
+
/** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
|
|
237
|
+
page_token?: string;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
namespace File {
|
|
241
|
+
interface Methods {
|
|
242
|
+
/**
|
|
243
|
+
* 上传图片
|
|
244
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload
|
|
245
|
+
*/
|
|
246
|
+
upload(form: UploadForm): Promise<UploadResponse>;
|
|
247
|
+
/**
|
|
248
|
+
* 下载图片
|
|
249
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/download
|
|
250
|
+
*/
|
|
251
|
+
download(file_token: string): Promise<ArrayBuffer>;
|
|
252
|
+
}
|
|
253
|
+
interface UploadForm {
|
|
254
|
+
/** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
|
|
255
|
+
name: string;
|
|
256
|
+
/** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
|
|
257
|
+
file: Blob;
|
|
258
|
+
}
|
|
259
|
+
interface UploadResponse {
|
|
260
|
+
/** 文件 token */
|
|
261
|
+
file_token?: string;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
239
264
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as Lark from '.';
|
|
2
|
+
import { Pagination } from '../internal';
|
|
3
|
+
declare module '../internal' {
|
|
4
|
+
interface Internal {
|
|
5
|
+
base: Base.Methods;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Base {
|
|
9
|
+
interface Methods {
|
|
10
|
+
app: App.Methods;
|
|
11
|
+
}
|
|
12
|
+
namespace App {
|
|
13
|
+
interface Methods {
|
|
14
|
+
role: Role.Methods;
|
|
15
|
+
}
|
|
16
|
+
namespace Role {
|
|
17
|
+
interface Methods {
|
|
18
|
+
/**
|
|
19
|
+
* 新增自定义角色
|
|
20
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/advanced-permission/base-v2/app-role/create
|
|
21
|
+
*/
|
|
22
|
+
create(app_token: string, body: CreateRequest): Promise<CreateResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* 更新自定义角色
|
|
25
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/advanced-permission/base-v2/app-role/update
|
|
26
|
+
*/
|
|
27
|
+
update(app_token: string, role_id: string, body: UpdateRequest): Promise<UpdateResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* 列出自定义角色
|
|
30
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/advanced-permission/base-v2/app-role/list
|
|
31
|
+
*/
|
|
32
|
+
list(app_token: string, query?: Pagination): Promise<ListResponse> & AsyncIterableIterator<Lark.Role>;
|
|
33
|
+
}
|
|
34
|
+
interface CreateRequest {
|
|
35
|
+
/** 自定义权限的名字 */
|
|
36
|
+
role_name: string;
|
|
37
|
+
/** 数据表权限 */
|
|
38
|
+
table_roles: Lark.TableRole[];
|
|
39
|
+
/** block权限 */
|
|
40
|
+
block_roles?: Lark.BlockRole[];
|
|
41
|
+
/** base权限 */
|
|
42
|
+
base_rule?: Record<string, number>;
|
|
43
|
+
}
|
|
44
|
+
interface CreateResponse {
|
|
45
|
+
/** 自定义权限 */
|
|
46
|
+
role?: Lark.Role;
|
|
47
|
+
}
|
|
48
|
+
interface UpdateRequest {
|
|
49
|
+
/** 自定义权限的名字 */
|
|
50
|
+
role_name: string;
|
|
51
|
+
/** 数据表权限 */
|
|
52
|
+
table_roles: Lark.TableRole[];
|
|
53
|
+
/** block权限 */
|
|
54
|
+
block_roles?: Lark.BlockRole[];
|
|
55
|
+
/** base权限 */
|
|
56
|
+
base_rule?: Record<string, number>;
|
|
57
|
+
}
|
|
58
|
+
interface UpdateResponse {
|
|
59
|
+
/** 自定义角色 */
|
|
60
|
+
role?: Lark.Role;
|
|
61
|
+
}
|
|
62
|
+
interface ListResponse {
|
|
63
|
+
/** 自定义角色列表 */
|
|
64
|
+
items?: Lark.Role[];
|
|
65
|
+
/** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
|
|
66
|
+
page_token?: string;
|
|
67
|
+
/** 是否还有更多项 */
|
|
68
|
+
has_more?: boolean;
|
|
69
|
+
/** 总数 */
|
|
70
|
+
total?: number;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|