From 7082416110e1f1b80d870579ba13f0fc5225e349 Mon Sep 17 00:00:00 2001 From: Lamarcke Date: Sat, 20 Jul 2024 22:29:57 -0300 Subject: [PATCH] Profile stats screen --- .../achievement/AchievementItem.tsx | 6 +- .../hooks/useFeaturedObtainedAchievement.ts | 6 +- src/components/game/figure/GameGridFigure.tsx | 4 +- src/components/game/figure/GameListFigure.tsx | 4 +- .../game/util/getGameCategoryName.ts | 26 ++ .../game/util/getGameCategoryText.ts | 14 - src/components/general/RoundedIcon.tsx | 29 +++ .../general/shell/GlobalAppShell.tsx | 4 +- .../edit/ProfileEditFeaturedAchievement.tsx | 8 +- .../useProfileMetricsDistributionByType.ts | 23 ++ .../useProfileMetricsDistributionByYear.ts | 21 ++ ...iew.tsx => ProfileStatsSimpleOverview.tsx} | 20 +- .../profile/view/ProfileViewNavbar.tsx | 5 + .../profile/view/ProfileViewNavbarLink.tsx | 10 +- .../view/stats/ProfileStatsDataIcon.tsx | 35 +++ .../ProfileStatsDistributionBarByType.tsx | 51 ++++ .../ProfileStatsDistributionLineByYear.tsx | 111 ++++++++ .../ProfileStatsDistributionRadarByType.tsx | 76 ++++++ src/components/user-level/UserLevelInfo.tsx | 4 +- src/pages/achievements/index.tsx | 2 +- src/pages/profile/[userId]/index.tsx | 6 +- src/pages/profile/[userId]/stats/index.tsx | 246 ++++++++++++++++++ src/pages/search/index.tsx | 10 +- src/wrapper/input/server_swagger.json | 2 +- 24 files changed, 678 insertions(+), 45 deletions(-) create mode 100644 src/components/game/util/getGameCategoryName.ts delete mode 100644 src/components/game/util/getGameCategoryText.ts create mode 100644 src/components/general/RoundedIcon.tsx create mode 100644 src/components/profile/hooks/useProfileMetricsDistributionByType.ts create mode 100644 src/components/profile/hooks/useProfileMetricsDistributionByYear.ts rename src/components/profile/view/{ProfileStatsOverview.tsx => ProfileStatsSimpleOverview.tsx} (86%) create mode 100644 src/components/profile/view/stats/ProfileStatsDataIcon.tsx create mode 100644 src/components/profile/view/stats/ProfileStatsDistributionBarByType.tsx create mode 100644 src/components/profile/view/stats/ProfileStatsDistributionLineByYear.tsx create mode 100644 src/components/profile/view/stats/ProfileStatsDistributionRadarByType.tsx create mode 100644 src/pages/profile/[userId]/stats/index.tsx diff --git a/src/components/achievement/AchievementItem.tsx b/src/components/achievement/AchievementItem.tsx index 05d5ac1..8d6d49c 100644 --- a/src/components/achievement/AchievementItem.tsx +++ b/src/components/achievement/AchievementItem.tsx @@ -63,10 +63,12 @@ const AchievementItem = ({ targetUserId, achievement }: Props) => { - + <Title fz={"1.5rem"} className={"break-keep text-center"}> {achievement.expGainAmount} XP - {obtainedText} + + {obtainedText} + diff --git a/src/components/achievement/hooks/useFeaturedObtainedAchievement.ts b/src/components/achievement/hooks/useFeaturedObtainedAchievement.ts index 8859681..1204317 100644 --- a/src/components/achievement/hooks/useFeaturedObtainedAchievement.ts +++ b/src/components/achievement/hooks/useFeaturedObtainedAchievement.ts @@ -19,7 +19,7 @@ export function useFeaturedObtainedAchievement( queryKey, queryFn: async () => { if (!userId) { - return undefined; + return null; } const featuredAchivement = @@ -27,6 +27,10 @@ export function useFeaturedObtainedAchievement( userId, ); + if (!featuredAchivement) { + return null; + } + return featuredAchivement; }, enabled: !!userId, diff --git a/src/components/game/figure/GameGridFigure.tsx b/src/components/game/figure/GameGridFigure.tsx index 1e7127a..fd00d04 100755 --- a/src/components/game/figure/GameGridFigure.tsx +++ b/src/components/game/figure/GameGridFigure.tsx @@ -3,7 +3,7 @@ import GameFigureImage, { IGameFigureProps, } from "@/components/game/figure/GameFigureImage"; import { Badge } from "@mantine/core"; -import { getGameCategoryText } from "@/components/game/util/getGameCategoryText"; +import { getGameCategoryName } from "@/components/game/util/getGameCategoryName"; import { TGameOrSearchGame } from "@/components/game/util/types"; interface IGameGridFigureProps { @@ -13,7 +13,7 @@ interface IGameGridFigureProps { const GameGridFigure = ({ game, figureProps }: IGameGridFigureProps) => { const categoryText = useMemo( - () => getGameCategoryText(game?.category), + () => getGameCategoryName(game?.category), [game], ); return ( diff --git a/src/components/game/figure/GameListFigure.tsx b/src/components/game/figure/GameListFigure.tsx index 8b579ac..0b0cc54 100755 --- a/src/components/game/figure/GameListFigure.tsx +++ b/src/components/game/figure/GameListFigure.tsx @@ -18,7 +18,7 @@ import { getLocalizedFirstReleaseDate } from "@/components/game/util/getLocalize import { TGameOrSearchGame } from "@/components/game/util/types"; import { getGameGenres } from "@/components/game/util/getGameGenres"; import { getGamePlatformInfo } from "@/components/game/util/getGamePlatformInfo"; -import { getGameCategoryText } from "@/components/game/util/getGameCategoryText"; +import { getGameCategoryName } from "@/components/game/util/getGameCategoryName"; import GameInfoPlatforms from "@/components/game/info/GameInfoPlatforms"; interface IGameListFigureProps { @@ -40,7 +40,7 @@ const GameListFigure = ({ game, figureProps }: IGameListFigureProps) => { const genres = getGameGenres(game); const genreNames = genres?.join(", "); const categoryText = useMemo( - () => getGameCategoryText(game?.category), + () => getGameCategoryName(game?.category), [game.category], ); diff --git a/src/components/game/util/getGameCategoryName.ts b/src/components/game/util/getGameCategoryName.ts new file mode 100644 index 0000000..676461c --- /dev/null +++ b/src/components/game/util/getGameCategoryName.ts @@ -0,0 +1,26 @@ +import { Game } from "@/wrapper/server"; + +/** + * Based on a game's category id, retrieves its readable name. + * @param category + */ +export function getGameCategoryName(category?: number) { + const CATEGORY_TO_TEXT = { + [Game.category._1.valueOf()]: "DLC", + [Game.category._2.valueOf()]: "DLC", + [Game.category._3.valueOf()]: "Bundle", + [Game.category._4.valueOf()]: "Expansion", + [Game.category._5.valueOf()]: "Mod", + [Game.category._6.valueOf()]: "Episode", + [Game.category._7.valueOf()]: "Season", + [Game.category._8.valueOf()]: "Remake", + [Game.category._9.valueOf()]: "Remaster", + [Game.category._10.valueOf()]: "Expanded Game", + [Game.category._11.valueOf()]: "Port", + [Game.category._12.valueOf()]: "Fork", + [Game.category._13.valueOf()]: "Pack", + [Game.category._14.valueOf()]: "Update", + }; + if (!category) return undefined; + return CATEGORY_TO_TEXT[category]; +} diff --git a/src/components/game/util/getGameCategoryText.ts b/src/components/game/util/getGameCategoryText.ts deleted file mode 100644 index e93c717..0000000 --- a/src/components/game/util/getGameCategoryText.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Game } from "@/wrapper/server"; - -export function getGameCategoryText(category?: number) { - const CATEGORY_TO_TEXT = { - [Game.category._1.valueOf()]: "DLC", - [Game.category._2.valueOf()]: "DLC", - [Game.category._3.valueOf()]: "Bundle", - [Game.category._4.valueOf()]: "Expansion", - [Game.category._5.valueOf()]: "Mod", - [Game.category._13.valueOf()]: "Pack", - }; - if (!category) return undefined; - return CATEGORY_TO_TEXT[category]; -} diff --git a/src/components/general/RoundedIcon.tsx b/src/components/general/RoundedIcon.tsx new file mode 100644 index 0000000..cd291f6 --- /dev/null +++ b/src/components/general/RoundedIcon.tsx @@ -0,0 +1,29 @@ +import React, { + ExoticComponent, + PropsWithChildren, + PropsWithoutRef, +} from "react"; +import { IconBrandXbox, IconProps } from "@tabler/icons-react"; +import { Box, BoxProps, ThemeIcon, ThemeIconProps } from "@mantine/core"; + +interface RoundedIconProps { + icon: ExoticComponent>; + iconProps?: PropsWithoutRef; + wrapperProps?: PropsWithoutRef; +} + +const RoundedIcon = (props: RoundedIconProps) => { + return ( + + + + ); +}; + +export default RoundedIcon; diff --git a/src/components/general/shell/GlobalAppShell.tsx b/src/components/general/shell/GlobalAppShell.tsx index 2a9e79b..b614e6d 100755 --- a/src/components/general/shell/GlobalAppShell.tsx +++ b/src/components/general/shell/GlobalAppShell.tsx @@ -41,11 +41,11 @@ const GlobalAppShell = ({ children }: { children: React.ReactNode }) => { {/** - Remove 'ps=0' to make the sidebar push the main content to its right when opened + Remove '!ps-2.5' to make the sidebar push the main content to its right when opened */} {children} diff --git a/src/components/profile/edit/ProfileEditFeaturedAchievement.tsx b/src/components/profile/edit/ProfileEditFeaturedAchievement.tsx index 364ab17..3abb4fb 100644 --- a/src/components/profile/edit/ProfileEditFeaturedAchievement.tsx +++ b/src/components/profile/edit/ProfileEditFeaturedAchievement.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from "react"; import { useAchievements } from "@/components/achievement/hooks/useAchievements"; -import { Center, Modal, Select, Stack, Text } from "@mantine/core"; +import { Center, Group, Modal, Select, Stack, Text } from "@mantine/core"; import { useFeaturedObtainedAchievement } from "@/components/achievement/hooks/useFeaturedObtainedAchievement"; import useUserId from "@/components/auth/hooks/useUserId"; import AchievementItem from "@/components/achievement/AchievementItem"; @@ -74,7 +74,11 @@ const ProfileEditFeaturedAchievement = () => { achievements.data == undefined || allObtainedAchievements.data == undefined ) { - return null; + return ( + + No obtained achievement found. + + ); } return ( diff --git a/src/components/profile/hooks/useProfileMetricsDistributionByType.ts b/src/components/profile/hooks/useProfileMetricsDistributionByType.ts new file mode 100644 index 0000000..03fb95c --- /dev/null +++ b/src/components/profile/hooks/useProfileMetricsDistributionByType.ts @@ -0,0 +1,23 @@ +import { useQuery } from "@tanstack/react-query"; +import { ProfileMetricsService } from "@/wrapper/server"; + +export type ProfileMetricsDistributionTypeBy = + | "genre" + | "category" + | "mode" + | "platform"; + +export function useProfileMetricsDistributionByType( + userId: string, + by: ProfileMetricsDistributionTypeBy, +) { + return useQuery({ + queryKey: ["profile", "metrics", "distribution", "type", userId, by], + queryFn: async () => { + return ProfileMetricsService.profileMetricsControllerGetTypeDistribution( + userId, + by, + ); + }, + }); +} diff --git a/src/components/profile/hooks/useProfileMetricsDistributionByYear.ts b/src/components/profile/hooks/useProfileMetricsDistributionByYear.ts new file mode 100644 index 0000000..51d9176 --- /dev/null +++ b/src/components/profile/hooks/useProfileMetricsDistributionByYear.ts @@ -0,0 +1,21 @@ +import { useQuery } from "@tanstack/react-query"; +import { ProfileMetricsService } from "@/wrapper/server"; + +export type ProfileMetricsDistributionYearBy = "release_year" | "finish_year"; + +export function useProfileMetricsDistributionByYear( + userId: string | undefined, + by: ProfileMetricsDistributionYearBy, +) { + return useQuery({ + queryKey: ["profile", "metrics", "distribution", userId, by], + queryFn: async () => { + if (!userId) return null; + return ProfileMetricsService.profileMetricsControllerGetYearDistribution( + userId, + by, + ); + }, + enabled: !!userId, + }); +} diff --git a/src/components/profile/view/ProfileStatsOverview.tsx b/src/components/profile/view/ProfileStatsSimpleOverview.tsx similarity index 86% rename from src/components/profile/view/ProfileStatsOverview.tsx rename to src/components/profile/view/ProfileStatsSimpleOverview.tsx index e5b5667..d3ab061 100644 --- a/src/components/profile/view/ProfileStatsOverview.tsx +++ b/src/components/profile/view/ProfileStatsSimpleOverview.tsx @@ -11,6 +11,7 @@ import { import { DetailsBox } from "@/components/general/DetailsBox"; import { BarChart } from "@mantine/charts"; import { ProfileMetricsOverviewDto } from "@/wrapper/server"; +import TextLink from "@/components/general/TextLink"; interface Props { userId: string; @@ -31,7 +32,7 @@ const buildBarChartData = (data: ProfileMetricsOverviewDto) => { ]; }; -const ProfileStatsOverview = ({ userId }: Props) => { +const ProfileStatsSimpleOverview = ({ userId }: Props) => { const metricsOverviewQuery = useProfileMetricsOverview(userId); const playtimeValue = @@ -40,18 +41,20 @@ const ProfileStatsOverview = ({ userId }: Props) => { return ( - + {metricsOverviewQuery.data?.totalGames} - Total games + + Total games + {metricsOverviewQuery.data?.totalFinishedGames} - + Finished games @@ -66,8 +69,8 @@ const ProfileStatsOverview = ({ userId }: Props) => { shadow="md" > - - Estimated playtime* + + Estimated playtime (in hours)* @@ -119,8 +122,11 @@ const ProfileStatsOverview = ({ userId }: Props) => { /> )} + + Show more + ); }; -export default ProfileStatsOverview; +export default ProfileStatsSimpleOverview; diff --git a/src/components/profile/view/ProfileViewNavbar.tsx b/src/components/profile/view/ProfileViewNavbar.tsx index 346dca7..87fadac 100644 --- a/src/components/profile/view/ProfileViewNavbar.tsx +++ b/src/components/profile/view/ProfileViewNavbar.tsx @@ -57,6 +57,11 @@ const ProfileViewNavbar = ({ userId, ...groupProps }: Props) => { targetUserId={userId} criteria={criteria.FOLLOWING} /> + ); }; diff --git a/src/components/profile/view/ProfileViewNavbarLink.tsx b/src/components/profile/view/ProfileViewNavbarLink.tsx index 3bdd9c4..2526fe6 100644 --- a/src/components/profile/view/ProfileViewNavbarLink.tsx +++ b/src/components/profile/view/ProfileViewNavbarLink.tsx @@ -5,11 +5,13 @@ import Link from "next/link"; interface Props extends ComponentPropsWithoutRef { title: string; itemCount?: number; + showItemCount?: boolean; } const ProfileViewNavbarLink = ({ title, itemCount = 0, + showItemCount = true, ...linkProps }: Props) => { return ( @@ -18,8 +20,12 @@ const ProfileViewNavbarLink = ({ {...linkProps} > {title} - - {itemCount} + {showItemCount && ( + <> + + {itemCount} + + )} ); }; diff --git a/src/components/profile/view/stats/ProfileStatsDataIcon.tsx b/src/components/profile/view/stats/ProfileStatsDataIcon.tsx new file mode 100644 index 0000000..40b52f1 --- /dev/null +++ b/src/components/profile/view/stats/ProfileStatsDataIcon.tsx @@ -0,0 +1,35 @@ +import React, { ExoticComponent, PropsWithoutRef } from "react"; +import { IconDeviceGamepad2, IconProps } from "@tabler/icons-react"; +import { Group, Stack, Text, Title } from "@mantine/core"; +import RoundedIcon from "@/components/general/RoundedIcon"; + +interface ProfileStatsDataIconProps { + description: string; + count?: number; + icon: ExoticComponent>; +} + +const ProfileStatsDataIcon = ({ + description, + count = 0, + icon, +}: ProfileStatsDataIconProps) => { + return ( + + + + + {count} + + {description} + + + ); +}; + +export default ProfileStatsDataIcon; diff --git a/src/components/profile/view/stats/ProfileStatsDistributionBarByType.tsx b/src/components/profile/view/stats/ProfileStatsDistributionBarByType.tsx new file mode 100644 index 0000000..528d6dd --- /dev/null +++ b/src/components/profile/view/stats/ProfileStatsDistributionBarByType.tsx @@ -0,0 +1,51 @@ +import React from "react"; +import { + ProfileMetricsDistributionTypeBy, + useProfileMetricsDistributionByType, +} from "@/components/profile/hooks/useProfileMetricsDistributionByType"; +import { BarChart, BarChartProps, LineChart } from "@mantine/charts"; +import CenteredLoading from "@/components/general/CenteredLoading"; + +interface Props extends Omit { + userId: string; + by: ProfileMetricsDistributionTypeBy; +} + +const ProfileStatsDistributionBarByType = ({ + userId, + by, + ...barChartProps +}: Props) => { + const metricsDistributionQuery = useProfileMetricsDistributionByType( + userId, + by, + ); + + return ( + <> + {metricsDistributionQuery.isLoading && } + {metricsDistributionQuery.data != undefined && ( + + )} + + ); +}; + +export default ProfileStatsDistributionBarByType; diff --git a/src/components/profile/view/stats/ProfileStatsDistributionLineByYear.tsx b/src/components/profile/view/stats/ProfileStatsDistributionLineByYear.tsx new file mode 100644 index 0000000..cdae56d --- /dev/null +++ b/src/components/profile/view/stats/ProfileStatsDistributionLineByYear.tsx @@ -0,0 +1,111 @@ +import React, { useState } from "react"; +import { Box, Group, Stack, Tabs, Text } from "@mantine/core"; +import { DetailsBox } from "@/components/general/DetailsBox"; +import { + ProfileMetricsDistributionYearBy, + useProfileMetricsDistributionByYear, +} from "@/components/profile/hooks/useProfileMetricsDistributionByYear"; +import { LineChart, LineChartSeries } from "@mantine/charts"; +import CenteredLoading from "@/components/general/CenteredLoading"; + +interface Props { + userId: string; +} + +const RELEASE_YEAR_SERIES: LineChartSeries[] = [ + { + name: "count", + label: "Total", + color: "blue", + }, + { + name: "reviewedCount", + label: "Reviewed", + color: "teal", + }, +]; + +const FINISH_YEAR_SERIES: LineChartSeries[] = [ + { + name: "count", + label: "Total", + color: "blue", + }, + { + name: "totalEstimatedPlaytime", + label: "Estimated playtime (in hours)", + color: "grape", + }, + { + name: "reviewedCount", + label: "Reviewed", + color: "teal", + }, +]; + +const ProfileStatsDistributionLineByYear = ({ userId }: Props) => { + const [currentTab, setCurrentTab] = + useState("finish_year"); + + const metricsReleaseYearDistributionQuery = + useProfileMetricsDistributionByYear(userId, "release_year"); + const metricsFinishYearDistributionQuery = + useProfileMetricsDistributionByYear(userId, "finish_year"); + + const hasPlaytime = currentTab === "finish_year"; + + return ( + + { + if (v) setCurrentTab(v as ProfileMetricsDistributionYearBy); + }} + > + + Finish Year + Release year + + + + {metricsFinishYearDistributionQuery.isLoading && ( + + )} + {metricsFinishYearDistributionQuery.data && ( + + )} + + + {metricsReleaseYearDistributionQuery.isLoading && ( + + )} + {metricsReleaseYearDistributionQuery.data && ( + + )} + + + + + ); +}; + +export default ProfileStatsDistributionLineByYear; diff --git a/src/components/profile/view/stats/ProfileStatsDistributionRadarByType.tsx b/src/components/profile/view/stats/ProfileStatsDistributionRadarByType.tsx new file mode 100644 index 0000000..1ea3311 --- /dev/null +++ b/src/components/profile/view/stats/ProfileStatsDistributionRadarByType.tsx @@ -0,0 +1,76 @@ +import React from "react"; +import { + ProfileMetricsDistributionTypeBy, + useProfileMetricsDistributionByType, +} from "@/components/profile/hooks/useProfileMetricsDistributionByType"; +import { Box } from "@mantine/core"; +import { LineChart, RadarChart } from "@mantine/charts"; +import { Game } from "@/wrapper/server"; +import category = Game.category; +import { + type ProfileMetricsTypeDistributionItem, + ProfileMetricsTypeDistributionResponseDto, +} from "@/wrapper/server"; +import CenteredLoading from "@/components/general/CenteredLoading"; + +interface Props { + userId: string; + by: ProfileMetricsDistributionTypeBy; +} + +/** + * Converted distribution item - necessary because RadarChart doesn't have a 'valueFormatter' or a 'label' prop on + * the series object. + */ +interface NamedTypeDistribution extends ProfileMetricsTypeDistributionItem { + Total: number; + Finished: number; +} + +const toRadarNamedDistribution = ( + distribution: ProfileMetricsTypeDistributionItem[], +) => { + return distribution.map((item): NamedTypeDistribution => { + return { + ...item, + Finished: item.finishedCount, + Total: item.count, + }; + }); +}; + +const ProfileStatsDistributionRadarByType = ({ userId, by }: Props) => { + const metricsDistributionQuery = useProfileMetricsDistributionByType( + userId, + by, + ); + + const data = metricsDistributionQuery.data; + + console.log(data, data != undefined); + + return ( + <> + {metricsDistributionQuery.isLoading && } + {data != undefined && ( + + )} + + ); +}; + +export default ProfileStatsDistributionRadarByType; diff --git a/src/components/user-level/UserLevelInfo.tsx b/src/components/user-level/UserLevelInfo.tsx index a281a3f..a6b1d06 100644 --- a/src/components/user-level/UserLevelInfo.tsx +++ b/src/components/user-level/UserLevelInfo.tsx @@ -18,9 +18,7 @@ const UserLevelInfo = ({ targetUserId }: Props) => { - - Level {userLevel?.currentLevel ?? 1} - + Level {userLevel?.currentLevel ?? 1} {userLevel?.currentLevelExp ?? 0} /{" "} {userLevel?.levelUpExpCost ?? 0} XP diff --git a/src/pages/achievements/index.tsx b/src/pages/achievements/index.tsx index 6fc0527..73d068c 100644 --- a/src/pages/achievements/index.tsx +++ b/src/pages/achievements/index.tsx @@ -9,7 +9,7 @@ const Index = () => { const router = useRouter(); useEffect(() => { if (router.isReady && userId) { - router.push(`/achievements/${userId}`).then().catch(); + router.replace(`/achievements/${userId}`).then().catch(); } }, [router, userId]); return ( diff --git a/src/pages/profile/[userId]/index.tsx b/src/pages/profile/[userId]/index.tsx index 926953f..b46737c 100644 --- a/src/pages/profile/[userId]/index.tsx +++ b/src/pages/profile/[userId]/index.tsx @@ -11,7 +11,7 @@ import ProfileFavoriteGames from "@/components/profile/view/ProfileFavoriteGames import RecentActivityList from "@/components/activity/RecentActivityList"; import ProfileUserInfoWithBanner from "@/components/profile/view/ProfileUserInfoWithBanner"; import useUserId from "@/components/auth/hooks/useUserId"; -import ProfileStatsOverview from "@/components/profile/view/ProfileStatsOverview"; +import ProfileStatsSimpleOverview from "@/components/profile/view/ProfileStatsSimpleOverview"; export async function getServerSideProps( ctx: GetServerSidePropsContext, @@ -55,8 +55,8 @@ const Index = () => { - {/**/} - {/**/} + + { + const query = context.query; + const userId = query.userId as string; + + const queryClient = new QueryClient(); + await queryClient.prefetchQuery({ + queryKey: ["profile", "metrics", userId], + queryFn: async () => { + return ProfileMetricsService.profileMetricsControllerGetStatsOverview( + userId, + ); + }, + }); + + return { + props: { + dehydratedState: dehydrate(queryClient), + }, + }; +}; + +const Index = () => { + const { query } = useRouter(); + const userId = query.userId as string; + + const onMobile = useOnMobile(); + + const profileQuery = useUserProfile(userId); + + const metricsOverviewQuery = useProfileMetricsOverview(userId); + + const featuredAchievementQuery = useFeaturedObtainedAchievement(userId); + + const playtimeInHours = metricsOverviewQuery.data?.totalEstimatedPlaytime + ? Math.ceil(metricsOverviewQuery.data?.totalEstimatedPlaytime / 3600) + : 0; + + return ( + + + + + + + + {profileQuery.data?.username} + + + {profileQuery.data && ( + + Member since{" "} + {DateFormatter.format( + new Date(profileQuery.data.createdAt), + )} + + )} + + + + + {!onMobile && featuredAchievementQuery.data && ( + + )} + + + + + + + + + + + {metricsOverviewQuery.data && ( + + + + )} + + + + + + + + + + + + + + + ); +}; + +export default Index; diff --git a/src/pages/search/index.tsx b/src/pages/search/index.tsx index 4d7822b..f077e8c 100755 --- a/src/pages/search/index.tsx +++ b/src/pages/search/index.tsx @@ -111,10 +111,10 @@ const Index = () => { }, [isQueryEnabled, query, router.isReady, setValue]); return ( - +
{ />
- + \nReturns an empty array on first connection.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}}},"tags":["notifications"]}},"/v1/notifications/view":{"put":{"operationId":"NotificationsController_updateViewedStatus","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationViewUpdateDto"}}}},"responses":{"200":{"description":""}},"tags":["notifications"]}},"/v1/game/repository/resource":{"get":{"operationId":"GameRepositoryController_getResource","parameters":[{"name":"resourceName","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["game-repository"]}},"/v1/game/repository/{id}/platforms/icon":{"get":{"operationId":"GameRepositoryController_getIconNamesForPlatformAbbreviations","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"tags":["game-repository"]}},"/v1/game/repository/{id}/external-stores":{"get":{"operationId":"GameRepositoryController_getExternalStoresForGameId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalStoreDto"}}}}}},"tags":["game-repository"]}},"/v1/game/repository/{id}":{"post":{"operationId":"GameRepositoryController_findOneById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameRepositoryFindOneDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Game"}}}}},"tags":["game-repository"]}},"/v1/game/repository":{"post":{"operationId":"GameRepositoryController_findAllByIds","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameRepositoryFindAllDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}},"tags":["game-repository"]}},"/v1/sync/hltb/{gameId}":{"get":{"operationId":"HltbController_findPlaytimeForGameId","parameters":[{"name":"gameId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GamePlaytime"}}}}},"tags":["sync-hltb"]}},"/v1/achievements":{"get":{"operationId":"AchievementsController_getAchievements","parameters":[{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAchievementsResponseDto"}}}}},"tags":["achievements"]}},"/v1/achievements/obtained/{id}":{"get":{"operationId":"AchievementsController_getObtainedAchievement","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"targetUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObtainedAchievement"}}}}},"tags":["achievements"]}},"/v1/achievements/obtained":{"get":{"operationId":"AchievementsController_getAllObtainedAchievements","parameters":[{"name":"targetUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ObtainedAchievement"}}}}}},"tags":["achievements"]}},"/v1/achievements/{userId}/featured":{"get":{"operationId":"AchievementsController_getFeaturedAchievementForUserId","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObtainedAchievement"}}}}},"tags":["achievements"]}},"/v1/achievements/obtained/{id}/featured":{"put":{"operationId":"AchievementsController_updateFeaturedObtainedAchievement","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeaturedObtainedAchievementDto"}}}},"responses":{"200":{"description":""}},"tags":["achievements"]}},"/v1/level/{userId}":{"get":{"operationId":"LevelController_findOne","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLevel"}}}}},"tags":["level"]}},"/v1/collections-entries":{"post":{"operationId":"CollectionsEntriesController_createOrUpdate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateCollectionEntryDto"}}}},"responses":{"201":{"description":""}},"tags":["collections-entries"]}},"/v1/collections-entries/{id}":{"get":{"operationId":"CollectionsEntriesController_findEntryById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntry"}}}}},"tags":["collections-entries"]},"delete":{"operationId":"CollectionsEntriesController_deleteOwnEntry","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"tags":["collections-entries"]}},"/v1/collections-entries/game/{id}":{"get":{"operationId":"CollectionsEntriesController_findOwnEntryByGameId","summary":"","description":"Returns a specific collection entry based on game ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntry"}}}},"400":{"description":"Invalid query"}},"tags":["collections-entries"]}},"/v1/collections-entries/{id}/platforms/icons":{"get":{"operationId":"CollectionsEntriesController_getIconsForOwnedPlatforms","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"tags":["collections-entries"]}},"/v1/collections-entries/game/{id}/favorite":{"post":{"operationId":"CollectionsEntriesController_changeFavoriteStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFavoriteStatusCollectionEntryDto"}}}},"responses":{"204":{"description":""}},"tags":["collections-entries"]}},"/v1/collections-entries/library/{id}":{"get":{"operationId":"CollectionsEntriesController_findAllByLibraryId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntriesPaginatedResponseDto"}}}}},"tags":["collections-entries"]}},"/v1/collections-entries/library/{id}/favorites":{"get":{"operationId":"CollectionsEntriesController_findFavoritesByLibraryId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntriesPaginatedResponseDto"}}}}},"tags":["collections-entries"]}},"/v1/collections-entries/collection/{id}":{"post":{"operationId":"CollectionsEntriesController_findAllByCollectionId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCollectionEntriesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntriesPaginatedResponseDto"}}}}},"tags":["collections-entries"]}},"/v1/health":{"get":{"operationId":"HealthController_health","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["health"]}},"/v1/activities/feed":{"get":{"operationId":"ActivitiesFeedController_buildActivitiesFeed","parameters":[{"name":"criteria","required":true,"in":"query","schema":{"enum":["following","all"],"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitiesFeedPaginatedResponseDto"}}}}},"tags":["activities-feed"]}},"/v1/follow/status":{"get":{"operationId":"FollowController_getFollowerStatus","parameters":[{"name":"followerUserId","required":true,"in":"query","schema":{"type":"string"}},{"name":"followedUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowStatusDto"}}}}},"tags":["follow"]}},"/v1/follow/{id}":{"get":{"operationId":"FollowController_getUserFollowById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFollow"}}}}},"tags":["follow"]}},"/v1/follow/info":{"post":{"operationId":"FollowController_getFollowInfo","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowInfoRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowInfoResponseDto"}}}}},"tags":["follow"]}},"/v1/follow":{"post":{"operationId":"FollowController_registerFollow","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRegisterDto"}}}},"responses":{"201":{"description":""}},"tags":["follow"]},"delete":{"operationId":"FollowController_removeFollow","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRemoveDto"}}}},"responses":{"200":{"description":""}},"tags":["follow"]}},"/v1/profile/metrics/overview/{userId}":{"get":{"operationId":"ProfileMetricsController_getStatsOverview","summary":"","description":"Retrieves basic stats for a user profile","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileMetricsOverviewDto"}}}}},"tags":["profile-metrics"]}},"/v1/profile/metrics/distribution/{userId}":{"get":{"operationId":"ProfileMetricsController_getStatsDistribution","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}},{"name":"by","required":true,"in":"query","schema":{"enum":["release_year","finish_year"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileMetricsDistributionResponseDto"}}}}},"tags":["profile-metrics"]}},"/v1/importer/watch/notification/{id}":{"get":{"operationId":"ImporterWatchController_findNotification","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImporterWatchNotification"}}}}},"tags":["importer-watch"]}},"/v1/importer/{source}":{"get":{"operationId":"ImporterController_findUnprocessedEntries","parameters":[{"name":"source","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImporterPaginatedResponseDto"}}}}},"tags":["importer"]}},"/v1/importer/status":{"post":{"operationId":"ImporterController_changeStatus","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImporterStatusUpdateRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["importer"]}},"/v1/connections":{"get":{"operationId":"ConnectionsController_findAvailableConnections","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FindAvailableConnectionsResponseDto"}}}}}},"tags":["connections"]},"post":{"operationId":"ConnectionsController_createOrUpdate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreateDto"}}}},"responses":{"201":{"description":""}},"tags":["connections"]}},"/v1/connections/own":{"get":{"operationId":"ConnectionsController_findOwn","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserConnection"}}}}}},"tags":["connections"]}},"/v1/connections/own/{type}":{"get":{"operationId":"ConnectionsController_findOwnByType","parameters":[{"name":"type","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnection"}}}}},"tags":["connections"]}},"/v1/connections/{id}":{"delete":{"operationId":"ConnectionsController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["connections"]}},"/v1/comment":{"post":{"operationId":"CommentController_findAll","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindAllCommentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCommentsPaginatedResponseDto"}}}}},"tags":["comment"]}},"/v1/comment/{sourceType}/{id}":{"get":{"operationId":"CommentController_findOneById","parameters":[{"name":"sourceType","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewComment"}}}}},"tags":["comment"]}},"/v1/comment/create":{"post":{"operationId":"CommentController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentDto"}}}},"responses":{"201":{"description":""}},"tags":["comment"]}},"/v1/comment/{id}":{"patch":{"operationId":"CommentController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentDto"}}}},"responses":{"204":{"description":""}},"tags":["comment"]},"delete":{"operationId":"CommentController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCommentDto"}}}},"responses":{"200":{"description":""}},"tags":["comment"]}},"/v1/report":{"get":{"operationId":"ReportController_findAllByLatest","parameters":[{"name":"includeClosed","required":false,"in":"query","schema":{"default":false,"type":"boolean"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedReportResponseDto"}}}}},"tags":["report"]},"post":{"operationId":"ReportController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["report"]}},"/v1/report/{id}":{"get":{"operationId":"ReportController_findOneById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}}},"tags":["report"]}},"/v1/report/{id}/handle":{"post":{"operationId":"ReportController_handle","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleReportRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["report"]}}},"info":{"title":"GameNode API","description":"API docs for the videogame catalog system GameNode.

Built with love by the GameNode team.","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"Library":{"type":"object","properties":{"userId":{"type":"string","description":"@description The primary key of the library entity.\nAlso used to share the library with other users.\n\nSame as SuperTokens' userId."},"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["userId","collections","createdAt","updatedAt"]},"GameCover":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["game","id"]},"GameCollection":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"checksum":{"type":"string"},"url":{"type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}},"required":["id","name","slug","createdAt","updatedAt","checksum","url","games"]},"GameAlternativeName":{"type":"object","properties":{"id":{"type":"number"},"comment":{"type":"string"},"name":{"type":"string"},"checksum":{"type":"string"},"game":{"$ref":"#/components/schemas/Game"}},"required":["id","game"]},"GameArtwork":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["game","id"]},"GameScreenshot":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["game","id"]},"GameLocalization":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["game","id","createdAt","updatedAt"]},"GameMode":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["game","id","createdAt","updatedAt"]},"GameGenre":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["games","id","createdAt","updatedAt"]},"GameTheme":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","createdAt","updatedAt"]},"GamePlayerPerspective":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["games","id","createdAt","updatedAt"]},"GameEngineLogo":{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/GameEngine"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["engine","id"]},"GameCompanyLogo":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/GameCompany"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["company","id"]},"GameCompany":{"type":"object","properties":{"id":{"type":"number"},"changeDate":{"format":"date-time","type":"string"},"changeDateCategory":{"type":"string"},"changedCompany":{"$ref":"#/components/schemas/GameCompany"},"checksum":{"type":"string"},"country":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":"string"},"logo":{"$ref":"#/components/schemas/GameCompanyLogo"},"name":{"type":"string"},"parent":{"$ref":"#/components/schemas/GameCompany"},"slug":{"type":"string"},"startDate":{"format":"date-time","type":"string"},"startDateCategory":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["id","createdAt","name","slug","updatedAt"]},"GamePlatform":{"type":"object","properties":{"id":{"type":"number"},"abbreviation":{"type":"string"},"alternative_name":{"type":"string"},"category":{"type":"number","enum":[1,2,3,4,5,6]},"checksum":{"type":"string"},"generation":{"type":"number"},"name":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"collectionEntries":{"type":"array","items":{"$ref":"#/components/schemas/CollectionEntry"}}},"required":["id","abbreviation","alternative_name","category","checksum","generation","name","createdAt","updatedAt","games","collectionEntries"]},"GameEngine":{"type":"object","properties":{"logo":{"$ref":"#/components/schemas/GameEngineLogo"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/GameCompany"}},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/GamePlatform"}},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["logo","companies","platforms","games","id","createdAt","updatedAt"]},"GameKeyword":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["game","id","createdAt","updatedAt"]},"GameFranchise":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["games","id","createdAt","updatedAt"]},"GameExternalGame":{"type":"object","properties":{"id":{"type":"number"},"uid":{"type":"string","description":"Corresponds to the game id on the target source (see GameExternalGameCategory).\nIt's called uid, not uuid."},"category":{"type":"number","enum":[1,5,10,11,13,14,15,20,22,23,26,28,29,30,31,32,36,37,54,55]},"media":{"type":"number","enum":[1,2]},"checksum":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"year":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"}},"required":["id","uid","createdAt","updatedAt","game","gameId"]},"GameInvolvedCompany":{"type":"object","properties":{"id":{"type":"number"},"checksum":{"type":"string"},"company":{"$ref":"#/components/schemas/GameCompany"},"companyId":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"developer":{"type":"boolean"},"porting":{"type":"boolean"},"publisher":{"type":"boolean"},"supporting":{"type":"boolean"},"updatedAt":{"format":"date-time","type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}},"required":["id","company","companyId","createdAt","developer","porting","publisher","supporting","updatedAt","games"]},"Game":{"type":"object","properties":{"id":{"type":"number","description":"Should be mapped to the IGDB ID of the game."},"name":{"type":"string"},"slug":{"type":"string"},"aggregatedRating":{"type":"number"},"aggregatedRatingCount":{"type":"number"},"category":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"type":"number"},"status":{"enum":[0,2,3,4,5,6,7,8],"type":"number"},"summary":{"type":"string"},"storyline":{"type":"string"},"checksum":{"type":"string"},"url":{"type":"string"},"firstReleaseDate":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"dlcs":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"dlcOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expansions":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expansionOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expandedGames":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expandedGameOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"similarGames":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"similarGameOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remakes":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remakeOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remasters":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remasterOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"cover":{"$ref":"#/components/schemas/GameCover"},"collection":{"$ref":"#/components/schemas/GameCollection"},"alternativeNames":{"type":"array","items":{"$ref":"#/components/schemas/GameAlternativeName"}},"artworks":{"type":"array","items":{"$ref":"#/components/schemas/GameArtwork"}},"screenshots":{"type":"array","items":{"$ref":"#/components/schemas/GameScreenshot"}},"gameLocalizations":{"type":"array","items":{"$ref":"#/components/schemas/GameLocalization"}},"gameModes":{"type":"array","items":{"$ref":"#/components/schemas/GameMode"}},"genres":{"type":"array","items":{"$ref":"#/components/schemas/GameGenre"}},"themes":{"type":"array","items":{"$ref":"#/components/schemas/GameTheme"}},"playerPerspectives":{"type":"array","items":{"$ref":"#/components/schemas/GamePlayerPerspective"}},"gameEngines":{"type":"array","items":{"$ref":"#/components/schemas/GameEngine"}},"keywords":{"type":"array","items":{"$ref":"#/components/schemas/GameKeyword"}},"franchises":{"type":"array","items":{"$ref":"#/components/schemas/GameFranchise"}},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/GamePlatform"}},"externalGames":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalGame"}},"involvedCompanies":{"type":"array","items":{"$ref":"#/components/schemas/GameInvolvedCompany"}},"source":{"type":"string","description":"Oh dear maintainer, please forgive me for using transient fields.","default":"MYSQL","enum":["MYSQL","MANTICORE"]}},"required":["id","name","slug","category","status","summary","storyline","checksum","url","firstReleaseDate","createdAt","updatedAt","involvedCompanies","source"]},"ProfileAvatar":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"mimetype":{"type":"string"},"extension":{"type":"string"},"size":{"type":"number"},"filename":{"type":"string"},"encoding":{"type":"string"}},"required":["id","profile","createdAt","updatedAt","mimetype","extension","size","filename","encoding"]},"ProfileBanner":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"mimetype":{"type":"string"},"extension":{"type":"string"},"size":{"type":"number"},"filename":{"type":"string"},"encoding":{"type":"string"}},"required":["id","profile","createdAt","updatedAt","mimetype","extension","size","filename","encoding"]},"Profile":{"type":"object","properties":{"userId":{"type":"string","description":"Shareable string ID\n\nSame as SuperTokens' userId."},"username":{"type":"string"},"bio":{"type":"string"},"avatar":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProfileAvatar"}]},"banner":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProfileBanner"}]},"usernameLastUpdatedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["userId","username","bio","avatar","banner","usernameLastUpdatedAt","createdAt","updatedAt"]},"Review":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string","nullable":true},"rating":{"type":"number"},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"collectionEntry":{"$ref":"#/components/schemas/CollectionEntry"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","content","rating","game","gameId","profile","profileUserId","collectionEntry","createdAt","updatedAt"]},"CollectionEntry":{"type":"object","properties":{"id":{"type":"string"},"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"},"ownedPlatforms":{"description":"The platforms on which the user owns the game.","type":"array","items":{"$ref":"#/components/schemas/GamePlatform"}},"review":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"isFavorite":{"type":"boolean"},"finishedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","collections","game","gameId","ownedPlatforms","review","isFavorite","finishedAt","createdAt","updatedAt"]},"Collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isPublic":{"type":"boolean"},"library":{"$ref":"#/components/schemas/Library"},"libraryUserId":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/CollectionEntry"}},"isFeatured":{"type":"boolean"},"isFinished":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","description","isPublic","library","libraryUserId","entries","isFeatured","isFinished","createdAt","updatedAt"]},"CreateCollectionDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"isPublic":{"type":"boolean"},"isFeatured":{"type":"boolean"},"isFinished":{"type":"boolean"}},"required":["name","isPublic","isFeatured","isFinished"]},"UpdateCollectionDto":{"type":"object","properties":{}},"CreateReviewDto":{"type":"object","properties":{"gameId":{"type":"number"},"content":{"type":"string","minLength":20},"rating":{"type":"number","minimum":0,"maximum":5}},"required":["gameId","content","rating"]},"FindAllReviewsByIdDto":{"type":"object","properties":{"reviewsIds":{"type":"array","items":{"type":"string"}}},"required":["reviewsIds"]},"ReviewScoreDistribution":{"type":"object","properties":{"1":{"type":"number"},"2":{"type":"number"},"3":{"type":"number"},"4":{"type":"number"},"5":{"type":"number"},"total":{"type":"number","description":"Total number of reviews"}},"required":["1","2","3","4","5","total"]},"ReviewScoreResponseDto":{"type":"object","properties":{"median":{"type":"number"},"distribution":{"$ref":"#/components/schemas/ReviewScoreDistribution"}},"required":["median","distribution"]},"PaginationInfo":{"type":"object","properties":{"totalItems":{"type":"number","description":"Total number of items available for the current query"},"totalPages":{"type":"number","description":"Total number of pages available for the current query"},"hasNextPage":{"type":"boolean","description":"If this query allows for a next page"}},"required":["totalItems","totalPages","hasNextPage"]},"FindReviewPaginatedDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"UpdateProfileDto":{"type":"object","properties":{"username":{"type":"string","minLength":4,"maxLength":20},"bio":{"type":"string","minLength":1,"maxLength":240}}},"UpdateProfileImageDto":{"type":"object","properties":{"type":{"type":"string","enum":["avatar","banner"]},"file":{"type":"object"}},"required":["type","file"]},"UserFollow":{"type":"object","properties":{"id":{"type":"number"},"follower":{"$ref":"#/components/schemas/Profile"},"followerUserId":{"type":"string"},"followed":{"$ref":"#/components/schemas/Profile"},"followedUserId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","follower","followerUserId","followed","followedUserId","createdAt","updatedAt"]},"Activity":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["REVIEW","FOLLOW","COLLECTION_ENTRY"]},"profile":{"description":"The associated profile with this Activity (e.g. user who performed an action)","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string"},"collectionEntry":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CollectionEntry"}]},"collectionEntryId":{"type":"string","nullable":true},"collection":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Collection"}]},"collectionId":{"type":"string","nullable":true},"review":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"reviewId":{"type":"string","nullable":true},"userFollow":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/UserFollow"}]},"userFollowId":{"type":"number","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","profile","profileUserId","collectionEntry","collectionEntryId","collection","collectionId","review","reviewId","userFollow","userFollowId","createdAt","updatedAt"]},"ActivitiesPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"StatisticsActionDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"targetUserId":{"type":"string","minLength":36},"sourceType":{"enum":["game","review","activity","review_comment"],"type":"string"}},"required":["sourceId","sourceType"]},"FindOneStatisticsDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"sourceType":{"type":"string","enum":["game","review","activity","review_comment"]}},"required":["sourceId","sourceType"]},"GameRepositoryFilterDto":{"type":"object","properties":{"ids":{"description":"If this is supplied, filtering will be done only for entities specified here.
\nUseful to filter data received from entities which hold game ids (like GameStatistics, Reviews, etc.)","type":"array","items":{"type":"number"}},"status":{"type":"number","enum":[0,2,3,4,5,6,7,8]},"category":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"themes":{"type":"array","items":{"type":"number"}},"gameModes":{"type":"array","items":{"type":"number"}},"platforms":{"type":"array","items":{"type":"number"}},"genres":{"type":"array","items":{"type":"number"}},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}}},"FindStatisticsTrendingGamesDto":{"type":"object","properties":{"criteria":{"$ref":"#/components/schemas/GameRepositoryFilterDto"},"period":{"type":"string","enum":["day","week","month","quarter","half_year","year","all"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}},"required":["period"]},"ActivityStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"activity":{"$ref":"#/components/schemas/Activity"},"activityId":{"type":"string"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","activity","activityId","id","viewsCount","likesCount"]},"ReviewComment":{"type":"object","properties":{"review":{"$ref":"#/components/schemas/Review"},"reviewId":{"type":"string"},"id":{"type":"string"},"content":{"type":"string","description":"HTML content of the user's comment."},"profile":{"description":"Author of this comment","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string","description":"User id of the author of this comment"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["review","reviewId","id","content","profile","profileUserId","createdAt","updatedAt"]},"CommentStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"reviewComment":{"$ref":"#/components/schemas/ReviewComment"},"reviewCommentId":{"type":"string"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","reviewComment","reviewCommentId","id","viewsCount","likesCount"]},"UserLike":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/GameStatistics"}]},"gameStatisticsId":{"type":"number","nullable":true},"reviewStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReviewStatistics"}]},"reviewStatisticsId":{"type":"number","nullable":true},"activityStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ActivityStatistics"}]},"activityStatisticsId":{"type":"number","nullable":true},"commentStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CommentStatistics"}]},"commentStatisticsId":{"type":"number","nullable":true}},"required":["id","profile","profileUserId","createdAt","updatedAt","gameStatistics","gameStatisticsId","reviewStatistics","reviewStatisticsId","activityStatistics","activityStatisticsId","commentStatistics","commentStatisticsId"]},"ReviewStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"review":{"$ref":"#/components/schemas/Review"},"reviewId":{"type":"string"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","review","reviewId","id","viewsCount","likesCount"]},"UserView":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/GameStatistics"}]},"reviewStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReviewStatistics"}]},"activityStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ActivityStatistics"}]},"commentStatistics":{"type":"object"}},"required":["id","profileUserId","createdAt","updatedAt","gameStatistics","reviewStatistics","activityStatistics","commentStatistics"]},"GameStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","game","gameId","id","viewsCount","likesCount"]},"GameStatisticsPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GameStatistics"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FindStatisticsTrendingReviewsDto":{"type":"object","properties":{"reviewId":{"type":"string","description":"Usually, this property should not be used unless a specific review needs to be retrieved, and it's easier to just\ncall the statistics controller."},"gameId":{"type":"number"},"userId":{"type":"string","minLength":36},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}}},"ReviewStatisticsPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewStatistics"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FindStatisticsTrendingActivitiesDto":{"type":"object","properties":{"activityId":{"type":"string","description":"Usually, this property should not be used unless a specific activity needs to be retrieved, and it's easier to just\ncall the statistics controller.","minLength":36},"userId":{"type":"string","minLength":36},"activityType":{"type":"string","enum":["REVIEW","FOLLOW","COLLECTION_ENTRY"]},"period":{"type":"string","enum":["day","week","month","quarter","half_year","year","all"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}},"required":["period"]},"StatisticsStatus":{"type":"object","properties":{"isLiked":{"type":"boolean"},"isViewed":{"type":"boolean"}},"required":["isLiked","isViewed"]},"ImporterWatchNotification":{"type":"object","properties":{"id":{"type":"number"},"library":{"$ref":"#/components/schemas/Library"},"libraryUserId":{"type":"string"},"source":{"type":"string","enum":["steam"]},"games":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalGame"}}},"required":["id","library","libraryUserId","source","games"]},"Notification":{"type":"object","properties":{"id":{"type":"number"},"sourceType":{"enum":["game","review","activity","profile","importer","report"],"type":"string"},"category":{"description":"What this notification's about. E.g.: a new like, a new follower, a game launch, etc.","enum":["follow","like","comment","watch","alert"],"type":"string"},"review":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"reviewId":{"type":"string","nullable":true},"game":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Game"}]},"gameId":{"type":"number","nullable":true},"activity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Activity"}]},"activityId":{"type":"string","nullable":true},"profile":{"nullable":true,"description":"User responsible for generating this notification (e.g. user that liked a review).","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string","nullable":true,"description":"User responsible for generating this notification (e.g. user that liked a review).\nWhen null/undefined, the notification was generated by the 'system'."},"importerNotification":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ImporterWatchNotification"}]},"importerNotificationId":{"type":"number"},"report":{"type":"object"},"reportId":{"type":"number","nullable":true},"isViewed":{"type":"boolean"},"targetProfile":{"nullable":true,"description":"User which is the target for this notification.
\nIf this is empty (null/undefined), the notification is targeted at all users.
\nNot to be confused with the 'profile' property.","allOf":[{"$ref":"#/components/schemas/Profile"}]},"targetProfileUserId":{"type":"string","nullable":true,"description":"User which is the target for this notification.
\nIf this is empty (null/undefined), the notification is targeted at all users.
\nNot to be confused with the 'profile' property."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sourceType","category","review","reviewId","game","gameId","activity","activityId","profile","profileUserId","importerNotification","importerNotificationId","report","reportId","isViewed","targetProfile","targetProfileUserId","createdAt","updatedAt"]},"NotificationAggregateDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"category":{"type":"string","enum":["follow","like","comment","watch","alert"]},"sourceType":{"type":"string","enum":["game","review","activity","profile","importer","report"]},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}},"required":["sourceId","category","sourceType","notifications"]},"PaginatedNotificationAggregationDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationAggregateDto"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"NotificationViewUpdateDto":{"type":"object","properties":{"isViewed":{"type":"boolean"},"notificationIds":{"type":"array","items":{"type":"number"}}},"required":["isViewed","notificationIds"]},"GameExternalStoreDto":{"type":"object","properties":{"icon":{"type":"string","nullable":true,"description":"Icon representing said store/service."},"storeName":{"type":"string","nullable":true},"id":{"type":"number"},"uid":{"type":"string","description":"Corresponds to the game id on the target source (see GameExternalGameCategory).\nIt's called uid, not uuid."},"category":{"type":"number","enum":[1,5,10,11,13,14,15,20,22,23,26,28,29,30,31,32,36,37,54,55]},"media":{"type":"number","enum":[1,2]},"checksum":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"year":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameId":{"type":"number"}},"required":["icon","storeName","id","uid","createdAt","updatedAt","gameId"]},"GameRepositoryFindOneDto":{"type":"object","properties":{"relations":{"type":"object"}}},"GameRepositoryFindAllDto":{"type":"object","properties":{"gameIds":{"type":"array","items":{"type":"number"}},"relations":{"type":"object"}},"required":["gameIds"]},"GamePlaytime":{"type":"object","properties":{"id":{"type":"number"},"gameId":{"type":"number"},"game":{"$ref":"#/components/schemas/Game"},"sourceId":{"type":"number"},"timeMain":{"type":"number","nullable":true},"timePlus":{"type":"number","nullable":true},"time100":{"type":"number","nullable":true},"timeAll":{"type":"number","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","gameId","game","sourceId","timeMain","timePlus","time100","timeAll","createdAt","updatedAt"]},"AchievementDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"expGainAmount":{"type":"number"},"category":{"type":"number","enum":[0,1,2,3]}},"required":["id","name","description","expGainAmount","category"]},"PaginatedAchievementsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AchievementDto"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"ObtainedAchievement":{"type":"object","properties":{"id":{"type":"number"},"achievementId":{"type":"string","description":"Achievement id specified in entries for achievements.data.ts"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"isFeatured":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","achievementId","profile","profileUserId","isFeatured","createdAt","updatedAt"]},"UpdateFeaturedObtainedAchievementDto":{"type":"object","properties":{"isFeatured":{"type":"boolean"}},"required":["isFeatured"]},"UserLevel":{"type":"object","properties":{"userId":{"type":"string","description":"Should be the same as the profile's UserId"},"profile":{"$ref":"#/components/schemas/Profile"},"currentLevel":{"type":"number"},"currentLevelExp":{"type":"number","description":"XP in the current user-level"},"levelUpExpCost":{"type":"number","description":"Threshold XP to hit the next user-level"},"expMultiplier":{"type":"number","description":"The multiplier to apply to all exp gains"}},"required":["userId","profile","currentLevel","currentLevelExp","levelUpExpCost","expMultiplier"]},"CreateUpdateCollectionEntryDto":{"type":"object","properties":{"finishedAt":{"type":"date-time"},"collectionIds":{"type":"array","items":{"type":"string"}},"gameId":{"type":"number"},"platformIds":{"type":"array","items":{"type":"number"}},"isFavorite":{"type":"boolean","default":false}},"required":["collectionIds","gameId","platformIds","isFavorite"]},"CreateFavoriteStatusCollectionEntryDto":{"type":"object","properties":{"isFavorite":{"type":"boolean","default":false}},"required":["isFavorite"]},"CollectionEntriesPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionEntry"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FindCollectionEntriesDto":{"type":"object","properties":{"offset":{"type":"number","default":0},"limit":{"type":"number","default":20},"orderBy":{"type":"object"}}},"ActivitiesFeedPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FollowStatusDto":{"type":"object","properties":{"isFollowing":{"type":"boolean"}},"required":["isFollowing"]},"FollowInfoRequestDto":{"type":"object","properties":{"criteria":{"type":"string","enum":["followers","following"]},"targetUserId":{"type":"string","minLength":36},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20},"orderBy":{"type":"object"}},"required":["criteria","targetUserId"]},"FollowInfoResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FollowRegisterDto":{"type":"object","properties":{"followedUserId":{"type":"string","minLength":36}},"required":["followedUserId"]},"FollowRemoveDto":{"type":"object","properties":{"followedUserId":{"type":"string","minLength":36}},"required":["followedUserId"]},"ProfileMetricsOverviewDto":{"type":"object","properties":{"totalGames":{"type":"number"},"totalCollections":{"type":"number"},"totalFinishedGames":{"type":"number"},"totalEstimatedPlaytime":{"type":"number","description":"Total playtime spent on finished games, based on available data and HLTB's 'main' profile."}},"required":["totalGames","totalCollections","totalFinishedGames","totalEstimatedPlaytime"]},"ProfileMetricsDistributionResponseDto":{"type":"object","properties":{"distribution":{"type":"object"}},"required":["distribution"]},"ImporterPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalGame"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"ImporterStatusUpdateRequestDto":{"type":"object","properties":{"status":{"type":"string"},"externalGameId":{"type":"number"}},"required":["status","externalGameId"]},"FindAvailableConnectionsResponseDto":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["steam"]},"isImporterViable":{"type":"boolean"},"iconName":{"type":"string"}},"required":["name","type","isImporterViable","iconName"]},"UserConnection":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string","enum":["steam"]},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"sourceUserId":{"type":"string"},"sourceUsername":{"type":"string"},"isImporterViable":{"type":"boolean","description":"If this connection can be used by the 'importer' system."},"isImporterEnabled":{"type":"boolean"}},"required":["id","type","profile","profileUserId","sourceUserId","sourceUsername","isImporterViable","isImporterEnabled"]},"ConnectionCreateDto":{"type":"object","properties":{"type":{"type":"string","enum":["steam"]},"userIdentifier":{"type":"string","description":"A string representing a username, user id or profile URL for the target connection
\ne.g. a Steam's profile URL","minLength":1},"isImporterEnabled":{"type":"boolean","default":false}},"required":["type","userIdentifier","isImporterEnabled"]},"FindAllCommentsDto":{"type":"object","properties":{"sourceId":{"type":"string","minLength":36},"sourceType":{"type":"string","enum":["review"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20},"orderBy":{"type":"object"}},"required":["sourceId","sourceType"]},"FindCommentsPaginatedResponseDto":{"type":"object","properties":{"data":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/ReviewComment"}},"pagination":{"default":{},"allOf":[{"$ref":"#/components/schemas/PaginationInfo"}]}},"required":["data","pagination"]},"CreateCommentDto":{"type":"object","properties":{"sourceId":{"type":"string","description":"UUID of the target entity. Comments can only be attributed to\nUUID based entities.","minLength":36},"sourceType":{"type":"string","enum":["review"]},"content":{"type":"string","minLength":1}},"required":["sourceId","sourceType","content"]},"UpdateCommentDto":{"type":"object","properties":{"sourceType":{"type":"string","enum":["review"]},"content":{"type":"string","minLength":1}},"required":["sourceType","content"]},"DeleteCommentDto":{"type":"object","properties":{"sourceType":{"type":"string","enum":["review"]}},"required":["sourceType"]},"Report":{"type":"object","properties":{"id":{"type":"number"},"sourceType":{"description":"Indexed to improve speed when filtering by type.","enum":["review","profile","review_comment"],"type":"string"},"category":{"enum":["spam","personal"],"type":"string"},"targetReview":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"targetReviewId":{"type":"string","nullable":true},"targetReviewComment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReviewComment"}]},"targetReviewCommentId":{"type":"string","nullable":true},"targetProfile":{"description":"Profile that is being target of a report","allOf":[{"$ref":"#/components/schemas/Profile"}]},"targetProfileUserId":{"type":"string"},"reason":{"type":"string","nullable":true,"description":"User-submitted reason for report."},"profile":{"description":"User responsible for report.","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string"},"isClosed":{"type":"boolean"},"closeHandleAction":{"nullable":true,"description":"Action taken when closing this report","enum":["discard","alert","suspend","ban"],"type":"string"},"closeProfile":{"nullable":true,"description":"User responsible for closing this report","allOf":[{"$ref":"#/components/schemas/Profile"}]},"closeProfileUserId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sourceType","category","targetReview","targetReviewId","targetReviewComment","targetReviewCommentId","targetProfile","targetProfileUserId","reason","profile","profileUserId","isClosed","closeHandleAction","closeProfile","closeProfileUserId","createdAt","updatedAt"]},"PaginatedReportResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Report"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"CreateReportRequestDto":{"type":"object","properties":{"sourceType":{"type":"string","enum":["review","profile","review_comment"]},"sourceId":{"type":"string","minLength":36},"category":{"type":"string","enum":["spam","personal"]},"reason":{"type":"string"}},"required":["sourceType","sourceId","category"]},"HandleReportRequestDto":{"type":"object","properties":{"action":{"type":"string","enum":["discard","alert","suspend","ban"]},"deleteReportedContent":{"type":"boolean","default":true}},"required":["action","deleteReportedContent"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/v1/auth/logout":{"get":{"operationId":"AuthController_logout","parameters":[],"responses":{"200":{"description":""}},"tags":["auth"]}},"/v1/libraries":{"get":{"operationId":"LibrariesController_findOwn","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Library"}}}}},"tags":["libraries"]}},"/v1/libraries/{id}":{"get":{"operationId":"LibrariesController_findOneByIdWithPermissions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Library"}}}}},"tags":["libraries"]}},"/v1/collections/{id}":{"get":{"operationId":"CollectionsController_findOneByIdWithPermissions","summary":"","description":"Returns a collection which the user has access to\n\n(Either its own collection or a public one)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}}},"tags":["collections"]},"patch":{"operationId":"CollectionsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["collections"]},"delete":{"operationId":"CollectionsController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"tags":["collections"]}},"/v1/collections/library/{userId}":{"get":{"operationId":"CollectionsController_findAllByUserIdWithPermissions","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}}}}}},"tags":["collections"]}},"/v1/collections":{"post":{"operationId":"CollectionsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionDto"}}}},"responses":{"201":{"description":""}},"tags":["collections"]}},"/v1/reviews":{"post":{"operationId":"ReviewsController_createOrUpdate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewDto"}}}},"responses":{"201":{"description":""}},"tags":["reviews"]},"get":{"operationId":"ReviewsController_findOneByUserIdAndGameId","parameters":[{"name":"id","required":true,"in":"query","schema":{"type":"string"}},{"name":"gameId","required":true,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}}},"tags":["reviews"]}},"/v1/reviews/all":{"post":{"operationId":"ReviewsController_findAllById","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindAllReviewsByIdDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Review"}}}}}},"tags":["reviews"]}},"/v1/reviews/score":{"get":{"operationId":"ReviewsController_getScoreForGameId","parameters":[{"name":"gameId","required":true,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewScoreResponseDto"}}}}},"tags":["reviews"]}},"/v1/reviews/profile/{userId}":{"get":{"operationId":"ReviewsController_findAllByUserId","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindReviewPaginatedDto"}}}}},"tags":["reviews"]}},"/v1/reviews/game/{id}":{"get":{"operationId":"ReviewsController_findAllByGameId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindReviewPaginatedDto"}}}}},"tags":["reviews"]}},"/v1/reviews/{id}":{"get":{"operationId":"ReviewsController_findOneById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}}},"tags":["reviews"]},"delete":{"operationId":"ReviewsController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["reviews"]}},"/v1/profile":{"patch":{"operationId":"ProfileController_update","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileDto"}}}},"responses":{"200":{"description":""}},"tags":["profile"]},"get":{"operationId":"ProfileController_findOwn","summary":"","description":"Used to access own profile","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}},"tags":["profile"]}},"/v1/profile/image":{"put":{"operationId":"ProfileController_updateImage","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UpdateProfileImageDto"}}}},"responses":{"200":{"description":""}},"tags":["profile"]}},"/v1/profile/image/{type}/{id}":{"delete":{"operationId":"ProfileController_removeImage","parameters":[{"name":"imageType","required":true,"in":"path","schema":{"type":"string"}},{"name":"imageId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["profile"]}},"/v1/profile/{id}":{"get":{"operationId":"ProfileController_findOneById","summary":"","description":"Used to access other users' profiles","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}},"tags":["profile"]}},"/v1/activities":{"get":{"operationId":"ActivitiesRepositoryController_findLatest","parameters":[{"name":"userId","required":false,"in":"query","schema":{"minLength":36,"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitiesPaginatedResponseDto"}}}}},"tags":["activities"]}},"/v1/statistics/queue/like":{"post":{"operationId":"StatisticsQueueController_addLike","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatisticsActionDto"}}}},"responses":{"201":{"description":""}},"tags":["statistics-queue"]},"delete":{"operationId":"StatisticsQueueController_removeLike","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatisticsActionDto"}}}},"responses":{"200":{"description":""}},"tags":["statistics-queue"]}},"/v1/statistics/queue/view":{"post":{"operationId":"StatisticsQueueController_addView","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatisticsActionDto"}}}},"responses":{"201":{"description":""}},"tags":["statistics-queue"]}},"/v1/statistics":{"post":{"operationId":"StatisticsController_findOneBySourceIdAndType","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindOneStatisticsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["statistics"]}},"/v1/statistics/trending/games":{"post":{"operationId":"StatisticsController_findTrendingGames","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindStatisticsTrendingGamesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStatisticsPaginatedResponseDto"}}}}},"tags":["statistics"]}},"/v1/statistics/trending/reviews":{"post":{"operationId":"StatisticsController_findTrendingReviews","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindStatisticsTrendingReviewsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewStatisticsPaginatedResponseDto"}}}}},"tags":["statistics"]}},"/v1/statistics/trending/activities":{"post":{"operationId":"StatisticsController_findTrendingActivities","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindStatisticsTrendingActivitiesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewStatisticsPaginatedResponseDto"}}}}},"tags":["statistics"]}},"/v1/statistics/status":{"get":{"operationId":"StatisticsController_getStatus","parameters":[{"name":"statisticsId","required":true,"in":"query","schema":{"type":"number"}},{"name":"sourceType","required":true,"in":"query","schema":{"enum":["game","review","activity","review_comment"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatisticsStatus"}}}}},"tags":["statistics"]}},"/v1/notifications":{"get":{"operationId":"NotificationsController_findAllAndAggregate","parameters":[{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedNotificationAggregationDto"}}}}},"tags":["notifications"]}},"/v1/notifications/new":{"get":{"operationId":"NotificationsController_getNewNotifications","summary":"","description":"Finds new notifications that have been created after last checked time.
\nReturns an empty array on first connection.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}}}}},"tags":["notifications"]}},"/v1/notifications/view":{"put":{"operationId":"NotificationsController_updateViewedStatus","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationViewUpdateDto"}}}},"responses":{"200":{"description":""}},"tags":["notifications"]}},"/v1/game/repository/resource":{"get":{"operationId":"GameRepositoryController_getResource","parameters":[{"name":"resourceName","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["game-repository"]}},"/v1/game/repository/{id}/platforms/icon":{"get":{"operationId":"GameRepositoryController_getIconNamesForPlatformAbbreviations","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"tags":["game-repository"]}},"/v1/game/repository/{id}/external-stores":{"get":{"operationId":"GameRepositoryController_getExternalStoresForGameId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalStoreDto"}}}}}},"tags":["game-repository"]}},"/v1/game/repository/{id}":{"post":{"operationId":"GameRepositoryController_findOneById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameRepositoryFindOneDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Game"}}}}},"tags":["game-repository"]}},"/v1/game/repository":{"post":{"operationId":"GameRepositoryController_findAllByIds","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameRepositoryFindAllDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}},"tags":["game-repository"]}},"/v1/sync/hltb/{gameId}":{"get":{"operationId":"HltbController_findPlaytimeForGameId","parameters":[{"name":"gameId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GamePlaytime"}}}}},"tags":["sync-hltb"]}},"/v1/achievements":{"get":{"operationId":"AchievementsController_getAchievements","parameters":[{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAchievementsResponseDto"}}}}},"tags":["achievements"]}},"/v1/achievements/obtained/{id}":{"get":{"operationId":"AchievementsController_getObtainedAchievement","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"targetUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObtainedAchievement"}}}}},"tags":["achievements"]}},"/v1/achievements/obtained":{"get":{"operationId":"AchievementsController_getAllObtainedAchievements","parameters":[{"name":"targetUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ObtainedAchievement"}}}}}},"tags":["achievements"]}},"/v1/achievements/{userId}/featured":{"get":{"operationId":"AchievementsController_getFeaturedAchievementForUserId","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["achievements"]}},"/v1/achievements/obtained/{id}/featured":{"put":{"operationId":"AchievementsController_updateFeaturedObtainedAchievement","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeaturedObtainedAchievementDto"}}}},"responses":{"200":{"description":""}},"tags":["achievements"]}},"/v1/level/{userId}":{"get":{"operationId":"LevelController_findOne","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLevel"}}}}},"tags":["level"]}},"/v1/collections-entries":{"post":{"operationId":"CollectionsEntriesController_createOrUpdate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpdateCollectionEntryDto"}}}},"responses":{"201":{"description":""}},"tags":["collections-entries"]}},"/v1/collections-entries/{id}":{"get":{"operationId":"CollectionsEntriesController_findEntryById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntry"}}}}},"tags":["collections-entries"]},"delete":{"operationId":"CollectionsEntriesController_deleteOwnEntry","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"tags":["collections-entries"]}},"/v1/collections-entries/game/{id}":{"get":{"operationId":"CollectionsEntriesController_findOwnEntryByGameId","summary":"","description":"Returns a specific collection entry based on game ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntry"}}}},"400":{"description":"Invalid query"}},"tags":["collections-entries"]}},"/v1/collections-entries/{id}/platforms/icons":{"get":{"operationId":"CollectionsEntriesController_getIconsForOwnedPlatforms","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"tags":["collections-entries"]}},"/v1/collections-entries/game/{id}/favorite":{"post":{"operationId":"CollectionsEntriesController_changeFavoriteStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFavoriteStatusCollectionEntryDto"}}}},"responses":{"204":{"description":""}},"tags":["collections-entries"]}},"/v1/collections-entries/library/{id}":{"get":{"operationId":"CollectionsEntriesController_findAllByLibraryId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntriesPaginatedResponseDto"}}}}},"tags":["collections-entries"]}},"/v1/collections-entries/library/{id}/favorites":{"get":{"operationId":"CollectionsEntriesController_findFavoritesByLibraryId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntriesPaginatedResponseDto"}}}}},"tags":["collections-entries"]}},"/v1/collections-entries/collection/{id}":{"post":{"operationId":"CollectionsEntriesController_findAllByCollectionId","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCollectionEntriesDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntriesPaginatedResponseDto"}}}}},"tags":["collections-entries"]}},"/v1/health":{"get":{"operationId":"HealthController_health","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["health"]}},"/v1/activities/feed":{"get":{"operationId":"ActivitiesFeedController_buildActivitiesFeed","parameters":[{"name":"criteria","required":true,"in":"query","schema":{"enum":["following","all"],"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitiesFeedPaginatedResponseDto"}}}}},"tags":["activities-feed"]}},"/v1/follow/status":{"get":{"operationId":"FollowController_getFollowerStatus","parameters":[{"name":"followerUserId","required":true,"in":"query","schema":{"type":"string"}},{"name":"followedUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowStatusDto"}}}}},"tags":["follow"]}},"/v1/follow/{id}":{"get":{"operationId":"FollowController_getUserFollowById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFollow"}}}}},"tags":["follow"]}},"/v1/follow/info":{"post":{"operationId":"FollowController_getFollowInfo","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowInfoRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowInfoResponseDto"}}}}},"tags":["follow"]}},"/v1/follow":{"post":{"operationId":"FollowController_registerFollow","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRegisterDto"}}}},"responses":{"201":{"description":""}},"tags":["follow"]},"delete":{"operationId":"FollowController_removeFollow","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowRemoveDto"}}}},"responses":{"200":{"description":""}},"tags":["follow"]}},"/v1/profile/metrics/overview/{userId}":{"get":{"operationId":"ProfileMetricsController_getStatsOverview","summary":"","description":"Retrieves basic stats for a user profile","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileMetricsOverviewDto"}}}}},"tags":["profile-metrics"]}},"/v1/profile/metrics/distribution/year/{userId}":{"get":{"operationId":"ProfileMetricsController_getYearDistribution","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}},{"name":"by","required":true,"in":"query","schema":{"enum":["release_year","finish_year"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileMetricsYearDistributionResponseDto"}}}}},"tags":["profile-metrics"]}},"/v1/profile/metrics/distribution/type/{userId}":{"get":{"operationId":"ProfileMetricsController_getTypeDistribution","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}},{"name":"by","required":true,"in":"query","schema":{"enum":["genre","category","mode","platform"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileMetricsTypeDistributionResponseDto"}}}}},"tags":["profile-metrics"]}},"/v1/importer/watch/notification/{id}":{"get":{"operationId":"ImporterWatchController_findNotification","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImporterWatchNotification"}}}}},"tags":["importer-watch"]}},"/v1/importer/{source}":{"get":{"operationId":"ImporterController_findUnprocessedEntries","parameters":[{"name":"source","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImporterPaginatedResponseDto"}}}}},"tags":["importer"]}},"/v1/importer/status":{"post":{"operationId":"ImporterController_changeStatus","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImporterStatusUpdateRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["importer"]}},"/v1/connections":{"get":{"operationId":"ConnectionsController_findAvailableConnections","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FindAvailableConnectionsResponseDto"}}}}}},"tags":["connections"]},"post":{"operationId":"ConnectionsController_createOrUpdate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreateDto"}}}},"responses":{"201":{"description":""}},"tags":["connections"]}},"/v1/connections/own":{"get":{"operationId":"ConnectionsController_findOwn","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserConnection"}}}}}},"tags":["connections"]}},"/v1/connections/own/{type}":{"get":{"operationId":"ConnectionsController_findOwnByType","parameters":[{"name":"type","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConnection"}}}}},"tags":["connections"]}},"/v1/connections/{id}":{"delete":{"operationId":"ConnectionsController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"tags":["connections"]}},"/v1/comment":{"post":{"operationId":"CommentController_findAll","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindAllCommentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindCommentsPaginatedResponseDto"}}}}},"tags":["comment"]}},"/v1/comment/{sourceType}/{id}":{"get":{"operationId":"CommentController_findOneById","parameters":[{"name":"sourceType","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewComment"}}}}},"tags":["comment"]}},"/v1/comment/create":{"post":{"operationId":"CommentController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentDto"}}}},"responses":{"201":{"description":""}},"tags":["comment"]}},"/v1/comment/{id}":{"patch":{"operationId":"CommentController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentDto"}}}},"responses":{"204":{"description":""}},"tags":["comment"]},"delete":{"operationId":"CommentController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCommentDto"}}}},"responses":{"200":{"description":""}},"tags":["comment"]}},"/v1/report":{"get":{"operationId":"ReportController_findAllByLatest","parameters":[{"name":"includeClosed","required":false,"in":"query","schema":{"default":false,"type":"boolean"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedReportResponseDto"}}}}},"tags":["report"]},"post":{"operationId":"ReportController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["report"]}},"/v1/report/{id}":{"get":{"operationId":"ReportController_findOneById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}}},"tags":["report"]}},"/v1/report/{id}/handle":{"post":{"operationId":"ReportController_handle","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleReportRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["report"]}}},"info":{"title":"GameNode API","description":"API docs for the videogame catalog system GameNode.

Built with love by the GameNode team.","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"Library":{"type":"object","properties":{"userId":{"type":"string","description":"@description The primary key of the library entity.\nAlso used to share the library with other users.\n\nSame as SuperTokens' userId."},"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["userId","collections","createdAt","updatedAt"]},"GameCover":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["game","id"]},"GameCollection":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"checksum":{"type":"string"},"url":{"type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}},"required":["id","name","slug","createdAt","updatedAt","checksum","url","games"]},"GameAlternativeName":{"type":"object","properties":{"id":{"type":"number"},"comment":{"type":"string"},"name":{"type":"string"},"checksum":{"type":"string"},"game":{"$ref":"#/components/schemas/Game"}},"required":["id","game"]},"GameArtwork":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["game","id"]},"GameScreenshot":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["game","id"]},"GameLocalization":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["game","id","createdAt","updatedAt"]},"GameMode":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["game","id","createdAt","updatedAt"]},"GameGenre":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["games","id","createdAt","updatedAt"]},"GameTheme":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","createdAt","updatedAt"]},"GamePlayerPerspective":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["games","id","createdAt","updatedAt"]},"GameEngineLogo":{"type":"object","properties":{"engine":{"$ref":"#/components/schemas/GameEngine"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["engine","id"]},"GameCompanyLogo":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/GameCompany"},"id":{"type":"number"},"alphaChannel":{"type":"boolean"},"animated":{"type":"boolean"},"height":{"type":"number"},"imageId":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"checksum":{"type":"string"}},"required":["company","id"]},"GameCompany":{"type":"object","properties":{"id":{"type":"number"},"changeDate":{"format":"date-time","type":"string"},"changeDateCategory":{"type":"string"},"changedCompany":{"$ref":"#/components/schemas/GameCompany"},"checksum":{"type":"string"},"country":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"description":{"type":"string"},"logo":{"$ref":"#/components/schemas/GameCompanyLogo"},"name":{"type":"string"},"parent":{"$ref":"#/components/schemas/GameCompany"},"slug":{"type":"string"},"startDate":{"format":"date-time","type":"string"},"startDateCategory":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["id","createdAt","name","slug","updatedAt"]},"GamePlatform":{"type":"object","properties":{"id":{"type":"number"},"abbreviation":{"type":"string"},"alternative_name":{"type":"string"},"category":{"type":"number","enum":[1,2,3,4,5,6]},"checksum":{"type":"string"},"generation":{"type":"number"},"name":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"collectionEntries":{"type":"array","items":{"$ref":"#/components/schemas/CollectionEntry"}}},"required":["id","abbreviation","alternative_name","category","checksum","generation","name","createdAt","updatedAt","games","collectionEntries"]},"GameEngine":{"type":"object","properties":{"logo":{"$ref":"#/components/schemas/GameEngineLogo"},"companies":{"type":"array","items":{"$ref":"#/components/schemas/GameCompany"}},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/GamePlatform"}},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["logo","companies","platforms","games","id","createdAt","updatedAt"]},"GameKeyword":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/Game"},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["game","id","createdAt","updatedAt"]},"GameFranchise":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"id":{"type":"number"},"checksum":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["games","id","createdAt","updatedAt"]},"GameExternalGame":{"type":"object","properties":{"id":{"type":"number"},"uid":{"type":"string","description":"Corresponds to the game id on the target source (see GameExternalGameCategory).\nIt's called uid, not uuid."},"category":{"type":"number","enum":[1,5,10,11,13,14,15,20,22,23,26,28,29,30,31,32,36,37,54,55]},"media":{"type":"number","enum":[1,2]},"checksum":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"year":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"}},"required":["id","uid","createdAt","updatedAt","game","gameId"]},"GameInvolvedCompany":{"type":"object","properties":{"id":{"type":"number"},"checksum":{"type":"string"},"company":{"$ref":"#/components/schemas/GameCompany"},"companyId":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"developer":{"type":"boolean"},"porting":{"type":"boolean"},"publisher":{"type":"boolean"},"supporting":{"type":"boolean"},"updatedAt":{"format":"date-time","type":"string"},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}},"required":["id","company","companyId","createdAt","developer","porting","publisher","supporting","updatedAt","games"]},"Game":{"type":"object","properties":{"id":{"type":"number","description":"Should be mapped to the IGDB ID of the game."},"name":{"type":"string"},"slug":{"type":"string"},"aggregatedRating":{"type":"number"},"aggregatedRatingCount":{"type":"number"},"category":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"type":"number"},"status":{"enum":[0,2,3,4,5,6,7,8],"type":"number"},"summary":{"type":"string"},"storyline":{"type":"string"},"checksum":{"type":"string"},"url":{"type":"string"},"firstReleaseDate":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"dlcs":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"dlcOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expansions":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expansionOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expandedGames":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"expandedGameOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"similarGames":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"similarGameOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remakes":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remakeOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remasters":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"remasterOf":{"type":"array","items":{"$ref":"#/components/schemas/Game"}},"cover":{"$ref":"#/components/schemas/GameCover"},"collection":{"$ref":"#/components/schemas/GameCollection"},"alternativeNames":{"type":"array","items":{"$ref":"#/components/schemas/GameAlternativeName"}},"artworks":{"type":"array","items":{"$ref":"#/components/schemas/GameArtwork"}},"screenshots":{"type":"array","items":{"$ref":"#/components/schemas/GameScreenshot"}},"gameLocalizations":{"type":"array","items":{"$ref":"#/components/schemas/GameLocalization"}},"gameModes":{"type":"array","items":{"$ref":"#/components/schemas/GameMode"}},"genres":{"type":"array","items":{"$ref":"#/components/schemas/GameGenre"}},"themes":{"type":"array","items":{"$ref":"#/components/schemas/GameTheme"}},"playerPerspectives":{"type":"array","items":{"$ref":"#/components/schemas/GamePlayerPerspective"}},"gameEngines":{"type":"array","items":{"$ref":"#/components/schemas/GameEngine"}},"keywords":{"type":"array","items":{"$ref":"#/components/schemas/GameKeyword"}},"franchises":{"type":"array","items":{"$ref":"#/components/schemas/GameFranchise"}},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/GamePlatform"}},"externalGames":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalGame"}},"involvedCompanies":{"type":"array","items":{"$ref":"#/components/schemas/GameInvolvedCompany"}},"source":{"type":"string","description":"Oh dear maintainer, please forgive me for using transient fields.","default":"MYSQL","enum":["MYSQL","MANTICORE"]}},"required":["id","name","slug","category","status","summary","storyline","checksum","url","firstReleaseDate","createdAt","updatedAt","involvedCompanies","source"]},"ProfileAvatar":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"mimetype":{"type":"string"},"extension":{"type":"string"},"size":{"type":"number"},"filename":{"type":"string"},"encoding":{"type":"string"}},"required":["id","profile","createdAt","updatedAt","mimetype","extension","size","filename","encoding"]},"ProfileBanner":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"mimetype":{"type":"string"},"extension":{"type":"string"},"size":{"type":"number"},"filename":{"type":"string"},"encoding":{"type":"string"}},"required":["id","profile","createdAt","updatedAt","mimetype","extension","size","filename","encoding"]},"Profile":{"type":"object","properties":{"userId":{"type":"string","description":"Shareable string ID\n\nSame as SuperTokens' userId."},"username":{"type":"string"},"bio":{"type":"string"},"avatar":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProfileAvatar"}]},"banner":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProfileBanner"}]},"usernameLastUpdatedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["userId","username","bio","avatar","banner","usernameLastUpdatedAt","createdAt","updatedAt"]},"Review":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string","nullable":true},"rating":{"type":"number"},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"collectionEntry":{"$ref":"#/components/schemas/CollectionEntry"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","content","rating","game","gameId","profile","profileUserId","collectionEntry","createdAt","updatedAt"]},"CollectionEntry":{"type":"object","properties":{"id":{"type":"string"},"collections":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"},"ownedPlatforms":{"description":"The platforms on which the user owns the game.","type":"array","items":{"$ref":"#/components/schemas/GamePlatform"}},"review":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"isFavorite":{"type":"boolean"},"finishedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","collections","game","gameId","ownedPlatforms","review","isFavorite","finishedAt","createdAt","updatedAt"]},"Collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isPublic":{"type":"boolean"},"library":{"$ref":"#/components/schemas/Library"},"libraryUserId":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/CollectionEntry"}},"isFeatured":{"type":"boolean"},"isFinished":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","description","isPublic","library","libraryUserId","entries","isFeatured","isFinished","createdAt","updatedAt"]},"CreateCollectionDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"isPublic":{"type":"boolean"},"isFeatured":{"type":"boolean"},"isFinished":{"type":"boolean"}},"required":["name","isPublic","isFeatured","isFinished"]},"UpdateCollectionDto":{"type":"object","properties":{}},"CreateReviewDto":{"type":"object","properties":{"gameId":{"type":"number"},"content":{"type":"string","minLength":20},"rating":{"type":"number","minimum":0,"maximum":5}},"required":["gameId","content","rating"]},"FindAllReviewsByIdDto":{"type":"object","properties":{"reviewsIds":{"type":"array","items":{"type":"string"}}},"required":["reviewsIds"]},"ReviewScoreDistribution":{"type":"object","properties":{"1":{"type":"number"},"2":{"type":"number"},"3":{"type":"number"},"4":{"type":"number"},"5":{"type":"number"},"total":{"type":"number","description":"Total number of reviews"}},"required":["1","2","3","4","5","total"]},"ReviewScoreResponseDto":{"type":"object","properties":{"median":{"type":"number"},"distribution":{"$ref":"#/components/schemas/ReviewScoreDistribution"}},"required":["median","distribution"]},"PaginationInfo":{"type":"object","properties":{"totalItems":{"type":"number","description":"Total number of items available for the current query"},"totalPages":{"type":"number","description":"Total number of pages available for the current query"},"hasNextPage":{"type":"boolean","description":"If this query allows for a next page"}},"required":["totalItems","totalPages","hasNextPage"]},"FindReviewPaginatedDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"UpdateProfileDto":{"type":"object","properties":{"username":{"type":"string","minLength":4,"maxLength":20},"bio":{"type":"string","minLength":1,"maxLength":240}}},"UpdateProfileImageDto":{"type":"object","properties":{"type":{"type":"string","enum":["avatar","banner"]},"file":{"type":"object"}},"required":["type","file"]},"UserFollow":{"type":"object","properties":{"id":{"type":"number"},"follower":{"$ref":"#/components/schemas/Profile"},"followerUserId":{"type":"string"},"followed":{"$ref":"#/components/schemas/Profile"},"followedUserId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","follower","followerUserId","followed","followedUserId","createdAt","updatedAt"]},"Activity":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["REVIEW","FOLLOW","COLLECTION_ENTRY"]},"profile":{"description":"The associated profile with this Activity (e.g. user who performed an action)","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string"},"collectionEntry":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CollectionEntry"}]},"collectionEntryId":{"type":"string","nullable":true},"collection":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Collection"}]},"collectionId":{"type":"string","nullable":true},"review":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"reviewId":{"type":"string","nullable":true},"userFollow":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/UserFollow"}]},"userFollowId":{"type":"number","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","type","profile","profileUserId","collectionEntry","collectionEntryId","collection","collectionId","review","reviewId","userFollow","userFollowId","createdAt","updatedAt"]},"ActivitiesPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"StatisticsActionDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"targetUserId":{"type":"string","minLength":36},"sourceType":{"enum":["game","review","activity","review_comment"],"type":"string"}},"required":["sourceId","sourceType"]},"FindOneStatisticsDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"sourceType":{"type":"string","enum":["game","review","activity","review_comment"]}},"required":["sourceId","sourceType"]},"GameRepositoryFilterDto":{"type":"object","properties":{"ids":{"description":"If this is supplied, filtering will be done only for entities specified here.
\nUseful to filter data received from entities which hold game ids (like GameStatistics, Reviews, etc.)","type":"array","items":{"type":"number"}},"status":{"type":"number","enum":[0,2,3,4,5,6,7,8]},"category":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]},"themes":{"type":"array","items":{"type":"number"}},"gameModes":{"type":"array","items":{"type":"number"}},"platforms":{"type":"array","items":{"type":"number"}},"genres":{"type":"array","items":{"type":"number"}},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}}},"FindStatisticsTrendingGamesDto":{"type":"object","properties":{"criteria":{"$ref":"#/components/schemas/GameRepositoryFilterDto"},"period":{"type":"string","enum":["day","week","month","quarter","half_year","year","all"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}},"required":["period"]},"ActivityStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"activity":{"$ref":"#/components/schemas/Activity"},"activityId":{"type":"string"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","activity","activityId","id","viewsCount","likesCount"]},"ReviewComment":{"type":"object","properties":{"review":{"$ref":"#/components/schemas/Review"},"reviewId":{"type":"string"},"id":{"type":"string"},"content":{"type":"string","description":"HTML content of the user's comment."},"profile":{"description":"Author of this comment","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string","description":"User id of the author of this comment"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["review","reviewId","id","content","profile","profileUserId","createdAt","updatedAt"]},"CommentStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"reviewComment":{"$ref":"#/components/schemas/ReviewComment"},"reviewCommentId":{"type":"string"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","reviewComment","reviewCommentId","id","viewsCount","likesCount"]},"UserLike":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/GameStatistics"}]},"gameStatisticsId":{"type":"number","nullable":true},"reviewStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReviewStatistics"}]},"reviewStatisticsId":{"type":"number","nullable":true},"activityStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ActivityStatistics"}]},"activityStatisticsId":{"type":"number","nullable":true},"commentStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/CommentStatistics"}]},"commentStatisticsId":{"type":"number","nullable":true}},"required":["id","profile","profileUserId","createdAt","updatedAt","gameStatistics","gameStatisticsId","reviewStatistics","reviewStatisticsId","activityStatistics","activityStatisticsId","commentStatistics","commentStatisticsId"]},"ReviewStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"review":{"$ref":"#/components/schemas/Review"},"reviewId":{"type":"string"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","review","reviewId","id","viewsCount","likesCount"]},"UserView":{"type":"object","properties":{"id":{"type":"number"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/GameStatistics"}]},"reviewStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReviewStatistics"}]},"activityStatistics":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ActivityStatistics"}]},"commentStatistics":{"type":"object"}},"required":["id","profileUserId","createdAt","updatedAt","gameStatistics","reviewStatistics","activityStatistics","commentStatistics"]},"GameStatistics":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/UserView"}},"likes":{"type":"array","items":{"$ref":"#/components/schemas/UserLike"}},"game":{"$ref":"#/components/schemas/Game"},"gameId":{"type":"number"},"id":{"type":"number"},"viewsCount":{"type":"number"},"likesCount":{"type":"number"}},"required":["views","likes","game","gameId","id","viewsCount","likesCount"]},"GameStatisticsPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GameStatistics"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FindStatisticsTrendingReviewsDto":{"type":"object","properties":{"reviewId":{"type":"string","description":"Usually, this property should not be used unless a specific review needs to be retrieved, and it's easier to just\ncall the statistics controller."},"gameId":{"type":"number"},"userId":{"type":"string","minLength":36},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}}},"ReviewStatisticsPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewStatistics"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FindStatisticsTrendingActivitiesDto":{"type":"object","properties":{"activityId":{"type":"string","description":"Usually, this property should not be used unless a specific activity needs to be retrieved, and it's easier to just\ncall the statistics controller.","minLength":36},"userId":{"type":"string","minLength":36},"activityType":{"type":"string","enum":["REVIEW","FOLLOW","COLLECTION_ENTRY"]},"period":{"type":"string","enum":["day","week","month","quarter","half_year","year","all"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}},"required":["period"]},"StatisticsStatus":{"type":"object","properties":{"isLiked":{"type":"boolean"},"isViewed":{"type":"boolean"}},"required":["isLiked","isViewed"]},"ImporterWatchNotification":{"type":"object","properties":{"id":{"type":"number"},"library":{"$ref":"#/components/schemas/Library"},"libraryUserId":{"type":"string"},"source":{"type":"string","enum":["steam"]},"games":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalGame"}}},"required":["id","library","libraryUserId","source","games"]},"Notification":{"type":"object","properties":{"id":{"type":"number"},"sourceType":{"enum":["game","review","activity","profile","importer","report"],"type":"string"},"category":{"description":"What this notification's about. E.g.: a new like, a new follower, a game launch, etc.","enum":["follow","like","comment","watch","alert"],"type":"string"},"review":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"reviewId":{"type":"string","nullable":true},"game":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Game"}]},"gameId":{"type":"number","nullable":true},"activity":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Activity"}]},"activityId":{"type":"string","nullable":true},"profile":{"nullable":true,"description":"User responsible for generating this notification (e.g. user that liked a review).","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string","nullable":true,"description":"User responsible for generating this notification (e.g. user that liked a review).\nWhen null/undefined, the notification was generated by the 'system'."},"importerNotification":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ImporterWatchNotification"}]},"importerNotificationId":{"type":"number"},"report":{"type":"object"},"reportId":{"type":"number","nullable":true},"isViewed":{"type":"boolean"},"targetProfile":{"nullable":true,"description":"User which is the target for this notification.
\nIf this is empty (null/undefined), the notification is targeted at all users.
\nNot to be confused with the 'profile' property.","allOf":[{"$ref":"#/components/schemas/Profile"}]},"targetProfileUserId":{"type":"string","nullable":true,"description":"User which is the target for this notification.
\nIf this is empty (null/undefined), the notification is targeted at all users.
\nNot to be confused with the 'profile' property."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sourceType","category","review","reviewId","game","gameId","activity","activityId","profile","profileUserId","importerNotification","importerNotificationId","report","reportId","isViewed","targetProfile","targetProfileUserId","createdAt","updatedAt"]},"NotificationAggregateDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"category":{"type":"string","enum":["follow","like","comment","watch","alert"]},"sourceType":{"type":"string","enum":["game","review","activity","profile","importer","report"]},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}}},"required":["sourceId","category","sourceType","notifications"]},"PaginatedNotificationAggregationDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationAggregateDto"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"NotificationViewUpdateDto":{"type":"object","properties":{"isViewed":{"type":"boolean"},"notificationIds":{"type":"array","items":{"type":"number"}}},"required":["isViewed","notificationIds"]},"GameExternalStoreDto":{"type":"object","properties":{"icon":{"type":"string","nullable":true,"description":"Icon representing said store/service."},"storeName":{"type":"string","nullable":true},"id":{"type":"number"},"uid":{"type":"string","description":"Corresponds to the game id on the target source (see GameExternalGameCategory).\nIt's called uid, not uuid."},"category":{"type":"number","enum":[1,5,10,11,13,14,15,20,22,23,26,28,29,30,31,32,36,37,54,55]},"media":{"type":"number","enum":[1,2]},"checksum":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"year":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameId":{"type":"number"}},"required":["icon","storeName","id","uid","createdAt","updatedAt","gameId"]},"GameRepositoryFindOneDto":{"type":"object","properties":{"relations":{"type":"object"}}},"GameRepositoryFindAllDto":{"type":"object","properties":{"gameIds":{"type":"array","items":{"type":"number"}},"relations":{"type":"object"}},"required":["gameIds"]},"GamePlaytime":{"type":"object","properties":{"id":{"type":"number"},"gameId":{"type":"number"},"game":{"$ref":"#/components/schemas/Game"},"sourceId":{"type":"number"},"timeMain":{"type":"number","nullable":true},"timePlus":{"type":"number","nullable":true},"time100":{"type":"number","nullable":true},"timeAll":{"type":"number","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","gameId","game","sourceId","timeMain","timePlus","time100","timeAll","createdAt","updatedAt"]},"AchievementDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"expGainAmount":{"type":"number"},"category":{"type":"number","enum":[0,1,2,3]}},"required":["id","name","description","expGainAmount","category"]},"PaginatedAchievementsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AchievementDto"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"ObtainedAchievement":{"type":"object","properties":{"id":{"type":"number"},"achievementId":{"type":"string","description":"Achievement id specified in entries for achievements.data.ts"},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"isFeatured":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","achievementId","profile","profileUserId","isFeatured","createdAt","updatedAt"]},"UpdateFeaturedObtainedAchievementDto":{"type":"object","properties":{"isFeatured":{"type":"boolean"}},"required":["isFeatured"]},"UserLevel":{"type":"object","properties":{"userId":{"type":"string","description":"Should be the same as the profile's UserId"},"profile":{"$ref":"#/components/schemas/Profile"},"currentLevel":{"type":"number"},"currentLevelExp":{"type":"number","description":"XP in the current user-level"},"levelUpExpCost":{"type":"number","description":"Threshold XP to hit the next user-level"},"expMultiplier":{"type":"number","description":"The multiplier to apply to all exp gains"}},"required":["userId","profile","currentLevel","currentLevelExp","levelUpExpCost","expMultiplier"]},"CreateUpdateCollectionEntryDto":{"type":"object","properties":{"finishedAt":{"type":"date-time"},"collectionIds":{"type":"array","items":{"type":"string"}},"gameId":{"type":"number"},"platformIds":{"type":"array","items":{"type":"number"}},"isFavorite":{"type":"boolean","default":false}},"required":["collectionIds","gameId","platformIds","isFavorite"]},"CreateFavoriteStatusCollectionEntryDto":{"type":"object","properties":{"isFavorite":{"type":"boolean","default":false}},"required":["isFavorite"]},"CollectionEntriesPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CollectionEntry"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FindCollectionEntriesDto":{"type":"object","properties":{"offset":{"type":"number","default":0},"limit":{"type":"number","default":20},"orderBy":{"type":"object"}}},"ActivitiesFeedPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FollowStatusDto":{"type":"object","properties":{"isFollowing":{"type":"boolean"}},"required":["isFollowing"]},"FollowInfoRequestDto":{"type":"object","properties":{"criteria":{"type":"string","enum":["followers","following"]},"targetUserId":{"type":"string","minLength":36},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20},"orderBy":{"type":"object"}},"required":["criteria","targetUserId"]},"FollowInfoResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"FollowRegisterDto":{"type":"object","properties":{"followedUserId":{"type":"string","minLength":36}},"required":["followedUserId"]},"FollowRemoveDto":{"type":"object","properties":{"followedUserId":{"type":"string","minLength":36}},"required":["followedUserId"]},"ProfileMetricsOverviewDto":{"type":"object","properties":{"totalGames":{"type":"number"},"totalCollections":{"type":"number"},"totalFinishedGames":{"type":"number"},"totalEstimatedPlaytime":{"type":"number","description":"Total playtime spent on finished games, based on available data and HLTB's 'main' profile."}},"required":["totalGames","totalCollections","totalFinishedGames","totalEstimatedPlaytime"]},"ProfileMetricsYearDistributionItem":{"type":"object","properties":{"year":{"type":"number"},"count":{"type":"number"},"reviewedCount":{"type":"number","description":"Number of items in period that have been reviewed."},"totalEstimatedPlaytime":{"type":"number","description":"In seconds. Only available for the \"finish_year\" criteria."}},"required":["year","count","reviewedCount"]},"ProfileMetricsYearDistributionResponseDto":{"type":"object","properties":{"distribution":{"type":"array","items":{"$ref":"#/components/schemas/ProfileMetricsYearDistributionItem"}}},"required":["distribution"]},"ProfileMetricsTypeDistributionItem":{"type":"object","properties":{"criteriaId":{"type":"number","description":"Id of the criteria being used.\nE.g. the id of a 'GameGenre' entity."},"criteriaName":{"type":"string","description":"Criteria being used as basis for this distribution.\nE.g. The name of a 'GameGenre', the name of a Game's category (game, dlc, etc)"},"count":{"type":"number","description":"Total number of times this criteria appears.\nE.g. the number of games of 'adventure' genre a user has."},"finishedCount":{"type":"number","description":"Total number of items of this criteria that have been 'finished'.\nE.g. finished 'adventure' genre games."}},"required":["criteriaId","criteriaName","count","finishedCount"]},"ProfileMetricsTypeDistributionResponseDto":{"type":"object","properties":{"distribution":{"type":"array","items":{"$ref":"#/components/schemas/ProfileMetricsTypeDistributionItem"}}},"required":["distribution"]},"ImporterPaginatedResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GameExternalGame"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"ImporterStatusUpdateRequestDto":{"type":"object","properties":{"status":{"type":"string"},"externalGameId":{"type":"number"}},"required":["status","externalGameId"]},"FindAvailableConnectionsResponseDto":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["steam"]},"isImporterViable":{"type":"boolean"},"iconName":{"type":"string"}},"required":["name","type","isImporterViable","iconName"]},"UserConnection":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string","enum":["steam"]},"profile":{"$ref":"#/components/schemas/Profile"},"profileUserId":{"type":"string"},"sourceUserId":{"type":"string"},"sourceUsername":{"type":"string"},"isImporterViable":{"type":"boolean","description":"If this connection can be used by the 'importer' system."},"isImporterEnabled":{"type":"boolean"}},"required":["id","type","profile","profileUserId","sourceUserId","sourceUsername","isImporterViable","isImporterEnabled"]},"ConnectionCreateDto":{"type":"object","properties":{"type":{"type":"string","enum":["steam"]},"userIdentifier":{"type":"string","description":"A string representing a username, user id or profile URL for the target connection
\ne.g. a Steam's profile URL","minLength":1},"isImporterEnabled":{"type":"boolean","default":false}},"required":["type","userIdentifier","isImporterEnabled"]},"FindAllCommentsDto":{"type":"object","properties":{"sourceId":{"type":"string","minLength":36},"sourceType":{"type":"string","enum":["review"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20},"orderBy":{"type":"object"}},"required":["sourceId","sourceType"]},"FindCommentsPaginatedResponseDto":{"type":"object","properties":{"data":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/ReviewComment"}},"pagination":{"default":{},"allOf":[{"$ref":"#/components/schemas/PaginationInfo"}]}},"required":["data","pagination"]},"CreateCommentDto":{"type":"object","properties":{"sourceId":{"type":"string","description":"UUID of the target entity. Comments can only be attributed to\nUUID based entities.","minLength":36},"sourceType":{"type":"string","enum":["review"]},"content":{"type":"string","minLength":1}},"required":["sourceId","sourceType","content"]},"UpdateCommentDto":{"type":"object","properties":{"sourceType":{"type":"string","enum":["review"]},"content":{"type":"string","minLength":1}},"required":["sourceType","content"]},"DeleteCommentDto":{"type":"object","properties":{"sourceType":{"type":"string","enum":["review"]}},"required":["sourceType"]},"Report":{"type":"object","properties":{"id":{"type":"number"},"sourceType":{"description":"Indexed to improve speed when filtering by type.","enum":["review","profile","review_comment"],"type":"string"},"category":{"enum":["spam","personal"],"type":"string"},"targetReview":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Review"}]},"targetReviewId":{"type":"string","nullable":true},"targetReviewComment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ReviewComment"}]},"targetReviewCommentId":{"type":"string","nullable":true},"targetProfile":{"description":"Profile that is being target of a report","allOf":[{"$ref":"#/components/schemas/Profile"}]},"targetProfileUserId":{"type":"string"},"reason":{"type":"string","nullable":true,"description":"User-submitted reason for report."},"profile":{"description":"User responsible for report.","allOf":[{"$ref":"#/components/schemas/Profile"}]},"profileUserId":{"type":"string"},"isClosed":{"type":"boolean"},"closeHandleAction":{"nullable":true,"description":"Action taken when closing this report","enum":["discard","alert","suspend","ban"],"type":"string"},"closeProfile":{"nullable":true,"description":"User responsible for closing this report","allOf":[{"$ref":"#/components/schemas/Profile"}]},"closeProfileUserId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sourceType","category","targetReview","targetReviewId","targetReviewComment","targetReviewCommentId","targetProfile","targetProfileUserId","reason","profile","profileUserId","isClosed","closeHandleAction","closeProfile","closeProfileUserId","createdAt","updatedAt"]},"PaginatedReportResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Report"}},"pagination":{"$ref":"#/components/schemas/PaginationInfo"}},"required":["data","pagination"]},"CreateReportRequestDto":{"type":"object","properties":{"sourceType":{"type":"string","enum":["review","profile","review_comment"]},"sourceId":{"type":"string","minLength":36},"category":{"type":"string","enum":["spam","personal"]},"reason":{"type":"string"}},"required":["sourceType","sourceId","category"]},"HandleReportRequestDto":{"type":"object","properties":{"action":{"type":"string","enum":["discard","alert","suspend","ban"]},"deleteReportedContent":{"type":"boolean","default":true}},"required":["action","deleteReportedContent"]}}}} \ No newline at end of file