import axios, { type AxiosInstance, type AxiosRequestConfig } from "axios"; declare global { var toonAxios: AxiosInstance | undefined; } export interface ToonFetchOptions extends Omit { /** * The payload to send. If `Content-Type` is `application/toon` (default when data is provided), * this will automatically be serialized to TOON format. */ data?: any; /** * Raw body string/buffer, overrides `data` if provided. */ body?: BodyInit | null; /** * Optional bearer token convenience helper. */ token?: string | null | (() => string | null | undefined); } export interface ToonFetchResponse { data: T | null; response: Response; } export interface ToonClientOptions extends ToonFetchOptions { baseURL?: string; } export declare const toonAxios: axios.AxiosInstance; export declare function configureToonFetch(options?: ToonClientOptions): AxiosInstance; export declare function createToonAxios(options?: ToonClientOptions): AxiosInstance; /** * A wrapper around the native `fetch` API that automatically handles * `application/toon` content types for both request and response. */ export declare function toonFetch(input: RequestInfo | URL, init?: ToonFetchOptions): Promise>;