Files
gridpilot.gg/apps/website/lib/di-tokens.ts
2025-12-10 18:28:32 +01:00

126 lines
6.3 KiB
TypeScript

/**
* Dependency Injection tokens for TSyringe container (Website)
*/
export const DI_TOKENS = {
// Repositories
DriverRepository: Symbol.for('IDriverRepository'),
LeagueRepository: Symbol.for('ILeagueRepository'),
RaceRepository: Symbol.for('IRaceRepository'),
ResultRepository: Symbol.for('IResultRepository'),
StandingRepository: Symbol.for('IStandingRepository'),
PenaltyRepository: Symbol.for('IPenaltyRepository'),
ProtestRepository: Symbol.for('IProtestRepository'),
TeamRepository: Symbol.for('ITeamRepository'),
TeamMembershipRepository: Symbol.for('ITeamMembershipRepository'),
RaceRegistrationRepository: Symbol.for('IRaceRegistrationRepository'),
LeagueMembershipRepository: Symbol.for('ILeagueMembershipRepository'),
GameRepository: Symbol.for('IGameRepository'),
SeasonRepository: Symbol.for('ISeasonRepository'),
LeagueScoringConfigRepository: Symbol.for('ILeagueScoringConfigRepository'),
TrackRepository: Symbol.for('ITrackRepository'),
CarRepository: Symbol.for('ICarRepository'),
FeedRepository: Symbol.for('IFeedRepository'),
SocialRepository: Symbol.for('ISocialGraphRepository'),
NotificationRepository: Symbol.for('INotificationRepository'),
NotificationPreferenceRepository: Symbol.for('INotificationPreferenceRepository'),
SponsorRepository: Symbol.for('ISponsorRepository'),
SeasonSponsorshipRepository: Symbol.for('ISeasonSponsorshipRepository'),
SponsorshipRequestRepository: Symbol.for('ISponsorshipRequestRepository'),
SponsorshipPricingRepository: Symbol.for('ISponsorshipPricingRepository'),
// Providers
LeagueScoringPresetProvider: Symbol.for('LeagueScoringPresetProvider'),
DriverRatingProvider: Symbol.for('DriverRatingProvider'),
// Services
ImageService: Symbol.for('ImageServicePort'),
NotificationGatewayRegistry: Symbol.for('NotificationGatewayRegistry'),
// Use Cases - Racing
JoinLeagueUseCase: Symbol.for('JoinLeagueUseCase'),
RegisterForRaceUseCase: Symbol.for('RegisterForRaceUseCase'),
WithdrawFromRaceUseCase: Symbol.for('WithdrawFromRaceUseCase'),
CreateLeagueWithSeasonAndScoringUseCase: Symbol.for('CreateLeagueWithSeasonAndScoringUseCase'),
TransferLeagueOwnershipUseCase: Symbol.for('TransferLeagueOwnershipUseCase'),
// Use Cases - Teams
CreateTeamUseCase: Symbol.for('CreateTeamUseCase'),
JoinTeamUseCase: Symbol.for('JoinTeamUseCase'),
LeaveTeamUseCase: Symbol.for('LeaveTeamUseCase'),
ApproveTeamJoinRequestUseCase: Symbol.for('ApproveTeamJoinRequestUseCase'),
RejectTeamJoinRequestUseCase: Symbol.for('RejectTeamJoinRequestUseCase'),
UpdateTeamUseCase: Symbol.for('UpdateTeamUseCase'),
// Use Cases - Stewarding
FileProtestUseCase: Symbol.for('FileProtestUseCase'),
ReviewProtestUseCase: Symbol.for('ReviewProtestUseCase'),
ApplyPenaltyUseCase: Symbol.for('ApplyPenaltyUseCase'),
RequestProtestDefenseUseCase: Symbol.for('RequestProtestDefenseUseCase'),
SubmitProtestDefenseUseCase: Symbol.for('SubmitProtestDefenseUseCase'),
// Use Cases - Notifications
SendNotificationUseCase: Symbol.for('SendNotificationUseCase'),
MarkNotificationReadUseCase: Symbol.for('MarkNotificationReadUseCase'),
// Queries - Racing
IsDriverRegisteredForRaceUseCase: Symbol.for('IsDriverRegisteredForRaceUseCase'),
GetRaceRegistrationsUseCase: Symbol.for('GetRaceRegistrationsUseCase'),
GetLeagueStandingsUseCase: Symbol.for('GetLeagueStandingsUseCase'),
GetLeagueDriverSeasonStatsUseCase: Symbol.for('GetLeagueDriverSeasonStatsUseCase'),
GetAllLeaguesWithCapacityUseCase: Symbol.for('GetAllLeaguesWithCapacityUseCase'),
GetAllLeaguesWithCapacityAndScoringUseCase: Symbol.for('GetAllLeaguesWithCapacityAndScoringUseCase'),
ListLeagueScoringPresetsUseCase: Symbol.for('ListLeagueScoringPresetsUseCase'),
GetLeagueScoringConfigUseCase: Symbol.for('GetLeagueScoringConfigUseCase'),
GetLeagueFullConfigUseCase: Symbol.for('GetLeagueFullConfigUseCase'),
PreviewLeagueScheduleUseCase: Symbol.for('PreviewLeagueScheduleUseCase'),
GetRaceWithSOFUseCase: Symbol.for('GetRaceWithSOFUseCase'),
GetLeagueStatsUseCase: Symbol.for('GetLeagueStatsUseCase'),
GetRacesPageDataUseCase: Symbol.for('GetRacesPageDataUseCase'),
GetDriversLeaderboardUseCase: Symbol.for('GetDriversLeaderboardUseCase'),
GetTeamsLeaderboardUseCase: Symbol.for('GetTeamsLeaderboardUseCase'),
// Use Cases - Teams (Query-like)
GetAllTeamsUseCase: Symbol.for('GetAllTeamsUseCase'),
GetTeamDetailsUseCase: Symbol.for('GetTeamDetailsUseCase'),
GetTeamMembersUseCase: Symbol.for('GetTeamMembersUseCase'),
GetTeamJoinRequestsUseCase: Symbol.for('GetTeamJoinRequestsUseCase'),
GetDriverTeamUseCase: Symbol.for('GetDriverTeamUseCase'),
// Queries - Stewarding
GetRaceProtestsUseCase: Symbol.for('GetRaceProtestsUseCase'),
GetRacePenaltiesUseCase: Symbol.for('GetRacePenaltiesUseCase'),
// Queries - Notifications
GetUnreadNotificationsQuery: Symbol.for('GetUnreadNotificationsQuery'),
// Use Cases - Sponsors
GetSponsorDashboardUseCase: Symbol.for('GetSponsorDashboardUseCase'),
GetSponsorSponsorshipsUseCase: Symbol.for('GetSponsorSponsorshipsUseCase'),
GetPendingSponsorshipRequestsUseCase: Symbol.for('GetPendingSponsorshipRequestsUseCase'),
GetEntitySponsorshipPricingUseCase: Symbol.for('GetEntitySponsorshipPricingUseCase'),
// Use Cases - Sponsorship
ApplyForSponsorshipUseCase: Symbol.for('ApplyForSponsorshipUseCase'),
AcceptSponsorshipRequestUseCase: Symbol.for('AcceptSponsorshipRequestUseCase'),
RejectSponsorshipRequestUseCase: Symbol.for('RejectSponsorshipRequestUseCase'),
// Data
DriverStats: Symbol.for('DriverStats'),
// Presenters - Racing
RaceWithSOFPresenter: Symbol.for('IRaceWithSOFPresenter'),
RaceProtestsPresenter: Symbol.for('IRaceProtestsPresenter'),
RacePenaltiesPresenter: Symbol.for('IRacePenaltiesPresenter'),
RaceRegistrationsPresenter: Symbol.for('IRaceRegistrationsPresenter'),
DriverRegistrationStatusPresenter: Symbol.for('IDriverRegistrationStatusPresenter'),
// Presenters - Sponsors
SponsorDashboardPresenter: Symbol.for('ISponsorDashboardPresenter'),
SponsorSponsorshipsPresenter: Symbol.for('ISponsorSponsorshipsPresenter'),
PendingSponsorshipRequestsPresenter: Symbol.for('IPendingSponsorshipRequestsPresenter'),
EntitySponsorshipPricingPresenter: Symbol.for('IEntitySponsorshipPricingPresenter'),
LeagueSchedulePreviewPresenter: Symbol.for('ILeagueSchedulePreviewPresenter'),
} as const;
export type DITokens = typeof DI_TOKENS;