/**
 * Carrier Types
 */

export enum CarrierStatus {
  ACTIVE = 'active',
  INACTIVE = 'inactive',
  MAINTENANCE = 'maintenance',
}

export interface Carrier {
  id: string;
  name: string;
  scac: string;
  status: CarrierStatus;
  apiEndpoint?: string;
  apiKey?: string;
  priority: number;
  rateLimit?: number;
  timeout?: number;
  createdAt: string;
  updatedAt: string;
}

export interface CarrierStats {
  carrierId: string;
  carrierName: string;
  totalRequests: number;
  successfulRequests: number;
  failedRequests: number;
  averageResponseTime: number;
  lastRequestAt?: string;
  errorRate: number;
  availability: number;
}

export interface CarrierHealthCheck {
  carrierId: string;
  status: 'healthy' | 'degraded' | 'down';
  responseTime: number;
  lastCheck: string;
  errors: string[];
}

export interface CreateCarrierInput {
  name: string;
  scac: string;
  apiEndpoint?: string;
  apiKey?: string;
  priority?: number;
  rateLimit?: number;
  timeout?: number;
}

export interface UpdateCarrierInput {
  name?: string;
  scac?: string;
  status?: CarrierStatus;
  apiEndpoint?: string;
  apiKey?: string;
  priority?: number;
  rateLimit?: number;
  timeout?: number;
}
