refactor dtos to ports
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export interface AcceptSponsorshipInputPort {
|
||||
requestId: string;
|
||||
respondedBy: string; // driverId of the person accepting
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface ApproveLeagueJoinRequestInputPort {
|
||||
leagueId: string;
|
||||
requestId: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface ApproveTeamJoinRequestInputPort {
|
||||
teamId: string;
|
||||
requestId: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface CancelRaceInputPort {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Command for closing race event stewarding.
|
||||
*
|
||||
* Scheduled job that checks for race events with expired stewarding windows
|
||||
* and closes them, triggering final results notifications.
|
||||
*/
|
||||
export interface CloseRaceEventStewardingInputPort {
|
||||
// No parameters needed - finds all expired events automatically
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface CompleteDriverOnboardingInputPort {
|
||||
userId: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
displayName: string;
|
||||
country: string;
|
||||
timezone?: string;
|
||||
bio?: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface CompleteRaceInputPort {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { LeagueVisibilityInput } from '../../dtos/LeagueVisibilityInput';
|
||||
|
||||
export interface CreateLeagueWithSeasonAndScoringInputPort {
|
||||
name: string;
|
||||
description?: string;
|
||||
/**
|
||||
* League visibility/ranking mode.
|
||||
* - 'ranked' (or legacy 'public'): Competitive, public, affects ratings. Requires min 10 drivers.
|
||||
* - 'unranked' (or legacy 'private'): Casual with friends, no rating impact.
|
||||
*/
|
||||
visibility: LeagueVisibilityInput;
|
||||
ownerId: string;
|
||||
gameId: string;
|
||||
maxDrivers?: number;
|
||||
maxTeams?: number;
|
||||
enableDriverChampionship: boolean;
|
||||
enableTeamChampionship: boolean;
|
||||
enableNationsChampionship: boolean;
|
||||
enableTrophyChampionship: boolean;
|
||||
scoringPresetId?: string;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface CreateSponsorInputPort {
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl?: string;
|
||||
logoUrl?: string;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface CreateTeamInputPort {
|
||||
name: string;
|
||||
tag: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface DashboardOverviewInputPort {
|
||||
driverId: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface DriverTeamInputPort {
|
||||
driverId: string;
|
||||
}
|
||||
10
core/racing/application/ports/input/FileProtestInputPort.ts
Normal file
10
core/racing/application/ports/input/FileProtestInputPort.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { ProtestIncident } from "@/racing/domain/entities/ProtestIncident";
|
||||
|
||||
export interface FileProtestInputPort {
|
||||
raceId: string;
|
||||
protestingDriverId: string;
|
||||
accusedDriverId: string;
|
||||
incident: ProtestIncident;
|
||||
comment?: string;
|
||||
proofVideoUrl?: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface JoinLeagueInputPort {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
4
core/racing/application/ports/input/JoinTeamInputPort.ts
Normal file
4
core/racing/application/ports/input/JoinTeamInputPort.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface JoinTeamInputPort {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface LeagueJoinRequestsInputPort {
|
||||
leagueId: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface LeaveTeamInputPort {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface RegisterForRaceInputPort {
|
||||
raceId: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface RejectTeamJoinRequestInputPort {
|
||||
requestId: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface TeamDetailsInputPort {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface TeamJoinRequestsInputPort {
|
||||
teamId: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface TeamMembersInputPort {
|
||||
teamId: string;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { Team } from '../../../domain/entities/Team';
|
||||
|
||||
export interface UpdateTeamInputPort {
|
||||
teamId: string;
|
||||
updates: Partial<Pick<Team, 'name' | 'tag' | 'description' | 'leagues'>>;
|
||||
updatedBy: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface WithdrawFromRaceInputPort {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user