import type { ApplyPenaltyCommandDTO } from '../../../types/generated/ApplyPenaltyCommandDTO'; import type { LeagueAdminProtestsDTO } from '../../../types/generated/LeagueAdminProtestsDTO'; import type { RaceProtestsDTO } from '../../../types/generated/RaceProtestsDTO'; import type { RequestProtestDefenseCommandDTO } from '../../../types/generated/RequestProtestDefenseCommandDTO'; import type { ReviewProtestCommandDTO } from '../../../types/generated/ReviewProtestCommandDTO'; import { BaseApiClient } from '../base/BaseApiClient'; /** * Protests API Client * * Handles all protest-related API operations. */ export class ProtestsApiClient extends BaseApiClient { /** Get protests for a league */ getLeagueProtests(leagueId: string): Promise { return this.get(`/leagues/${leagueId}/protests`); } /** Get a specific protest for a league */ getLeagueProtest(leagueId: string, protestId: string): Promise { return this.get(`/leagues/${leagueId}/protests/${protestId}`); } /** Apply a penalty */ applyPenalty(input: ApplyPenaltyCommandDTO): Promise { return this.post('/races/penalties/apply', input); } /** Request protest defense */ requestDefense(input: RequestProtestDefenseCommandDTO): Promise { return this.post('/races/protests/defense/request', input); } /** Review protest */ reviewProtest(input: ReviewProtestCommandDTO): Promise { return this.post(`/protests/${input.protestId}/review`, input); } /** Get protests for a race */ getRaceProtests(raceId: string): Promise { return this.get(`/races/${raceId}/protests`); } }