diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 12:05:10 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 12:05:10 -0400 |
| commit | 4104e28053fc03b3875958c7bf56ec6fbc5aab84 (patch) | |
| tree | 1095b374ab453ce98ab35dfbfa79d810ad99fdab /src/api | |
| parent | 6489f2273fc246fcca25e95d913e60ea214e0d31 (diff) | |
| download | decky-lsfg-vk-4104e28053fc03b3875958c7bf56ec6fbc5aab84.tar.gz decky-lsfg-vk-4104e28053fc03b3875958c7bf56ec6fbc5aab84.zip | |
initial prof selector and creator ui
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/lsfgApi.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/api/lsfgApi.ts b/src/api/lsfgApi.ts index 8d14da6..6c535af 100644 --- a/src/api/lsfgApi.ts +++ b/src/api/lsfgApi.ts @@ -55,6 +55,8 @@ export interface ConfigSchemaResult { field_names: string[]; field_types: Record<string, string>; defaults: ConfigurationData; + profiles?: string[]; + current_profile?: string; } export interface UpdateCheckResult { @@ -87,6 +89,22 @@ export interface FileContentResult { error?: string; } +// Profile management interfaces +export interface ProfilesResult { + success: boolean; + profiles?: string[]; + current_profile?: string; + message?: string; + error?: string; +} + +export interface ProfileResult { + success: boolean; + profile_name?: string; + message?: string; + error?: string; +} + // API functions export const installLsfgVk = callable<[], InstallationResult>("install_lsfg_vk"); export const uninstallLsfgVk = callable<[], InstallationResult>("uninstall_lsfg_vk"); @@ -113,3 +131,11 @@ export const updateLsfgConfigFromObject = async (config: ConfigurationData): Pro // Self-updater API functions export const checkForPluginUpdate = callable<[], UpdateCheckResult>("check_for_plugin_update"); export const downloadPluginUpdate = callable<[string], UpdateDownloadResult>("download_plugin_update"); + +// Profile management API functions +export const getProfiles = callable<[], ProfilesResult>("get_profiles"); +export const createProfile = callable<[string, string?], ProfileResult>("create_profile"); +export const deleteProfile = callable<[string], ProfileResult>("delete_profile"); +export const renameProfile = callable<[string, string], ProfileResult>("rename_profile"); +export const setCurrentProfile = callable<[string], ProfileResult>("set_current_profile"); +export const updateProfileConfig = callable<[string, ConfigurationData], ConfigUpdateResult>("update_profile_config"); |
