@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/drive.ts
CHANGED
|
@@ -1,1321 +1,1374 @@
|
|
|
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/reference/drive-v1/file/list
|
|
9
|
-
*/
|
|
10
|
-
listDriveV1File(query?: ListDriveV1FileQuery): Promise<ListDriveV1FileResponse> & AsyncIterableIterator<File>
|
|
11
|
-
/**
|
|
12
|
-
* 新建文件夹
|
|
13
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_folder
|
|
14
|
-
*/
|
|
15
|
-
createFolderDriveV1File(body: CreateFolderDriveV1FileRequest): Promise<CreateFolderDriveV1FileResponse>
|
|
16
|
-
/**
|
|
17
|
-
* 查询异步任务状态
|
|
18
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check
|
|
19
|
-
*/
|
|
20
|
-
taskCheckDriveV1File(query?: TaskCheckDriveV1FileQuery): Promise<TaskCheckDriveV1FileResponse>
|
|
21
|
-
/**
|
|
22
|
-
* 获取文件元数据
|
|
23
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/meta/batch_query
|
|
24
|
-
*/
|
|
25
|
-
batchQueryDriveV1Meta(body: BatchQueryDriveV1MetaRequest, query?: BatchQueryDriveV1MetaQuery): Promise<BatchQueryDriveV1MetaResponse>
|
|
26
|
-
/**
|
|
27
|
-
* 获取文件统计信息
|
|
28
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-statistics/get
|
|
29
|
-
*/
|
|
30
|
-
getDriveV1FileStatistics(file_token: string, query?: GetDriveV1FileStatisticsQuery): Promise<GetDriveV1FileStatisticsResponse>
|
|
31
|
-
/**
|
|
32
|
-
* 获取文件访问记录
|
|
33
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-view_record/list
|
|
34
|
-
*/
|
|
35
|
-
listDriveV1FileViewRecord(file_token: string, query?: ListDriveV1FileViewRecordQuery): Paginated<FileViewRecord>
|
|
36
|
-
/**
|
|
37
|
-
* 复制文件
|
|
38
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/copy
|
|
39
|
-
*/
|
|
40
|
-
copyDriveV1File(file_token: string, body: CopyDriveV1FileRequest, query?: CopyDriveV1FileQuery): Promise<CopyDriveV1FileResponse>
|
|
41
|
-
/**
|
|
42
|
-
* 移动文件或文件夹
|
|
43
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/move
|
|
44
|
-
*/
|
|
45
|
-
moveDriveV1File(file_token: string, body: MoveDriveV1FileRequest): Promise<MoveDriveV1FileResponse>
|
|
46
|
-
/**
|
|
47
|
-
* 删除文件或文件夹
|
|
48
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete
|
|
49
|
-
*/
|
|
50
|
-
deleteDriveV1File(file_token: string, query?: DeleteDriveV1FileQuery): Promise<DeleteDriveV1FileResponse>
|
|
51
|
-
/**
|
|
52
|
-
* 创建文件快捷方式
|
|
53
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_shortcut
|
|
54
|
-
*/
|
|
55
|
-
createShortcutDriveV1File(body: CreateShortcutDriveV1FileRequest, query?: CreateShortcutDriveV1FileQuery): Promise<CreateShortcutDriveV1FileResponse>
|
|
56
|
-
/**
|
|
57
|
-
* 上传文件
|
|
58
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_all
|
|
59
|
-
*/
|
|
60
|
-
uploadAllDriveV1File(form: UploadAllDriveV1FileForm): Promise<UploadAllDriveV1FileResponse>
|
|
61
|
-
/**
|
|
62
|
-
* 分片上传文件-预上传
|
|
63
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_prepare
|
|
64
|
-
*/
|
|
65
|
-
uploadPrepareDriveV1File(body: UploadPrepareDriveV1FileRequest): Promise<UploadPrepareDriveV1FileResponse>
|
|
66
|
-
/**
|
|
67
|
-
* 分片上传文件-上传分片
|
|
68
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_part
|
|
69
|
-
*/
|
|
70
|
-
uploadPartDriveV1File(form: UploadPartDriveV1FileForm): Promise<void>
|
|
71
|
-
/**
|
|
72
|
-
* 分片上传文件-完成上传
|
|
73
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_finish
|
|
74
|
-
*/
|
|
75
|
-
uploadFinishDriveV1File(body: UploadFinishDriveV1FileRequest): Promise<UploadFinishDriveV1FileResponse>
|
|
76
|
-
/**
|
|
77
|
-
* 下载文件
|
|
78
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/download
|
|
79
|
-
*/
|
|
80
|
-
downloadDriveV1File(file_token: string): Promise<ArrayBuffer>
|
|
81
|
-
/**
|
|
82
|
-
* 创建导入任务
|
|
83
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/create
|
|
84
|
-
*/
|
|
85
|
-
createDriveV1ImportTask(body: CreateDriveV1ImportTaskRequest): Promise<CreateDriveV1ImportTaskResponse>
|
|
86
|
-
/**
|
|
87
|
-
* 查询导入任务结果
|
|
88
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/get
|
|
89
|
-
*/
|
|
90
|
-
getDriveV1ImportTask(ticket: string): Promise<GetDriveV1ImportTaskResponse>
|
|
91
|
-
/**
|
|
92
|
-
* 创建导出任务
|
|
93
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create
|
|
94
|
-
*/
|
|
95
|
-
createDriveV1ExportTask(body: CreateDriveV1ExportTaskRequest): Promise<CreateDriveV1ExportTaskResponse>
|
|
96
|
-
/**
|
|
97
|
-
* 查询导出任务结果
|
|
98
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get
|
|
99
|
-
*/
|
|
100
|
-
getDriveV1ExportTask(ticket: string, query?: GetDriveV1ExportTaskQuery): Promise<GetDriveV1ExportTaskResponse>
|
|
101
|
-
/**
|
|
102
|
-
* 下载导出文件
|
|
103
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download
|
|
104
|
-
*/
|
|
105
|
-
downloadDriveV1ExportTask(file_token: string): Promise<ArrayBuffer>
|
|
106
|
-
/**
|
|
107
|
-
* 上传素材
|
|
108
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all
|
|
109
|
-
*/
|
|
110
|
-
uploadAllDriveV1Media(form: UploadAllDriveV1MediaForm): Promise<UploadAllDriveV1MediaResponse>
|
|
111
|
-
/**
|
|
112
|
-
* 分片上传素材-预上传
|
|
113
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_prepare
|
|
114
|
-
*/
|
|
115
|
-
uploadPrepareDriveV1Media(body: UploadPrepareDriveV1MediaRequest): Promise<UploadPrepareDriveV1MediaResponse>
|
|
116
|
-
/**
|
|
117
|
-
* 分片上传素材-上传分片
|
|
118
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_part
|
|
119
|
-
*/
|
|
120
|
-
uploadPartDriveV1Media(form: UploadPartDriveV1MediaForm): Promise<void>
|
|
121
|
-
/**
|
|
122
|
-
* 分片上传素材-完成上传
|
|
123
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_finish
|
|
124
|
-
*/
|
|
125
|
-
uploadFinishDriveV1Media(body: UploadFinishDriveV1MediaRequest): Promise<UploadFinishDriveV1MediaResponse>
|
|
126
|
-
/**
|
|
127
|
-
* 下载素材
|
|
128
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/download
|
|
129
|
-
*/
|
|
130
|
-
downloadDriveV1Media(file_token: string, query?: DownloadDriveV1MediaQuery): Promise<ArrayBuffer>
|
|
131
|
-
/**
|
|
132
|
-
* 获取素材临时下载链接
|
|
133
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/batch_get_tmp_download_url
|
|
134
|
-
*/
|
|
135
|
-
batchGetTmpDownloadUrlDriveV1Media(query?: BatchGetTmpDownloadUrlDriveV1MediaQuery): Promise<BatchGetTmpDownloadUrlDriveV1MediaResponse>
|
|
136
|
-
/**
|
|
137
|
-
* 创建文档版本
|
|
138
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/create
|
|
139
|
-
*/
|
|
140
|
-
createDriveV1FileVersion(file_token: string, body: CreateDriveV1FileVersionRequest, query?: CreateDriveV1FileVersionQuery): Promise<CreateDriveV1FileVersionResponse>
|
|
141
|
-
/**
|
|
142
|
-
* 获取文档版本列表
|
|
143
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list
|
|
144
|
-
*/
|
|
145
|
-
listDriveV1FileVersion(file_token: string, query?: ListDriveV1FileVersionQuery): Paginated<Version>
|
|
146
|
-
/**
|
|
147
|
-
* 获取文档版本信息
|
|
148
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get
|
|
149
|
-
*/
|
|
150
|
-
getDriveV1FileVersion(file_token: string, version_id: string, query?: GetDriveV1FileVersionQuery): Promise<GetDriveV1FileVersionResponse>
|
|
151
|
-
/**
|
|
152
|
-
* 删除文档版本
|
|
153
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete
|
|
154
|
-
*/
|
|
155
|
-
deleteDriveV1FileVersion(file_token: string, version_id: string, query?: DeleteDriveV1FileVersionQuery): Promise<void>
|
|
156
|
-
/**
|
|
157
|
-
* 获取云文档的点赞者列表
|
|
158
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/file-like/list
|
|
159
|
-
*/
|
|
160
|
-
listDriveV2FileLike(file_token: string, query?: ListDriveV2FileLikeQuery): Paginated<FileLike>
|
|
161
|
-
/**
|
|
162
|
-
* 订阅云文档事件
|
|
163
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/subscribe
|
|
164
|
-
*/
|
|
165
|
-
subscribeDriveV1File(file_token: string, query?: SubscribeDriveV1FileQuery): Promise<void>
|
|
166
|
-
/**
|
|
167
|
-
* 查询云文档事件订阅状态
|
|
168
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/get_subscribe
|
|
169
|
-
*/
|
|
170
|
-
getSubscribeDriveV1File(file_token: string, query?: GetSubscribeDriveV1FileQuery): Promise<GetSubscribeDriveV1FileResponse>
|
|
171
|
-
/**
|
|
172
|
-
* 取消云文档事件订阅
|
|
173
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete_subscribe
|
|
174
|
-
*/
|
|
175
|
-
deleteSubscribeDriveV1File(file_token: string, query?: DeleteSubscribeDriveV1FileQuery): Promise<void>
|
|
176
|
-
/**
|
|
177
|
-
* 批量增加协作者权限
|
|
178
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/batch_create
|
|
179
|
-
*/
|
|
180
|
-
batchCreateDriveV1PermissionMember(token: string, body: BatchCreateDriveV1PermissionMemberRequest, query?: BatchCreateDriveV1PermissionMemberQuery): Promise<BatchCreateDriveV1PermissionMemberResponse>
|
|
181
|
-
/**
|
|
182
|
-
* 转移所有者
|
|
183
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/transfer_owner
|
|
184
|
-
*/
|
|
185
|
-
transferOwnerDriveV1PermissionMember(token: string, body: TransferOwnerDriveV1PermissionMemberRequest, query?: TransferOwnerDriveV1PermissionMemberQuery): Promise<void>
|
|
186
|
-
/**
|
|
187
|
-
* 判断当前用户是否有某权限
|
|
188
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/auth
|
|
189
|
-
*/
|
|
190
|
-
authDriveV1PermissionMember(token: string, query?: AuthDriveV1PermissionMemberQuery): Promise<AuthDriveV1PermissionMemberResponse>
|
|
191
|
-
/**
|
|
192
|
-
* 获取协作者列表
|
|
193
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/list
|
|
194
|
-
*/
|
|
195
|
-
listDriveV1PermissionMember(token: string, query?: ListDriveV1PermissionMemberQuery): Promise<ListDriveV1PermissionMemberResponse>
|
|
196
|
-
/**
|
|
197
|
-
* 增加协作者权限
|
|
198
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create
|
|
199
|
-
*/
|
|
200
|
-
createDriveV1PermissionMember(token: string, body: CreateDriveV1PermissionMemberRequest, query?: CreateDriveV1PermissionMemberQuery): Promise<CreateDriveV1PermissionMemberResponse>
|
|
201
|
-
/**
|
|
202
|
-
* 更新协作者权限
|
|
203
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/update
|
|
204
|
-
*/
|
|
205
|
-
updateDriveV1PermissionMember(token: string, member_id: string, body: UpdateDriveV1PermissionMemberRequest, query?: UpdateDriveV1PermissionMemberQuery): Promise<UpdateDriveV1PermissionMemberResponse>
|
|
206
|
-
/**
|
|
207
|
-
* 移除协作者权限
|
|
208
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/delete
|
|
209
|
-
*/
|
|
210
|
-
deleteDriveV1PermissionMember(token: string, member_id: string, body: DeleteDriveV1PermissionMemberRequest, query?: DeleteDriveV1PermissionMemberQuery): Promise<void>
|
|
211
|
-
/**
|
|
212
|
-
* 开启密码
|
|
213
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public-password/create
|
|
214
|
-
*/
|
|
215
|
-
createDriveV1PermissionPublicPassword(token: string, query?: CreateDriveV1PermissionPublicPasswordQuery): Promise<CreateDriveV1PermissionPublicPasswordResponse>
|
|
216
|
-
/**
|
|
217
|
-
* 刷新密码
|
|
218
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public-password/update
|
|
219
|
-
*/
|
|
220
|
-
updateDriveV1PermissionPublicPassword(token: string, query?: UpdateDriveV1PermissionPublicPasswordQuery): Promise<UpdateDriveV1PermissionPublicPasswordResponse>
|
|
221
|
-
/**
|
|
222
|
-
* 关闭密码
|
|
223
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public-password/delete
|
|
224
|
-
*/
|
|
225
|
-
deleteDriveV1PermissionPublicPassword(token: string, query?: DeleteDriveV1PermissionPublicPasswordQuery): Promise<void>
|
|
226
|
-
/**
|
|
227
|
-
* 获取云文档权限设置
|
|
228
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public/get
|
|
229
|
-
*/
|
|
230
|
-
getDriveV1PermissionPublic(token: string, query?: GetDriveV1PermissionPublicQuery): Promise<GetDriveV1PermissionPublicResponse>
|
|
231
|
-
/**
|
|
232
|
-
* 更新云文档权限设置
|
|
233
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public/patch
|
|
234
|
-
*/
|
|
235
|
-
patchDriveV1PermissionPublic(token: string, body: PatchDriveV1PermissionPublicRequest, query?: PatchDriveV1PermissionPublicQuery): Promise<PatchDriveV1PermissionPublicResponse>
|
|
236
|
-
/**
|
|
237
|
-
* 获取云文档权限设置
|
|
238
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/permission-public/get
|
|
239
|
-
*/
|
|
240
|
-
getDriveV2PermissionPublic(token: string, query?: GetDriveV2PermissionPublicQuery): Promise<GetDriveV2PermissionPublicResponse>
|
|
241
|
-
/**
|
|
242
|
-
* 更新云文档权限设置
|
|
243
|
-
* @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/permission-public/patch
|
|
244
|
-
*/
|
|
245
|
-
patchDriveV2PermissionPublic(token: string, body: PatchDriveV2PermissionPublicRequest, query?: PatchDriveV2PermissionPublicQuery): Promise<PatchDriveV2PermissionPublicResponse>
|
|
246
|
-
/**
|
|
247
|
-
* 获取云文档所有评论
|
|
248
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/list
|
|
249
|
-
*/
|
|
250
|
-
listDriveV1FileComment(file_token: string, query?: ListDriveV1FileCommentQuery): Paginated<FileComment>
|
|
251
|
-
/**
|
|
252
|
-
* 批量获取评论
|
|
253
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query
|
|
254
|
-
*/
|
|
255
|
-
batchQueryDriveV1FileComment(file_token: string, body: BatchQueryDriveV1FileCommentRequest, query?: BatchQueryDriveV1FileCommentQuery): Promise<BatchQueryDriveV1FileCommentResponse>
|
|
256
|
-
/**
|
|
257
|
-
* 解决/恢复评论
|
|
258
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/patch
|
|
259
|
-
*/
|
|
260
|
-
patchDriveV1FileComment(file_token: string, comment_id: string, body: PatchDriveV1FileCommentRequest, query?: PatchDriveV1FileCommentQuery): Promise<void>
|
|
261
|
-
/**
|
|
262
|
-
* 添加全文评论
|
|
263
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/create
|
|
264
|
-
*/
|
|
265
|
-
createDriveV1FileComment(file_token: string, body: CreateDriveV1FileCommentRequest, query?: CreateDriveV1FileCommentQuery): Promise<CreateDriveV1FileCommentResponse>
|
|
266
|
-
/**
|
|
267
|
-
* 获取全文评论
|
|
268
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/get
|
|
269
|
-
*/
|
|
270
|
-
getDriveV1FileComment(file_token: string, comment_id: string, query?: GetDriveV1FileCommentQuery): Promise<GetDriveV1FileCommentResponse>
|
|
271
|
-
/**
|
|
272
|
-
* 获取回复信息
|
|
273
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list
|
|
274
|
-
*/
|
|
275
|
-
listDriveV1FileCommentReply(file_token: string, comment_id: string, query?: ListDriveV1FileCommentReplyQuery): Paginated<FileCommentReply>
|
|
276
|
-
/**
|
|
277
|
-
* 更新回复的内容
|
|
278
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/update
|
|
279
|
-
*/
|
|
280
|
-
updateDriveV1FileCommentReply(file_token: string, comment_id: string, reply_id: string, body: UpdateDriveV1FileCommentReplyRequest, query?: UpdateDriveV1FileCommentReplyQuery): Promise<void>
|
|
281
|
-
/**
|
|
282
|
-
* 删除回复
|
|
283
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/delete
|
|
284
|
-
*/
|
|
285
|
-
deleteDriveV1FileCommentReply(file_token: string, comment_id: string, reply_id: string, query?: DeleteDriveV1FileCommentReplyQuery): Promise<void>
|
|
286
|
-
/**
|
|
287
|
-
* 获取订阅状态
|
|
288
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/get
|
|
289
|
-
*/
|
|
290
|
-
getDriveV1FileSubscription(file_token: string, subscription_id: string, body: GetDriveV1FileSubscriptionRequest): Promise<GetDriveV1FileSubscriptionResponse>
|
|
291
|
-
/**
|
|
292
|
-
* 创建订阅
|
|
293
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/create
|
|
294
|
-
*/
|
|
295
|
-
createDriveV1FileSubscription(file_token: string, body: CreateDriveV1FileSubscriptionRequest): Promise<CreateDriveV1FileSubscriptionResponse>
|
|
296
|
-
/**
|
|
297
|
-
* 更新订阅状态
|
|
298
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/patch
|
|
299
|
-
*/
|
|
300
|
-
patchDriveV1FileSubscription(file_token: string, subscription_id: string, body: PatchDriveV1FileSubscriptionRequest): Promise<PatchDriveV1FileSubscriptionResponse>
|
|
6
|
+
drive: Drive.Methods
|
|
301
7
|
}
|
|
302
8
|
}
|
|
303
9
|
|
|
304
|
-
export
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export interface ListDriveV1FileResponse {
|
|
316
|
-
/** 文档详细信息 */
|
|
317
|
-
files?: File[]
|
|
318
|
-
/** 下一页分页参数 */
|
|
319
|
-
next_page_token?: string
|
|
320
|
-
/** 是否有下一页 */
|
|
321
|
-
has_more?: boolean
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export interface CreateFolderDriveV1FileRequest {
|
|
325
|
-
/** 文件夹名称 */
|
|
326
|
-
name: string
|
|
327
|
-
/** 父文件夹token */
|
|
328
|
-
folder_token: string
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
export interface CreateFolderDriveV1FileResponse {
|
|
332
|
-
/** 新创建的文件夹 Token */
|
|
333
|
-
token?: string
|
|
334
|
-
/** 创建文件夹的访问 URL */
|
|
335
|
-
url?: string
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
export interface TaskCheckDriveV1FileQuery {
|
|
339
|
-
/** 文件相关异步任务id */
|
|
340
|
-
task_id: string
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export interface TaskCheckDriveV1FileResponse {
|
|
344
|
-
/** 异步任务的执行状态 */
|
|
345
|
-
status?: string
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
export interface BatchQueryDriveV1MetaRequest {
|
|
349
|
-
/** 请求文档, 一次不超过200个 */
|
|
350
|
-
request_docs: RequestDoc[]
|
|
351
|
-
/** 是否获取文档链接 */
|
|
352
|
-
with_url?: boolean
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
export interface BatchQueryDriveV1MetaQuery {
|
|
356
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
357
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export interface BatchQueryDriveV1MetaResponse {
|
|
361
|
-
metas: Meta[]
|
|
362
|
-
failed_list?: MetaFailed[]
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
export interface GetDriveV1FileStatisticsQuery {
|
|
366
|
-
/** 文档类型 */
|
|
367
|
-
file_type: 'doc' | 'sheet' | 'mindnote' | 'bitable' | 'wiki' | 'file' | 'docx'
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export interface GetDriveV1FileStatisticsResponse {
|
|
371
|
-
/** 文档token */
|
|
372
|
-
file_token?: string
|
|
373
|
-
/** 文档类型 */
|
|
374
|
-
file_type?: string
|
|
375
|
-
/** 文档统计信息 */
|
|
376
|
-
statistics?: FileStatistics
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export interface ListDriveV1FileViewRecordQuery extends Pagination {
|
|
380
|
-
/** 文档类型 */
|
|
381
|
-
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'mindnote' | 'wiki' | 'file'
|
|
382
|
-
/** 此次调用中使用的访问者 ID 的类型 */
|
|
383
|
-
viewer_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
export interface CopyDriveV1FileRequest {
|
|
387
|
-
/** 被复制文件的新名称 */
|
|
388
|
-
name: string
|
|
389
|
-
/** 被复制文件的类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */
|
|
390
|
-
type?: 'file' | 'doc' | 'sheet' | 'bitable' | 'docx' | 'mindnote' | 'slides'
|
|
391
|
-
/** 文件被复制到的目标文件夹token */
|
|
392
|
-
folder_token: string
|
|
393
|
-
/** 用户自定义请求附加参数,用于实现特殊的复制语义 */
|
|
394
|
-
extra?: Property[]
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export interface CopyDriveV1FileQuery {
|
|
398
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
399
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
export interface CopyDriveV1FileResponse {
|
|
403
|
-
/** 复制后的文件资源 */
|
|
404
|
-
file?: File
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
export interface MoveDriveV1FileRequest {
|
|
408
|
-
/** 文件类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */
|
|
409
|
-
type?: 'file' | 'docx' | 'bitable' | 'doc' | 'sheet' | 'mindnote' | 'folder' | 'slides'
|
|
410
|
-
/** 目标文件夹token */
|
|
411
|
-
folder_token?: string
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
export interface MoveDriveV1FileResponse {
|
|
415
|
-
/** 异步任务id,移动文件夹时返回 */
|
|
416
|
-
task_id?: string
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
export interface DeleteDriveV1FileQuery {
|
|
420
|
-
/** 被删除文件的类型 */
|
|
421
|
-
type: 'file' | 'docx' | 'bitable' | 'folder' | 'doc' | 'sheet' | 'mindnote' | 'shortcut' | 'slides'
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export interface DeleteDriveV1FileResponse {
|
|
425
|
-
/** 异步任务id,删除文件夹时返回 */
|
|
426
|
-
task_id?: string
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export interface CreateShortcutDriveV1FileRequest {
|
|
430
|
-
/** 创建快捷方式的目标父文件夹 token */
|
|
431
|
-
parent_token: string
|
|
432
|
-
/** 快捷方式映射到的文档和文件列表信息 */
|
|
433
|
-
refer_entity: ReferEntity
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export interface CreateShortcutDriveV1FileQuery {
|
|
437
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
438
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export interface CreateShortcutDriveV1FileResponse {
|
|
442
|
-
/** 返回创建成功的shortcut节点 */
|
|
443
|
-
succ_shortcut_node?: File
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
export interface UploadAllDriveV1FileForm {
|
|
447
|
-
/** 文件名。 */
|
|
448
|
-
file_name: string
|
|
449
|
-
/** 上传点类型。 */
|
|
450
|
-
parent_type: 'explorer'
|
|
451
|
-
/** 文件夹token,获取方式见 [概述](/ssl:ttdoc/ukTMukTMukTM/uUDN04SN0QjL1QDN/files/guide/introduction) */
|
|
452
|
-
parent_node: string
|
|
453
|
-
/** 文件大小(以字节为单位)。 */
|
|
454
|
-
size: number
|
|
455
|
-
/** 文件adler32校验和(可选)。 */
|
|
456
|
-
checksum?: string
|
|
457
|
-
/** 文件二进制内容。 */
|
|
458
|
-
file: Blob
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export interface UploadAllDriveV1FileResponse {
|
|
462
|
-
file_token?: string
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export interface UploadPrepareDriveV1FileRequest {
|
|
466
|
-
/** 文件名 */
|
|
467
|
-
file_name: string
|
|
468
|
-
/** 上传点类型 */
|
|
469
|
-
parent_type: 'explorer'
|
|
470
|
-
/** 文件夹的token */
|
|
471
|
-
parent_node: string
|
|
472
|
-
/** 文件大小 */
|
|
473
|
-
size: number
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
export interface UploadPrepareDriveV1FileResponse {
|
|
477
|
-
/** 分片上传事务ID */
|
|
478
|
-
upload_id?: string
|
|
479
|
-
/** 分片大小策略 */
|
|
480
|
-
block_size?: number
|
|
481
|
-
/** 分片数量 */
|
|
482
|
-
block_num?: number
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
export interface UploadPartDriveV1FileForm {
|
|
486
|
-
/** 分片上传事务ID。 */
|
|
487
|
-
upload_id: string
|
|
488
|
-
/** 块号,从0开始计数。 */
|
|
489
|
-
seq: number
|
|
490
|
-
/** 块大小(以字节为单位)。 */
|
|
491
|
-
size: number
|
|
492
|
-
/** 文件分块adler32校验和(可选)。 */
|
|
493
|
-
checksum?: string
|
|
494
|
-
/** 文件分片二进制内容。 */
|
|
495
|
-
file: Blob
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
export interface UploadFinishDriveV1FileRequest {
|
|
499
|
-
/** 分片上传事务ID */
|
|
500
|
-
upload_id: string
|
|
501
|
-
/** 分片数量 */
|
|
502
|
-
block_num: number
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export interface UploadFinishDriveV1FileResponse {
|
|
506
|
-
file_token?: string
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
export interface CreateDriveV1ImportTaskRequest {
|
|
510
|
-
/** 导入文件格式后缀 */
|
|
511
|
-
file_extension: string
|
|
512
|
-
/** 导入的文件 Token */
|
|
513
|
-
file_token: string
|
|
514
|
-
/** 导入目标云文档类型,支持的类型 新版文档:docx;电子表格:sheet;多维表格:bitable */
|
|
515
|
-
type: string
|
|
516
|
-
/** 目标云文档的标题,若为空,则使用导入文件的名字 */
|
|
517
|
-
file_name?: string
|
|
518
|
-
/** 挂载点 */
|
|
519
|
-
point: ImportTaskMountPoint
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
export interface CreateDriveV1ImportTaskResponse {
|
|
523
|
-
/** 导入任务ID */
|
|
524
|
-
ticket?: string
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
export interface GetDriveV1ImportTaskResponse {
|
|
528
|
-
/** 导入任务 */
|
|
529
|
-
result?: ImportTask
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
export interface CreateDriveV1ExportTaskRequest {
|
|
533
|
-
/** 导出文件扩展名 */
|
|
534
|
-
file_extension: 'docx' | 'pdf' | 'xlsx' | 'csv'
|
|
535
|
-
/** 导出文档 Token */
|
|
536
|
-
token: string
|
|
537
|
-
/** 导出文档类型 */
|
|
538
|
-
type: 'doc' | 'sheet' | 'bitable' | 'docx'
|
|
539
|
-
/** 导出子表 ID,仅当将 sheet/bitable 导出为 csv 时使用 */
|
|
540
|
-
sub_id?: string
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
export interface CreateDriveV1ExportTaskResponse {
|
|
544
|
-
/** 导出任务ID */
|
|
545
|
-
ticket?: string
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
export interface GetDriveV1ExportTaskQuery {
|
|
549
|
-
/** 导出文档的 token */
|
|
550
|
-
token: string
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
export interface GetDriveV1ExportTaskResponse {
|
|
554
|
-
/** 导出结果 */
|
|
555
|
-
result?: ExportTask
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
export interface UploadAllDriveV1MediaForm {
|
|
559
|
-
/** 文件名。 */
|
|
560
|
-
file_name: string
|
|
561
|
-
/** 上传点类型。 */
|
|
562
|
-
parent_type: 'doc_image' | 'docx_image' | 'sheet_image' | 'doc_file' | 'docx_file' | 'sheet_file' | 'vc_virtual_background' | 'bitable_image' | 'bitable_file' | 'moments' | 'ccm_import_open' | 'calendar' | 'base_global' | 'lark_ai_media_analysis'
|
|
563
|
-
/** 上传点的token。 */
|
|
564
|
-
parent_node: string
|
|
565
|
-
/** 文件大小(以字节为单位)。 */
|
|
566
|
-
size: number
|
|
567
|
-
/** 文件adler32校验和(可选)。 */
|
|
568
|
-
checksum?: string
|
|
569
|
-
/** 扩展信息(可选)。 */
|
|
570
|
-
extra?: string
|
|
571
|
-
/** 文件二进制内容。 */
|
|
572
|
-
file: Blob
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
export interface UploadAllDriveV1MediaResponse {
|
|
576
|
-
file_token?: string
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
export interface UploadPrepareDriveV1MediaRequest {
|
|
580
|
-
/** 文件名 */
|
|
581
|
-
file_name: string
|
|
582
|
-
/** 上传点类型 */
|
|
583
|
-
parent_type: 'doc_image' | 'docx_image' | 'sheet_image' | 'doc_file' | 'docx_file' | 'sheet_file' | 'vc_virtual_background' | 'bitable_image' | 'bitable_file' | 'moments' | 'ccm_import_open' | 'calendar' | 'base_global' | 'lark_ai_media_analysis'
|
|
584
|
-
/** 文件大小 */
|
|
585
|
-
size: number
|
|
586
|
-
/** 上传点的标识符 */
|
|
587
|
-
parent_node?: string
|
|
588
|
-
/** 扩展信息(可选) */
|
|
589
|
-
extra?: string
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
export interface UploadPrepareDriveV1MediaResponse {
|
|
593
|
-
/** 分片上传事务ID */
|
|
594
|
-
upload_id?: string
|
|
595
|
-
/** 分片大小策略 */
|
|
596
|
-
block_size?: number
|
|
597
|
-
/** 分片数量 */
|
|
598
|
-
block_num?: number
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
export interface UploadPartDriveV1MediaForm {
|
|
602
|
-
/** 分片上传事务ID。 */
|
|
603
|
-
upload_id: string
|
|
604
|
-
/** 块号,从0开始计数。 */
|
|
605
|
-
seq: number
|
|
606
|
-
/** 块大小(以字节为单位)。 */
|
|
607
|
-
size: number
|
|
608
|
-
/** 文件分块adler32校验和(可选)。 */
|
|
609
|
-
checksum?: string
|
|
610
|
-
/** 文件分片二进制内容。 */
|
|
611
|
-
file: Blob
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
export interface UploadFinishDriveV1MediaRequest {
|
|
615
|
-
/** 分片上传事务ID */
|
|
616
|
-
upload_id: string
|
|
617
|
-
/** 分片数量 */
|
|
618
|
-
block_num: number
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
export interface UploadFinishDriveV1MediaResponse {
|
|
622
|
-
file_token?: string
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
export interface DownloadDriveV1MediaQuery {
|
|
626
|
-
/** 扩展信息 */
|
|
627
|
-
extra?: string
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
export interface BatchGetTmpDownloadUrlDriveV1MediaQuery {
|
|
631
|
-
/** 文件标识符列表 */
|
|
632
|
-
file_tokens: string[]
|
|
633
|
-
/** 拓展信息(可选) */
|
|
634
|
-
extra?: string
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
export interface BatchGetTmpDownloadUrlDriveV1MediaResponse {
|
|
638
|
-
/** 临时下载列表 */
|
|
639
|
-
tmp_download_urls?: TmpDownloadUrl[]
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
export interface CreateDriveV1FileVersionRequest {
|
|
643
|
-
/** 版本文档标题,最大长度 1024 个Unicode 码点。通常情况下,一个英文或中文字符对应一个码点,但是某些特殊符号可能会对应多个码点。例如,家庭组合「👨👩👧」这个表情符号对应5个码点。 */
|
|
644
|
-
name?: string
|
|
645
|
-
/** 版本文档类型 */
|
|
646
|
-
obj_type?: 'docx' | 'sheet'
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
export interface CreateDriveV1FileVersionQuery {
|
|
650
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
651
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
export interface CreateDriveV1FileVersionResponse {
|
|
655
|
-
/** 版本文档标题,最大长度 1024 个Unicode 码点。通常情况下,一个英文或中文字符对应一个码点,但是某些特殊符号可能会对应多个码点。例如,家庭组合「👨👩👧」这个表情符号对应5个码点。 */
|
|
656
|
-
name?: string
|
|
657
|
-
/** 版本文档版本号 */
|
|
658
|
-
version?: string
|
|
659
|
-
/** 源文档token */
|
|
660
|
-
parent_token?: string
|
|
661
|
-
/** 版本文档所有者id */
|
|
662
|
-
owner_id?: string
|
|
663
|
-
/** 版本文档创建者id */
|
|
664
|
-
creator_id?: string
|
|
665
|
-
/** 版本文档创建时间 */
|
|
666
|
-
create_time?: string
|
|
667
|
-
/** 版本文档更新时间 */
|
|
668
|
-
update_time?: string
|
|
669
|
-
/** 版本文档状态 */
|
|
670
|
-
status?: '0' | '1' | '2'
|
|
671
|
-
/** 版本文档类型 */
|
|
672
|
-
obj_type?: 'docx' | 'sheet'
|
|
673
|
-
/** 源文档类型 */
|
|
674
|
-
parent_type?: 'docx' | 'sheet'
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
export interface ListDriveV1FileVersionQuery extends Pagination {
|
|
678
|
-
/** 原文档类型 */
|
|
679
|
-
obj_type: 'docx' | 'sheet'
|
|
680
|
-
/** 用户id类型 */
|
|
681
|
-
user_id_type?: 'open_id' | 'union_id' | 'user_id'
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
export interface GetDriveV1FileVersionQuery {
|
|
685
|
-
/** 文档类型 */
|
|
686
|
-
obj_type: 'docx' | 'sheet'
|
|
687
|
-
/** 用户ID类型 */
|
|
688
|
-
user_id_type?: 'open_id' | 'union_id' | 'user_id'
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
export interface GetDriveV1FileVersionResponse {
|
|
692
|
-
/** 版本文档标题,最大长度 1024 个Unicode 码点。通常情况下,一个英文或中文字符对应一个码点,但是某些特殊符号可能会对应多个码点。例如,家庭组合「👨👩👧」这个表情符号对应5个码点。 */
|
|
693
|
-
name?: string
|
|
694
|
-
/** 版本文档版本号 */
|
|
695
|
-
version?: string
|
|
696
|
-
/** 源文档token */
|
|
697
|
-
parent_token?: string
|
|
698
|
-
/** 版本文档所有者id */
|
|
699
|
-
owner_id?: string
|
|
700
|
-
/** 版本文档创建者id */
|
|
701
|
-
creator_id?: string
|
|
702
|
-
/** 版本文档创建时间 */
|
|
703
|
-
create_time?: string
|
|
704
|
-
/** 版本文档更新时间 */
|
|
705
|
-
update_time?: string
|
|
706
|
-
/** 版本文档状态 */
|
|
707
|
-
status?: '0' | '1' | '2'
|
|
708
|
-
/** 版本文档类型 */
|
|
709
|
-
obj_type?: 'docx' | 'sheet'
|
|
710
|
-
/** 源文档类型 */
|
|
711
|
-
parent_type?: 'docx' | 'sheet'
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
export interface DeleteDriveV1FileVersionQuery {
|
|
715
|
-
/** 文档类型 */
|
|
716
|
-
obj_type: 'docx' | 'sheet'
|
|
717
|
-
/** 用户ID类型 */
|
|
718
|
-
user_id_type?: 'open_id' | 'union_id' | 'user_id'
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
export interface ListDriveV2FileLikeQuery extends Pagination {
|
|
722
|
-
/** 文件类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */
|
|
723
|
-
file_type: 'doc' | 'docx' | 'file'
|
|
724
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
725
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
export interface SubscribeDriveV1FileQuery {
|
|
729
|
-
/** 文档类型 */
|
|
730
|
-
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'folder'
|
|
731
|
-
/** 事件类型 */
|
|
732
|
-
event_type?: string
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
export interface GetSubscribeDriveV1FileQuery {
|
|
736
|
-
/** 文档类型 */
|
|
737
|
-
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'file' | 'folder'
|
|
738
|
-
/** 事件类型 */
|
|
739
|
-
event_type?: string
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
export interface GetSubscribeDriveV1FileResponse {
|
|
743
|
-
/** 是否有订阅,取值 true 表示已订阅;false 表示未订阅 */
|
|
744
|
-
is_subscribe?: boolean
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
export interface DeleteSubscribeDriveV1FileQuery {
|
|
748
|
-
/** 文档类型 */
|
|
749
|
-
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'file' | 'folder'
|
|
750
|
-
/** 事件类型 */
|
|
751
|
-
event_type?: string
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
export interface BatchCreateDriveV1PermissionMemberRequest {
|
|
755
|
-
/** 协作者列表 */
|
|
756
|
-
members: BaseMember[]
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
export interface BatchCreateDriveV1PermissionMemberQuery {
|
|
760
|
-
/** 文件的类型 */
|
|
761
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'folder' | 'mindnote' | 'minutes' | 'slides'
|
|
762
|
-
/** 添加权限后是否通知对方 */
|
|
763
|
-
need_notification?: boolean
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
export interface BatchCreateDriveV1PermissionMemberResponse {
|
|
767
|
-
/** 协作者列表 */
|
|
768
|
-
members?: BaseMember[]
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
export interface TransferOwnerDriveV1PermissionMemberRequest {
|
|
772
|
-
/** 文档拥有者的ID类型 */
|
|
773
|
-
member_type: 'email' | 'openid' | 'userid'
|
|
774
|
-
/** 文档拥有者的ID,与文档拥有者的ID类型需要对应 */
|
|
775
|
-
member_id: string
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
export interface TransferOwnerDriveV1PermissionMemberQuery {
|
|
779
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
780
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides' | 'folder'
|
|
781
|
-
/** 是否需要通知新 Owner */
|
|
782
|
-
need_notification?: boolean
|
|
783
|
-
/** 转移后是否需要移除原 Owner 的权限 */
|
|
784
|
-
remove_old_owner?: boolean
|
|
785
|
-
/** 仅当内容不在共享文件夹中,此参数才会生效。如果设为false,系统会将该内容移至新所有者的个人空间根文件夹。如果设为 true,则留在原位置。 */
|
|
786
|
-
stay_put?: boolean
|
|
787
|
-
/** 仅当 remove_old_owner = false 时,此参数才会生效 保留原文件所有者指定的权限角色 */
|
|
788
|
-
old_owner_perm?: string
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
export interface AuthDriveV1PermissionMemberQuery {
|
|
792
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
793
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
794
|
-
/** 需要判断的权限 */
|
|
795
|
-
action: 'view' | 'edit' | 'share' | 'comment' | 'export' | 'copy' | 'print' | 'manage_public'
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
export interface AuthDriveV1PermissionMemberResponse {
|
|
799
|
-
/** 是否有权限 */
|
|
800
|
-
auth_result: boolean
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
export interface ListDriveV1PermissionMemberQuery {
|
|
804
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
805
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
806
|
-
/** 指定返回的协作者字段信息,如无指定则默认不返回**可选值有:** - `name`:协作者名- `type`:协作者类型- `avatar`:头像- `external_label`:外部标签**注意:** - 你可以使用特殊值`*`指定返回目前支持的所有字段- 你可以使用`,`分隔若干个你想指定返回的字段,如:`name,avatar`- 按需指定返回字段接口性能更好 */
|
|
807
|
-
fields?: string
|
|
808
|
-
/** 协作者的权限角色类型 */
|
|
809
|
-
perm_type?: 'container' | 'single_page'
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
export interface ListDriveV1PermissionMemberResponse {
|
|
813
|
-
/** 返回的列表数据 */
|
|
814
|
-
items?: Member[]
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
export interface CreateDriveV1PermissionMemberRequest {
|
|
818
|
-
/** 协作者ID类型 */
|
|
819
|
-
member_type: 'email' | 'openid' | 'unionid' | 'openchat' | 'opendepartmentid' | 'userid' | 'groupid' | 'wikispaceid'
|
|
820
|
-
/** 协作者ID,与协作者ID类型需要对应 */
|
|
821
|
-
member_id: string
|
|
822
|
-
/** 协作者的权限角色 */
|
|
823
|
-
perm: 'view' | 'edit' | 'full_access'
|
|
824
|
-
/** 协作者的权限角色类型 */
|
|
825
|
-
perm_type?: 'container' | 'single_page'
|
|
826
|
-
/** 协作者类型 */
|
|
827
|
-
type?: 'user' | 'chat' | 'department' | 'group' | 'wiki_space_member' | 'wiki_space_viewer' | 'wiki_space_editor'
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
export interface CreateDriveV1PermissionMemberQuery {
|
|
831
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
832
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'folder' | 'mindnote' | 'minutes' | 'slides'
|
|
833
|
-
/** 添加权限后是否通知对方 */
|
|
834
|
-
need_notification?: boolean
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
export interface CreateDriveV1PermissionMemberResponse {
|
|
838
|
-
/** 本次添加权限的用户信息 */
|
|
839
|
-
member?: BaseMember
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
export interface UpdateDriveV1PermissionMemberRequest {
|
|
843
|
-
/** 协作者ID类型 */
|
|
844
|
-
member_type: 'email' | 'openid' | 'unionid' | 'openchat' | 'opendepartmentid' | 'userid' | 'groupid' | 'wikispaceid'
|
|
845
|
-
/** 协作者的权限角色 */
|
|
846
|
-
perm: 'view' | 'edit' | 'full_access'
|
|
847
|
-
/** 协作者的权限角色类型 */
|
|
848
|
-
perm_type?: 'container' | 'single_page'
|
|
849
|
-
/** 协作者类型 */
|
|
850
|
-
type?: 'user' | 'chat' | 'department' | 'group' | 'wiki_space_member' | 'wiki_space_viewer' | 'wiki_space_editor'
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
export interface UpdateDriveV1PermissionMemberQuery {
|
|
854
|
-
/** 更新权限后是否通知对方**注意:** 使用`tenant_access_token`访问不支持该参数 */
|
|
855
|
-
need_notification?: boolean
|
|
856
|
-
/** 文件类型,放于query参数中,如:`?type=doc` */
|
|
857
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
export interface UpdateDriveV1PermissionMemberResponse {
|
|
861
|
-
/** 本次更新权限的用户信息 */
|
|
862
|
-
member?: BaseMember
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
export interface DeleteDriveV1PermissionMemberRequest {
|
|
866
|
-
/** 协作者类型 */
|
|
867
|
-
type?: 'user' | 'chat' | 'department' | 'group' | 'wiki_space_member' | 'wiki_space_viewer' | 'wiki_space_editor'
|
|
868
|
-
/** 协作者的权限角色类型 */
|
|
869
|
-
perm_type?: 'container' | 'single_page'
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
export interface DeleteDriveV1PermissionMemberQuery {
|
|
873
|
-
/** 文件类型,放于query参数中,如:`?type=doc` */
|
|
874
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'folder' | 'mindnote' | 'minutes' | 'slides'
|
|
875
|
-
/** 权限成员类型,放于query参数中,如:`?member_type=openid` */
|
|
876
|
-
member_type: 'email' | 'openid' | 'openchat' | 'opendepartmentid' | 'userid' | 'unionid' | 'groupid' | 'wikispaceid'
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
export interface CreateDriveV1PermissionPublicPasswordQuery {
|
|
880
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
881
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
export interface CreateDriveV1PermissionPublicPasswordResponse {
|
|
885
|
-
/** 密码 */
|
|
886
|
-
password?: string
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
export interface UpdateDriveV1PermissionPublicPasswordQuery {
|
|
890
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
891
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
export interface UpdateDriveV1PermissionPublicPasswordResponse {
|
|
895
|
-
/** 密码 */
|
|
896
|
-
password?: string
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
export interface DeleteDriveV1PermissionPublicPasswordQuery {
|
|
900
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
901
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
export interface GetDriveV1PermissionPublicQuery {
|
|
905
|
-
/** 文件类型,放于query参数中,如:`?type=doc` */
|
|
906
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
export interface GetDriveV1PermissionPublicResponse {
|
|
910
|
-
/** 返回的文档公共设置 */
|
|
911
|
-
permission_public?: PermissionPublic
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
export interface PatchDriveV1PermissionPublicRequest {
|
|
915
|
-
/** 允许内容被分享到组织外 */
|
|
916
|
-
external_access?: boolean
|
|
917
|
-
/** 谁可以复制内容、创建副本、打印、下载 */
|
|
918
|
-
security_entity?: 'anyone_can_view' | 'anyone_can_edit' | 'only_full_access'
|
|
919
|
-
/** 谁可以评论 */
|
|
920
|
-
comment_entity?: 'anyone_can_view' | 'anyone_can_edit'
|
|
921
|
-
/** 谁可以添加和管理协作者 */
|
|
922
|
-
share_entity?: 'anyone' | 'same_tenant' | 'only_full_access'
|
|
923
|
-
/** 链接分享设置 */
|
|
924
|
-
link_share_entity?: 'tenant_readable' | 'tenant_editable' | 'anyone_readable' | 'anyone_editable' | 'closed'
|
|
925
|
-
/** 允许非「可管理权限」的人分享到组织外 */
|
|
926
|
-
invite_external?: boolean
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
export interface PatchDriveV1PermissionPublicQuery {
|
|
930
|
-
/** 文件类型,放于query参数中,如:`?type=doc` */
|
|
931
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
export interface PatchDriveV1PermissionPublicResponse {
|
|
935
|
-
/** 本次更新后的文档公共设置 */
|
|
936
|
-
permission_public?: PermissionPublic
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
export interface GetDriveV2PermissionPublicQuery {
|
|
940
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
941
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
export interface GetDriveV2PermissionPublicResponse {
|
|
945
|
-
/** 返回的文档公共设置 */
|
|
946
|
-
permission_public?: PermissionPublic
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
export interface PatchDriveV2PermissionPublicRequest {
|
|
950
|
-
/** 允许内容被分享到组织外 */
|
|
951
|
-
external_access_entity?: 'open' | 'closed' | 'allow_share_partner_tenant'
|
|
952
|
-
/** 谁可以创建副本、打印、下载 */
|
|
953
|
-
security_entity?: 'anyone_can_view' | 'anyone_can_edit' | 'only_full_access'
|
|
954
|
-
/** 谁可以评论 */
|
|
955
|
-
comment_entity?: 'anyone_can_view' | 'anyone_can_edit'
|
|
956
|
-
/** 谁可以添加和管理协作者-组织维度 */
|
|
957
|
-
share_entity?: 'anyone' | 'same_tenant'
|
|
958
|
-
/** 谁可以添加和管理协作者-协作者维度 */
|
|
959
|
-
manage_collaborator_entity?: 'collaborator_can_view' | 'collaborator_can_edit' | 'collaborator_full_access'
|
|
960
|
-
/** 链接分享设置 */
|
|
961
|
-
link_share_entity?: 'tenant_readable' | 'tenant_editable' | 'partner_tenant_readable' | 'partner_tenant_editable' | 'anyone_readable' | 'anyone_editable' | 'closed'
|
|
962
|
-
/** 谁可以复制内容 */
|
|
963
|
-
copy_entity?: 'anyone_can_view' | 'anyone_can_edit' | 'only_full_access'
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
export interface PatchDriveV2PermissionPublicQuery {
|
|
967
|
-
/** 文件类型,需要与文件的 token 相匹配 */
|
|
968
|
-
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
export interface PatchDriveV2PermissionPublicResponse {
|
|
972
|
-
/** 本次更新后文档公共设置 */
|
|
973
|
-
permission_public?: PermissionPublic
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
export interface ListDriveV1FileCommentQuery extends Pagination {
|
|
977
|
-
/** 文档类型 */
|
|
978
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
979
|
-
/** 是否全文评论 */
|
|
980
|
-
is_whole?: boolean
|
|
981
|
-
/** 是否已解决(可选) */
|
|
982
|
-
is_solved?: boolean
|
|
983
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
984
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
export interface BatchQueryDriveV1FileCommentRequest {
|
|
988
|
-
/** 需要获取数据的评论id */
|
|
989
|
-
comment_ids: string[]
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
export interface BatchQueryDriveV1FileCommentQuery {
|
|
993
|
-
/** 文档类型 */
|
|
994
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
995
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
996
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
export interface BatchQueryDriveV1FileCommentResponse {
|
|
1000
|
-
/** 评论的相关信息、回复的信息、回复分页的信息 */
|
|
1001
|
-
items?: FileComment[]
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
export interface PatchDriveV1FileCommentRequest {
|
|
1005
|
-
/** 评论解决标志 */
|
|
1006
|
-
is_solved: boolean
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
export interface PatchDriveV1FileCommentQuery {
|
|
1010
|
-
/** 文档类型 */
|
|
1011
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
export interface CreateDriveV1FileCommentRequest {
|
|
1015
|
-
/** 评论里的回复列表 */
|
|
1016
|
-
reply_list?: ReplyList
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
export interface CreateDriveV1FileCommentQuery {
|
|
1020
|
-
/** 文档类型 */
|
|
1021
|
-
file_type: 'doc' | 'docx'
|
|
1022
|
-
/** 此次调用中使用的用户 ID 的类型 */
|
|
1023
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
export interface CreateDriveV1FileCommentResponse {
|
|
1027
|
-
/** 评论 ID */
|
|
1028
|
-
comment_id?: string
|
|
1029
|
-
/** 用户 ID */
|
|
1030
|
-
user_id?: string
|
|
1031
|
-
/** 创建时间 */
|
|
1032
|
-
create_time?: number
|
|
1033
|
-
/** 更新时间 */
|
|
1034
|
-
update_time?: number
|
|
1035
|
-
/** 是否已解决 */
|
|
1036
|
-
is_solved?: boolean
|
|
1037
|
-
/** 解决评论时间 */
|
|
1038
|
-
solved_time?: number
|
|
1039
|
-
/** 解决评论者的用户 ID */
|
|
1040
|
-
solver_user_id?: string
|
|
1041
|
-
/** 是否有更多回复 */
|
|
1042
|
-
has_more?: boolean
|
|
1043
|
-
/** 回复分页标记 */
|
|
1044
|
-
page_token?: string
|
|
1045
|
-
/** 是否是全文评论 */
|
|
1046
|
-
is_whole?: boolean
|
|
1047
|
-
/** 局部评论的引用字段 */
|
|
1048
|
-
quote?: string
|
|
1049
|
-
/** 评论里的回复列表 */
|
|
1050
|
-
reply_list?: ReplyList
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
export interface GetDriveV1FileCommentQuery {
|
|
1054
|
-
/** 文档类型 */
|
|
1055
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
1056
|
-
/** 此次调用中使用的用户 ID 的类型 */
|
|
1057
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
export interface GetDriveV1FileCommentResponse {
|
|
1061
|
-
/** 评论 ID */
|
|
1062
|
-
comment_id?: string
|
|
1063
|
-
/** 用户 ID */
|
|
1064
|
-
user_id?: string
|
|
1065
|
-
/** 创建时间 */
|
|
1066
|
-
create_time?: number
|
|
1067
|
-
/** 更新时间 */
|
|
1068
|
-
update_time?: number
|
|
1069
|
-
/** 是否已解决 */
|
|
1070
|
-
is_solved?: boolean
|
|
1071
|
-
/** 解决评论时间 */
|
|
1072
|
-
solved_time?: number
|
|
1073
|
-
/** 解决评论者的用户 ID */
|
|
1074
|
-
solver_user_id?: string
|
|
1075
|
-
/** 是否有更多回复 */
|
|
1076
|
-
has_more?: boolean
|
|
1077
|
-
/** 回复分页标记 */
|
|
1078
|
-
page_token?: string
|
|
1079
|
-
/** 是否是全文评论 */
|
|
1080
|
-
is_whole?: boolean
|
|
1081
|
-
/** 局部评论的引用字段 */
|
|
1082
|
-
quote?: string
|
|
1083
|
-
/** 评论里的回复列表 */
|
|
1084
|
-
reply_list?: ReplyList
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
export interface ListDriveV1FileCommentReplyQuery extends Pagination {
|
|
1088
|
-
/** 文档类型 */
|
|
1089
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
1090
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
1091
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
export interface UpdateDriveV1FileCommentReplyRequest {
|
|
1095
|
-
/** 回复内容 */
|
|
1096
|
-
content: ReplyContent
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
export interface UpdateDriveV1FileCommentReplyQuery {
|
|
1100
|
-
/** 文档类型 */
|
|
1101
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
1102
|
-
/** 此次调用中使用的用户ID的类型 */
|
|
1103
|
-
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
export interface DeleteDriveV1FileCommentReplyQuery {
|
|
1107
|
-
/** 文档类型 */
|
|
1108
|
-
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
1109
|
-
}
|
|
10
|
+
export namespace Drive {
|
|
11
|
+
export interface Methods {
|
|
12
|
+
file: File.Methods
|
|
13
|
+
meta: Meta.Methods
|
|
14
|
+
importTask: ImportTask.Methods
|
|
15
|
+
exportTask: ExportTask.Methods
|
|
16
|
+
media: Media.Methods
|
|
17
|
+
permission: Permission.Methods
|
|
18
|
+
}
|
|
1110
19
|
|
|
1111
|
-
export
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
20
|
+
export namespace File {
|
|
21
|
+
export interface Methods {
|
|
22
|
+
statistics: Statistics.Methods
|
|
23
|
+
viewRecord: ViewRecord.Methods
|
|
24
|
+
version: Version.Methods
|
|
25
|
+
like: Like.Methods
|
|
26
|
+
comment: Comment.Methods
|
|
27
|
+
subscription: Subscription.Methods
|
|
28
|
+
/**
|
|
29
|
+
* 获取文件夹中的文件清单
|
|
30
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list
|
|
31
|
+
*/
|
|
32
|
+
list(query?: ListQuery): Promise<ListResponse> & AsyncIterableIterator<Lark.File>
|
|
33
|
+
/**
|
|
34
|
+
* 新建文件夹
|
|
35
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_folder
|
|
36
|
+
*/
|
|
37
|
+
createFolder(body: CreateFolderRequest): Promise<CreateFolderResponse>
|
|
38
|
+
/**
|
|
39
|
+
* 查询异步任务状态
|
|
40
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/task_check
|
|
41
|
+
*/
|
|
42
|
+
taskCheck(query?: TaskCheckQuery): Promise<TaskCheckResponse>
|
|
43
|
+
/**
|
|
44
|
+
* 复制文件
|
|
45
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/copy
|
|
46
|
+
*/
|
|
47
|
+
copy(file_token: string, body: CopyRequest, query?: CopyQuery): Promise<CopyResponse>
|
|
48
|
+
/**
|
|
49
|
+
* 移动文件或文件夹
|
|
50
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/move
|
|
51
|
+
*/
|
|
52
|
+
move(file_token: string, body: MoveRequest): Promise<MoveResponse>
|
|
53
|
+
/**
|
|
54
|
+
* 删除文件或文件夹
|
|
55
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete
|
|
56
|
+
*/
|
|
57
|
+
delete(file_token: string, query?: DeleteQuery): Promise<DeleteResponse>
|
|
58
|
+
/**
|
|
59
|
+
* 创建文件快捷方式
|
|
60
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_shortcut
|
|
61
|
+
*/
|
|
62
|
+
createShortcut(body: CreateShortcutRequest, query?: CreateShortcutQuery): Promise<CreateShortcutResponse>
|
|
63
|
+
/**
|
|
64
|
+
* 上传文件
|
|
65
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_all
|
|
66
|
+
*/
|
|
67
|
+
uploadAll(form: UploadAllForm): Promise<UploadAllResponse>
|
|
68
|
+
/**
|
|
69
|
+
* 分片上传文件-预上传
|
|
70
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_prepare
|
|
71
|
+
*/
|
|
72
|
+
uploadPrepare(body: UploadPrepareRequest): Promise<UploadPrepareResponse>
|
|
73
|
+
/**
|
|
74
|
+
* 分片上传文件-上传分片
|
|
75
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_part
|
|
76
|
+
*/
|
|
77
|
+
uploadPart(form: UploadPartForm): Promise<void>
|
|
78
|
+
/**
|
|
79
|
+
* 分片上传文件-完成上传
|
|
80
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_finish
|
|
81
|
+
*/
|
|
82
|
+
uploadFinish(body: UploadFinishRequest): Promise<UploadFinishResponse>
|
|
83
|
+
/**
|
|
84
|
+
* 下载文件
|
|
85
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/download
|
|
86
|
+
*/
|
|
87
|
+
download(file_token: string): Promise<ArrayBuffer>
|
|
88
|
+
/**
|
|
89
|
+
* 订阅云文档事件
|
|
90
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/subscribe
|
|
91
|
+
*/
|
|
92
|
+
subscribe(file_token: string, query?: SubscribeQuery): Promise<void>
|
|
93
|
+
/**
|
|
94
|
+
* 查询云文档事件订阅状态
|
|
95
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/get_subscribe
|
|
96
|
+
*/
|
|
97
|
+
getSubscribe(file_token: string, query?: GetSubscribeQuery): Promise<GetSubscribeResponse>
|
|
98
|
+
/**
|
|
99
|
+
* 取消云文档事件订阅
|
|
100
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/delete_subscribe
|
|
101
|
+
*/
|
|
102
|
+
deleteSubscribe(file_token: string, query?: DeleteSubscribeQuery): Promise<void>
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface ListQuery extends Pagination {
|
|
106
|
+
/** 文件夹的token(若不填写该参数或填写空字符串,则默认获取用户云空间下的清单,且不支持分页) */
|
|
107
|
+
folder_token?: string
|
|
108
|
+
/** 排序规则 */
|
|
109
|
+
order_by?: 'EditedTime' | 'CreatedTime'
|
|
110
|
+
/** 升序降序 */
|
|
111
|
+
direction?: 'ASC' | 'DESC'
|
|
112
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
113
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface ListResponse {
|
|
117
|
+
/** 文档详细信息 */
|
|
118
|
+
files?: Lark.File[]
|
|
119
|
+
/** 下一页分页参数 */
|
|
120
|
+
next_page_token?: string
|
|
121
|
+
/** 是否有下一页 */
|
|
122
|
+
has_more?: boolean
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface CreateFolderRequest {
|
|
126
|
+
/** 文件夹名称 */
|
|
127
|
+
name: string
|
|
128
|
+
/** 父文件夹token */
|
|
129
|
+
folder_token: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface CreateFolderResponse {
|
|
133
|
+
/** 新创建的文件夹 Token */
|
|
134
|
+
token?: string
|
|
135
|
+
/** 创建文件夹的访问 URL */
|
|
136
|
+
url?: string
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface TaskCheckQuery {
|
|
140
|
+
/** 文件相关异步任务id */
|
|
141
|
+
task_id: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface TaskCheckResponse {
|
|
145
|
+
/** 异步任务的执行状态 */
|
|
146
|
+
status?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface CopyRequest {
|
|
150
|
+
/** 被复制文件的新名称 */
|
|
151
|
+
name: string
|
|
152
|
+
/** 被复制文件的类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */
|
|
153
|
+
type?: 'file' | 'doc' | 'sheet' | 'bitable' | 'docx' | 'mindnote' | 'slides'
|
|
154
|
+
/** 文件被复制到的目标文件夹token */
|
|
155
|
+
folder_token: string
|
|
156
|
+
/** 用户自定义请求附加参数,用于实现特殊的复制语义 */
|
|
157
|
+
extra?: Lark.Property[]
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface CopyQuery {
|
|
161
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
162
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface CopyResponse {
|
|
166
|
+
/** 复制后的文件资源 */
|
|
167
|
+
file?: Lark.File
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface MoveRequest {
|
|
171
|
+
/** 文件类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */
|
|
172
|
+
type?: 'file' | 'docx' | 'bitable' | 'doc' | 'sheet' | 'mindnote' | 'folder' | 'slides'
|
|
173
|
+
/** 目标文件夹token */
|
|
174
|
+
folder_token?: string
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface MoveResponse {
|
|
178
|
+
/** 异步任务id,移动文件夹时返回 */
|
|
179
|
+
task_id?: string
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface DeleteQuery {
|
|
183
|
+
/** 被删除文件的类型 */
|
|
184
|
+
type: 'file' | 'docx' | 'bitable' | 'folder' | 'doc' | 'sheet' | 'mindnote' | 'shortcut' | 'slides'
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface DeleteResponse {
|
|
188
|
+
/** 异步任务id,删除文件夹时返回 */
|
|
189
|
+
task_id?: string
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface CreateShortcutRequest {
|
|
193
|
+
/** 创建快捷方式的目标父文件夹 token */
|
|
194
|
+
parent_token: string
|
|
195
|
+
/** 快捷方式映射到的文档和文件列表信息 */
|
|
196
|
+
refer_entity: Lark.ReferEntity
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface CreateShortcutQuery {
|
|
200
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
201
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface CreateShortcutResponse {
|
|
205
|
+
/** 返回创建成功的shortcut节点 */
|
|
206
|
+
succ_shortcut_node?: Lark.File
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface UploadAllForm {
|
|
210
|
+
/** 文件名。 */
|
|
211
|
+
file_name: string
|
|
212
|
+
/** 上传点类型。 */
|
|
213
|
+
parent_type: 'explorer'
|
|
214
|
+
/** 文件夹token,获取方式见 [概述](/ssl:ttdoc/ukTMukTMukTM/uUDN04SN0QjL1QDN/files/guide/introduction) */
|
|
215
|
+
parent_node: string
|
|
216
|
+
/** 文件大小(以字节为单位)。 */
|
|
217
|
+
size: number
|
|
218
|
+
/** 文件adler32校验和(可选)。 */
|
|
219
|
+
checksum?: string
|
|
220
|
+
/** 文件二进制内容。 */
|
|
221
|
+
file: Blob
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface UploadAllResponse {
|
|
225
|
+
file_token?: string
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface UploadPrepareRequest {
|
|
229
|
+
/** 文件名 */
|
|
230
|
+
file_name: string
|
|
231
|
+
/** 上传点类型 */
|
|
232
|
+
parent_type: 'explorer'
|
|
233
|
+
/** 文件夹的token */
|
|
234
|
+
parent_node: string
|
|
235
|
+
/** 文件大小 */
|
|
236
|
+
size: number
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface UploadPrepareResponse {
|
|
240
|
+
/** 分片上传事务ID */
|
|
241
|
+
upload_id?: string
|
|
242
|
+
/** 分片大小策略 */
|
|
243
|
+
block_size?: number
|
|
244
|
+
/** 分片数量 */
|
|
245
|
+
block_num?: number
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface UploadPartForm {
|
|
249
|
+
/** 分片上传事务ID。 */
|
|
250
|
+
upload_id: string
|
|
251
|
+
/** 块号,从0开始计数。 */
|
|
252
|
+
seq: number
|
|
253
|
+
/** 块大小(以字节为单位)。 */
|
|
254
|
+
size: number
|
|
255
|
+
/** 文件分块adler32校验和(可选)。 */
|
|
256
|
+
checksum?: string
|
|
257
|
+
/** 文件分片二进制内容。 */
|
|
258
|
+
file: Blob
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface UploadFinishRequest {
|
|
262
|
+
/** 分片上传事务ID */
|
|
263
|
+
upload_id: string
|
|
264
|
+
/** 分片数量 */
|
|
265
|
+
block_num: number
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface UploadFinishResponse {
|
|
269
|
+
file_token?: string
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface SubscribeQuery {
|
|
273
|
+
/** 文档类型 */
|
|
274
|
+
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'folder'
|
|
275
|
+
/** 事件类型 */
|
|
276
|
+
event_type?: string
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface GetSubscribeQuery {
|
|
280
|
+
/** 文档类型 */
|
|
281
|
+
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'file' | 'folder'
|
|
282
|
+
/** 事件类型 */
|
|
283
|
+
event_type?: string
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface GetSubscribeResponse {
|
|
287
|
+
/** 是否有订阅,取值 true 表示已订阅;false 表示未订阅 */
|
|
288
|
+
is_subscribe?: boolean
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface DeleteSubscribeQuery {
|
|
292
|
+
/** 文档类型 */
|
|
293
|
+
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'file' | 'folder'
|
|
294
|
+
/** 事件类型 */
|
|
295
|
+
event_type?: string
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export namespace Statistics {
|
|
299
|
+
export interface Methods {
|
|
300
|
+
/**
|
|
301
|
+
* 获取文件统计信息
|
|
302
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-statistics/get
|
|
303
|
+
*/
|
|
304
|
+
get(file_token: string, query?: GetQuery): Promise<GetResponse>
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface GetQuery {
|
|
308
|
+
/** 文档类型 */
|
|
309
|
+
file_type: 'doc' | 'sheet' | 'mindnote' | 'bitable' | 'wiki' | 'file' | 'docx'
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface GetResponse {
|
|
313
|
+
/** 文档token */
|
|
314
|
+
file_token?: string
|
|
315
|
+
/** 文档类型 */
|
|
316
|
+
file_type?: string
|
|
317
|
+
/** 文档统计信息 */
|
|
318
|
+
statistics?: Lark.FileStatistics
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export namespace ViewRecord {
|
|
323
|
+
export interface Methods {
|
|
324
|
+
/**
|
|
325
|
+
* 获取文件访问记录
|
|
326
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-view_record/list
|
|
327
|
+
*/
|
|
328
|
+
list(file_token: string, query?: ListQuery): Paginated<Lark.FileViewRecord>
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface ListQuery extends Pagination {
|
|
332
|
+
/** 文档类型 */
|
|
333
|
+
file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'mindnote' | 'wiki' | 'file'
|
|
334
|
+
/** 此次调用中使用的访问者 ID 的类型 */
|
|
335
|
+
viewer_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export namespace Version {
|
|
340
|
+
export interface Methods {
|
|
341
|
+
/**
|
|
342
|
+
* 创建文档版本
|
|
343
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/create
|
|
344
|
+
*/
|
|
345
|
+
create(file_token: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
|
|
346
|
+
/**
|
|
347
|
+
* 获取文档版本列表
|
|
348
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list
|
|
349
|
+
*/
|
|
350
|
+
list(file_token: string, query?: ListQuery): Paginated<Lark.Version>
|
|
351
|
+
/**
|
|
352
|
+
* 获取文档版本信息
|
|
353
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get
|
|
354
|
+
*/
|
|
355
|
+
get(file_token: string, version_id: string, query?: GetQuery): Promise<GetResponse>
|
|
356
|
+
/**
|
|
357
|
+
* 删除文档版本
|
|
358
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/delete
|
|
359
|
+
*/
|
|
360
|
+
delete(file_token: string, version_id: string, query?: DeleteQuery): Promise<void>
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface CreateRequest {
|
|
364
|
+
/** 版本文档标题,最大长度 1024 个Unicode 码点。通常情况下,一个英文或中文字符对应一个码点,但是某些特殊符号可能会对应多个码点。例如,家庭组合「👨👩👧」这个表情符号对应5个码点。 */
|
|
365
|
+
name?: string
|
|
366
|
+
/** 版本文档类型 */
|
|
367
|
+
obj_type?: 'docx' | 'sheet'
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface CreateQuery {
|
|
371
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
372
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface CreateResponse {
|
|
376
|
+
/** 版本文档标题,最大长度 1024 个Unicode 码点。通常情况下,一个英文或中文字符对应一个码点,但是某些特殊符号可能会对应多个码点。例如,家庭组合「👨👩👧」这个表情符号对应5个码点。 */
|
|
377
|
+
name?: string
|
|
378
|
+
/** 版本文档版本号 */
|
|
379
|
+
version?: string
|
|
380
|
+
/** 源文档token */
|
|
381
|
+
parent_token?: string
|
|
382
|
+
/** 版本文档所有者id */
|
|
383
|
+
owner_id?: string
|
|
384
|
+
/** 版本文档创建者id */
|
|
385
|
+
creator_id?: string
|
|
386
|
+
/** 版本文档创建时间 */
|
|
387
|
+
create_time?: string
|
|
388
|
+
/** 版本文档更新时间 */
|
|
389
|
+
update_time?: string
|
|
390
|
+
/** 版本文档状态 */
|
|
391
|
+
status?: '0' | '1' | '2'
|
|
392
|
+
/** 版本文档类型 */
|
|
393
|
+
obj_type?: 'docx' | 'sheet'
|
|
394
|
+
/** 源文档类型 */
|
|
395
|
+
parent_type?: 'docx' | 'sheet'
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface ListQuery extends Pagination {
|
|
399
|
+
/** 原文档类型 */
|
|
400
|
+
obj_type: 'docx' | 'sheet'
|
|
401
|
+
/** 用户id类型 */
|
|
402
|
+
user_id_type?: 'open_id' | 'union_id' | 'user_id'
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export interface GetQuery {
|
|
406
|
+
/** 文档类型 */
|
|
407
|
+
obj_type: 'docx' | 'sheet'
|
|
408
|
+
/** 用户ID类型 */
|
|
409
|
+
user_id_type?: 'open_id' | 'union_id' | 'user_id'
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface GetResponse {
|
|
413
|
+
/** 版本文档标题,最大长度 1024 个Unicode 码点。通常情况下,一个英文或中文字符对应一个码点,但是某些特殊符号可能会对应多个码点。例如,家庭组合「👨👩👧」这个表情符号对应5个码点。 */
|
|
414
|
+
name?: string
|
|
415
|
+
/** 版本文档版本号 */
|
|
416
|
+
version?: string
|
|
417
|
+
/** 源文档token */
|
|
418
|
+
parent_token?: string
|
|
419
|
+
/** 版本文档所有者id */
|
|
420
|
+
owner_id?: string
|
|
421
|
+
/** 版本文档创建者id */
|
|
422
|
+
creator_id?: string
|
|
423
|
+
/** 版本文档创建时间 */
|
|
424
|
+
create_time?: string
|
|
425
|
+
/** 版本文档更新时间 */
|
|
426
|
+
update_time?: string
|
|
427
|
+
/** 版本文档状态 */
|
|
428
|
+
status?: '0' | '1' | '2'
|
|
429
|
+
/** 版本文档类型 */
|
|
430
|
+
obj_type?: 'docx' | 'sheet'
|
|
431
|
+
/** 源文档类型 */
|
|
432
|
+
parent_type?: 'docx' | 'sheet'
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface DeleteQuery {
|
|
436
|
+
/** 文档类型 */
|
|
437
|
+
obj_type: 'docx' | 'sheet'
|
|
438
|
+
/** 用户ID类型 */
|
|
439
|
+
user_id_type?: 'open_id' | 'union_id' | 'user_id'
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export namespace Like {
|
|
444
|
+
export interface Methods {
|
|
445
|
+
/**
|
|
446
|
+
* 获取云文档的点赞者列表
|
|
447
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/file-like/list
|
|
448
|
+
*/
|
|
449
|
+
list(file_token: string, query?: ListQuery): Paginated<Lark.FileLike>
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
export interface ListQuery extends Pagination {
|
|
453
|
+
/** 文件类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */
|
|
454
|
+
file_type: 'doc' | 'docx' | 'file'
|
|
455
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
456
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export namespace Comment {
|
|
461
|
+
export interface Methods {
|
|
462
|
+
reply: Reply.Methods
|
|
463
|
+
/**
|
|
464
|
+
* 获取云文档所有评论
|
|
465
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/list
|
|
466
|
+
*/
|
|
467
|
+
list(file_token: string, query?: ListQuery): Paginated<Lark.FileComment>
|
|
468
|
+
/**
|
|
469
|
+
* 批量获取评论
|
|
470
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query
|
|
471
|
+
*/
|
|
472
|
+
batchQuery(file_token: string, body: BatchQueryRequest, query?: BatchQueryQuery): Promise<BatchQueryResponse>
|
|
473
|
+
/**
|
|
474
|
+
* 解决/恢复评论
|
|
475
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/patch
|
|
476
|
+
*/
|
|
477
|
+
patch(file_token: string, comment_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
|
|
478
|
+
/**
|
|
479
|
+
* 添加全文评论
|
|
480
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/create
|
|
481
|
+
*/
|
|
482
|
+
create(file_token: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
|
|
483
|
+
/**
|
|
484
|
+
* 获取全文评论
|
|
485
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/get
|
|
486
|
+
*/
|
|
487
|
+
get(file_token: string, comment_id: string, query?: GetQuery): Promise<GetResponse>
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export interface ListQuery extends Pagination {
|
|
491
|
+
/** 文档类型 */
|
|
492
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
493
|
+
/** 是否全文评论 */
|
|
494
|
+
is_whole?: boolean
|
|
495
|
+
/** 是否已解决(可选) */
|
|
496
|
+
is_solved?: boolean
|
|
497
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
498
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface BatchQueryRequest {
|
|
502
|
+
/** 需要获取数据的评论id */
|
|
503
|
+
comment_ids: string[]
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export interface BatchQueryQuery {
|
|
507
|
+
/** 文档类型 */
|
|
508
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
509
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
510
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface BatchQueryResponse {
|
|
514
|
+
/** 评论的相关信息、回复的信息、回复分页的信息 */
|
|
515
|
+
items?: Lark.FileComment[]
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface PatchRequest {
|
|
519
|
+
/** 评论解决标志 */
|
|
520
|
+
is_solved: boolean
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface PatchQuery {
|
|
524
|
+
/** 文档类型 */
|
|
525
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export interface CreateRequest {
|
|
529
|
+
/** 评论里的回复列表 */
|
|
530
|
+
reply_list?: Lark.ReplyList
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export interface CreateQuery {
|
|
534
|
+
/** 文档类型 */
|
|
535
|
+
file_type: 'doc' | 'docx'
|
|
536
|
+
/** 此次调用中使用的用户 ID 的类型 */
|
|
537
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export interface CreateResponse {
|
|
541
|
+
/** 评论 ID */
|
|
542
|
+
comment_id?: string
|
|
543
|
+
/** 用户 ID */
|
|
544
|
+
user_id?: string
|
|
545
|
+
/** 创建时间 */
|
|
546
|
+
create_time?: number
|
|
547
|
+
/** 更新时间 */
|
|
548
|
+
update_time?: number
|
|
549
|
+
/** 是否已解决 */
|
|
550
|
+
is_solved?: boolean
|
|
551
|
+
/** 解决评论时间 */
|
|
552
|
+
solved_time?: number
|
|
553
|
+
/** 解决评论者的用户 ID */
|
|
554
|
+
solver_user_id?: string
|
|
555
|
+
/** 是否有更多回复 */
|
|
556
|
+
has_more?: boolean
|
|
557
|
+
/** 回复分页标记 */
|
|
558
|
+
page_token?: string
|
|
559
|
+
/** 是否是全文评论 */
|
|
560
|
+
is_whole?: boolean
|
|
561
|
+
/** 局部评论的引用字段 */
|
|
562
|
+
quote?: string
|
|
563
|
+
/** 评论里的回复列表 */
|
|
564
|
+
reply_list?: Lark.ReplyList
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export interface GetQuery {
|
|
568
|
+
/** 文档类型 */
|
|
569
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
570
|
+
/** 此次调用中使用的用户 ID 的类型 */
|
|
571
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface GetResponse {
|
|
575
|
+
/** 评论 ID */
|
|
576
|
+
comment_id?: string
|
|
577
|
+
/** 用户 ID */
|
|
578
|
+
user_id?: string
|
|
579
|
+
/** 创建时间 */
|
|
580
|
+
create_time?: number
|
|
581
|
+
/** 更新时间 */
|
|
582
|
+
update_time?: number
|
|
583
|
+
/** 是否已解决 */
|
|
584
|
+
is_solved?: boolean
|
|
585
|
+
/** 解决评论时间 */
|
|
586
|
+
solved_time?: number
|
|
587
|
+
/** 解决评论者的用户 ID */
|
|
588
|
+
solver_user_id?: string
|
|
589
|
+
/** 是否有更多回复 */
|
|
590
|
+
has_more?: boolean
|
|
591
|
+
/** 回复分页标记 */
|
|
592
|
+
page_token?: string
|
|
593
|
+
/** 是否是全文评论 */
|
|
594
|
+
is_whole?: boolean
|
|
595
|
+
/** 局部评论的引用字段 */
|
|
596
|
+
quote?: string
|
|
597
|
+
/** 评论里的回复列表 */
|
|
598
|
+
reply_list?: Lark.ReplyList
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export namespace Reply {
|
|
602
|
+
export interface Methods {
|
|
603
|
+
/**
|
|
604
|
+
* 获取回复信息
|
|
605
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list
|
|
606
|
+
*/
|
|
607
|
+
list(file_token: string, comment_id: string, query?: ListQuery): Paginated<Lark.FileCommentReply>
|
|
608
|
+
/**
|
|
609
|
+
* 更新回复的内容
|
|
610
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/update
|
|
611
|
+
*/
|
|
612
|
+
update(file_token: string, comment_id: string, reply_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>
|
|
613
|
+
/**
|
|
614
|
+
* 删除回复
|
|
615
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/delete
|
|
616
|
+
*/
|
|
617
|
+
delete(file_token: string, comment_id: string, reply_id: string, query?: DeleteQuery): Promise<void>
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export interface ListQuery extends Pagination {
|
|
621
|
+
/** 文档类型 */
|
|
622
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
623
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
624
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export interface UpdateRequest {
|
|
628
|
+
/** 回复内容 */
|
|
629
|
+
content: Lark.ReplyContent
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export interface UpdateQuery {
|
|
633
|
+
/** 文档类型 */
|
|
634
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
635
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
636
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export interface DeleteQuery {
|
|
640
|
+
/** 文档类型 */
|
|
641
|
+
file_type: 'doc' | 'sheet' | 'file' | 'docx'
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export namespace Subscription {
|
|
647
|
+
export interface Methods {
|
|
648
|
+
/**
|
|
649
|
+
* 获取订阅状态
|
|
650
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/get
|
|
651
|
+
*/
|
|
652
|
+
get(file_token: string, subscription_id: string, body: GetRequest): Promise<GetResponse>
|
|
653
|
+
/**
|
|
654
|
+
* 创建订阅
|
|
655
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/create
|
|
656
|
+
*/
|
|
657
|
+
create(file_token: string, body: CreateRequest): Promise<CreateResponse>
|
|
658
|
+
/**
|
|
659
|
+
* 更新订阅状态
|
|
660
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-subscription/patch
|
|
661
|
+
*/
|
|
662
|
+
patch(file_token: string, subscription_id: string, body: PatchRequest): Promise<PatchResponse>
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export interface GetRequest {
|
|
666
|
+
/** 文档类型 */
|
|
667
|
+
file_type: 'doc' | 'docx' | 'wiki'
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export interface GetResponse {
|
|
671
|
+
/** 订阅关系ID */
|
|
672
|
+
subscription_id: string
|
|
673
|
+
/** 订阅类型 */
|
|
674
|
+
subscription_type?: 'comment_update'
|
|
675
|
+
/** 是否订阅 */
|
|
676
|
+
is_subcribe?: boolean
|
|
677
|
+
/** 文档类型 */
|
|
678
|
+
file_type?: 'doc' | 'docx' | 'wiki'
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export interface CreateRequest {
|
|
682
|
+
/** 订阅关系ID */
|
|
683
|
+
subscription_id?: string
|
|
684
|
+
/** 订阅类型 */
|
|
685
|
+
subscription_type: 'comment_update'
|
|
686
|
+
/** 是否订阅 */
|
|
687
|
+
is_subcribe?: boolean
|
|
688
|
+
/** 文档类型 */
|
|
689
|
+
file_type: 'doc' | 'docx' | 'wiki'
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export interface CreateResponse {
|
|
693
|
+
/** 订阅关系ID */
|
|
694
|
+
subscription_id?: string
|
|
695
|
+
/** 订阅类型 */
|
|
696
|
+
subscription_type?: 'comment_update'
|
|
697
|
+
/** 是否订阅 */
|
|
698
|
+
is_subcribe?: boolean
|
|
699
|
+
/** 文档类型 */
|
|
700
|
+
file_type?: 'doc' | 'docx' | 'wiki'
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export interface PatchRequest {
|
|
704
|
+
/** 是否订阅 */
|
|
705
|
+
is_subscribe: boolean
|
|
706
|
+
/** 文档类型 */
|
|
707
|
+
file_type: 'doc' | 'docx' | 'wiki'
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export interface PatchResponse {
|
|
711
|
+
/** 订阅关系ID */
|
|
712
|
+
subscription_id?: string
|
|
713
|
+
/** 订阅类型 */
|
|
714
|
+
subscription_type?: 'comment_update'
|
|
715
|
+
/** 是否订阅 */
|
|
716
|
+
is_subcribe?: boolean
|
|
717
|
+
/** 文档类型 */
|
|
718
|
+
file_type?: 'doc' | 'docx' | 'wiki'
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
1115
722
|
|
|
1116
|
-
export
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
723
|
+
export namespace Meta {
|
|
724
|
+
export interface Methods {
|
|
725
|
+
/**
|
|
726
|
+
* 获取文件元数据
|
|
727
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/meta/batch_query
|
|
728
|
+
*/
|
|
729
|
+
batchQuery(body: BatchQueryRequest, query?: BatchQueryQuery): Promise<BatchQueryResponse>
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
export interface BatchQueryRequest {
|
|
733
|
+
/** 请求文档, 一次不超过200个 */
|
|
734
|
+
request_docs: Lark.RequestDoc[]
|
|
735
|
+
/** 是否获取文档链接 */
|
|
736
|
+
with_url?: boolean
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export interface BatchQueryQuery {
|
|
740
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
741
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id'
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export interface BatchQueryResponse {
|
|
745
|
+
metas: Lark.Meta[]
|
|
746
|
+
failed_list?: Lark.MetaFailed[]
|
|
747
|
+
}
|
|
748
|
+
}
|
|
1126
749
|
|
|
1127
|
-
export
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
750
|
+
export namespace ImportTask {
|
|
751
|
+
export interface Methods {
|
|
752
|
+
/**
|
|
753
|
+
* 创建导入任务
|
|
754
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/create
|
|
755
|
+
*/
|
|
756
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
757
|
+
/**
|
|
758
|
+
* 查询导入任务结果
|
|
759
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/import_task/get
|
|
760
|
+
*/
|
|
761
|
+
get(ticket: string): Promise<GetResponse>
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export interface CreateRequest {
|
|
765
|
+
/** 导入文件格式后缀 */
|
|
766
|
+
file_extension: string
|
|
767
|
+
/** 导入的文件 Token */
|
|
768
|
+
file_token: string
|
|
769
|
+
/** 导入目标云文档类型,支持的类型 新版文档:docx;电子表格:sheet;多维表格:bitable */
|
|
770
|
+
type: string
|
|
771
|
+
/** 目标云文档的标题,若为空,则使用导入文件的名字 */
|
|
772
|
+
file_name?: string
|
|
773
|
+
/** 挂载点 */
|
|
774
|
+
point: Lark.ImportTaskMountPoint
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export interface CreateResponse {
|
|
778
|
+
/** 导入任务ID */
|
|
779
|
+
ticket?: string
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export interface GetResponse {
|
|
783
|
+
/** 导入任务 */
|
|
784
|
+
result?: Lark.ImportTask
|
|
785
|
+
}
|
|
786
|
+
}
|
|
1137
787
|
|
|
1138
|
-
export
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
788
|
+
export namespace ExportTask {
|
|
789
|
+
export interface Methods {
|
|
790
|
+
/**
|
|
791
|
+
* 创建导出任务
|
|
792
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/create
|
|
793
|
+
*/
|
|
794
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
795
|
+
/**
|
|
796
|
+
* 查询导出任务结果
|
|
797
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/get
|
|
798
|
+
*/
|
|
799
|
+
get(ticket: string, query?: GetQuery): Promise<GetResponse>
|
|
800
|
+
/**
|
|
801
|
+
* 下载导出文件
|
|
802
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/export_task/download
|
|
803
|
+
*/
|
|
804
|
+
download(file_token: string): Promise<ArrayBuffer>
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export interface CreateRequest {
|
|
808
|
+
/** 导出文件扩展名 */
|
|
809
|
+
file_extension: 'docx' | 'pdf' | 'xlsx' | 'csv'
|
|
810
|
+
/** 导出文档 Token */
|
|
811
|
+
token: string
|
|
812
|
+
/** 导出文档类型 */
|
|
813
|
+
type: 'doc' | 'sheet' | 'bitable' | 'docx'
|
|
814
|
+
/** 导出子表 ID,仅当将 sheet/bitable 导出为 csv 时使用 */
|
|
815
|
+
sub_id?: string
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export interface CreateResponse {
|
|
819
|
+
/** 导出任务ID */
|
|
820
|
+
ticket?: string
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export interface GetQuery {
|
|
824
|
+
/** 导出文档的 token */
|
|
825
|
+
token: string
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export interface GetResponse {
|
|
829
|
+
/** 导出结果 */
|
|
830
|
+
result?: Lark.ExportTask
|
|
831
|
+
}
|
|
832
|
+
}
|
|
1148
833
|
|
|
1149
|
-
export
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
834
|
+
export namespace Media {
|
|
835
|
+
export interface Methods {
|
|
836
|
+
/**
|
|
837
|
+
* 上传素材
|
|
838
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all
|
|
839
|
+
*/
|
|
840
|
+
uploadAll(form: UploadAllForm): Promise<UploadAllResponse>
|
|
841
|
+
/**
|
|
842
|
+
* 分片上传素材-预上传
|
|
843
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_prepare
|
|
844
|
+
*/
|
|
845
|
+
uploadPrepare(body: UploadPrepareRequest): Promise<UploadPrepareResponse>
|
|
846
|
+
/**
|
|
847
|
+
* 分片上传素材-上传分片
|
|
848
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_part
|
|
849
|
+
*/
|
|
850
|
+
uploadPart(form: UploadPartForm): Promise<void>
|
|
851
|
+
/**
|
|
852
|
+
* 分片上传素材-完成上传
|
|
853
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_finish
|
|
854
|
+
*/
|
|
855
|
+
uploadFinish(body: UploadFinishRequest): Promise<UploadFinishResponse>
|
|
856
|
+
/**
|
|
857
|
+
* 下载素材
|
|
858
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/download
|
|
859
|
+
*/
|
|
860
|
+
download(file_token: string, query?: DownloadQuery): Promise<ArrayBuffer>
|
|
861
|
+
/**
|
|
862
|
+
* 获取素材临时下载链接
|
|
863
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/batch_get_tmp_download_url
|
|
864
|
+
*/
|
|
865
|
+
batchGetTmpDownloadUrl(query?: BatchGetTmpDownloadUrlQuery): Promise<BatchGetTmpDownloadUrlResponse>
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export interface UploadAllForm {
|
|
869
|
+
/** 文件名。 */
|
|
870
|
+
file_name: string
|
|
871
|
+
/** 上传点类型。 */
|
|
872
|
+
parent_type: 'doc_image' | 'docx_image' | 'sheet_image' | 'doc_file' | 'docx_file' | 'sheet_file' | 'vc_virtual_background' | 'bitable_image' | 'bitable_file' | 'moments' | 'ccm_import_open' | 'calendar' | 'base_global' | 'lark_ai_media_analysis'
|
|
873
|
+
/** 上传点的token。 */
|
|
874
|
+
parent_node: string
|
|
875
|
+
/** 文件大小(以字节为单位)。 */
|
|
876
|
+
size: number
|
|
877
|
+
/** 文件adler32校验和(可选)。 */
|
|
878
|
+
checksum?: string
|
|
879
|
+
/** 扩展信息(可选)。 */
|
|
880
|
+
extra?: string
|
|
881
|
+
/** 文件二进制内容。 */
|
|
882
|
+
file: Blob
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export interface UploadAllResponse {
|
|
886
|
+
file_token?: string
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export interface UploadPrepareRequest {
|
|
890
|
+
/** 文件名 */
|
|
891
|
+
file_name: string
|
|
892
|
+
/** 上传点类型 */
|
|
893
|
+
parent_type: 'doc_image' | 'docx_image' | 'sheet_image' | 'doc_file' | 'docx_file' | 'sheet_file' | 'vc_virtual_background' | 'bitable_image' | 'bitable_file' | 'moments' | 'ccm_import_open' | 'calendar' | 'base_global' | 'lark_ai_media_analysis'
|
|
894
|
+
/** 文件大小 */
|
|
895
|
+
size: number
|
|
896
|
+
/** 上传点的标识符 */
|
|
897
|
+
parent_node?: string
|
|
898
|
+
/** 扩展信息(可选) */
|
|
899
|
+
extra?: string
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export interface UploadPrepareResponse {
|
|
903
|
+
/** 分片上传事务ID */
|
|
904
|
+
upload_id?: string
|
|
905
|
+
/** 分片大小策略 */
|
|
906
|
+
block_size?: number
|
|
907
|
+
/** 分片数量 */
|
|
908
|
+
block_num?: number
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export interface UploadPartForm {
|
|
912
|
+
/** 分片上传事务ID。 */
|
|
913
|
+
upload_id: string
|
|
914
|
+
/** 块号,从0开始计数。 */
|
|
915
|
+
seq: number
|
|
916
|
+
/** 块大小(以字节为单位)。 */
|
|
917
|
+
size: number
|
|
918
|
+
/** 文件分块adler32校验和(可选)。 */
|
|
919
|
+
checksum?: string
|
|
920
|
+
/** 文件分片二进制内容。 */
|
|
921
|
+
file: Blob
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
export interface UploadFinishRequest {
|
|
925
|
+
/** 分片上传事务ID */
|
|
926
|
+
upload_id: string
|
|
927
|
+
/** 分片数量 */
|
|
928
|
+
block_num: number
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
export interface UploadFinishResponse {
|
|
932
|
+
file_token?: string
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
export interface DownloadQuery {
|
|
936
|
+
/** 扩展信息 */
|
|
937
|
+
extra?: string
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
export interface BatchGetTmpDownloadUrlQuery {
|
|
941
|
+
/** 文件标识符列表 */
|
|
942
|
+
file_tokens: string[]
|
|
943
|
+
/** 拓展信息(可选) */
|
|
944
|
+
extra?: string
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export interface BatchGetTmpDownloadUrlResponse {
|
|
948
|
+
/** 临时下载列表 */
|
|
949
|
+
tmp_download_urls?: Lark.TmpDownloadUrl[]
|
|
950
|
+
}
|
|
951
|
+
}
|
|
1155
952
|
|
|
1156
|
-
export
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
953
|
+
export namespace Permission {
|
|
954
|
+
export interface Methods {
|
|
955
|
+
member: Member.Methods
|
|
956
|
+
public: Public.Methods
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export namespace Member {
|
|
960
|
+
export interface Methods {
|
|
961
|
+
/**
|
|
962
|
+
* 批量增加协作者权限
|
|
963
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/batch_create
|
|
964
|
+
*/
|
|
965
|
+
batchCreate(token: string, body: BatchCreateRequest, query?: BatchCreateQuery): Promise<BatchCreateResponse>
|
|
966
|
+
/**
|
|
967
|
+
* 转移所有者
|
|
968
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/transfer_owner
|
|
969
|
+
*/
|
|
970
|
+
transferOwner(token: string, body: TransferOwnerRequest, query?: TransferOwnerQuery): Promise<void>
|
|
971
|
+
/**
|
|
972
|
+
* 判断当前用户是否有某权限
|
|
973
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/auth
|
|
974
|
+
*/
|
|
975
|
+
auth(token: string, query?: AuthQuery): Promise<AuthResponse>
|
|
976
|
+
/**
|
|
977
|
+
* 获取协作者列表
|
|
978
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/list
|
|
979
|
+
*/
|
|
980
|
+
list(token: string, query?: ListQuery): Promise<ListResponse>
|
|
981
|
+
/**
|
|
982
|
+
* 增加协作者权限
|
|
983
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create
|
|
984
|
+
*/
|
|
985
|
+
create(token: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
|
|
986
|
+
/**
|
|
987
|
+
* 更新协作者权限
|
|
988
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/update
|
|
989
|
+
*/
|
|
990
|
+
update(token: string, member_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>
|
|
991
|
+
/**
|
|
992
|
+
* 移除协作者权限
|
|
993
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/delete
|
|
994
|
+
*/
|
|
995
|
+
delete(token: string, member_id: string, body: DeleteRequest, query?: DeleteQuery): Promise<void>
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
export interface BatchCreateRequest {
|
|
999
|
+
/** 协作者列表 */
|
|
1000
|
+
members: Lark.BaseMember[]
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export interface BatchCreateQuery {
|
|
1004
|
+
/** 文件的类型 */
|
|
1005
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'folder' | 'mindnote' | 'minutes' | 'slides'
|
|
1006
|
+
/** 添加权限后是否通知对方 */
|
|
1007
|
+
need_notification?: boolean
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export interface BatchCreateResponse {
|
|
1011
|
+
/** 协作者列表 */
|
|
1012
|
+
members?: Lark.BaseMember[]
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export interface TransferOwnerRequest {
|
|
1016
|
+
/** 文档拥有者的ID类型 */
|
|
1017
|
+
member_type: 'email' | 'openid' | 'userid'
|
|
1018
|
+
/** 文档拥有者的ID,与文档拥有者的ID类型需要对应 */
|
|
1019
|
+
member_id: string
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export interface TransferOwnerQuery {
|
|
1023
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1024
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides' | 'folder'
|
|
1025
|
+
/** 是否需要通知新 Owner */
|
|
1026
|
+
need_notification?: boolean
|
|
1027
|
+
/** 转移后是否需要移除原 Owner 的权限 */
|
|
1028
|
+
remove_old_owner?: boolean
|
|
1029
|
+
/** 仅当内容不在共享文件夹中,此参数才会生效。如果设为false,系统会将该内容移至新所有者的个人空间根文件夹。如果设为 true,则留在原位置。 */
|
|
1030
|
+
stay_put?: boolean
|
|
1031
|
+
/** 仅当 remove_old_owner = false 时,此参数才会生效 保留原文件所有者指定的权限角色 */
|
|
1032
|
+
old_owner_perm?: string
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export interface AuthQuery {
|
|
1036
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1037
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1038
|
+
/** 需要判断的权限 */
|
|
1039
|
+
action: 'view' | 'edit' | 'share' | 'comment' | 'export' | 'copy' | 'print' | 'manage_public'
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export interface AuthResponse {
|
|
1043
|
+
/** 是否有权限 */
|
|
1044
|
+
auth_result: boolean
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
export interface ListQuery {
|
|
1048
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1049
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1050
|
+
/** 指定返回的协作者字段信息,如无指定则默认不返回**可选值有:** - `name`:协作者名- `type`:协作者类型- `avatar`:头像- `external_label`:外部标签**注意:** - 你可以使用特殊值`*`指定返回目前支持的所有字段- 你可以使用`,`分隔若干个你想指定返回的字段,如:`name,avatar`- 按需指定返回字段接口性能更好 */
|
|
1051
|
+
fields?: string
|
|
1052
|
+
/** 协作者的权限角色类型 */
|
|
1053
|
+
perm_type?: 'container' | 'single_page'
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export interface ListResponse {
|
|
1057
|
+
/** 返回的列表数据 */
|
|
1058
|
+
items?: Lark.Member[]
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
export interface CreateRequest {
|
|
1062
|
+
/** 协作者ID类型 */
|
|
1063
|
+
member_type: 'email' | 'openid' | 'unionid' | 'openchat' | 'opendepartmentid' | 'userid' | 'groupid' | 'wikispaceid'
|
|
1064
|
+
/** 协作者ID,与协作者ID类型需要对应 */
|
|
1065
|
+
member_id: string
|
|
1066
|
+
/** 协作者的权限角色 */
|
|
1067
|
+
perm: 'view' | 'edit' | 'full_access'
|
|
1068
|
+
/** 协作者的权限角色类型 */
|
|
1069
|
+
perm_type?: 'container' | 'single_page'
|
|
1070
|
+
/** 协作者类型 */
|
|
1071
|
+
type?: 'user' | 'chat' | 'department' | 'group' | 'wiki_space_member' | 'wiki_space_viewer' | 'wiki_space_editor'
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
export interface CreateQuery {
|
|
1075
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1076
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'folder' | 'mindnote' | 'minutes' | 'slides'
|
|
1077
|
+
/** 添加权限后是否通知对方 */
|
|
1078
|
+
need_notification?: boolean
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
export interface CreateResponse {
|
|
1082
|
+
/** 本次添加权限的用户信息 */
|
|
1083
|
+
member?: Lark.BaseMember
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
export interface UpdateRequest {
|
|
1087
|
+
/** 协作者ID类型 */
|
|
1088
|
+
member_type: 'email' | 'openid' | 'unionid' | 'openchat' | 'opendepartmentid' | 'userid' | 'groupid' | 'wikispaceid'
|
|
1089
|
+
/** 协作者的权限角色 */
|
|
1090
|
+
perm: 'view' | 'edit' | 'full_access'
|
|
1091
|
+
/** 协作者的权限角色类型 */
|
|
1092
|
+
perm_type?: 'container' | 'single_page'
|
|
1093
|
+
/** 协作者类型 */
|
|
1094
|
+
type?: 'user' | 'chat' | 'department' | 'group' | 'wiki_space_member' | 'wiki_space_viewer' | 'wiki_space_editor'
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export interface UpdateQuery {
|
|
1098
|
+
/** 更新权限后是否通知对方**注意:** 使用`tenant_access_token`访问不支持该参数 */
|
|
1099
|
+
need_notification?: boolean
|
|
1100
|
+
/** 文件类型,放于query参数中,如:`?type=doc` */
|
|
1101
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
export interface UpdateResponse {
|
|
1105
|
+
/** 本次更新权限的用户信息 */
|
|
1106
|
+
member?: Lark.BaseMember
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
export interface DeleteRequest {
|
|
1110
|
+
/** 协作者类型 */
|
|
1111
|
+
type?: 'user' | 'chat' | 'department' | 'group' | 'wiki_space_member' | 'wiki_space_viewer' | 'wiki_space_editor'
|
|
1112
|
+
/** 协作者的权限角色类型 */
|
|
1113
|
+
perm_type?: 'container' | 'single_page'
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
export interface DeleteQuery {
|
|
1117
|
+
/** 文件类型,放于query参数中,如:`?type=doc` */
|
|
1118
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'folder' | 'mindnote' | 'minutes' | 'slides'
|
|
1119
|
+
/** 权限成员类型,放于query参数中,如:`?member_type=openid` */
|
|
1120
|
+
member_type: 'email' | 'openid' | 'openchat' | 'opendepartmentid' | 'userid' | 'unionid' | 'groupid' | 'wikispaceid'
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
export namespace Public {
|
|
1125
|
+
export interface Methods {
|
|
1126
|
+
password: Password.Methods
|
|
1127
|
+
/**
|
|
1128
|
+
* 获取云文档权限设置
|
|
1129
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/permission-public/get
|
|
1130
|
+
*/
|
|
1131
|
+
get(token: string, query?: GetQuery): Promise<GetResponse>
|
|
1132
|
+
/**
|
|
1133
|
+
* 更新云文档权限设置
|
|
1134
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/permission-public/patch
|
|
1135
|
+
*/
|
|
1136
|
+
patch(token: string, body: PatchRequest, query?: PatchQuery): Promise<PatchResponse>
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
export interface GetQuery {
|
|
1140
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1141
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export interface GetResponse {
|
|
1145
|
+
/** 返回的文档公共设置 */
|
|
1146
|
+
permission_public?: Lark.PermissionPublic
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export interface PatchRequest {
|
|
1150
|
+
/** 允许内容被分享到组织外 */
|
|
1151
|
+
external_access_entity?: 'open' | 'closed' | 'allow_share_partner_tenant'
|
|
1152
|
+
/** 谁可以创建副本、打印、下载 */
|
|
1153
|
+
security_entity?: 'anyone_can_view' | 'anyone_can_edit' | 'only_full_access'
|
|
1154
|
+
/** 谁可以评论 */
|
|
1155
|
+
comment_entity?: 'anyone_can_view' | 'anyone_can_edit'
|
|
1156
|
+
/** 谁可以添加和管理协作者-组织维度 */
|
|
1157
|
+
share_entity?: 'anyone' | 'same_tenant'
|
|
1158
|
+
/** 谁可以添加和管理协作者-协作者维度 */
|
|
1159
|
+
manage_collaborator_entity?: 'collaborator_can_view' | 'collaborator_can_edit' | 'collaborator_full_access'
|
|
1160
|
+
/** 链接分享设置 */
|
|
1161
|
+
link_share_entity?: 'tenant_readable' | 'tenant_editable' | 'partner_tenant_readable' | 'partner_tenant_editable' | 'anyone_readable' | 'anyone_editable' | 'closed'
|
|
1162
|
+
/** 谁可以复制内容 */
|
|
1163
|
+
copy_entity?: 'anyone_can_view' | 'anyone_can_edit' | 'only_full_access'
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
export interface PatchQuery {
|
|
1167
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1168
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
export interface PatchResponse {
|
|
1172
|
+
/** 本次更新后文档公共设置 */
|
|
1173
|
+
permission_public?: Lark.PermissionPublic
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export namespace Password {
|
|
1177
|
+
export interface Methods {
|
|
1178
|
+
/**
|
|
1179
|
+
* 开启密码
|
|
1180
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public-password/create
|
|
1181
|
+
*/
|
|
1182
|
+
create(token: string, query?: CreateQuery): Promise<CreateResponse>
|
|
1183
|
+
/**
|
|
1184
|
+
* 刷新密码
|
|
1185
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public-password/update
|
|
1186
|
+
*/
|
|
1187
|
+
update(token: string, query?: UpdateQuery): Promise<UpdateResponse>
|
|
1188
|
+
/**
|
|
1189
|
+
* 关闭密码
|
|
1190
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-public-password/delete
|
|
1191
|
+
*/
|
|
1192
|
+
delete(token: string, query?: DeleteQuery): Promise<void>
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
export interface CreateQuery {
|
|
1196
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1197
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
export interface CreateResponse {
|
|
1201
|
+
/** 密码 */
|
|
1202
|
+
password?: string
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
export interface UpdateQuery {
|
|
1206
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1207
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
export interface UpdateResponse {
|
|
1211
|
+
/** 密码 */
|
|
1212
|
+
password?: string
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
export interface DeleteQuery {
|
|
1216
|
+
/** 文件类型,需要与文件的 token 相匹配 */
|
|
1217
|
+
type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides'
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1165
1222
|
}
|
|
1166
1223
|
|
|
1167
1224
|
Internal.define({
|
|
1168
1225
|
'/drive/v1/files': {
|
|
1169
|
-
GET: { name: '
|
|
1226
|
+
GET: { name: 'drive.file.list', pagination: { argIndex: 0, itemsKey: 'files', tokenKey: 'next_page_token' } },
|
|
1170
1227
|
},
|
|
1171
1228
|
'/drive/v1/files/create_folder': {
|
|
1172
|
-
POST: '
|
|
1229
|
+
POST: 'drive.file.createFolder',
|
|
1173
1230
|
},
|
|
1174
1231
|
'/drive/v1/files/task_check': {
|
|
1175
|
-
GET: '
|
|
1232
|
+
GET: 'drive.file.taskCheck',
|
|
1176
1233
|
},
|
|
1177
1234
|
'/drive/v1/metas/batch_query': {
|
|
1178
|
-
POST: '
|
|
1235
|
+
POST: 'drive.meta.batchQuery',
|
|
1179
1236
|
},
|
|
1180
1237
|
'/drive/v1/files/{file_token}/statistics': {
|
|
1181
|
-
GET: '
|
|
1238
|
+
GET: 'drive.file.statistics.get',
|
|
1182
1239
|
},
|
|
1183
1240
|
'/drive/v1/files/{file_token}/view_records': {
|
|
1184
|
-
GET: { name: '
|
|
1241
|
+
GET: { name: 'drive.file.viewRecord.list', pagination: { argIndex: 1 } },
|
|
1185
1242
|
},
|
|
1186
1243
|
'/drive/v1/files/{file_token}/copy': {
|
|
1187
|
-
POST: '
|
|
1244
|
+
POST: 'drive.file.copy',
|
|
1188
1245
|
},
|
|
1189
1246
|
'/drive/v1/files/{file_token}/move': {
|
|
1190
|
-
POST: '
|
|
1247
|
+
POST: 'drive.file.move',
|
|
1191
1248
|
},
|
|
1192
1249
|
'/drive/v1/files/{file_token}': {
|
|
1193
|
-
DELETE: '
|
|
1250
|
+
DELETE: 'drive.file.delete',
|
|
1194
1251
|
},
|
|
1195
1252
|
'/drive/v1/files/create_shortcut': {
|
|
1196
|
-
POST: '
|
|
1253
|
+
POST: 'drive.file.createShortcut',
|
|
1197
1254
|
},
|
|
1198
1255
|
'/drive/v1/files/upload_all': {
|
|
1199
|
-
POST: { name: '
|
|
1256
|
+
POST: { name: 'drive.file.uploadAll', multipart: true },
|
|
1200
1257
|
},
|
|
1201
1258
|
'/drive/v1/files/upload_prepare': {
|
|
1202
|
-
POST: '
|
|
1259
|
+
POST: 'drive.file.uploadPrepare',
|
|
1203
1260
|
},
|
|
1204
1261
|
'/drive/v1/files/upload_part': {
|
|
1205
|
-
POST: { name: '
|
|
1262
|
+
POST: { name: 'drive.file.uploadPart', multipart: true },
|
|
1206
1263
|
},
|
|
1207
1264
|
'/drive/v1/files/upload_finish': {
|
|
1208
|
-
POST: '
|
|
1265
|
+
POST: 'drive.file.uploadFinish',
|
|
1209
1266
|
},
|
|
1210
1267
|
'/drive/v1/files/{file_token}/download': {
|
|
1211
|
-
GET: { name: '
|
|
1268
|
+
GET: { name: 'drive.file.download', type: 'binary' },
|
|
1212
1269
|
},
|
|
1213
1270
|
'/drive/v1/import_tasks': {
|
|
1214
|
-
POST: '
|
|
1271
|
+
POST: 'drive.importTask.create',
|
|
1215
1272
|
},
|
|
1216
1273
|
'/drive/v1/import_tasks/{ticket}': {
|
|
1217
|
-
GET: '
|
|
1274
|
+
GET: 'drive.importTask.get',
|
|
1218
1275
|
},
|
|
1219
1276
|
'/drive/v1/export_tasks': {
|
|
1220
|
-
POST: '
|
|
1277
|
+
POST: 'drive.exportTask.create',
|
|
1221
1278
|
},
|
|
1222
1279
|
'/drive/v1/export_tasks/{ticket}': {
|
|
1223
|
-
GET: '
|
|
1280
|
+
GET: 'drive.exportTask.get',
|
|
1224
1281
|
},
|
|
1225
1282
|
'/drive/v1/export_tasks/file/{file_token}/download': {
|
|
1226
|
-
GET: { name: '
|
|
1283
|
+
GET: { name: 'drive.exportTask.download', type: 'binary' },
|
|
1227
1284
|
},
|
|
1228
1285
|
'/drive/v1/medias/upload_all': {
|
|
1229
|
-
POST: { name: '
|
|
1286
|
+
POST: { name: 'drive.media.uploadAll', multipart: true },
|
|
1230
1287
|
},
|
|
1231
1288
|
'/drive/v1/medias/upload_prepare': {
|
|
1232
|
-
POST: '
|
|
1289
|
+
POST: 'drive.media.uploadPrepare',
|
|
1233
1290
|
},
|
|
1234
1291
|
'/drive/v1/medias/upload_part': {
|
|
1235
|
-
POST: { name: '
|
|
1292
|
+
POST: { name: 'drive.media.uploadPart', multipart: true },
|
|
1236
1293
|
},
|
|
1237
1294
|
'/drive/v1/medias/upload_finish': {
|
|
1238
|
-
POST: '
|
|
1295
|
+
POST: 'drive.media.uploadFinish',
|
|
1239
1296
|
},
|
|
1240
1297
|
'/drive/v1/medias/{file_token}/download': {
|
|
1241
|
-
GET: { name: '
|
|
1298
|
+
GET: { name: 'drive.media.download', type: 'binary' },
|
|
1242
1299
|
},
|
|
1243
1300
|
'/drive/v1/medias/batch_get_tmp_download_url': {
|
|
1244
|
-
GET: '
|
|
1301
|
+
GET: 'drive.media.batchGetTmpDownloadUrl',
|
|
1245
1302
|
},
|
|
1246
1303
|
'/drive/v1/files/{file_token}/versions': {
|
|
1247
|
-
POST: '
|
|
1248
|
-
GET: { name: '
|
|
1304
|
+
POST: 'drive.file.version.create',
|
|
1305
|
+
GET: { name: 'drive.file.version.list', pagination: { argIndex: 1 } },
|
|
1249
1306
|
},
|
|
1250
1307
|
'/drive/v1/files/{file_token}/versions/{version_id}': {
|
|
1251
|
-
GET: '
|
|
1252
|
-
DELETE: '
|
|
1308
|
+
GET: 'drive.file.version.get',
|
|
1309
|
+
DELETE: 'drive.file.version.delete',
|
|
1253
1310
|
},
|
|
1254
1311
|
'/drive/v2/files/{file_token}/likes': {
|
|
1255
|
-
GET: { name: '
|
|
1312
|
+
GET: { name: 'drive.file.like.list', pagination: { argIndex: 1 } },
|
|
1256
1313
|
},
|
|
1257
1314
|
'/drive/v1/files/{file_token}/subscribe': {
|
|
1258
|
-
POST: '
|
|
1315
|
+
POST: 'drive.file.subscribe',
|
|
1259
1316
|
},
|
|
1260
1317
|
'/drive/v1/files/{file_token}/get_subscribe': {
|
|
1261
|
-
GET: '
|
|
1318
|
+
GET: 'drive.file.getSubscribe',
|
|
1262
1319
|
},
|
|
1263
1320
|
'/drive/v1/files/{file_token}/delete_subscribe': {
|
|
1264
|
-
DELETE: '
|
|
1321
|
+
DELETE: 'drive.file.deleteSubscribe',
|
|
1265
1322
|
},
|
|
1266
1323
|
'/drive/v1/permissions/{token}/members/batch_create': {
|
|
1267
|
-
POST: '
|
|
1324
|
+
POST: 'drive.permission.member.batchCreate',
|
|
1268
1325
|
},
|
|
1269
1326
|
'/drive/v1/permissions/{token}/members/transfer_owner': {
|
|
1270
|
-
POST: '
|
|
1327
|
+
POST: 'drive.permission.member.transferOwner',
|
|
1271
1328
|
},
|
|
1272
1329
|
'/drive/v1/permissions/{token}/members/auth': {
|
|
1273
|
-
GET: '
|
|
1330
|
+
GET: 'drive.permission.member.auth',
|
|
1274
1331
|
},
|
|
1275
1332
|
'/drive/v1/permissions/{token}/members': {
|
|
1276
|
-
GET: '
|
|
1277
|
-
POST: '
|
|
1333
|
+
GET: 'drive.permission.member.list',
|
|
1334
|
+
POST: 'drive.permission.member.create',
|
|
1278
1335
|
},
|
|
1279
1336
|
'/drive/v1/permissions/{token}/members/{member_id}': {
|
|
1280
|
-
PUT: '
|
|
1281
|
-
DELETE: '
|
|
1337
|
+
PUT: 'drive.permission.member.update',
|
|
1338
|
+
DELETE: 'drive.permission.member.delete',
|
|
1282
1339
|
},
|
|
1283
1340
|
'/drive/v1/permissions/{token}/public/password': {
|
|
1284
|
-
POST: '
|
|
1285
|
-
PUT: '
|
|
1286
|
-
DELETE: '
|
|
1287
|
-
},
|
|
1288
|
-
'/drive/v1/permissions/{token}/public': {
|
|
1289
|
-
GET: 'getDriveV1PermissionPublic',
|
|
1290
|
-
PATCH: 'patchDriveV1PermissionPublic',
|
|
1341
|
+
POST: 'drive.permission.public.password.create',
|
|
1342
|
+
PUT: 'drive.permission.public.password.update',
|
|
1343
|
+
DELETE: 'drive.permission.public.password.delete',
|
|
1291
1344
|
},
|
|
1292
1345
|
'/drive/v2/permissions/{token}/public': {
|
|
1293
|
-
GET: '
|
|
1294
|
-
PATCH: '
|
|
1346
|
+
GET: 'drive.permission.public.get',
|
|
1347
|
+
PATCH: 'drive.permission.public.patch',
|
|
1295
1348
|
},
|
|
1296
1349
|
'/drive/v1/files/{file_token}/comments': {
|
|
1297
|
-
GET: { name: '
|
|
1298
|
-
POST: '
|
|
1350
|
+
GET: { name: 'drive.file.comment.list', pagination: { argIndex: 1 } },
|
|
1351
|
+
POST: 'drive.file.comment.create',
|
|
1299
1352
|
},
|
|
1300
1353
|
'/drive/v1/files/{file_token}/comments/batch_query': {
|
|
1301
|
-
POST: '
|
|
1354
|
+
POST: 'drive.file.comment.batchQuery',
|
|
1302
1355
|
},
|
|
1303
1356
|
'/drive/v1/files/{file_token}/comments/{comment_id}': {
|
|
1304
|
-
PATCH: '
|
|
1305
|
-
GET: '
|
|
1357
|
+
PATCH: 'drive.file.comment.patch',
|
|
1358
|
+
GET: 'drive.file.comment.get',
|
|
1306
1359
|
},
|
|
1307
1360
|
'/drive/v1/files/{file_token}/comments/{comment_id}/replies': {
|
|
1308
|
-
GET: { name: '
|
|
1361
|
+
GET: { name: 'drive.file.comment.reply.list', pagination: { argIndex: 2 } },
|
|
1309
1362
|
},
|
|
1310
1363
|
'/drive/v1/files/{file_token}/comments/{comment_id}/replies/{reply_id}': {
|
|
1311
|
-
PUT: '
|
|
1312
|
-
DELETE: '
|
|
1364
|
+
PUT: 'drive.file.comment.reply.update',
|
|
1365
|
+
DELETE: 'drive.file.comment.reply.delete',
|
|
1313
1366
|
},
|
|
1314
1367
|
'/drive/v1/files/{file_token}/subscriptions/{subscription_id}': {
|
|
1315
|
-
GET: '
|
|
1316
|
-
PATCH: '
|
|
1368
|
+
GET: 'drive.file.subscription.get',
|
|
1369
|
+
PATCH: 'drive.file.subscription.patch',
|
|
1317
1370
|
},
|
|
1318
1371
|
'/drive/v1/files/{file_token}/subscriptions': {
|
|
1319
|
-
POST: '
|
|
1372
|
+
POST: 'drive.file.subscription.create',
|
|
1320
1373
|
},
|
|
1321
1374
|
})
|