/** * HTTP CLIENT FACTORY * Creates a type-safe HTTP client with automatic auth header injection */ type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; export interface ClientConfig { baseUrl: string; timeout?: number; headers?: Record; } export interface RequestOptions { method?: Method; headers?: Record; body?: unknown; timeout?: number; } /** * HTTP Client with auth support and type safety */ export declare class HTTPClient { private baseUrl; private timeout; private headers; private getAuthToken?; constructor(config: ClientConfig); /** * Set auth token getter function * Called before each request to inject auth header */ setAuthTokenGetter(getter: () => string | null): void; /** * Generic request method */ request(endpoint: string, options?: RequestOptions): Promise; /** * GET request */ get(endpoint: string, options?: Omit): Promise; /** * POST request */ post(endpoint: string, body?: unknown, options?: Omit): Promise; /** * PUT request */ put(endpoint: string, body?: unknown, options?: Omit): Promise; /** * PATCH request */ patch(endpoint: string, body?: unknown, options?: Omit): Promise; /** * DELETE request */ delete(endpoint: string, options?: Omit): Promise; } /** * Create HTTP client instance * Used across the application for all REST API calls */ export declare function createHTTPClient(config: ClientConfig): HTTPClient; /** * Default API client pointing to Materi API service */ export declare const apiClient: HTTPClient; export {}; //# sourceMappingURL=client.d.ts.map