/// <reference path="../../../src/base-types.d.ts" />
/// <reference types="react" />
import { ChartType, CubeApi, DateRange, DryRunResponse, Filter, Meta, PivotConfig, ProgressResult, Query, QueryOrder, ResultSet, SqlQuery, TCubeDimension, TCubeMeasure, TCubeSegment, TimeDimensionGranularity, TQueryOrderObject } from '@cubejs-client/core';
import { CubeStats, MissingMember, WithUndefinedValues, MemberViewType, Cube } from '../types';
interface UseQueryBuilderProps {
    displayPrivateItems?: boolean;
    defaultQuery?: Query;
    defaultChartType?: ChartType;
    defaultPivotConfig?: PivotConfig;
    schemaVersion?: number;
    cubeApi?: CubeApi;
    memberViewType?: MemberViewType;
    tracking?: {
        event: (name: string, props?: Record<string, any>) => void;
    };
    onQueryChange?: (query: {
        query: Query;
        chartType?: ChartType;
        pivotConfig?: PivotConfig;
    }) => void;
    /**
     * Validates and prepares the query once it's get updated
     */
    queryValidator?: (query: Query) => Query;
}
type CubeMembers = {
    dimensions: Record<string, TCubeDimension>;
    measures: Record<string, TCubeMeasure>;
    segments: Record<string, TCubeSegment>;
};
type MemberUpdater = {
    add(name: string): boolean;
    remove(name: string): boolean;
    toggle(name: string): void;
    clear(): void;
    list: string[];
};
export declare function useQueryBuilder(props: UseQueryBuilderProps): {
    grouping: {
        add(name: string, granularity: TimeDimensionGranularity): boolean;
        remove(name: string): boolean;
        toggle(name: string, granularity: TimeDimensionGranularity): boolean;
        get(name: string): string | undefined;
        getAll(): import("@cubejs-client/core").TimeDimension[];
        reorder(names: string[]): void;
        clear(): void;
    };
    dateRanges: {
        set(name: string, dateRange?: DateRange): boolean;
        remove(name: string): boolean;
        readonly list: string[];
        clear(): void;
    };
    order: {
        set(name: string, order: QueryOrder): boolean;
        remove(name: string): boolean;
        get(name: string): QueryOrder;
        readonly map: TQueryOrderObject;
        setOrder(names: string[]): void;
        getOrder(): string[];
        clear(): void;
    };
    filters: {
        add(filter: Filter): boolean;
        remove(index: number): boolean;
        removeByMember(name: string): boolean;
        update(index: number, filter: Filter): boolean;
        readonly list: Filter[];
        clear(): void;
    };
    chartType: ChartType;
    hasPrivateMembers: boolean;
    setChartType: import("react").Dispatch<import("react").SetStateAction<ChartType>>;
    isCubeJoined: (name: string) => boolean;
    isMemberJoined: (name: string) => boolean;
    isCubeUsed: (name: string) => boolean;
    isQueryEmpty: boolean;
    isApiTokenChanged: boolean;
    isDataModelChanged: boolean;
    isResultOutdated: boolean;
    cubeApi: CubeApi | undefined;
    mutexObj: {};
    selectedCube: Cube | null;
    selectCube: (name: string | null) => void;
    totalRows: number | null | undefined;
    dimensions: MemberUpdater;
    measures: MemberUpdater;
    segments: MemberUpdater;
    memberViewType: MemberViewType;
    query: Query;
    queryHash: string;
    executedQuery: Query | null;
    runQuery: () => Promise<void>;
    stopQuery: () => void;
    clearQuery: () => void;
    setQuery: (query: Query) => void;
    updateQuery: (queryPart: Query | ((query: Query) => WithUndefinedValues<Query> | void)) => void;
    isVerifying: boolean;
    verificationError: string | null;
    isQueryTouched: boolean;
    error: string | null;
    isLoading: boolean;
    progress: ProgressResult | null;
    meta: Meta | null;
    isMetaLoading: boolean;
    metaError: null;
    richMetaError: null;
    loadMeta: () => Promise<void> | undefined;
    queryStats: Record<string, CubeStats>;
    pivotConfig: PivotConfig;
    updatePivotConfig: {
        moveItem: ({ sourceIndex, destinationIndex, sourceAxis, destinationAxis, }: {
            sourceIndex: number;
            destinationIndex: number;
            sourceAxis: 'x' | 'y';
            destinationAxis: 'x' | 'y';
        }) => void;
        update: (config: PivotConfig) => void;
    };
    resultSet: ResultSet<any> | null;
    dryRunResponse: DryRunResponse | null;
    sqlQuery: SqlQuery | null;
    getCubeByName: (name: string) => Cube | undefined;
    getMemberFormat: (name: string) => unknown;
    cubes: Cube[];
    members: CubeMembers;
    joinableCubes: Cube[];
    joinableMembers: {
        dimensions: Record<string, TCubeDimension>;
        measures: Record<string, TCubeMeasure>;
        segments: Record<string, TCubeSegment>;
    };
    usedCubes: string[];
    usedMembers: string[];
    usedGranularities: {
        dimension: string;
        granularities: string[];
    }[];
    usedMembersInGrouping: string[];
    usedMembersInFilters: string[];
    missingCubes: string[];
    missingMembers: MissingMember[];
};
export {};
