export type FetchOptions = RequestInit & {
    /**
     * The base URL to prepend to all request endpoints.
     * If provided, it handles slash normalization automatically.
     */
    baseUrl?: string;
    /**
     * Key-value pairs to be appended to the URL as a query string.
     */
    params?: Record<string, any>;
    /**
     * How to serialize arrays in query params:
     * 'repeat': ?tags=red&tags=blue
     * 'indices': ?tags[0]=red&tags[1]=blue
     * 'brackets': ?tags[]=red&tags[]=blue
     * @default 'indices'
     */
    paramArrayMode?: 'repeat' | 'indices' | 'brackets';
    /**
     * Explicitly define how to parse the response.
     * @default 'json'
     */
    responseType?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'formData';
    /**
     * Whether to trigger a global loading state/indicator.
     * Useful for showing progress bars or spinners in the UI via the FetchPlugin.
     */
    loadingIndicator?: boolean;
    /**
     * If true, prevents multiple identical requests from being sent simultaneously.
     * Subsequent calls will return the same promise as the initial in-flight request.
     * @default true
     */
    dedupe?: boolean;
    /**
     * Time-to-live for the response cache in milliseconds.
     * Set to 0 to disable caching for a specific request.
     * @default 0
     */
    cacheTTL?: number;
};
export type FetchResponse<T> = {
    data: T;
    status: number;
    statusText: string;
    headers: Headers;
};
export declare class FetchError extends Error {
    readonly response: Response;
    readonly messages: string[];
    constructor(response: Response, messages?: string[]);
}
export declare class FailedFetchError extends FetchError {
    constructor();
}
export declare class FetchCanceledError extends FetchError {
    constructor();
}
export declare function isFetchCanceledError(error: unknown): error is FetchCanceledError;
export type FetchInstance = {
    send: <T>(url: string, options?: FetchOptions) => Promise<FetchResponse<T>>;
    sendForm: <T>(url: string, formData?: FormData, options?: FetchOptions) => Promise<FetchResponse<T>>;
    get: <T>(url: string, options?: FetchOptions) => Promise<FetchResponse<T>>;
    post: <T>(url: string, data?: any, options?: FetchOptions) => Promise<FetchResponse<T>>;
    postForm: <T>(url: string, formData?: FormData, options?: FetchOptions) => Promise<FetchResponse<T>>;
    put: <T>(url: string, data?: any, options?: FetchOptions) => Promise<FetchResponse<T>>;
    putForm: <T>(url: string, formData?: FormData, options?: FetchOptions) => Promise<FetchResponse<T>>;
    patch: <T>(url: string, data?: any, options?: FetchOptions) => Promise<FetchResponse<T>>;
    patchForm: <T>(url: string, formData?: FormData, options?: FetchOptions) => Promise<FetchResponse<T>>;
    delete: <T>(url: string, options?: FetchOptions) => Promise<FetchResponse<T>>;
    head: <T>(url: string, options?: FetchOptions) => Promise<FetchResponse<T>>;
    options: <T>(url: string, options?: FetchOptions) => Promise<FetchResponse<T>>;
};
export declare function useFetch(defaultOptions?: FetchOptions): FetchInstance;
