diff --git a/src/components/activity/ActivityFeed.tsx b/src/components/activity/ActivityFeed.tsx index 39a45d6..4bc8225 100644 --- a/src/components/activity/ActivityFeed.tsx +++ b/src/components/activity/ActivityFeed.tsx @@ -1,13 +1,7 @@ import React, { useCallback, useEffect, useMemo } from "react"; import { useInfiniteActivities } from "@/components/activity/hooks/useInfiniteActivities"; import { Skeleton, Stack } from "@mantine/core"; -import { Activity } from "@/wrapper/server"; -import type = Activity.type; -import ReviewActivityItem from "@/components/activity/item/ReviewActivityItem"; -import CenteredLoading from "@/components/general/CenteredLoading"; -import CollectionEntryActivityItem from "@/components/activity/item/CollectionEntryActivityItem"; import CenteredErrorMessage from "@/components/general/CenteredErrorMessage"; -import UserFollowActivityItem from "@/components/activity/item/UserFollowActivityItem"; import { useIntersection } from "@mantine/hooks"; import ActivityList from "@/components/activity/ActivityList"; diff --git a/src/components/activity/item/ActivityCreateDate.tsx b/src/components/activity/item/ActivityCreateDate.tsx new file mode 100644 index 0000000..b6f38a7 --- /dev/null +++ b/src/components/activity/item/ActivityCreateDate.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import getTimeSinceString from "@/util/getTimeSinceString"; +import { Text } from "@mantine/core"; + +interface Props { + createdAtDate: string | undefined; +} + +const sevenDaysMs = 7 * 24 * 60 * 60 * 1000; + +const ActivityCreateDate = ({ createdAtDate }: Props) => { + if (!createdAtDate) { + return; + } + const createdAt = new Date(createdAtDate); + const timeSince = getTimeSinceString(createdAt); + const isSevenDaysOrOlder = + new Date().getTime() - createdAt.getTime() >= sevenDaysMs; + return ( + + {isSevenDaysOrOlder + ? createdAt.toLocaleDateString() + : `${timeSince} ago`} + + ); +}; + +export default ActivityCreateDate; diff --git a/src/components/activity/item/CollectionEntryActivityItem.tsx b/src/components/activity/item/CollectionEntryActivityItem.tsx index 8657452..0011f2b 100644 --- a/src/components/activity/item/CollectionEntryActivityItem.tsx +++ b/src/components/activity/item/CollectionEntryActivityItem.tsx @@ -19,6 +19,7 @@ import TextLink from "@/components/general/TextLink"; import getTimeSinceString from "@/util/getTimeSinceString"; import { UserAvatar } from "@/components/general/input/UserAvatar"; import { UserAvatarGroup } from "@/components/general/input/UserAvatarGroup"; +import ActivityCreateDate from "@/components/activity/item/ActivityCreateDate"; interface Props { activity: Activity; @@ -45,10 +46,6 @@ const CollectionEntryActivityItem = ({ activity }: Props) => { return null; } - const collectionEntryCreateDate = collectionEntryQuery.data - ? new Date(collectionEntryQuery.data.createdAt) - : new Date(); - const timeSince = getTimeSinceString(collectionEntryCreateDate); return ( { "w-full h-full items-end justify-between pe-2 lg:pe-3 py-4" } > - - {timeSince} ago - + diff --git a/src/components/activity/item/ReviewActivityItem.tsx b/src/components/activity/item/ReviewActivityItem.tsx index 3bbc963..db522d3 100644 --- a/src/components/activity/item/ReviewActivityItem.tsx +++ b/src/components/activity/item/ReviewActivityItem.tsx @@ -16,6 +16,7 @@ import UserAvatarWithUsername from "@/components/general/input/UserAvatarWithUse import Link from "next/link"; import getTimeSinceString from "@/util/getTimeSinceString"; import { UserAvatarGroup } from "@/components/general/input/UserAvatarGroup"; +import ActivityCreateDate from "@/components/activity/item/ActivityCreateDate"; interface Props { activity: Activity; @@ -34,11 +35,6 @@ const ReviewActivityItem = ({ activity }: Props) => { gameQuery.data?.cover?.url, onMobile ? ImageSize.SCREENSHOT_MED : ImageSize.SCREENSHOT_BIG, ); - const reviewCreateDate = reviewQuery.data - ? new Date(reviewQuery.data.createdAt) - : new Date(); - - const timeSince = getTimeSinceString(reviewCreateDate); return ( { "w-full h-full items-end justify-between py-4 pe-2 lg:pe-3" } > - - {timeSince} ago - + { + return ConnectionsService.connectionsControllerFindAvailableConnections(); + }, + }); +} diff --git a/src/components/connections/hooks/useOwnUserConnectionByType.ts b/src/components/connections/hooks/useOwnUserConnectionByType.ts new file mode 100644 index 0000000..b2f82ef --- /dev/null +++ b/src/components/connections/hooks/useOwnUserConnectionByType.ts @@ -0,0 +1,14 @@ +import { useQuery } from "@tanstack/react-query"; +import { ConnectionsService } from "@/wrapper/server"; +import { ConnectionCreateDto } from "@/wrapper/server"; +import type = ConnectionCreateDto.type; + +export function useOwnUserConnectionByType(type: type) { + return useQuery({ + queryKey: ["connections", "own", type], + queryFn: async () => { + return ConnectionsService.connectionsControllerFindOwnByType(type); + }, + retry: 1, + }); +} diff --git a/src/components/connections/hooks/useOwnUserConnections.ts b/src/components/connections/hooks/useOwnUserConnections.ts new file mode 100644 index 0000000..8e34cd2 --- /dev/null +++ b/src/components/connections/hooks/useOwnUserConnections.ts @@ -0,0 +1,15 @@ +import { useQuery } from "@tanstack/react-query"; +import { ConnectionsService } from "@/wrapper/server"; + +/** + * Returns the connections persisted by the current logged-in user. + */ +export function useOwnUserConnections() { + return useQuery({ + queryKey: ["connections", "own"], + queryFn: async () => { + return ConnectionsService.connectionsControllerFindOwn(); + }, + retry: 1, + }); +} diff --git a/src/components/explore/ExploreScreenFilters.tsx b/src/components/explore/ExploreScreenFilters.tsx index 1bbf05a..2168d94 100644 --- a/src/components/explore/ExploreScreenFilters.tsx +++ b/src/components/explore/ExploreScreenFilters.tsx @@ -136,11 +136,7 @@ const ExploreScreenFilters = ({ drawerUtils.close(); }; - /** - * useLayoutEffect executes BEFORE the screen is updated, so this avoids screen "blinks" when a screen is in - * an unfinished state - */ - useLayoutEffect(() => { + useEffect(() => { const query = router.query; if (router.isReady && !hasLoadedQueryParams) { const dto = exploreScreenUrlQueryToDto(query); diff --git a/src/components/game/figure/GameFigureImage.tsx b/src/components/game/figure/GameFigureImage.tsx index b6ba266..e9b1d76 100755 --- a/src/components/game/figure/GameFigureImage.tsx +++ b/src/components/game/figure/GameFigureImage.tsx @@ -38,13 +38,7 @@ const GameFigureImage = ({ }: IGameFigureProps) => { const coverUrl = getCoverUrl(game); const sizedCoverUrl = getSizedImageUrl(coverUrl, ImageSize.COVER_BIG); - const [showSkeleton, setShowSkeleton] = useState(true); const defaultHref = `/game/${game?.id}`; - useEffect(() => { - if (showSkeleton) { - setShowSkeleton(false); - } - }, [showSkeleton, game?.id]); return ( - {"Game setShowSkeleton(false)} - onError={() => setShowSkeleton(false)} className="w-full h-auto max-h-full" {...imageProps} /> diff --git a/src/components/general/shell/GlobalAppShell.tsx b/src/components/general/shell/GlobalAppShell.tsx index 68b2c11..745a5f3 100755 --- a/src/components/general/shell/GlobalAppShell.tsx +++ b/src/components/general/shell/GlobalAppShell.tsx @@ -38,10 +38,7 @@ const GlobalAppShell = ({ children }: { children: React.ReactNode }) => { /> - + {children} diff --git a/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx b/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx index 89805e9..ce9d8f6 100755 --- a/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx +++ b/src/components/general/shell/GlobalShellNavbar/GlobalShellNavbar.tsx @@ -5,6 +5,8 @@ import { IconCheckbox, IconRouteAltLeft, IconProps, + IconHierarchy, + IconRefresh, } from "@tabler/icons-react"; import { UserButton } from "@/components/general/input/UserButton/UserButton"; import Link from "next/link"; @@ -36,14 +38,13 @@ const links: NavbarItem[] = [ { icon: IconUser, label: "Library", href: "/library" }, { icon: IconCheckbox, label: "Achievements", href: "/achievements" }, { icon: IconBulb, label: "Activity", href: "/activity" }, + // It's disabled during beta, if you are reading this you're cheating :p + // { icon: IconRefresh, label: "Importer", href: "/importer" }, ]; -interface IGlobalShellNavbarProps extends BaseModalChildrenProps { - sidebarOpened: boolean; -} +interface IGlobalShellNavbarProps extends BaseModalChildrenProps {} export default function GlobalShellNavbar({ - sidebarOpened, onClose, }: IGlobalShellNavbarProps) { const [query, setQuery] = useState(""); diff --git a/src/components/general/view/game/GameViewPagination.tsx b/src/components/general/view/game/GameViewPagination.tsx index 2ecf588..2721db9 100755 --- a/src/components/general/view/game/GameViewPagination.tsx +++ b/src/components/general/view/game/GameViewPagination.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Center, Pagination, PaginationProps } from "@mantine/core"; +import { Center, Group, Pagination, PaginationProps } from "@mantine/core"; import { PaginationInfo } from "@/wrapper/server"; import { TPaginationInfoDto } from "@/util/types/pagination"; @@ -17,7 +17,7 @@ const GameViewPagination = ({ return (
diff --git a/src/components/general/view/select/GameSelectActions.tsx b/src/components/general/view/select/GameSelectActions.tsx new file mode 100644 index 0000000..ba9b3df --- /dev/null +++ b/src/components/general/view/select/GameSelectActions.tsx @@ -0,0 +1,30 @@ +import React from "react"; +import { ActionIcon, Group, Tooltip } from "@mantine/core"; +import { IconSquareCheck, IconSquareCheckFilled } from "@tabler/icons-react"; + +interface Props { + isAllGamesSelected: boolean; + onSelectAll: () => void; +} + +const GameSelectActions = ({ onSelectAll, isAllGamesSelected }: Props) => { + return ( + + + + {isAllGamesSelected ? ( + + ) : ( + + )} + + + + ); +}; + +export default GameSelectActions; diff --git a/src/components/general/view/select/GameSelectView.tsx b/src/components/general/view/select/GameSelectView.tsx new file mode 100644 index 0000000..b7ea44b --- /dev/null +++ b/src/components/general/view/select/GameSelectView.tsx @@ -0,0 +1,16 @@ +import React, { PropsWithChildren } from "react"; +import GameSelectViewContent from "@/components/general/view/select/GameSelectViewContent"; +import GameViewPagination from "@/components/general/view/game/GameViewPagination"; +import GameSelectActions from "@/components/general/view/select/GameSelectActions"; + +interface GameSelectViewProps extends PropsWithChildren {} + +const GameSelectView = ({ children }: GameSelectViewProps) => { + return <>{children}; +}; + +GameSelectView.Content = GameSelectViewContent; +GameSelectView.Pagination = GameViewPagination; +GameSelectView.Actions = GameSelectActions; + +export default GameSelectView; diff --git a/src/components/general/view/select/GameSelectViewContent.tsx b/src/components/general/view/select/GameSelectViewContent.tsx new file mode 100644 index 0000000..a1dde80 --- /dev/null +++ b/src/components/general/view/select/GameSelectViewContent.tsx @@ -0,0 +1,60 @@ +import React, { PropsWithChildren, useMemo } from "react"; +import { TGameOrSearchGame } from "@/components/game/util/types"; +import { SimpleGrid, SimpleGridProps } from "@mantine/core"; +import GameSelectViewFigure, { + GameSelectViewFigureProps, +} from "@/components/general/view/select/GameSelectViewFigure"; + +type SelectedProps = Pick< + GameSelectViewFigureProps, + "onSelected" | "onDeselected" | "checkIsSelected" +>; + +interface Props extends PropsWithChildren { + items: TGameOrSearchGame[]; +} + +const GameSelectViewContent = ({ + items, + children, + checkIsSelected, + onSelected, + onDeselected, + ...others +}: Props) => { + const columns = useMemo(() => { + if (items == undefined || items.length === 0) { + return null; + } + + return items.map((game) => { + return ( + + ); + }); + }, [checkIsSelected, items, onDeselected, onSelected]); + + return ( + + {columns} + {children} + + ); +}; + +export default GameSelectViewContent; diff --git a/src/components/general/view/select/GameSelectViewFigure.tsx b/src/components/general/view/select/GameSelectViewFigure.tsx new file mode 100644 index 0000000..e1034b3 --- /dev/null +++ b/src/components/general/view/select/GameSelectViewFigure.tsx @@ -0,0 +1,63 @@ +import React, { useState } from "react"; +import GameFigureImage, { + IGameFigureProps, +} from "@/components/game/figure/GameFigureImage"; +import { Overlay, ThemeIcon } from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconCircleCheck, IconCircleCheckFilled } from "@tabler/icons-react"; + +export interface GameSelectViewFigureProps extends IGameFigureProps { + /** + * Not to be confused with 'onSelect'! + * @param gameId + */ + onSelected: (gameId: number) => void; + onDeselected: (gameId: number) => void; + checkIsSelected: (gameId: number) => boolean; +} + +const GameSelectViewFigure = ({ + game, + checkIsSelected, + onSelected, + onDeselected, + ...figureProps +}: GameSelectViewFigureProps) => { + if (!game) return; + + const isSelected = checkIsSelected(game.id!); + + return ( + { + evt.preventDefault(); + if (!game || !game.id) return; + + if (isSelected) { + onDeselected(game.id); + } else { + onSelected(game.id); + } + }} + > + {isSelected && ( + + )} + {isSelected && ( + + )} + + ); +}; + +export default GameSelectViewFigure; diff --git a/src/components/importer/ImporterCollectionSelect.tsx b/src/components/importer/ImporterCollectionSelect.tsx new file mode 100644 index 0000000..07a6bc1 --- /dev/null +++ b/src/components/importer/ImporterCollectionSelect.tsx @@ -0,0 +1,57 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { + ComboboxItem, + Group, + MultiSelect, + MultiSelectProps, + Select, + Text, +} from "@mantine/core"; +import { useUserLibrary } from "@/components/library/hooks/useUserLibrary"; + +interface Props extends MultiSelectProps { + userId: string | undefined; + onChange: (values: string[]) => void; +} + +const ImporterCollectionSelect = ({ userId, onChange, ...others }: Props) => { + const userLibraryQuery = useUserLibrary(userId); + const collections = userLibraryQuery.data?.collections; + const [ + hasSelectedFinishedGamesCollection, + setHasSelectedFinishedGamesCollection, + ] = useState(); + + const collectionsSelectOptions = useMemo(() => { + if ( + userLibraryQuery.data == undefined || + userLibraryQuery.data.collections == undefined || + userLibraryQuery.data.collections.length === 0 + ) { + return undefined; + } + + return userLibraryQuery.data.collections.map( + (collection): ComboboxItem => { + return { + label: collection.name, + value: collection.id, + }; + }, + ); + }, [userLibraryQuery.data]); + + return ( + + ); +}; + +export default ImporterCollectionSelect; diff --git a/src/components/importer/hooks/useImporterEntries.ts b/src/components/importer/hooks/useImporterEntries.ts new file mode 100644 index 0000000..79c4455 --- /dev/null +++ b/src/components/importer/hooks/useImporterEntries.ts @@ -0,0 +1,55 @@ +import { useQuery, useQueryClient } from "@tanstack/react-query"; +import { + ImporterPaginatedResponseDto, + ImporterService, +} from "@/wrapper/server"; +import { ExtendedUseQueryResult } from "@/util/types/ExtendedUseQueryResult"; + +interface Props { + source: string; + limit?: number; + offset?: number; +} + +export function useImporterEntries({ + source, + offset, + limit, +}: Props): ExtendedUseQueryResult { + const queryClient = useQueryClient(); + const queryKey = [ + "importer", + "entries", + "unprocessed", + source, + offset, + limit, + ]; + const invalidate = () => { + queryClient.invalidateQueries({ + queryKey: queryKey.slice(0, 4), + }); + }; + return { + ...useQuery({ + queryKey: [ + "importer", + "entries", + "unprocessed", + source, + offset, + limit, + ], + queryFn: async () => { + return ImporterService.importerControllerFindUnprocessedEntries( + source, + limit, + offset, + ); + }, + enabled: source != undefined, + }), + queryKey, + invalidate, + }; +} diff --git a/src/components/importer/view/ImporterItem.tsx b/src/components/importer/view/ImporterItem.tsx new file mode 100644 index 0000000..45673fd --- /dev/null +++ b/src/components/importer/view/ImporterItem.tsx @@ -0,0 +1,52 @@ +import React, { useMemo } from "react"; +import { UserConnection } from "@/wrapper/server"; +import { Button, Image, Paper, Stack, Title } from "@mantine/core"; +import { getServerStoredIcon } from "@/util/getServerStoredImages"; +import Link from "next/link"; + +interface Props { + connection: UserConnection; +} + +const connectionTypeToName = (type: UserConnection.type) => { + switch (type) { + case UserConnection.type.STEAM: + return "Steam"; + default: + return "Name not available"; + } +}; + +const ImporterItem = ({ connection }: Props) => { + const connectionName = useMemo( + () => connectionTypeToName(connection.type), + [connection.type], + ); + return ( + + + {"Importer + {connectionName} + + + + + + ); +}; + +export default ImporterItem; diff --git a/src/components/preferences/PreferencesScreen.tsx b/src/components/preferences/PreferencesScreen.tsx index 7274f4c..fe34187 100644 --- a/src/components/preferences/PreferencesScreen.tsx +++ b/src/components/preferences/PreferencesScreen.tsx @@ -9,6 +9,8 @@ import useOnMobile from "@/components/general/hooks/useOnMobile"; import PreferencesScreenSelector from "@/components/preferences/PreferencesScreenSelector"; import PreferencesProfileScreen from "@/components/preferences/categories/PreferencesProfileScreen"; import { useRouter } from "next/router"; +import PreferencesConnectionsScreen from "@/components/preferences/categories/PreferencesConnectionsScreen"; +import CenteredLoading from "@/components/general/CenteredLoading"; interface Props { category: PreferencesActiveCategory; @@ -25,8 +27,13 @@ const PreferencesScreen = ({ category }: Props) => { const render = () => { switch (category) { - default: + case "profile": return ; + case "connections": + return ; + + default: + return ; } }; diff --git a/src/components/preferences/PreferencesScreenSelector.tsx b/src/components/preferences/PreferencesScreenSelector.tsx index 7d6cebf..cdcc28a 100644 --- a/src/components/preferences/PreferencesScreenSelector.tsx +++ b/src/components/preferences/PreferencesScreenSelector.tsx @@ -23,6 +23,7 @@ const PreferencesScreenSelector = ({ activeCategory, onChange }: Props) => { data={data} value={activeCategory} onChange={(item) => onChange(item as PreferencesActiveCategory)} + allowDeselect={false} /> ); }; diff --git a/src/components/preferences/PreferencesScreenSideBar.tsx b/src/components/preferences/PreferencesScreenSideBar.tsx index 82fbe19..7d9e4b9 100644 --- a/src/components/preferences/PreferencesScreenSideBar.tsx +++ b/src/components/preferences/PreferencesScreenSideBar.tsx @@ -19,10 +19,10 @@ export const preferencesCategories: PreferencesCategory[] = [ name: "Profile", activeCategoryName: "profile", }, - // { - // name: "Connections", - // activeCategoryName: "connections", - // }, + { + name: "Connections", + activeCategoryName: "connections", + }, // { // name: "Privacy", // activeCategoryName: "privacy", diff --git a/src/components/preferences/categories/PreferencesConnectionsScreen.tsx b/src/components/preferences/categories/PreferencesConnectionsScreen.tsx new file mode 100644 index 0000000..1880cde --- /dev/null +++ b/src/components/preferences/categories/PreferencesConnectionsScreen.tsx @@ -0,0 +1,43 @@ +import React, { useMemo } from "react"; +import { Group, Stack } from "@mantine/core"; +import { useAvailableConnections } from "@/components/connections/hooks/useAvailableConnections"; +import PreferencesConnectionItem from "@/components/preferences/handlers/connections/PreferencesConnectionItem"; +import CenteredLoading from "@/components/general/CenteredLoading"; +import CenteredErrorMessage from "@/components/general/CenteredErrorMessage"; + +const PreferencesConnectionsScreen = () => { + const { isLoading, isError, data } = useAvailableConnections(); + + const items = useMemo(() => { + if (data == undefined) { + return; + } + + return data.map((item) => { + return ( + + ); + }); + }, [data]); + + return ( + + + {isLoading && } + {isError && ( + + )} + {items} + + + ); +}; + +export default PreferencesConnectionsScreen; diff --git a/src/components/preferences/handlers/PreferencesUsernameChanger.tsx b/src/components/preferences/handlers/PreferencesUsernameChanger.tsx index b3edacf..d8ddf13 100644 --- a/src/components/preferences/handlers/PreferencesUsernameChanger.tsx +++ b/src/components/preferences/handlers/PreferencesUsernameChanger.tsx @@ -95,7 +95,7 @@ const PreferencesUsernameChanger = ({ Must be unique Must have at least 5 characters - You can only change it after 30 days + You can only change it again after 30 days diff --git a/src/components/preferences/handlers/connections/PreferencesConnectionItem.tsx b/src/components/preferences/handlers/connections/PreferencesConnectionItem.tsx new file mode 100644 index 0000000..bdb0f35 --- /dev/null +++ b/src/components/preferences/handlers/connections/PreferencesConnectionItem.tsx @@ -0,0 +1,66 @@ +import React, { useCallback, useMemo } from "react"; +import { UserConnection } from "@/wrapper/server"; +import type = UserConnection.type; +import { useOwnUserConnectionByType } from "@/components/connections/hooks/useOwnUserConnectionByType"; +import { useDisclosure } from "@mantine/hooks"; +import { Group, Image, Paper, Stack, Switch, Text, Title } from "@mantine/core"; +import { getServerStoredIcon } from "@/util/getServerStoredImages"; +import PreferencesConnectionModal from "@/components/preferences/handlers/connections/PreferencesConnectionModal"; + +interface Props { + type: type; +} + +const PreferencesConnectionItem = ({ type }: Props) => { + const userConnection = useOwnUserConnectionByType(type); + const [modalOpened, modalUtils] = useDisclosure(); + + return ( + + + + {"Steam + + {userConnection.data ? ( + <> + + {userConnection.data.sourceUsername} + + Connected + + ) : ( + <> + Not connected + + )} + + + { + modalUtils.open(); + }} + /> + + + + ); +}; + +export default PreferencesConnectionItem; diff --git a/src/components/preferences/handlers/connections/PreferencesConnectionModal.tsx b/src/components/preferences/handlers/connections/PreferencesConnectionModal.tsx new file mode 100644 index 0000000..78303fc --- /dev/null +++ b/src/components/preferences/handlers/connections/PreferencesConnectionModal.tsx @@ -0,0 +1,26 @@ +import React, { useMemo } from "react"; +import { BaseModalProps } from "@/util/types/modal-props"; +import { UserConnection } from "@/wrapper/server"; +import { Modal } from "@mantine/core"; +import PreferencesConnectionSteamForm from "@/components/preferences/handlers/connections/steam/PreferencesConnectionSteamForm"; +interface Props extends BaseModalProps { + type: UserConnection.type; +} + +const PreferencesConnectionModal = ({ opened, onClose, type }: Props) => { + const renderedConnectionForm = useMemo(() => { + switch (type) { + case UserConnection.type.STEAM: + return ; + default: + return null; + } + }, [onClose, type]); + return ( + + {renderedConnectionForm} + + ); +}; + +export default PreferencesConnectionModal; diff --git a/src/components/preferences/handlers/connections/steam/PreferencesConnectionSteamForm.tsx b/src/components/preferences/handlers/connections/steam/PreferencesConnectionSteamForm.tsx new file mode 100644 index 0000000..8c08949 --- /dev/null +++ b/src/components/preferences/handlers/connections/steam/PreferencesConnectionSteamForm.tsx @@ -0,0 +1,132 @@ +import React from "react"; +import { Button, Modal, Stack, Switch, Text, TextInput } from "@mantine/core"; +import { + BaseModalChildrenProps, + BaseModalProps, +} from "@/util/types/modal-props"; +import { useForm } from "react-hook-form"; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { ConnectionCreateDto, ConnectionsService } from "@/wrapper/server"; +import { notifications } from "@mantine/notifications"; +import CenteredErrorMessage from "@/components/general/CenteredErrorMessage"; +import { useOwnUserConnectionByType } from "@/components/connections/hooks/useOwnUserConnectionByType"; +import type = ConnectionCreateDto.type; + +interface Props extends BaseModalChildrenProps {} + +const PreferencesConnectionSteamForm = ({ onClose }: Props) => { + const { watch, register, handleSubmit } = useForm<{ + query: string; + }>({ + mode: "onSubmit", + }); + + const userConnection = useOwnUserConnectionByType(type.STEAM); + + const queryClient = useQueryClient(); + + const connectionCreateMutation = useMutation({ + mutationFn: async (profileURL: string) => { + try { + await ConnectionsService.connectionsControllerCreateOrUpdate({ + type: type.STEAM, + userIdentifier: profileURL, + isImporterEnabled: true, + }); + } catch (err) { + throw new Error("Invalid profile URL, please try again."); + } + }, + onSuccess: () => { + notifications.show({ + color: "green", + message: "Successfully set up Steam connection!", + }); + if (onClose) { + onClose(); + } + }, + onSettled: () => { + queryClient.resetQueries({ + queryKey: ["connections", "own"], + }); + }, + }); + + const connectionDeleteMutation = useMutation({ + mutationFn: async () => { + if (userConnection.data == undefined) { + return; + } + + return ConnectionsService.connectionsControllerDelete( + userConnection.data.id, + ); + }, + onSuccess: () => { + notifications.show({ + color: "green", + message: "Successfully removed Steam connection!", + }); + if (onClose) { + onClose(); + } + }, + onSettled: () => { + queryClient.resetQueries({ + queryKey: ["connections"], + }); + }, + }); + + return ( +
{ + connectionCreateMutation.mutate(data.query); + })} + > + + {connectionCreateMutation.error && ( + + )} + + {/* It's disabled during beta, if you are reading this you're cheating :p */} + {/**/} + {/* This connection can optionally be used in our importer*/} + {/* system to help you import games from this store. This*/} + {/* feature only works for public libraries.*/} + {/**/} + + {userConnection.data != undefined && ( + + )} + +
+ ); +}; + +export default PreferencesConnectionSteamForm; diff --git a/src/components/review/view/UserReviewListView.tsx b/src/components/review/view/UserReviewListView.tsx index 97f0f7f..9a18b74 100644 --- a/src/components/review/view/UserReviewListView.tsx +++ b/src/components/review/view/UserReviewListView.tsx @@ -46,7 +46,9 @@ const queryDtoToSearchParams = (dto: TBasePaginationRequest) => { const limitToUse = dto.limit || DEFAULT_LIMIT; if (dto.offset) { const offsetAsPage = - dto.offset > limitToUse ? Math.ceil(dto.offset / limitToUse) : 1; + dto.offset > limitToUse + ? Math.ceil((dto.offset + 1) / limitToUse) + : 1; searchParams.set("page", `${offsetAsPage}`); } return searchParams; diff --git a/src/pages/explore/index.tsx b/src/pages/explore/index.tsx index 7112bdd..ff4a907 100644 --- a/src/pages/explore/index.tsx +++ b/src/pages/explore/index.tsx @@ -3,7 +3,6 @@ import { ActionIcon, Affix, Skeleton, Stack, Transition } from "@mantine/core"; import { NextPageContext } from "next"; import { dehydrate, QueryClient } from "@tanstack/react-query"; import { - FindStatisticsTrendingReviewsDto, GameRepositoryFindAllDto, GameRepositoryService, GameStatisticsPaginatedResponseDto, diff --git a/src/pages/importer/[type].tsx b/src/pages/importer/[type].tsx new file mode 100644 index 0000000..bce96ca --- /dev/null +++ b/src/pages/importer/[type].tsx @@ -0,0 +1,365 @@ +import { useRouter } from "next/router"; +import { useImporterEntries } from "@/components/importer/hooks/useImporterEntries"; +import { + ActionIcon, + Box, + Button, + Center, + Container, + Flex, + Group, + Image, + Paper, + Skeleton, + Space, + Stack, + Text, + Title, +} from "@mantine/core"; +import { getServerStoredIcon } from "@/util/getServerStoredImages"; +import ImporterCollectionSelect from "@/components/importer/ImporterCollectionSelect"; +import useUserId from "@/components/auth/hooks/useUserId"; +import { useGames } from "@/components/game/hooks/useGames"; +import React, { useCallback, useEffect, useState } from "react"; +import GameSelectView from "@/components/general/view/select/GameSelectView"; +import { z } from "zod"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { useMutation } from "@tanstack/react-query"; +import { + CollectionsEntriesService, + GamePlatform, + ImporterService, +} from "@/wrapper/server"; +import { useUserLibrary } from "@/components/library/hooks/useUserLibrary"; +import { notifications } from "@mantine/notifications"; +import CenteredErrorMessage from "@/components/general/CenteredErrorMessage"; +import { + IconCheckbox, + IconSquareCheck, + IconSquareCheckFilled, +} from "@tabler/icons-react"; + +const ImporterFormSchema = z.object({ + selectedCollectionIds: z + .array(z.string()) + .min(1, "Select at least one collection"), + selectedGameIds: z.array(z.number()).min(1, "Select at least one game."), + page: z.number().default(1), +}); + +type ImporterFormValues = z.infer; + +const DEFAULT_LIMIT = 20; + +const getPlatformIdForType = (type: string) => { + switch (type) { + case "steam": + return 6; + default: + return undefined; + } +}; + +function TypePage() { + const router = useRouter(); + const { type } = router.query; + + const userId = useUserId(); + + const userLibrary = useUserLibrary(userId); + + const { register, watch, handleSubmit, formState, setValue } = + useForm({ + mode: "onBlur", + resolver: zodResolver(ImporterFormSchema), + defaultValues: { + page: 1, + selectedCollectionIds: [], + selectedGameIds: [], + }, + }); + + const selectedGameIds = watch("selectedGameIds"); + const selectedCollectionIds = watch("selectedCollectionIds"); + const page = watch("page"); + + const [ + hasSelectedFinishedGamesCollection, + setHasSelectedFinishedGamesCollection, + ] = useState(false); + + const importerEntriesQuery = useImporterEntries({ + source: type as string, + limit: DEFAULT_LIMIT, + offset: (page - 1) * DEFAULT_LIMIT, + }); + + const gameIds = importerEntriesQuery.data?.data.map( + (externalGame) => externalGame.gameId, + ); + + const gamesQuery = useGames( + { + gameIds, + relations: { + cover: true, + }, + }, + true, + ); + const isLoading = importerEntriesQuery.isLoading || gamesQuery.isLoading; + const isError = importerEntriesQuery.isError || gamesQuery.isError; + const isEmpty = + !isLoading && + !isError && + (importerEntriesQuery.data == undefined || + importerEntriesQuery.data.data.length === 0); + + const error = importerEntriesQuery.error || gamesQuery.error; + + const isAllGamesSelected = + gameIds != undefined && selectedGameIds.length === gameIds.length; + + const buildLoadingSkeletons = useCallback(() => { + return new Array(10).fill(0).map((v, i) => { + return ; + }); + }, []); + + const handleSelection = (gameId: number, action: "select" | "deselect") => { + const indexOfElement = selectedGameIds.indexOf(gameId); + + if (action === "deselect") { + if (indexOfElement >= 0) { + const updatedArray = selectedGameIds.toSpliced( + indexOfElement, + 1, + ); + setValue("selectedGameIds", updatedArray); + } + return; + } + // Item is already present in "select" action + if (indexOfElement >= 0) { + return; + } + + setValue("selectedGameIds", selectedGameIds.concat([gameId])); + }; + + const importMutation = useMutation({ + mutationFn: async ({ + selectedCollectionIds, + selectedGameIds, + }: ImporterFormValues) => { + const importedGameIds: number[] = []; + for (const selectedGameId of selectedGameIds) { + const platformId = getPlatformIdForType(type as string); + if (platformId == undefined) { + throw new Error( + "Invalid source type. Please contact support", + ); + } + + const externalGame = importerEntriesQuery.data?.data.find( + (externalGame) => { + return externalGame.gameId === selectedGameId; + }, + ); + + if (!externalGame) { + throw new Error( + "Error while inserting game. Invalid external game ID. Please contact support.", + ); + } + + await CollectionsEntriesService.collectionsEntriesControllerCreateOrUpdate( + { + gameId: selectedGameId, + collectionIds: selectedCollectionIds, + platformIds: [platformId], + isFavorite: false, + }, + ); + await ImporterService.importerControllerChangeStatus({ + externalGameId: externalGame.id, + status: "processed", + }); + importedGameIds.push(selectedGameId); + } + + return importedGameIds.length; + }, + onSuccess: (importedGamesCount) => { + notifications.show({ + color: "green", + message: `Successfully imported ${importedGamesCount} games to your library!`, + }); + setValue("selectedGameIds", []); + }, + onSettled: () => { + importerEntriesQuery.invalidate(); + gamesQuery.invalidate(); + }, + onError: (err) => { + notifications.show({ + color: "red", + message: `Error while importing games: ${err.message}`, + }); + }, + }); + + useEffect(() => { + if ( + userLibrary.data == undefined || + userLibrary.data.collections == undefined + ) { + return; + } + + const hasSelected = userLibrary.data.collections.some((collection) => { + return ( + collection.isFinished && + selectedCollectionIds.includes(collection.id) + ); + }); + + setHasSelectedFinishedGamesCollection(hasSelected); + }, [ + hasSelectedFinishedGamesCollection, + setHasSelectedFinishedGamesCollection, + userLibrary.data, + selectedCollectionIds, + ]); + + return ( + + +
{ + importMutation.mutate(data); + })} + > + + + + + + GAME{" "} + <span className={"text-[#F15025]"}> + IMPORTER + </span> + + + Select one or multiple games which you want + to bring to your GameNode library. + + + + + { + setValue("selectedCollectionIds", values); + }} + error={ + formState.errors.selectedCollectionIds + ?.message + } + /> + {hasSelectedFinishedGamesCollection && ( + + Selected games will be marked as "Finished" + because a collection for finished games has + been selected. You can change the finish + date later. + + )} + +
+ +
+ {formState.errors.selectedGameIds != undefined && ( + + )} +
+ + {isError && error && ( + + )} + {isEmpty && ( + + )} + + {!isEmpty && ( + { + if (isAllGamesSelected) { + setValue("selectedGameIds", []); + } else if (gameIds) { + setValue( + "selectedGameIds", + gameIds, + ); + } + }} + /> + )} + { + return selectedGameIds.includes(gameId); + }} + onSelected={(gameId) => + handleSelection(gameId, "select") + } + onDeselected={(gameId) => { + handleSelection(gameId, "deselect"); + }} + > + {isLoading && buildLoadingSkeletons()} + + + {!isEmpty && ( + { + setValue("page", selectedPage); + }} + /> + )} + + +
+
+
+ ); +} + +export default TypePage; diff --git a/src/pages/importer/index.tsx b/src/pages/importer/index.tsx new file mode 100644 index 0000000..5117d66 --- /dev/null +++ b/src/pages/importer/index.tsx @@ -0,0 +1,66 @@ +import React from "react"; +import { Group, Image, Paper, Space, Stack, Text, Title } from "@mantine/core"; +import { useOwnUserConnections } from "@/components/connections/hooks/useOwnUserConnections"; +import CenteredLoading from "@/components/general/CenteredLoading"; +import CenteredErrorMessage from "@/components/general/CenteredErrorMessage"; +import { getServerStoredIcon } from "@/util/getServerStoredImages"; +import Link from "next/link"; +import TextLink from "@/components/general/TextLink"; +import ImporterItem from "@/components/importer/view/ImporterItem"; + +const Index = () => { + const { data, isLoading, isError, error } = useOwnUserConnections(); + + const importerUsableConnections = data?.filter( + (connection) => + connection.isImporterViable && connection.isImporterEnabled, + ); + + const isImportingAvailable = + importerUsableConnections != undefined && + importerUsableConnections.length > 0; + + return ( + + + + + GAME <span className={"text-[#F15025]"}>IMPORTER</span> + + + + The importer system helps you bring games from other + platforms to GameNode. + + + {isLoading && } + {isError && ( + + )} + {!isLoading && !isError && !isImportingAvailable && ( + + It seems like you don't have any connection set up + for importing.{" "} + + Click here + {" "} + to set one up. + + )} + + {importerUsableConnections?.map((connection) => { + return ( + + ); + })} + + + + + ); +}; + +export default Index; diff --git a/src/util/getServerStoredImages.ts b/src/util/getServerStoredImages.ts index 17556ca..9871d41 100644 --- a/src/util/getServerStoredImages.ts +++ b/src/util/getServerStoredImages.ts @@ -6,8 +6,8 @@ export function getServerStoredUpload(filename: string) { /** * Extension '.png' is appended by default at the end of filename. - * @param filename + * @param iconName */ -export function getServerStoredIcon(filename: string) { - return `${serverUrl}/v1/public/icons/${filename}.png`; +export function getServerStoredIcon(iconName: string) { + return `${serverUrl}/v1/public/icons/${iconName}.png`; } diff --git a/src/wrapper/input/server_swagger.json b/src/wrapper/input/server_swagger.json index 9b01098..fcd07b8 100644 --- a/src/wrapper/input/server_swagger.json +++ b/src/wrapper/input/server_swagger.json @@ -1 +1 @@ -{"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":{"multipart/form-data":{"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/{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"],"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/{id}/view":{"put":{"operationId":"NotificationsController_updateViewedStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"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/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/steam-sync/resolve":{"post":{"operationId":"SteamSyncController_resolveUserId","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SteamUserIdResolveRequestDto"}}}},"responses":{"201":{"description":""}},"tags":["steam-sync"]}}},"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"},"mimetype":{"type":"string"},"extension":{"type":"string"},"size":{"type":"number"},"filename":{"type":"string"},"encoding":{"type":"string"},"profile":{"$ref":"#/components/schemas/Profile"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","mimetype","extension","size","filename","encoding","profile","createdAt","updatedAt"]},"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"]},"Profile":{"type":"object","properties":{"userId":{"type":"string","description":"Shareable string ID\n\nSame as SuperTokens' userId."},"username":{"type":"string"},"bio":{"type":"string"},"avatar":{"$ref":"#/components/schemas/ProfileAvatar"},"followers":{"type":"array","items":{"$ref":"#/components/schemas/UserFollow"}},"following":{"type":"array","items":{"$ref":"#/components/schemas/UserFollow"}},"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","followers","following","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},"avatar":{"type":"object"},"bio":{"type":"string","minLength":1,"maxLength":240}}},"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"],"type":"string"}},"required":["sourceId","sourceType"]},"FindOneStatisticsDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"sourceType":{"type":"string","enum":["game","review","activity"]}},"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"]},"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}},"required":["id","profile","profileUserId","createdAt","updatedAt","gameStatistics","gameStatisticsId","reviewStatistics","reviewStatisticsId","activityStatistics","activityStatisticsId"]},"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"}]}},"required":["id","profileUserId","createdAt","updatedAt","gameStatistics","reviewStatistics","activityStatistics"]},"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},"period":{"type":"string","enum":["day","week","month","quarter","half_year","year","all"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}},"required":["period"]},"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"]},"Notification":{"type":"object","properties":{"id":{"type":"number"},"sourceType":{"type":"string","enum":["game","review","activity","profile"]},"category":{"type":"string","description":"What this notification's about. E.g.: a new like, a new follower, a game launch, etc.","enum":["follow","like","comment","launch"]},"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'."},"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","isViewed","targetProfile","targetProfileUserId","createdAt","updatedAt"]},"NotificationAggregateDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"category":{"type":"string","enum":["follow","like","comment","launch"]},"sourceType":{"type":"string","enum":["game","review","activity","profile"]},"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"}},"required":["isViewed"]},"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"]},"SteamUserIdResolveRequestDto":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]}}}} \ 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":{"multipart/form-data":{"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/{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"],"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/{id}/view":{"put":{"operationId":"NotificationsController_updateViewedStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"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/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/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"]}}},"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"},"mimetype":{"type":"string"},"extension":{"type":"string"},"size":{"type":"number"},"filename":{"type":"string"},"encoding":{"type":"string"},"profile":{"$ref":"#/components/schemas/Profile"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","mimetype","extension","size","filename","encoding","profile","createdAt","updatedAt"]},"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"]},"Profile":{"type":"object","properties":{"userId":{"type":"string","description":"Shareable string ID\n\nSame as SuperTokens' userId."},"username":{"type":"string"},"bio":{"type":"string"},"avatar":{"$ref":"#/components/schemas/ProfileAvatar"},"followers":{"type":"array","items":{"$ref":"#/components/schemas/UserFollow"}},"following":{"type":"array","items":{"$ref":"#/components/schemas/UserFollow"}},"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","followers","following","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},"avatar":{"type":"object"},"bio":{"type":"string","minLength":1,"maxLength":240}}},"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"],"type":"string"}},"required":["sourceId","sourceType"]},"FindOneStatisticsDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"sourceType":{"type":"string","enum":["game","review","activity"]}},"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"]},"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}},"required":["id","profile","profileUserId","createdAt","updatedAt","gameStatistics","gameStatisticsId","reviewStatistics","reviewStatisticsId","activityStatistics","activityStatisticsId"]},"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"}]}},"required":["id","profileUserId","createdAt","updatedAt","gameStatistics","reviewStatistics","activityStatistics"]},"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},"period":{"type":"string","enum":["day","week","month","quarter","half_year","year","all"]},"offset":{"type":"number","default":0},"limit":{"type":"number","default":20}},"required":["period"]},"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"]},"Notification":{"type":"object","properties":{"id":{"type":"number"},"sourceType":{"type":"string","enum":["game","review","activity","profile"]},"category":{"type":"string","description":"What this notification's about. E.g.: a new like, a new follower, a game launch, etc.","enum":["follow","like","comment","launch"]},"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'."},"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","isViewed","targetProfile","targetProfileUserId","createdAt","updatedAt"]},"NotificationAggregateDto":{"type":"object","properties":{"sourceId":{"oneOf":[{"type":"string"},{"type":"number"}]},"category":{"type":"string","enum":["follow","like","comment","launch"]},"sourceType":{"type":"string","enum":["game","review","activity","profile"]},"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"}},"required":["isViewed"]},"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"]},"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"]}}}} \ No newline at end of file