integration tests
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
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
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export interface ApproveMembershipRequestCommand {
|
||||
leagueId: string;
|
||||
requestId: string;
|
||||
}
|
||||
4
core/leagues/application/ports/DemoteAdminCommand.ts
Normal file
4
core/leagues/application/ports/DemoteAdminCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface DemoteAdminCommand {
|
||||
leagueId: string;
|
||||
targetDriverId: string;
|
||||
}
|
||||
4
core/leagues/application/ports/JoinLeagueCommand.ts
Normal file
4
core/leagues/application/ports/JoinLeagueCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface JoinLeagueCommand {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
@@ -25,16 +25,24 @@ export interface LeagueAccessedEvent {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -128,6 +128,20 @@ export interface LeagueComplexResolutionTimeMetrics {
|
||||
stewardingActionAppealPenaltyProtestResolutionTime2: number;
|
||||
}
|
||||
|
||||
export interface LeagueMember {
|
||||
driverId: string;
|
||||
name: string;
|
||||
role: 'owner' | 'admin' | 'steward' | 'member';
|
||||
joinDate: Date;
|
||||
}
|
||||
|
||||
export interface LeaguePendingRequest {
|
||||
id: string;
|
||||
driverId: string;
|
||||
name: string;
|
||||
requestDate: Date;
|
||||
}
|
||||
|
||||
export interface LeagueRepository {
|
||||
create(league: LeagueData): Promise<LeagueData>;
|
||||
findById(id: string): Promise<LeagueData | null>;
|
||||
@@ -166,4 +180,7 @@ export interface LeagueRepository {
|
||||
|
||||
getComplexResolutionTimeMetrics(leagueId: string): Promise<LeagueComplexResolutionTimeMetrics>;
|
||||
updateComplexResolutionTimeMetrics(leagueId: string, metrics: LeagueComplexResolutionTimeMetrics): Promise<LeagueComplexResolutionTimeMetrics>;
|
||||
|
||||
getLeagueMembers(leagueId: string): Promise<LeagueMember[]>;
|
||||
getPendingRequests(leagueId: string): Promise<LeaguePendingRequest[]>;
|
||||
}
|
||||
|
||||
3
core/leagues/application/ports/LeagueRosterQuery.ts
Normal file
3
core/leagues/application/ports/LeagueRosterQuery.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface LeagueRosterQuery {
|
||||
leagueId: string;
|
||||
}
|
||||
4
core/leagues/application/ports/LeaveLeagueCommand.ts
Normal file
4
core/leagues/application/ports/LeaveLeagueCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface LeaveLeagueCommand {
|
||||
leagueId: string;
|
||||
driverId: string;
|
||||
}
|
||||
4
core/leagues/application/ports/PromoteMemberCommand.ts
Normal file
4
core/leagues/application/ports/PromoteMemberCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface PromoteMemberCommand {
|
||||
leagueId: string;
|
||||
targetDriverId: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface RejectMembershipRequestCommand {
|
||||
leagueId: string;
|
||||
requestId: string;
|
||||
}
|
||||
4
core/leagues/application/ports/RemoveMemberCommand.ts
Normal file
4
core/leagues/application/ports/RemoveMemberCommand.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface RemoveMemberCommand {
|
||||
leagueId: string;
|
||||
targetDriverId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user