import { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios'; /** * HTTP client configuration */ export interface HttpClientConfig { readonly baseURL?: string; readonly timeout?: number; readonly headers?: Record; readonly auth?: AuthConfig; readonly retryConfig?: RetryConfig; readonly rateLimitConfig?: RateLimitConfig; readonly interceptors?: InterceptorConfig; } /** * Authentication configuration */ export interface AuthConfig { readonly type: 'bearer' | 'basic' | 'apikey' | 'oauth'; readonly token?: string; readonly username?: string; readonly password?: string; readonly apiKey?: string; readonly apiKeyHeader?: string; readonly apiKeyQueryParam?: string; } /** * Retry configuration */ export interface RetryConfig { readonly enabled: boolean; readonly maxAttempts?: number; readonly retryableStatusCodes?: number[]; readonly retryableErrors?: string[]; } /** * Rate limit configuration */ export interface RateLimitConfig { readonly enabled: boolean; readonly requestsPerSecond?: number; readonly requestsPerMinute?: number; readonly requestsPerHour?: number; } /** * Interceptor configuration */ export interface InterceptorConfig { readonly request?: RequestInterceptor[]; readonly response?: ResponseInterceptor[]; readonly error?: ErrorInterceptor[]; } /** * Request interceptor */ export interface RequestInterceptor { readonly onFulfilled: (config: AxiosRequestConfig) => AxiosRequestConfig | Promise; readonly onRejected?: (error: any) => any; } /** * Response interceptor */ export interface ResponseInterceptor { readonly onFulfilled: (response: AxiosResponse) => AxiosResponse | Promise; readonly onRejected?: (error: any) => any; } /** * Error interceptor */ export interface ErrorInterceptor { readonly onRejected: (error: AxiosError) => any; } /** * HTTP request options */ export interface HttpRequestOptions { readonly method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS'; readonly url: string; readonly headers?: Record; readonly params?: Record; readonly data?: any; readonly timeout?: number; readonly responseType?: 'json' | 'text' | 'blob' | 'arraybuffer' | 'stream'; readonly validateStatus?: (status: number) => boolean; } /** * HTTP response */ export interface HttpResponse { readonly status: number; readonly statusText: string; readonly headers: Record; readonly data: T; readonly config: AxiosRequestConfig; } /** * HTTP error */ export interface HttpError { readonly code: string; readonly message: string; readonly statusCode?: number; readonly statusText?: string; readonly response?: HttpResponse; readonly request?: any; readonly retryable: boolean; } /** * Progress callback */ export interface ProgressCallback { (progress: ProgressInfo): void; } /** * Progress information */ export interface ProgressInfo { readonly loaded: number; readonly total?: number; readonly percent?: number; } //# sourceMappingURL=types.d.ts.map