import { type UseQueryResult as TanstackUseQueryResult } from '@tanstack/react-query';
/**
 * Additional request configuration options for the `useFetch` hook.
 */
export type RequestConfig = {
    /**
     * Indicates that the request body is not a JSON object.
     */
    nonJSONBody?: boolean;
    /**
     * Indicates that the response should be treated as a Blob.
     */
    returnBlob?: boolean;
};
/**
 * The result of the `useFetch` hook.
 * Return value of the `useQuery` hook from `@tanstack/react-query`.
 *
 * @see https://tanstack.com/query/v4/docs/framework/react/reference/useQuery
 * @template TData - The type of the data returned by the fetch request
 * @template TError - The type of the error returned by the fetch request
 */
export type UseQueryResult<TData, TError> = TanstackUseQueryResult<TData, TError>;
/**
 * React hook that allows to make authorized fetch request to any Sisense API.
 *
 * @example
 ```tsx
  const { data, isLoading, error } = useFetch<unknown, Error>('api/v1/elasticubes/getElasticubes', {
    method: 'POST',
  });
 ```
 * @returns Query state that contains the status of the query execution, the result data, or the error if any occurred
 * @group Fusion Assets
 */
export declare const useFetch: <TData = unknown, TError = unknown>(path: string, init?: RequestInit | undefined, options?: {
    requestConfig?: RequestConfig | undefined;
    enabled?: boolean | undefined;
} | undefined) => UseQueryResult<TData, TError>;
