@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,239 +1,264 @@
1
- import { Classification, ClassificationFilter, Draft, Entity, EntityWord, MatchInfo, OuterInfo, Phrase, RelatedMeta, Term } from '.';
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 interface CreateBaikeDraftRequest {
73
- /** 实体词 Id */
74
- id?: string;
75
- /** 词条名 */
76
- main_keys: Term[];
77
- /** 别名 */
78
- aliases?: Term[];
79
- /** 详情描述 */
80
- description?: string;
81
- /** 相关数据 */
82
- related_meta?: RelatedMeta;
83
- /** 外部 id 关联数据 */
84
- outer_info?: OuterInfo;
85
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
86
- rich_text?: string;
87
- }
88
- export interface CreateBaikeDraftQuery {
89
- /** 此次调用中使用的用户ID的类型 */
90
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
91
- }
92
- export interface CreateBaikeDraftResponse {
93
- draft?: Draft;
94
- }
95
- export interface UpdateBaikeDraftRequest {
96
- /** 实体词 Id */
97
- id?: string;
98
- /** 词条名 */
99
- main_keys: Term[];
100
- /** 别名 */
101
- aliases?: Term[];
102
- /** 详情描述 */
103
- description?: string;
104
- /** 相关数据 */
105
- related_meta?: RelatedMeta;
106
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
107
- rich_text?: string;
108
- }
109
- export interface UpdateBaikeDraftQuery {
110
- /** 此次调用中使用的用户ID的类型 */
111
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
112
- }
113
- export interface UpdateBaikeDraftResponse {
114
- draft?: Draft;
115
- }
116
- export interface CreateBaikeEntityRequest {
117
- /** 词条名 */
118
- main_keys: Term[];
119
- /** 别名 */
120
- aliases?: Term[];
121
- /** 详情描述 */
122
- description?: string;
123
- /** 相关数据 */
124
- related_meta?: RelatedMeta;
125
- /** 外部 id 关联数据 */
126
- outer_info?: OuterInfo;
127
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
128
- rich_text?: string;
129
- }
130
- export interface CreateBaikeEntityQuery {
131
- /** 此次调用中使用的用户ID的类型 */
132
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
133
- }
134
- export interface CreateBaikeEntityResponse {
135
- entity?: Entity;
136
- }
137
- export interface UpdateBaikeEntityRequest {
138
- /** 词条名 */
139
- main_keys: Term[];
140
- /** 别名 */
141
- aliases?: Term[];
142
- /** 详情描述 */
143
- description?: string;
144
- /** 相关数据 */
145
- related_meta?: RelatedMeta;
146
- /** 外部 id 关联数据 */
147
- outer_info?: OuterInfo;
148
- /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
149
- rich_text?: string;
150
- }
151
- export interface UpdateBaikeEntityQuery {
152
- /** 此次调用中使用的用户ID的类型 */
153
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
154
- }
155
- export interface UpdateBaikeEntityResponse {
156
- entity?: Entity;
157
- }
158
- export interface GetBaikeEntityQuery {
159
- /** 外部系统 */
160
- provider?: string;
161
- /** 词条在外部系统中对应的唯一 ID */
162
- outer_id?: string;
163
- /** 此次调用中使用的用户ID的类型 */
164
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
165
- }
166
- export interface GetBaikeEntityResponse {
167
- /** 实体词 */
168
- entity?: Entity;
169
- }
170
- export interface ListBaikeEntityQuery extends Pagination {
171
- /** 相关外部系统【可用来过滤词条数据】 */
172
- provider?: string;
173
- /** 此次调用中使用的用户ID的类型 */
174
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
175
- }
176
- export interface ListBaikeEntityResponse {
177
- entities?: Entity[];
178
- /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
179
- page_token?: string;
180
- }
181
- export interface MatchBaikeEntityRequest {
182
- /** 搜索关键词,将与词条名、别名进行精准匹配 */
183
- word: string;
184
- }
185
- export interface MatchBaikeEntityResponse {
186
- /** 匹配结果 */
187
- results?: MatchInfo[];
188
- }
189
- export interface SearchBaikeEntityRequest {
190
- /** 搜索关键词 */
191
- query?: string;
192
- /** 分类筛选 */
193
- classification_filter?: ClassificationFilter;
194
- /** 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建 */
195
- sources?: number[];
196
- /** 创建者 */
197
- creators?: string[];
198
- }
199
- export interface SearchBaikeEntityQuery extends Pagination {
200
- /** 此次调用中使用的用户ID的类型 */
201
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
202
- }
203
- export interface SearchBaikeEntityResponse {
204
- /** 数据数组 */
205
- entities?: Entity[];
206
- /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
207
- page_token?: string;
208
- }
209
- export interface HighlightBaikeEntityRequest {
210
- /** 需要识别百科词条的内容(不超过1000字) */
211
- text: string;
212
- }
213
- export interface HighlightBaikeEntityResponse {
214
- /** 返回识别到的实体词信息 */
215
- phrases?: Phrase[];
216
- }
217
- export interface ExtractBaikeEntityRequest {
218
- /** 需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容) */
219
- text?: string;
220
- }
221
- export interface ExtractBaikeEntityResponse {
222
- /** 文本中可能的成为百科词条的实体词 */
223
- entity_word: EntityWord[];
224
- }
225
- export interface ListBaikeClassificationResponse {
226
- items?: Classification[];
227
- /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
228
- page_token?: string;
229
- }
230
- export interface UploadBaikeFileForm {
231
- /** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
232
- name: string;
233
- /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
234
- file: Blob;
235
- }
236
- export interface UploadBaikeFileResponse {
237
- /** 文件 token */
238
- file_token?: string;
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
+ }