fix data flow issues

This commit is contained in:
2025-12-19 21:58:03 +01:00
parent 94fc538f44
commit ec177a75ce
37 changed files with 1336 additions and 534 deletions

View File

@@ -0,0 +1,24 @@
export interface DriverExtendedProfileProvider {
getExtendedProfile(driverId: string): {
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;
}

View File

@@ -0,0 +1,4 @@
export interface DriverRatingProvider {
getRating(driverId: string): number | null;
getRatings(driverIds: string[]): Map<string, number>;
}

View File

@@ -0,0 +1,23 @@
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[];
}

View File

@@ -53,5 +53,26 @@ export interface ProfileOverviewOutputPort {
avatarUrl: string;
}[];
};
extendedProfile: null;
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;
}

View File

@@ -0,0 +1,4 @@
export interface WithdrawFromLeagueWalletOutputPort {
success: boolean;
message?: string;
}