import type { Series } from 'uplot';
import { Alert, CriticalSeverity, Event, InfoSeverity, MajorSeverity, MinorSeverity, WarningSeverity } from './constants';
type ToReactNodeFormatter = (value: number, xAxisResolution: number) => React.ReactNode;
type ToStringFormatter = (value: number, xAxisResolution: number) => string;
type ToNumberFormatter = (value: number, xAxisResolution: number) => number;
export type NamedFormatters = {
    rate: ToStringFormatter;
    durationMicros: ToStringFormatter;
    count: ToStringFormatter;
    bytes: ToStringFormatter;
    percentage: ToStringFormatter;
    kibBytes: ToStringFormatter;
};
export type NumberedFormatters = {
    rate: ToNumberFormatter;
    durationMicros: ToNumberFormatter;
    count: ToNumberFormatter;
    bytes: ToNumberFormatter;
    percentage: ToNumberFormatter;
    kibBytes: ToNumberFormatter;
};
export type GenericDataSet = {
    fields: [...Array<string>];
    columns: [
        (string | number)[],
        ...number[][]
    ];
};
export type DataSet = GenericDataSet & {
    fields: ['_time', ...Array<string>];
    columns: (number | null)[][];
};
export type SeriesConfig = Record<string, // seriesId
{
    /** type of presentation; default "line" */
    type?: 'line' | 'area' | 'points' | 'bar' | 'stacked-bar' | 'stacked-area';
    /** series label; defaults to field name */
    label?: string;
    /** series color; default random color from default color set */
    color?: string;
    /** scaleId to use for series */
    scale?: string;
    /** value formatter */
    valueFmt?: ToReactNodeFormatter | keyof NamedFormatters;
    /** series point diameter in CSS pixels; only applies when 'type' is 'points' */
    pointSize?: number;
    /**
     * Currently only used for series type 'line'.
     * Determines if line chart needs to show points on the series.
     */
    hidePoints?: boolean;
    /**
     * Overrides is an escape hatch to allow you to use whatever series config you want. Use sparingly.
     * It's useful in situations where we want to give more configurability to charts, like in a custom dashboard.
     */
    overrides?: Series;
}>;
export type ScaleConfig = Record<string, // scaleId
{
    /** distribution of scaled values */
    type?: 'linear' | 'log';
    /** axis side to show scale; default "left" */
    side?: 'left' | 'right';
    /** label to show on axis */
    label?: string;
    /** show y-axis grid lines for scale; default true */
    showGrid?: boolean;
    /** width of y-axis; default 55 */
    width?: number;
    /** tick value formatter */
    tickFmt?: ToStringFormatter | keyof NamedFormatters;
    /** default seriesConfig for all series applied to this scale */
    seriesConfig?: Omit<SeriesConfig[keyof SeriesConfig], 'scale' | 'color'>;
    /** custom range of y-axis */
    range?: [number | null, number | null];
}>;
export type AxisRange = {
    min: number;
    max: number;
    dailyResolution?: boolean;
};
export type AnnotationType = typeof Alert | typeof Event;
export type AlertAnnotationSeverity = typeof InfoSeverity | typeof WarningSeverity | typeof CriticalSeverity | typeof MajorSeverity | typeof MinorSeverity;
export type MarkAnnotation = {
    value: number;
    scale?: string;
    color?: string;
    style?: 'solid' | 'dashed' | 'dotted';
    width?: number;
    legendLabel?: string;
};
export type TickInterval = '1s' | '1m' | '30m' | '1h' | '12h' | '1d' | '7d' | '1mo';
export type TimestampFormat = 'compact' | 'expanded';
/**
 * Metadata messages contain the metadata from the output time series of your computation.
 */
export type StreamMetadataMessage = {
    type: 'metadata';
    channel: string;
    tsId: string;
    properties: {
        jobId: string;
        sf_organizationID: string;
        sf_streamLabel?: string;
        sf_key: string[];
        sf_metric: string;
        sf_originatingMetric: string;
        sf_resolutionMs: number;
        sf_type: string;
        sf_isPreQuantized: boolean;
        sf_tags?: string[];
    } & Record<string, string>;
};
export {};
