This commit is contained in:
2025-12-16 18:17:48 +01:00
parent 362894d1a5
commit ec7c0b8f2a
94 changed files with 4240 additions and 983 deletions

View File

@@ -0,0 +1,4 @@
export interface AcceptSponsorshipRequestDTO {
requestId: string;
respondedBy: string; // driverId of the person accepting
}

View File

@@ -0,0 +1,8 @@
export interface AcceptSponsorshipRequestResultDTO {
requestId: string;
sponsorshipId: string;
status: 'accepted';
acceptedAt: Date;
platformFee: number;
netAmount: number;
}

View File

@@ -0,0 +1,13 @@
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
import type { SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
import type { Currency } from '../../domain/value-objects/Money';
export interface ApplyForSponsorshipDTO {
sponsorId: string;
entityType: SponsorableEntityType;
entityId: string;
tier: SponsorshipTier;
offeredAmount: number; // in cents
currency?: Currency;
message?: string;
}

View File

@@ -0,0 +1,5 @@
export interface ApplyForSponsorshipResultDTO {
requestId: string;
status: 'pending';
createdAt: Date;
}

View File

@@ -0,0 +1,4 @@
export interface ApproveLeagueJoinRequestResultDTO {
success: boolean;
message: string;
}

View File

@@ -0,0 +1,3 @@
export interface CancelRaceCommandDTO {
raceId: string;
}

View File

@@ -0,0 +1,3 @@
export interface CompleteRaceCommandDTO {
raceId: string;
}

View File

@@ -0,0 +1,6 @@
export interface CreateLeagueWithSeasonAndScoringResultDTO {
leagueId: string;
seasonId: string;
scoringPresetId?: string;
scoringPresetName?: string;
}

View File

@@ -0,0 +1,10 @@
export interface CreateSponsorResultDTO {
sponsor: {
id: string;
name: string;
contactEmail: string;
websiteUrl?: string;
logoUrl?: string;
createdAt: Date;
};
}

View File

@@ -0,0 +1,6 @@
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
export interface GetEntitySponsorshipPricingDTO {
entityType: SponsorableEntityType;
entityId: string;
}

View File

@@ -0,0 +1,11 @@
import type { SponsorableEntityType } from '../../domain/entities/SponsorshipRequest';
import type { SponsorshipSlotDTO } from '../use-cases/SponsorshipSlotDTO';
export interface GetEntitySponsorshipPricingResultDTO {
entityType: SponsorableEntityType;
entityId: string;
acceptingApplications: boolean;
customRequirements?: string;
mainSlot?: SponsorshipSlotDTO;
secondarySlot?: SponsorshipSlotDTO;
}

View File

@@ -0,0 +1,4 @@
export interface GetLeagueAdminPermissionsResultDTO {
canRemoveMember: boolean;
canUpdateRoles: boolean;
}

View File

@@ -0,0 +1,7 @@
export interface GetLeagueAdminResultDTO {
league: {
id: string;
ownerId: string;
};
// Additional data would be populated by combining multiple use cases
}

View File

@@ -0,0 +1,13 @@
export interface GetLeagueJoinRequestsResultDTO {
joinRequests: Array<{
id: string;
leagueId: string;
driverId: string;
requestedAt: Date;
message?: string;
driver: {
id: string;
name: string;
};
}>;
}

View File

@@ -0,0 +1,3 @@
export interface GetLeagueJoinRequestsUseCaseParams {
leagueId: string;
}

View File

@@ -0,0 +1,6 @@
import type { LeagueMembership } from '../../domain/entities/LeagueMembership';
export interface GetLeagueMembershipsResultDTO {
memberships: LeagueMembership[];
drivers: { id: string; name: string }[];
}

View File

@@ -0,0 +1,13 @@
import type { SponsorshipTier } from '../../domain/entities/SeasonSponsorship';
export interface SponsorshipSlotDTO {
tier: SponsorshipTier;
price: number;
currency: string;
formattedPrice: string;
benefits: string[];
available: boolean;
maxSlots: number;
filledSlots: number;
pendingRequests: number;
}

View File

@@ -1,8 +1,5 @@
import type { Team } from '../../domain/entities/Team';
import type {
TeamJoinRequest,
TeamMembership,
} from '../../domain/types/TeamMembership';
import type { TeamMembership } from '../../domain/types/TeamMembership';
export interface JoinTeamCommandDTO {
teamId: string;
@@ -15,6 +12,7 @@ export interface LeaveTeamCommandDTO {
}
export interface ApproveTeamJoinRequestCommandDTO {
teamId: string;
requestId: string;
}