lokalise-mcp
Version:
The Lokalise MCP Server brings Lokalise's localization power to Claude and AI assistants—manage projects, keys, and translations by chat.
98 lines (97 loc) • 3.47 kB
TypeScript
import type { DownloadedFileProcessDetails, PaginatedResult, QueuedProcess, QueuedProcessDetails, UploadedFileProcessDetails } from "@lokalise/node-api";
import { z } from "zod";
/**
* Queued Processes domain type definitions and Zod schemas.
* Fully compliant with Lokalise Node.js SDK v9.0.0+
*
* Handles monitoring of background/async operations including:
* - File uploads
* - File downloads/exports
* - Project imports/exports
* - Bulk operations
*/
export type { QueuedProcess, QueuedProcessDetails, PaginatedResult, UploadedFileProcessDetails, DownloadedFileProcessDetails, };
/**
* Valid process status values from the SDK
*/
export declare const ProcessStatus: {
readonly QUEUED: "queued";
readonly PROCESSING: "processing";
readonly FINISHED: "finished";
readonly FAILED: "failed";
readonly CANCELLED: "cancelled";
};
export type ProcessStatusType = (typeof ProcessStatus)[keyof typeof ProcessStatus];
/**
* Valid process type values from the SDK
*/
export declare const ProcessType: {
readonly FILE_UPLOAD: "file-upload";
readonly FILE_DOWNLOAD: "file-download";
readonly PROJECT_EXPORT: "project-export";
readonly PROJECT_IMPORT: "project-import";
};
export type ProcessTypeValue = (typeof ProcessType)[keyof typeof ProcessType];
/**
* Zod schema for the list queued processes tool arguments.
* Validates input for listing background processes in a project.
*/
export declare const ListQueuedprocessesToolArgs: z.ZodObject<{
projectId: z.ZodString;
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, "strict", z.ZodTypeAny, {
page: number;
projectId: string;
limit: number;
}, {
projectId: string;
page?: number | undefined;
limit?: number | undefined;
}>;
export type ListQueuedprocessesToolArgsType = z.infer<typeof ListQueuedprocessesToolArgs>;
/**
* Zod schema for the get queued process details tool arguments.
* Validates input for retrieving specific process information.
*/
export declare const GetQueuedprocessesToolArgs: z.ZodObject<{
projectId: z.ZodString;
processId: z.ZodString;
}, "strict", z.ZodTypeAny, {
projectId: string;
processId: string;
}, {
projectId: string;
processId: string;
}>;
export type GetQueuedprocessesToolArgsType = z.infer<typeof GetQueuedprocessesToolArgs>;
/**
* Type guard to check if process details are for an upload
*/
export declare function isUploadProcessDetails(details: QueuedProcessDetails | undefined | Record<string, unknown>): details is UploadedFileProcessDetails;
/**
* Type guard to check if process details are for a download
*/
export declare function isDownloadProcessDetails(details: QueuedProcessDetails | undefined | Record<string, unknown>): details is DownloadedFileProcessDetails;
/**
* Type guard to check if a status is valid
*/
export declare function isValidProcessStatus(status: string): status is ProcessStatusType;
/**
* Type guard to check if a type is valid
*/
export declare function isValidProcessType(type: string): type is ProcessTypeValue;
/**
* Response type for controller methods
*/
export interface QueuedProcessesControllerResponse {
content: string;
data?: QueuedProcess | PaginatedResult<QueuedProcess>;
metadata?: {
total?: number;
page?: number;
hasMore?: boolean;
processType?: ProcessTypeValue;
processStatus?: ProcessStatusType;
};
}