// This file is auto-generated by @hey-api/openapi-ts import type { Client, Options as Options2, TDataShape } from "./client"; import { client } from "./client.gen"; import type { BrowseFilesystemData, BrowseFilesystemResponses, CancelDoctorData, CancelDoctorErrors, CancelDoctorResponses, CreateBackupScheduleData, CreateBackupScheduleResponses, CreateNotificationDestinationData, CreateNotificationDestinationResponses, CreateRepositoryData, CreateRepositoryResponses, CreateVolumeData, CreateVolumeResponses, DeleteBackupScheduleData, DeleteBackupScheduleResponses, DeleteNotificationDestinationData, DeleteNotificationDestinationErrors, DeleteNotificationDestinationResponses, DeleteRepositoryData, DeleteRepositoryResponses, DeleteSnapshotData, DeleteSnapshotResponses, DeleteSnapshotsData, DeleteSnapshotsResponses, DeleteVolumeData, DeleteVolumeResponses, DownloadResticPasswordData, DownloadResticPasswordResponses, GetBackupScheduleData, GetBackupScheduleForVolumeData, GetBackupScheduleForVolumeResponses, GetBackupScheduleResponses, GetMirrorCompatibilityData, GetMirrorCompatibilityResponses, GetNotificationDestinationData, GetNotificationDestinationErrors, GetNotificationDestinationResponses, GetRegistrationStatusData, GetRegistrationStatusResponses, GetRepositoryData, GetRepositoryResponses, GetScheduleMirrorsData, GetScheduleMirrorsResponses, GetScheduleNotificationsData, GetScheduleNotificationsResponses, GetSnapshotDetailsData, GetSnapshotDetailsResponses, GetStatusData, GetStatusResponses, GetSystemInfoData, GetSystemInfoResponses, GetUpdatesData, GetUpdatesResponses, GetUserDeletionImpactData, GetUserDeletionImpactResponses, GetVolumeData, GetVolumeErrors, GetVolumeResponses, RefreshSnapshotsData, RefreshSnapshotsResponses, HealthCheckVolumeData, HealthCheckVolumeErrors, HealthCheckVolumeResponses, ListBackupSchedulesData, ListBackupSchedulesResponses, ListFilesData, ListFilesResponses, ListNotificationDestinationsData, ListNotificationDestinationsResponses, ListRcloneRemotesData, ListRcloneRemotesResponses, ListRepositoriesData, ListRepositoriesResponses, ListSnapshotFilesData, ListSnapshotFilesResponses, ListSnapshotsData, ListSnapshotsResponses, ListVolumesData, ListVolumesResponses, MountVolumeData, MountVolumeResponses, ReorderBackupSchedulesData, ReorderBackupSchedulesResponses, RestoreSnapshotData, RestoreSnapshotResponses, RunBackupNowData, RunBackupNowResponses, RunForgetData, RunForgetResponses, SetRegistrationStatusData, SetRegistrationStatusResponses, StartDoctorData, StartDoctorErrors, StartDoctorResponses, StopBackupData, StopBackupErrors, StopBackupResponses, TagSnapshotsData, TagSnapshotsResponses, TestConnectionData, TestConnectionResponses, TestNotificationDestinationData, TestNotificationDestinationErrors, TestNotificationDestinationResponses, UnmountVolumeData, UnmountVolumeResponses, UpdateBackupScheduleData, UpdateBackupScheduleResponses, UpdateNotificationDestinationData, UpdateNotificationDestinationErrors, UpdateNotificationDestinationResponses, UpdateRepositoryData, UpdateRepositoryErrors, UpdateRepositoryResponses, UpdateScheduleMirrorsData, UpdateScheduleMirrorsResponses, UpdateScheduleNotificationsData, UpdateScheduleNotificationsResponses, UpdateVolumeData, UpdateVolumeErrors, UpdateVolumeResponses, } from "./types.gen"; export type Options = Options2< TData, ThrowOnError > & { /** * You can provide a client instance returned by `createClient()` instead of * individual options. This might be also useful if you want to implement a * custom client. */ client?: Client; /** * You can pass arbitrary values through the `meta` object. This can be * used to access values that aren't defined as part of the SDK function. */ meta?: Record; }; /** * Get authentication system status */ export const getStatus = (options?: Options) => (options?.client ?? client).get({ url: "/api/v1/auth/status", ...options, }); /** * Get impact of deleting a user */ export const getUserDeletionImpact = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/auth/deletion-impact/{userId}", ...options, }); /** * List all volumes */ export const listVolumes = (options?: Options) => (options?.client ?? client).get({ url: "/api/v1/volumes", ...options }); /** * Create a new volume */ export const createVolume = (options?: Options) => (options?.client ?? client).post({ url: "/api/v1/volumes", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * Test connection to backend */ export const testConnection = ( options?: Options, ) => (options?.client ?? client).post({ url: "/api/v1/volumes/test-connection", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * Delete a volume */ export const deleteVolume = (options: Options) => (options.client ?? client).delete({ url: "/api/v1/volumes/{id}", ...options, }); /** * Get a volume by name */ export const getVolume = (options: Options) => (options.client ?? client).get({ url: "/api/v1/volumes/{id}", ...options, }); /** * Update a volume's configuration */ export const updateVolume = (options: Options) => (options.client ?? client).put({ url: "/api/v1/volumes/{id}", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Mount a volume */ export const mountVolume = (options: Options) => (options.client ?? client).post({ url: "/api/v1/volumes/{id}/mount", ...options, }); /** * Unmount a volume */ export const unmountVolume = ( options: Options, ) => (options.client ?? client).post({ url: "/api/v1/volumes/{id}/unmount", ...options, }); /** * Perform a health check on a volume */ export const healthCheckVolume = ( options: Options, ) => (options.client ?? client).post({ url: "/api/v1/volumes/{id}/health-check", ...options, }); /** * List files in a volume directory */ export const listFiles = (options: Options) => (options.client ?? client).get({ url: "/api/v1/volumes/{id}/files", ...options, }); /** * Browse directories on the host filesystem */ export const browseFilesystem = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/volumes/filesystem/browse", ...options, }); /** * List all repositories */ export const listRepositories = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/repositories", ...options, }); /** * Create a new restic repository */ export const createRepository = ( options?: Options, ) => (options?.client ?? client).post({ url: "/api/v1/repositories", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * List all configured rclone remotes on the host system */ export const listRcloneRemotes = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/repositories/rclone-remotes", ...options, }); /** * Delete a repository */ export const deleteRepository = ( options: Options, ) => (options.client ?? client).delete({ url: "/api/v1/repositories/{id}", ...options, }); /** * Get a single repository by ID */ export const getRepository = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/repositories/{id}", ...options, }); /** * Update a repository's name or settings */ export const updateRepository = ( options: Options, ) => (options.client ?? client).patch({ url: "/api/v1/repositories/{id}", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Delete multiple snapshots from a repository */ export const deleteSnapshots = ( options: Options, ) => (options.client ?? client).delete({ url: "/api/v1/repositories/{id}/snapshots", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * List all snapshots in a repository */ export const listSnapshots = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/repositories/{id}/snapshots", ...options, }); /** * Delete a specific snapshot from a repository */ export const deleteSnapshot = ( options: Options, ) => (options.client ?? client).delete({ url: "/api/v1/repositories/{id}/snapshots/{snapshotId}", ...options, }); /** * Get details of a specific snapshot */ export const getSnapshotDetails = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/repositories/{id}/snapshots/{snapshotId}", ...options, }); /** * List files and directories in a snapshot */ export const listSnapshotFiles = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/repositories/{id}/snapshots/{snapshotId}/files", ...options, }); /** * Restore a snapshot to a target path on the filesystem */ export const restoreSnapshot = ( options: Options, ) => (options.client ?? client).post({ url: "/api/v1/repositories/{id}/restore", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Cancel a running doctor operation on a repository */ export const cancelDoctor = (options: Options) => (options.client ?? client).delete({ url: "/api/v1/repositories/{id}/doctor", ...options, }); /** * Start an asynchronous doctor operation on a repository to fix common issues (unlock, check, repair index). The operation runs in the background and sends results via SSE events. */ export const startDoctor = (options: Options) => (options.client ?? client).post({ url: "/api/v1/repositories/{id}/doctor", ...options, }); /** * Tag multiple snapshots in a repository */ export const tagSnapshots = (options: Options) => (options.client ?? client).post({ url: "/api/v1/repositories/{id}/snapshots/tag", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Clear snapshot cache and force refresh from repository */ export const refreshSnapshots = ( options: Options, ) => (options.client ?? client).post({ url: "/api/v1/repositories/{id}/snapshots/refresh", ...options, }); /** * List all backup schedules */ export const listBackupSchedules = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/backups", ...options, }); /** * Create a new backup schedule for a volume */ export const createBackupSchedule = ( options?: Options, ) => (options?.client ?? client).post({ url: "/api/v1/backups", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * Delete a backup schedule */ export const deleteBackupSchedule = ( options: Options, ) => (options.client ?? client).delete({ url: "/api/v1/backups/{scheduleId}", ...options, }); /** * Get a backup schedule by ID */ export const getBackupSchedule = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/backups/{scheduleId}", ...options, }); /** * Update a backup schedule */ export const updateBackupSchedule = ( options: Options, ) => (options.client ?? client).patch({ url: "/api/v1/backups/{scheduleId}", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Get a backup schedule for a specific volume */ export const getBackupScheduleForVolume = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/backups/volume/{volumeId}", ...options, }); /** * Trigger a backup immediately for a schedule */ export const runBackupNow = (options: Options) => (options.client ?? client).post({ url: "/api/v1/backups/{scheduleId}/run", ...options, }); /** * Stop a backup that is currently in progress */ export const stopBackup = (options: Options) => (options.client ?? client).post({ url: "/api/v1/backups/{scheduleId}/stop", ...options, }); /** * Manually apply retention policy to clean up old snapshots */ export const runForget = (options: Options) => (options.client ?? client).post({ url: "/api/v1/backups/{scheduleId}/forget", ...options, }); /** * Get notification assignments for a backup schedule */ export const getScheduleNotifications = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/backups/{scheduleId}/notifications", ...options, }); /** * Update notification assignments for a backup schedule */ export const updateScheduleNotifications = ( options: Options, ) => (options.client ?? client).put({ url: "/api/v1/backups/{scheduleId}/notifications", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Get mirror repository assignments for a backup schedule */ export const getScheduleMirrors = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/backups/{scheduleId}/mirrors", ...options, }); /** * Update mirror repository assignments for a backup schedule */ export const updateScheduleMirrors = ( options: Options, ) => (options.client ?? client).put({ url: "/api/v1/backups/{scheduleId}/mirrors", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Get mirror compatibility info for all repositories relative to a backup schedule's primary repository */ export const getMirrorCompatibility = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/backups/{scheduleId}/mirrors/compatibility", ...options, }); /** * Reorder backup schedules by providing an array of schedule IDs in the desired order */ export const reorderBackupSchedules = ( options?: Options, ) => (options?.client ?? client).post({ url: "/api/v1/backups/reorder", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * List all notification destinations */ export const listNotificationDestinations = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/notifications/destinations", ...options, }); /** * Create a new notification destination */ export const createNotificationDestination = ( options?: Options, ) => (options?.client ?? client).post({ url: "/api/v1/notifications/destinations", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * Delete a notification destination */ export const deleteNotificationDestination = ( options: Options, ) => (options.client ?? client).delete< DeleteNotificationDestinationResponses, DeleteNotificationDestinationErrors, ThrowOnError >({ url: "/api/v1/notifications/destinations/{id}", ...options }); /** * Get a notification destination by ID */ export const getNotificationDestination = ( options: Options, ) => (options.client ?? client).get({ url: "/api/v1/notifications/destinations/{id}", ...options, }); /** * Update a notification destination */ export const updateNotificationDestination = ( options: Options, ) => (options.client ?? client).patch< UpdateNotificationDestinationResponses, UpdateNotificationDestinationErrors, ThrowOnError >({ url: "/api/v1/notifications/destinations/{id}", ...options, headers: { "Content-Type": "application/json", ...options.headers, }, }); /** * Test a notification destination by sending a test message */ export const testNotificationDestination = ( options: Options, ) => (options.client ?? client).post< TestNotificationDestinationResponses, TestNotificationDestinationErrors, ThrowOnError >({ url: "/api/v1/notifications/destinations/{id}/test", ...options }); /** * Get system information including available capabilities */ export const getSystemInfo = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/system/info", ...options, }); /** * Check for application updates from GitHub */ export const getUpdates = (options?: Options) => (options?.client ?? client).get({ url: "/api/v1/system/updates", ...options, }); /** * Get the current registration status for new users */ export const getRegistrationStatus = ( options?: Options, ) => (options?.client ?? client).get({ url: "/api/v1/system/registration-status", ...options, }); /** * Update the registration status for new users. Requires global admin role. */ export const setRegistrationStatus = ( options?: Options, ) => (options?.client ?? client).put({ url: "/api/v1/system/registration-status", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); /** * Download the organization's Restic password for backup recovery. Requires organization owner or admin role and password re-authentication. */ export const downloadResticPassword = ( options?: Options, ) => (options?.client ?? client).post({ url: "/api/v1/system/restic-password", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, });