move static data
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user