import { type PoolOptions, type RawResponse } from './pool'; type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; export interface RequestConfig { headers?: Record; timeout?: number; signal?: AbortSignal; } /** * Config para request() crudo. Además de headers/timeout/signal admite un * body que se reenvía tal cual: si es Buffer/string/Uint8Array se pasa sin * tocar (ideal para binarios y multipart ya serializado); si es objeto plano * se serializa a JSON. */ export interface RawRequestConfig extends RequestConfig { body?: string | Buffer | Uint8Array | unknown; } export interface IHttpClient { get(url: string, config?: RequestConfig): Promise; post(url: string, data?: unknown, config?: RequestConfig): Promise; put(url: string, data?: unknown, config?: RequestConfig): Promise; patch(url: string, data?: unknown, config?: RequestConfig): Promise; delete(url: string, config?: RequestConfig): Promise; buffer(url: string, config?: RequestConfig): Promise; text(url: string, config?: RequestConfig): Promise; /** * Devuelve el response completo (status, headers, body como Buffer) sin * parsear JSON y sin lanzar en 4xx/5xx. Pensado para proxy/gateway. */ request(method: Method, url: string, config?: RawRequestConfig): Promise; } export declare const client: IHttpClient; export declare const http: IHttpClient; export declare class DedicatedClient implements IHttpClient { private readonly baseURL; private readonly pool; constructor(baseURL: string, options?: PoolOptions); get(path: string, config?: RequestConfig): Promise; post(path: string, data?: unknown, config?: RequestConfig): Promise; put(path: string, data?: unknown, config?: RequestConfig): Promise; patch(path: string, data?: unknown, config?: RequestConfig): Promise; delete(path: string, config?: RequestConfig): Promise; buffer(path: string, config?: RequestConfig): Promise; text(path: string, config?: RequestConfig): Promise; request(method: Method, path: string, config?: RawRequestConfig): Promise; destroy(): Promise; private execute; } export declare function createClient(baseURL: string, options?: PoolOptions): DedicatedClient; export {}; //# sourceMappingURL=client.d.ts.map