@satorijs/adapter-lark 3.8.6 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/content.d.ts +433 -0
  3. package/lib/http.d.ts +1 -1
  4. package/lib/index.cjs +2787 -1714
  5. package/lib/index.cjs.map +6 -0
  6. package/lib/index.d.ts +4 -2
  7. package/lib/internal.d.ts +38 -0
  8. package/lib/message.d.ts +2 -0
  9. package/lib/types/acs.d.ts +177 -0
  10. package/lib/types/admin.d.ts +270 -0
  11. package/lib/types/aily.d.ts +221 -0
  12. package/lib/types/apaas.d.ts +499 -0
  13. package/lib/types/api.d.ts +1 -14
  14. package/lib/types/application.d.ts +406 -0
  15. package/lib/types/approval.d.ts +779 -0
  16. package/lib/types/attendance.d.ts +957 -0
  17. package/lib/types/auth.d.ts +86 -0
  18. package/lib/types/authen.d.ts +191 -0
  19. package/lib/types/baike.d.ts +239 -0
  20. package/lib/types/bitable.d.ts +691 -0
  21. package/lib/types/board.d.ts +19 -0
  22. package/lib/types/calendar.d.ts +653 -0
  23. package/lib/types/cardkit.d.ts +139 -0
  24. package/lib/types/compensation.d.ts +54 -0
  25. package/lib/types/contact.d.ts +1137 -0
  26. package/lib/types/corehr.d.ts +4383 -0
  27. package/lib/types/docs.d.ts +23 -0
  28. package/lib/types/document_ai.d.ts +257 -0
  29. package/lib/types/docx.d.ts +380 -0
  30. package/lib/types/drive.d.ts +1045 -0
  31. package/lib/types/ehr.d.ts +32 -0
  32. package/lib/types/event.d.ts +9 -18
  33. package/lib/types/guild.d.ts +59 -0
  34. package/lib/types/helpdesk.d.ts +738 -0
  35. package/lib/types/hire.d.ts +3150 -0
  36. package/lib/types/human_authentication.d.ts +27 -0
  37. package/lib/types/im.d.ts +1300 -0
  38. package/lib/types/index.d.ts +16432 -34
  39. package/lib/types/lingo.d.ts +254 -0
  40. package/lib/types/mail.d.ts +680 -0
  41. package/lib/types/mdm.d.ts +42 -0
  42. package/lib/types/message/asset.d.ts +40 -0
  43. package/lib/types/minutes.d.ts +31 -0
  44. package/lib/types/moments.d.ts +18 -0
  45. package/lib/types/okr.d.ts +205 -0
  46. package/lib/types/optical_char_recognition.d.ts +17 -0
  47. package/lib/types/passport.d.ts +45 -0
  48. package/lib/types/payroll.d.ts +50 -0
  49. package/lib/types/performance.d.ts +413 -0
  50. package/lib/types/personal_settings.d.ts +87 -0
  51. package/lib/types/report.d.ts +57 -0
  52. package/lib/types/search.d.ts +216 -0
  53. package/lib/types/security_and_compliance.d.ts +24 -0
  54. package/lib/types/sheets.d.ts +326 -0
  55. package/lib/types/speech_to_text.d.ts +39 -0
  56. package/lib/types/task.d.ts +1153 -0
  57. package/lib/types/tenant.d.ts +23 -0
  58. package/lib/types/translation.d.ts +37 -0
  59. package/lib/types/user.d.ts +78 -0
  60. package/lib/types/utils.d.ts +9 -0
  61. package/lib/types/vc.d.ts +948 -0
  62. package/lib/types/verification.d.ts +14 -0
  63. package/lib/types/wiki.d.ts +240 -0
  64. package/lib/types/workplace.d.ts +43 -0
  65. package/lib/utils.d.ts +143 -7
  66. package/package.json +6 -4
  67. package/src/bot.ts +19 -3
  68. package/src/{types/message/content.ts → content.ts} +1 -0
  69. package/src/http.ts +1 -3
  70. package/src/index.ts +4 -2
  71. package/src/internal.ts +144 -0
  72. package/src/message.ts +13 -11
  73. package/src/types/acs.ts +236 -0
  74. package/src/types/admin.ts +328 -0
  75. package/src/types/aily.ts +288 -0
  76. package/src/types/apaas.ts +646 -0
  77. package/src/types/application.ts +520 -0
  78. package/src/types/approval.ts +924 -0
  79. package/src/types/attendance.ts +1153 -0
  80. package/src/types/auth.ts +114 -0
  81. package/src/types/authen.ts +220 -0
  82. package/src/types/baike.ts +306 -0
  83. package/src/types/bitable.ts +879 -0
  84. package/src/types/board.ts +31 -0
  85. package/src/types/calendar.ts +817 -0
  86. package/src/types/cardkit.ts +182 -0
  87. package/src/types/compensation.ts +79 -0
  88. package/src/types/contact.ts +1411 -0
  89. package/src/types/corehr.ts +5288 -0
  90. package/src/types/docs.ts +33 -0
  91. package/src/types/document_ai.ts +352 -0
  92. package/src/types/docx.ts +471 -0
  93. package/src/types/drive.ts +1312 -0
  94. package/src/types/ehr.ts +43 -0
  95. package/src/types/event.ts +15 -21
  96. package/src/types/helpdesk.ts +916 -0
  97. package/src/types/hire.ts +3918 -0
  98. package/src/types/human_authentication.ts +38 -0
  99. package/src/types/im.ts +1605 -0
  100. package/src/types/index.ts +17754 -39
  101. package/src/types/lingo.ts +321 -0
  102. package/src/types/mail.ts +851 -0
  103. package/src/types/mdm.ts +57 -0
  104. package/src/types/minutes.ts +46 -0
  105. package/src/types/moments.ts +28 -0
  106. package/src/types/okr.ts +261 -0
  107. package/src/types/optical_char_recognition.ts +27 -0
  108. package/src/types/passport.ts +61 -0
  109. package/src/types/payroll.ts +69 -0
  110. package/src/types/performance.ts +524 -0
  111. package/src/types/personal_settings.ts +116 -0
  112. package/src/types/report.ts +77 -0
  113. package/src/types/search.ts +268 -0
  114. package/src/types/security_and_compliance.ts +33 -0
  115. package/src/types/sheets.ts +425 -0
  116. package/src/types/speech_to_text.ts +54 -0
  117. package/src/types/task.ts +1464 -0
  118. package/src/types/tenant.ts +36 -0
  119. package/src/types/translation.ts +52 -0
  120. package/src/types/vc.ts +1197 -0
  121. package/src/types/verification.ts +23 -0
  122. package/src/types/wiki.ts +313 -0
  123. package/src/types/workplace.ts +59 -0
  124. package/src/utils.ts +160 -8
  125. package/src/types/api.ts +0 -30848
  126. package/src/types/internal.ts +0 -84
  127. package/src/types/message/index.ts +0 -97
@@ -0,0 +1,321 @@
1
+ import { Classification, ClassificationFilter, Draft, Entity, I18nEntryDesc, MatchInfo, OuterInfo, Phrase, RelatedMeta, Repo, Term } from '.'
2
+ import { Internal, Pagination } from '../internal'
3
+
4
+ declare module '../internal' {
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>
76
+ }
77
+ }
78
+
79
+ export interface CreateLingoDraftRequest {
80
+ /** 实体词 Id */
81
+ id?: string
82
+ /** 词条名 */
83
+ main_keys: Term[]
84
+ /** 别名 */
85
+ aliases?: Term[]
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
+ }
97
+
98
+ export interface CreateLingoDraftQuery {
99
+ /** 词库ID */
100
+ repo_id?: string
101
+ /** 此次调用中使用的用户ID的类型 */
102
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
103
+ }
104
+
105
+ export interface UpdateLingoDraftRequest {
106
+ /** 实体词 Id */
107
+ id?: string
108
+ /** 词条名 */
109
+ main_keys: Term[]
110
+ /** 别名 */
111
+ aliases?: Term[]
112
+ /** 详情描述 */
113
+ description?: string
114
+ /** 相关数据 */
115
+ related_meta?: RelatedMeta
116
+ /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
117
+ rich_text?: string
118
+ /** 国际化的词条释义 */
119
+ i18n_descs?: I18nEntryDesc[]
120
+ }
121
+
122
+ export interface UpdateLingoDraftQuery {
123
+ /** 此次调用中使用的用户ID的类型 */
124
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
125
+ }
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
+
144
+ export interface CreateLingoEntityQuery {
145
+ /** 词库 ID */
146
+ repo_id?: string
147
+ /** 此次调用中使用的用户ID的类型 */
148
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
149
+ }
150
+
151
+ export interface UpdateLingoEntityRequest {
152
+ /** 词条名 */
153
+ main_keys: Term[]
154
+ /** 别名 */
155
+ aliases?: Term[]
156
+ /** 详情描述 */
157
+ description?: string
158
+ /** 相关数据 */
159
+ related_meta?: RelatedMeta
160
+ /** 外部 id 关联数据 */
161
+ outer_info?: OuterInfo
162
+ /** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
163
+ rich_text?: string
164
+ /** 国际化的词条释义 */
165
+ i18n_descs?: I18nEntryDesc[]
166
+ }
167
+
168
+ export interface UpdateLingoEntityQuery {
169
+ /** 此次调用中使用的用户ID的类型 */
170
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
171
+ }
172
+
173
+ export interface DeleteLingoEntityQuery {
174
+ /** 数据提供方(使用时需要将路径中的词条 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
175
+ provider?: string
176
+ /** 外部唯一 id(使用时需要将路径中的词条 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
177
+ outer_id?: string
178
+ }
179
+
180
+ export interface GetLingoEntityQuery {
181
+ /** 数据提供方(使用时需要将路径中的实体词 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
182
+ provider?: string
183
+ /** 外部唯一 id(使用时需要将路径中的实体词 ID 固定为:enterprise_0,且提供 provider 和 outer_id) */
184
+ outer_id?: string
185
+ /** 此次调用中使用的用户ID的类型 */
186
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
187
+ }
188
+
189
+ export interface ListLingoEntityQuery 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
+
198
+ export interface MatchLingoEntityRequest {
199
+ /** 实体词主关键词、全称、别名全匹配 */
200
+ word: string
201
+ }
202
+
203
+ export interface MatchLingoEntityQuery {
204
+ /** 词库ID */
205
+ repo_id?: string
206
+ }
207
+
208
+ export interface SearchLingoEntityRequest {
209
+ /** 搜索关键词 */
210
+ query?: string
211
+ /** 分类筛选 */
212
+ classification_filter?: ClassificationFilter
213
+ /** 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建 */
214
+ sources?: number[]
215
+ /** 创建者 */
216
+ creators?: string[]
217
+ }
218
+
219
+ export interface SearchLingoEntityQuery extends Pagination {
220
+ /** 词库ID */
221
+ repo_id?: string
222
+ /** 此次调用中使用的用户ID的类型 */
223
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
224
+ }
225
+
226
+ export interface HighlightLingoEntityRequest {
227
+ /** 需要被识别实体词内容的一句话(不要超过1000字) */
228
+ text: string
229
+ }
230
+
231
+ export interface ListLingoClassificationQuery extends Pagination {
232
+ /** 词库ID */
233
+ repo_id?: string
234
+ }
235
+
236
+ export interface UploadLingoFileForm {
237
+ /** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
238
+ name: string
239
+ /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
240
+ file: Blob
241
+ }
242
+
243
+ export interface CreateLingoDraftResponse {
244
+ draft?: Draft
245
+ }
246
+
247
+ export interface UpdateLingoDraftResponse {
248
+ draft?: Draft
249
+ }
250
+
251
+ export interface CreateLingoEntityResponse {
252
+ entity?: Entity
253
+ }
254
+
255
+ export interface UpdateLingoEntityResponse {
256
+ entity?: Entity
257
+ }
258
+
259
+ export interface GetLingoEntityResponse {
260
+ /** 实体词 */
261
+ entity?: Entity
262
+ }
263
+
264
+ export interface MatchLingoEntityResponse {
265
+ /** 匹配结果 */
266
+ results?: MatchInfo[]
267
+ }
268
+
269
+ export interface HighlightLingoEntityResponse {
270
+ /** 返回识别到的实体词信息 */
271
+ phrases?: Phrase[]
272
+ }
273
+
274
+ export interface ListLingoRepoResponse {
275
+ /** 词库列表 */
276
+ items?: Repo[]
277
+ }
278
+
279
+ export interface UploadLingoFileResponse {
280
+ /** 文件 token */
281
+ file_token?: string
282
+ }
283
+
284
+ Internal.define({
285
+ '/lingo/v1/drafts': {
286
+ POST: 'createLingoDraft',
287
+ },
288
+ '/lingo/v1/drafts/{draft_id}': {
289
+ PUT: 'updateLingoDraft',
290
+ },
291
+ '/lingo/v1/entities': {
292
+ POST: 'createLingoEntity',
293
+ GET: { name: 'listLingoEntity', pagination: { argIndex: 0, itemsKey: 'entities' } },
294
+ },
295
+ '/lingo/v1/entities/{entity_id}': {
296
+ PUT: 'updateLingoEntity',
297
+ DELETE: 'deleteLingoEntity',
298
+ GET: 'getLingoEntity',
299
+ },
300
+ '/lingo/v1/entities/match': {
301
+ POST: 'matchLingoEntity',
302
+ },
303
+ '/lingo/v1/entities/search': {
304
+ POST: { name: 'searchLingoEntity', pagination: { argIndex: 1, itemsKey: 'entities' } },
305
+ },
306
+ '/lingo/v1/entities/highlight': {
307
+ POST: 'highlightLingoEntity',
308
+ },
309
+ '/lingo/v1/classifications': {
310
+ GET: { name: 'listLingoClassification', pagination: { argIndex: 0 } },
311
+ },
312
+ '/lingo/v1/repos': {
313
+ GET: 'listLingoRepo',
314
+ },
315
+ '/lingo/v1/files/upload': {
316
+ POST: { name: 'uploadLingoFile', multipart: true },
317
+ },
318
+ '/lingo/v1/files/{file_token}/download': {
319
+ GET: { name: 'downloadLingoFile', type: 'binary' },
320
+ },
321
+ })