import DataSet from './DataSet';
export type ErrorLevel = 'info' | 'warning' | 'error';
export interface SearchError {
    level?: ErrorLevel;
    message: string;
}
export interface FieldObj {
    name: string;
    type?: string;
    [key: string]: unknown;
}
export type ColumnValue = string | number | null | undefined;
export interface RowItem {
    [key: string]: ColumnValue;
}
export interface JSONRows {
    fields: FieldObj[];
    rows: ColumnValue[][];
}
export interface JSONCols {
    fields: FieldObj[];
    columns: ColumnValue[][];
}
export interface JSONArray {
    fields: FieldObj[];
    results: RowItem[];
}
export type JobStatus = 'queued' | 'parsing' | 'running' | 'pause' | 'finalizing' | 'failed' | 'stopped' | 'done' | 'canceled' | 'refreshing';
export interface DataSourceMeta {
    isRealTimeSearch?: boolean;
    lastUpdated?: string;
    percentComplete?: number;
    sid?: string;
    statusMessage?: string;
    status?: JobStatus;
    totalCount?: number;
    search?: string;
    checkRiskyCommand?: boolean;
    completeSearchQuery?: string;
    missedTokens?: string[];
    serverLog?: {
        level?: string;
        message?: string;
    }[];
    [key: string]: unknown;
}
export interface RequestParams {
    count?: number;
    offset?: number;
    search?: string;
    sort?: {
        [field: string]: 'none' | 'desc' | 'asc';
    };
    source?: 'results_preview' | 'results' | 'events' | 'summary' | 'timeline';
    requireTotalCount?: boolean;
    progress?: boolean;
    field?: string;
    format?: string;
    show_metadata?: boolean;
    [key: string]: unknown;
}
export interface SearchData {
    error?: SearchError;
    data?: JSONCols;
    meta?: DataSourceMeta;
    requestParams?: RequestParams;
}
export interface VizProps {
    dataSources?: Record<string, SearchData>;
}
/**
 * Returns a dataset instance based on data from props
 * @param {object} vizProps
 * @param {string} [dataSourceType='primary']
 * @returns {DataSet | null}
 */
export declare function getDataSet(vizProps: VizProps, dataSourceType?: string): DataSet;
/**
 * Returns the dataset instance for dataSourceType = 'primary'
 * @param {object} vizProps
 * @returns {DataSet | null}
 */
export declare function getPrimaryDataSet(vizProps: VizProps): DataSet | null;
/**
 * Returns the request parameters for a dataSourceType in vizProps
 * @param {object} vizProps visualization props object
 * @param {string} [dataSourceType='primary']
 * @returns {RequestParams | undefined}
 */
export declare function getRequestParams(vizProps: VizProps, dataSourceType?: string): RequestParams | undefined;
/**
 * Returns the request parameters for the primary data in vizProps
 * @param {object} vizProps visualization props object
 * @returns {RequestParams | undefined}
 */
export declare function getPrimaryRequestParams(vizProps: VizProps): RequestParams | undefined;
/**
 * Returns the meta data for a dataSourceType in vizProps
 * @param {object} vizProps visualization props object
 * @param {string} [dataSourceType='primary']
 * @returns {DataSourceMeta}
 */
export declare function getMeta(vizProps: VizProps, dataSourceType?: string): DataSourceMeta;
/**
 * Returns the meta data for the primary data in vizProps
 * @param {object} vizProps visualization props object
 * @returns {DataSourceMeta}
 */
export declare function getPrimaryMeta(vizProps: VizProps): DataSourceMeta;
