import { z } from 'zod'; export interface TimeSeriesPoint { metric: string; timestamp: number; value: number | string | boolean; tags: Record; fields?: Record; } export interface TimeSeriesSchema { metric: string; dataType: 'counter' | 'gauge' | 'histogram' | 'summary' | 'set'; unit: string; description: string; retentionDays: number; downsamplingRules: DownsamplingRule[]; compressionType: 'gorilla' | 'zstd' | 'none'; tags: Record; fields?: Record; } export interface DownsamplingRule { interval: string; retention: string; aggregations: AggregationFunction[]; } export type AggregationFunction = 'avg' | 'sum' | 'min' | 'max' | 'count' | 'first' | 'last' | 'median' | 'stddev' | 'p50' | 'p90' | 'p95' | 'p99' | 'rate' | 'increase' | 'derivative'; export interface TimeRange { start: number | string; end?: number | string; } export interface TimeSeriesQuery { metrics: string[]; timeRange: TimeRange; filters?: Record; aggregation?: { function: AggregationFunction; interval?: string; groupBy?: string[]; }; limit?: number; orderBy?: 'timestamp' | 'value'; orderDirection?: 'asc' | 'desc'; } export interface TimeSeriesAggregationQuery { metric: string; timeRange: TimeRange; groupBy?: string[]; aggregations: Array<{ type: AggregationFunction; alias?: string; }>; having?: Record; interval?: string; fill?: 'null' | 'zero' | 'previous' | number; } export interface ContinuousQuery { name: string; query: string; interval: string; retention: string; destination?: string; enabled: boolean; lastRun?: string; nextRun?: string; } export interface TimeSeriesSubscription { id: string; metrics: string[]; filters?: Record; aggregateWindow?: string; onData: (point: TimeSeriesPoint) => void; onError: (error: Error) => void; } export interface AnomalyDetectionConfig { metric: string; method: 'isolation_forest' | 'statistical' | 'prophet' | 'lstm'; sensitivity: number; seasonality?: { enabled: boolean; period: string; }; threshold?: { upper?: number; lower?: number; }; } export interface Anomaly { timestamp: number; value: number; expected: number; score: number; tags: Record; method: string; } export interface ForecastConfig { metric: string; method: 'prophet' | 'arima' | 'linear' | 'exponential'; horizon: string; includeConfidence: boolean; seasonality?: { yearly?: boolean; weekly?: boolean; daily?: boolean; }; holidays?: string[]; } export interface ForecastResult { timestamp: number; value: number; upperBound?: number; lowerBound?: number; confidence?: number; } export interface TimeSeriesStats { metric: string; timeRange: TimeRange; count: number; min: number; max: number; avg: number; sum: number; stddev: number; percentiles: { p50: number; p90: number; p95: number; p99: number; }; cardinality: Record; } export interface StreamProcessor { name: string; input: { metrics: string[]; filters?: Record; }; operations: StreamOperation[]; output: { metric?: string; webhook?: string; notification?: string; }; enabled: boolean; } export type StreamOperation = { type: 'filter'; condition: string; } | { type: 'map'; expression: string; } | { type: 'window'; size: string; type: 'tumbling' | 'sliding' | 'session'; } | { type: 'aggregate'; functions: AggregationFunction[]; groupBy?: string[]; } | { type: 'join'; stream: string; key: string; window: string; }; export declare const TimeSeriesPointSchema: z.ZodObject<{ metric: z.ZodString; timestamp: z.ZodNumber; value: z.ZodUnion; tags: z.ZodRecord; fields: z.ZodOptional>; }, z.core.$strip>; export declare const TimeSeriesSchemaSchema: z.ZodObject<{ metric: z.ZodString; dataType: z.ZodEnum<{ set: "set"; counter: "counter"; gauge: "gauge"; histogram: "histogram"; summary: "summary"; }>; unit: z.ZodString; description: z.ZodString; retentionDays: z.ZodNumber; downsamplingRules: z.ZodArray>; }, z.core.$strip>>; compressionType: z.ZodDefault>; tags: z.ZodRecord; indexed: z.ZodDefault; required: z.ZodDefault; }, z.core.$strip>>; fields: z.ZodOptional; indexed: z.ZodDefault; }, z.core.$strip>>>; }, z.core.$strip>; export declare const TimeSeriesQuerySchema: z.ZodObject<{ metrics: z.ZodArray; timeRange: z.ZodObject<{ start: z.ZodUnion; end: z.ZodOptional>; }, z.core.$strip>; filters: z.ZodOptional]>>>; aggregation: z.ZodOptional; interval: z.ZodOptional; groupBy: z.ZodOptional>; }, z.core.$strip>>; limit: z.ZodDefault; orderBy: z.ZodDefault>; orderDirection: z.ZodDefault>; }, z.core.$strip>; export declare const ContinuousQuerySchema: z.ZodObject<{ name: z.ZodString; query: z.ZodString; interval: z.ZodString; retention: z.ZodString; destination: z.ZodOptional; enabled: z.ZodDefault; }, z.core.$strip>; export declare const AnomalyDetectionSchema: z.ZodObject<{ metric: z.ZodString; method: z.ZodEnum<{ isolation_forest: "isolation_forest"; statistical: "statistical"; prophet: "prophet"; lstm: "lstm"; }>; sensitivity: z.ZodNumber; seasonality: z.ZodOptional>; threshold: z.ZodOptional; lower: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export declare const ForecastSchema: z.ZodObject<{ metric: z.ZodString; method: z.ZodEnum<{ prophet: "prophet"; arima: "arima"; linear: "linear"; exponential: "exponential"; }>; horizon: z.ZodString; includeConfidence: z.ZodDefault; seasonality: z.ZodOptional; weekly: z.ZodOptional; daily: z.ZodOptional; }, z.core.$strip>>; holidays: z.ZodOptional>; }, z.core.$strip>; //# sourceMappingURL=timeseries.d.ts.map