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