lokalise-mcp
Version:
The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.
64 lines (63 loc) • 3.37 kB
TypeScript
import type { ControllerResponse } from "../../shared/types/common.types.js";
import type { CreateCommentsToolArgsType, DeleteCommentToolArgsType, GetCommentToolArgsType, ListKeyCommentsToolArgsType, ListProjectCommentsToolArgsType } from "./comments.types.js";
/**
* @namespace CommentsController
* @description Controller responsible for handling Lokalise Comments API operations.
* Comments are attached to translation keys and allow team collaboration.
*/
/**
* @function listKeyComments
* @description Fetches a list of comments for a specific key.
* @memberof CommentsController
* @param {ListKeyCommentsToolArgsType} args - Arguments containing project ID, key ID, and pagination options
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted comments list in Markdown.
* @throws {McpError} Throws an McpError if the service call fails.
*/
declare function listKeyComments(args: ListKeyCommentsToolArgsType): Promise<ControllerResponse>;
/**
* @function listProjectComments
* @description Fetches all comments across a project.
* @memberof CommentsController
* @param {ListProjectCommentsToolArgsType} args - Arguments containing project ID and pagination options
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted comments list in Markdown.
* @throws {McpError} Throws an McpError if the service call fails.
*/
declare function listProjectComments(args: ListProjectCommentsToolArgsType): Promise<ControllerResponse>;
/**
* @function getComment
* @description Fetches details of a specific comment.
* @memberof CommentsController
* @param {GetCommentToolArgsType} args - Arguments containing project ID, key ID, and comment ID
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted comment details.
* @throws {McpError} Throws an McpError if the service call fails.
*/
declare function getComment(args: GetCommentToolArgsType): Promise<ControllerResponse>;
/**
* @function createComments
* @description Creates one or more comments on a key.
* @memberof CommentsController
* @param {CreateCommentsToolArgsType} args - Arguments containing project ID, key ID, and comment data
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted result.
* @throws {McpError} Throws an McpError if the service call fails.
*/
declare function createComments(args: CreateCommentsToolArgsType): Promise<ControllerResponse>;
/**
* @function deleteComment
* @description Deletes a comment from a key.
* @memberof CommentsController
* @param {DeleteCommentToolArgsType} args - Arguments containing project ID, key ID, and comment ID
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted deletion result.
* @throws {McpError} Throws an McpError if the service call fails.
*/
declare function deleteComment(args: DeleteCommentToolArgsType): Promise<ControllerResponse>;
/**
* Export the controller functions
*/
declare const commentsController: {
listKeyComments: typeof listKeyComments;
listProjectComments: typeof listProjectComments;
getComment: typeof getComment;
createComments: typeof createComments;
deleteComment: typeof deleteComment;
};
export default commentsController;