refactor racing use cases
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
export interface AcceptSponsorshipInputPort {
|
||||
requestId: string;
|
||||
respondedBy: string; // driverId of the person accepting
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface ApproveLeagueJoinRequestInputPort {
|
||||
leagueId: string;
|
||||
requestId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface ApproveTeamJoinRequestInputPort {
|
||||
teamId: string;
|
||||
requestId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface CancelRaceInputPort {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* 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
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface CompleteDriverOnboardingInputPort {
|
||||
userId: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
displayName: string;
|
||||
country: string;
|
||||
timezone?: string;
|
||||
bio?: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface CompleteRaceInputPort {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
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: 'ranked' | 'unranked' | 'public' | 'private';
|
||||
ownerId: string;
|
||||
gameId: string;
|
||||
maxDrivers?: number;
|
||||
maxTeams?: number;
|
||||
enableDriverChampionship: boolean;
|
||||
enableTeamChampionship: boolean;
|
||||
enableNationsChampionship: boolean;
|
||||
enableTrophyChampionship: boolean;
|
||||
scoringPresetId?: string;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface CreateSponsorInputPort {
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl?: string;
|
||||
logoUrl?: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
export interface CreateTeamInputPort {
|
||||
name: string;
|
||||
tag: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface DashboardOverviewInputPort {
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface DriverTeamInputPort {
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
export interface FileProtestInputPort {
|
||||
raceId: string;
|
||||
protestingDriverId: string;
|
||||
accusedDriverId: string;
|
||||
incident: {
|
||||
sessionType: string;
|
||||
lapNumber: number;
|
||||
cornerNumber?: number;
|
||||
description: string;
|
||||
severity: 'minor' | 'major' | 'severe';
|
||||
};
|
||||
comment?: string;
|
||||
proofVideoUrl?: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetDriverAvatarInputPort {
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetDriverRatingInputPort {
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface GetEntitySponsorshipPricingInputPort {
|
||||
entityType: 'league' | 'team' | 'driver';
|
||||
entityId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetLeagueCoverInputPort {
|
||||
leagueId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetLeagueLogoInputPort {
|
||||
leagueId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetLeagueScoringPresetByIdInputPort {
|
||||
presetId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetTeamLogoInputPort {
|
||||
teamId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface IsDriverRegisteredForRaceInputPort {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface JoinLeagueInputPort {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface JoinTeamInputPort {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface LeagueJoinRequestsInputPort {
|
||||
leagueId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* League visibility/ranking mode.
|
||||
* - 'ranked' (or legacy 'public'): Competitive, public, affects driver ratings. Min 10 drivers.
|
||||
* - 'unranked' (or legacy 'private'): Casual with friends, no rating impact.
|
||||
*/
|
||||
export interface LeagueVisibilityInputPort {
|
||||
visibility: 'ranked' | 'unranked' | 'public' | 'private';
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface LeaveTeamInputPort {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface ListLeagueScoringPresetsInputPort {
|
||||
// Empty interface for query with no parameters
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface ProcessPaymentInputPort {
|
||||
amount: number; // in cents
|
||||
payerId: string;
|
||||
description: string;
|
||||
metadata?: Record<string, unknown>;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetRaceRegistrationsInputPort {
|
||||
raceId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
export interface RefundPaymentInputPort {
|
||||
originalTransactionId: string;
|
||||
amount: {
|
||||
value: number;
|
||||
currency: string;
|
||||
};
|
||||
reason: string;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export interface RegisterForRaceInputPort {
|
||||
raceId: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface RejectTeamJoinRequestInputPort {
|
||||
requestId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface TeamDetailsInputPort {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface TeamJoinRequestsInputPort {
|
||||
teamId: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface TeamMembersInputPort {
|
||||
teamId: string;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export interface UpdateTeamInputPort {
|
||||
teamId: string;
|
||||
updates: {
|
||||
name?: string;
|
||||
tag?: string;
|
||||
description?: string;
|
||||
leagues?: string[];
|
||||
};
|
||||
updatedBy: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface VerifyPaymentInputPort {
|
||||
transactionId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface WithdrawFromRaceInputPort {
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
export interface AcceptSponsorshipOutputPort {
|
||||
requestId: string;
|
||||
sponsorshipId: string;
|
||||
status: 'accepted';
|
||||
acceptedAt: Date;
|
||||
platformFee: number;
|
||||
netAmount: number;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import type { League } from '../../../domain/entities/League';
|
||||
import type { Season } from '../../../domain/entities/season/Season';
|
||||
import type { LeagueScoringConfig } from '../../../domain/entities/LeagueScoringConfig';
|
||||
import type { Game } from '../../../domain/entities/Game';
|
||||
import type { LeagueScoringPresetOutputPort } from './LeagueScoringPresetOutputPort';
|
||||
|
||||
export interface LeagueEnrichedData {
|
||||
league: League;
|
||||
usedDriverSlots: number;
|
||||
season?: Season;
|
||||
scoringConfig?: LeagueScoringConfig;
|
||||
game?: Game;
|
||||
preset?: LeagueScoringPresetOutputPort;
|
||||
}
|
||||
|
||||
export interface AllLeaguesWithCapacityAndScoringOutputPort {
|
||||
leagues: LeagueEnrichedData[];
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import type { League } from '../../domain/entities/League';
|
||||
|
||||
export interface AllLeaguesWithCapacityOutputPort {
|
||||
leagues: League[];
|
||||
memberCounts: Record<string, number>;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
export type AllRacesStatus = 'scheduled' | 'running' | 'completed' | 'cancelled' | 'all';
|
||||
|
||||
export interface AllRacesListItem {
|
||||
id: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
strengthOfField: number | null;
|
||||
}
|
||||
|
||||
export interface AllRacesFilterOptions {
|
||||
statuses: { value: AllRacesStatus; label: string }[];
|
||||
leagues: { id: string; name: string }[];
|
||||
}
|
||||
|
||||
export interface AllRacesPageOutputPort {
|
||||
races: AllRacesListItem[];
|
||||
filters: AllRacesFilterOptions;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export interface ApplyForSponsorshipResultPort {
|
||||
requestId: string;
|
||||
status: 'pending';
|
||||
createdAt: Date;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface ApproveLeagueJoinRequestOutputPort {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface ApproveLeagueJoinRequestResultPort {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
export interface ChampionshipStandingsOutputPort {
|
||||
seasonId: string;
|
||||
championshipId: string;
|
||||
championshipName: string;
|
||||
rows: {
|
||||
participant: {
|
||||
id: string;
|
||||
type: 'driver' | 'team';
|
||||
name: string;
|
||||
};
|
||||
position: number;
|
||||
totalPoints: number;
|
||||
resultsCounted: number;
|
||||
resultsDropped: number;
|
||||
}[];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
export interface ChampionshipStandingsRowOutputPort {
|
||||
participant: {
|
||||
id: string;
|
||||
type: 'driver' | 'team';
|
||||
name: string;
|
||||
};
|
||||
position: number;
|
||||
totalPoints: number;
|
||||
resultsCounted: number;
|
||||
resultsDropped: number;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface CompleteDriverOnboardingOutputPort {
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface CreateLeagueOutputPort {
|
||||
leagueId: string;
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface CreateLeagueWithSeasonAndScoringOutputPort {
|
||||
leagueId: string;
|
||||
seasonId: string;
|
||||
scoringPresetId?: string;
|
||||
scoringPresetName?: string;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export interface CreateSponsorOutputPort {
|
||||
sponsor: {
|
||||
id: string;
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl?: string;
|
||||
logoUrl?: string;
|
||||
createdAt: Date;
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
export interface CreateTeamOutputPort {
|
||||
team: {
|
||||
id: string;
|
||||
name: string;
|
||||
tag: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
createdAt: Date;
|
||||
};
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
import type { FeedItemType } from '@core/social/domain/types/FeedItemType';
|
||||
|
||||
export interface DashboardDriverSummaryOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
rating: number | null;
|
||||
globalRank: number | null;
|
||||
totalRaces: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
consistency: number | null;
|
||||
}
|
||||
|
||||
export interface DashboardRaceSummaryOutputPort {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
isMyLeague: boolean;
|
||||
}
|
||||
|
||||
export interface DashboardRecentResultOutputPort {
|
||||
raceId: string;
|
||||
raceName: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
finishedAt: string;
|
||||
position: number;
|
||||
incidents: number;
|
||||
}
|
||||
|
||||
export interface DashboardLeagueStandingSummaryOutputPort {
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
position: number;
|
||||
totalDrivers: number;
|
||||
points: number;
|
||||
}
|
||||
|
||||
export interface DashboardFeedItemSummaryOutputPort {
|
||||
id: string;
|
||||
type: FeedItemType;
|
||||
headline: string;
|
||||
body?: string;
|
||||
timestamp: string;
|
||||
ctaLabel?: string;
|
||||
ctaHref?: string;
|
||||
}
|
||||
|
||||
export interface DashboardFeedSummaryOutputPort {
|
||||
notificationCount: number;
|
||||
items: DashboardFeedItemSummaryOutputPort[];
|
||||
}
|
||||
|
||||
export interface DashboardFriendSummaryOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
}
|
||||
|
||||
export interface DashboardOverviewOutputPort {
|
||||
currentDriver: DashboardDriverSummaryOutputPort | null;
|
||||
myUpcomingRaces: DashboardRaceSummaryOutputPort[];
|
||||
otherUpcomingRaces: DashboardRaceSummaryOutputPort[];
|
||||
/**
|
||||
* All upcoming races for the driver, already sorted by scheduledAt ascending.
|
||||
*/
|
||||
upcomingRaces: DashboardRaceSummaryOutputPort[];
|
||||
/**
|
||||
* Count of distinct leagues that are currently "active" for the driver,
|
||||
* based on upcoming races and league standings.
|
||||
*/
|
||||
activeLeaguesCount: number;
|
||||
nextRace: DashboardRaceSummaryOutputPort | null;
|
||||
recentResults: DashboardRecentResultOutputPort[];
|
||||
leagueStandingsSummaries: DashboardLeagueStandingSummaryOutputPort[];
|
||||
feedSummary: DashboardFeedSummaryOutputPort;
|
||||
friends: DashboardFriendSummaryOutputPort[];
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
export interface DriverOutputPort {
|
||||
id: string;
|
||||
iracingId: string;
|
||||
name: string;
|
||||
country: string;
|
||||
bio?: string;
|
||||
joinedAt: string;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export interface DriverRegistrationStatusOutputPort {
|
||||
isRegistered: boolean;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface DriverOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
export interface DriverTeamOutputPort {
|
||||
driverId: string;
|
||||
team: {
|
||||
id: string;
|
||||
name: string;
|
||||
tag: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
createdAt: Date;
|
||||
};
|
||||
membership: {
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
role: 'owner' | 'manager' | 'driver';
|
||||
status: 'active' | 'pending' | 'none';
|
||||
joinedAt: Date;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import type { SkillLevel } from '../../domain/services/SkillLevelService';
|
||||
|
||||
export interface DriverLeaderboardItemOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
rating: number;
|
||||
skillLevel: SkillLevel;
|
||||
nationality: string;
|
||||
racesCompleted: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
isActive: boolean;
|
||||
rank: number;
|
||||
avatarUrl: string;
|
||||
}
|
||||
|
||||
export interface DriversLeaderboardOutputPort {
|
||||
drivers: DriverLeaderboardItemOutputPort[];
|
||||
totalRaces: number;
|
||||
totalWins: number;
|
||||
activeCount: number;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
export interface GetAllRacesOutputPort {
|
||||
races: {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
track: string;
|
||||
car: string;
|
||||
status: 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
scheduledAt: string;
|
||||
strengthOfField: number | null;
|
||||
leagueName: string;
|
||||
}[];
|
||||
totalCount: number;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
export interface GetAllTeamsOutputPort {
|
||||
teams: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
tag: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
createdAt: Date;
|
||||
memberCount: number;
|
||||
}>;
|
||||
totalCount?: number;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetDriverAvatarOutputPort {
|
||||
avatarUrl: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface GetDriverRatingOutputPort {
|
||||
rating: number | null;
|
||||
ratingChange: number | null;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
export interface GetEntitySponsorshipPricingOutputPort {
|
||||
entityType: 'league' | 'team' | 'driver';
|
||||
entityId: string;
|
||||
acceptingApplications: boolean;
|
||||
customRequirements?: string;
|
||||
mainSlot?: {
|
||||
tier: string;
|
||||
price: number;
|
||||
currency: string;
|
||||
formattedPrice: string;
|
||||
benefits: string[];
|
||||
available: boolean;
|
||||
maxSlots: number;
|
||||
filledSlots: number;
|
||||
pendingRequests: number;
|
||||
};
|
||||
secondarySlot?: {
|
||||
tier: string;
|
||||
price: number;
|
||||
currency: string;
|
||||
formattedPrice: string;
|
||||
benefits: string[];
|
||||
available: boolean;
|
||||
maxSlots: number;
|
||||
filledSlots: number;
|
||||
pendingRequests: number;
|
||||
};
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface GetLeagueAdminOutputPort {
|
||||
leagueId: string;
|
||||
ownerId: string;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface GetLeagueAdminPermissionsOutputPort {
|
||||
canRemoveMember: boolean;
|
||||
canUpdateRoles: boolean;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetLeagueCoverOutputPort {
|
||||
coverUrl: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
export interface LeagueJoinRequestOutputPort {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
requestedAt: Date;
|
||||
message: string;
|
||||
driver: { id: string; name: string } | null;
|
||||
}
|
||||
|
||||
export interface GetLeagueJoinRequestsOutputPort {
|
||||
joinRequests: LeagueJoinRequestOutputPort[];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetLeagueLogoOutputPort {
|
||||
logoUrl: string;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
export interface LeagueMembershipOutputPort {
|
||||
driverId: string;
|
||||
driver: { id: string; name: string };
|
||||
role: string;
|
||||
joinedAt: Date;
|
||||
}
|
||||
|
||||
export interface LeagueMembershipsOutputPort {
|
||||
members: LeagueMembershipOutputPort[];
|
||||
}
|
||||
|
||||
export interface GetLeagueMembershipsOutputPort {
|
||||
memberships: LeagueMembershipsOutputPort;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface LeagueOwnerSummaryOutputPort {
|
||||
driver: { id: string; iracingId: string; name: string; country: string; bio: string | undefined; joinedAt: string };
|
||||
rating: number;
|
||||
rank: number;
|
||||
}
|
||||
|
||||
export interface GetLeagueOwnerSummaryOutputPort {
|
||||
summary: LeagueOwnerSummaryOutputPort | null;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
export interface ProtestOutputPort {
|
||||
id: string;
|
||||
raceId: string;
|
||||
protestingDriverId: string;
|
||||
accusedDriverId: string;
|
||||
incident: { lap: number; description: string; timeInRace: number | undefined };
|
||||
comment: string | undefined;
|
||||
proofVideoUrl: string | undefined;
|
||||
status: string;
|
||||
reviewedBy: string | undefined;
|
||||
decisionNotes: string | undefined;
|
||||
filedAt: string;
|
||||
reviewedAt: string | undefined;
|
||||
defense: { statement: string; videoUrl: string | undefined; submittedAt: string } | undefined;
|
||||
defenseRequestedAt: string | undefined;
|
||||
defenseRequestedBy: string | undefined;
|
||||
}
|
||||
|
||||
export interface RaceOutputPort {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
scheduledAt: string;
|
||||
track: string;
|
||||
trackId: string | undefined;
|
||||
car: string;
|
||||
carId: string | undefined;
|
||||
sessionType: string;
|
||||
status: string;
|
||||
strengthOfField: number | undefined;
|
||||
registeredCount: number | undefined;
|
||||
maxParticipants: number | undefined;
|
||||
}
|
||||
|
||||
export interface DriverOutputPort {
|
||||
id: string;
|
||||
iracingId: string;
|
||||
name: string;
|
||||
country: string;
|
||||
bio: string | undefined;
|
||||
joinedAt: string;
|
||||
}
|
||||
|
||||
export interface GetLeagueProtestsOutputPort {
|
||||
protests: ProtestOutputPort[];
|
||||
racesById: Record<string, RaceOutputPort>;
|
||||
driversById: Record<string, DriverOutputPort>;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
export interface GetLeagueScheduleOutputPort {
|
||||
races: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
scheduledAt: Date;
|
||||
}>;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
export interface LeagueSeasonSummaryOutputPort {
|
||||
seasonId: string;
|
||||
name: string;
|
||||
status: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
isPrimary: boolean;
|
||||
isParallelActive: boolean;
|
||||
}
|
||||
|
||||
export interface GetLeagueSeasonsOutputPort {
|
||||
seasons: LeagueSeasonSummaryOutputPort[];
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
export interface WalletTransactionOutputPort {
|
||||
id: string;
|
||||
type: 'sponsorship' | 'membership' | 'withdrawal' | 'prize';
|
||||
description: string;
|
||||
amount: number;
|
||||
fee: number;
|
||||
netAmount: number;
|
||||
date: string;
|
||||
status: 'completed' | 'pending' | 'failed';
|
||||
reference?: string;
|
||||
}
|
||||
|
||||
export interface GetLeagueWalletOutputPort {
|
||||
balance: number;
|
||||
currency: string;
|
||||
totalRevenue: number;
|
||||
totalFees: number;
|
||||
totalWithdrawals: number;
|
||||
pendingPayouts: number;
|
||||
canWithdraw: boolean;
|
||||
withdrawalBlockReason?: string;
|
||||
transactions: WalletTransactionOutputPort[];
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export interface GetSponsorsOutputPort {
|
||||
sponsors: {
|
||||
id: string;
|
||||
name: string;
|
||||
contactEmail: string;
|
||||
websiteUrl: string | undefined;
|
||||
logoUrl: string | undefined;
|
||||
createdAt: Date;
|
||||
}[];
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export interface GetSponsorshipPricingOutputPort {
|
||||
entityType: string;
|
||||
entityId: string;
|
||||
pricing: {
|
||||
id: string;
|
||||
level: string;
|
||||
price: number;
|
||||
currency: string;
|
||||
}[];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
export interface GetTeamDetailsOutputPort {
|
||||
team: {
|
||||
id: string;
|
||||
name: string;
|
||||
tag: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
leagues: string[];
|
||||
createdAt: Date;
|
||||
};
|
||||
membership: {
|
||||
role: 'owner' | 'manager' | 'member';
|
||||
joinedAt: Date;
|
||||
isActive: boolean;
|
||||
} | null;
|
||||
canManage: boolean;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetTeamLogoOutputPort {
|
||||
logoUrl: string;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetTotalLeaguesOutputPort {
|
||||
totalLeagues: number;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export interface GetTotalRacesOutputPort {
|
||||
totalRaces: number;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
export interface ImportRaceResultsApiOutputPort {
|
||||
success: boolean;
|
||||
raceId: string;
|
||||
leagueId: string;
|
||||
driversProcessed: number;
|
||||
resultsRecorded: number;
|
||||
errors?: string[];
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export interface JoinLeagueOutputPort {
|
||||
membershipId: string;
|
||||
leagueId: string;
|
||||
status: string;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
export interface LeagueDriverSeasonStatsItemOutputPort {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
position: number;
|
||||
driverName: string;
|
||||
teamId?: string;
|
||||
teamName?: string;
|
||||
totalPoints: number;
|
||||
basePoints: number;
|
||||
penaltyPoints: number;
|
||||
bonusPoints: number;
|
||||
pointsPerRace: number;
|
||||
racesStarted: number;
|
||||
racesFinished: number;
|
||||
dnfs: number;
|
||||
noShows: number;
|
||||
avgFinish: number | null;
|
||||
rating: number | null;
|
||||
ratingChange: number | null;
|
||||
}
|
||||
|
||||
export interface LeagueDriverSeasonStatsOutputPort {
|
||||
leagueId: string;
|
||||
stats: LeagueDriverSeasonStatsItemOutputPort[];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { League } from '../../domain/entities/League';
|
||||
import type { Season } from '../../domain/entities/Season';
|
||||
import type { LeagueScoringConfig } from '../../domain/entities/LeagueScoringConfig';
|
||||
import type { Game } from '../../domain/entities/Game';
|
||||
|
||||
export interface LeagueFullConfigOutputPort {
|
||||
league: League;
|
||||
activeSeason?: Season;
|
||||
scoringConfig?: LeagueScoringConfig;
|
||||
game?: Game;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
export interface LeagueOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
ownerId: string;
|
||||
settings: {
|
||||
pointsSystem: 'f1-2024' | 'indycar' | 'custom';
|
||||
sessionDuration?: number;
|
||||
qualifyingFormat?: 'single-lap' | 'open';
|
||||
customPoints?: Record<number, number>;
|
||||
maxDrivers?: number;
|
||||
};
|
||||
createdAt: string;
|
||||
socialLinks?: {
|
||||
discordUrl?: string;
|
||||
youtubeUrl?: string;
|
||||
websiteUrl?: string;
|
||||
};
|
||||
usedSlots?: number;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
export interface LeagueScheduleOutputPort {
|
||||
seasonStartDate: string;
|
||||
raceStartTime: string;
|
||||
timezoneId: string;
|
||||
recurrenceStrategy: 'weekly' | 'everyNWeeks' | 'monthlyNthWeekday';
|
||||
intervalWeeks?: number;
|
||||
weekdays?: ('monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday')[];
|
||||
monthlyOrdinal?: 1 | 2 | 3 | 4;
|
||||
monthlyWeekday?: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
||||
plannedRounds: number;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface LeagueSchedulePreviewOutputPort {
|
||||
rounds: Array<{ roundNumber: number; scheduledAt: string; timezoneId: string }>;
|
||||
summary: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface LeagueScoringChampionshipOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'driver' | 'team' | 'nations' | 'trophy';
|
||||
sessionTypes: string[];
|
||||
pointsPreview: Array<{ sessionType: string; position: number; points: number }>;
|
||||
bonusSummary: string[];
|
||||
dropPolicyDescription: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import type { ChampionshipConfig } from '../../domain/types/ChampionshipConfig';
|
||||
import type { LeagueScoringPresetOutputPort } from './LeagueScoringPresetOutputPort';
|
||||
|
||||
export interface LeagueScoringConfigOutputPort {
|
||||
leagueId: string;
|
||||
seasonId: string;
|
||||
gameId: string;
|
||||
gameName: string;
|
||||
scoringPresetId?: string;
|
||||
preset?: LeagueScoringPresetOutputPort;
|
||||
championships: ChampionshipConfig[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface LeagueScoringPresetOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
primaryChampionshipType: 'driver' | 'team' | 'nations' | 'trophy';
|
||||
sessionSummary: string;
|
||||
bonusSummary: string;
|
||||
dropPolicySummary: string;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import type { LeagueScoringPresetOutputPort } from './LeagueScoringPresetOutputPort';
|
||||
|
||||
export interface LeagueScoringPresetsOutputPort {
|
||||
presets: LeagueScoringPresetOutputPort[];
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export interface StandingItemOutputPort {
|
||||
driverId: string;
|
||||
driver: { id: string; name: string };
|
||||
points: number;
|
||||
rank: number;
|
||||
}
|
||||
|
||||
export interface LeagueStandingsOutputPort {
|
||||
standings: StandingItemOutputPort[];
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
export interface LeagueStatsOutputPort {
|
||||
totalMembers: number;
|
||||
totalRaces: number;
|
||||
averageRating: number;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
export interface LeagueSummaryOutputPort {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
createdAt: Date;
|
||||
ownerId: string;
|
||||
maxDrivers?: number;
|
||||
usedDriverSlots?: number;
|
||||
maxTeams?: number;
|
||||
usedTeamSlots?: number;
|
||||
structureSummary?: string;
|
||||
scoringPatternSummary?: string;
|
||||
timingSummary?: string;
|
||||
scoring?: {
|
||||
gameId: string;
|
||||
gameName: string;
|
||||
primaryChampionshipType: 'driver' | 'team' | 'nations' | 'trophy';
|
||||
scoringPresetId: string;
|
||||
scoringPresetName: string;
|
||||
dropPolicySummary: string;
|
||||
scoringPatternSummary: string;
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface LeagueSummaryScoringOutputPort {
|
||||
gameId: string;
|
||||
gameName: string;
|
||||
primaryChampionshipType: 'driver' | 'team' | 'nations' | 'trophy';
|
||||
scoringPresetId: string;
|
||||
scoringPresetName: string;
|
||||
dropPolicySummary: string;
|
||||
scoringPatternSummary: string;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
|
||||
import type { SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
|
||||
|
||||
export interface PendingSponsorshipRequestOutput {
|
||||
id: string;
|
||||
sponsorId: string;
|
||||
sponsorName: string;
|
||||
sponsorLogo?: string;
|
||||
tier: SponsorshipTier;
|
||||
offeredAmount: number;
|
||||
currency: string;
|
||||
formattedAmount: string;
|
||||
message?: string;
|
||||
createdAt: Date;
|
||||
platformFee: number;
|
||||
netAmount: number;
|
||||
}
|
||||
|
||||
export interface PendingSponsorshipRequestsOutputPort {
|
||||
entityType: SponsorableEntityType;
|
||||
entityId: string;
|
||||
requests: PendingSponsorshipRequestOutput[];
|
||||
totalCount: number;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface ProcessPaymentOutputPort {
|
||||
success: boolean;
|
||||
transactionId?: string;
|
||||
error?: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
export interface ProfileOverviewOutputPort {
|
||||
driver: {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
iracingId: string | null;
|
||||
joinedAt: Date;
|
||||
rating: number | null;
|
||||
globalRank: number | null;
|
||||
consistency: number | null;
|
||||
bio: string | null;
|
||||
totalDrivers: number | null;
|
||||
};
|
||||
stats: {
|
||||
totalRaces: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
dnfs: number;
|
||||
avgFinish: number | null;
|
||||
bestFinish: number | null;
|
||||
worstFinish: number | null;
|
||||
finishRate: number | null;
|
||||
winRate: number | null;
|
||||
podiumRate: number | null;
|
||||
percentile: number | null;
|
||||
rating: number | null;
|
||||
consistency: number | null;
|
||||
overallRank: number | null;
|
||||
} | null;
|
||||
finishDistribution: {
|
||||
totalRaces: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
topTen: number;
|
||||
dnfs: number;
|
||||
other: number;
|
||||
} | null;
|
||||
teamMemberships: {
|
||||
teamId: string;
|
||||
teamName: string;
|
||||
teamTag: string | null;
|
||||
role: string;
|
||||
joinedAt: Date;
|
||||
isCurrent: boolean;
|
||||
}[];
|
||||
socialSummary: {
|
||||
friendsCount: number;
|
||||
friends: {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
}[];
|
||||
};
|
||||
extendedProfile: {
|
||||
socialHandles: {
|
||||
platform: 'twitter' | 'youtube' | 'twitch' | 'discord';
|
||||
handle: string;
|
||||
url: string;
|
||||
}[];
|
||||
achievements: {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
icon: 'trophy' | 'medal' | 'star' | 'crown' | 'target' | 'zap';
|
||||
rarity: 'common' | 'rare' | 'epic' | 'legendary';
|
||||
earnedAt: string;
|
||||
}[];
|
||||
racingStyle: string;
|
||||
favoriteTrack: string;
|
||||
favoriteCar: string;
|
||||
timezone: string;
|
||||
availableHours: string;
|
||||
lookingForTeam: boolean;
|
||||
openToRequests: boolean;
|
||||
} | null;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export interface ProtestOutputPort {
|
||||
id: string;
|
||||
raceId: string;
|
||||
protestingDriverId: string;
|
||||
accusedDriverId: string;
|
||||
submittedAt: Date;
|
||||
description: string;
|
||||
status: string;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { Race } from '../../../domain/entities/Race';
|
||||
import type { League } from '../../../domain/entities/League';
|
||||
import type { RaceRegistration } from '../../../domain/entities/RaceRegistration';
|
||||
import type { Driver } from '../../../domain/entities/Driver';
|
||||
import type { Result } from '../../../domain/entities/result/Result';
|
||||
|
||||
export interface RaceDetailOutputPort {
|
||||
race: Race;
|
||||
league: League | null;
|
||||
registrations: RaceRegistration[];
|
||||
drivers: Driver[];
|
||||
userResult: Result | null;
|
||||
isUserRegistered: boolean;
|
||||
canRegister: boolean;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user