import Collection from "@arcgis/core/core/Collection";
import type { Feature } from "../../data/Feature.js";
import type { FeatureSource } from "../../data/FeatureSource.js";
import { InitializableBase } from "../../support/InitializableBase.js";
import type { CountResult } from "../CountResult.js";
import { QueryOptions } from "./QueryOptions.js";
import type { QueryProvider } from "./QueryProvider.js";
/**
 * Defines the parameters necessary to perform a query.
 */
export interface QueryDefinition {
    /**
     * The source to query.
     */
    source: FeatureSource;
    /**
     * An SQL expression to match against, e.g. "lastName='Smith'".
     */
    where: string;
    /**
     * Additional options that affect the query.
     */
    options?: QueryOptions;
}
/**
 * Allows querying for features by SQL expression.
 */
export declare class QueryService extends InitializableBase {
    /**
     * Query providers that implement the query functionality. The collection
     * will be populated with built-in Geocortex providers, however providers
     * can be added or removed. The order is significant -- the first registered
     * provider that is able to handle a given
     * {@link data/FeatureSource!FeatureSource} will be used for that source (see
     * {@link tasks/query/QueryProvider!QueryProvider.isSupported}).
     */
    readonly providers: Collection<QueryProvider>;
    /**
     * Determines whether this service is able to query the given source, i.e.
     * whether there is at least one registered provider for that source.
     *
     * @param source The source to check.
     */
    isSupported(source: FeatureSource): boolean;
    /**
     * Queries the given feature sources provided in the query definitions for
     * features that match the query criteria.
     *
     * @param queries The queries to perform.
     */
    query(queries: QueryDefinition[]): AsyncIterable<Feature>;
    /**
     * Queries a given feature source for features that match the query
     * criteria.
     *
     * @param source The source to query.
     * @param where An SQL expression to match against, e.g. "lastName='Smith'".
     * @param options Additional options that affect the query.
     */
    query(source: FeatureSource, where: string, options?: QueryOptions): AsyncIterable<Feature>;
    /**
     * Counts the number of features that match the query criteria in a given
     * feature source.
     *
     * @param source The source to search.
     * @param where An SQL expression to match against, e.g. "lastName='Smith'".
     * @param options Additional options that affect the query.
     */
    count(source: FeatureSource, where: string, options?: QueryOptions): Promise<CountResult>;
    protected _onInitialize(): Promise<void>;
}
