This commit is contained in:
2025-12-17 14:04:11 +01:00
parent 1ea9c9649f
commit daa4bb6576
238 changed files with 4263 additions and 1752 deletions

View File

@@ -1,56 +0,0 @@
import type { Team } from '../../domain/entities/Team';
import type { TeamMembership } from '../../domain/types/TeamMembership';
export interface JoinTeamCommandDTO {
teamId: string;
driverId: string;
}
export interface LeaveTeamCommandDTO {
teamId: string;
driverId: string;
}
export interface ApproveTeamJoinRequestCommandDTO {
teamId: string;
requestId: string;
}
export interface RejectTeamJoinRequestCommandDTO {
requestId: string;
}
export interface UpdateTeamCommandDTO {
teamId: string;
updates: Partial<Pick<Team, 'name' | 'tag' | 'description' | 'leagues'>>;
updatedBy: string;
}
export type GetAllTeamsQueryResultDTO = Team[];
export interface GetTeamDetailsQueryParamsDTO {
teamId: string;
driverId: string;
}
export interface GetTeamDetailsQueryResultDTO {
team: Team;
membership: TeamMembership | null;
}
export interface GetTeamMembersQueryParamsDTO {
teamId: string;
}
export interface GetTeamJoinRequestsQueryParamsDTO {
teamId: string;
}
export interface GetDriverTeamQueryParamsDTO {
driverId: string;
}
export interface GetDriverTeamQueryResultDTO {
team: Team;
membership: TeamMembership;
}

View File

@@ -0,0 +1,4 @@
export interface ApproveTeamJoinRequestCommandDTO {
teamId: string;
requestId: string;
}

View File

@@ -1,13 +1,7 @@
import type { Team } from '../../domain/entities/Team';
export interface CreateTeamCommandDTO {
name: string;
tag: string;
description: string;
ownerId: string;
leagues: string[];
}
export interface CreateTeamResultDTO {
team: Team;
}

View File

@@ -0,0 +1,5 @@
import type { Team } from '../../domain/entities/Team';
export interface CreateTeamResultDTO {
team: Team;
}

View File

@@ -0,0 +1,3 @@
import type { Team } from '../../domain/entities/Team';
export type GetAllTeamsQueryResultDTO = Team[];

View File

@@ -0,0 +1,3 @@
export interface GetDriverTeamQueryParamsDTO {
driverId: string;
}

View File

@@ -0,0 +1,7 @@
import type { Team } from '../../domain/entities/Team';
import type { TeamMembership } from '../../domain/types/TeamMembership';
export interface GetDriverTeamQueryResultDTO {
team: Team;
membership: TeamMembership;
}

View File

@@ -0,0 +1,4 @@
export interface GetTeamDetailsQueryParamsDTO {
teamId: string;
driverId: string;
}

View File

@@ -0,0 +1,7 @@
import type { Team } from '../../domain/entities/Team';
import type { TeamMembership } from '../../domain/types/TeamMembership';
export interface GetTeamDetailsQueryResultDTO {
team: Team;
membership: TeamMembership | null;
}

View File

@@ -0,0 +1,3 @@
export interface GetTeamJoinRequestsQueryParamsDTO {
teamId: string;
}

View File

@@ -0,0 +1,3 @@
export interface GetTeamMembersQueryParamsDTO {
teamId: string;
}

View File

@@ -0,0 +1,4 @@
export interface JoinTeamCommandDTO {
teamId: string;
driverId: string;
}

View File

@@ -0,0 +1,4 @@
export interface LeaveTeamCommandDTO {
teamId: string;
driverId: string;
}

View File

@@ -0,0 +1,3 @@
export interface RejectTeamJoinRequestCommandDTO {
requestId: string;
}

View File

@@ -0,0 +1,7 @@
import type { Team } from '../../domain/entities/Team';
export interface UpdateTeamCommandDTO {
teamId: string;
updates: Partial<Pick<Team, 'name' | 'tag' | 'description' | 'leagues'>>;
updatedBy: string;
}

View File

@@ -3,7 +3,7 @@ import type {
TeamMembership,
TeamJoinRequest,
} from '../../domain/types/TeamMembership';
import type { ApproveTeamJoinRequestCommandDTO } from '../dto/TeamCommandAndQueryDTO';
import type { ApproveTeamJoinRequestCommandDTO } from '../dtos/ApproveTeamJoinRequestCommandDTO';
import type { AsyncUseCase } from '@core/shared/application';
import { Result } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';

View File

@@ -5,7 +5,7 @@ import type {
TeamMembershipStatus,
TeamRole,
} from '../../domain/types/TeamMembership';
import type { JoinTeamCommandDTO } from '../dto/TeamCommandAndQueryDTO';
import type { JoinTeamCommandDTO } from '../dtos/JoinTeamCommandDTO';
import type { AsyncUseCase, Logger } from '@core/shared/application';
import { Result as SharedResult } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';

View File

@@ -1,5 +1,5 @@
import type { ITeamMembershipRepository } from '../../domain/repositories/ITeamMembershipRepository';
import type { LeaveTeamCommandDTO } from '../dto/TeamCommandAndQueryDTO';
import type { LeaveTeamCommandDTO } from '../dtos/LeaveTeamCommandDTO';
import type { AsyncUseCase, Logger } from '@core/shared/application';
import { Result as SharedResult } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';

View File

@@ -1,5 +1,5 @@
import type { ITeamMembershipRepository } from '../../domain/repositories/ITeamMembershipRepository';
import type { RejectTeamJoinRequestCommandDTO } from '../dto/TeamCommandAndQueryDTO';
import type { RejectTeamJoinRequestCommandDTO } from '../dtos/RejectTeamJoinRequestCommandDTO';
import { Result } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';

View File

@@ -3,7 +3,7 @@ import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorC
import type { ITeamRepository } from '../../domain/repositories/ITeamRepository';
import type { ITeamMembershipRepository } from '../../domain/repositories/ITeamMembershipRepository';
import type { UpdateTeamCommandDTO } from '../dto/TeamCommandAndQueryDTO';
import type { UpdateTeamCommandDTO } from '../dtos/UpdateTeamCommandDTO';
type UpdateTeamErrorCode = 'INSUFFICIENT_PERMISSIONS' | 'TEAM_NOT_FOUND';