fix issues in adapters
This commit is contained in:
1
core/league/application/index.ts
Normal file
1
core/league/application/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './ports/ILeagueStandingsRepository';
|
||||
13
core/league/application/ports/ILeagueStandingsRepository.ts
Normal file
13
core/league/application/ports/ILeagueStandingsRepository.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface RawStanding {
|
||||
driverId: string;
|
||||
position: number;
|
||||
points: number;
|
||||
races: number;
|
||||
wins: number;
|
||||
poles: number;
|
||||
podiums: number;
|
||||
}
|
||||
|
||||
export interface ILeagueStandingsRepository {
|
||||
getLeagueStandings(leagueId: string): Promise<RawStanding[]>;
|
||||
}
|
||||
@@ -45,6 +45,7 @@ export * from './use-cases/AcceptSponsorshipRequestUseCase';
|
||||
export * from './use-cases/RejectSponsorshipRequestUseCase';
|
||||
export * from './use-cases/GetPendingSponsorshipRequestsUseCase';
|
||||
export * from './use-cases/GetEntitySponsorshipPricingUseCase';
|
||||
export * from './ports/LeagueScoringPresetProvider';
|
||||
|
||||
// Re-export domain types for legacy callers (type-only)
|
||||
export type {
|
||||
|
||||
17
core/racing/application/ports/LeagueScoringPresetProvider.ts
Normal file
17
core/racing/application/ports/LeagueScoringPresetProvider.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { LeagueScoringConfig } from '../../domain/entities/LeagueScoringConfig';
|
||||
|
||||
export interface LeagueScoringPresetDTO {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
primaryChampionshipType: 'driver' | 'team' | 'nations' | 'trophy';
|
||||
sessionSummary: string;
|
||||
bonusSummary: string;
|
||||
dropPolicySummary: string;
|
||||
}
|
||||
|
||||
export interface LeagueScoringPresetProvider {
|
||||
listPresets(): LeagueScoringPresetDTO[];
|
||||
getPresetById(id: string): LeagueScoringPresetDTO | undefined;
|
||||
createScoringConfigFromPreset(presetId: string, seasonId: string): LeagueScoringConfig;
|
||||
}
|
||||
@@ -2,4 +2,6 @@ export * from './UseCase';
|
||||
export * from './AsyncUseCase';
|
||||
export * from './Service';
|
||||
export * from './Logger';
|
||||
export * from './UseCaseOutputPort';
|
||||
export * from './UseCaseOutputPort';
|
||||
export * from './ErrorReporter';
|
||||
export * from './Result';
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './DomainError';
|
||||
export * from './ApplicationError';
|
||||
export * from './ApplicationError';
|
||||
export * from './ApplicationErrorCode';
|
||||
Reference in New Issue
Block a user