UNPKG

@larksuiteoapi/lark-mcp

Version:
826 lines 92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.driveV1Tools = exports.driveV1PermissionPublicPatch = exports.driveV1PermissionPublicPasswordUpdate = exports.driveV1PermissionPublicPasswordDelete = exports.driveV1PermissionPublicPasswordCreate = exports.driveV1PermissionPublicGet = exports.driveV1PermissionMemberUpdate = exports.driveV1PermissionMemberTransferOwner = exports.driveV1PermissionMemberList = exports.driveV1PermissionMemberDelete = exports.driveV1PermissionMemberCreate = exports.driveV1PermissionMemberBatchCreate = exports.driveV1PermissionMemberAuth = exports.driveV1MetaBatchQuery = exports.driveV1MediaUploadPrepare = exports.driveV1MediaUploadFinish = exports.driveV1MediaBatchGetTmpDownloadUrl = exports.driveV1ImportTaskGet = exports.driveV1ImportTaskCreate = exports.driveV1FileViewRecordList = exports.driveV1FileVersionList = exports.driveV1FileVersionGet = exports.driveV1FileVersionDelete = exports.driveV1FileVersionCreate = exports.driveV1FileUploadPrepare = exports.driveV1FileUploadFinish = exports.driveV1FileTaskCheck = exports.driveV1FileSubscriptionPatch = exports.driveV1FileSubscriptionGet = exports.driveV1FileSubscriptionCreate = exports.driveV1FileSubscribe = exports.driveV1FileStatisticsGet = exports.driveV1FileMove = exports.driveV1FileList = exports.driveV1FileGetSubscribe = exports.driveV1FileDeleteSubscribe = exports.driveV1FileDelete = exports.driveV1FileCreateShortcut = exports.driveV1FileCreateFolder = exports.driveV1FileCopy = exports.driveV1FileCommentReplyUpdate = exports.driveV1FileCommentReplyList = exports.driveV1FileCommentReplyDelete = exports.driveV1FileCommentPatch = exports.driveV1FileCommentList = exports.driveV1FileCommentGet = exports.driveV1FileCommentCreate = exports.driveV1FileCommentBatchQuery = exports.driveV1ExportTaskGet = exports.driveV1ExportTaskCreate = void 0; const zod_1 = require("zod"); exports.driveV1ExportTaskCreate = { project: 'drive', name: 'drive.v1.exportTask.create', sdkName: 'drive.v1.exportTask.create', path: '/open-apis/drive/v1/export_tasks', httpMethod: 'POST', description: '[Feishu/Lark]-Space-File-Export docs-Create an export task-This interface is used to create an export file task and returns the export task ID. The export file refers to exporting Feishu documents, spreadsheets, and multidimensional spreadsheets to local files, including formats such as Word, Excel, PDF, and CSV. This interface is asynchronous, requiring a subsequent call to the interface to obtain the export result. For a complete understanding of the export steps, refer to the ', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ file_extension: zod_1.z .enum(['docx', 'pdf', 'xlsx', 'csv']) .describe('The file extension of the local file after exporting the cloud document. To understand the file formats supported for exporting various cloud documents, refer to the . Options:docx(Microsoft Word (DOCX) format),pdf(PDF format),xlsx(Microsoft Excel (XLSX) format),csv(CSV format)'), token: zod_1.z .string() .describe('The token of the cloud document. For details, see '), type: zod_1.z .enum(['doc', 'sheet', 'bitable', 'docx']) .describe('The cloud document type to be exported. It can be judged by the link to the cloud document. Options:doc(Depracated Feishu cloud document type, supports export to docx, pdf format),sheet(Feishu spreadsheet type, support export to xlsx, csv format),bitable(Bitable type, support export to xlsx, csv format),docx(The new version of Feishu cloud document type supports exporting to docx, pdf formats)'), sub_id: zod_1.z .string() .describe('When exporting spreadsheets or Base to CSV files, you need to pass the ID of the spreadsheet worksheet or the ID of the Base data table:- For spreadsheets, you can call the API to obtain the returned value of `sheet_id` as the value of this parameter.- For Base apps, you can call the API to obtain the returned value of `table_id` as the value of this parameter') .optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1ExportTaskGet = { project: 'drive', name: 'drive.v1.exportTask.get', sdkName: 'drive.v1.exportTask.get', path: '/open-apis/drive/v1/export_tasks/:ticket', httpMethod: 'GET', description: '[Feishu/Lark]-Space-File-Export docs-Query export task results-According to the export task ID (ticket) returned by the interface, poll the export task result and return the token of the export file. You can use this token to call the interface to download the exported file to your local device. For a complete understanding of the export file steps, refer to the ', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ token: zod_1.z .string() .describe('The token of the cloud document. For details, see '), }), path: zod_1.z.object({ ticket: zod_1.z .string() .describe('Export task ID, call to get the ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentBatchQuery = { project: 'drive', name: 'drive.v1.fileComment.batchQuery', sdkName: 'drive.v1.fileComment.batchQuery', path: '/open-apis/drive/v1/files/:file_token/comments/batch_query', httpMethod: 'POST', description: '[Feishu/Lark]-Docs-Comment-Batch Query Comments-This API is used to obtain cloud document comment information in batches according to comment ID list, including comment and reply ID, reply content, user ID of reviewer and reply person, etc. Supports returning global comments as well as local comments (which can be distinguished by the "is_whole" field)', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ comment_ids: zod_1.z.array(zod_1.z.string()).describe('Comment ID list') }), params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'file', 'slides']) .describe('Document type Options:doc(docsheetdocxfile),docx(Upgraded Docs),sheet(Form),file(File),slides(Slides)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Document token').optional() }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentCreate = { project: 'drive', name: 'drive.v1.fileComment.create', sdkName: 'drive.v1.fileComment.create', path: '/open-apis/drive/v1/files/:file_token/comments', httpMethod: 'POST', description: '[Feishu/Lark]-Docs-Comment-Add a Global Comment-Adds a global comment to Docs', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ reply_list: zod_1.z .object({ replies: zod_1.z .array(zod_1.z.object({ content: zod_1.z .object({ elements: zod_1.z .array(zod_1.z.object({ type: zod_1.z .enum(['text_run', 'docs_link', 'person']) .describe('Content elements of the reply Options:text_run(Plain text),docs_link(Link to @mentioning a document in Docs),person(Contact to @mention)'), text_run: zod_1.z .object({ text: zod_1.z.string().describe('Reply with plain text') }) .describe('Text content') .optional(), docs_link: zod_1.z .object({ url: zod_1.z.string().describe('@mentioned document in a reply') }) .describe('Text content') .optional(), person: zod_1.z .object({ user_id: zod_1.z.string().describe('@mentioned contact in a reply') }) .describe('Text content') .optional(), })) .describe('Reply content'), }) .describe('Reply content'), })) .describe('Reply list'), }) .describe('List of replies in the comment') .optional(), }), params: zod_1.z.object({ file_type: zod_1.z.enum(['doc', 'docx']).describe('Type of the document Options:doc(Doc),docx(New Doc)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Token of the document') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentGet = { project: 'drive', name: 'drive.v1.fileComment.get', sdkName: 'drive.v1.fileComment.get', path: '/open-apis/drive/v1/files/:file_token/comments/:comment_id', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Comment-Get a whole comment-Obtains a specified global comment in Docs. Local comments are not supported yet', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'sheet', 'file', 'docx']) .describe('Type of the document Options:doc(Doc),sheet(Sheet),file(File),docx(New Doc)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Token of the document'), comment_id: zod_1.z.string().describe('Comment ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentList = { project: 'drive', name: 'drive.v1.fileComment.list', sdkName: 'drive.v1.fileComment.list', path: '/open-apis/drive/v1/files/:file_token/comments', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Comment-Get Document Comments in Pages-The API is used to obtain all the comment information of the document according to the cloud document Token, including comment and reply ID, reply content, user ID of the reviewer and reply person, etc. The API supports returning global comments as well as local comments (which can be distinguished by the "is_whole" field). The default is 50 comments per page', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'file', 'slides']) .describe('Type of the document Options:doc(Doc),docx(Upgraded Docs),sheet(Sheet),file(File in My Space),slides(Slides)'), is_whole: zod_1.z.boolean().describe('Whether whole comment').optional(), is_solved: zod_1.z.boolean().describe('Specifies whether the comment is solved. This field is optional').optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), page_size: zod_1.z.number().optional(), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Token of the document') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentPatch = { project: 'drive', name: 'drive.v1.fileComment.patch', sdkName: 'drive.v1.fileComment.patch', path: '/open-apis/drive/v1/files/:file_token/comments/:comment_id', httpMethod: 'PATCH', description: '[Feishu/Lark]-Docs-Comment-Solve or Restore a Comment-Solves or restores a comment on a document in Docs', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ is_solved: zod_1.z.boolean().describe('Icon that indicates whether the comment is solved') }), params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'file', 'slides']) .describe('Type of the document Options:doc(Doc),docx(Upgraded Docs),sheet(Sheet),file(File),slides(Slides)'), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Token of the document'), comment_id: zod_1.z.string().describe('Comment ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentReplyDelete = { project: 'drive', name: 'drive.v1.fileCommentReply.delete', sdkName: 'drive.v1.fileCommentReply.delete', path: '/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id', httpMethod: 'DELETE', description: '[Feishu/Lark]-Docs-Comment-Delete Reply-Deletes a reply to a document in Docs', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'file', 'slides']) .describe('Type of the document Options:doc(Doc),docx(New Doc),sheet(Sheet),file(File),slides(Slides)'), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Token of the document'), comment_id: zod_1.z.string().describe('Comment ID'), reply_id: zod_1.z.string().describe('Reply ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentReplyList = { project: 'drive', name: 'drive.v1.fileCommentReply.list', sdkName: 'drive.v1.fileCommentReply.list', path: '/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Comment-Get Replies List-This interface is used to obtain replies according to the comment ID and pagination parameters', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'file', 'slides']) .describe('Document type Options:doc(Documentation),docx(Upgraded Docs),sheet(Form),file(File),slides(Slides)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Document Token'), comment_id: zod_1.z.string().describe('Comment ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCommentReplyUpdate = { project: 'drive', name: 'drive.v1.fileCommentReply.update', sdkName: 'drive.v1.fileCommentReply.update', path: '/open-apis/drive/v1/files/:file_token/comments/:comment_id/replies/:reply_id', httpMethod: 'PUT', description: '[Feishu/Lark]-Docs-Comment-Update Reply-Updates a reply to a document in Docs', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ content: zod_1.z .object({ elements: zod_1.z .array(zod_1.z.object({ type: zod_1.z .enum(['text_run', 'docs_link', 'person']) .describe('Content elements of the reply Options:text_run(Plain text),docs_link(Link to @mentioning a document in Docs),person(Contact to @mention)'), text_run: zod_1.z .object({ text: zod_1.z.string().describe('Reply with plain text') }) .describe('Text content') .optional(), docs_link: zod_1.z .object({ url: zod_1.z.string().describe('@mentioned document in a reply') }) .describe('Text content') .optional(), person: zod_1.z .object({ user_id: zod_1.z.string().describe('@mentioned contact in a reply') }) .describe('Text content') .optional(), })) .describe('Reply content'), }) .describe('Reply content'), }), params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'file', 'slides']) .describe('Type of the document Options:doc(Doc),docx(Upgraded Docs),sheet(Sheet),file(File),slides(Slides)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('Token of the document'), comment_id: zod_1.z.string().describe('Comment ID'), reply_id: zod_1.z.string().describe('Reply ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCopy = { project: 'drive', name: 'drive.v1.file.copy', sdkName: 'drive.v1.file.copy', path: '/open-apis/drive/v1/files/:file_token/copy', httpMethod: 'POST', description: "[Feishu/Lark]-Docs-Space-File-Copy File-Copy a file to a different folder in the user's Space. Folders cannot be copied. This interface is asynchronous", accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ name: zod_1.z.string().describe('The new name of the copied file.**Data validation rules**: Maximum length: 256 bytes'), type: zod_1.z .enum(['file', 'doc', 'sheet', 'bitable', 'docx', 'mindnote', 'slides']) .describe('File type that need to be copied. This parameter is required. If the value is empty or does not match the actual file type, the interface will return failure. Options:file(Common file type),doc(Cloud document type of docs),sheet(Cloud document type of sheet),bitable(Cloud document type of bitable),docx(Cloud document type of upgraded docs),mindnote(Cloud document type of mindnote),slides(Cloud document type of slide)') .optional(), folder_token: zod_1.z .string() .describe('The target folder token to which the file is copied. Learn how to get the folder token, see '), extra: zod_1.z .array(zod_1.z.object({ key: zod_1.z.string().describe('Custom property key'), value: zod_1.z.string().describe('Custom property value'), })) .describe('Additional parameters for special replication semantics') .optional(), }), params: zod_1.z.object({ user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional() }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('File token that needs to be copied. Learn how to get the file token, see ') .optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCreateFolder = { project: 'drive', name: 'drive.v1.file.createFolder', sdkName: 'drive.v1.file.createFolder', path: '/open-apis/drive/v1/files/create_folder', httpMethod: 'POST', description: "[Feishu/Lark]-Docs-Space-Folder-Create Folder-Creates a new empty folder within the specified parent folder in the user's Space", accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ name: zod_1.z.string().describe('The name of the folder you wish to create.**Length limit**: 1~256 bytes'), folder_token: zod_1.z .string() .describe('Parent folder token. This parameter can be an empty string, which means the folder will be created in the root folder. You can refer to to get other level folder. For details, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileCreateShortcut = { project: 'drive', name: 'drive.v1.file.createShortcut', sdkName: 'drive.v1.file.createShortcut', path: '/open-apis/drive/v1/files/create_shortcut', httpMethod: 'POST', description: '[Feishu/Lark]-Docs-Space-File-Create file shortcut-Create shortcut to specified Docs in other folders in Space', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ parent_token: zod_1.z .string() .describe('The token of the target folder into which the file is copied. For how to get the folder token, see '), refer_entity: zod_1.z .object({ refer_token: zod_1.z .string() .describe('The token of the file that needs to be copied. For how to get the file token, see '), refer_type: zod_1.z .enum(['file', 'docx', 'bitable', 'doc', 'sheet', 'mindnote', 'slides']) .describe('File type that need to be copied. If the value is empty or does not match the actual file type, the interface will return failure. Options:file(File),docx(Upgraded Docs),bitable(Bitable),doc(Docs),sheet(Sheets),mindnote(MindNotes),slides(Slides)'), }) .describe('source file information'), }), params: zod_1.z.object({ user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional() }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileDelete = { project: 'drive', name: 'drive.v1.file.delete', sdkName: 'drive.v1.file.delete', path: '/open-apis/drive/v1/files/:file_token', httpMethod: 'DELETE', description: "[Feishu/Lark]-Docs-Space-File-Delete file or folder-Delete a file or folder from user's Space. After the file or folder is deleted, it will go to the user's recycle bin", accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ type: zod_1.z .enum(['file', 'docx', 'bitable', 'folder', 'doc', 'sheet', 'mindnote', 'shortcut', 'slides']) .describe('File type that need to be deleted. Options:file(Common file type),docx(Cloud document type of upgraded docs),bitable(Cloud document type of bitable),folder(Folder type),doc(Cloud document type of docs),sheet(Cloud document type of sheet),mindnote(Cloud document type of mindnote),shortcut(Shortcut type),slides(Cloud document type of slide)'), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe("File's or folder's token that needs to be moved.To learn how to get the file token, see .To learn how to get the folder token, see ") .optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileDeleteSubscribe = { project: 'drive', name: 'drive.v1.file.deleteSubscribe', sdkName: 'drive.v1.file.deleteSubscribe', path: '/open-apis/drive/v1/files/:file_token/delete_subscribe', httpMethod: 'DELETE', description: '[Feishu/Lark]-Docs-Space-Event-Unsubscribe Docs events-This interface is used to unsubscribe from notification events of cloud documents. To understand the configuration process and usage scenarios for event subscriptions, refer to . To learn about the types of events supported by cloud documents, refer to ', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'bitable', 'file', 'folder', 'slides']) .describe('Document type Options:doc(Depracated version of document),docx(Upgraded Docs),sheet(Spreadsheet),bitable(Bitable),file(File),folder(Folder),slides(Slides)'), event_type: zod_1.z .string() .describe('Event type, required when subscribing to the folder type and required to be `file.created_in_folder_v1`') .optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('Document token. For details, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileGetSubscribe = { project: 'drive', name: 'drive.v1.file.getSubscribe', sdkName: 'drive.v1.file.getSubscribe', path: '/open-apis/drive/v1/files/:file_token/get_subscribe', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Space-Event-Get Docs events subscription status-This interface is used to query the subscription status of cloud documents. To understand the configuration process and usage scenarios for event subscriptions, refer to . To learn about the types of events supported by cloud documents, refer to ', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'bitable', 'file', 'folder', 'slides']) .describe('Document type Options:doc(Depracated version of document),docx(Upgraded Docs),sheet(Spreadsheet),bitable(Bitable),file(File),folder(Folder),slides(Slides)'), event_type: zod_1.z .string() .describe('Event type, required when subscribing to the folder type and required to be `file.created_in_folder_v1`') .optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('Document token. For details, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileList = { project: 'drive', name: 'drive.v1.file.list', sdkName: 'drive.v1.file.list', path: '/open-apis/drive/v1/files', httpMethod: 'GET', description: "[Feishu/Lark]-Docs-Space-Folder-List items in folder-Get the list of files under the specified folder in the user's cloud space. List item types include files, various online documents (doc, sheet, bitable, mindnote), and folders", accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), folder_token: zod_1.z .string() .describe("Folder's token. (If this parameter is not provided or an empty string is provided, then return the list of the user's cloud space)") .optional(), order_by: zod_1.z .enum(['EditedTime', 'CreatedTime']) .describe('Options:EditedTime(Order by edited time),CreatedTime(Order by created time)') .optional(), direction: zod_1.z.enum(['ASC', 'DESC']).describe('Options:ASC(Ascending order),DESC(Descending order)').optional(), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileMove = { project: 'drive', name: 'drive.v1.file.move', sdkName: 'drive.v1.file.move', path: '/open-apis/drive/v1/files/:file_token/move', httpMethod: 'POST', description: "[Feishu/Lark]-Docs-Space-File-Move a file or folder-Move a file or folder to a different location in the user's Space", accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ type: zod_1.z .enum(['file', 'docx', 'bitable', 'doc', 'sheet', 'mindnote', 'folder', 'slides']) .describe('File type. If the value is empty or does not match the actual file type, the interface will return failure. Options:file(Common file type),docx(Cloud document type of upgraded docs),bitable(Cloud document type of bitable),doc(Cloud document type of docs),sheet(Cloud document type of sheet),mindnote(Cloud document type of mindnote),folder(Folder type),slides(Cloud document type of slide)') .optional(), folder_token: zod_1.z .string() .describe('Target folder token. To learn how to get the folder token, see ') .optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe("File's or folder's token that needs to be moved.To learn how to get the file token, see .To learn how to get the folder token, see "), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileStatisticsGet = { project: 'drive', name: 'drive.v1.fileStatistics.get', sdkName: 'drive.v1.fileStatistics.get', path: '/open-apis/drive/v1/files/:file_token/statistics', httpMethod: 'GET', description: "[Feishu/Lark]-Docs-Space-File-Obtain file's statistics-This API is used to obtain file's statistics, including the number of unique visitors (UVs), the number of page views (PVs), and the number of likes", accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'sheet', 'mindnote', 'bitable', 'wiki', 'file', 'docx']) .describe('File type Options:doc(Docs),sheet(Sheet),mindnote(MindNotes),bitable(Bitable),wiki(Wiki),file(File),docx(Upgraded Docs)'), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('File token. For details, see ') .optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileSubscribe = { project: 'drive', name: 'drive.v1.file.subscribe', sdkName: 'drive.v1.file.subscribe', path: '/open-apis/drive/v1/files/:file_token/subscribe', httpMethod: 'POST', description: '[Feishu/Lark]-Docs-Space-Event-Subscribe Docs events-This interface is used to subscribe to various notification events of cloud documents. To understand the configuration process and usage scenarios for event subscriptions, refer to . To learn about the types of events supported by cloud documents, refer to ', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'bitable', 'file', 'folder', 'slides']) .describe('Document type Options:doc(Depracated version of document.),docx(Upgraded Docs),sheet(Spreadsheet),bitable(Bitable),file(File),folder(Folder),slides(Slides)'), event_type: zod_1.z .string() .describe('Event type, required when subscribing to the folder type and required to be `file.created_in_folder_v1`') .optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('Document token. For details, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileSubscriptionCreate = { project: 'drive', name: 'drive.v1.fileSubscription.create', sdkName: 'drive.v1.fileSubscription.create', path: '/open-apis/drive/v1/files/:file_token/subscriptions', httpMethod: 'POST', description: '[Feishu/Lark]-Docs-Docs Assistant-Subscription-Create Subscription-Subscribe to change events in the document, currently supporting document comment subscriptions', accessTokens: ['user'], schema: { data: zod_1.z.object({ subscription_id: zod_1.z.string().describe('subsription id').optional(), subscription_type: zod_1.z .literal('comment_update') .describe('subscription type Options:comment_update(subscribe comment)'), is_subcribe: zod_1.z.boolean().describe('Whether to subscribe').optional(), file_type: zod_1.z .enum(['doc', 'docx', 'wiki']) .describe('document type Options:doc(Doc),docx(Upgraded Docs),wiki(Wiki)'), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('file token') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileSubscriptionGet = { project: 'drive', name: 'drive.v1.fileSubscription.get', sdkName: 'drive.v1.fileSubscription.get', path: '/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Docs Assistant-Subscription-Get subscription status-Get the status of the subscription based on the subscription ID', accessTokens: ['user'], schema: { data: zod_1.z.object({ file_type: zod_1.z.enum(['doc', 'docx', 'wiki']).describe('file type Options:doc(Docs),docx(Upgraded Docs),wiki(Wiki)'), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('file token').optional(), subscription_id: zod_1.z.string().describe('Subscription ID').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileSubscriptionPatch = { project: 'drive', name: 'drive.v1.fileSubscription.patch', sdkName: 'drive.v1.fileSubscription.patch', path: '/open-apis/drive/v1/files/:file_token/subscriptions/:subscription_id', httpMethod: 'PATCH', description: '[Feishu/Lark]-Docs-Docs Assistant-Subscription-update subscription status-Update subscription status based on subscription ID', accessTokens: ['user'], schema: { data: zod_1.z.object({ is_subscribe: zod_1.z.boolean().describe('Whether to subscribe'), file_type: zod_1.z.enum(['doc', 'docx', 'wiki']).describe('file type Options:doc(Doc),docx(Upgraded Docs),wiki(Wiki)'), }), path: zod_1.z.object({ file_token: zod_1.z.string().describe('File token').optional(), subscription_id: zod_1.z.string().describe('Subscription ID').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileTaskCheck = { project: 'drive', name: 'drive.v1.file.taskCheck', sdkName: 'drive.v1.file.taskCheck', path: '/open-apis/drive/v1/files/task_check', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Space-Folder-Query Task Status-Query the status information of asynchronous tasks. Currently supports moving and deleting folder tasks', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ task_id: zod_1.z .string() .describe('File-related asynchronous `task_id`. See or to get the `task_id`'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileUploadFinish = { project: 'drive', name: 'drive.v1.file.uploadFinish', sdkName: 'drive.v1.file.uploadFinish', path: '/open-apis/drive/v1/files/upload_finish', httpMethod: 'POST', description: '[Feishu/Lark]-File-Upload files-Multipart Upload-Upload a file in blocks-Completing-Completes an upload task', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ upload_id: zod_1.z .string() .describe('ID of the block upload transaction. You can call the to get the upload ID'), block_num: zod_1.z .number() .describe('Number of blocks. You can call the to get the number of blocks'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileUploadPrepare = { project: 'drive', name: 'drive.v1.file.uploadPrepare', sdkName: 'drive.v1.file.uploadPrepare', path: '/open-apis/drive/v1/files/upload_prepare', httpMethod: 'POST', description: '[Feishu/Lark]-File-Upload files-Multipart Upload-Upload a file in blocks-Pre­uploading-Send an initialization request to obtain the upload ID and split strategy, preparing for . The platform consistently chunks files into 4MB segments. To understand the complete file upload process, refer to ', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ file_name: zod_1.z.string().describe('File name'), parent_type: zod_1.z .literal('explorer') .describe('Type of the upload point. Fixed as "explorer", which means to upload files into the cloud space. Options:explorer(My Space.)'), parent_node: zod_1.z .string() .describe('Token of the folder. For details, see '), size: zod_1.z.number().describe('File size. The units are in bytes'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileVersionCreate = { project: 'drive', name: 'drive.v1.fileVersion.create', sdkName: 'drive.v1.fileVersion.create', path: '/open-apis/drive/v1/files/:file_token/versions', httpMethod: 'POST', description: '[Feishu/Lark]-Docs-Space-Document Version-Create document version-Create a document version based on the existing document. The document supports Feishu document and spreadsheet. This interface is asynchronous', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ name: zod_1.z .string() .describe('The title of the new version of the document. The maximum length is 1024 Unicode code points. Generally, one English or Chinese character corresponds to one code point, but some special symbols may correspond to multiple code points. For example, the family combo "👨‍👩‍👧" this emoji corresponds to 5 code points.**Note**:This parameter is required, please ignore the "No" displayed in the required column on the left') .optional(), obj_type: zod_1.z .enum(['docx', 'sheet']) .describe('Document version type. **Note**:This parameter is required, please ignore the "No" displayed in the required column on the left. Options:docx(Upgraded Docs),sheet(Spreadsheet)') .optional(), }), params: zod_1.z.object({ user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional() }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('Document token. For how to get the document token, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileVersionDelete = { project: 'drive', name: 'drive.v1.fileVersion.delete', sdkName: 'drive.v1.fileVersion.delete', path: '/open-apis/drive/v1/files/:file_token/versions/:version_id', httpMethod: 'DELETE', description: '[Feishu/Lark]-Docs-Space-Document Version-Delete document version-Delete document version. The document supports Feishu document and spreadsheet', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ obj_type: zod_1.z .enum(['docx', 'sheet']) .describe('document version type Options:docx(Upgraded Docs),sheet(Spreadsheet)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('Document token. For how to get the document token, see '), version_id: zod_1.z.string().describe('document version ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileVersionGet = { project: 'drive', name: 'drive.v1.fileVersion.get', sdkName: 'drive.v1.fileVersion.get', path: '/open-apis/drive/v1/files/:file_token/versions/:version_id', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Space-Document Version-Get document version-Get document version. The document can be Feishu document or spreadsheet. The version information includes the version title, version ID, version creator, create time, and more', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ obj_type: zod_1.z .enum(['docx', 'sheet']) .describe('document version type Options:docx(Upgraded Docs),sheet(Spreadsheet)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('document token. For how to get the document token, see '), version_id: zod_1.z.string().describe('document version ID'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileVersionList = { project: 'drive', name: 'drive.v1.fileVersion.list', sdkName: 'drive.v1.fileVersion.list', path: '/open-apis/drive/v1/files/:file_token/versions', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Space-Document Version-List document version-Get all versions of the document. The document can be Feishu document or spreadsheet', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), obj_type: zod_1.z.enum(['docx', 'sheet']).describe('document type Options:docx(Upgraded Docs),sheet(Spreadsheet)'), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('parent document token. For how to get the document token. see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1FileViewRecordList = { project: 'drive', name: 'drive.v1.fileViewRecord.list', sdkName: 'drive.v1.fileViewRecord.list', path: '/open-apis/drive/v1/files/:file_token/view_records', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Space-File-Obtain document view records-Obtain the view records of files, including document, sheet, base, wiki, and more. The view records contains the ID, profile, and last view time of the viewers', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().describe('Page size'), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), file_type: zod_1.z .enum(['doc', 'docx', 'sheet', 'bitable', 'mindnote', 'wiki', 'file']) .describe('File type Options:doc(Doc),docx(Upgraded Docs),sheet(Sheet),bitable(Bitable),mindnote(Mindnote),wiki(Wiki),file(File)'), viewer_id_type: zod_1.z .enum(['user_id', 'union_id', 'open_id']) .describe('Type of viewer ID used in this call**When the value is `user_id`, the following field scopes are required**:<md-perm name="contact:user.employee_id:readonly" desc="Obtain user ID" support_app_types="custom" tags="">Obtain user ID</md-perm> Options:user_id(Identifies a user to a tenant. The same user has different User IDs in different tenants. In one single tenant, a user has the same User ID in all apps (including store apps). User ID is usually used to communicate user data between different apps.),union_id(Identifies a user to a tenant that acts as a developer. A user has the same Union ID in apps developed by the same developer, and has different Union IDs in apps developed by different developers. A developer can use Union ID to link the same user\'s identities in multiple apps.),open_id(Identifies a user to an app. The same user has different Open IDs in different apps.)') .optional(), }), path: zod_1.z.object({ file_token: zod_1.z .string() .describe('File token. For how to get tokens, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV1ImportTaskCreate = { project: 'drive', name: 'drive.v1.importTask.create', sdkName: 'drive.v1.importTask.create', path: '/open-apis/drive/v1/import_tasks', httpMethod: 'POST', description: '[Feishu/Lark]-Space-File-Import files-Create an import task-This interface is used to create a task for importing a file and return the import task ID. Importing files involves transferring local files such as Word, TXT, Markdown, Excel, etc., into various cloud document formats such as online documents, spreadsheets, base, etc., and storing them in a specified directory in the cloud. This interface is asynchronous, you need to continue to call the interface to get the result of the import. For details, refer to ', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ file_extension: zod_1.z .string() .describe('The extension of the file to be imported. To learn about supported file formats, refer to .**Note**: The file extensions filled in here need to be strictly consistent with the suffixes of the actual files. Please be careful to distinguish Markdown files with suffixes ‘markdown’, ‘md’, ‘mark’, and keep the suffixes consistent when you fill in the relevant parameters. Otherwise, an error code 1069910 will be returned. Otherwise, 1069910 error code will be returned'), file_token: zod_1.z .string() .describe('To import a file token, you need to call the or to get the token of the source file before creating an import task. To learn more, refer to '), type: zod_1.z .string() .describe('Target cloud