import { AxiosHeaders } from 'axios';
export interface CustomAxiosHeaders extends AxiosHeaders {
    'X-source'?: string;
    'X-Source-Auth'?: string;
}
/**
 * Asychronous fetch
 * @param {*} urls base url or an array of base urls e.g [url1,url2]
 * @param {*} headers
 */
export declare const fetcher: (urls: string | string[] | null, headers?: any, parallel?: boolean) => any;
/**
 * Synchronous Fetch
 * @param {*} url base Url
 * @param {*} headers Headers
 */
export declare const awaitFetcher: (url: string, _headers?: AxiosHeaders) => Promise<any>;
export interface PostProps {
    urls: string | string[] | null;
    data?: any;
    headers?: AxiosHeaders;
    method?: string;
    parallel?: boolean;
}
/**
 * Post data using async fetch
 * @param {*} url
 * @param {*} headers
 * @param {*} method
 * @param {*} data
 */
export declare const fetcherSave: ({ urls, data, method, headers, parallel }: PostProps) => Promise<any>;
/**
 * Save data to datastore
 * @param {*} url
 * @param {*} headers
 * @param {*} namespace
 * @param {*} data
 * @param {*} mergeKey
 * @param {*} updatePath
**/
export declare const serviceUpdateDataStore: (url: any, headers: any, namespace: any, data: any[], mergeKey: string | undefined, updatePath: string) => Promise<string>;
/**
 * useFetchAPI Hook
 * @param {*} url
 * @param {*} headers
 * @param {*} validate
 * @example "const [query, setQuery] = useState('');

    const url = query && `https://url.app?query=${query}`;

    const { status, data, error } = useFetchApi(url,headers);"
 */
export declare const useFetchApi: (url: any, headers?: any, validate?: boolean) => {
    isLoading: boolean;
    data: any;
    loading: boolean;
    error: unknown;
    isError: true;
    isLoadingError: false;
    isRefetchError: true;
    isSuccess: false;
    status: "error";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
} | {
    isLoading: boolean;
    data: any;
    loading: boolean;
    error: unknown;
    isError: false;
    isLoadingError: false;
    isRefetchError: false;
    isSuccess: true;
    status: "success";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
} | {
    isLoading: boolean;
    data: any;
    loading: boolean;
    error: unknown;
    isError: true;
    isLoadingError: true;
    isRefetchError: false;
    isSuccess: false;
    status: "error";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
} | {
    isLoading: boolean;
    data: any;
    loading: boolean;
    error: unknown;
    isError: false;
    isLoadingError: false;
    isRefetchError: false;
    isSuccess: false;
    status: "loading";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
};
/**
 * useAwaitFetchApi Hook
 * @param {*} url
 * @param {*} headers
 * @param {*} validate
 * @returns
 */
export declare const useAwaitFetchApi: (url: any, headers?: any, validate?: boolean) => {
    data: any;
    loading: boolean;
    error: unknown;
    isError: true;
    isLoadingError: false;
    isRefetchError: true;
    isSuccess: false;
    status: "error";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
} | {
    data: any;
    loading: boolean;
    error: unknown;
    isError: false;
    isLoadingError: false;
    isRefetchError: false;
    isSuccess: true;
    status: "success";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
} | {
    data: any;
    loading: boolean;
    error: unknown;
    isError: true;
    isLoadingError: true;
    isRefetchError: false;
    isSuccess: false;
    status: "error";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
} | {
    data: any;
    loading: boolean;
    error: unknown;
    isError: false;
    isLoadingError: false;
    isRefetchError: false;
    isSuccess: false;
    status: "loading";
    dataUpdatedAt: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: unknown;
    errorUpdateCount: number;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetching: boolean;
    isStale: boolean;
    refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<any, unknown>>;
    remove: () => void;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
};
/**
 * Use Save  Hook
 * @returns
 */
export declare const useSaveData: () => {
    isLoading: boolean;
    data: any;
    mutate: import("@tanstack/react-query").UseMutateFunction<any, unknown, PostProps, unknown>;
    error: unknown;
    isError: false;
    isIdle: true;
    isSuccess: false;
    status: "idle";
    reset: () => void;
    context: unknown;
    failureCount: number;
    failureReason: unknown;
    isPaused: boolean;
    variables: PostProps | undefined;
    mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<any, unknown, PostProps, unknown>;
} | {
    isLoading: boolean;
    data: any;
    mutate: import("@tanstack/react-query").UseMutateFunction<any, unknown, PostProps, unknown>;
    error: unknown;
    isError: false;
    isIdle: false;
    isSuccess: false;
    status: "loading";
    reset: () => void;
    context: unknown;
    failureCount: number;
    failureReason: unknown;
    isPaused: boolean;
    variables: PostProps | undefined;
    mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<any, unknown, PostProps, unknown>;
} | {
    isLoading: boolean;
    data: any;
    mutate: import("@tanstack/react-query").UseMutateFunction<any, unknown, PostProps, unknown>;
    error: unknown;
    isError: true;
    isIdle: false;
    isSuccess: false;
    status: "error";
    reset: () => void;
    context: unknown;
    failureCount: number;
    failureReason: unknown;
    isPaused: boolean;
    variables: PostProps | undefined;
    mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<any, unknown, PostProps, unknown>;
} | {
    isLoading: boolean;
    data: any;
    mutate: import("@tanstack/react-query").UseMutateFunction<any, unknown, PostProps, unknown>;
    error: unknown;
    isError: false;
    isIdle: false;
    isSuccess: true;
    status: "success";
    reset: () => void;
    context: unknown;
    failureCount: number;
    failureReason: unknown;
    isPaused: boolean;
    variables: PostProps | undefined;
    mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<any, unknown, PostProps, unknown>;
};
