UNPKG

lokalise-mcp

Version:

The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.

73 lines (72 loc) • 4.54 kB
import type { ControllerResponse } from "../../shared/types/common.types.js"; import type { CreateProjectToolArgsType, DeleteProjectToolArgsType, EmptyProjectToolArgsType, GetProjectDetailsToolArgsType, ListProjectsToolArgsType, UpdateProjectToolArgsType } from "./projects.types.js"; /** * @namespace ProjectsController * @description Controller responsible for handling Lokalise Projects API operations. * It orchestrates calls to the projects service, applies defaults, * maps options, and formats the response using the formatter. */ /** * @function listProjects * @description Fetches a list of Lokalise projects accessible with the current API token. * Handles pagination options and applies configuration defaults. * @memberof ProjectsController * @param {ListProjectsToolArgsType} args - Arguments containing pagination options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted projects list in Markdown. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function listProjects(args: ListProjectsToolArgsType): Promise<ControllerResponse>; /** * @function getProjectDetails * @description Gets detailed information about a specific Lokalise project. * @memberof ProjectsController * @param {GetProjectDetailsToolArgsType} args - Arguments containing project details options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted project details in Markdown. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function getProjectDetails(args: GetProjectDetailsToolArgsType): Promise<ControllerResponse>; /** * @function createProject * @description Creates a new Lokalise project with specified settings. * @memberof ProjectsController * @param {CreateProjectToolArgsType} args - Arguments containing project creation options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted project creation result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function createProject(args: CreateProjectToolArgsType): Promise<ControllerResponse>; /** * @function updateProject * @description Updates an existing Lokalise project. * @memberof ProjectsController * @param {UpdateProjectToolArgsType} args - Arguments containing project update options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted project update result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function updateProject(args: UpdateProjectToolArgsType): Promise<ControllerResponse>; /** * @function deleteProject * @description Deletes a Lokalise project. * @memberof ProjectsController * @param {DeleteProjectToolArgsType} args - Arguments containing project deletion options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted project deletion result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function deleteProject(args: DeleteProjectToolArgsType): Promise<ControllerResponse>; /** * @function emptyProject * @description Empties a Lokalise project (removes all keys and translations). * @memberof ProjectsController * @param {EmptyProjectToolArgsType} args - Arguments containing project empty options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted project empty result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function emptyProject(args: EmptyProjectToolArgsType): Promise<ControllerResponse>; declare const _default: { listProjects: typeof listProjects; getProjectDetails: typeof getProjectDetails; createProject: typeof createProject; updateProject: typeof updateProject; deleteProject: typeof deleteProject; emptyProject: typeof emptyProject; }; export default _default;