import type { AxiosInstance } from 'axios'; export interface ApiFailureInfo { url: string; method?: string; status?: number; trace_id?: string; } export interface HttpClientConfig { /** Fully-resolved base URL, e.g. `${getBaseUrlPlatform()}/api/v1` or `/api/v1`. */ baseURL: string; /** Request timeout in ms. Omit for no timeout (matches PlatformFrontend). */ timeout?: number; /** Static headers merged into the instance. Default sets JSON content-type + accept. */ defaultHeaders?: Record; /** Casing of the bearer header. Default `Authorization`. */ authHeaderName?: 'Authorization' | 'authorization'; getToken: () => string | undefined | null; getUserId: () => string | number | undefined | null; getFingerprint: () => string | undefined | null; /** Returns the locale string for `accept-language` (e.g. from a cookie). */ getLocale: () => string | undefined | null; /** Serialize query params, e.g. `(p) => qs.stringify(p, { arrayFormat: 'repeat' })`. */ paramsSerializer?: (params: unknown) => string; /** Called on a 401 response — e.g. dispatch logout, or reset token + redirect. */ onUnauthorized?: (error: unknown) => void | Promise; /** Called for any response error that carries a response (4xx/5xx). */ onApiFailure?: (info: ApiFailureInfo) => void; /** Request id generator. Defaults to `crypto.randomUUID()`. */ generateRequestId?: () => string; } export declare function createHttpClient(config: HttpClientConfig): AxiosInstance; //# sourceMappingURL=createHttpClient.d.ts.map