Fix new Frontend 4

This commit is contained in:
Urtzi Alfaro
2025-08-03 20:42:29 +02:00
parent f9d52d6719
commit 2b358e2a7a
6 changed files with 102 additions and 110 deletions

View File

@@ -4,15 +4,10 @@
* Central entry point for all API functionality
*/
// Setup interceptors on import
import { setupInterceptors } from './client/interceptors';
setupInterceptors();
// Export main API client and services
// Export main API client first
export { apiClient } from './client';
export { api } from './services';
// Export all services individually
// Export all services
export {
authService,
tenantService,
@@ -20,7 +15,7 @@ export {
trainingService,
forecastingService,
notificationService,
healthService,
api
} from './services';
// Export all hooks
@@ -35,37 +30,12 @@ export {
useApiHooks,
} from './hooks';
// Export WebSocket functionality
export {
WebSocketManager,
useWebSocket,
useTrainingWebSocket,
useForecastWebSocket,
} from './websocket';
// Export utilities
export {
ApiErrorHandler,
ResponseProcessor,
RequestValidator,
DataTransformer,
} from './utils';
// Export types
export * from './types';
// Export interceptors for manual control
export {
AuthInterceptor,
LoggingInterceptor,
TenantInterceptor,
ErrorRecoveryInterceptor,
PerformanceInterceptor,
setupInterceptors,
} from './client/interceptors';
// Export configuration
export { apiConfig, serviceEndpoints, featureFlags } from './client/config';
// Default export for convenience
export default api;
// Setup interceptors on import (move to end to avoid circular deps)
import { setupInterceptors } from './client/interceptors';
setupInterceptors();