lokalise-mcp
Version:
The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.
391 lines (390 loc) • 12.1 kB
TypeScript
import type { BulkResult, CursorPaginatedResult, GlossaryTerm } from "@lokalise/node-api";
import { z } from "zod";
export interface CreateTermsParams {
terms: Array<{
term: string;
description: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: Array<{
langId?: number;
translation?: string;
description?: string;
}>;
tags?: string[];
}>;
}
export interface UpdateTermsParams {
terms: Array<{
id: number;
term?: string;
description?: string;
caseSensitive?: boolean;
translatable?: boolean;
forbidden?: boolean;
translations?: Array<{
langId?: number;
translation?: string;
description?: string;
}>;
tags?: string[];
}>;
}
export interface TermsDeleted {
deleted: {
count: number;
ids: number[];
};
failed: Array<{
count: number;
ids: number[];
message: string;
}>;
}
/**
* Glossary domain type definitions and Zod schemas.
* Generated on 2025-07-10 for Glossary terms management for consistent translations.
*/
/**
* Zod schema for glossary term translation.
*/
export declare const GlossaryTranslationSchema: z.ZodObject<{
langId: z.ZodNumber;
translation: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}>;
/**
* Zod schema for the list glossary terms tool arguments.
*/
export declare const ListGlossaryToolArgs: z.ZodObject<{
projectId: z.ZodString;
limit: z.ZodOptional<z.ZodNumber>;
cursor: z.ZodOptional<z.ZodString>;
}, "strict", z.ZodTypeAny, {
projectId: string;
cursor?: string | undefined;
limit?: number | undefined;
}, {
projectId: string;
cursor?: string | undefined;
limit?: number | undefined;
}>;
export type ListGlossaryToolArgsType = z.infer<typeof ListGlossaryToolArgs>;
/**
* Zod schema for the get glossary term details tool arguments.
*/
export declare const GetGlossaryToolArgs: z.ZodObject<{
projectId: z.ZodString;
termId: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
projectId: string;
termId: number;
}, {
projectId: string;
termId: number;
}>;
export type GetGlossaryToolArgsType = z.infer<typeof GetGlossaryToolArgs>;
/**
* Zod schema for creating a single glossary term.
*/
export declare const CreateGlossaryTermSchema: z.ZodObject<{
term: z.ZodString;
description: z.ZodString;
caseSensitive: z.ZodBoolean;
translatable: z.ZodBoolean;
forbidden: z.ZodBoolean;
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
langId: z.ZodNumber;
translation: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}>, "many">>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
term: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
}, {
description: string;
term: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
}>;
/**
* Zod schema for the create glossary terms tool arguments.
*/
export declare const CreateGlossaryToolArgs: z.ZodObject<{
projectId: z.ZodString;
terms: z.ZodArray<z.ZodObject<{
term: z.ZodString;
description: z.ZodString;
caseSensitive: z.ZodBoolean;
translatable: z.ZodBoolean;
forbidden: z.ZodBoolean;
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
langId: z.ZodNumber;
translation: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}>, "many">>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
term: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
}, {
description: string;
term: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
}>, "many">;
}, "strict", z.ZodTypeAny, {
projectId: string;
terms: {
description: string;
term: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
}[];
}, {
projectId: string;
terms: {
description: string;
term: string;
caseSensitive: boolean;
translatable: boolean;
forbidden: boolean;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
}[];
}>;
export type CreateGlossaryToolArgsType = z.infer<typeof CreateGlossaryToolArgs>;
/**
* Zod schema for updating a glossary term.
*/
export declare const UpdateGlossaryTermSchema: z.ZodObject<{
id: z.ZodNumber;
term: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
caseSensitive: z.ZodOptional<z.ZodBoolean>;
translatable: z.ZodOptional<z.ZodBoolean>;
forbidden: z.ZodOptional<z.ZodBoolean>;
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
langId: z.ZodNumber;
translation: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}>, "many">>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
id: number;
description?: string | undefined;
term?: string | undefined;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
caseSensitive?: boolean | undefined;
translatable?: boolean | undefined;
forbidden?: boolean | undefined;
}, {
id: number;
description?: string | undefined;
term?: string | undefined;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
caseSensitive?: boolean | undefined;
translatable?: boolean | undefined;
forbidden?: boolean | undefined;
}>;
/**
* Zod schema for the update glossary terms tool arguments.
*/
export declare const UpdateGlossaryToolArgs: z.ZodObject<{
projectId: z.ZodString;
terms: z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
term: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
caseSensitive: z.ZodOptional<z.ZodBoolean>;
translatable: z.ZodOptional<z.ZodBoolean>;
forbidden: z.ZodOptional<z.ZodBoolean>;
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
langId: z.ZodNumber;
translation: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}, {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}>, "many">>;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
id: number;
description?: string | undefined;
term?: string | undefined;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
caseSensitive?: boolean | undefined;
translatable?: boolean | undefined;
forbidden?: boolean | undefined;
}, {
id: number;
description?: string | undefined;
term?: string | undefined;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
caseSensitive?: boolean | undefined;
translatable?: boolean | undefined;
forbidden?: boolean | undefined;
}>, "many">;
}, "strict", z.ZodTypeAny, {
projectId: string;
terms: {
id: number;
description?: string | undefined;
term?: string | undefined;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
caseSensitive?: boolean | undefined;
translatable?: boolean | undefined;
forbidden?: boolean | undefined;
}[];
}, {
projectId: string;
terms: {
id: number;
description?: string | undefined;
term?: string | undefined;
translations?: {
langId: number;
description?: string | undefined;
translation?: string | undefined;
}[] | undefined;
tags?: string[] | undefined;
caseSensitive?: boolean | undefined;
translatable?: boolean | undefined;
forbidden?: boolean | undefined;
}[];
}>;
export type UpdateGlossaryToolArgsType = z.infer<typeof UpdateGlossaryToolArgs>;
/**
* Zod schema for the delete glossary terms tool arguments.
*/
export declare const DeleteGlossaryToolArgs: z.ZodObject<{
projectId: z.ZodString;
termIds: z.ZodArray<z.ZodNumber, "many">;
}, "strict", z.ZodTypeAny, {
projectId: string;
termIds: number[];
}, {
projectId: string;
termIds: number[];
}>;
export type DeleteGlossaryToolArgsType = z.infer<typeof DeleteGlossaryToolArgs>;
export type { GlossaryTerm, BulkResult, CursorPaginatedResult };
/**
* Type for glossary term with full details including translations.
*/
export interface GlossaryTermWithTranslations extends GlossaryTerm {
translations: Array<{
langId: number;
langName: string;
langIso: string;
translation: string;
description: string;
}>;
}