UNPKG

mcp-server-logzio

Version:

Model Context Protocol server for Logz.io log management platform

185 lines 4.6 kB
import { z } from 'zod'; /** * Common timestamp range schema */ export declare const TimeRangeSchema: z.ZodObject<{ from: z.ZodOptional<z.ZodString>; to: z.ZodOptional<z.ZodString>; timeRange: z.ZodOptional<z.ZodEnum<{ "1h": "1h"; "6h": "6h"; "12h": "12h"; "24h": "24h"; "3d": "3d"; "7d": "7d"; "30d": "30d"; }>>; }, z.core.$strip>; export type TimeRange = z.infer<typeof TimeRangeSchema>; /** * Log severity levels */ export declare const LogSeveritySchema: z.ZodEnum<{ error: "error"; fatal: "fatal"; warn: "warn"; info: "info"; debug: "debug"; trace: "trace"; }>; export type LogSeverity = z.infer<typeof LogSeveritySchema>; /** * Search logs request schema */ export declare const SearchLogsRequestSchema: z.ZodObject<{ query: z.ZodString; timeRange: z.ZodOptional<z.ZodObject<{ from: z.ZodOptional<z.ZodString>; to: z.ZodOptional<z.ZodString>; timeRange: z.ZodOptional<z.ZodEnum<{ "1h": "1h"; "6h": "6h"; "12h": "12h"; "24h": "24h"; "3d": "3d"; "7d": "7d"; "30d": "30d"; }>>; }, z.core.$strip>>; logType: z.ZodOptional<z.ZodString>; severity: z.ZodOptional<z.ZodEnum<{ error: "error"; fatal: "fatal"; warn: "warn"; info: "info"; debug: "debug"; trace: "trace"; }>>; limit: z.ZodDefault<z.ZodNumber>; offset: z.ZodDefault<z.ZodNumber>; sort: z.ZodDefault<z.ZodEnum<{ asc: "asc"; desc: "desc"; }>>; }, z.core.$strip>; export type SearchLogsRequest = z.infer<typeof SearchLogsRequestSchema>; /** * Lucene query request schema */ export declare const LuceneQueryRequestSchema: z.ZodObject<{ luceneQuery: z.ZodString; from: z.ZodOptional<z.ZodString>; to: z.ZodOptional<z.ZodString>; size: z.ZodDefault<z.ZodNumber>; sort: z.ZodDefault<z.ZodEnum<{ asc: "asc"; desc: "desc"; }>>; }, z.core.$strip>; export type LuceneQueryRequest = z.infer<typeof LuceneQueryRequestSchema>; /** * Log statistics request schema */ export declare const LogStatsRequestSchema: z.ZodObject<{ timeRange: z.ZodObject<{ from: z.ZodOptional<z.ZodString>; to: z.ZodOptional<z.ZodString>; timeRange: z.ZodOptional<z.ZodEnum<{ "1h": "1h"; "6h": "6h"; "12h": "12h"; "24h": "24h"; "3d": "3d"; "7d": "7d"; "30d": "30d"; }>>; }, z.core.$strip>; groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>; filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, z.core.$strip>; export type LogStatsRequest = z.infer<typeof LogStatsRequestSchema>; /** * Log entry response structure */ export interface LogEntry { '@timestamp': string; message: string; level?: string; type?: string; host?: string; source?: string; tags?: string[]; [key: string]: unknown; } /** * Search response structure */ export interface SearchResponse { hits: { total: number; hits: Array<{ _id: string; _source: LogEntry; _score?: number; }>; }; took: number; timed_out: boolean; aggregations?: Record<string, unknown>; } /** * Log statistics response structure */ export interface LogStatsResponse { total: number; timeRange: TimeRange; buckets?: Array<{ key: string; count: number; timestamp?: string; }>; aggregations?: Record<string, { value: number; buckets?: Array<{ key: string; count: number; }>; }>; } /** * API response wrapper */ export interface ApiResponse<T = unknown> { data?: T; error?: { code: string; message: string; details?: unknown; }; meta?: { total?: number; page?: number; size?: number; took?: number; }; } /** * Pagination parameters */ export declare const PaginationSchema: z.ZodObject<{ page: z.ZodDefault<z.ZodNumber>; size: z.ZodDefault<z.ZodNumber>; }, z.core.$strip>; export type Pagination = z.infer<typeof PaginationSchema>; /** * Sort parameters */ export declare const SortSchema: z.ZodObject<{ field: z.ZodDefault<z.ZodString>; order: z.ZodDefault<z.ZodEnum<{ asc: "asc"; desc: "desc"; }>>; }, z.core.$strip>; export type Sort = z.infer<typeof SortSchema>; //# sourceMappingURL=types.d.ts.map