import type { AggregationClause, ColumnMetadata, ExpressionArg, ExpressionClause, ExpressionOperator, ExpressionOptions, ExpressionParts, FilterClause, JoinCondition, Query } from "./types";
type ErrorWithMessage = {
    message: string;
    friendly?: boolean;
};
export declare function expression(query: Query, stageIndex: number, expressionName: string, clause: ExpressionClause): Query;
export declare function withExpressionName<Clause extends AggregationClause | ExpressionClause>(clause: Clause, newName: string): Clause;
export declare function expressions(query: Query, stageIndex: number): ExpressionClause[];
export declare function expressionableColumns(query: Query, stageIndex?: number, expressionIndex?: number): ColumnMetadata[];
export declare function expressionParts(query: Query, stageIndex: number, clause: AggregationClause | ExpressionClause | FilterClause | JoinCondition): ExpressionParts;
export declare function expressionClause(operator: ExpressionOperator, args: (ExpressionArg | AggregationClause | ExpressionClause | FilterClause)[], options?: ExpressionOptions | null): ExpressionClause;
export declare function expressionClauseForLegacyExpression(query: Query, stageIndex: number, mbql: any): ExpressionClause;
export declare function legacyExpressionForExpressionClause(query: Query, stageIndex: number, expressionClause: ExpressionClause | AggregationClause | FilterClause): any;
export type ExpressionMode = "expression" | "aggregation" | "filter";
export declare function diagnoseExpression(query: Query, stageIndex: number, expressionMode: ExpressionMode, mbql: any, expressionIndex?: number): ErrorWithMessage | null;
export {};
