feat: update typing to match get me endpoint

This commit is contained in:
Zamitto 2024-09-16 11:22:26 -03:00
parent ee02811aea
commit 1de3a9836c
6 changed files with 53 additions and 62 deletions

View file

@ -190,23 +190,34 @@ export interface UserProfileCurrentGame extends Omit<GameRunning, "objectID"> {
sessionDurationInSeconds: number;
}
export type ProfileVisibility = "PUBLIC" | "PRIVATE" | "FRIENDS";
export interface UserDetails {
id: string;
username: string;
displayName: string;
profileImageUrl: string | null;
profileVisibility: ProfileVisibility;
bio: string;
}
export interface UserProfile {
id: string;
displayName: string;
profileImageUrl: string | null;
profileVisibility: "PUBLIC" | "PRIVATE" | "FRIENDS";
totalPlayTimeInSeconds: number;
profileVisibility: ProfileVisibility;
libraryGames: UserGame[];
recentGames: UserGame[];
friends: UserFriend[];
totalFriends: number;
relation: UserRelation | null;
currentGame: UserProfileCurrentGame | null;
bio: string;
}
export interface UpdateProfileRequest {
displayName?: string;
profileVisibility?: "PUBLIC" | "PRIVATE" | "FRIENDS";
profileVisibility?: ProfileVisibility;
profileImageUrl?: string | null;
bio?: string;
}