website refactor
This commit is contained in:
@@ -3,9 +3,8 @@ import {
|
||||
GetCurrentUserSocialUseCase,
|
||||
type GetCurrentUserSocialApplicationError,
|
||||
type GetCurrentUserSocialInput,
|
||||
type GetCurrentUserSocialResult,
|
||||
} from './GetCurrentUserSocialUseCase';
|
||||
import type { ISocialGraphRepository } from '../../domain/repositories/ISocialGraphRepository';
|
||||
import type { SocialGraphRepository } from '../../domain/repositories/SocialGraphRepository';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import { Driver } from '@core/racing/domain/entities/Driver';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import type { ISocialGraphRepository } from '../../domain/repositories/ISocialGraphRepository';
|
||||
import type { SocialGraphRepository } from '../../domain/repositories/SocialGraphRepository';
|
||||
import type { SocialFriendSummary, SocialUserSummary } from '../types/SocialUser';
|
||||
|
||||
export interface GetCurrentUserSocialParams {
|
||||
|
||||
@@ -3,9 +3,8 @@ import {
|
||||
GetUserFeedUseCase,
|
||||
type GetUserFeedApplicationError,
|
||||
type GetUserFeedInput,
|
||||
type GetUserFeedResult,
|
||||
} from './GetUserFeedUseCase';
|
||||
import type { IFeedRepository } from '../../domain/repositories/IFeedRepository';
|
||||
import type { FeedRepository } from '../../domain/repositories/FeedRepository';
|
||||
import type { FeedItem } from '../../domain/types/FeedItem';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import type { IFeedRepository } from '../../domain/repositories/IFeedRepository';
|
||||
import type { FeedRepository } from '../../domain/repositories/FeedRepository';
|
||||
import type { FeedItem } from '../../domain/types/FeedItem';
|
||||
|
||||
export interface GetUserFeedParams {
|
||||
|
||||
@@ -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