import { z } from "zod"; export declare const DATA_TABLE_WIDGET = "data-table"; export declare const DATA_CHART_WIDGET = "data-chart"; export declare const DATA_INSIGHTS_WIDGET = "data-insights"; export type DataWidgetKind = typeof DATA_TABLE_WIDGET | typeof DATA_CHART_WIDGET | typeof DATA_INSIGHTS_WIDGET; export interface DataTableColumn { key: string; label: string; align?: "left" | "right"; } export interface DataTableWidget { title?: string; columns: DataTableColumn[]; rows: Array>; totalRows?: number; sampledRows?: number; truncated?: boolean; } export interface DataChartSeriesDefinition { key: string; label: string; color?: string; } export interface DataChartWidget { type: "bar" | "line" | "area"; title?: string; xKey: string; series: DataChartSeriesDefinition[]; data: Array>; sampled?: boolean; } export interface DataWidgetDisplay { title?: string; description?: string; primaryAction?: { label: string; href: string; }; } export interface DataWidgetResultMetadata { widgetId?: string; title?: string; summary?: Record; display?: DataWidgetDisplay; } export interface DataTableWidgetResultInput extends DataWidgetResultMetadata { table: DataTableWidget; } export interface DataChartWidgetResultInput extends DataWidgetResultMetadata { chartSeries: DataChartWidget; } export type DataInsightsWidgetResultInput = DataWidgetResultMetadata & ({ table: DataTableWidget; chartSeries?: DataChartWidget; } | { table?: DataTableWidget; chartSeries: DataChartWidget; }); export type DataTableWidgetResult = Omit & { widget: typeof DATA_TABLE_WIDGET; table: Input["table"]; chartSeries?: never; }; export type DataChartWidgetResult = Omit & { widget: typeof DATA_CHART_WIDGET; table?: never; chartSeries: Input["chartSeries"]; }; export type DataInsightsWidgetResult = Omit & { widget: typeof DATA_INSIGHTS_WIDGET; }; export type DataWidgetResult = DataTableWidgetResult | DataChartWidgetResult | DataInsightsWidgetResult; export declare function normalizeDataWidgetKind(value: unknown): DataWidgetKind | null; export declare function isDataTableWidget(value: unknown): value is DataTableWidget; export declare function isDataChartWidget(value: unknown): value is DataChartWidget; export declare function createDataTableWidgetResult(input: Input & { widget?: never; chartSeries?: never; }): DataTableWidgetResult; export declare function createDataChartWidgetResult(input: Input & { widget?: never; table?: never; }): DataChartWidgetResult; export declare function createDataInsightsWidgetResult(input: Input & { widget?: never; }): DataInsightsWidgetResult; export declare function normalizeDataWidgetResult(value: unknown): DataWidgetResult | null; export declare function isDataWidgetResult(value: unknown): value is DataWidgetResult; export declare const DATA_WIDGET_MAX_ROWS = 50; export declare const DATA_WIDGET_MAX_CHART_POINTS = 200; export declare function clampDataWidgetRows(result: DataWidgetResult): DataWidgetResult; export declare const dataTableWidgetSchema: z.ZodObject<{ title: z.ZodOptional; columns: z.ZodArray>; }, z.core.$loose>>; rows: z.ZodArray>; totalRows: z.ZodOptional; sampledRows: z.ZodOptional; truncated: z.ZodOptional; }, z.core.$loose>; export declare const dataChartWidgetSchema: z.ZodObject<{ type: z.ZodEnum<{ area: "area"; bar: "bar"; line: "line"; }>; title: z.ZodOptional; xKey: z.ZodString; series: z.ZodArray; }, z.core.$loose>>; data: z.ZodArray>; sampled: z.ZodOptional; }, z.core.$loose>; export declare const dataTableWidgetResultSchema: z.ZodObject<{ widgetId: z.ZodOptional; title: z.ZodOptional; summary: z.ZodOptional>; display: z.ZodOptional; description: z.ZodOptional; primaryAction: z.ZodOptional>; }, z.core.$loose>>; widget: z.ZodLiteral<"data-table">; table: z.ZodObject<{ title: z.ZodOptional; columns: z.ZodArray>; }, z.core.$loose>>; rows: z.ZodArray>; totalRows: z.ZodOptional; sampledRows: z.ZodOptional; truncated: z.ZodOptional; }, z.core.$loose>; }, z.core.$loose>; export declare const dataChartWidgetResultSchema: z.ZodObject<{ widgetId: z.ZodOptional; title: z.ZodOptional; summary: z.ZodOptional>; display: z.ZodOptional; description: z.ZodOptional; primaryAction: z.ZodOptional>; }, z.core.$loose>>; widget: z.ZodLiteral<"data-chart">; chartSeries: z.ZodObject<{ type: z.ZodEnum<{ area: "area"; bar: "bar"; line: "line"; }>; title: z.ZodOptional; xKey: z.ZodString; series: z.ZodArray; }, z.core.$loose>>; data: z.ZodArray>; sampled: z.ZodOptional; }, z.core.$loose>; }, z.core.$loose>; export declare const dataInsightsWidgetResultSchema: z.ZodObject<{ widgetId: z.ZodOptional; title: z.ZodOptional; summary: z.ZodOptional>; display: z.ZodOptional; description: z.ZodOptional; primaryAction: z.ZodOptional>; }, z.core.$loose>>; widget: z.ZodLiteral<"data-insights">; table: z.ZodOptional; columns: z.ZodArray>; }, z.core.$loose>>; rows: z.ZodArray>; totalRows: z.ZodOptional; sampledRows: z.ZodOptional; truncated: z.ZodOptional; }, z.core.$loose>>; chartSeries: z.ZodOptional; title: z.ZodOptional; xKey: z.ZodString; series: z.ZodArray; }, z.core.$loose>>; data: z.ZodArray>; sampled: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; export declare const dataWidgetResultSchema: z.ZodUnion; title: z.ZodOptional; summary: z.ZodOptional>; display: z.ZodOptional; description: z.ZodOptional; primaryAction: z.ZodOptional>; }, z.core.$loose>>; widget: z.ZodLiteral<"data-table">; table: z.ZodObject<{ title: z.ZodOptional; columns: z.ZodArray>; }, z.core.$loose>>; rows: z.ZodArray>; totalRows: z.ZodOptional; sampledRows: z.ZodOptional; truncated: z.ZodOptional; }, z.core.$loose>; }, z.core.$loose>, z.ZodObject<{ widgetId: z.ZodOptional; title: z.ZodOptional; summary: z.ZodOptional>; display: z.ZodOptional; description: z.ZodOptional; primaryAction: z.ZodOptional>; }, z.core.$loose>>; widget: z.ZodLiteral<"data-chart">; chartSeries: z.ZodObject<{ type: z.ZodEnum<{ area: "area"; bar: "bar"; line: "line"; }>; title: z.ZodOptional; xKey: z.ZodString; series: z.ZodArray; }, z.core.$loose>>; data: z.ZodArray>; sampled: z.ZodOptional; }, z.core.$loose>; }, z.core.$loose>, z.ZodObject<{ widgetId: z.ZodOptional; title: z.ZodOptional; summary: z.ZodOptional>; display: z.ZodOptional; description: z.ZodOptional; primaryAction: z.ZodOptional>; }, z.core.$loose>>; widget: z.ZodLiteral<"data-insights">; table: z.ZodOptional; columns: z.ZodArray>; }, z.core.$loose>>; rows: z.ZodArray>; totalRows: z.ZodOptional; sampledRows: z.ZodOptional; truncated: z.ZodOptional; }, z.core.$loose>>; chartSeries: z.ZodOptional; title: z.ZodOptional; xKey: z.ZodString; series: z.ZodArray; }, z.core.$loose>>; data: z.ZodArray>; sampled: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>]>; //# sourceMappingURL=index.d.ts.map