Some checks failed
CI / lint-typecheck (pull_request) Failing after 4m50s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
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 LeagueRosterAccessedEvent {
|
|
type: 'LeagueRosterAccessedEvent';
|
|
leagueId: 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>;
|
|
emitLeagueRosterAccessed(event: LeagueRosterAccessedEvent): Promise<void>;
|
|
|
|
getLeagueCreatedEventCount(): number;
|
|
getLeagueUpdatedEventCount(): number;
|
|
getLeagueDeletedEventCount(): number;
|
|
getLeagueAccessedEventCount(): number;
|
|
getLeagueRosterAccessedEventCount(): number;
|
|
|
|
clear(): void;
|
|
}
|