/** * Application Port: IDriverRepository * * Repository interface for Driver entity CRUD operations. * Defines async methods using domain entities as types. */ import { Driver } from '../../domain/entities/Driver'; export interface IDriverRepository { /** * Find a driver by ID */ findById(id: string): Promise; /** * Find a driver by iRacing ID */ findByIRacingId(iracingId: string): Promise; /** * Find all drivers */ findAll(): Promise; /** * Create a new driver */ create(driver: Driver): Promise; /** * Update an existing driver */ update(driver: Driver): Promise; /** * Delete a driver by ID */ delete(id: string): Promise; /** * Check if a driver exists by ID */ exists(id: string): Promise; /** * Check if an iRacing ID is already registered */ existsByIRacingId(iracingId: string): Promise; }