lokalise-mcp
Version:
The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.
61 lines (60 loc) • 3.14 kB
TypeScript
import type { ControllerResponse } from "../../shared/types/common.types.js";
import type { CreateTaskToolArgsType, DeleteTaskToolArgsType, GetTaskToolArgsType, ListTasksToolArgsType, UpdateTaskToolArgsType } from "./tasks.types.js";
/**
* @namespace TasksController
* @description Controller responsible for handling Lokalise Tasks API operations.
* It orchestrates calls to the tasks service, applies defaults,
* maps options, and formats the response using the formatter.
*/
/**
* @function listTasks
* @description Fetches a list of tasks from a Lokalise project with optional filtering and pagination.
* @memberof TasksController
* @param {ListTasksToolArgsType} args - Arguments containing project ID, filters, and pagination options
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted tasks list in Markdown.
* @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error.
*/
declare function listTasks(args: ListTasksToolArgsType): Promise<ControllerResponse>;
/**
* @function createTask
* @description Creates a task in a Lokalise project
* @memberof TasksController
* @param {CreateTaskToolArgsType} args - Arguments containing project ID and task data
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the creation results.
*/
declare function createTask(args: CreateTaskToolArgsType): Promise<ControllerResponse>;
/**
* @function getTask
* @description Fetches a single task from a Lokalise project
* @memberof TasksController
* @param {GetTaskToolArgsType} args - Arguments containing project ID and task ID
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the task details.
*/
declare function getTask(args: GetTaskToolArgsType): Promise<ControllerResponse>;
/**
* @function updateTask
* @description Updates a single task in a Lokalise project
* @memberof TasksController
* @param {UpdateTaskToolArgsType} args - Arguments containing project ID, task ID and update data
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the updated task details.
*/
declare function updateTask(args: UpdateTaskToolArgsType): Promise<ControllerResponse>;
/**
* @function deleteTask
* @description Deletes a single task from a Lokalise project
* @memberof TasksController
* @param {DeleteTaskToolArgsType} args - Arguments containing project ID and task ID
* @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the deletion confirmation.
*/
declare function deleteTask(args: DeleteTaskToolArgsType): Promise<ControllerResponse>;
/**
* Export the controller functions
*/
declare const tasksController: {
listTasks: typeof listTasks;
createTask: typeof createTask;
getTask: typeof getTask;
updateTask: typeof updateTask;
deleteTask: typeof deleteTask;
};
export default tasksController;