/**
 * Application Port: IDriverStatsRepository
 * 
 * Repository interface for storing and retrieving computed driver statistics.
 * This is used for caching computed stats and serving frontend data.
 */

import type { DriverStats } from '../../application/use-cases/IDriverStatsUseCase';

export interface IDriverStatsRepository {
  /**
   * Get stats for a specific driver
   */
  getDriverStats(driverId: string): Promise<DriverStats | null>;

  /**
   * Get stats for a specific driver (synchronous)
   */
  getDriverStatsSync(driverId: string): DriverStats | null;

  /**
   * Save stats for a specific driver
   */
  saveDriverStats(driverId: string, stats: DriverStats): Promise<void>;

  /**
   * Get all driver stats
   */
  getAllStats(): Promise<Map<string, DriverStats>>;

  /**
   * Clear all stats
   */
  clear(): Promise<void>;
}