/// <reference types="parse" />
import { KeyedMutator } from 'swr';
import { Item, ViewType } from '@/lib/types/models';
import { SearchResult } from '../types/common';
export declare const enum ConnectionType {
    CONNECTING = "connecting",
    OPEN = "open",
    CREATE = "create",
    UPDATE = "update",
    DELETE = "delete",
    CLOSE = "close"
}
export declare const enum DispatchType {
    CREATE = "create",
    UPDATE = "update",
    DELETE = "delete"
}
interface IItemUpdateProps {
    items?: Item[];
    refreshData?: KeyedMutator<SearchResult>;
    type?: ViewType;
    dispatch?: (...rest: any[]) => void;
}
interface IItemUpdateReturn {
    loading: boolean;
    recordItemIds: string[];
    status: ConnectionType;
}
export declare function requestDelay(): void;
export declare function useWatchItemUpdate<T extends Parse.Object = Parse.Object>(props: IItemUpdateProps): Promise<IItemUpdateReturn | void>;
export declare function closeWatchItemUpdate(): void;
export {};
