Files
gridpilot.gg/core/leagues/application/ports/LeagueEventPublisher.ts
Marc Mintel 597bb48248
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 4m51s
Contract Testing / contract-snapshot (pull_request) Has been skipped
integration tests
2026-01-22 17:29:06 +01:00

41 lines
986 B
TypeScript

export interface LeagueCreatedEvent {
type: 'LeagueCreatedEvent';
leagueId: string;
ownerId: string;
timestamp: Date;
}
export interface LeagueUpdatedEvent {
type: 'LeagueUpdatedEvent';
leagueId: string;
updates: Partial<any>;
timestamp: Date;
}
export interface LeagueDeletedEvent {
type: 'LeagueDeletedEvent';
leagueId: string;
timestamp: Date;
}
export interface LeagueAccessedEvent {
type: 'LeagueAccessedEvent';
leagueId: string;
driverId: string;
timestamp: Date;
}
export interface LeagueEventPublisher {
emitLeagueCreated(event: LeagueCreatedEvent): Promise<void>;
emitLeagueUpdated(event: LeagueUpdatedEvent): Promise<void>;
emitLeagueDeleted(event: LeagueDeletedEvent): Promise<void>;
emitLeagueAccessed(event: LeagueAccessedEvent): Promise<void>;
getLeagueCreatedEventCount(): number;
getLeagueUpdatedEventCount(): number;
getLeagueDeletedEventCount(): number;
getLeagueAccessedEventCount(): number;
clear(): void;
}