import type { ApiResponse, HttpDelegate, HttpMethod, HttpRequestOptions, StreamResponse } from './http.types'; /** * API manager: delegates HTTP requests to a pluggable implementation (fetch or axios). * Configure via setDelegate() before calling request(), get(), post(), postStream(), etc. */ export declare class ApiManager { private delegate; /** Sets the HTTP delegate (e.g. FetchApiDelegate or AxiosApiDelegate). Must be called before any request. */ setDelegate(delegate: HttpDelegate): void; /** Clears the current delegate. */ clear(): void; private ensureDelegate; /** Overload when caller expects ApiResponse. */ request>(method: HttpMethod, url: string, options?: Omit): Promise; request(method: HttpMethod, url: string, options?: HttpRequestOptions): Promise; /** GET request. */ get>(url: string, options?: Omit): Promise; get(url: string, options?: HttpRequestOptions): Promise; /** POST request (body + optional options). */ post>(url: string, body: any, options?: Omit): Promise; post(url: string, body: any, options?: HttpRequestOptions): Promise; /** PUT request. */ put>(url: string, body: any, options?: Omit): Promise; put(url: string, body: any, options?: HttpRequestOptions): Promise; /** PATCH request. */ patch>(url: string, body: any, options?: Omit): Promise; patch(url: string, body: any, options?: HttpRequestOptions): Promise; /** DELETE request. */ delete>(url: string, options?: Omit): Promise; delete(url: string, options?: HttpRequestOptions): Promise; /** Performs a request and returns the response body as a stream (e.g. for SSE). */ requestStream(method: HttpMethod, url: string, options?: HttpRequestOptions): Promise; /** POST request that returns the response body as a stream (e.g. for SSE). */ postStream(url: string, body: any, options?: HttpRequestOptions): Promise; } export default ApiManager;