import { TokenType } from './jwtStorageService'; interface ApiRequestOptions { method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; body?: any; headers?: Record; requiresAuth?: boolean; } interface ApiResponse { success: boolean; data?: T; error?: string; status: number; tokenType?: TokenType; } /** * Route-specific authentication triggers */ interface AuthTriggers { triggerEnochReAuth?: () => Promise; triggerOnairosReAuth?: () => Promise; triggerAuthTokenRefresh?: () => Promise; } /** * Create API client with route-based token management */ declare class ApiClient { private baseUrl; private authTriggers; constructor(baseUrl?: string, authTriggers?: AuthTriggers); /** * Make authenticated API request with route-based token selection * CRITICAL: Uses the correct token type based on route */ request(endpoint: string, options?: ApiRequestOptions): Promise>; private normalizeEndpointPath; private isSecurityMigratedRoute; private prepareRequestBody; private parseResponseBody; /** * Get request headers with user JWT token */ private getRequestHeaders; /** * Handle 401 by clearing JWT and triggering re-auth callback */ private handle401Error; /** * Trigger configured re-authentication callback */ private triggerReAuthForTokenType; /** * Cancel requests using a specific token type */ private cancelRequestsForTokenType; /** * Replace token and cancel related requests */ replaceTokenForType(tokenType: TokenType, newToken: string): Promise; /** * Debug: Get all current tokens */ debugTokens(): Promise>; /** * Set authentication triggers */ setAuthTriggers(triggers: AuthTriggers): void; /** * Convenience methods for common HTTP verbs */ get(endpoint: string, options?: Omit): Promise>; post(endpoint: string, body?: any, options?: Omit): Promise>; put(endpoint: string, body?: any, options?: Omit): Promise>; delete(endpoint: string, options?: Omit): Promise>; } export declare const apiClient: ApiClient; export { ApiClient }; export declare const authenticatedRequest: any; export declare const apiGet: any; export declare const apiPost: any; export declare const apiPut: any; export declare const apiDelete: any; export type { TokenType, ApiResponse, AuthTriggers }; export default apiClient; //# sourceMappingURL=apiClient.d.ts.map