import { AxiosInstance, InternalAxiosRequestConfig, AxiosResponse } from 'axios'; import { Document } from 'openapi-client-axios'; type TokenArg = string | (() => string | Promise); declare const authorize: (client: T, token: TokenArg) => T; type RequestInterceptor = { type: 'request'; fulfilled: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise; rejected?: (error: unknown) => unknown; }; type ResponseInterceptor = { type: 'response'; fulfilled: (response: AxiosResponse) => AxiosResponse | Promise; rejected?: (error: unknown) => unknown; }; type Interceptor = RequestInterceptor | ResponseInterceptor; type HeadersConfig = Record; type OverridesConfig = Record; /** * An API handle that provides: * - `getClient()` — cached singleton * - `createClient()` — fresh instance * - Any operation method (e.g. `.getEntity(...)`) — auto-resolved via lazy singleton */ type ApiHandle = { /** Get the cached singleton client instance (lazy-initialized on first call) */ getClient: () => T; /** Create a fresh client instance (not cached) */ createClient: () => T; /** Get the full OpenAPI specification document (lazy-loaded) */ openapi: () => Promise; } & { [K in keyof T]: T[K]; }; export { type ApiHandle as A, type HeadersConfig as H, type Interceptor as I, type OverridesConfig as O, type TokenArg as T, authorize as a };