feat: adding cloud sync

This commit is contained in:
Chubby Granny Chaser
2024-09-25 19:37:28 +01:00
parent d88e06e289
commit e64a414309
33 changed files with 1352 additions and 84 deletions

View File

@@ -26,6 +26,8 @@ import type {
UserDetails,
FriendRequestSync,
DownloadSourceValidationResult,
GameArtifact,
LudusaviBackup,
} from "@types";
import type { DiskSpace } from "check-disk-space";
@@ -113,6 +115,37 @@ declare global {
/* Hardware */
getDiskFreeSpace: (path: string) => Promise<DiskSpace>;
/* Cloud sync */
uploadSaveGame: (objectId: string, shop: GameShop) => Promise<void>;
downloadGameArtifact: (
objectId: string,
shop: GameShop,
gameArtifactId: string
) => Promise<void>;
getGameArtifacts: (
objectId: string,
shop: GameShop
) => Promise<GameArtifact[]>;
getGameBackupPreview: (
objectId: string,
shop: GameShop
) => Promise<LudusaviBackup | null>;
checkGameCloudSyncSupport: (
objectId: string,
shop: GameShop
) => Promise<boolean>;
deleteGameArtifact: (gameArtifactId: string) => Promise<{ ok: boolean }>;
onDownloadComplete: (
objectId: string,
shop: GameShop,
cb: () => void
) => () => Electron.IpcRenderer;
onUploadComplete: (
objectId: string,
shop: GameShop,
cb: () => void
) => () => Electron.IpcRenderer;
/* Misc */
openExternal: (src: string) => Promise<void>;
getVersion: () => Promise<string>;