UNPKG

@larksuiteoapi/lark-mcp

Version:
116 lines (115 loc) 8.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.driveV2Tools = exports.driveV2PermissionPublicPatch = exports.driveV2PermissionPublicGet = exports.driveV2FileLikeList = void 0; const zod_1 = require("zod"); exports.driveV2FileLikeList = { project: 'drive', name: 'drive.v2.fileLike.list', sdkName: 'drive.v2.fileLike.list', path: '/open-apis/drive/v2/files/:file_token/likes', httpMethod: 'GET', description: "[Feishu/Lark]-Docs-Space-Like-List Document's Likes-Get the list of likes for the specified document and returns by like time from near to far. This API supports paging", accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ file_type: zod_1.z .enum(['doc', 'docx', 'file']) .describe('Document type, the API will return a failure if the value is empty or does not match the actual type of the document. Options:doc(Docs),docx(Upgraded Docs),file(File)'), page_size: zod_1.z.number().describe('paging size').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(), 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('The document token specified to query the like list. '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV2PermissionPublicGet = { project: 'drive', name: 'drive.v2.permissionPublic.get', sdkName: 'drive.v2.permissionPublic.get', path: '/open-apis/drive/v2/permissions/:token/public', httpMethod: 'GET', description: '[Feishu/Lark]-Docs-Permission-Setting v2-GetPermissionPublic-This interface is used to obtain permission settings for cloud documents according to filetoken', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ type: zod_1.z .enum(['doc', 'sheet', 'file', 'wiki', 'bitable', 'docx', 'mindnote', 'minutes', 'slides']) .describe('File type, which needs to match the token of the file Options:doc(Doc),sheet(Sheet),file(File in My Space),wiki(Wiki node),bitable(Bitable),docx(Upgraded Docs),mindnote(Mindnote),minutes(Minutes),slides(Slides)'), }), path: zod_1.z.object({ token: zod_1.z .string() .describe('Token of the file. For more information about how to obtain the token, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV2PermissionPublicPatch = { project: 'drive', name: 'drive.v2.permissionPublic.patch', sdkName: 'drive.v2.permissionPublic.patch', path: '/open-apis/drive/v2/permissions/:token/public', httpMethod: 'PATCH', description: '[Feishu/Lark]-Docs-Permission-Setting v2-UpdatePermissionPublic-This API is used to update the common settings of a document based on a filetoken', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ external_access_entity: zod_1.z .enum(['open', 'closed', 'allow_share_partner_tenant']) .describe("Allow content to be shared outside the organization Options:open(open),closed(close),allow_share_partner_tenant(AllowSharePartnerTenant Allow sharing with affiliated organizations(This value can only be set if the tenant's background setting allows only associated organizations to share))") .optional(), security_entity: zod_1.z .enum(['anyone_can_view', 'anyone_can_edit', 'only_full_access']) .describe('Who can create copies, print, download Options:anyone_can_view(AnyoneCanView Users with viewing permissions),anyone_can_edit(AnyoneCanEdit Users with editable permissions),only_full_access(OnlyFullAccess Users with manageable permissions (including me))') .optional(), comment_entity: zod_1.z .enum(['anyone_can_view', 'anyone_can_edit']) .describe('Who can comment Options:anyone_can_view(AnyoneCanView Users with viewing permissions),anyone_can_edit(AnyoneCanEdit Users with editable permissions)') .optional(), share_entity: zod_1.z .enum(['anyone', 'same_tenant']) .describe('Who can add and manage collaborators - organizational dimension Options:anyone(All users who can read or edit this document),same_tenant(SameTenant All users in your organization who can read or edit this document)') .optional(), manage_collaborator_entity: zod_1.z .enum(['collaborator_can_view', 'collaborator_can_edit', 'collaborator_full_access']) .describe('Who can add and manage collaborators - collaborator dimension Options:collaborator_can_view(CollaboratorCanView Collaborators with viewing permissions),collaborator_can_edit(CollaboratorCanEdit Collaborators with editable permissions),collaborator_full_access(CollaboratorFullAccess Collaborators with manageable permissions (including me))') .optional(), link_share_entity: zod_1.z .enum([ 'tenant_readable', 'tenant_editable', 'partner_tenant_readable', 'partner_tenant_editable', 'anyone_readable', 'anyone_editable', 'closed', ]) .describe('Link sharing settings Options:tenant_readable(TenantReadable People in the organization who get the link can read it),tenant_editable(TenantEditable People in the organization who get the link can edit),partner_tenant_readable(PartnerTenantReadable People from affiliated organizations can read(This value can only be set if the tenant\'s background setting allows only associated organizations to share)),partner_tenant_editable(PartnerTenantEditable People from affiliated organizations can edit(This value can only be set if the tenant\'s background setting allows only associated organizations to share)),anyone_readable(AnyoneReadable Anyone with a link on the Internet can read it (only external_access_entity = "open")),anyone_editable(AnyoneEditable Editable by anyone with a link on the internet (only external_access_entity = "open")),closed(Close link share)') .optional(), copy_entity: zod_1.z .enum(['anyone_can_view', 'anyone_can_edit', 'only_full_access']) .describe('Who can copy the content Options:anyone_can_view(AnyoneCanView Users with viewing permissions),anyone_can_edit(AnyoneCanEdit Users with editable permissions),only_full_access(OnlyFullAccess Collaborators with manageable permissions (including me))') .optional(), }), params: zod_1.z.object({ type: zod_1.z .enum(['doc', 'sheet', 'file', 'wiki', 'bitable', 'docx', 'mindnote', 'minutes', 'slides']) .describe('File type, which needs to match the token of the file Options:doc(Doc),sheet(Sheet),file(File in My Space),wiki(Wiki node),bitable(Bitable),docx(Upgraded Docs),mindnote(Mindnote),minutes(Minutes),slides(Slides)'), }), path: zod_1.z.object({ token: zod_1.z .string() .describe('Token of the file. For more information about how to obtain the token, see '), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.driveV2Tools = [exports.driveV2FileLikeList, exports.driveV2PermissionPublicGet, exports.driveV2PermissionPublicPatch];