import type { BackupDetailModel, AddonData, BackupModel, Folder, } from "@/types/homeAssistant"; import kyClient from "./kyClient"; export function getFolders() { return kyClient.get("homeAssistant/folders").json(); } export function getAddons() { return kyClient.get("homeAssistant/addons").json(); } export function getBackups() { return kyClient.get("homeAssistant/backups").json(); } export function getBackupDetail(slug: string) { return kyClient.get(`homeAssistant/backup/${slug}`).json(); } export function uploadHomeAssistantBackup(slug: string) { return kyClient.post(`homeAssistant/backup/${slug}/upload`); } export function deleteHomeAssistantBackup(slug: string) { return kyClient.delete(`homeAssistant/backup/${slug}`); }