import { z } from "zod"; import { type Measure, type PredicateTree } from "./plan/index.js"; /** * `column` names a promoted semconv column (e.g. `http.route`); `pattern` is a * `pattern_id` from the log_patterns catalog. `body_json` is not in the design's * type block: it is carried so every v1 spec has a v2 form. */ export declare const logFieldRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"service">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"severity_number">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"column">; name: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodEnum<{ log: "log"; resource: "resource"; scope: "scope"; }>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"pattern">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>], "kind">; export type LogFieldRef = z.infer; export declare const logPredicateTreeSchema: z.ZodType, unknown, z.core.$ZodTypeInternals, unknown>>; export type LogPredicateTree = PredicateTree; export declare const LOG_DURATION_AGGREGATES: readonly ["sum", "avg", "max", "p50", "p95", "p99"]; export type LogDurationAggregate = (typeof LOG_DURATION_AGGREGATES)[number]; export declare const logMeasureV2Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{ op: z.ZodLiteral<"count">; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"event_rate">; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"distinct">; field: z.ZodType<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown, z.core.$ZodTypeInternals<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown>>; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"numeric">; field: z.ZodType<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown, z.core.$ZodTypeInternals<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown>>; parseAs: z.ZodLiteral<"float64">; aggregate: z.ZodEnum<{ avg: "avg"; max: "max"; min: "min"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; invalidValues: z.ZodEnum<{ drop: "drop"; error: "error"; }>; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"recent_rows">; limit: z.ZodNumber; fields: z.ZodOptional>>>; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"error_count">; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"duration">; aggregate: z.ZodEnum<{ avg: "avg"; max: "max"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; }, z.core.$strict>], "op">; export type LogMeasureV2 = Measure | { op: "error_count"; } | { op: "duration"; aggregate: LogDurationAggregate; }; export declare const LOG_QUERY_BUCKETS: readonly ["1m", "5m", "1h", "1d"]; export type LogQueryBucket = (typeof LOG_QUERY_BUCKETS)[number]; export declare const logQueryAnchorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"pattern">; query: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"patterns">; patternIds: z.ZodArray; }, z.core.$strict>], "kind">; export type LogQueryAnchor = z.infer; export declare const logQuerySpecV2Schema: z.ZodObject<{ version: z.ZodLiteral<2>; source: z.ZodObject<{ kind: z.ZodLiteral<"logs">; }, z.core.$strict>; predicate: z.ZodType, unknown, z.core.$ZodTypeInternals, unknown>>; dimensions: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"severity_number">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"column">; name: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodEnum<{ log: "log"; resource: "resource"; scope: "scope"; }>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"pattern">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>], "kind">>; measure: z.ZodDiscriminatedUnion<[z.ZodObject<{ op: z.ZodLiteral<"count">; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"event_rate">; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"distinct">; field: z.ZodType<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown, z.core.$ZodTypeInternals<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown>>; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"numeric">; field: z.ZodType<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown, z.core.$ZodTypeInternals<{ kind: "service"; } | { kind: "severity_number"; } | { kind: "column"; name: string; } | { kind: "attribute"; source: "log" | "resource" | "scope"; key: string; } | { kind: "pattern"; } | { kind: "body"; } | { kind: "body_json"; path: string[]; }, unknown>>; parseAs: z.ZodLiteral<"float64">; aggregate: z.ZodEnum<{ avg: "avg"; max: "max"; min: "min"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; invalidValues: z.ZodEnum<{ drop: "drop"; error: "error"; }>; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"recent_rows">; limit: z.ZodNumber; fields: z.ZodOptional>>>; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"error_count">; }, z.core.$strict>, z.ZodObject<{ op: z.ZodLiteral<"duration">; aggregate: z.ZodEnum<{ avg: "avg"; max: "max"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; }, z.core.$strict>], "op">; bucket: z.ZodOptional>; output: z.ZodEnum<{ evidence: "evidence"; series: "series"; table: "table"; }>; series: z.ZodOptional; }, z.core.$strict>>; exactness: z.ZodEnum<{ approximate_ok: "approximate_ok"; exact: "exact"; }>; approximation: z.ZodOptional>; anchor: z.ZodOptional; query: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"patterns">; patternIds: z.ZodArray; }, z.core.$strict>], "kind">>; }, z.core.$strict>; export type LogQuerySpecV2 = z.infer;