import { Query, TimeDimensionBase, TimeDimensionGranularity, TransformedQuery } from '@cubejs-client/core';
import { QueryMemberKey, SchemaFormat } from '../types';
import { RollupSettings } from './components/Settings';
export type PreAggregationReferences = {
    measures: string[];
    dimensions: string[];
    segments: string[];
    timeDimensions: TimeDimensionBase[];
    timeDimension?: string;
    granularity?: TimeDimensionGranularity;
};
export type PreAggregationDefinition = {
    preAggregationName: string;
    cubeName: string;
    code: Object;
};
export declare function getPreAggregationReferences(transformedQuery: TransformedQuery | null, segments: Set<string>): PreAggregationReferences;
export declare function areReferencesEmpty(references: PreAggregationReferences): boolean;
type PreAggregationDefinitionResult = {
    code: string;
    value: Object;
};
export declare function getRollupDefinitionFromReferences(references: PreAggregationReferences, name: string | undefined, settings: RollupSettings, schemaFormat: SchemaFormat): PreAggregationDefinitionResult;
export declare function updateQuery(query: Query, memberType: QueryMemberKey, key: string): Query;
type FlattenOptions = {
    safe?: boolean;
    maxDepth?: number;
    delimiter?: string;
    transformKey?: (key: string) => string;
};
export declare function flatten(target: Object, opts?: FlattenOptions): {};
export declare function buildSettings(values: Record<string, string | boolean | number>): RollupSettings;
export {};
