/// <reference types="parse" />
import { Dispatch, SetStateAction } from 'react';
import { SWRConfiguration, SWRResponse } from 'swr';
import { SearchResult } from './types/common';
import { IQLParams } from './types/iql';
import { Item } from './types/models';
import Parse from './parse';
export declare enum FetchMethod {
    Default = "find",
    All = "findAll",
    First = "first",
    Count = "count"
}
export declare function fetcher(className: string, query: string, fetchMethod: FetchMethod, options: string): Promise<any>;
declare const useParseQuery: (query: Parse.Query, fetchMethod?: FetchMethod, config?: SWRConfiguration, options?: {}) => SWRResponse<any, any>;
export default useParseQuery;
interface UseFindResult<T extends Parse.Object<Parse.Attributes>> {
    results?: T[];
    count?: number;
    error?: Error;
    isLoading: boolean;
    reload: () => void;
}
interface UseFirstResult<T extends Parse.Object<Parse.Attributes>> {
    result?: T;
    error?: Error;
    isLoading: boolean;
    reload: () => Promise<void>;
}
export declare const useFind: <T extends Parse.Object<Parse.Attributes>>(query: Parse.Query<T>, config?: SWRConfiguration) => UseFindResult<T>;
export declare const useFirst: <T extends Parse.Object<Parse.Attributes>>(query: Parse.Query<T>, config?: SWRConfiguration) => UseFirstResult<T>;
export declare function useCount(query: Parse.Query, config?: SWRConfiguration): SWRResponse<any, any>;
interface UseQueryGetResult<T> {
    data: T;
    loading: boolean;
    error: Error;
    reload: () => void;
}
export declare const useQueryGet: <T>(query: Parse.Query, id: string, config?: SWRConfiguration) => UseQueryGetResult<T>;
export interface UseParseSearchResult {
    items: Item[];
    loading: boolean;
    error: Error;
    reload: (data?: any, shouldRevalidate?: boolean) => Promise<SearchResult>;
    count: number;
    depths?: number[];
    hitIds?: string[];
    rows?: string[];
    isValidating?: boolean;
}
export declare const cloudSearch: (_queryKey: string, queryString: string) => Promise<SearchResult>;
export declare const useParseSearch: (queryBody: Record<string, unknown>, config?: SWRConfiguration) => UseParseSearchResult;
export declare const useIQLSearch: <T extends Parse.Object<Parse.Attributes> = Parse.Object<Parse.Attributes>>(iqlParams: IQLParams | null, config?: SWRConfiguration, dispatch?: Dispatch<SetStateAction<any>>) => UseParseSearchResult;
