import { ApplyPenaltyCommandDTO } from '../../../types/generated/ApplyPenaltyCommandDTO'; import { RacePenaltiesDTO } from '../../../types/generated/RacePenaltiesDTO'; import type { PenaltyTypesReferenceDTO } from '../../../types/PenaltyTypesReferenceDTO'; import { BaseApiClient } from '../base/BaseApiClient'; /** * Penalties API Client * * Handles all penalty-related API operations. */ export class PenaltiesApiClient extends BaseApiClient { /** Get penalties for a race */ getRacePenalties(raceId: string): Promise { return this.get(`/races/${raceId}/penalties`); } /** Get allowed penalty types and semantics */ getPenaltyTypesReference(): Promise { return this.get('/races/reference/penalty-types'); } /** Apply a penalty */ applyPenalty(input: ApplyPenaltyCommandDTO): Promise { return this.post('/races/penalties/apply', input); } }