2024-05-05 18:18:48 +00:00
|
|
|
import type { Downloader, GameStatus } from "@shared";
|
2024-04-29 18:50:10 +00:00
|
|
|
|
2024-04-18 07:46:06 +00:00
|
|
|
export type GameShop = "steam" | "epic";
|
|
|
|
export type CatalogueCategory = "recently_added" | "trending";
|
|
|
|
|
|
|
|
export interface SteamGenre {
|
|
|
|
id: string;
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface SteamScreenshot {
|
|
|
|
id: number;
|
|
|
|
path_thumbnail: string;
|
|
|
|
path_full: string;
|
|
|
|
}
|
|
|
|
|
2024-05-05 02:37:47 +00:00
|
|
|
export interface SteamVideoSource {
|
|
|
|
max: string;
|
2024-05-07 14:42:09 +00:00
|
|
|
"480": string;
|
2024-05-05 02:37:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface SteamMovies {
|
|
|
|
id: number;
|
|
|
|
mp4: SteamVideoSource;
|
|
|
|
webm: SteamVideoSource;
|
|
|
|
thumbnail: string;
|
|
|
|
name: string;
|
|
|
|
highlight: boolean;
|
|
|
|
}
|
|
|
|
|
2024-04-18 07:46:06 +00:00
|
|
|
export interface SteamAppDetails {
|
|
|
|
name: string;
|
|
|
|
detailed_description: string;
|
|
|
|
about_the_game: string;
|
|
|
|
short_description: string;
|
|
|
|
publishers: string[];
|
|
|
|
genres: SteamGenre[];
|
2024-05-07 14:42:09 +00:00
|
|
|
movies?: SteamMovies[];
|
2024-04-18 07:46:06 +00:00
|
|
|
screenshots: SteamScreenshot[];
|
|
|
|
pc_requirements: {
|
|
|
|
minimum: string;
|
|
|
|
recommended: string;
|
|
|
|
};
|
|
|
|
mac_requirements: {
|
|
|
|
minimum: string;
|
|
|
|
recommended: string;
|
|
|
|
};
|
2024-05-05 18:50:17 +00:00
|
|
|
linux_requirements: {
|
2024-04-18 07:46:06 +00:00
|
|
|
minimum: string;
|
|
|
|
recommended: string;
|
|
|
|
};
|
|
|
|
release_date: {
|
|
|
|
coming_soon: boolean;
|
|
|
|
date: string;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GameRepack {
|
|
|
|
id: number;
|
|
|
|
title: string;
|
|
|
|
magnet: string;
|
|
|
|
page: number;
|
|
|
|
repacker: string;
|
|
|
|
fileSize: string | null;
|
|
|
|
uploadDate: Date | string | null;
|
|
|
|
createdAt: Date;
|
|
|
|
updatedAt: Date;
|
|
|
|
}
|
|
|
|
|
2024-04-28 18:21:14 +00:00
|
|
|
export type ShopDetails = SteamAppDetails & {
|
|
|
|
objectID: string;
|
|
|
|
};
|
|
|
|
|
2024-04-18 07:46:06 +00:00
|
|
|
export interface TorrentFile {
|
|
|
|
path: string;
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Used by the catalogue */
|
|
|
|
export interface CatalogueEntry {
|
|
|
|
objectID: string;
|
|
|
|
shop: GameShop;
|
|
|
|
title: string;
|
|
|
|
/* Epic Games covers cannot be guessed with objectID */
|
|
|
|
cover: string;
|
|
|
|
repacks: GameRepack[];
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Used by the library */
|
|
|
|
export interface Game extends Omit<CatalogueEntry, "cover"> {
|
|
|
|
id: number;
|
|
|
|
title: string;
|
|
|
|
iconUrl: string;
|
2024-04-30 09:09:29 +00:00
|
|
|
status: GameStatus | null;
|
2024-04-18 07:46:06 +00:00
|
|
|
folderName: string;
|
|
|
|
downloadPath: string | null;
|
|
|
|
repacks: GameRepack[];
|
|
|
|
repack: GameRepack;
|
|
|
|
progress: number;
|
|
|
|
fileVerificationProgress: number;
|
2024-04-29 18:52:53 +00:00
|
|
|
decompressionProgress: number;
|
2024-04-18 07:46:06 +00:00
|
|
|
bytesDownloaded: number;
|
|
|
|
playTimeInMilliseconds: number;
|
2024-05-05 18:18:48 +00:00
|
|
|
downloader: Downloader;
|
2024-04-18 07:46:06 +00:00
|
|
|
executablePath: string | null;
|
|
|
|
lastTimePlayed: Date | null;
|
|
|
|
fileSize: number;
|
|
|
|
createdAt: Date;
|
|
|
|
updatedAt: Date;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TorrentProgress {
|
|
|
|
downloadSpeed: number;
|
|
|
|
timeRemaining: number;
|
|
|
|
numPeers: number;
|
|
|
|
numSeeds: number;
|
|
|
|
game: Omit<Game, "repacks">;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface UserPreferences {
|
|
|
|
downloadsPath: string | null;
|
|
|
|
language: string;
|
|
|
|
downloadNotificationsEnabled: boolean;
|
|
|
|
repackUpdatesNotificationsEnabled: boolean;
|
2024-04-29 18:52:53 +00:00
|
|
|
realDebridApiToken: string | null;
|
2024-05-03 17:58:45 +00:00
|
|
|
preferQuitInsteadOfHiding: boolean;
|
2024-05-05 23:11:12 +00:00
|
|
|
runAtStartup: boolean;
|
2024-04-18 07:46:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface HowLongToBeatCategory {
|
|
|
|
title: string;
|
|
|
|
duration: string;
|
|
|
|
accuracy: string;
|
|
|
|
}
|
2024-05-13 08:35:29 +00:00
|
|
|
|
|
|
|
export interface Steam250Game {
|
|
|
|
title: string;
|
|
|
|
objectID: string;
|
|
|
|
}
|