import { AxiosRequestConfig, AxiosResponse } from 'axios'; /** * Interface for standardized HTTP response */ export interface IHttpResponse { data: T; status: number; statusText: string; headers: Record; } /** * Interface for request configuration */ export interface IHttpRequestConfig { headers?: Record; params?: Record; timeout?: number; retries?: number; [key: string]: any; } /** * Main HTTP Client interface (Interface Segregation Principle) */ export interface IHttpClient { get(url: string, config?: IHttpRequestConfig): Promise>; post(url: string, data?: any, config?: IHttpRequestConfig): Promise>; put(url: string, data?: any, config?: IHttpRequestConfig): Promise>; delete(url: string, config?: IHttpRequestConfig): Promise>; patch(url: string, data?: any, config?: IHttpRequestConfig): Promise>; } /** * Interface for TLS configuration */ export interface ITLSConfig { caCertPath?: string; clientCertPath?: string; clientKeyPath?: string; rejectUnauthorized?: boolean; } /** * Interface for HTTP client configuration */ export interface IHttpClientConfig { baseURL: string; timeout?: number; headers?: Record; tls?: ITLSConfig; } /** * Interface for HTTPS agent factory (Dependency Inversion) */ export interface IHttpsAgentFactory { createAgent(tlsConfig?: ITLSConfig): any; }