import { IActivityHandler, IActivityContext, Deferrable } from "../../IActivityHandler";
import { MapProvider } from "./MapProvider";
/** Defines the inputs for the QueryTask activity. */
export interface QueryTaskInputs {
    /** The URL to the ArcGIS layer or table to query. Either url or layer is required. */
    url?: string;
    /** The ArcGIS layer or table to query. Either url or layer is required. */
    layer?: __esri.Layer;
    /** A where clause of the query. */
    where?: string;
    geometry?: __esri.Geometry;
    /** If true, each feature in the resulting Feature Set includes the geometry. Set to false (default) if you do not plan to include highlighted features on a map since the geometry takes up a significant portion of the response. */
    returnGeometry?: boolean;
    /** The spatial reference for the returned geometry. If not specified, the geometry is returned in the spatial reference of the service being queried. */
    outSpatialReference?: number | string | __esri.SpatialReference;
    outFields?: string | string[];
    /** The sorting order for the results. Specify ASC (ascending) or DESC (descending) after the field name to control the order. The default order is ASC. Order By Fields is only supported on dynamic layers and tables where supportsAdvancedQueries is true. Requires ArcGIS Server 10.1+. */
    orderByFields?: string | string[];
    /** If true, the result will contain distinct values based on the fields specified in the Output Fields property. Only applies if supportsAdvancedQueries property of the layer or table is true. Requires ArcGIS Server 10.1.1+. */
    returnDistinctValues?: boolean;
    /** The version of the geodatabase on which the query will be performed. This property applies to feature services. When querying dynamic layers, include gdbVersion in the layer definition rather than supplying it here. Requires ArcGIS Server 10.0+. */
    gdbVersion?: string;
    /** Distance to buffer input geometry. Query results will include features within the distance specified of the query geometry. Valid only for feature services hosted on ArcGIS Online. */
    distance?: number;
    /** Specify the number of decimal places for the geometries returned by the query operation. */
    geometryPrecision?: number;
    /** One or more field names that will be used to group the statistics. This is only valid when outStatistics has been defined. Requires ArcGIS Server 10.1+. */
    groupByFieldsForStatistics?: string | string[];
    /** The maximum allowable offset to be used for generalizing geometries returned by the query operation. The offset is in the units of spatialReference. If spatialReference is not defined, the spatial reference of the map is used. Requires ArcGIS Server 10+. */
    maxAllowableOffset?: number;
    /** Parameter to support querying feature services whose data source is a multipatch featureclass. Known values: xyFootprint. */
    multipatchOption?: string;
    /** Number of features to retrieve. Should be used in conjunction with query.start. Use this to implement paging and retrieve "pages" of results when querying. If not provided, but an instance of Query has a "start" property, num defaults to 10. Valid only for feature services hosted on ArcGIS Online. */
    count?: number;
    /** An object ID or an array of object IDs to query for. */
    ids?: number | number[];
    /** The definitions for one or more field-based statistics to be calculated. Only supported on layers and tables where supportsStatistics is set to true. If outStatistics is specified, the only other query parameters that will be used are Group By Fields For Statistics, Order By Fields, Text, Time Extent, and Where. Requires ArcGIS Server 10.1+. */
    outStatistics?: __esri.StatisticDefinition | __esri.StatisticDefinition[];
    /** Specify the pixel level to be identified on the X and Y axis. Defaults to the base resolution of the dataset if not specified. Applicable only to Image Service layers. */
    pixelSize?: __esri.Symbol;
    /** Used to project the geometry onto a virtual grid, likely representing pixels on the screen. Valid only for services hosted on ArcGIS Online. */
    quantizationParameters?: __esri.QueryQuantizationParameters;
    /** The layer source used with a dynamic layer. */
    source?: __esri.LayerDataSource | __esri.LayerMapSource;
    /** The spatial relationship to be applied on the input geometry while performing the query. */
    spatialRelationship?: "contains" | "crosses" | "intersects" | "envelope-intersects" | "index-intersects" | "overlaps" | "touches" | "within" | string;
    /** Zero-based index indicating where to begin retrieving features. Should be used in conjunction with query.num. Use this to implement paging and retrieve "pages" of results when querying. Features are sorted ascending by object ID by default. Valid only for feature services hosted on ArcGIS Online. */
    start?: number;
    /** Shorthand for a literal search text on the display field, equivalent to: Where <displayField> like '%%'. The text is case sensitive. This parameter is ignored if the where parameter is specified. You can determine what the display field is for a layer or table using the ArcGIS Services Directory. */
    text?: string;
    /** The time instant or the time extent to query. */
    timeExtent?: any;
    /** Distance unit. Valid only for feature services hosted on ArcGIS Online. Known values: feet, miles, nautical-miles, us-nautical-miles, meters, kilometers. Default value: meters. */
    units?: string;
}
/** Defines the outputs for the query task activity. */
export interface QueryTaskOutputs {
    /** The first feature of the result feature set. */
    feature?: __esri.Graphic;
    /** The features of the result feature set. */
    features?: __esri.Graphic[];
    /** Indicates the feature set returned by the query operation. */
    results?: __esri.FeatureSet;
}
/** Performs an ArcGIS Server query. */
export declare class QueryTask implements IActivityHandler {
    static action: string;
    static suite: string;
    static getToJSONFunctionName(): "toJson" | "toJSON";
    static isToJSONMissing(obj: any): boolean;
    static isLayerMapSource(obj: __esri.LayerMapSource | __esri.LayerDataSource): obj is __esri.LayerMapSource;
    static addToJSON(obj: __esri.LayerMapSource | __esri.LayerDataSource): any;
    execute(inputs: QueryTaskInputs, context: IActivityContext, type: typeof MapProvider): Deferrable<QueryTaskOutputs>;
    private getEsriSpatialRelationship;
}
