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.

72 lines (71 loc) • 4.53 kB
import type { ControllerResponse } from "../../shared/types/common.types.js"; import type { AddProjectLanguagesToolArgsType, GetLanguageToolArgsType, ListProjectLanguagesToolArgsType, ListSystemLanguagesToolArgsType, RemoveLanguageToolArgsType, UpdateLanguageToolArgsType } from "./languages.types.js"; /** * @namespace LanguagesController * @description Controller responsible for handling Lokalise Languages API operations. * It orchestrates calls to the languages service, applies defaults, * maps options, and formats the response using the formatter. */ /** * @function listSystemLanguages * @description Fetches a list of system languages from Lokalise. * @memberof LanguagesController * @param {ListSystemLanguagesToolArgsType} args - Arguments containing pagination options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted system languages list in Markdown. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function listSystemLanguages(args?: ListSystemLanguagesToolArgsType): Promise<ControllerResponse>; /** * @function listProjectLanguages * @description Lists all languages in a specific Lokalise project. * @memberof LanguagesController * @param {ListProjectLanguagesToolArgsType} args - Arguments containing project and language options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted languages list in Markdown. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function listProjectLanguages(args: ListProjectLanguagesToolArgsType): Promise<ControllerResponse>; /** * @function addProjectLanguages * @description Adds languages to a Lokalise project. * @memberof LanguagesController * @param {AddProjectLanguagesToolArgsType} args - Arguments containing project and languages data * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted addition result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function addProjectLanguages(args: AddProjectLanguagesToolArgsType): Promise<ControllerResponse>; /** * @function getLanguage * @description Gets detailed information about a specific language. * @memberof LanguagesController * @param {GetLanguageToolArgsType} args - Arguments containing language details options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted language details. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function getLanguage(args: GetLanguageToolArgsType): Promise<ControllerResponse>; /** * @function updateLanguage * @description Updates an existing language. * @memberof LanguagesController * @param {UpdateLanguageToolArgsType} args - Arguments containing language update options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted update result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function updateLanguage(args: UpdateLanguageToolArgsType): Promise<ControllerResponse>; /** * @function removeLanguage * @description Removes a language from a Lokalise project. * @memberof LanguagesController * @param {RemoveLanguageToolArgsType} args - Arguments containing language removal options * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted removal result. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function removeLanguage(args: RemoveLanguageToolArgsType): Promise<ControllerResponse>; declare const _default: { listSystemLanguages: typeof listSystemLanguages; listProjectLanguages: typeof listProjectLanguages; addProjectLanguages: typeof addProjectLanguages; getLanguage: typeof getLanguage; updateLanguage: typeof updateLanguage; removeLanguage: typeof removeLanguage; }; export default _default;