lokalise-mcp
Version:
The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.
65 lines (64 loc) • 3.57 kB
TypeScript
import type { ControllerResponse } from "../../shared/types/common.types.js";
import type { CreateGlossaryToolArgsType, DeleteGlossaryToolArgsType, GetGlossaryToolArgsType, ListGlossaryToolArgsType, UpdateGlossaryToolArgsType } from "./glossary.types.js";
/**
* @namespace GlossaryController
* @description Controller responsible for handling Lokalise Glossary Terms API operations.
* It orchestrates calls to the glossary service, manages cursor pagination,
* handles bulk operations, and formats the response using the formatter.
*/
/**
* @function listGlossaryTerms
* @description Fetches a list of glossary terms from a Lokalise project using cursor pagination.
* @memberof GlossaryController
* @param {ListGlossaryToolArgsType} args - Arguments containing project ID and pagination options
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted glossary terms list.
* @throws {McpError} Throws an McpError if validation fails or service call fails.
*/
declare function listGlossaryTerms(args: ListGlossaryToolArgsType): Promise<ControllerResponse>;
/**
* @function getGlossaryTerm
* @description Fetches details of a specific glossary term.
* @memberof GlossaryController
* @param {GetGlossaryToolArgsType} args - Arguments containing project ID and term ID
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted term details.
* @throws {McpError} Throws an McpError if validation fails or service call fails.
*/
declare function getGlossaryTerm(args: GetGlossaryToolArgsType): Promise<ControllerResponse>;
/**
* @function createGlossaryTerms
* @description Creates one or more glossary terms in a project (bulk operation).
* @memberof GlossaryController
* @param {CreateGlossaryToolArgsType} args - Arguments containing project ID and terms data
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted result.
* @throws {McpError} Throws an McpError if validation fails or service call fails.
*/
declare function createGlossaryTerms(args: CreateGlossaryToolArgsType): Promise<ControllerResponse>;
/**
* @function updateGlossaryTerms
* @description Updates one or more glossary terms in a project (bulk operation).
* @memberof GlossaryController
* @param {UpdateGlossaryToolArgsType} args - Arguments containing project ID and terms to update
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted update result.
* @throws {McpError} Throws an McpError if validation fails or service call fails.
*/
declare function updateGlossaryTerms(args: UpdateGlossaryToolArgsType): Promise<ControllerResponse>;
/**
* @function deleteGlossaryTerms
* @description Deletes one or more glossary terms from a project (bulk operation).
* @memberof GlossaryController
* @param {DeleteGlossaryToolArgsType} args - Arguments containing project ID and term IDs
* @returns {Promise<ControllerResponse>} A promise that resolves to the formatted deletion result.
* @throws {McpError} Throws an McpError if validation fails or service call fails.
*/
declare function deleteGlossaryTerms(args: DeleteGlossaryToolArgsType): Promise<ControllerResponse>;
/**
* Export the controller functions
*/
declare const glossaryController: {
listGlossaryTerms: typeof listGlossaryTerms;
getGlossaryTerm: typeof getGlossaryTerm;
createGlossaryTerms: typeof createGlossaryTerms;
updateGlossaryTerms: typeof updateGlossaryTerms;
deleteGlossaryTerms: typeof deleteGlossaryTerms;
};
export default glossaryController;