move static data

This commit is contained in:
2025-12-26 00:20:53 +01:00
parent c977defd6a
commit b6cbb81388
63 changed files with 1482 additions and 418 deletions

View File

@@ -1,6 +1,7 @@
import { BaseApiClient } from '../base/BaseApiClient';
import { RacePenaltiesDTO } from '../../types/generated/RacePenaltiesDTO';
import { ApplyPenaltyCommandDTO } from '../../types/generated/ApplyPenaltyCommandDTO';
import type { PenaltyTypesReferenceDTO } from '../../types/PenaltyTypesReferenceDTO';
/**
* Penalties API Client
@@ -13,6 +14,11 @@ export class PenaltiesApiClient extends BaseApiClient {
return this.get<RacePenaltiesDTO>(`/races/${raceId}/penalties`);
}
/** Get allowed penalty types and semantics */
getPenaltyTypesReference(): Promise<PenaltyTypesReferenceDTO> {
return this.get<PenaltyTypesReferenceDTO>('/races/reference/penalty-types');
}
/** Apply a penalty */
applyPenalty(input: ApplyPenaltyCommandDTO): Promise<void> {
return this.post<void>('/races/penalties/apply', input);