import { QueryAttributes } from '../QueryAttributes/types';
import { BaseField, DataType, NonDateTimeField } from '../Field/types';
import { Rules } from './Rules/types';
import { Metric } from './CustomMetric/types';
declare type BaseCustomField = Omit<NonDateTimeField, 'dashboardFilterGroups'>;
declare type SimpleMath = {
    leftFieldId: string;
    operator: MathOperator;
    rightFieldId: string;
};
declare type RoundedNumber = {
    roundToDecimalPlaces: 0 | 2;
    fieldId: string;
};
export declare type Conditional = {
    fieldId: string;
    function: string;
    rule: QueryAttributes.Filter[][];
};
export declare type Percentage = {
    version: 2;
    denominatorFieldId: string;
    denominatorAggregate: string;
    numeratorFieldId?: string | null;
    numeratorAggregate?: string | null;
    denominatorScope?: 'all' | 'withinGrouping';
    numeratorFilter?: QueryAttributes['filter'];
    denominatorFilter?: QueryAttributes['filter'];
    dataType: DataType;
};
export declare type AggregateNested = {
    operator: MathOperator;
    fieldId: string;
    /** @deprecated ignore this outside of upcasting */
    aggregate?: string;
    function: string;
};
export declare type AggregateMath = {
    leftFieldId: string;
    leftFunction: string;
    leftNested?: AggregateNested;
    operator: MathOperator;
    rightFieldId: string;
    rightFunction: string;
    rightNested?: AggregateNested;
    /** @deprecated ignore this outside of upcasting */
    leftAggregate?: string;
    /** @deprecated ignore this outside of upcasting */
    rightAggregate?: string;
};
export declare type DateCalculation = {
    leftFieldId: string;
    rightFieldId: string;
    dateCalculationFunction: 'seconds_between' | 'minutes_between' | 'hours_between' | 'days_between';
};
export declare type PercentageField = BaseCustomField & Percentage;
export declare type RoundedNumberField = BaseCustomField & RoundedNumber;
export declare type DateCalculationField = BaseCustomField & DateCalculation;
export declare type AggregateMathField = BaseCustomField & AggregateMath;
export declare type ConditionalField = BaseCustomField & Conditional;
export declare type AliasFieldType = BaseCustomField & {
    allowedFields: Array<{
        id: string;
    }>;
};
export declare type MetricField = BaseCustomField & {
    metric: Metric;
};
export declare type SimpleMathField = BaseCustomField & SimpleMath & {
    dataType: 'number';
};
export declare type RulesField = BaseField & {
    rules: Rules[];
    dataType: 'string' | 'number';
};
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | RulesField | RoundedNumberField | DateCalculationField | ConditionalField | MetricField | AliasFieldType;
export declare type MathOperator = '*' | '-' | '/' | '+';
export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber' | 'dateCalculation' | 'conditional' | 'customBuildMetric';
export declare enum AcceptedTypes {
    Maths = "maths",
    IfStatement = "ifStatement",
    Aggregates = "aggregates"
}
export {};
