lokalise-mcp
Version:
The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.
207 lines (206 loc) • 7.41 kB
TypeScript
import type { CursorPaginatedResult, Translation, TranslationStatus } from "@lokalise/node-api";
import { z } from "zod";
/**
* Translations domain type definitions and Zod schemas.
* Generated on 2025-07-08 for Translation content management.
*/
/**
* Zod schema for the list translations tool arguments.
* Translations use cursor pagination, not standard pagination.
*/
export declare const ListTranslationsToolArgs: z.ZodObject<{
projectId: z.ZodString;
limit: z.ZodOptional<z.ZodNumber>;
cursor: z.ZodOptional<z.ZodString>;
filterLangId: z.ZodOptional<z.ZodNumber>;
filterIsReviewed: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
filterUnverified: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
filterUntranslated: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
filterQaIssues: z.ZodOptional<z.ZodString>;
filterActiveTaskId: z.ZodOptional<z.ZodNumber>;
disableReferences: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
}, "strict", z.ZodTypeAny, {
projectId: string;
cursor?: string | undefined;
limit?: number | undefined;
filterLangId?: number | undefined;
filterIsReviewed?: "1" | "0" | undefined;
filterUnverified?: "1" | "0" | undefined;
filterUntranslated?: "1" | "0" | undefined;
filterQaIssues?: string | undefined;
filterActiveTaskId?: number | undefined;
disableReferences?: "1" | "0" | undefined;
}, {
projectId: string;
cursor?: string | undefined;
limit?: number | undefined;
filterLangId?: number | undefined;
filterIsReviewed?: "1" | "0" | undefined;
filterUnverified?: "1" | "0" | undefined;
filterUntranslated?: "1" | "0" | undefined;
filterQaIssues?: string | undefined;
filterActiveTaskId?: number | undefined;
disableReferences?: "1" | "0" | undefined;
}>;
export type ListTranslationsToolArgsType = z.infer<typeof ListTranslationsToolArgs>;
/**
* Zod schema for the get translation details tool arguments.
*/
export declare const GetTranslationToolArgs: z.ZodObject<{
projectId: z.ZodString;
translationId: z.ZodNumber;
disableReferences: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
}, "strict", z.ZodTypeAny, {
projectId: string;
translationId: number;
disableReferences?: "1" | "0" | undefined;
}, {
projectId: string;
translationId: number;
disableReferences?: "1" | "0" | undefined;
}>;
export type GetTranslationToolArgsType = z.infer<typeof GetTranslationToolArgs>;
/**
* Zod schema for the update translation tool arguments.
*/
export declare const UpdateTranslationToolArgs: z.ZodObject<{
projectId: z.ZodString;
translationId: z.ZodNumber;
translationData: z.ZodObject<{
translation: z.ZodString;
isReviewed: z.ZodOptional<z.ZodBoolean>;
isUnverified: z.ZodOptional<z.ZodBoolean>;
customTranslationStatusIds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
}, "strip", z.ZodTypeAny, {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
}, {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
}>;
}, "strict", z.ZodTypeAny, {
projectId: string;
translationId: number;
translationData: {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
};
}, {
projectId: string;
translationId: number;
translationData: {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
};
}>;
export type UpdateTranslationToolArgsType = z.infer<typeof UpdateTranslationToolArgs>;
/**
* Custom status for translations to display in formatter
*/
export interface TranslationCustomStatus {
id: number;
title: string;
color: string;
}
/**
* Export SDK types for use in other files
*/
export type { Translation, TranslationStatus, CursorPaginatedResult };
/**
* Helper schema for validating QA issue types
*/
export declare const QaIssueTypes: z.ZodEnum<["spelling_and_grammar", "inconsistent_placeholders", "inconsistent_html", "whitespace_issues", "missing_translation", "unreliable_translation", "unbalanced_brackets", "double_space", "special_character", "unverified", "glossary_term_violation"]>;
export type QaIssueType = z.infer<typeof QaIssueTypes>;
/**
* Zod schema for bulk update translations tool arguments.
* Allows updating multiple translations in a single operation.
*/
export declare const BulkUpdateTranslationsToolArgs: z.ZodObject<{
projectId: z.ZodString;
updates: z.ZodArray<z.ZodObject<{
translationId: z.ZodNumber;
translationData: z.ZodObject<{
translation: z.ZodString;
isReviewed: z.ZodOptional<z.ZodBoolean>;
isUnverified: z.ZodOptional<z.ZodBoolean>;
customTranslationStatusIds: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
}, "strip", z.ZodTypeAny, {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
}, {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
}>;
}, "strip", z.ZodTypeAny, {
translationId: number;
translationData: {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
};
}, {
translationId: number;
translationData: {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
};
}>, "many">;
}, "strict", z.ZodTypeAny, {
projectId: string;
updates: {
translationId: number;
translationData: {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
};
}[];
}, {
projectId: string;
updates: {
translationId: number;
translationData: {
translation: string;
isReviewed?: boolean | undefined;
isUnverified?: boolean | undefined;
customTranslationStatusIds?: number[] | undefined;
};
}[];
}>;
export type BulkUpdateTranslationsToolArgsType = z.infer<typeof BulkUpdateTranslationsToolArgs>;
/**
* Result for a single translation update in bulk operation
*/
export interface BulkUpdateTranslationResult {
translationId: number;
success: boolean;
translation?: Translation;
error?: string;
attempts: number;
}
/**
* Summary result for bulk update operation
*/
export interface BulkUpdateTranslationsSummary {
totalRequested: number;
successCount: number;
failureCount: number;
results: BulkUpdateTranslationResult[];
duration: number;
}