website refactor
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { IDomainError, CommonDomainErrorKind } from '@core/shared/errors';
|
||||
import type { DomainError, CommonDomainErrorKind } from '@core/shared/errors';
|
||||
|
||||
/**
|
||||
* Domain Error: SocialDomainError
|
||||
*
|
||||
* Implements the shared IDomainError contract for social domain failures.
|
||||
*/
|
||||
export class SocialDomainError extends Error implements IDomainError<CommonDomainErrorKind> {
|
||||
export class SocialDomainError extends Error implements DomainError<CommonDomainErrorKind> {
|
||||
readonly name = 'SocialDomainError';
|
||||
readonly type = 'domain' as const;
|
||||
readonly context = 'social';
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import type { FeedItem } from '../types/FeedItem';
|
||||
|
||||
export interface IFeedRepository {
|
||||
export interface FeedRepository {
|
||||
getFeedForDriver(driverId: string, limit?: number): Promise<FeedItem[]>;
|
||||
getGlobalFeed(limit?: number): Promise<FeedItem[]>;
|
||||
}
|
||||
}
|
||||
|
||||
// Alias for backward compatibility
|
||||
export type IFeedRepository = FeedRepository;
|
||||
@@ -1,7 +1,10 @@
|
||||
import type { Driver } from '@core/racing/domain/entities/Driver';
|
||||
|
||||
export interface ISocialGraphRepository {
|
||||
export interface SocialGraphRepository {
|
||||
getFriends(driverId: string): Promise<Driver[]>;
|
||||
getFriendIds(driverId: string): Promise<string[]>;
|
||||
getSuggestedFriends(driverId: string, limit?: number): Promise<Driver[]>;
|
||||
}
|
||||
}
|
||||
|
||||
// Alias for backward compatibility
|
||||
export type ISocialGraphRepository = SocialGraphRepository;
|
||||
Reference in New Issue
Block a user