view models
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
import { BaseApiClient } from '../base/BaseApiClient';
|
||||
import type {
|
||||
RecordPageViewInputDto,
|
||||
RecordPageViewOutputDto,
|
||||
RecordEngagementInputDto,
|
||||
RecordEngagementOutputDto,
|
||||
AnalyticsDashboardDto,
|
||||
AnalyticsMetricsDto,
|
||||
} from '../../dtos';
|
||||
import { RecordPageViewOutputDTO } from '../../types/generated/RecordPageViewOutputDTO';
|
||||
import { RecordEngagementOutputDTO } from '../../types/generated/RecordEngagementOutputDTO';
|
||||
|
||||
// TODO: Move these types to apps/website/lib/types/generated when available
|
||||
type RecordPageViewInputDto = { path: string; userId?: string };
|
||||
type RecordEngagementInputDto = { eventType: string; userId?: string; metadata?: Record<string, unknown> };
|
||||
|
||||
// TODO: Move these types to apps/website/lib/types/generated when available
|
||||
type AnalyticsDashboardDto = {
|
||||
totalUsers: number;
|
||||
activeUsers: number;
|
||||
totalRaces: number;
|
||||
totalLeagues: number;
|
||||
};
|
||||
type AnalyticsMetricsDto = {
|
||||
pageViews: number;
|
||||
uniqueVisitors: number;
|
||||
averageSessionDuration: number;
|
||||
bounceRate: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Analytics API Client
|
||||
@@ -15,13 +27,13 @@ import type {
|
||||
*/
|
||||
export class AnalyticsApiClient extends BaseApiClient {
|
||||
/** Record a page view */
|
||||
recordPageView(input: RecordPageViewInputDto): Promise<RecordPageViewOutputDto> {
|
||||
return this.post<RecordPageViewOutputDto>('/analytics/page-view', input);
|
||||
recordPageView(input: RecordPageViewInputDto): Promise<RecordPageViewOutputDTO> {
|
||||
return this.post<RecordPageViewOutputDTO>('/analytics/page-view', input);
|
||||
}
|
||||
|
||||
/** Record an engagement event */
|
||||
recordEngagement(input: RecordEngagementInputDto): Promise<RecordEngagementOutputDto> {
|
||||
return this.post<RecordEngagementOutputDto>('/analytics/engagement', input);
|
||||
recordEngagement(input: RecordEngagementInputDto): Promise<RecordEngagementOutputDTO> {
|
||||
return this.post<RecordEngagementOutputDTO>('/analytics/engagement', input);
|
||||
}
|
||||
|
||||
/** Get analytics dashboard data */
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { LeagueSummaryDto } from './LeagueSummaryDto';
|
||||
|
||||
/**
|
||||
* All leagues with capacity transport object
|
||||
* Contains a list of leagues with their capacity information
|
||||
*/
|
||||
export interface AllLeaguesWithCapacityDto {
|
||||
leagues: LeagueSummaryDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { RaceListItemDto } from './RaceListItemDto';
|
||||
|
||||
/**
|
||||
* All races page data transfer object
|
||||
* List of all races for the races page
|
||||
*/
|
||||
export interface AllRacesPageDto {
|
||||
races: RaceListItemDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { TeamSummaryDto } from './TeamSummaryDto';
|
||||
|
||||
/**
|
||||
* All teams data transfer object
|
||||
* List of all teams
|
||||
*/
|
||||
export interface AllTeamsDto {
|
||||
teams: TeamSummaryDto[];
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface AnalyticsDashboardDto {
|
||||
totalUsers: number;
|
||||
activeUsers: number;
|
||||
totalRaces: number;
|
||||
totalLeagues: number;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export interface AnalyticsMetricsDto {
|
||||
pageViews: number;
|
||||
uniqueVisitors: number;
|
||||
averageSessionDuration: number;
|
||||
bounceRate: number;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Complete onboarding input data transfer object
|
||||
* Input for completing driver onboarding
|
||||
*/
|
||||
export interface CompleteOnboardingInputDto {
|
||||
iracingId: string;
|
||||
displayName: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Complete onboarding output data transfer object
|
||||
* Output from completing driver onboarding
|
||||
*/
|
||||
export interface CompleteOnboardingOutputDto {
|
||||
driverId: string;
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Create league input transport object
|
||||
* Input data for creating a new league
|
||||
*/
|
||||
export interface CreateLeagueInputDto {
|
||||
name: string;
|
||||
description?: string;
|
||||
isPublic: boolean;
|
||||
maxMembers: number;
|
||||
ownerId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Create league output transport object
|
||||
* Output data after creating a new league
|
||||
*/
|
||||
export interface CreateLeagueOutputDto {
|
||||
leagueId: string;
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Create payment input data transfer object
|
||||
* Input for creating a payment
|
||||
*/
|
||||
export interface CreatePaymentInputDto {
|
||||
amount: number;
|
||||
currency: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
description?: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Create payment output data transfer object
|
||||
* Output from creating a payment
|
||||
*/
|
||||
export interface CreatePaymentOutputDto {
|
||||
paymentId: string;
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Create sponsor input data transfer object
|
||||
* Input for creating a new sponsor
|
||||
*/
|
||||
export interface CreateSponsorInputDto {
|
||||
name: string;
|
||||
logoUrl?: string;
|
||||
websiteUrl?: string;
|
||||
userId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Create sponsor output data transfer object
|
||||
* Output from creating a sponsor
|
||||
*/
|
||||
export interface CreateSponsorOutputDto {
|
||||
sponsorId: string;
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Create team input data transfer object
|
||||
* Input for creating a new team
|
||||
*/
|
||||
export interface CreateTeamInputDto {
|
||||
name: string;
|
||||
description?: string;
|
||||
ownerId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Create team output data transfer object
|
||||
* Output from creating a team
|
||||
*/
|
||||
export interface CreateTeamOutputDto {
|
||||
teamId: string;
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Delete media output data transfer object
|
||||
* Output from deleting media
|
||||
*/
|
||||
export interface DeleteMediaOutputDto {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Driver transport object
|
||||
* Represents a driver as received from the API
|
||||
*/
|
||||
export interface DriverDto {
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl?: string;
|
||||
iracingId?: string;
|
||||
rating?: number;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Driver leaderboard item data transfer object
|
||||
* Represents a driver in the global leaderboard
|
||||
*/
|
||||
export interface DriverLeaderboardItemDto {
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl?: string;
|
||||
rating: number;
|
||||
wins: number;
|
||||
races: number;
|
||||
skillLevel: string;
|
||||
isActive: boolean;
|
||||
nationality: string;
|
||||
podiums: number;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Driver registration status data transfer object
|
||||
* Represents a driver's registration status for a race
|
||||
*/
|
||||
export interface DriverRegistrationStatusDto {
|
||||
isRegistered: boolean;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Driver row data transfer object
|
||||
* Represents a driver in a table row
|
||||
*/
|
||||
export interface DriverRowDto {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Driver stats data transfer object
|
||||
* Global driver statistics
|
||||
*/
|
||||
export interface DriverStatsDto {
|
||||
totalDrivers: number;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Driver team data transfer object
|
||||
* Represents a driver's team membership
|
||||
*/
|
||||
export interface DriverTeamDto {
|
||||
teamId: string;
|
||||
teamName: string;
|
||||
role: string;
|
||||
joinedAt: Date;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { DriverLeaderboardItemDto } from './DriverLeaderboardItemDto';
|
||||
|
||||
/**
|
||||
* Drivers leaderboard data transfer object
|
||||
* Contains the list of top drivers
|
||||
*/
|
||||
export interface DriversLeaderboardDto {
|
||||
drivers: DriverLeaderboardItemDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Get avatar output data transfer object
|
||||
* Output from getting avatar information
|
||||
*/
|
||||
export interface GetAvatarOutputDto {
|
||||
driverId: string;
|
||||
avatarUrl?: string;
|
||||
hasAvatar: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Get entity sponsorship pricing result data transfer object
|
||||
* Pricing information for sponsorship slots
|
||||
*/
|
||||
export interface GetEntitySponsorshipPricingResultDto {
|
||||
mainSlotPrice: number;
|
||||
secondarySlotPrice: number;
|
||||
currency: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Get media output data transfer object
|
||||
* Output from getting media information
|
||||
*/
|
||||
export interface GetMediaOutputDto {
|
||||
id: string;
|
||||
url: string;
|
||||
type: 'image' | 'video' | 'document';
|
||||
category?: 'avatar' | 'team-logo' | 'league-cover' | 'race-result';
|
||||
uploadedAt: string;
|
||||
size?: number;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { MembershipFeeDto } from './MembershipFeeDto';
|
||||
import type { MemberPaymentDto } from './MemberPaymentDto';
|
||||
|
||||
/**
|
||||
* Get membership fees output data transfer object
|
||||
* Output containing membership fees and payments
|
||||
*/
|
||||
export interface GetMembershipFeesOutputDto {
|
||||
fees: MembershipFeeDto[];
|
||||
memberPayments: MemberPaymentDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { PaymentDto } from './PaymentDto';
|
||||
|
||||
/**
|
||||
* Get payments output data transfer object
|
||||
* Output containing list of payments
|
||||
*/
|
||||
export interface GetPaymentsOutputDto {
|
||||
payments: PaymentDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { PrizeDto } from './PrizeDto';
|
||||
|
||||
/**
|
||||
* Get prizes output data transfer object
|
||||
* Output containing list of prizes
|
||||
*/
|
||||
export interface GetPrizesOutputDto {
|
||||
prizes: PrizeDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { SponsorDto } from './SponsorDto';
|
||||
|
||||
/**
|
||||
* Get sponsors output data transfer object
|
||||
* Output containing list of sponsors
|
||||
*/
|
||||
export interface GetSponsorsOutputDto {
|
||||
sponsors: SponsorDto[];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { WalletDto } from './WalletDto';
|
||||
|
||||
/**
|
||||
* Get wallet output data transfer object
|
||||
* Output containing wallet information
|
||||
*/
|
||||
export interface GetWalletOutputDto {
|
||||
wallet: WalletDto;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Import race results input data transfer object
|
||||
* Input for importing race results
|
||||
*/
|
||||
export interface ImportRaceResultsInputDto {
|
||||
resultsFileContent: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Import race results summary data transfer object
|
||||
* Summary of race results import operation
|
||||
*/
|
||||
export interface ImportRaceResultsSummaryDto {
|
||||
success: boolean;
|
||||
raceId: string;
|
||||
driversProcessed: number;
|
||||
resultsRecorded: number;
|
||||
errors?: string[];
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Import result row data transfer object
|
||||
* Represents a row in imported race results
|
||||
*/
|
||||
export interface ImportResultRowDto {
|
||||
id: string;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
position: number;
|
||||
fastestLap: number;
|
||||
incidents: number;
|
||||
startPosition: number;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { LeagueMemberDto } from './LeagueMemberDto';
|
||||
import type { LeagueJoinRequestDto } from './LeagueJoinRequestDto';
|
||||
import type { LeagueConfigFormModelDto } from './LeagueConfigFormModelDto';
|
||||
|
||||
/**
|
||||
* League admin transport object
|
||||
* Contains all data needed for league administration
|
||||
*/
|
||||
export interface LeagueAdminDto {
|
||||
config: LeagueConfigFormModelDto;
|
||||
members: LeagueMemberDto[];
|
||||
joinRequests: LeagueJoinRequestDto[];
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* League admin permissions transport object
|
||||
* Defines the administrative permissions for a user in a league
|
||||
*/
|
||||
export interface LeagueAdminPermissionsDto {
|
||||
canManageMembers: boolean;
|
||||
canManageRaces: boolean;
|
||||
canManageSettings: boolean;
|
||||
canManageProtests: boolean;
|
||||
isOwner: boolean;
|
||||
isAdmin: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { ProtestViewModel } from '../apiClient';
|
||||
|
||||
/**
|
||||
* League admin protests transport object
|
||||
* Contains protests for league administration
|
||||
*/
|
||||
export interface LeagueAdminProtestsDto {
|
||||
protests: ProtestViewModel[];
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* League configuration form model transport object
|
||||
* Used for league configuration forms
|
||||
*/
|
||||
export interface LeagueConfigFormModelDto {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
isPublic: boolean;
|
||||
maxMembers: number;
|
||||
// Add other config fields as needed
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* League join request transport object
|
||||
* Represents a driver's request to join a league
|
||||
*/
|
||||
export interface LeagueJoinRequestDto {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
requestedAt: Date;
|
||||
message?: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import type { DriverDto } from './DriverDto';
|
||||
|
||||
/**
|
||||
* League member data transfer object
|
||||
* Represents a driver's membership in a league
|
||||
*/
|
||||
export interface LeagueMemberDto {
|
||||
driverId: string;
|
||||
driver?: DriverDto;
|
||||
role: string;
|
||||
joinedAt: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { LeagueMemberViewModel } from '../apiClient';
|
||||
|
||||
/**
|
||||
* League memberships transport object
|
||||
* Contains the list of league members
|
||||
*/
|
||||
export interface LeagueMembershipsDto {
|
||||
members: LeagueMemberViewModel[];
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* League owner summary transport object
|
||||
* Summary information for league owners
|
||||
*/
|
||||
export interface LeagueOwnerSummaryDto {
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
memberCount: number;
|
||||
pendingRequests: number;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { ScheduledRaceViewModel } from '../apiClient';
|
||||
|
||||
/**
|
||||
* League schedule transport object
|
||||
* Contains the scheduled races for a league
|
||||
*/
|
||||
export interface LeagueScheduleDto {
|
||||
races: ScheduledRaceViewModel[];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* League season summary data transfer object
|
||||
* Represents a season within a league
|
||||
*/
|
||||
export interface LeagueSeasonSummaryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
startDate?: string;
|
||||
endDate?: string;
|
||||
status: string;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { StandingEntryDto } from './StandingEntryDto';
|
||||
import type { DriverDto } from './DriverDto';
|
||||
import type { LeagueMembership } from './LeagueMembershipDto';
|
||||
|
||||
/**
|
||||
* League standings transport object
|
||||
* Contains the current league standings
|
||||
*/
|
||||
export interface LeagueStandingsDto {
|
||||
standings: StandingEntryDto[];
|
||||
drivers: DriverDto[];
|
||||
memberships: LeagueMembership[];
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* League stats DTO
|
||||
* Contains statistical information about a league's races
|
||||
*/
|
||||
export interface LeagueStatsDto {
|
||||
leagueId: string;
|
||||
totalRaces: number;
|
||||
completedRaces: number;
|
||||
scheduledRaces: number;
|
||||
averageSOF?: number;
|
||||
highestSOF?: number;
|
||||
lowestSOF?: number;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* League summary transport object
|
||||
* Contains basic league information for list views
|
||||
*/
|
||||
export interface LeagueSummaryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
logoUrl?: string;
|
||||
coverImage?: string;
|
||||
memberCount: number;
|
||||
maxMembers: number;
|
||||
isPublic: boolean;
|
||||
ownerId: string;
|
||||
ownerName?: string;
|
||||
scoringType?: string;
|
||||
status?: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Login parameters data transfer object
|
||||
* Parameters for user login
|
||||
*/
|
||||
export interface LoginParamsDto {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Member payment data transfer object
|
||||
* Represents a payment made by a league member
|
||||
*/
|
||||
export interface MemberPaymentDto {
|
||||
driverId: string;
|
||||
amount: number;
|
||||
paidAt: string;
|
||||
status: string;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Membership fee data transfer object
|
||||
* Represents a membership fee for a league
|
||||
*/
|
||||
export interface MembershipFeeDto {
|
||||
leagueId: string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
period: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Payment data transfer object
|
||||
* Represents a payment transaction
|
||||
*/
|
||||
export interface PaymentDto {
|
||||
id: string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { PenaltyTypeDto } from './PenaltyTypeDto';
|
||||
|
||||
/**
|
||||
* Penalty data structure
|
||||
* Used when creating or updating penalties
|
||||
*/
|
||||
export interface PenaltyDataDto {
|
||||
driverId: string;
|
||||
type: PenaltyTypeDto;
|
||||
value?: number;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Penalty type enumeration
|
||||
* Defines all possible penalty types in the system
|
||||
*/
|
||||
export type PenaltyTypeDto =
|
||||
| 'time_penalty'
|
||||
| 'grid_penalty'
|
||||
| 'points_deduction'
|
||||
| 'disqualification'
|
||||
| 'warning'
|
||||
| 'license_points';
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Prize data transfer object
|
||||
* Represents a prize in a league
|
||||
*/
|
||||
export interface PrizeDto {
|
||||
id: string;
|
||||
name: string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
position?: number;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Protest data transfer object
|
||||
* Represents a protest filed in a race
|
||||
*/
|
||||
export interface ProtestDto {
|
||||
id: string;
|
||||
raceId: string;
|
||||
complainantId: string;
|
||||
defendantId: string;
|
||||
description: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import type { RaceDetailRaceDto } from './RaceDetailRaceDto';
|
||||
import type { RaceDetailLeagueDto } from './RaceDetailLeagueDto';
|
||||
import type { RaceDetailEntryDto } from './RaceDetailEntryDto';
|
||||
import type { RaceDetailRegistrationDto } from './RaceDetailRegistrationDto';
|
||||
import type { RaceDetailUserResultDto } from './RaceDetailUserResultDto';
|
||||
|
||||
/**
|
||||
* Race detail data transfer object
|
||||
* Complete race details view
|
||||
*/
|
||||
export interface RaceDetailDto {
|
||||
race: RaceDetailRaceDto | null;
|
||||
league: RaceDetailLeagueDto | null;
|
||||
entryList: RaceDetailEntryDto[];
|
||||
registration: RaceDetailRegistrationDto;
|
||||
userResult: RaceDetailUserResultDto | null;
|
||||
error?: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Race detail entry data transfer object
|
||||
* Represents an entry in race details
|
||||
*/
|
||||
export interface RaceDetailEntryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
country: string;
|
||||
avatarUrl: string;
|
||||
rating: number | null;
|
||||
isCurrentUser: boolean;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Race detail league data transfer object
|
||||
* League information in race details
|
||||
*/
|
||||
export interface RaceDetailLeagueDto {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
settings: {
|
||||
maxDrivers?: number;
|
||||
qualifyingFormat?: string;
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Race detail race data transfer object
|
||||
* Race information in race details
|
||||
*/
|
||||
export interface RaceDetailRaceDto {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
sessionType: string;
|
||||
status: string;
|
||||
strengthOfField: number | null;
|
||||
registeredCount?: number;
|
||||
maxParticipants?: number;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Race detail registration data transfer object
|
||||
* Registration information in race details
|
||||
*/
|
||||
export interface RaceDetailRegistrationDto {
|
||||
isUserRegistered: boolean;
|
||||
canRegister: boolean;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Race detail user result data transfer object
|
||||
* Represents the current user's result in race details
|
||||
*/
|
||||
export interface RaceDetailUserResultDto {
|
||||
position: number;
|
||||
startPosition: number;
|
||||
incidents: number;
|
||||
fastestLap: number;
|
||||
positionChange: number;
|
||||
isPodium: boolean;
|
||||
isClean: boolean;
|
||||
ratingChange: number | null;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Race list item data transfer object
|
||||
* Represents a race in list views
|
||||
*/
|
||||
export interface RaceListItemDto {
|
||||
id: string;
|
||||
name: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
scheduledTime: string;
|
||||
status: string;
|
||||
trackName?: string;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import type { RacePenaltyDto } from './RacePenaltyDto';
|
||||
|
||||
/**
|
||||
* Race penalties data transfer object
|
||||
* List of penalties for a race
|
||||
*/
|
||||
export interface RacePenaltiesDto {
|
||||
penalties: RacePenaltyDto[];
|
||||
driverMap: Record<string, string>;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Race penalty data transfer object
|
||||
* Represents a penalty issued in a race
|
||||
*/
|
||||
export interface RacePenaltyDto {
|
||||
id: string;
|
||||
driverId: string;
|
||||
type: string;
|
||||
value: number;
|
||||
reason: string;
|
||||
issuedBy: string;
|
||||
issuedAt: string;
|
||||
notes?: string;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Race protest data transfer object
|
||||
* Represents a protest filed for a race
|
||||
*/
|
||||
export interface RaceProtestDto {
|
||||
id: string;
|
||||
protestingDriverId: string;
|
||||
accusedDriverId: string;
|
||||
incident: {
|
||||
lap: number;
|
||||
description: string;
|
||||
};
|
||||
status: string;
|
||||
filedAt: string;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import type { RaceProtestDto } from './RaceProtestDto';
|
||||
|
||||
/**
|
||||
* Race protests data transfer object
|
||||
* List of protests for a race
|
||||
*/
|
||||
export interface RaceProtestsDto {
|
||||
protests: RaceProtestDto[];
|
||||
driverMap: Record<string, string>;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Race result data transfer object
|
||||
* Represents a driver's result in a race
|
||||
*/
|
||||
export interface RaceResultDto {
|
||||
id: string;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
driverName: string;
|
||||
avatarUrl: string;
|
||||
position: number;
|
||||
startPosition: number;
|
||||
incidents: number;
|
||||
fastestLap: number;
|
||||
positionChange: number;
|
||||
isPodium: boolean;
|
||||
isClean: boolean;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Race result row data transfer object
|
||||
* Represents a row in race results table
|
||||
*/
|
||||
export interface RaceResultRowDto {
|
||||
id: string;
|
||||
raceId: string;
|
||||
driverId: string;
|
||||
position: number;
|
||||
fastestLap: number;
|
||||
incidents: number;
|
||||
startPosition: number;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import type { RaceResultDto } from './RaceResultDto';
|
||||
|
||||
/**
|
||||
* Race results detail data transfer object
|
||||
* Detailed results for a race
|
||||
*/
|
||||
export interface RaceResultsDetailDto {
|
||||
raceId: string;
|
||||
track: string;
|
||||
results: RaceResultDto[];
|
||||
league?: { id: string; name: string };
|
||||
race?: { id: string; track: string; scheduledAt: string };
|
||||
drivers: { id: string; name: string }[];
|
||||
pointsSystem: Record<number, number>;
|
||||
fastestLapTime: number;
|
||||
penalties: { driverId: string; type: string; value?: number }[];
|
||||
currentDriverId: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Race stats data transfer object
|
||||
* Global race statistics
|
||||
*/
|
||||
export interface RaceStatsDto {
|
||||
totalRaces: number;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Race with strength of field data transfer object
|
||||
* Race information including SOF
|
||||
*/
|
||||
export interface RaceWithSOFDto {
|
||||
id: string;
|
||||
track: string;
|
||||
strengthOfField: number | null;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { RacesPageDataRaceDto } from './RacesPageDataRaceDto';
|
||||
|
||||
/**
|
||||
* Races page data data transfer object
|
||||
* Data for the races page
|
||||
*/
|
||||
export interface RacesPageDataDto {
|
||||
races: RacesPageDataRaceDto[];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Races page data race data transfer object
|
||||
* Race information for the races page
|
||||
*/
|
||||
export interface RacesPageDataRaceDto {
|
||||
id: string;
|
||||
track: string;
|
||||
car: string;
|
||||
scheduledAt: string;
|
||||
status: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
strengthOfField: number | null;
|
||||
isUpcoming: boolean;
|
||||
isLive: boolean;
|
||||
isPast: boolean;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Record engagement input data transfer object
|
||||
* Input for recording an engagement event
|
||||
*/
|
||||
export interface RecordEngagementInputDto {
|
||||
eventType: string;
|
||||
eventData?: Record<string, unknown>;
|
||||
userId?: string;
|
||||
sessionId?: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Record engagement output data transfer object
|
||||
* Output from recording an engagement event
|
||||
*/
|
||||
export interface RecordEngagementOutputDto {
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Record page view input data transfer object
|
||||
* Input for recording a page view event
|
||||
*/
|
||||
export interface RecordPageViewInputDto {
|
||||
path: string;
|
||||
userId?: string;
|
||||
sessionId?: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Record page view output data transfer object
|
||||
* Output from recording a page view
|
||||
*/
|
||||
export interface RecordPageViewOutputDto {
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Register for race input data transfer object
|
||||
* Input for registering a driver for a race
|
||||
*/
|
||||
export interface RegisterForRaceInputDto {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Request avatar generation input data transfer object
|
||||
* Input for requesting avatar generation
|
||||
*/
|
||||
export interface RequestAvatarGenerationInputDto {
|
||||
driverId: string;
|
||||
style?: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Request avatar generation output data transfer object
|
||||
* Output from avatar generation request
|
||||
*/
|
||||
export interface RequestAvatarGenerationOutputDto {
|
||||
success: boolean;
|
||||
avatarUrl?: string;
|
||||
error?: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Scheduled race data transfer object
|
||||
* Represents a race scheduled in a league
|
||||
*/
|
||||
export interface ScheduledRaceDto {
|
||||
id: string;
|
||||
name: string;
|
||||
scheduledTime: string;
|
||||
status: string;
|
||||
trackName?: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Session data data transfer object
|
||||
* User session information
|
||||
*/
|
||||
export interface SessionDataDto {
|
||||
userId: string;
|
||||
email: string;
|
||||
displayName?: string;
|
||||
driverId?: string;
|
||||
isAuthenticated: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Signup parameters data transfer object
|
||||
* Parameters for user signup
|
||||
*/
|
||||
export interface SignupParamsDto {
|
||||
email: string;
|
||||
password: string;
|
||||
displayName: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Sponsor dashboard data transfer object
|
||||
* Dashboard information for a sponsor
|
||||
*/
|
||||
export interface SponsorDashboardDto {
|
||||
sponsorId: string;
|
||||
sponsorName: string;
|
||||
totalSponsorships: number;
|
||||
activeSponsorships: number;
|
||||
totalInvestment: number;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Sponsor data transfer object
|
||||
* Represents a sponsor entity
|
||||
*/
|
||||
export interface SponsorDto {
|
||||
id: string;
|
||||
name: string;
|
||||
logoUrl?: string;
|
||||
websiteUrl?: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { SponsorshipDetailDto } from './SponsorshipDetailDto';
|
||||
|
||||
/**
|
||||
* Sponsor sponsorships data transfer object
|
||||
* Sponsorships associated with a sponsor
|
||||
*/
|
||||
export interface SponsorSponsorshipsDto {
|
||||
sponsorId: string;
|
||||
sponsorName: string;
|
||||
sponsorships: SponsorshipDetailDto[];
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Sponsorship detail data transfer object
|
||||
* Details of a sponsorship
|
||||
*/
|
||||
export interface SponsorshipDetailDto {
|
||||
id: string;
|
||||
leagueId: string;
|
||||
leagueName: string;
|
||||
seasonId: string;
|
||||
tier: 'main' | 'secondary';
|
||||
status: string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { DriverDto } from './DriverDto';
|
||||
|
||||
/**
|
||||
* Standing entry data transfer object
|
||||
* Represents a driver's standing in league standings
|
||||
*/
|
||||
export interface StandingEntryDto {
|
||||
driverId: string;
|
||||
driver?: DriverDto;
|
||||
position: number;
|
||||
points: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
races: number;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import type { TeamMemberDto } from './TeamMemberDto';
|
||||
|
||||
/**
|
||||
* Team details data transfer object
|
||||
* Detailed information about a team
|
||||
*/
|
||||
export interface TeamDetailsDto {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
logoUrl?: string;
|
||||
memberCount: number;
|
||||
ownerId: string;
|
||||
members: TeamMemberDto[];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Team join request item data transfer object
|
||||
* Represents a request to join a team
|
||||
*/
|
||||
export interface TeamJoinRequestItemDto {
|
||||
id: string;
|
||||
teamId: string;
|
||||
driverId: string;
|
||||
requestedAt: string;
|
||||
message?: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { TeamJoinRequestItemDto } from './TeamJoinRequestItemDto';
|
||||
|
||||
/**
|
||||
* Team join requests data transfer object
|
||||
* List of join requests for a team
|
||||
*/
|
||||
export interface TeamJoinRequestsDto {
|
||||
requests: TeamJoinRequestItemDto[];
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import type { DriverDto } from './DriverDto';
|
||||
|
||||
/**
|
||||
* Team member data transfer object
|
||||
* Represents a driver's membership in a team
|
||||
*/
|
||||
export interface TeamMemberDto {
|
||||
driverId: string;
|
||||
driver?: DriverDto;
|
||||
role: string;
|
||||
joinedAt: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import type { TeamMemberDto } from './TeamMemberDto';
|
||||
|
||||
/**
|
||||
* Team members data transfer object
|
||||
* List of team members
|
||||
*/
|
||||
export interface TeamMembersDto {
|
||||
members: TeamMemberDto[];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Team summary data transfer object
|
||||
* Basic information about a team
|
||||
*/
|
||||
export interface TeamSummaryDto {
|
||||
id: string;
|
||||
name: string;
|
||||
logoUrl?: string;
|
||||
memberCount: number;
|
||||
rating: number;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Update avatar input data transfer object
|
||||
* Input for updating driver avatar
|
||||
*/
|
||||
export interface UpdateAvatarInputDto {
|
||||
driverId: string;
|
||||
avatarUrl: string;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Update avatar output data transfer object
|
||||
* Output from updating avatar
|
||||
*/
|
||||
export interface UpdateAvatarOutputDto {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Update team input data transfer object
|
||||
* Input for updating team information
|
||||
*/
|
||||
export interface UpdateTeamInputDto {
|
||||
name?: string;
|
||||
description?: string;
|
||||
logoUrl?: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Update team output data transfer object
|
||||
* Output from updating team information
|
||||
*/
|
||||
export interface UpdateTeamOutputDto {
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Upload media input data transfer object
|
||||
* Input for uploading media files
|
||||
*/
|
||||
export interface UploadMediaInputDto {
|
||||
file: File;
|
||||
type: 'image' | 'video' | 'document';
|
||||
category?: 'avatar' | 'team-logo' | 'league-cover' | 'race-result';
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user