import { Error } from '../returnTypes';
export declare type Params = {
    readonly endpoint: string;
    readonly method?: 'GET' | 'POST' | 'PATCH' | 'DELETE';
    readonly body?: object;
    _execute?: boolean;
};
/**
 * Ignore _execute. It is used for lazyAPI.
 * Add ?_format=hal_json or &_format=hal_json to the endpoint if it is required. Otherwise, _format=json will be added automatically.
 * @example
 * const { data, loading, error } = useAPI({ endpoint, method, body });
 */
export declare const useAPI: ({ body, method, endpoint, _execute }: Params) => {
    loading: boolean;
    error: Error;
    data: any;
};
