diff --git a/app/client/api-client/@tanstack/react-query.gen.ts b/app/client/api-client/@tanstack/react-query.gen.ts index 182d913b..1b730c22 100644 --- a/app/client/api-client/@tanstack/react-query.gen.ts +++ b/app/client/api-client/@tanstack/react-query.gen.ts @@ -4,8 +4,8 @@ import { type DefaultError, type InfiniteData, infiniteQueryOptions, queryOptions, type UseMutationOptions } from '@tanstack/react-query'; import { client } from '../client.gen'; -import { browseFilesystem, cancelDoctor, createBackupSchedule, createNotificationDestination, createRepository, createVolume, deleteBackupSchedule, deleteNotificationDestination, deleteRepository, deleteSnapshot, deleteSnapshots, deleteSsoInvitation, deleteSsoProvider, deleteUserAccount, deleteVolume, devPanelExec, downloadResticPassword, dumpSnapshot, getAdminUsers, getBackupProgress, getBackupSchedule, getBackupScheduleForVolume, getDevPanel, getMirrorCompatibility, getNotificationDestination, getOrgMembers, getPublicSsoProviders, getRegistrationStatus, getRepository, getRepositoryStats, getScheduleMirrors, getScheduleNotifications, getSnapshotDetails, getSsoSettings, getStatus, getSystemInfo, getUpdates, getUserDeletionImpact, getVolume, healthCheckVolume, listBackupSchedules, listFiles, listNotificationDestinations, listRcloneRemotes, listRepositories, listSnapshotFiles, listSnapshots, listVolumes, mountVolume, type Options, refreshSnapshots, removeOrgMember, reorderBackupSchedules, restoreSnapshot, runBackupNow, runForget, setRegistrationStatus, startDoctor, stopBackup, tagSnapshots, testConnection, testNotificationDestination, unlockRepository, unmountVolume, updateBackupSchedule, updateMemberRole, updateNotificationDestination, updateRepository, updateScheduleMirrors, updateScheduleNotifications, updateSsoProviderAutoLinking, updateVolume } from '../sdk.gen'; -import type { BrowseFilesystemData, BrowseFilesystemResponse, CancelDoctorData, CancelDoctorResponse, CreateBackupScheduleData, CreateBackupScheduleResponse, CreateNotificationDestinationData, CreateNotificationDestinationResponse, CreateRepositoryData, CreateRepositoryResponse, CreateVolumeData, CreateVolumeResponse, DeleteBackupScheduleData, DeleteBackupScheduleResponse, DeleteNotificationDestinationData, DeleteNotificationDestinationResponse, DeleteRepositoryData, DeleteRepositoryResponse, DeleteSnapshotData, DeleteSnapshotResponse, DeleteSnapshotsData, DeleteSnapshotsResponse, DeleteSsoInvitationData, DeleteSsoProviderData, DeleteUserAccountData, DeleteVolumeData, DeleteVolumeResponse, DevPanelExecData, DevPanelExecResponse, DownloadResticPasswordData, DownloadResticPasswordResponse, DumpSnapshotData, DumpSnapshotResponse, GetAdminUsersData, GetAdminUsersResponse, GetBackupProgressData, GetBackupProgressResponse, GetBackupScheduleData, GetBackupScheduleForVolumeData, GetBackupScheduleForVolumeResponse, GetBackupScheduleResponse, GetDevPanelData, GetDevPanelResponse, GetMirrorCompatibilityData, GetMirrorCompatibilityResponse, GetNotificationDestinationData, GetNotificationDestinationResponse, GetOrgMembersData, GetOrgMembersResponse, GetPublicSsoProvidersData, GetPublicSsoProvidersResponse, GetRegistrationStatusData, GetRegistrationStatusResponse, GetRepositoryData, GetRepositoryResponse, GetRepositoryStatsData, GetRepositoryStatsResponse, GetScheduleMirrorsData, GetScheduleMirrorsResponse, GetScheduleNotificationsData, GetScheduleNotificationsResponse, GetSnapshotDetailsData, GetSnapshotDetailsResponse, GetSsoSettingsData, GetSsoSettingsResponse, GetStatusData, GetStatusResponse, GetSystemInfoData, GetSystemInfoResponse, GetUpdatesData, GetUpdatesResponse, GetUserDeletionImpactData, GetUserDeletionImpactResponse, GetVolumeData, GetVolumeResponse, HealthCheckVolumeData, HealthCheckVolumeResponse, ListBackupSchedulesData, ListBackupSchedulesResponse, ListFilesData, ListFilesResponse, ListNotificationDestinationsData, ListNotificationDestinationsResponse, ListRcloneRemotesData, ListRcloneRemotesResponse, ListRepositoriesData, ListRepositoriesResponse, ListSnapshotFilesData, ListSnapshotFilesResponse, ListSnapshotsData, ListSnapshotsResponse, ListVolumesData, ListVolumesResponse, MountVolumeData, MountVolumeResponse, RefreshSnapshotsData, RefreshSnapshotsResponse, RemoveOrgMemberData, ReorderBackupSchedulesData, ReorderBackupSchedulesResponse, RestoreSnapshotData, RestoreSnapshotResponse, RunBackupNowData, RunBackupNowResponse, RunForgetData, RunForgetResponse, SetRegistrationStatusData, SetRegistrationStatusResponse, StartDoctorData, StartDoctorResponse, StopBackupData, StopBackupResponse, TagSnapshotsData, TagSnapshotsResponse, TestConnectionData, TestConnectionResponse, TestNotificationDestinationData, TestNotificationDestinationResponse, UnlockRepositoryData, UnlockRepositoryResponse, UnmountVolumeData, UnmountVolumeResponse, UpdateBackupScheduleData, UpdateBackupScheduleResponse, UpdateMemberRoleData, UpdateNotificationDestinationData, UpdateNotificationDestinationResponse, UpdateRepositoryData, UpdateRepositoryResponse, UpdateScheduleMirrorsData, UpdateScheduleMirrorsResponse, UpdateScheduleNotificationsData, UpdateScheduleNotificationsResponse, UpdateSsoProviderAutoLinkingData, UpdateVolumeData, UpdateVolumeResponse } from '../types.gen'; +import { browseFilesystem, cancelDoctor, createBackupSchedule, createNotificationDestination, createRepository, createVolume, deleteBackupSchedule, deleteNotificationDestination, deleteRepository, deleteSnapshot, deleteSnapshots, deleteSsoInvitation, deleteSsoProvider, deleteUserAccount, deleteVolume, downloadResticPassword, dumpSnapshot, getAdminUsers, getBackupProgress, getBackupSchedule, getBackupScheduleForVolume, getDevPanel, getMirrorCompatibility, getNotificationDestination, getOrgMembers, getPublicSsoProviders, getRegistrationStatus, getRepository, getRepositoryStats, getScheduleMirrors, getScheduleNotifications, getSnapshotDetails, getSsoSettings, getStatus, getSystemInfo, getUpdates, getUserDeletionImpact, getVolume, healthCheckVolume, listBackupSchedules, listFiles, listNotificationDestinations, listRcloneRemotes, listRepositories, listSnapshotFiles, listSnapshots, listVolumes, mountVolume, type Options, refreshSnapshots, removeOrgMember, reorderBackupSchedules, restoreSnapshot, runBackupNow, runForget, setRegistrationStatus, startDoctor, stopBackup, tagSnapshots, testConnection, testNotificationDestination, unlockRepository, unmountVolume, updateBackupSchedule, updateMemberRole, updateNotificationDestination, updateRepository, updateScheduleMirrors, updateScheduleNotifications, updateSsoProviderAutoLinking, updateVolume } from '../sdk.gen'; +import type { BrowseFilesystemData, BrowseFilesystemResponse, CancelDoctorData, CancelDoctorResponse, CreateBackupScheduleData, CreateBackupScheduleResponse, CreateNotificationDestinationData, CreateNotificationDestinationResponse, CreateRepositoryData, CreateRepositoryResponse, CreateVolumeData, CreateVolumeResponse, DeleteBackupScheduleData, DeleteBackupScheduleResponse, DeleteNotificationDestinationData, DeleteNotificationDestinationResponse, DeleteRepositoryData, DeleteRepositoryResponse, DeleteSnapshotData, DeleteSnapshotResponse, DeleteSnapshotsData, DeleteSnapshotsResponse, DeleteSsoInvitationData, DeleteSsoProviderData, DeleteUserAccountData, DeleteVolumeData, DeleteVolumeResponse, DownloadResticPasswordData, DownloadResticPasswordResponse, DumpSnapshotData, DumpSnapshotResponse, GetAdminUsersData, GetAdminUsersResponse, GetBackupProgressData, GetBackupProgressResponse, GetBackupScheduleData, GetBackupScheduleForVolumeData, GetBackupScheduleForVolumeResponse, GetBackupScheduleResponse, GetDevPanelData, GetDevPanelResponse, GetMirrorCompatibilityData, GetMirrorCompatibilityResponse, GetNotificationDestinationData, GetNotificationDestinationResponse, GetOrgMembersData, GetOrgMembersResponse, GetPublicSsoProvidersData, GetPublicSsoProvidersResponse, GetRegistrationStatusData, GetRegistrationStatusResponse, GetRepositoryData, GetRepositoryResponse, GetRepositoryStatsData, GetRepositoryStatsResponse, GetScheduleMirrorsData, GetScheduleMirrorsResponse, GetScheduleNotificationsData, GetScheduleNotificationsResponse, GetSnapshotDetailsData, GetSnapshotDetailsResponse, GetSsoSettingsData, GetSsoSettingsResponse, GetStatusData, GetStatusResponse, GetSystemInfoData, GetSystemInfoResponse, GetUpdatesData, GetUpdatesResponse, GetUserDeletionImpactData, GetUserDeletionImpactResponse, GetVolumeData, GetVolumeResponse, HealthCheckVolumeData, HealthCheckVolumeResponse, ListBackupSchedulesData, ListBackupSchedulesResponse, ListFilesData, ListFilesResponse, ListNotificationDestinationsData, ListNotificationDestinationsResponse, ListRcloneRemotesData, ListRcloneRemotesResponse, ListRepositoriesData, ListRepositoriesResponse, ListSnapshotFilesData, ListSnapshotFilesResponse, ListSnapshotsData, ListSnapshotsResponse, ListVolumesData, ListVolumesResponse, MountVolumeData, MountVolumeResponse, RefreshSnapshotsData, RefreshSnapshotsResponse, RemoveOrgMemberData, ReorderBackupSchedulesData, ReorderBackupSchedulesResponse, RestoreSnapshotData, RestoreSnapshotResponse, RunBackupNowData, RunBackupNowResponse, RunForgetData, RunForgetResponse, SetRegistrationStatusData, SetRegistrationStatusResponse, StartDoctorData, StartDoctorResponse, StopBackupData, StopBackupResponse, TagSnapshotsData, TagSnapshotsResponse, TestConnectionData, TestConnectionResponse, TestNotificationDestinationData, TestNotificationDestinationResponse, UnlockRepositoryData, UnlockRepositoryResponse, UnmountVolumeData, UnmountVolumeResponse, UpdateBackupScheduleData, UpdateBackupScheduleResponse, UpdateMemberRoleData, UpdateNotificationDestinationData, UpdateNotificationDestinationResponse, UpdateRepositoryData, UpdateRepositoryResponse, UpdateScheduleMirrorsData, UpdateScheduleMirrorsResponse, UpdateScheduleNotificationsData, UpdateScheduleNotificationsResponse, UpdateSsoProviderAutoLinkingData, UpdateVolumeData, UpdateVolumeResponse } from '../types.gen'; export type QueryKey = [ Pick & { @@ -58,93 +58,6 @@ export const getStatusOptions = (options?: Options) => queryOptio queryKey: getStatusQueryKey(options) }); -export const getPublicSsoProvidersQueryKey = (options?: Options) => createQueryKey('getPublicSsoProviders', options); - -/** - * Get public SSO providers for the instance - */ -export const getPublicSsoProvidersOptions = (options?: Options) => queryOptions>({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await getPublicSsoProviders({ - ...options, - ...queryKey[0], - signal, - throwOnError: true - }); - return data; - }, - queryKey: getPublicSsoProvidersQueryKey(options) -}); - -export const getSsoSettingsQueryKey = (options?: Options) => createQueryKey('getSsoSettings', options); - -/** - * Get SSO providers and invitations for the active organization - */ -export const getSsoSettingsOptions = (options?: Options) => queryOptions>({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await getSsoSettings({ - ...options, - ...queryKey[0], - signal, - throwOnError: true - }); - return data; - }, - queryKey: getSsoSettingsQueryKey(options) -}); - -/** - * Delete an SSO provider - */ -export const deleteSsoProviderMutation = (options?: Partial>): UseMutationOptions> => { - const mutationOptions: UseMutationOptions> = { - mutationFn: async (fnOptions) => { - const { data } = await deleteSsoProvider({ - ...options, - ...fnOptions, - throwOnError: true - }); - return data; - } - }; - return mutationOptions; -}; - -/** - * Update whether SSO sign-in can auto-link existing accounts by email - */ -export const updateSsoProviderAutoLinkingMutation = (options?: Partial>): UseMutationOptions> => { - const mutationOptions: UseMutationOptions> = { - mutationFn: async (fnOptions) => { - const { data } = await updateSsoProviderAutoLinking({ - ...options, - ...fnOptions, - throwOnError: true - }); - return data; - } - }; - return mutationOptions; -}; - -/** - * Delete an SSO invitation - */ -export const deleteSsoInvitationMutation = (options?: Partial>): UseMutationOptions> => { - const mutationOptions: UseMutationOptions> = { - mutationFn: async (fnOptions) => { - const { data } = await deleteSsoInvitation({ - ...options, - ...fnOptions, - throwOnError: true - }); - return data; - } - }; - return mutationOptions; -}; - export const getAdminUsersQueryKey = (options?: Options) => createQueryKey('getAdminUsers', options); /** @@ -250,6 +163,93 @@ export const removeOrgMemberMutation = (options?: Partial) => createQueryKey('getPublicSsoProviders', options); + +/** + * Get public SSO providers for the instance + */ +export const getPublicSsoProvidersOptions = (options?: Options) => queryOptions>({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await getPublicSsoProviders({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: getPublicSsoProvidersQueryKey(options) +}); + +export const getSsoSettingsQueryKey = (options?: Options) => createQueryKey('getSsoSettings', options); + +/** + * Get SSO providers and invitations for the active organization + */ +export const getSsoSettingsOptions = (options?: Options) => queryOptions>({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await getSsoSettings({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: getSsoSettingsQueryKey(options) +}); + +/** + * Delete an SSO provider + */ +export const deleteSsoProviderMutation = (options?: Partial>): UseMutationOptions> => { + const mutationOptions: UseMutationOptions> = { + mutationFn: async (fnOptions) => { + const { data } = await deleteSsoProvider({ + ...options, + ...fnOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +/** + * Update whether SSO sign-in can auto-link existing accounts by email + */ +export const updateSsoProviderAutoLinkingMutation = (options?: Partial>): UseMutationOptions> => { + const mutationOptions: UseMutationOptions> = { + mutationFn: async (fnOptions) => { + const { data } = await updateSsoProviderAutoLinking({ + ...options, + ...fnOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +/** + * Delete an SSO invitation + */ +export const deleteSsoInvitationMutation = (options?: Partial>): UseMutationOptions> => { + const mutationOptions: UseMutationOptions> = { + mutationFn: async (fnOptions) => { + const { data } = await deleteSsoInvitation({ + ...options, + ...fnOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + export const listVolumesQueryKey = (options?: Options) => createQueryKey('listVolumes', options); /** @@ -855,23 +855,6 @@ export const tagSnapshotsMutation = (options?: Partial return mutationOptions; }; -/** - * Execute a restic command against a repository (dev panel only) - */ -export const devPanelExecMutation = (options?: Partial>): UseMutationOptions> => { - const mutationOptions: UseMutationOptions> = { - mutationFn: async (fnOptions) => { - const { data } = await devPanelExec({ - ...options, - ...fnOptions, - throwOnError: true - }); - return data; - } - }; - return mutationOptions; -}; - export const listBackupSchedulesQueryKey = (options?: Options) => createQueryKey('listBackupSchedules', options); /** diff --git a/app/client/api-client/client/types.gen.ts b/app/client/api-client/client/types.gen.ts index 92f86372..701c3630 100644 --- a/app/client/api-client/client/types.gen.ts +++ b/app/client/api-client/client/types.gen.ts @@ -191,7 +191,7 @@ export type Client = CoreClient */ export type CreateClientConfig = ( override?: Config, -) => Config & T>; +) => Config & T> | Promise & T>>; export interface TDataShape { body?: unknown; diff --git a/app/client/api-client/core/params.gen.ts b/app/client/api-client/core/params.gen.ts index 5c5cc4a3..598f2b72 100644 --- a/app/client/api-client/core/params.gen.ts +++ b/app/client/api-client/core/params.gen.ts @@ -97,7 +97,7 @@ interface Params { const stripEmptySlots = (params: Params) => { for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === 'object' && !Object.keys(value).length) { + if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) { delete params[slot as Slot]; } } diff --git a/app/client/api-client/sdk.gen.ts b/app/client/api-client/sdk.gen.ts index 3f2d16ee..efddf861 100644 --- a/app/client/api-client/sdk.gen.ts +++ b/app/client/api-client/sdk.gen.ts @@ -24,38 +24,6 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v1/auth/status', ...options }); -/** - * Get public SSO providers for the instance - */ -export const getPublicSsoProviders = (options?: Options) => (options?.client ?? client).get({ url: '/api/v1/auth/sso-providers', ...options }); - -/** - * Get SSO providers and invitations for the active organization - */ -export const getSsoSettings = (options?: Options) => (options?.client ?? client).get({ url: '/api/v1/auth/sso-settings', ...options }); - -/** - * Delete an SSO provider - */ -export const deleteSsoProvider = (options: Options) => (options.client ?? client).delete({ url: '/api/v1/auth/sso-providers/{providerId}', ...options }); - -/** - * Update whether SSO sign-in can auto-link existing accounts by email - */ -export const updateSsoProviderAutoLinking = (options: Options) => (options.client ?? client).patch({ - url: '/api/v1/auth/sso-providers/{providerId}/auto-linking', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); - -/** - * Delete an SSO invitation - */ -export const deleteSsoInvitation = (options: Options) => (options.client ?? client).delete({ url: '/api/v1/auth/sso-invitations/{invitationId}', ...options }); - /** * List admin users for settings management */ @@ -93,6 +61,38 @@ export const updateMemberRole = (options: */ export const removeOrgMember = (options: Options) => (options.client ?? client).delete({ url: '/api/v1/auth/org-members/{memberId}', ...options }); +/** + * Get public SSO providers for the instance + */ +export const getPublicSsoProviders = (options?: Options) => (options?.client ?? client).get({ url: '/api/v1/auth/sso-providers', ...options }); + +/** + * Get SSO providers and invitations for the active organization + */ +export const getSsoSettings = (options?: Options) => (options?.client ?? client).get({ url: '/api/v1/auth/sso-settings', ...options }); + +/** + * Delete an SSO provider + */ +export const deleteSsoProvider = (options: Options) => (options.client ?? client).delete({ url: '/api/v1/auth/sso-providers/{providerId}', ...options }); + +/** + * Update whether SSO sign-in can auto-link existing accounts by email + */ +export const updateSsoProviderAutoLinking = (options: Options) => (options.client ?? client).patch({ + url: '/api/v1/auth/sso-providers/{providerId}/auto-linking', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete an SSO invitation + */ +export const deleteSsoInvitation = (options: Options) => (options.client ?? client).delete({ url: '/api/v1/auth/sso-invitations/{invitationId}', ...options }); + /** * List all volumes */ @@ -101,24 +101,24 @@ export const listVolumes = (options?: Opti /** * Create a new volume */ -export const createVolume = (options?: Options) => (options?.client ?? client).post({ +export const createVolume = (options: Options) => (options.client ?? client).post({ url: '/api/v1/volumes', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); /** * Test connection to backend */ -export const testConnection = (options?: Options) => (options?.client ?? client).post({ +export const testConnection = (options: Options) => (options.client ?? client).post({ url: '/api/v1/volumes/test-connection', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); @@ -177,12 +177,12 @@ export const listRepositories = (options?: /** * Create a new restic repository */ -export const createRepository = (options?: Options) => (options?.client ?? client).post({ +export const createRepository = (options: Options) => (options.client ?? client).post({ url: '/api/v1/repositories', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); @@ -319,12 +319,12 @@ export const listBackupSchedules = (option /** * Create a new backup schedule for a volume */ -export const createBackupSchedule = (options?: Options) => (options?.client ?? client).post({ +export const createBackupSchedule = (options: Options) => (options.client ?? client).post({ url: '/api/v1/backups', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); @@ -412,12 +412,12 @@ export const getMirrorCompatibility = (opt /** * Reorder backup schedules by providing an array of schedule short IDs in the desired order */ -export const reorderBackupSchedules = (options?: Options) => (options?.client ?? client).post({ +export const reorderBackupSchedules = (options: Options) => (options.client ?? client).post({ url: '/api/v1/backups/reorder', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); @@ -434,12 +434,12 @@ export const listNotificationDestinations = (options?: Options) => (options?.client ?? client).post({ +export const createNotificationDestination = (options: Options) => (options.client ?? client).post({ url: '/api/v1/notifications/destinations', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); @@ -488,24 +488,24 @@ export const getRegistrationStatus = (opti /** * Update the registration status for new users. Requires global admin role. */ -export const setRegistrationStatus = (options?: Options) => (options?.client ?? client).put({ +export const setRegistrationStatus = (options: Options) => (options.client ?? client).put({ url: '/api/v1/system/registration-status', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...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({ +export const downloadResticPassword = (options: Options) => (options.client ?? client).post({ url: '/api/v1/system/restic-password', ...options, headers: { 'Content-Type': 'application/json', - ...options?.headers + ...options.headers } }); diff --git a/app/client/api-client/types.gen.ts b/app/client/api-client/types.gen.ts index b00326a0..f5642b0a 100644 --- a/app/client/api-client/types.gen.ts +++ b/app/client/api-client/types.gen.ts @@ -2,2376 +2,2458 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: 'http://localhost:4096' | (string & {}); + baseUrl: "http://localhost:4096" | (string & {}); }; export type GetStatusData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/auth/status'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/auth/status"; }; export type GetStatusResponses = { - /** - * Authentication system status - */ - 200: { - hasUsers: boolean; - }; + /** + * Authentication system status + */ + 200: { + hasUsers: boolean; + }; }; export type GetStatusResponse = GetStatusResponses[keyof GetStatusResponses]; -export type GetPublicSsoProvidersData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/auth/sso-providers'; -}; - -export type GetPublicSsoProvidersResponses = { - /** - * List of public SSO providers - */ - 200: { - providers: Array<{ - organizationSlug: string; - providerId: string; - }>; - }; -}; - -export type GetPublicSsoProvidersResponse = GetPublicSsoProvidersResponses[keyof GetPublicSsoProvidersResponses]; - -export type GetSsoSettingsData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/auth/sso-settings'; -}; - -export type GetSsoSettingsResponses = { - /** - * SSO settings for the active organization - */ - 200: { - invitations: Array<{ - email: string; - expiresAt: string; - id: string; - role: string; - status: string; - }>; - providers: Array<{ - autoLinkMatchingEmails: boolean; - domain: string; - issuer: string; - organizationId: string | null; - providerId: string; - type: string; - }>; - }; -}; - -export type GetSsoSettingsResponse = GetSsoSettingsResponses[keyof GetSsoSettingsResponses]; - -export type DeleteSsoProviderData = { - body?: never; - path: { - providerId: string; - }; - query?: never; - url: '/api/v1/auth/sso-providers/{providerId}'; -}; - -export type DeleteSsoProviderErrors = { - /** - * Forbidden - */ - 403: unknown; - /** - * Provider not found - */ - 404: unknown; -}; - -export type DeleteSsoProviderResponses = { - /** - * SSO provider deleted successfully - */ - 200: unknown; -}; - -export type UpdateSsoProviderAutoLinkingData = { - body?: { - enabled: boolean; - }; - path: { - providerId: string; - }; - query?: never; - url: '/api/v1/auth/sso-providers/{providerId}/auto-linking'; -}; - -export type UpdateSsoProviderAutoLinkingErrors = { - /** - * Forbidden - */ - 403: unknown; - /** - * Provider not found - */ - 404: unknown; -}; - -export type UpdateSsoProviderAutoLinkingResponses = { - /** - * SSO provider auto-linking setting updated successfully - */ - 200: unknown; -}; - -export type DeleteSsoInvitationData = { - body?: never; - path: { - invitationId: string; - }; - query?: never; - url: '/api/v1/auth/sso-invitations/{invitationId}'; -}; - -export type DeleteSsoInvitationErrors = { - /** - * Forbidden - */ - 403: unknown; -}; - -export type DeleteSsoInvitationResponses = { - /** - * SSO invitation deleted successfully - */ - 200: unknown; -}; - export type GetAdminUsersData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/auth/admin-users'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/auth/admin-users"; }; export type GetAdminUsersResponses = { - /** - * List of users with roles and status - */ - 200: { - total: number; - users: Array<{ - accounts: Array<{ - id: string; - providerId: string; - }>; - banned: boolean; - email: string; - id: string; - name: string | null; - role: string; - }>; - }; + /** + * List of users with roles and status + */ + 200: { + total: number; + users: Array<{ + accounts: Array<{ + id: string; + providerId: string; + }>; + banned: boolean; + email: string; + id: string; + name: string | null; + role: string; + }>; + }; }; export type GetAdminUsersResponse = GetAdminUsersResponses[keyof GetAdminUsersResponses]; export type DeleteUserAccountData = { - body?: never; - path: { - userId: string; - accountId: string; - }; - query?: never; - url: '/api/v1/auth/admin-users/{userId}/accounts/{accountId}'; + body?: never; + path: { + userId: string; + accountId: string; + }; + query?: never; + url: "/api/v1/auth/admin-users/{userId}/accounts/{accountId}"; }; export type DeleteUserAccountErrors = { - /** - * Forbidden - */ - 403: unknown; - /** - * Cannot delete the last account - */ - 409: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Cannot delete the last account + */ + 409: unknown; }; export type DeleteUserAccountResponses = { - /** - * Account deleted successfully - */ - 200: unknown; + /** + * Account deleted successfully + */ + 200: unknown; }; export type GetUserDeletionImpactData = { - body?: never; - path: { - userId: string; - }; - query?: never; - url: '/api/v1/auth/deletion-impact/{userId}'; + body?: never; + path: { + userId: string; + }; + query?: never; + url: "/api/v1/auth/deletion-impact/{userId}"; }; export type GetUserDeletionImpactResponses = { - /** - * List of organizations and resources to be deleted - */ - 200: { - organizations: Array<{ - id: string; - name: string; - resources: { - backupSchedulesCount: number; - repositoriesCount: number; - volumesCount: number; - }; - }>; - }; + /** + * List of organizations and resources to be deleted + */ + 200: { + organizations: Array<{ + id: string; + name: string; + resources: { + backupSchedulesCount: number; + repositoriesCount: number; + volumesCount: number; + }; + }>; + }; }; export type GetUserDeletionImpactResponse = GetUserDeletionImpactResponses[keyof GetUserDeletionImpactResponses]; export type GetOrgMembersData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/auth/org-members'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/auth/org-members"; }; export type GetOrgMembersResponses = { - /** - * List of organization members - */ - 200: { - members: Array<{ - createdAt: string; - id: string; - role: string; - user: { - email: string; - name: string | null; - }; - userId: string; - }>; - }; + /** + * List of organization members + */ + 200: { + members: Array<{ + createdAt: string; + id: string; + role: string; + user: { + email: string; + name: string | null; + }; + userId: string; + }>; + }; }; export type GetOrgMembersResponse = GetOrgMembersResponses[keyof GetOrgMembersResponses]; export type UpdateMemberRoleData = { - body?: { - role: 'admin' | 'member'; - }; - path: { - memberId: string; - }; - query?: never; - url: '/api/v1/auth/org-members/{memberId}/role'; + body: { + role: "admin" | "member"; + }; + path: { + memberId: string; + }; + query?: never; + url: "/api/v1/auth/org-members/{memberId}/role"; }; export type UpdateMemberRoleErrors = { - /** - * Forbidden - */ - 403: unknown; - /** - * Member not found - */ - 404: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Member not found + */ + 404: unknown; }; export type UpdateMemberRoleResponses = { - /** - * Member role updated successfully - */ - 200: unknown; + /** + * Member role updated successfully + */ + 200: unknown; }; export type RemoveOrgMemberData = { - body?: never; - path: { - memberId: string; - }; - query?: never; - url: '/api/v1/auth/org-members/{memberId}'; + body?: never; + path: { + memberId: string; + }; + query?: never; + url: "/api/v1/auth/org-members/{memberId}"; }; export type RemoveOrgMemberErrors = { - /** - * Forbidden - */ - 403: unknown; - /** - * Member not found - */ - 404: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Member not found + */ + 404: unknown; }; export type RemoveOrgMemberResponses = { - /** - * Member removed successfully - */ - 200: unknown; + /** + * Member removed successfully + */ + 200: unknown; +}; + +export type GetPublicSsoProvidersData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/auth/sso-providers"; +}; + +export type GetPublicSsoProvidersResponses = { + /** + * List of public SSO providers + */ + 200: { + providers: Array<{ + organizationSlug: string; + providerId: string; + }>; + }; +}; + +export type GetPublicSsoProvidersResponse = GetPublicSsoProvidersResponses[keyof GetPublicSsoProvidersResponses]; + +export type GetSsoSettingsData = { + body?: never; + path?: never; + query?: never; + url: "/api/v1/auth/sso-settings"; +}; + +export type GetSsoSettingsResponses = { + /** + * SSO settings for the active organization + */ + 200: { + invitations: Array<{ + email: string; + expiresAt: string; + id: string; + role: string; + status: string; + }>; + providers: Array<{ + autoLinkMatchingEmails: boolean; + domain: string; + issuer: string; + organizationId: string | null; + providerId: string; + type: string; + }>; + }; +}; + +export type GetSsoSettingsResponse = GetSsoSettingsResponses[keyof GetSsoSettingsResponses]; + +export type DeleteSsoProviderData = { + body?: never; + path: { + providerId: string; + }; + query?: never; + url: "/api/v1/auth/sso-providers/{providerId}"; +}; + +export type DeleteSsoProviderErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Provider not found + */ + 404: unknown; +}; + +export type DeleteSsoProviderResponses = { + /** + * SSO provider deleted successfully + */ + 200: unknown; +}; + +export type UpdateSsoProviderAutoLinkingData = { + body: { + enabled: boolean; + }; + path: { + providerId: string; + }; + query?: never; + url: "/api/v1/auth/sso-providers/{providerId}/auto-linking"; +}; + +export type UpdateSsoProviderAutoLinkingErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Provider not found + */ + 404: unknown; +}; + +export type UpdateSsoProviderAutoLinkingResponses = { + /** + * SSO provider auto-linking setting updated successfully + */ + 200: unknown; +}; + +export type DeleteSsoInvitationData = { + body?: never; + path: { + invitationId: string; + }; + query?: never; + url: "/api/v1/auth/sso-invitations/{invitationId}"; +}; + +export type DeleteSsoInvitationErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type DeleteSsoInvitationResponses = { + /** + * SSO invitation deleted successfully + */ + 200: unknown; }; export type ListVolumesData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/volumes'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/volumes"; }; export type ListVolumesResponses = { - /** - * A list of volumes - */ - 200: Array<{ - autoRemount: boolean; - config: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - createdAt: number; - id: number; - lastError: string | null; - lastHealthCheck: number; - name: string; - shortId: string; - status: 'error' | 'mounted' | 'unmounted'; - type: 'directory' | 'nfs' | 'rclone' | 'sftp' | 'smb' | 'webdav'; - updatedAt: number; - }>; + /** + * A list of volumes + */ + 200: Array<{ + autoRemount: boolean; + config: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + createdAt: number; + id: number; + lastError: string | null; + lastHealthCheck: number; + name: string; + shortId: string; + status: "error" | "mounted" | "unmounted"; + type: "directory" | "nfs" | "rclone" | "sftp" | "smb" | "webdav"; + updatedAt: number; + }>; }; export type ListVolumesResponse = ListVolumesResponses[keyof ListVolumesResponses]; export type CreateVolumeData = { - body?: { - config: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - name: string; - }; - path?: never; - query?: never; - url: '/api/v1/volumes'; + body: { + config: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + name: string; + }; + path?: never; + query?: never; + url: "/api/v1/volumes"; }; export type CreateVolumeResponses = { - /** - * Volume created successfully - */ - 201: { - autoRemount: boolean; - config: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - createdAt: number; - id: number; - lastError: string | null; - lastHealthCheck: number; - name: string; - shortId: string; - status: 'error' | 'mounted' | 'unmounted'; - type: 'directory' | 'nfs' | 'rclone' | 'sftp' | 'smb' | 'webdav'; - updatedAt: number; - }; + /** + * Volume created successfully + */ + 201: { + autoRemount: boolean; + config: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + createdAt: number; + id: number; + lastError: string | null; + lastHealthCheck: number; + name: string; + shortId: string; + status: "error" | "mounted" | "unmounted"; + type: "directory" | "nfs" | "rclone" | "sftp" | "smb" | "webdav"; + updatedAt: number; + }; }; export type CreateVolumeResponse = CreateVolumeResponses[keyof CreateVolumeResponses]; export type TestConnectionData = { - body?: { - config: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - }; - path?: never; - query?: never; - url: '/api/v1/volumes/test-connection'; + body: { + config: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + }; + path?: never; + query?: never; + url: "/api/v1/volumes/test-connection"; }; export type TestConnectionResponses = { - /** - * Connection test result - */ - 200: { - message: string; - success: boolean; - }; + /** + * Connection test result + */ + 200: { + message: string; + success: boolean; + }; }; export type TestConnectionResponse = TestConnectionResponses[keyof TestConnectionResponses]; export type DeleteVolumeData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/volumes/{shortId}'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/volumes/{shortId}"; }; export type DeleteVolumeResponses = { - /** - * Volume deleted successfully - */ - 200: { - message: string; - }; + /** + * Volume deleted successfully + */ + 200: { + message: string; + }; }; export type DeleteVolumeResponse = DeleteVolumeResponses[keyof DeleteVolumeResponses]; export type GetVolumeData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/volumes/{shortId}'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/volumes/{shortId}"; }; export type GetVolumeErrors = { - /** - * Volume not found - */ - 404: unknown; + /** + * Volume not found + */ + 404: unknown; }; export type GetVolumeResponses = { - /** - * Volume details - */ - 200: { - statfs: { - free: number; - total: number; - used: number; - }; - volume: { - autoRemount: boolean; - config: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - createdAt: number; - id: number; - lastError: string | null; - lastHealthCheck: number; - name: string; - shortId: string; - status: 'error' | 'mounted' | 'unmounted'; - type: 'directory' | 'nfs' | 'rclone' | 'sftp' | 'smb' | 'webdav'; - updatedAt: number; - }; - }; + /** + * Volume details + */ + 200: { + statfs: { + free: number; + total: number; + used: number; + }; + volume: { + autoRemount: boolean; + config: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + createdAt: number; + id: number; + lastError: string | null; + lastHealthCheck: number; + name: string; + shortId: string; + status: "error" | "mounted" | "unmounted"; + type: "directory" | "nfs" | "rclone" | "sftp" | "smb" | "webdav"; + updatedAt: number; + }; + }; }; export type GetVolumeResponse = GetVolumeResponses[keyof GetVolumeResponses]; export type UpdateVolumeData = { - body?: { - autoRemount?: boolean; - config?: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - name?: string; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/volumes/{shortId}'; + body: { + autoRemount?: boolean; + config?: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + name?: string; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/volumes/{shortId}"; }; export type UpdateVolumeErrors = { - /** - * Volume not found - */ - 404: unknown; + /** + * Volume not found + */ + 404: unknown; }; export type UpdateVolumeResponses = { - /** - * Volume updated successfully - */ - 200: { - autoRemount: boolean; - config: { - backend: 'directory'; - path: string; - readOnly?: false; - } | { - backend: 'nfs'; - exportPath: string; - server: string; - version: '3' | '4' | '4.1'; - port?: number; - readOnly?: boolean; - } | { - backend: 'rclone'; - path: string; - remote: string; - readOnly?: boolean; - } | { - backend: 'sftp'; - host: string; - path: string; - username: string; - port?: number; - skipHostKeyCheck?: boolean; - knownHosts?: string; - password?: string; - privateKey?: string; - readOnly?: boolean; - } | { - backend: 'smb'; - server: string; - share: string; - vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto'; - port?: number; - domain?: string; - guest?: boolean; - password?: string; - readOnly?: boolean; - username?: string; - } | { - backend: 'webdav'; - path: string; - server: string; - port?: number; - password?: string; - readOnly?: boolean; - ssl?: boolean; - username?: string; - }; - createdAt: number; - id: number; - lastError: string | null; - lastHealthCheck: number; - name: string; - shortId: string; - status: 'error' | 'mounted' | 'unmounted'; - type: 'directory' | 'nfs' | 'rclone' | 'sftp' | 'smb' | 'webdav'; - updatedAt: number; - }; + /** + * Volume updated successfully + */ + 200: { + autoRemount: boolean; + config: + | { + backend: "directory"; + path: string; + readOnly?: false; + } + | { + backend: "nfs"; + exportPath: string; + server: string; + version: "3" | "4" | "4.1"; + port?: number; + readOnly?: boolean; + } + | { + backend: "rclone"; + path: string; + remote: string; + readOnly?: boolean; + } + | { + backend: "sftp"; + host: string; + path: string; + username: string; + port?: number; + skipHostKeyCheck?: boolean; + knownHosts?: string; + password?: string; + privateKey?: string; + readOnly?: boolean; + } + | { + backend: "smb"; + server: string; + share: string; + vers?: "1.0" | "2.0" | "2.1" | "3.0" | "auto"; + port?: number; + domain?: string; + guest?: boolean; + password?: string; + readOnly?: boolean; + username?: string; + } + | { + backend: "webdav"; + path: string; + server: string; + port?: number; + password?: string; + readOnly?: boolean; + ssl?: boolean; + username?: string; + }; + createdAt: number; + id: number; + lastError: string | null; + lastHealthCheck: number; + name: string; + shortId: string; + status: "error" | "mounted" | "unmounted"; + type: "directory" | "nfs" | "rclone" | "sftp" | "smb" | "webdav"; + updatedAt: number; + }; }; export type UpdateVolumeResponse = UpdateVolumeResponses[keyof UpdateVolumeResponses]; export type MountVolumeData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/volumes/{shortId}/mount'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/volumes/{shortId}/mount"; }; export type MountVolumeResponses = { - /** - * Volume mounted successfully - */ - 200: { - status: 'error' | 'mounted' | 'unmounted'; - error?: string; - }; + /** + * Volume mounted successfully + */ + 200: { + status: "error" | "mounted" | "unmounted"; + error?: string; + }; }; export type MountVolumeResponse = MountVolumeResponses[keyof MountVolumeResponses]; export type UnmountVolumeData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/volumes/{shortId}/unmount'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/volumes/{shortId}/unmount"; }; export type UnmountVolumeResponses = { - /** - * Volume unmounted successfully - */ - 200: { - status: 'error' | 'mounted' | 'unmounted'; - error?: string; - }; + /** + * Volume unmounted successfully + */ + 200: { + status: "error" | "mounted" | "unmounted"; + error?: string; + }; }; export type UnmountVolumeResponse = UnmountVolumeResponses[keyof UnmountVolumeResponses]; export type HealthCheckVolumeData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/volumes/{shortId}/health-check'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/volumes/{shortId}/health-check"; }; export type HealthCheckVolumeErrors = { - /** - * Volume not found - */ - 404: unknown; + /** + * Volume not found + */ + 404: unknown; }; export type HealthCheckVolumeResponses = { - /** - * Volume health check result - */ - 200: { - status: 'error' | 'mounted' | 'unmounted'; - error?: string; - }; + /** + * Volume health check result + */ + 200: { + status: "error" | "mounted" | "unmounted"; + error?: string; + }; }; export type HealthCheckVolumeResponse = HealthCheckVolumeResponses[keyof HealthCheckVolumeResponses]; export type ListFilesData = { - body?: never; - path: { - shortId: string; - }; - query?: { - limit?: string; - offset?: string; - path?: string; - }; - url: '/api/v1/volumes/{shortId}/files'; + body?: never; + path: { + shortId: string; + }; + query?: { + limit?: string; + offset?: string; + path?: string; + }; + url: "/api/v1/volumes/{shortId}/files"; }; export type ListFilesResponses = { - /** - * List of files in the volume - */ - 200: { - files: Array<{ - name: string; - path: string; - type: 'directory' | 'file'; - modifiedAt?: number; - size?: number; - }>; - hasMore: boolean; - limit: number; - offset: number; - path: string; - total: number; - }; + /** + * List of files in the volume + */ + 200: { + files: Array<{ + name: string; + path: string; + type: "directory" | "file"; + modifiedAt?: number; + size?: number; + }>; + hasMore: boolean; + limit: number; + offset: number; + path: string; + total: number; + }; }; export type ListFilesResponse = ListFilesResponses[keyof ListFilesResponses]; export type BrowseFilesystemData = { - body?: never; - path?: never; - query?: { - /** - * Directory path to browse (absolute path, defaults to /) - */ - path?: string; - }; - url: '/api/v1/volumes/filesystem/browse'; + body?: never; + path?: never; + query?: { + /** + * Directory path to browse (absolute path, defaults to /) + */ + path?: string; + }; + url: "/api/v1/volumes/filesystem/browse"; }; export type BrowseFilesystemResponses = { - /** - * List of directories in the specified path - */ - 200: { - directories: Array<{ - name: string; - path: string; - type: 'directory' | 'file'; - modifiedAt?: number; - size?: number; - }>; - path: string; - }; + /** + * List of directories in the specified path + */ + 200: { + directories: Array<{ + name: string; + path: string; + type: "directory" | "file"; + modifiedAt?: number; + size?: number; + }>; + path: string; + }; }; export type BrowseFilesystemResponse = BrowseFilesystemResponses[keyof BrowseFilesystemResponses]; export type ListRepositoriesData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/repositories'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/repositories"; }; export type ListRepositoriesResponses = { - /** - * List of repositories - */ - 200: Array<{ - compressionMode: 'auto' | 'max' | 'off' | null; - config: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - createdAt: number; - doctorResult: { - completedAt: number; - steps: Array<{ - error: string | null; - output: string | null; - step: string; - success: boolean; - }>; - success: boolean; - } | null; - id: string; - lastChecked: number | null; - lastError: string | null; - name: string; - shortId: string; - status: 'cancelled' | 'doctor' | 'error' | 'healthy' | 'unknown' | null; - type: 'azure' | 'gcs' | 'local' | 'r2' | 'rclone' | 'rest' | 's3' | 'sftp'; - updatedAt: number; - }>; + /** + * List of repositories + */ + 200: Array<{ + compressionMode: "auto" | "max" | "off" | null; + config: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + createdAt: number; + doctorResult: { + completedAt: number; + steps: Array<{ + error: string | null; + output: string | null; + step: string; + success: boolean; + }>; + success: boolean; + } | null; + id: string; + lastChecked: number | null; + lastError: string | null; + name: string; + shortId: string; + status: "cancelled" | "doctor" | "error" | "healthy" | "unknown" | null; + type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp"; + updatedAt: number; + }>; }; export type ListRepositoriesResponse = ListRepositoriesResponses[keyof ListRepositoriesResponses]; export type CreateRepositoryData = { - body?: { - config: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - name: string; - compressionMode?: 'auto' | 'max' | 'off'; - }; - path?: never; - query?: never; - url: '/api/v1/repositories'; + body: { + config: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + name: string; + compressionMode?: "auto" | "max" | "off"; + }; + path?: never; + query?: never; + url: "/api/v1/repositories"; }; export type CreateRepositoryResponses = { - /** - * Repository created successfully - */ - 201: { - message: string; - repository: { - id: string; - name: string; - shortId: string; - }; - }; + /** + * Repository created successfully + */ + 201: { + message: string; + repository: { + id: string; + name: string; + shortId: string; + }; + }; }; export type CreateRepositoryResponse = CreateRepositoryResponses[keyof CreateRepositoryResponses]; export type ListRcloneRemotesData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/repositories/rclone-remotes'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/repositories/rclone-remotes"; }; export type ListRcloneRemotesResponses = { - /** - * List of rclone remotes - */ - 200: Array<{ - name: string; - type: string; - }>; + /** + * List of rclone remotes + */ + 200: Array<{ + name: string; + type: string; + }>; }; export type ListRcloneRemotesResponse = ListRcloneRemotesResponses[keyof ListRcloneRemotesResponses]; export type DeleteRepositoryData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}"; }; export type DeleteRepositoryResponses = { - /** - * Repository deleted successfully - */ - 200: { - message: string; - }; + /** + * Repository deleted successfully + */ + 200: { + message: string; + }; }; export type DeleteRepositoryResponse = DeleteRepositoryResponses[keyof DeleteRepositoryResponses]; export type GetRepositoryData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}"; }; export type GetRepositoryResponses = { - /** - * Repository details - */ - 200: { - compressionMode: 'auto' | 'max' | 'off' | null; - config: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - createdAt: number; - doctorResult: { - completedAt: number; - steps: Array<{ - error: string | null; - output: string | null; - step: string; - success: boolean; - }>; - success: boolean; - } | null; - id: string; - lastChecked: number | null; - lastError: string | null; - name: string; - shortId: string; - status: 'cancelled' | 'doctor' | 'error' | 'healthy' | 'unknown' | null; - type: 'azure' | 'gcs' | 'local' | 'r2' | 'rclone' | 'rest' | 's3' | 'sftp'; - updatedAt: number; - }; + /** + * Repository details + */ + 200: { + compressionMode: "auto" | "max" | "off" | null; + config: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + createdAt: number; + doctorResult: { + completedAt: number; + steps: Array<{ + error: string | null; + output: string | null; + step: string; + success: boolean; + }>; + success: boolean; + } | null; + id: string; + lastChecked: number | null; + lastError: string | null; + name: string; + shortId: string; + status: "cancelled" | "doctor" | "error" | "healthy" | "unknown" | null; + type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp"; + updatedAt: number; + }; }; export type GetRepositoryResponse = GetRepositoryResponses[keyof GetRepositoryResponses]; export type UpdateRepositoryData = { - body?: { - compressionMode?: 'auto' | 'max' | 'off'; - config?: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - name?: string; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}'; + body: { + compressionMode?: "auto" | "max" | "off"; + config?: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + name?: string; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}"; }; export type UpdateRepositoryErrors = { - /** - * Invalid repository update payload - */ - 400: unknown; - /** - * Repository not found - */ - 404: unknown; - /** - * Repository with this name already exists - */ - 409: unknown; + /** + * Invalid repository update payload + */ + 400: unknown; + /** + * Repository not found + */ + 404: unknown; + /** + * Repository with this name already exists + */ + 409: unknown; }; export type UpdateRepositoryResponses = { - /** - * Repository updated successfully - */ - 200: { - compressionMode: 'auto' | 'max' | 'off' | null; - config: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - createdAt: number; - doctorResult: { - completedAt: number; - steps: Array<{ - error: string | null; - output: string | null; - step: string; - success: boolean; - }>; - success: boolean; - } | null; - id: string; - lastChecked: number | null; - lastError: string | null; - name: string; - shortId: string; - status: 'cancelled' | 'doctor' | 'error' | 'healthy' | 'unknown' | null; - type: 'azure' | 'gcs' | 'local' | 'r2' | 'rclone' | 'rest' | 's3' | 'sftp'; - updatedAt: number; - }; + /** + * Repository updated successfully + */ + 200: { + compressionMode: "auto" | "max" | "off" | null; + config: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + createdAt: number; + doctorResult: { + completedAt: number; + steps: Array<{ + error: string | null; + output: string | null; + step: string; + success: boolean; + }>; + success: boolean; + } | null; + id: string; + lastChecked: number | null; + lastError: string | null; + name: string; + shortId: string; + status: "cancelled" | "doctor" | "error" | "healthy" | "unknown" | null; + type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp"; + updatedAt: number; + }; }; export type UpdateRepositoryResponse = UpdateRepositoryResponses[keyof UpdateRepositoryResponses]; export type GetRepositoryStatsData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/stats'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/stats"; }; export type GetRepositoryStatsResponses = { - /** - * Repository statistics - */ - 200: { - compression_progress?: number; - compression_ratio?: number; - compression_space_saving?: number; - snapshots_count?: number; - total_size?: number; - total_uncompressed_size?: number; - }; + /** + * Repository statistics + */ + 200: { + compression_progress?: number; + compression_ratio?: number; + compression_space_saving?: number; + snapshots_count?: number; + total_size?: number; + total_uncompressed_size?: number; + }; }; export type GetRepositoryStatsResponse = GetRepositoryStatsResponses[keyof GetRepositoryStatsResponses]; export type DeleteSnapshotsData = { - body?: { - snapshotIds: Array; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/snapshots'; + body: { + snapshotIds: Array; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/snapshots"; }; export type DeleteSnapshotsResponses = { - /** - * Snapshots deleted successfully - */ - 200: { - message: string; - }; + /** + * Snapshots deleted successfully + */ + 200: { + message: string; + }; }; export type DeleteSnapshotsResponse = DeleteSnapshotsResponses[keyof DeleteSnapshotsResponses]; export type ListSnapshotsData = { - body?: never; - path: { - shortId: string; - }; - query?: { - backupId?: string; - }; - url: '/api/v1/repositories/{shortId}/snapshots'; + body?: never; + path: { + shortId: string; + }; + query?: { + backupId?: string; + }; + url: "/api/v1/repositories/{shortId}/snapshots"; }; export type ListSnapshotsResponses = { - /** - * List of snapshots - */ - 200: Array<{ - duration: number; - paths: Array; - retentionCategories: Array; - short_id: string; - size: number; - tags: Array; - time: number; - hostname?: string; - summary?: { - backup_end: string; - backup_start: string; - data_added: number; - data_blobs: number; - dirs_changed: number; - dirs_new: number; - dirs_unmodified: number; - files_changed: number; - files_new: number; - files_unmodified: number; - total_bytes_processed: number; - total_files_processed: number; - tree_blobs: number; - data_added_packed?: number; - }; - }>; + /** + * List of snapshots + */ + 200: Array<{ + duration: number; + paths: Array; + retentionCategories: Array; + short_id: string; + size: number; + tags: Array; + time: number; + hostname?: string; + summary?: { + backup_end: string; + backup_start: string; + data_added: number; + data_blobs: number; + dirs_changed: number; + dirs_new: number; + dirs_unmodified: number; + files_changed: number; + files_new: number; + files_unmodified: number; + total_bytes_processed: number; + total_files_processed: number; + tree_blobs: number; + data_added_packed?: number; + }; + }>; }; export type ListSnapshotsResponse = ListSnapshotsResponses[keyof ListSnapshotsResponses]; export type RefreshSnapshotsData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/snapshots/refresh'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/snapshots/refresh"; }; export type RefreshSnapshotsResponses = { - /** - * Snapshot cache cleared and refreshed - */ - 200: { - count: number; - message: string; - }; + /** + * Snapshot cache cleared and refreshed + */ + 200: { + count: number; + message: string; + }; }; export type RefreshSnapshotsResponse = RefreshSnapshotsResponses[keyof RefreshSnapshotsResponses]; export type DeleteSnapshotData = { - body?: never; - path: { - shortId: string; - snapshotId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/snapshots/{snapshotId}'; + body?: never; + path: { + shortId: string; + snapshotId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/snapshots/{snapshotId}"; }; export type DeleteSnapshotResponses = { - /** - * Snapshot deleted successfully - */ - 200: { - message: string; - }; + /** + * Snapshot deleted successfully + */ + 200: { + message: string; + }; }; export type DeleteSnapshotResponse = DeleteSnapshotResponses[keyof DeleteSnapshotResponses]; export type GetSnapshotDetailsData = { - body?: never; - path: { - shortId: string; - snapshotId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/snapshots/{snapshotId}'; + body?: never; + path: { + shortId: string; + snapshotId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/snapshots/{snapshotId}"; }; export type GetSnapshotDetailsResponses = { - /** - * Snapshot details - */ - 200: { - duration: number; - paths: Array; - retentionCategories: Array; - short_id: string; - size: number; - tags: Array; - time: number; - hostname?: string; - summary?: { - backup_end: string; - backup_start: string; - data_added: number; - data_blobs: number; - dirs_changed: number; - dirs_new: number; - dirs_unmodified: number; - files_changed: number; - files_new: number; - files_unmodified: number; - total_bytes_processed: number; - total_files_processed: number; - tree_blobs: number; - data_added_packed?: number; - }; - }; + /** + * Snapshot details + */ + 200: { + duration: number; + paths: Array; + retentionCategories: Array; + short_id: string; + size: number; + tags: Array; + time: number; + hostname?: string; + summary?: { + backup_end: string; + backup_start: string; + data_added: number; + data_blobs: number; + dirs_changed: number; + dirs_new: number; + dirs_unmodified: number; + files_changed: number; + files_new: number; + files_unmodified: number; + total_bytes_processed: number; + total_files_processed: number; + tree_blobs: number; + data_added_packed?: number; + }; + }; }; export type GetSnapshotDetailsResponse = GetSnapshotDetailsResponses[keyof GetSnapshotDetailsResponses]; export type ListSnapshotFilesData = { - body?: never; - path: { - shortId: string; - snapshotId: string; - }; - query?: { - limit?: string; - offset?: string; - path?: string; - }; - url: '/api/v1/repositories/{shortId}/snapshots/{snapshotId}/files'; + body?: never; + path: { + shortId: string; + snapshotId: string; + }; + query?: { + limit?: string; + offset?: string; + path?: string; + }; + url: "/api/v1/repositories/{shortId}/snapshots/{snapshotId}/files"; }; export type ListSnapshotFilesResponses = { - /** - * List of files and directories in the snapshot - */ - 200: { - files: Array<{ - name: string; - path: string; - type: string; - atime?: string; - ctime?: string; - gid?: number; - mode?: number; - mtime?: string; - size?: number; - uid?: number; - }>; - hasMore: boolean; - limit: number; - offset: number; - snapshot: { - hostname: string; - id: string; - paths: Array; - short_id: string; - time: string; - }; - total: number; - }; + /** + * List of files and directories in the snapshot + */ + 200: { + files: Array<{ + name: string; + path: string; + type: string; + atime?: string; + ctime?: string; + gid?: number; + mode?: number; + mtime?: string; + size?: number; + uid?: number; + }>; + hasMore: boolean; + limit: number; + offset: number; + snapshot: { + hostname: string; + id: string; + paths: Array; + short_id: string; + time: string; + }; + total: number; + }; }; export type ListSnapshotFilesResponse = ListSnapshotFilesResponses[keyof ListSnapshotFilesResponses]; export type DumpSnapshotData = { - body?: never; - path: { - shortId: string; - snapshotId: string; - }; - query?: { - kind?: 'dir' | 'file'; - path?: string; - }; - url: '/api/v1/repositories/{shortId}/snapshots/{snapshotId}/dump'; + body?: never; + path: { + shortId: string; + snapshotId: string; + }; + query?: { + kind?: "dir" | "file"; + path?: string; + }; + url: "/api/v1/repositories/{shortId}/snapshots/{snapshotId}/dump"; }; export type DumpSnapshotResponses = { - /** - * Snapshot content stream - */ - 200: Blob | File; + /** + * Snapshot content stream + */ + 200: Blob | File; }; export type DumpSnapshotResponse = DumpSnapshotResponses[keyof DumpSnapshotResponses]; export type RestoreSnapshotData = { - body?: { - snapshotId: string; - delete?: boolean; - exclude?: Array; - excludeXattr?: Array; - include?: Array; - overwrite?: 'always' | 'if-changed' | 'if-newer' | 'never'; - targetPath?: string; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/restore'; + body: { + snapshotId: string; + delete?: boolean; + exclude?: Array; + excludeXattr?: Array; + include?: Array; + overwrite?: "always" | "if-changed" | "if-newer" | "never"; + targetPath?: string; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/restore"; }; export type RestoreSnapshotResponses = { - /** - * Snapshot restored successfully - */ - 200: { - filesRestored: number; - filesSkipped: number; - message: string; - success: boolean; - }; + /** + * Snapshot restored successfully + */ + 200: { + filesRestored: number; + filesSkipped: number; + message: string; + success: boolean; + }; }; export type RestoreSnapshotResponse = RestoreSnapshotResponses[keyof RestoreSnapshotResponses]; export type CancelDoctorData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/doctor'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/doctor"; }; export type CancelDoctorErrors = { - /** - * No doctor operation is currently running - */ - 409: unknown; + /** + * No doctor operation is currently running + */ + 409: unknown; }; export type CancelDoctorResponses = { - /** - * Doctor operation cancelled - */ - 200: { - message: string; - }; + /** + * Doctor operation cancelled + */ + 200: { + message: string; + }; }; export type CancelDoctorResponse = CancelDoctorResponses[keyof CancelDoctorResponses]; export type StartDoctorData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/doctor'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/doctor"; }; export type StartDoctorErrors = { - /** - * Doctor operation already in progress - */ - 409: unknown; + /** + * Doctor operation already in progress + */ + 409: unknown; }; export type StartDoctorResponses = { - /** - * Doctor operation started - */ - 202: { - message: string; - repositoryId: string; - }; + /** + * Doctor operation started + */ + 202: { + message: string; + repositoryId: string; + }; }; export type StartDoctorResponse = StartDoctorResponses[keyof StartDoctorResponses]; export type UnlockRepositoryData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/unlock'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/unlock"; }; export type UnlockRepositoryResponses = { - /** - * Repository unlocked successfully - */ - 200: { - message: string; - success: boolean; - }; + /** + * Repository unlocked successfully + */ + 200: { + message: string; + success: boolean; + }; }; export type UnlockRepositoryResponse = UnlockRepositoryResponses[keyof UnlockRepositoryResponses]; export type TagSnapshotsData = { - body?: { - snapshotIds: Array; - add?: Array; - remove?: Array; - set?: Array; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/snapshots/tag'; + body: { + snapshotIds: Array; + add?: Array; + remove?: Array; + set?: Array; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/snapshots/tag"; }; export type TagSnapshotsResponses = { - /** - * Snapshots tagged successfully - */ - 200: { - message: string; - }; + /** + * Snapshots tagged successfully + */ + 200: { + message: string; + }; }; export type TagSnapshotsResponse = TagSnapshotsResponses[keyof TagSnapshotsResponses]; export type DevPanelExecData = { - body?: { - command: string; - args?: Array; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/repositories/{shortId}/exec'; + body: { + command: string; + args?: Array; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/repositories/{shortId}/exec"; }; export type DevPanelExecErrors = { - /** - * Dev panel not enabled - */ - 403: unknown; + /** + * Dev panel not enabled + */ + 403: unknown; }; export type DevPanelExecResponses = { - /** - * Command output stream (SSE) - */ - 200: string; + /** + * Command output stream (SSE) + */ + 200: string; }; export type DevPanelExecResponse = DevPanelExecResponses[keyof DevPanelExecResponses]; export type ListBackupSchedulesData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/backups'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/backups"; }; export type ListBackupSchedulesResponses = { @@ -2381,6 +2463,7 @@ export type ListBackupSchedulesResponses = { 200: Array<{ createdAt: number; cronExpression: string; + customResticParams: Array | null; enabled: boolean; excludeIfPresent: Array | null; excludePatterns: Array | null; @@ -2392,7 +2475,6 @@ export type ListBackupSchedulesResponses = { name: string; nextBackupAt: number | null; oneFileSystem: boolean; - customResticParams: Array | null; repository: { compressionMode: "auto" | "max" | "off" | null; config: @@ -2666,17 +2748,17 @@ export type ListBackupSchedulesResponses = { export type ListBackupSchedulesResponse = ListBackupSchedulesResponses[keyof ListBackupSchedulesResponses]; export type CreateBackupScheduleData = { - body?: { + body: { cronExpression: string; enabled: boolean; name: string; repositoryId: string; volumeId: number | string; + customResticParams?: Array; excludeIfPresent?: Array; excludePatterns?: Array; includePatterns?: Array; oneFileSystem?: boolean; - customResticParams?: Array; retentionPolicy?: { keepDaily?: number; keepHourly?: number; @@ -2700,6 +2782,7 @@ export type CreateBackupScheduleResponses = { 201: { createdAt: number; cronExpression: string; + customResticParams: Array | null; enabled: boolean; excludeIfPresent: Array | null; excludePatterns: Array | null; @@ -2711,7 +2794,6 @@ export type CreateBackupScheduleResponses = { name: string; nextBackupAt: number | null; oneFileSystem: boolean; - customResticParams: Array | null; repositoryId: string; retentionPolicy: { keepDaily?: number; @@ -2731,32 +2813,32 @@ export type CreateBackupScheduleResponses = { export type CreateBackupScheduleResponse = CreateBackupScheduleResponses[keyof CreateBackupScheduleResponses]; export type DeleteBackupScheduleData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}"; }; export type DeleteBackupScheduleResponses = { - /** - * Backup schedule deleted successfully - */ - 200: { - success: boolean; - }; + /** + * Backup schedule deleted successfully + */ + 200: { + success: boolean; + }; }; export type DeleteBackupScheduleResponse = DeleteBackupScheduleResponses[keyof DeleteBackupScheduleResponses]; export type GetBackupScheduleData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}"; }; export type GetBackupScheduleResponses = { @@ -2766,6 +2848,7 @@ export type GetBackupScheduleResponses = { 200: { createdAt: number; cronExpression: string; + customResticParams: Array | null; enabled: boolean; excludeIfPresent: Array | null; excludePatterns: Array | null; @@ -2777,7 +2860,6 @@ export type GetBackupScheduleResponses = { name: string; nextBackupAt: number | null; oneFileSystem: boolean; - customResticParams: Array | null; repository: { compressionMode: "auto" | "max" | "off" | null; config: @@ -3051,16 +3133,16 @@ export type GetBackupScheduleResponses = { export type GetBackupScheduleResponse = GetBackupScheduleResponses[keyof GetBackupScheduleResponses]; export type UpdateBackupScheduleData = { - body?: { + body: { cronExpression: string; repositoryId: string; + customResticParams?: Array; enabled?: boolean; excludeIfPresent?: Array; excludePatterns?: Array; includePatterns?: Array; name?: string; oneFileSystem?: boolean; - customResticParams?: Array; retentionPolicy?: { keepDaily?: number; keepHourly?: number; @@ -3086,6 +3168,7 @@ export type UpdateBackupScheduleResponses = { 200: { createdAt: number; cronExpression: string; + customResticParams: Array | null; enabled: boolean; excludeIfPresent: Array | null; excludePatterns: Array | null; @@ -3097,7 +3180,6 @@ export type UpdateBackupScheduleResponses = { name: string; nextBackupAt: number | null; oneFileSystem: boolean; - customResticParams: Array | null; repositoryId: string; retentionPolicy: { keepDaily?: number; @@ -3117,12 +3199,12 @@ export type UpdateBackupScheduleResponses = { export type UpdateBackupScheduleResponse = UpdateBackupScheduleResponses[keyof UpdateBackupScheduleResponses]; export type GetBackupScheduleForVolumeData = { - body?: never; - path: { - volumeShortId: string; - }; - query?: never; - url: '/api/v1/backups/volume/{volumeShortId}'; + body?: never; + path: { + volumeShortId: string; + }; + query?: never; + url: "/api/v1/backups/volume/{volumeShortId}"; }; export type GetBackupScheduleForVolumeResponses = { @@ -3132,6 +3214,7 @@ export type GetBackupScheduleForVolumeResponses = { 200: { createdAt: number; cronExpression: string; + customResticParams: Array | null; enabled: boolean; excludeIfPresent: Array | null; excludePatterns: Array | null; @@ -3143,7 +3226,6 @@ export type GetBackupScheduleForVolumeResponses = { name: string; nextBackupAt: number | null; oneFileSystem: boolean; - customResticParams: Array | null; repository: { compressionMode: "auto" | "max" | "off" | null; config: @@ -3414,1413 +3496,1510 @@ export type GetBackupScheduleForVolumeResponses = { } | null; }; -export type GetBackupScheduleForVolumeResponse = GetBackupScheduleForVolumeResponses[keyof GetBackupScheduleForVolumeResponses]; +export type GetBackupScheduleForVolumeResponse = + GetBackupScheduleForVolumeResponses[keyof GetBackupScheduleForVolumeResponses]; export type RunBackupNowData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/run'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/run"; }; export type RunBackupNowResponses = { - /** - * Backup started successfully - */ - 200: { - success: boolean; - }; + /** + * Backup started successfully + */ + 200: { + success: boolean; + }; }; export type RunBackupNowResponse = RunBackupNowResponses[keyof RunBackupNowResponses]; export type StopBackupData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/stop'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/stop"; }; export type StopBackupErrors = { - /** - * No backup is currently running for this schedule - */ - 409: unknown; + /** + * No backup is currently running for this schedule + */ + 409: unknown; }; export type StopBackupResponses = { - /** - * Backup stopped successfully - */ - 200: { - success: boolean; - }; + /** + * Backup stopped successfully + */ + 200: { + success: boolean; + }; }; export type StopBackupResponse = StopBackupResponses[keyof StopBackupResponses]; export type RunForgetData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/forget'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/forget"; }; export type RunForgetResponses = { - /** - * Retention policy applied successfully - */ - 200: { - success: boolean; - }; + /** + * Retention policy applied successfully + */ + 200: { + success: boolean; + }; }; export type RunForgetResponse = RunForgetResponses[keyof RunForgetResponses]; export type GetScheduleNotificationsData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/notifications'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/notifications"; }; export type GetScheduleNotificationsResponses = { - /** - * List of notification assignments for the schedule - */ - 200: Array<{ - createdAt: number; - destination: { - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - createdAt: number; - enabled: boolean; - id: number; - name: string; - type: 'custom' | 'discord' | 'email' | 'generic' | 'gotify' | 'ntfy' | 'pushover' | 'slack' | 'telegram'; - updatedAt: number; - }; - destinationId: number; - notifyOnFailure: boolean; - notifyOnStart: boolean; - notifyOnSuccess: boolean; - notifyOnWarning: boolean; - scheduleId: number; - }>; + /** + * List of notification assignments for the schedule + */ + 200: Array<{ + createdAt: number; + destination: { + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + createdAt: number; + enabled: boolean; + id: number; + name: string; + type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram"; + updatedAt: number; + }; + destinationId: number; + notifyOnFailure: boolean; + notifyOnStart: boolean; + notifyOnSuccess: boolean; + notifyOnWarning: boolean; + scheduleId: number; + }>; }; -export type GetScheduleNotificationsResponse = GetScheduleNotificationsResponses[keyof GetScheduleNotificationsResponses]; +export type GetScheduleNotificationsResponse = + GetScheduleNotificationsResponses[keyof GetScheduleNotificationsResponses]; export type UpdateScheduleNotificationsData = { - body?: { - assignments: Array<{ - destinationId: number; - notifyOnFailure: boolean; - notifyOnStart: boolean; - notifyOnSuccess: boolean; - notifyOnWarning: boolean; - }>; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/notifications'; + body: { + assignments: Array<{ + destinationId: number; + notifyOnFailure: boolean; + notifyOnStart: boolean; + notifyOnSuccess: boolean; + notifyOnWarning: boolean; + }>; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/notifications"; }; export type UpdateScheduleNotificationsResponses = { - /** - * Notification assignments updated successfully - */ - 200: Array<{ - createdAt: number; - destination: { - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - createdAt: number; - enabled: boolean; - id: number; - name: string; - type: 'custom' | 'discord' | 'email' | 'generic' | 'gotify' | 'ntfy' | 'pushover' | 'slack' | 'telegram'; - updatedAt: number; - }; - destinationId: number; - notifyOnFailure: boolean; - notifyOnStart: boolean; - notifyOnSuccess: boolean; - notifyOnWarning: boolean; - scheduleId: number; - }>; + /** + * Notification assignments updated successfully + */ + 200: Array<{ + createdAt: number; + destination: { + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + createdAt: number; + enabled: boolean; + id: number; + name: string; + type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram"; + updatedAt: number; + }; + destinationId: number; + notifyOnFailure: boolean; + notifyOnStart: boolean; + notifyOnSuccess: boolean; + notifyOnWarning: boolean; + scheduleId: number; + }>; }; -export type UpdateScheduleNotificationsResponse = UpdateScheduleNotificationsResponses[keyof UpdateScheduleNotificationsResponses]; +export type UpdateScheduleNotificationsResponse = + UpdateScheduleNotificationsResponses[keyof UpdateScheduleNotificationsResponses]; export type GetScheduleMirrorsData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/mirrors'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/mirrors"; }; export type GetScheduleMirrorsResponses = { - /** - * List of mirror repository assignments for the schedule - */ - 200: Array<{ - createdAt: number; - enabled: boolean; - lastCopyAt: number | null; - lastCopyError: string | null; - lastCopyStatus: 'error' | 'in_progress' | 'success' | null; - repository: { - compressionMode: 'auto' | 'max' | 'off' | null; - config: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - createdAt: number; - doctorResult: { - completedAt: number; - steps: Array<{ - error: string | null; - output: string | null; - step: string; - success: boolean; - }>; - success: boolean; - } | null; - id: string; - lastChecked: number | null; - lastError: string | null; - name: string; - shortId: string; - status: 'cancelled' | 'doctor' | 'error' | 'healthy' | 'unknown' | null; - type: 'azure' | 'gcs' | 'local' | 'r2' | 'rclone' | 'rest' | 's3' | 'sftp'; - updatedAt: number; - }; - repositoryId: string; - scheduleId: string; - }>; + /** + * List of mirror repository assignments for the schedule + */ + 200: Array<{ + createdAt: number; + enabled: boolean; + lastCopyAt: number | null; + lastCopyError: string | null; + lastCopyStatus: "error" | "in_progress" | "success" | null; + repository: { + compressionMode: "auto" | "max" | "off" | null; + config: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + createdAt: number; + doctorResult: { + completedAt: number; + steps: Array<{ + error: string | null; + output: string | null; + step: string; + success: boolean; + }>; + success: boolean; + } | null; + id: string; + lastChecked: number | null; + lastError: string | null; + name: string; + shortId: string; + status: "cancelled" | "doctor" | "error" | "healthy" | "unknown" | null; + type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp"; + updatedAt: number; + }; + repositoryId: string; + scheduleId: string; + }>; }; export type GetScheduleMirrorsResponse = GetScheduleMirrorsResponses[keyof GetScheduleMirrorsResponses]; export type UpdateScheduleMirrorsData = { - body?: { - mirrors: Array<{ - enabled: boolean; - repositoryId: string; - }>; - }; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/mirrors'; + body: { + mirrors: Array<{ + enabled: boolean; + repositoryId: string; + }>; + }; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/mirrors"; }; export type UpdateScheduleMirrorsResponses = { - /** - * Mirror assignments updated successfully - */ - 200: Array<{ - createdAt: number; - enabled: boolean; - lastCopyAt: number | null; - lastCopyError: string | null; - lastCopyStatus: 'error' | 'in_progress' | 'success' | null; - repository: { - compressionMode: 'auto' | 'max' | 'off' | null; - config: { - accessKeyId: string; - backend: 'r2'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accessKeyId: string; - backend: 's3'; - bucket: string; - endpoint: string; - secretAccessKey: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - accountKey: string; - accountName: string; - backend: 'azure'; - container: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - endpointSuffix?: string; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'gcs'; - bucket: string; - credentialsJson: string; - projectId: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'local'; - path: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rclone'; - path: string; - remote: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - } | { - backend: 'rest'; - url: string; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - password?: string; - path?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - username?: string; - } | { - backend: 'sftp'; - host: string; - path: string; - privateKey: string; - user: string; - port?: number; - skipHostKeyCheck?: boolean; - cacert?: string; - customPassword?: string; - downloadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - insecureTls?: boolean; - isExistingRepository?: boolean; - knownHosts?: string; - uploadLimit?: { - unit?: 'Gbps' | 'Kbps' | 'Mbps'; - value?: number; - enabled?: boolean; - }; - }; - createdAt: number; - doctorResult: { - completedAt: number; - steps: Array<{ - error: string | null; - output: string | null; - step: string; - success: boolean; - }>; - success: boolean; - } | null; - id: string; - lastChecked: number | null; - lastError: string | null; - name: string; - shortId: string; - status: 'cancelled' | 'doctor' | 'error' | 'healthy' | 'unknown' | null; - type: 'azure' | 'gcs' | 'local' | 'r2' | 'rclone' | 'rest' | 's3' | 'sftp'; - updatedAt: number; - }; - repositoryId: string; - scheduleId: string; - }>; + /** + * Mirror assignments updated successfully + */ + 200: Array<{ + createdAt: number; + enabled: boolean; + lastCopyAt: number | null; + lastCopyError: string | null; + lastCopyStatus: "error" | "in_progress" | "success" | null; + repository: { + compressionMode: "auto" | "max" | "off" | null; + config: + | { + accessKeyId: string; + backend: "r2"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accessKeyId: string; + backend: "s3"; + bucket: string; + endpoint: string; + secretAccessKey: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + accountKey: string; + accountName: string; + backend: "azure"; + container: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + endpointSuffix?: string; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "gcs"; + bucket: string; + credentialsJson: string; + projectId: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "local"; + path: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rclone"; + path: string; + remote: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + } + | { + backend: "rest"; + url: string; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + password?: string; + path?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + username?: string; + } + | { + backend: "sftp"; + host: string; + path: string; + privateKey: string; + user: string; + port?: number; + skipHostKeyCheck?: boolean; + cacert?: string; + customPassword?: string; + downloadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + insecureTls?: boolean; + isExistingRepository?: boolean; + knownHosts?: string; + uploadLimit?: { + unit?: "Gbps" | "Kbps" | "Mbps"; + value?: number; + enabled?: boolean; + }; + }; + createdAt: number; + doctorResult: { + completedAt: number; + steps: Array<{ + error: string | null; + output: string | null; + step: string; + success: boolean; + }>; + success: boolean; + } | null; + id: string; + lastChecked: number | null; + lastError: string | null; + name: string; + shortId: string; + status: "cancelled" | "doctor" | "error" | "healthy" | "unknown" | null; + type: "azure" | "gcs" | "local" | "r2" | "rclone" | "rest" | "s3" | "sftp"; + updatedAt: number; + }; + repositoryId: string; + scheduleId: string; + }>; }; export type UpdateScheduleMirrorsResponse = UpdateScheduleMirrorsResponses[keyof UpdateScheduleMirrorsResponses]; export type GetMirrorCompatibilityData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/mirrors/compatibility'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/mirrors/compatibility"; }; export type GetMirrorCompatibilityResponses = { - /** - * List of repositories with their mirror compatibility status - */ - 200: Array<{ - compatible: boolean; - reason: string | null; - repositoryId: string; - }>; + /** + * List of repositories with their mirror compatibility status + */ + 200: Array<{ + compatible: boolean; + reason: string | null; + repositoryId: string; + }>; }; export type GetMirrorCompatibilityResponse = GetMirrorCompatibilityResponses[keyof GetMirrorCompatibilityResponses]; export type ReorderBackupSchedulesData = { - body?: { - scheduleShortIds: Array; - }; - path?: never; - query?: never; - url: '/api/v1/backups/reorder'; + body: { + scheduleShortIds: Array; + }; + path?: never; + query?: never; + url: "/api/v1/backups/reorder"; }; export type ReorderBackupSchedulesResponses = { - /** - * Backup schedules reordered successfully - */ - 200: { - success: boolean; - }; + /** + * Backup schedules reordered successfully + */ + 200: { + success: boolean; + }; }; export type ReorderBackupSchedulesResponse = ReorderBackupSchedulesResponses[keyof ReorderBackupSchedulesResponses]; export type GetBackupProgressData = { - body?: never; - path: { - shortId: string; - }; - query?: never; - url: '/api/v1/backups/{shortId}/progress'; + body?: never; + path: { + shortId: string; + }; + query?: never; + url: "/api/v1/backups/{shortId}/progress"; }; export type GetBackupProgressResponses = { - /** - * Current backup progress or null if not yet available - */ - 200: { - bytes_done: number; - files_done: number; - percent_done: number; - repositoryName: string; - scheduleId: string; - seconds_elapsed: number; - total_bytes: number; - total_files: number; - volumeName: string; - current_files?: Array; - } | null; + /** + * Current backup progress or null if not yet available + */ + 200: { + bytes_done: number; + files_done: number; + percent_done: number; + repositoryName: string; + scheduleId: string; + seconds_elapsed: number; + total_bytes: number; + total_files: number; + volumeName: string; + current_files?: Array; + } | null; }; export type GetBackupProgressResponse = GetBackupProgressResponses[keyof GetBackupProgressResponses]; export type ListNotificationDestinationsData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/notifications/destinations'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/notifications/destinations"; }; export type ListNotificationDestinationsResponses = { - /** - * A list of notification destinations - */ - 200: Array<{ - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - createdAt: number; - enabled: boolean; - id: number; - name: string; - type: 'custom' | 'discord' | 'email' | 'generic' | 'gotify' | 'ntfy' | 'pushover' | 'slack' | 'telegram'; - updatedAt: number; - }>; + /** + * A list of notification destinations + */ + 200: Array<{ + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + createdAt: number; + enabled: boolean; + id: number; + name: string; + type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram"; + updatedAt: number; + }>; }; -export type ListNotificationDestinationsResponse = ListNotificationDestinationsResponses[keyof ListNotificationDestinationsResponses]; +export type ListNotificationDestinationsResponse = + ListNotificationDestinationsResponses[keyof ListNotificationDestinationsResponses]; export type CreateNotificationDestinationData = { - body?: { - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - name: string; - }; - path?: never; - query?: never; - url: '/api/v1/notifications/destinations'; + body: { + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + name: string; + }; + path?: never; + query?: never; + url: "/api/v1/notifications/destinations"; }; export type CreateNotificationDestinationResponses = { - /** - * Notification destination created successfully - */ - 201: { - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - createdAt: number; - enabled: boolean; - id: number; - name: string; - type: 'custom' | 'discord' | 'email' | 'generic' | 'gotify' | 'ntfy' | 'pushover' | 'slack' | 'telegram'; - updatedAt: number; - }; + /** + * Notification destination created successfully + */ + 201: { + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + createdAt: number; + enabled: boolean; + id: number; + name: string; + type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram"; + updatedAt: number; + }; }; -export type CreateNotificationDestinationResponse = CreateNotificationDestinationResponses[keyof CreateNotificationDestinationResponses]; +export type CreateNotificationDestinationResponse = + CreateNotificationDestinationResponses[keyof CreateNotificationDestinationResponses]; export type DeleteNotificationDestinationData = { - body?: never; - path: { - id: string; - }; - query?: never; - url: '/api/v1/notifications/destinations/{id}'; + body?: never; + path: { + id: string; + }; + query?: never; + url: "/api/v1/notifications/destinations/{id}"; }; export type DeleteNotificationDestinationErrors = { - /** - * Notification destination not found - */ - 404: unknown; + /** + * Notification destination not found + */ + 404: unknown; }; export type DeleteNotificationDestinationResponses = { - /** - * Notification destination deleted successfully - */ - 200: { - message: string; - }; + /** + * Notification destination deleted successfully + */ + 200: { + message: string; + }; }; -export type DeleteNotificationDestinationResponse = DeleteNotificationDestinationResponses[keyof DeleteNotificationDestinationResponses]; +export type DeleteNotificationDestinationResponse = + DeleteNotificationDestinationResponses[keyof DeleteNotificationDestinationResponses]; export type GetNotificationDestinationData = { - body?: never; - path: { - id: string; - }; - query?: never; - url: '/api/v1/notifications/destinations/{id}'; + body?: never; + path: { + id: string; + }; + query?: never; + url: "/api/v1/notifications/destinations/{id}"; }; export type GetNotificationDestinationErrors = { - /** - * Notification destination not found - */ - 404: unknown; + /** + * Notification destination not found + */ + 404: unknown; }; export type GetNotificationDestinationResponses = { - /** - * Notification destination details - */ - 200: { - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - createdAt: number; - enabled: boolean; - id: number; - name: string; - type: 'custom' | 'discord' | 'email' | 'generic' | 'gotify' | 'ntfy' | 'pushover' | 'slack' | 'telegram'; - updatedAt: number; - }; + /** + * Notification destination details + */ + 200: { + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + createdAt: number; + enabled: boolean; + id: number; + name: string; + type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram"; + updatedAt: number; + }; }; -export type GetNotificationDestinationResponse = GetNotificationDestinationResponses[keyof GetNotificationDestinationResponses]; +export type GetNotificationDestinationResponse = + GetNotificationDestinationResponses[keyof GetNotificationDestinationResponses]; export type UpdateNotificationDestinationData = { - body?: { - config?: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - enabled?: boolean; - name?: string; - }; - path: { - id: string; - }; - query?: never; - url: '/api/v1/notifications/destinations/{id}'; + body: { + config?: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + enabled?: boolean; + name?: string; + }; + path: { + id: string; + }; + query?: never; + url: "/api/v1/notifications/destinations/{id}"; }; export type UpdateNotificationDestinationErrors = { - /** - * Notification destination not found - */ - 404: unknown; + /** + * Notification destination not found + */ + 404: unknown; }; export type UpdateNotificationDestinationResponses = { - /** - * Notification destination updated successfully - */ - 200: { - config: { - apiToken: string; - priority: -1 | 0 | 1; - type: 'pushover'; - userKey: string; - devices?: string; - } | { - botToken: string; - chatId: string; - type: 'telegram'; - threadId?: string; - } | { - from: string; - smtpHost: string; - smtpPort: number; - to: Array; - type: 'email'; - useTLS: boolean; - fromName?: string; - password?: string; - username?: string; - } | { - method: 'GET' | 'POST'; - type: 'generic'; - url: string; - contentType?: string; - headers?: Array; - messageKey?: string; - titleKey?: string; - useJson?: boolean; - } | { - priority: 'default' | 'high' | 'low' | 'max' | 'min'; - topic: string; - type: 'ntfy'; - accessToken?: string; - password?: string; - serverUrl?: string; - username?: string; - } | { - priority: number; - serverUrl: string; - token: string; - type: 'gotify'; - path?: string; - } | { - shoutrrrUrl: string; - type: 'custom'; - } | { - type: 'discord'; - webhookUrl: string; - avatarUrl?: string; - threadId?: string; - username?: string; - } | { - type: 'slack'; - webhookUrl: string; - channel?: string; - iconEmoji?: string; - username?: string; - }; - createdAt: number; - enabled: boolean; - id: number; - name: string; - type: 'custom' | 'discord' | 'email' | 'generic' | 'gotify' | 'ntfy' | 'pushover' | 'slack' | 'telegram'; - updatedAt: number; - }; + /** + * Notification destination updated successfully + */ + 200: { + config: + | { + apiToken: string; + priority: -1 | 0 | 1; + type: "pushover"; + userKey: string; + devices?: string; + } + | { + botToken: string; + chatId: string; + type: "telegram"; + threadId?: string; + } + | { + from: string; + smtpHost: string; + smtpPort: number; + to: Array; + type: "email"; + useTLS: boolean; + fromName?: string; + password?: string; + username?: string; + } + | { + method: "GET" | "POST"; + type: "generic"; + url: string; + contentType?: string; + headers?: Array; + messageKey?: string; + titleKey?: string; + useJson?: boolean; + } + | { + priority: "default" | "high" | "low" | "max" | "min"; + topic: string; + type: "ntfy"; + accessToken?: string; + password?: string; + serverUrl?: string; + username?: string; + } + | { + priority: number; + serverUrl: string; + token: string; + type: "gotify"; + path?: string; + } + | { + shoutrrrUrl: string; + type: "custom"; + } + | { + type: "discord"; + webhookUrl: string; + avatarUrl?: string; + threadId?: string; + username?: string; + } + | { + type: "slack"; + webhookUrl: string; + channel?: string; + iconEmoji?: string; + username?: string; + }; + createdAt: number; + enabled: boolean; + id: number; + name: string; + type: "custom" | "discord" | "email" | "generic" | "gotify" | "ntfy" | "pushover" | "slack" | "telegram"; + updatedAt: number; + }; }; -export type UpdateNotificationDestinationResponse = UpdateNotificationDestinationResponses[keyof UpdateNotificationDestinationResponses]; +export type UpdateNotificationDestinationResponse = + UpdateNotificationDestinationResponses[keyof UpdateNotificationDestinationResponses]; export type TestNotificationDestinationData = { - body?: never; - path: { - id: string; - }; - query?: never; - url: '/api/v1/notifications/destinations/{id}/test'; + body?: never; + path: { + id: string; + }; + query?: never; + url: "/api/v1/notifications/destinations/{id}/test"; }; export type TestNotificationDestinationErrors = { - /** - * Notification destination not found - */ - 404: unknown; - /** - * Cannot test disabled destination - */ - 409: unknown; - /** - * Failed to send test notification - */ - 500: unknown; + /** + * Notification destination not found + */ + 404: unknown; + /** + * Cannot test disabled destination + */ + 409: unknown; + /** + * Failed to send test notification + */ + 500: unknown; }; export type TestNotificationDestinationResponses = { - /** - * Test notification sent successfully - */ - 200: { - success: boolean; - }; + /** + * Test notification sent successfully + */ + 200: { + success: boolean; + }; }; -export type TestNotificationDestinationResponse = TestNotificationDestinationResponses[keyof TestNotificationDestinationResponses]; +export type TestNotificationDestinationResponse = + TestNotificationDestinationResponses[keyof TestNotificationDestinationResponses]; export type GetSystemInfoData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/system/info'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/system/info"; }; export type GetSystemInfoResponses = { - /** - * System information with enabled capabilities - */ - 200: { - capabilities: { - rclone: boolean; - sysAdmin: boolean; - }; - }; + /** + * System information with enabled capabilities + */ + 200: { + capabilities: { + rclone: boolean; + sysAdmin: boolean; + }; + }; }; export type GetSystemInfoResponse = GetSystemInfoResponses[keyof GetSystemInfoResponses]; export type GetUpdatesData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/system/updates'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/system/updates"; }; export type GetUpdatesResponses = { - /** - * Update information and missed releases - */ - 200: { - currentVersion: string; - hasUpdate: boolean; - latestVersion: string; - missedReleases: Array<{ - body: string; - publishedAt: string; - url: string; - version: string; - }>; - }; + /** + * Update information and missed releases + */ + 200: { + currentVersion: string; + hasUpdate: boolean; + latestVersion: string; + missedReleases: Array<{ + body: string; + publishedAt: string; + url: string; + version: string; + }>; + }; }; export type GetUpdatesResponse = GetUpdatesResponses[keyof GetUpdatesResponses]; export type GetRegistrationStatusData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/system/registration-status'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/system/registration-status"; }; export type GetRegistrationStatusResponses = { - /** - * Registration status - */ - 200: { - enabled: boolean; - }; + /** + * Registration status + */ + 200: { + enabled: boolean; + }; }; export type GetRegistrationStatusResponse = GetRegistrationStatusResponses[keyof GetRegistrationStatusResponses]; export type SetRegistrationStatusData = { - body?: { - enabled: boolean; - }; - path?: never; - query?: never; - url: '/api/v1/system/registration-status'; + body: { + enabled: boolean; + }; + path?: never; + query?: never; + url: "/api/v1/system/registration-status"; }; export type SetRegistrationStatusResponses = { - /** - * Registration status updated - */ - 200: { - enabled: boolean; - }; + /** + * Registration status updated + */ + 200: { + enabled: boolean; + }; }; export type SetRegistrationStatusResponse = SetRegistrationStatusResponses[keyof SetRegistrationStatusResponses]; export type DownloadResticPasswordData = { - body?: { - password: string; - }; - path?: never; - query?: never; - url: '/api/v1/system/restic-password'; + body: { + password: string; + }; + path?: never; + query?: never; + url: "/api/v1/system/restic-password"; }; export type DownloadResticPasswordResponses = { - /** - * Organization's Restic password - */ - 200: string; + /** + * Organization's Restic password + */ + 200: string; }; export type DownloadResticPasswordResponse = DownloadResticPasswordResponses[keyof DownloadResticPasswordResponses]; export type GetDevPanelData = { - body?: never; - path?: never; - query?: never; - url: '/api/v1/system/dev-panel'; + body?: never; + path?: never; + query?: never; + url: "/api/v1/system/dev-panel"; }; export type GetDevPanelResponses = { - /** - * Dev panel status - */ - 200: { - enabled: boolean; - }; + /** + * Dev panel status + */ + 200: { + enabled: boolean; + }; }; export type GetDevPanelResponse = GetDevPanelResponses[keyof GetDevPanelResponses]; diff --git a/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx b/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx index 8859e071..d7b03e1f 100644 --- a/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx +++ b/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx @@ -18,7 +18,7 @@ export const AdvancedSection = ({ form }: AdvancedSectionProps) => {