import { Select } from 'node-sql-parser'; import { Query, TableData } from '../types'; export type SQLAst = Select; export type ASTParserPipe = (query: Partial, context: ASTParserContext) => Partial; export type ASTParserContext = { ast: SQLAst; dataSource: TableData; fieldInfo: SimpleFieldInfo[]; replaceMap: Map; }; export type DataQueryResponse = { THOUGHT?: string; sql: string; fieldInfo: { fieldName: string; description?: string; }[]; }; export type SimpleFieldInfo = { fieldName: string; description?: string; type: DataType; role: ROLE; }; export declare enum DataType { INT = "int", STRING = "string", FLOAT = "float", DATE = "date" } export declare enum ROLE { DIMENSION = "dimension", MEASURE = "measure" }