/**
 * 🌐 Interfaces pour la configuration et les appels API
 * Utilisé par HttpClientService et ApiConfigurationService
 */

import { HttpHeaders, HttpParams } from '@angular/common/http';

export interface ApiConfig {
  baseUrl: string;
  dataUrl?: string;
  apiKey: string;
  dataApiKey?: string;
  timeout?: number;
  retryAttempts?: number;
  domain: string;
  cacheTtl?: number;
}

export interface HttpRequestOptions {
  headers?: HttpHeaders;
  params?: HttpParams;
  timeout?: number;
  retryAttempts?: number;
  skipAuth?: boolean;
  skipCache?: boolean;
}

export interface ApiResponse<T = any> {
  success: boolean;
  data: T;
  message?: string;
  code?: string;
  timestamp?: number;
}

export interface ApiError {
  status: number;
  statusText: string;
  message: string;
  timestamp: string;
  path: string;
  details?: any;
}

export interface RequestContext {
  url: string;
  method: string;
  startTime: number;
  requestId: string;
}