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.

153 lines (152 loc) • 4.28 kB
import type { Comment, CommentData, CommentDeleted, KeyProjectPagination, PaginatedResult, ProjectAndKey, ProjectWithPagination } from "@lokalise/node-api"; import { z } from "zod"; /** * Comments domain type definitions and Zod schemas. * Comments are attached to translation keys and allow team collaboration. */ /** * Zod schema for listing comments on a specific key. * Requires both project ID and key ID. */ export declare const ListKeyCommentsToolArgs: z.ZodObject<{ projectId: z.ZodString; keyId: z.ZodNumber; limit: z.ZodOptional<z.ZodNumber>; page: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { keyId: number; projectId: string; page?: number | undefined; limit?: number | undefined; }, { keyId: number; projectId: string; page?: number | undefined; limit?: number | undefined; }>; export type ListKeyCommentsToolArgsType = z.infer<typeof ListKeyCommentsToolArgs>; /** * Zod schema for listing all comments across a project. * Requires only project ID. */ export declare const ListProjectCommentsToolArgs: z.ZodObject<{ projectId: z.ZodString; limit: z.ZodOptional<z.ZodNumber>; page: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { projectId: string; page?: number | undefined; limit?: number | undefined; }, { projectId: string; page?: number | undefined; limit?: number | undefined; }>; export type ListProjectCommentsToolArgsType = z.infer<typeof ListProjectCommentsToolArgs>; /** * Zod schema for getting a single comment. * Requires project ID, key ID, and comment ID. */ export declare const GetCommentToolArgs: z.ZodObject<{ projectId: z.ZodString; keyId: z.ZodNumber; commentId: z.ZodNumber; }, "strict", z.ZodTypeAny, { keyId: number; projectId: string; commentId: number; }, { keyId: number; projectId: string; commentId: number; }>; export type GetCommentToolArgsType = z.infer<typeof GetCommentToolArgs>; /** * Zod schema for a single comment creation. */ export declare const CommentDataSchema: z.ZodObject<{ comment: z.ZodString; }, "strict", z.ZodTypeAny, { comment: string; }, { comment: string; }>; /** * Zod schema for creating comments. * Supports bulk creation by accepting an array of comments. * Requires project ID and key ID. */ export declare const CreateCommentsToolArgs: z.ZodObject<{ projectId: z.ZodString; keyId: z.ZodNumber; comments: z.ZodArray<z.ZodObject<{ comment: z.ZodString; }, "strict", z.ZodTypeAny, { comment: string; }, { comment: string; }>, "many">; }, "strict", z.ZodTypeAny, { comments: { comment: string; }[]; keyId: number; projectId: string; }, { comments: { comment: string; }[]; keyId: number; projectId: string; }>; export type CreateCommentsToolArgsType = z.infer<typeof CreateCommentsToolArgs>; /** * Zod schema for deleting a comment. * Requires project ID, key ID, and comment ID. */ export declare const DeleteCommentToolArgs: z.ZodObject<{ projectId: z.ZodString; keyId: z.ZodNumber; commentId: z.ZodNumber; }, "strict", z.ZodTypeAny, { keyId: number; projectId: string; commentId: number; }, { keyId: number; projectId: string; commentId: number; }>; export type DeleteCommentToolArgsType = z.infer<typeof DeleteCommentToolArgs>; /** * Re-export SDK types for use in service layer */ export type { Comment, CommentData, CommentDeleted, ProjectAndKey, KeyProjectPagination, ProjectWithPagination, PaginatedResult, }; /** * Comment entity structure returned by the API */ export interface CommentEntity extends Comment { comment_id: number; key_id: number; comment: string; added_by: number; added_by_email: string; added_at: string; added_at_timestamp: number; } /** * Response type for listing comments */ export type ListCommentsResponse = PaginatedResult<Comment>; /** * Response type for creating comments (returns array) */ export type CreateCommentsResponse = Comment[]; /** * Response type for getting a single comment */ export type GetCommentResponse = Comment; /** * Response type for deleting a comment */ export type DeleteCommentResponse = CommentDeleted;