import { ExecuteSQL } from '@carto/ps-services';
export interface NumberStatsResponse {
    attribute: string;
    type: 'number';
    avg: number;
    sum: number;
    min: number;
    max: number;
    quantiles: Record<number, number[]>;
}
export interface StringStatsResponse {
    attribute: string;
    type: 'string';
    categories: {
        category: string;
        frequency: number;
    }[];
}
export type StatsResponse<T> = T extends number ? NumberStatsResponse : StringStatsResponse;
export interface Stats extends ExecuteSQL {
    attribute: string;
    params?: {
        maxNumberOfCategories?: number;
        categoriesOrderBy?: 'frequency_asc' | 'frequency_desc' | 'alphabetical_asc' | 'alphabetical_desc';
    };
}
export interface GetQueryStats extends Stats {
    query: string;
}
export interface GetTableStats extends Omit<Stats, 'query'> {
    table: string;
}
