fix issues in core

This commit is contained in:
2025-12-23 17:31:45 +01:00
parent d04a21fe02
commit 4318b380d9
34 changed files with 116 additions and 103 deletions

View File

@@ -2,8 +2,7 @@ import type { Logger, UseCaseOutputPort } from '@core/shared/application';
import { Result } from '@core/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
import type { ISocialGraphRepository } from '../../domain/repositories/ISocialGraphRepository';
import type { CurrentUserSocialDTO } from '../dto/CurrentUserSocialDTO';
import type { FriendDTO } from '../dto/FriendDTO';
import type { SocialFriendSummary, SocialUserSummary } from '../types/SocialUser';
export interface GetCurrentUserSocialParams {
driverId: string;
@@ -12,8 +11,8 @@ export interface GetCurrentUserSocialParams {
export type GetCurrentUserSocialInput = GetCurrentUserSocialParams;
export interface GetCurrentUserSocialResult {
currentUser: CurrentUserSocialDTO;
friends: FriendDTO[];
currentUser: SocialUserSummary;
friends: SocialFriendSummary[];
}
export type GetCurrentUserSocialErrorCode = 'REPOSITORY_ERROR';
@@ -61,15 +60,16 @@ export class GetCurrentUserSocialUseCase {
// The social graph context currently only knows about relationships.
// Profile fields for the current user are expected to be enriched by identity/profile contexts.
const friends: FriendDTO[] = friendsDomain.map((friend) => ({
const friends: SocialFriendSummary[] = friendsDomain.map((friend) => ({
driverId: friend.id,
displayName: friend.name.toString(),
avatarUrl: '',
countryCode: '',
isOnline: false,
lastSeen: new Date(),
}));
const currentUser: CurrentUserSocialDTO = {
const currentUser: SocialUserSummary = {
driverId,
displayName: '',
avatarUrl: '',