diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/index.ts | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/api/index.ts b/src/api/index.ts index df52fee..ea0d28c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,25 +1,26 @@ import { callable } from "@decky/api"; +import type { ApiResponse, GameConfigResponse } from "../types/index"; -export const runInstallFGMod = callable< - [], - { status: string; message?: string; output?: string } ->("run_install_fgmod"); +export const runInstallFGMod = callable<[], ApiResponse>("run_install_fgmod"); -export const runUninstallFGMod = callable< - [], - { status: string; message?: string; output?: string } ->("run_uninstall_fgmod"); +export const runUninstallFGMod = callable<[], ApiResponse>("run_uninstall_fgmod"); -export const checkFGModPath = callable< - [], - { exists: boolean } ->("check_fgmod_path"); +export const checkFGModPath = callable<[], { exists: boolean }>("check_fgmod_path"); export const listInstalledGames = callable< [], { status: string; games: { appid: string; name: string }[] } >("list_installed_games"); +export const cleanupManagedGame = callable<[string], ApiResponse>("cleanup_managed_game"); + +export const getGameConfig = callable<[string], GameConfigResponse>("get_game_config"); + +export const saveGameConfig = callable< + [string, Record<string, string>, string | null, boolean, string | null], + GameConfigResponse +>("save_game_config"); + export const logError = callable<[string], void>("log_error"); export const getPathDefaults = callable< @@ -27,12 +28,6 @@ export const getPathDefaults = callable< { home: string; steam_common?: string } >("get_path_defaults"); -export const runManualPatch = callable< - [string], - { status: string; message?: string; output?: string } ->("manual_patch_directory"); +export const runManualPatch = callable<[string], ApiResponse>("manual_patch_directory"); -export const runManualUnpatch = callable< - [string], - { status: string; message?: string; output?: string } ->("manual_unpatch_directory"); +export const runManualUnpatch = callable<[string], ApiResponse>("manual_unpatch_directory"); |
