/**
* DevExtreme (data/query.d.ts)
* Version: 21.1.0 (build 21016-0316)
* Build date: Sat Jan 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import '../jquery_augmentation';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface Query {
    /**
     */
    aggregate(seed: any, step: Function, finalize: Function): Promise<any> & JQueryPromise<any>;
    /**
     */
    aggregate(step: Function): Promise<any> & JQueryPromise<any>;
    /**
     */
    avg(): Promise<number> & JQueryPromise<number>;
    /**
     */
    avg(getter: any): Promise<number> & JQueryPromise<number>;
    /**
     */
    count(): Promise<number> & JQueryPromise<number>;
    /**
     */
    enumerate(): Promise<any> & JQueryPromise<any>;
    /**
     */
    filter(criteria: Array<any>): Query;
    /**
     */
    filter(predicate: Function): Query;
    /**
     */
    groupBy(getter: any): Query;
    /**
     */
    max(): Promise<number | Date> & JQueryPromise<number | Date>;
    /**
     */
    max(getter: any): Promise<number | Date> & JQueryPromise<number | Date>;
    /**
     */
    min(): Promise<number | Date> & JQueryPromise<number | Date>;
    /**
     */
    min(getter: any): Promise<number | Date> & JQueryPromise<number | Date>;
    /**
     */
    select(getter: any): Query;
    /**
     */
    slice(skip: number, take?: number): Query;
    /**
     */
    sortBy(getter: any): Query;
    /**
     */
    sortBy(getter: any, desc: boolean): Query;
    /**
     */
    sum(): Promise<number> & JQueryPromise<number>;
    /**
     */
    sum(getter: any): Promise<number> & JQueryPromise<number>;
    /**
     */
    thenBy(getter: any): Query;
    /**
     */
    thenBy(getter: any, desc: boolean): Query;
    /**
     */
    toArray(): Array<any>;
}

/**
 * Creates a Query instance.
 */
declare function query(array: Array<any>): Query;

/**
 * Creates a Query instance that accesses a remote data service using its URL.
 */
declare function query(url: string, queryOptions: any): Query;


/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export default query;
