/// <reference types="react" />
import { DataSet } from '../DataSet/types';
import { DateTimeField, NonDateTimeField, SupportedAggregateOption } from '../Field/types';
import { DataType } from './types';
import { QueryAttributes, SupportedOperators } from '../QueryAttributes/types';
import * as Aggregate from '../Aggregate';
import { SupportedAggregates } from '../Aggregate';
import { SupportedTimeTruncFunctions } from '@vizzly/semantic-layer-public';
import { QueryEngineConfig } from '../QueryEngineConfig/types';
import { SupportedTransformationFunctions } from '../Functions/types';
import { TextOverride } from '../Translations/types';
export declare const NULL_REPLACEMENT = "No value";
export declare const ALL_AGGREGATES: Array<QueryAttributes.Aggregate>;
export declare type OldField = {
    id: string;
    publicName?: string;
    dataType: 'string' | 'number' | 'date_time' | 'boolean' | 'string[]';
    canBeDimension?: boolean;
    canBeMeasure?: boolean;
    allowedGranularities?: QueryAttributes.TimeDimension.Truncate[];
    allowedOperators?: Array<QueryAttributes.Operator>;
    dashboardRequiredFilterGroups?: Array<{
        publicName: string;
    }>;
    supportedAggregateOptions?: string[];
    description?: string;
};
export declare const upcastField: (maybeOldField: OldField, queryEngineConfig: QueryEngineConfig, options?: {
    allowEmptyPublicName: boolean;
} | undefined) => DateTimeField | NonDateTimeField;
export declare const valueIsOrDataType: (value: unknown, dataType: DataType) => boolean;
export declare const parseValue: (raw: string | number | null | boolean | Date | string[], type: DataType) => string | number | boolean | Date | null;
export declare const parseBooleanFromString: (raw: string, type: DataType) => string | boolean;
export declare const VALID_DATA_TYPES: DataType[];
export declare const isValidDataType: (type: string) => boolean;
export declare const toHumanReadable: (fieldTitle: string) => string;
export declare const dataTypeToHumanReadable: (dataType: DataType) => string;
export declare const toString: (value: null | string | number | Date | boolean | string[], formatDate?: ((date: Date) => string) | undefined, nullReplacement?: string) => string | null;
export declare const toStringShort: (value: null | string | number | Date, nullReplacement?: string) => import("react").ReactText;
export declare const removeFields: <T extends {
    id: string;
}>(originalFields: {
    id: string;
}[], fieldTitlesToRemove: string[]) => T[];
export declare const supportedOperators: (field: DataSet.Field, supportedOperators: QueryEngineConfig['supportedOperators'], textOverride?: TextOverride | undefined) => SupportedOperators;
export declare const getDefaultAggregateForField: <T extends Aggregate.SupportedAggregates>(field: {
    dataType: DataType;
}, supportedAggregates: T) => string;
export declare const supportedAggregatesForField: <T extends Aggregate.SupportedAggregates>(field: {
    dataType: DataType;
    supportedAggregateOptions?: SupportedAggregateOption[];
}, supportedAggregates: T) => Array<string>;
export declare const supportedAggregateOptions: <T extends Aggregate.SupportedAggregates>(field: {
    dataType: DataType;
}, supportedAggregates: T) => {
    label: string;
    value: keyof T;
}[];
export declare const timeDimensionTruncateToSelectOptions: (allowedTimeDimensionGranularities: QueryAttributes.TimeDimension.Truncate[], supportedTimeTruncFunctions: SupportedTimeTruncFunctions) => {
    label: string;
    value: QueryAttributes.TimeDimension.Truncate;
}[];
export declare const takeHighestGranularity: (timeDimensionGranularities: QueryAttributes.TimeDimension.Truncate[]) => QueryAttributes.TimeDimension.Truncate;
/**
 * Build the id of the field in string format
 */
export declare const id: (metric: {
    field: string;
    function: string;
}) => string;
export declare type DecodingFunctionsToCheck = {
    supportedAggregates: QueryEngineConfig['supportedAggregates'] | undefined;
    supportedTimeTruncFunctions: QueryEngineConfig['supportedTimeTruncFunctions'] | undefined;
    supportedTransformationFunctions: QueryEngineConfig['supportedTransformationFunctions'] | undefined;
};
/**
 * Decode a built id of the field. Requires all possible functions to be
 * able to do this.
 */
export declare const decodeId: (metric: string, functionsToCheck: DecodingFunctionsToCheck) => QueryAttributes.Measure;
/**
 * @deprecated
 * Use decodeId instead.
 * */
export declare const getQueryFieldIdFromResultFieldId: (fieldIdOrDatumKey: string, functionsToCheck: DecodingFunctionsToCheck) => {
    fieldId: string;
    function: QueryAttributes.Aggregate;
};
export declare const listValidFunctionsForDataType: (field: {
    dataType: DataType;
}, supportedTransformationFunctions: SupportedTransformationFunctions | SupportedAggregates) => string[];
export declare const removeField: <T extends {
    id: string;
}>(originalFields: T[], removeFields: (QueryAttributes.Dimension | QueryAttributes.Measure)[]) => T[];
export declare const upcastStringDimensionsToObject: (dimensions: QueryAttributes.Dimension[]) => QueryAttributes.Dimension[];
export declare const isArrayDataType: (field: {
    dataType: DataType;
}) => boolean;
export declare const supportedTransformationFunctions: (keys?: import("react").ReactText[] | undefined) => SupportedTransformationFunctions;
export declare const supportedAggregatesFunction: (queryEngineConfig: QueryEngineConfig, dataType: DataType, supportedAggregateOptions?: string[] | undefined) => SupportedAggregateOption[];
export declare const checkForNullValue: (dataSetId: string, dimensions: QueryAttributes.Dimension[] | null, timeDimension: QueryAttributes.TimeDimension | null, textOverride?: TextOverride | undefined, valueAlias?: {
    [id: string]: import("react").ReactText;
} | import("../ValueAlias/types").ValueAliasFunction | undefined, textOverrideKey?: string | undefined) => string | undefined;
