@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.
Files changed (119) hide show
  1. package/lib/content.d.ts +211 -93
  2. package/lib/index.cjs +2954 -2474
  3. package/lib/internal.d.ts +4 -4
  4. package/lib/message.d.ts +2 -3
  5. package/lib/types/acs.d.ts +212 -172
  6. package/lib/types/admin.d.ts +331 -291
  7. package/lib/types/aily.d.ts +331 -216
  8. package/lib/types/apaas.d.ts +646 -494
  9. package/lib/types/application.d.ts +559 -458
  10. package/lib/types/approval.d.ts +826 -791
  11. package/lib/types/attendance.d.ts +1094 -994
  12. package/lib/types/auth.d.ts +66 -61
  13. package/lib/types/authen.d.ts +221 -186
  14. package/lib/types/baike.d.ts +258 -233
  15. package/lib/types/base.d.ts +74 -0
  16. package/lib/types/bitable.d.ts +830 -770
  17. package/lib/types/board.d.ts +29 -14
  18. package/lib/types/calendar.d.ts +660 -605
  19. package/lib/types/cardkit.d.ts +149 -134
  20. package/lib/types/compensation.d.ts +84 -49
  21. package/lib/types/contact.d.ts +1279 -1204
  22. package/lib/types/corehr.d.ts +4982 -4526
  23. package/lib/types/directory.d.ts +447 -0
  24. package/lib/types/docs.d.ts +28 -18
  25. package/lib/types/document_ai.d.ts +347 -252
  26. package/lib/types/docx.d.ts +428 -383
  27. package/lib/types/drive.d.ts +1093 -1048
  28. package/lib/types/ehr.d.ts +66 -51
  29. package/lib/types/event.d.ts +16 -6
  30. package/lib/types/helpdesk.d.ts +816 -741
  31. package/lib/types/hire.d.ts +3955 -3589
  32. package/lib/types/human_authentication.d.ts +32 -22
  33. package/lib/types/im.d.ts +1420 -1295
  34. package/lib/types/index.d.ts +1422 -330
  35. package/lib/types/lingo.d.ts +279 -249
  36. package/lib/types/mail.d.ts +1032 -675
  37. package/lib/types/mdm.d.ts +105 -37
  38. package/lib/types/minutes.d.ts +73 -26
  39. package/lib/types/moments.d.ts +23 -13
  40. package/lib/types/okr.d.ts +266 -225
  41. package/lib/types/optical_char_recognition.d.ts +22 -12
  42. package/lib/types/passport.d.ts +58 -48
  43. package/lib/types/payroll.d.ts +210 -53
  44. package/lib/types/performance.d.ts +463 -414
  45. package/lib/types/personal_settings.d.ts +93 -82
  46. package/lib/types/report.d.ts +79 -58
  47. package/lib/types/search.d.ts +265 -235
  48. package/lib/types/security_and_compliance.d.ts +30 -19
  49. package/lib/types/sheets.d.ts +356 -321
  50. package/lib/types/speech_to_text.d.ts +44 -34
  51. package/lib/types/task.d.ts +998 -1087
  52. package/lib/types/tenant.d.ts +25 -15
  53. package/lib/types/translation.d.ts +42 -32
  54. package/lib/types/trust_party.d.ts +81 -0
  55. package/lib/types/vc.d.ts +1218 -1123
  56. package/lib/types/verification.d.ts +11 -6
  57. package/lib/types/wiki.d.ts +270 -235
  58. package/lib/types/workplace.d.ts +58 -38
  59. package/lib/utils.d.ts +2 -2
  60. package/package.json +4 -4
  61. package/src/bot.ts +15 -15
  62. package/src/content.ts +230 -107
  63. package/src/internal.ts +29 -12
  64. package/src/message.ts +82 -111
  65. package/src/types/acs.ts +234 -186
  66. package/src/types/admin.ts +353 -305
  67. package/src/types/aily.ts +375 -233
  68. package/src/types/apaas.ts +754 -568
  69. package/src/types/application.ts +633 -507
  70. package/src/types/approval.ts +914 -872
  71. package/src/types/attendance.ts +1226 -1104
  72. package/src/types/auth.ts +72 -66
  73. package/src/types/authen.ts +233 -191
  74. package/src/types/baike.ts +276 -246
  75. package/src/types/base.ts +93 -0
  76. package/src/types/bitable.ts +966 -894
  77. package/src/types/board.ts +34 -16
  78. package/src/types/calendar.ts +751 -685
  79. package/src/types/cardkit.ts +164 -146
  80. package/src/types/compensation.ts +97 -55
  81. package/src/types/contact.ts +1465 -1375
  82. package/src/types/corehr.ts +5664 -5077
  83. package/src/types/directory.ts +569 -0
  84. package/src/types/docs.ts +31 -19
  85. package/src/types/document_ai.ts +401 -287
  86. package/src/types/docx.ts +492 -438
  87. package/src/types/drive.ts +1266 -1213
  88. package/src/types/ehr.ts +71 -53
  89. package/src/types/event.ts +19 -7
  90. package/src/types/helpdesk.ts +930 -840
  91. package/src/types/hire.ts +4453 -4019
  92. package/src/types/human_authentication.ts +35 -23
  93. package/src/types/im.ts +1626 -1476
  94. package/src/types/index.ts +1532 -346
  95. package/src/types/lingo.ts +299 -263
  96. package/src/types/mail.ts +1231 -779
  97. package/src/types/mdm.ts +122 -39
  98. package/src/types/minutes.ts +88 -28
  99. package/src/types/moments.ts +26 -14
  100. package/src/types/okr.ts +286 -238
  101. package/src/types/optical_char_recognition.ts +25 -13
  102. package/src/types/passport.ts +62 -50
  103. package/src/types/payroll.ts +254 -57
  104. package/src/types/performance.ts +528 -467
  105. package/src/types/personal_settings.ts +101 -89
  106. package/src/types/report.ts +86 -62
  107. package/src/types/search.ts +285 -249
  108. package/src/types/security_and_compliance.ts +33 -21
  109. package/src/types/sheets.ts +421 -379
  110. package/src/types/speech_to_text.ts +48 -36
  111. package/src/types/task.ts +1152 -1260
  112. package/src/types/tenant.ts +29 -17
  113. package/src/types/translation.ts +46 -34
  114. package/src/types/trust_party.ts +110 -0
  115. package/src/types/vc.ts +1397 -1283
  116. package/src/types/verification.ts +13 -7
  117. package/src/types/wiki.ts +293 -251
  118. package/src/types/workplace.ts +65 -41
  119. package/src/utils.ts +3 -3
@@ -1,254 +1,284 @@
1
- import { Classification, ClassificationFilter, Draft, Entity, I18nEntryDesc, MatchInfo, OuterInfo, Phrase, RelatedMeta, Repo, Term } from '.';
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 interface CreateLingoDraftRequest {
78
- /** 实体词 Id */
79
- id?: string;
80
- /** 词条名 */
81
- main_keys: Term[];
82
- /** 别名 */
83
- aliases?: Term[];
84
- /** 详情描述 */
85
- description?: string;
86
- /** 相关数据 */
87
- related_meta?: RelatedMeta;
88
- /** 外部 id 关联数据 */
89
- outer_info?: OuterInfo;
90
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
91
- rich_text?: string;
92
- /** 国际化的词条释义 */
93
- i18n_descs?: I18nEntryDesc[];
94
- }
95
- export interface CreateLingoDraftQuery {
96
- /** 词库ID */
97
- repo_id?: string;
98
- /** 此次调用中使用的用户ID的类型 */
99
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
100
- }
101
- export interface CreateLingoDraftResponse {
102
- draft?: Draft;
103
- }
104
- export interface UpdateLingoDraftRequest {
105
- /** 实体词 Id */
106
- id?: string;
107
- /** 词条名 */
108
- main_keys: Term[];
109
- /** 别名 */
110
- aliases?: Term[];
111
- /** 详情描述 */
112
- description?: string;
113
- /** 相关数据 */
114
- related_meta?: RelatedMeta;
115
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
116
- rich_text?: string;
117
- /** 国际化的词条释义 */
118
- i18n_descs?: I18nEntryDesc[];
119
- }
120
- export interface UpdateLingoDraftQuery {
121
- /** 此次调用中使用的用户ID的类型 */
122
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
123
- }
124
- export interface UpdateLingoDraftResponse {
125
- draft?: Draft;
126
- }
127
- export interface CreateLingoEntityRequest {
128
- /** 词条名 */
129
- main_keys: Term[];
130
- /** 别名 */
131
- aliases?: Term[];
132
- /** 详情描述 */
133
- description?: string;
134
- /** 相关数据 */
135
- related_meta?: RelatedMeta;
136
- /** 外部 id 关联数据 */
137
- outer_info?: OuterInfo;
138
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
139
- rich_text?: string;
140
- /** 国际化的词条释义 */
141
- i18n_descs?: I18nEntryDesc[];
142
- }
143
- export interface CreateLingoEntityQuery {
144
- /** 词库 ID */
145
- repo_id?: string;
146
- /** 此次调用中使用的用户ID的类型 */
147
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
148
- }
149
- export interface CreateLingoEntityResponse {
150
- entity?: Entity;
151
- }
152
- export interface UpdateLingoEntityRequest {
153
- /** 词条名 */
154
- main_keys: Term[];
155
- /** 别名 */
156
- aliases?: Term[];
157
- /** 详情描述 */
158
- description?: string;
159
- /** 相关数据 */
160
- related_meta?: RelatedMeta;
161
- /** 外部 id 关联数据 */
162
- outer_info?: OuterInfo;
163
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
164
- rich_text?: string;
165
- /** 国际化的词条释义 */
166
- i18n_descs?: I18nEntryDesc[];
167
- }
168
- export interface UpdateLingoEntityQuery {
169
- /** 此次调用中使用的用户ID的类型 */
170
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
171
- }
172
- export interface UpdateLingoEntityResponse {
173
- entity?: Entity;
174
- }
175
- export interface DeleteLingoEntityQuery {
176
- /** 数据提供方(使用时需要将路径中的词条 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
177
- provider?: string;
178
- /** 外部唯一 id(使用时需要将路径中的词条 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
179
- outer_id?: string;
180
- }
181
- export interface GetLingoEntityQuery {
182
- /** 数据提供方(使用时需要将路径中的实体词 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
183
- provider?: string;
184
- /** 外部唯一 id(使用时需要将路径中的实体词 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
185
- outer_id?: string;
186
- /** 此次调用中使用的用户ID的类型 */
187
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
188
- }
189
- export interface GetLingoEntityResponse {
190
- /** 实体词 */
191
- entity?: Entity;
192
- }
193
- export interface ListLingoEntityQuery extends Pagination {
194
- /** 数据提供方【可用来过滤数据】 */
195
- provider?: string;
196
- /** 词库 id */
197
- repo_id?: string;
198
- /** 此次调用中使用的用户ID的类型 */
199
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
200
- }
201
- export interface MatchLingoEntityRequest {
202
- /** 实体词主关键词、全称、别名全匹配 */
203
- word: string;
204
- }
205
- export interface MatchLingoEntityQuery {
206
- /** 词库ID */
207
- repo_id?: string;
208
- }
209
- export interface MatchLingoEntityResponse {
210
- /** 匹配结果 */
211
- results?: MatchInfo[];
212
- }
213
- export interface SearchLingoEntityRequest {
214
- /** 搜索关键词 */
215
- query?: string;
216
- /** 分类筛选 */
217
- classification_filter?: ClassificationFilter;
218
- /** 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建 */
219
- sources?: number[];
220
- /** 创建者 */
221
- creators?: string[];
222
- }
223
- export interface SearchLingoEntityQuery extends Pagination {
224
- /** 词库ID */
225
- repo_id?: string;
226
- /** 此次调用中使用的用户ID的类型 */
227
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
228
- }
229
- export interface HighlightLingoEntityRequest {
230
- /** 需要被识别实体词内容的一句话(不要超过1000字) */
231
- text: string;
232
- }
233
- export interface HighlightLingoEntityResponse {
234
- /** 返回识别到的实体词信息 */
235
- phrases?: Phrase[];
236
- }
237
- export interface ListLingoClassificationQuery extends Pagination {
238
- /** 词库ID */
239
- repo_id?: string;
240
- }
241
- export interface ListLingoRepoResponse {
242
- /** 词库列表 */
243
- items?: Repo[];
244
- }
245
- export interface UploadLingoFileForm {
246
- /** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
247
- name: string;
248
- /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
249
- file: Blob;
250
- }
251
- export interface UploadLingoFileResponse {
252
- /** 文件 token */
253
- file_token?: string;
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
  }