94 lines
2.1 KiB
TypeScript
94 lines
2.1 KiB
TypeScript
import { ViewData } from '../contracts/view-data/ViewData';
|
|
|
|
export interface LiveRaceData {
|
|
id: string;
|
|
name: string;
|
|
date: string;
|
|
registeredCount: number;
|
|
strengthOfField: number;
|
|
}
|
|
|
|
export interface LeagueInfoData {
|
|
name: string;
|
|
description: string;
|
|
membersCount: number;
|
|
racesCount: number;
|
|
avgSOF: number | null;
|
|
structure: string;
|
|
scoring: string;
|
|
createdAt: string;
|
|
discordUrl?: string;
|
|
youtubeUrl?: string;
|
|
websiteUrl?: string;
|
|
}
|
|
|
|
export interface DriverSummaryData {
|
|
driverId: string;
|
|
driverName: string;
|
|
avatarUrl: string | null;
|
|
rating: number | null;
|
|
rank: number | null;
|
|
roleBadgeText: string;
|
|
roleBadgeClasses: string;
|
|
profileUrl: string;
|
|
}
|
|
|
|
export interface SponsorInfo {
|
|
id: string;
|
|
name: string;
|
|
tier: string;
|
|
logoUrl?: string;
|
|
websiteUrl?: string;
|
|
tagline?: string;
|
|
}
|
|
|
|
export interface NextRaceInfo {
|
|
id: string;
|
|
name: string;
|
|
date: string;
|
|
track: string;
|
|
car: string;
|
|
}
|
|
|
|
export interface SeasonProgress {
|
|
completedRaces: number;
|
|
totalRaces: number;
|
|
percentage: number;
|
|
}
|
|
|
|
export interface RecentResult {
|
|
raceId: string;
|
|
raceName: string;
|
|
position: number;
|
|
points: number;
|
|
finishedAt: string;
|
|
}
|
|
|
|
import type { LeagueViewData } from './LeagueViewData';
|
|
import type { DriverViewData } from './DriverViewData';
|
|
import type { RaceViewData } from './RaceViewData';
|
|
|
|
export interface LeagueDetailViewData extends ViewData {
|
|
league: LeagueViewData;
|
|
drivers: Array<DriverViewData & { impressions: number }>;
|
|
races: Array<RaceViewData & { views: number }>;
|
|
leagueId: string;
|
|
name: string;
|
|
description: string;
|
|
logoUrl?: string;
|
|
info: LeagueInfoData;
|
|
runningRaces: LiveRaceData[];
|
|
sponsors: SponsorInfo[];
|
|
ownerSummary: DriverSummaryData | null;
|
|
adminSummaries: DriverSummaryData[];
|
|
stewardSummaries: DriverSummaryData[];
|
|
memberSummaries: DriverSummaryData[];
|
|
sponsorInsights: any | null;
|
|
nextRace?: NextRaceInfo;
|
|
seasonProgress: SeasonProgress;
|
|
recentResults: RecentResult[];
|
|
walletBalance: number;
|
|
pendingProtestsCount: number;
|
|
pendingJoinRequestsCount: number;
|
|
}
|