/**
* DevExtreme (data/abstract_store.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';

import {
    LoadOptions
} from './load_options';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface StoreOptions<T = Store> {
    /**
     */
    errorHandler?: Function;
    /**
     */
    key?: string | Array<string>;
    /**
     */
    onInserted?: ((values: any, key: any | string | number) => any);
    /**
     */
    onInserting?: ((values: any) => any);
    /**
     */
    onLoaded?: ((result: Array<any>) => any);
    /**
     */
    onLoading?: ((loadOptions: LoadOptions) => any);
    /**
     */
    onModified?: Function;
    /**
     */
    onModifying?: Function;
    /**
     */
    onPush?: ((changes: Array<any>) => any);
    /**
     */
    onRemoved?: ((key: any | string | number) => any);
    /**
     */
    onRemoving?: ((key: any | string | number) => any);
    /**
     */
    onUpdated?: ((key: any | string | number, values: any) => any);
    /**
     */
    onUpdating?: ((key: any | string | number, values: any) => any);
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export default class Store {
    constructor(options?: StoreOptions)
    /**
     */
    byKey(key: any | string | number): Promise<any> & JQueryPromise<any>;
    /**
     */
    insert(values: any): Promise<any> & JQueryPromise<any>;
    /**
     */
    key(): any;
    /**
     */
    keyOf(obj: any): any;
    /**
     */
    load(): Promise<any> & JQueryPromise<any>;
    /**
     */
    load(options: LoadOptions): Promise<any> & JQueryPromise<any>;
    /**
     */
    off(eventName: string): this;
    /**
     */
    off(eventName: string, eventHandler: Function): this;
    /**
     */
    on(eventName: string, eventHandler: Function): this;
    /**
     */
    on(events: any): this;
    /**
     */
    push(changes: Array<any>): void;
    /**
     */
    remove(key: any | string | number): Promise<void> & JQueryPromise<void>;
    /**
     */
    totalCount(obj: { filter?: any, group?: any }): Promise<number> & JQueryPromise<number>;
    /**
     */
    update(key: any | string | number, values: any): Promise<any> & JQueryPromise<any>;
}
