import { AxiosInstance } from "axios"; import { CustomHeaders } from "./interfaces"; /** * Creates a pre-configured Axios instance for talking to the Quran API. * * The returned instance: * - Reuses TCP/TLS connections via a keep-alive agent for lower latency. * - Treats any `2xx`–`4xx` status as a *resolved* response so that callers can * inspect 4xx payloads (e.g. validation errors) without `try/catch`. Only * `5xx` and transport failures reject the promise. * - Unwraps the response body in a response interceptor, meaning callers * receive the JSON payload directly instead of an `AxiosResponse` envelope. * * @param baseURL Base URL for every request. Defaults to {@link config.API_BASE_URL}. * @param token Optional bearer token; when supplied it is attached to * every outgoing request as `Authorization: Bearer `. * @param customHeaders Extra headers merged into the default header set. * @returns A ready-to-use {@link AxiosInstance}. */ declare const Api: (baseURL?: string, token?: string, customHeaders?: CustomHeaders) => AxiosInstance; export default Api;