website refactor

This commit is contained in:
2026-01-16 13:48:18 +01:00
parent 20a42c52fd
commit 7e02fc3ea5
796 changed files with 1946 additions and 2545 deletions

View File

@@ -7,7 +7,7 @@
import type { Achievement, AchievementCategory } from '../entities/Achievement';
import type { UserAchievement } from '../entities/UserAchievement';
export interface IAchievementRepository {
export interface AchievementRepository {
// Achievement operations
findAchievementById(id: string): Promise<Achievement | null>;
findAllAchievements(): Promise<Achievement[]>;

View File

@@ -7,7 +7,7 @@ import type { AdminVoteSession } from '../entities/AdminVoteSession';
* Sessions are scoped to leagues and control voting windows.
*/
export interface IAdminVoteSessionRepository {
export interface AdminVoteSessionRepository {
/**
* Save a vote session
*/

View File

@@ -6,7 +6,7 @@ import { User } from '../entities/User';
*
* Repository interface for authentication operations.
*/
export interface IAuthRepository {
export interface AuthRepository {
/**
* Find user by email
*/

View File

@@ -5,7 +5,7 @@ import { Company } from '../entities/Company';
*
* Repository interface for Company entity operations.
*/
export interface ICompanyRepository {
export interface CompanyRepository {
/**
* Create a new company (returns unsaved entity)
*/

View File

@@ -1,4 +1,4 @@
import { IExternalGameRatingRepository } from './IExternalGameRatingRepository';
import { ExternalGameRatingRepository } from './ExternalGameRatingRepository';
import { ExternalGameRatingProfile } from '../entities/ExternalGameRatingProfile';
import { UserId } from '../value-objects/UserId';
import { GameKey } from '../value-objects/GameKey';
@@ -11,7 +11,7 @@ import { ExternalRatingProvenance } from '../value-objects/ExternalRatingProvena
*/
describe('IExternalGameRatingRepository', () => {
// Mock implementation for testing
class MockExternalGameRatingRepository implements IExternalGameRatingRepository {
class MockExternalGameRatingRepository implements ExternalGameRatingRepository {
private profiles: Map<string, ExternalGameRatingProfile> = new Map();
private getKey(userId: string, gameKey: string): string {
@@ -61,7 +61,7 @@ describe('IExternalGameRatingRepository', () => {
return this.profiles.has(key);
}
async findProfilesPaginated(userId: string, options?: import('./IExternalGameRatingRepository').PaginatedQueryOptions): Promise<import('./IExternalGameRatingRepository').PaginatedResult<ExternalGameRatingProfile>> {
async findProfilesPaginated(userId: string, options?: import('./ExternalGameRatingRepository').PaginatedQueryOptions): Promise<import('./ExternalGameRatingRepository').PaginatedResult<ExternalGameRatingProfile>> {
const allProfiles = await this.findByUserId(userId);
// Apply filters
@@ -89,7 +89,7 @@ describe('IExternalGameRatingRepository', () => {
const hasMore = offset + limit < total;
const nextOffset = hasMore ? offset + limit : undefined;
const result: import('./IExternalGameRatingRepository').PaginatedResult<ExternalGameRatingProfile> = {
const result: import('./ExternalGameRatingRepository').PaginatedResult<ExternalGameRatingProfile> = {
items,
total,
limit,

View File

@@ -33,7 +33,7 @@ export interface PaginatedResult<T> {
nextOffset?: number;
}
export interface IExternalGameRatingRepository {
export interface ExternalGameRatingRepository {
/**
* Find profile by user ID and game key
*/

View File

@@ -1,4 +1,4 @@
import { Result } from '@core/shared/application/Result';
import { Result } from '@core/shared/domain/Result';
export interface PasswordResetRequest {
email: string;
@@ -8,7 +8,7 @@ export interface PasswordResetRequest {
used?: boolean;
}
export interface IMagicLinkRepository {
export interface MagicLinkRepository {
/**
* Create a password reset request
*/

View File

@@ -6,10 +6,10 @@ import { RatingEvent } from '../entities/RatingEvent';
import { RatingEventId } from '../value-objects/RatingEventId';
import { RatingDimensionKey } from '../value-objects/RatingDimensionKey';
import { RatingDelta } from '../value-objects/RatingDelta';
import { IRatingEventRepository, FindByUserIdOptions, PaginatedQueryOptions, PaginatedResult } from './IRatingEventRepository';
import { RatingEventRepository, FindByUserIdOptions, PaginatedQueryOptions, PaginatedResult } from './RatingEventRepository';
// In-memory test implementation
class InMemoryRatingEventRepository implements IRatingEventRepository {
class InMemoryRatingEventRepository implements RatingEventRepository {
private events: RatingEvent[] = [];
async save(event: RatingEvent): Promise<RatingEvent> {

View File

@@ -44,7 +44,7 @@ export interface PaginatedResult<T> {
nextOffset?: number;
}
export interface IRatingEventRepository {
export interface RatingEventRepository {
/**
* Save a rating event to the ledger
*/

View File

@@ -7,7 +7,7 @@
import type { SponsorAccount } from '../entities/SponsorAccount';
import type { UserId } from '../value-objects/UserId';
export interface ISponsorAccountRepository {
export interface SponsorAccountRepository {
save(account: SponsorAccount): Promise<void>;
findById(id: UserId): Promise<SponsorAccount | null>;
findBySponsorId(sponsorId: string): Promise<SponsorAccount | null>;

View File

@@ -3,10 +3,10 @@
*/
import { UserRating } from '../value-objects/UserRating';
import { IUserRatingRepository } from './IUserRatingRepository';
import { UserRatingRepository } from './UserRatingRepository';
// In-memory test implementation
class InMemoryUserRatingRepository implements IUserRatingRepository {
class InMemoryUserRatingRepository implements UserRatingRepository {
private ratings: Map<string, UserRating> = new Map();
async findByUserId(userId: string): Promise<UserRating | null> {

View File

@@ -7,7 +7,7 @@
import type { UserRating } from '../value-objects/UserRating';
export interface IUserRatingRepository {
export interface UserRatingRepository {
/**
* Find rating snapshot by user ID
*/

View File

@@ -20,7 +20,7 @@ export interface StoredUser {
createdAt: Date;
}
export interface IUserRepository {
export interface UserRepository {
/**
* Find user by email
*/