import { Thenable, Uri, languages, editor, IRange, Position as MonacoPosition, Position } from 'monaco-editor';
import { ApiCategory, ApiContext } from '@arcgis/languages-api-utils';
import { SQLNode, DataTypeNode, BinaryNode } from '@arcgis/core/core/sql/types';
import { default as Field } from '@arcgis/core/layers/support/Field';
export interface ISqlExprWorker {
    doValidation: (modelId: string, context: ApiContext) => Thenable<editor.IMarkerData[]>;
    doComplete: (modelId: string, range: IRange, position: Position, context: ApiContext) => Thenable<languages.CompletionList>;
    getApiLibrary: (context: ApiContext) => Thenable<ApiCategory[]>;
}
export type ISqlExprWorkerAccessor = (...more: Uri[]) => Thenable<ISqlExprWorker>;
export interface ApiContextType {
    description: string;
    parameters: {
        name: string;
        type: string[] | string;
        description: string;
    }[];
    returnValue: string[] | string;
    examples: {
        code: string;
        description: string;
    }[];
    snippet: string[] | string;
    name: string;
    bundle: string;
}
export interface ICompletionContext {
    range: IRange;
    modelContent: string;
    position: MonacoPosition;
    lowestNode: SQLNode | undefined;
    subTree: SQLNode[];
    completionItems: languages.CompletionItem[];
}
/**
 * SQL Expression Literal. These are the types that occur within nodes of the AST generated by the peggy parser.
 **/
export type SqlExpressionLiteral = 
/**
 * "date"
 * "float"
 * "integer"
 * "real"
 * "smallint"
 * "time"
 * "timestamp"
 * "varchar"
 */
DataTypeNode["value"]["type"]
/**
 * "binary-expression"
 * "boolean"
 * "case-expression"
 * "column-reference"
 * "current-time"
 * "data-type"
 * "date"
 * "expression-list"
 * "function"
 * "interval"
 * "interval-period"
 * "interval-qualifier"
 * "null"
 * "number"
 * "parameter"
 * "string"
 * "time"
 * "timestamp"
 * "unary-expression"
 * "when-clause"
 */
 | SQLNode["type"];
export type NodeReturnType = SqlExpressionLiteral | "time-only" | "unknown_function";
export type ArcGISFieldType = 
/**
 * "string"
 * "date"
 * "integer"
 * "small-integer"
 * "big-integer"
 * "single"
 * "double"
 * "long"
 * "date-only"
 * "time-only"
 * "timestamp-offset"
 * "oid"
 * "geometry"
 * "blob"
 * "raster"
 * "guid"
 * "global-id"
 * "xml"
 */
Field["type"];
export type SqlExpOperator = BinaryNode["operator"];
