import { ProtestsApiClient } from '@/lib/api/protests/ProtestsApiClient'; import type { ProtestViewModel } from '@/lib/view-models/ProtestViewModel'; import type { RaceViewModel } from '@/lib/view-models/RaceViewModel'; import type { ProtestDriverViewModel } from '@/lib/view-models/ProtestDriverViewModel'; import type { ApplyPenaltyCommandDTO } from '@/lib/types/generated/ApplyPenaltyCommandDTO'; import type { RequestProtestDefenseCommandDTO } from '@/lib/types/generated/RequestProtestDefenseCommandDTO'; import type { ReviewProtestCommandDTO } from '@/lib/types/generated/ReviewProtestCommandDTO'; /** * Protest Service - DTO Only * * Returns raw API DTOs. No ViewModels or UX logic. * All client-side presentation logic must be handled by hooks/components. */ export class ProtestService { constructor(private readonly apiClient: ProtestsApiClient) {} async getLeagueProtests(leagueId: string): Promise { return this.apiClient.getLeagueProtests(leagueId); } async getProtestById(leagueId: string, protestId: string): Promise { return this.apiClient.getLeagueProtest(leagueId, protestId); } async applyPenalty(input: ApplyPenaltyCommandDTO): Promise { return this.apiClient.applyPenalty(input); } async requestDefense(input: RequestProtestDefenseCommandDTO): Promise { return this.apiClient.requestDefense(input); } async reviewProtest(input: ReviewProtestCommandDTO): Promise { return this.apiClient.reviewProtest(input); } async findByRaceId(raceId: string): Promise { return this.apiClient.getRaceProtests(raceId); } }