import { Observable } from 'rxjs';
import { IAdaptableService } from './IAdaptableService';
import { Column, IRowNode } from 'ag-grid-enterprise';
import { CellDataChangedInfo } from '../../../AdaptableState/Common/CellDataChangedInfo';
import { RowDataChangedInfo } from '../../../AdaptableState/Common/RowDataChangedInfo';
import { AdaptableModule } from '../../../AdaptableState/Common/Types';
import { AggregatedScalarFunctionName, ScalarAggregationParameter } from '../../ExpressionFunctions/aggregatedScalarExpressionFunctions';
import { AggregatedBooleanFunctionName, BooleanAggregationParameter } from '../../ExpressionFunctions/aggregatedBooleanExpressionFunctions';
import { BooleanFunctionName } from '../../ExpressionFunctions/booleanExpressionFunctions';
import { ScalarFunctionName } from '../../ExpressionFunctions/scalarExpressionFunctions';
import { ObservableFunctionName } from '../../ExpressionFunctions/observableExpressionFunctions';
import { ExpressionFunctionMap } from '../../../parser/src/types';
export interface IQueryLanguageService extends IAdaptableService {
    evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: IRowNode, evalContext?: {
        dataChangedEvent?: CellDataChangedInfo;
        pivotResultColumn?: Column;
    }): boolean;
    evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
    evaluateObservableExpression(expression: string, module: AdaptableModule): Observable<CellDataChangedInfo | RowDataChangedInfo>;
    evaluateAggregatedBooleanExpression(expression: string, module: AdaptableModule): BooleanAggregationParameter;
    evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule, getRowNodes?: () => IRowNode[]): ScalarAggregationParameter;
    validateBoolean(expression: string, module: AdaptableModule, config?: {
        force?: boolean;
    }): {
        isValid: boolean;
        errorMessage: string;
    };
    validateObservable(expression: string, module: AdaptableModule): {
        isValid: boolean;
        errorMessage: string;
    };
    validateAggregatedBoolean(expression: string, module: AdaptableModule): {
        isValid: boolean;
        errorMessage: string;
    };
    validateAggregatedScalar(expression: string, module: AdaptableModule): {
        isValid: boolean;
        errorMessage: string;
    };
    computeAggregatedBooleanValue(expression: string, module: AdaptableModule): boolean;
    getModuleExpressionFunctionsMap(module: AdaptableModule): ModuleExpressionFunctionsMap;
    getColumnsFromExpression(input: string): string[];
    getNamedQueryNamesFromExpression(input: string): string[];
    evaluateCustomQueryVariable(functionName: string, args?: any[]): any;
    getExpressionWithColumnFriendlyNames(expression: string): string;
    getNodesFromExpression(input: string, nodeType: string): string[];
}
export interface ModuleExpressionFunctionsMap {
    booleanFunctions?: ExpressionFunctionMap<BooleanFunctionName>;
    scalarFunctions?: ExpressionFunctionMap<ScalarFunctionName>;
    observableFunctions?: ExpressionFunctionMap<ObservableFunctionName>;
    aggregatedBooleanFunctions?: ExpressionFunctionMap<AggregatedBooleanFunctionName>;
    aggregatedScalarFunctions?: ExpressionFunctionMap<AggregatedScalarFunctionName>;
}
