// @ts-nocheck
// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
    baseUrl: 'http://localhost:4096' | (string & {});
};

export type GetStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/auth/status';
};

export type GetStatusResponses = {
    /**
     * Authentication system status
     */
    200: {
        hasUsers: boolean;
    };
};

export type GetStatusResponse = GetStatusResponses[keyof GetStatusResponses];

export type GetAdminUsersData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/auth/admin-users';
};

export type GetAdminUsersResponses = {
    /**
     * List of users with roles and status
     */
    200: {
        users: Array<{
            id: string;
            name: string | null;
            email: string;
            role: string;
            banned: boolean;
            accounts: Array<{
                id: string;
                providerId: string;
            }>;
        }>;
        total: number;
    };
};

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}';
};

export type DeleteUserAccountErrors = {
    /**
     * Account not found
     */
    404: unknown;
    /**
     * Cannot delete the last account
     */
    409: unknown;
};

export type DeleteUserAccountResponses = {
    /**
     * Account deleted successfully
     */
    200: unknown;
};

export type GetUserDeletionImpactData = {
    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: {
                volumesCount: number;
                repositoriesCount: number;
                backupSchedulesCount: number;
            };
        }>;
    };
};

export type GetUserDeletionImpactResponse = GetUserDeletionImpactResponses[keyof GetUserDeletionImpactResponses];

export type GetOrgMembersData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/auth/org-members';
};

export type GetOrgMembersResponses = {
    /**
     * List of organization members
     */
    200: {
        members: Array<{
            id: string;
            userId: string;
            role: string;
            createdAt: string;
            user: {
                name: string | null;
                email: string;
            };
        }>;
    };
};

export type GetOrgMembersResponse = GetOrgMembersResponses[keyof GetOrgMembersResponses];

export type UpdateMemberRoleData = {
    body: {
        role: 'member' | 'admin';
    };
    path: {
        memberId: string;
    };
    query?: never;
    url: '/api/v1/auth/org-members/{memberId}/role';
};

export type UpdateMemberRoleErrors = {
    /**
     * Forbidden
     */
    403: unknown;
    /**
     * Member not found
     */
    404: unknown;
};

export type UpdateMemberRoleResponses = {
    /**
     * Member role updated successfully
     */
    200: unknown;
};

export type RemoveOrgMemberData = {
    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;
};

export type RemoveOrgMemberResponses = {
    /**
     * 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<{
            providerId: string;
            organizationSlug: 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: {
        providers: Array<{
            providerId: string;
            type: string;
            issuer: string;
            domain: string;
            autoLinkMatchingEmails: boolean;
            organizationId: string | null;
        }>;
        invitations: Array<{
            id: string;
            email: string;
            role: string;
            status: string;
            expiresAt: string;
        }>;
    };
};

export type GetSsoSettingsResponse = GetSsoSettingsResponses[keyof GetSsoSettingsResponses];

export type GetUserSsoInvitationsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/auth/sso-invitations';
};

export type GetUserSsoInvitationsResponses = {
    /**
     * Pending SSO invitations
     */
    200: Array<{
        id: string;
        organizationName: string;
        role: string;
        expiresAt: string;
        ssoProviders: Array<{
            providerId: string;
        }>;
    }>;
};

export type GetUserSsoInvitationsResponse = GetUserSsoInvitationsResponses[keyof GetUserSsoInvitationsResponses];

export type StartInvitationSsoVerificationData = {
    body: {
        providerId: string;
    };
    path: {
        invitationId: string;
    };
    query?: never;
    url: '/api/v1/auth/sso-invitations/{invitationId}/verify';
};

export type StartInvitationSsoVerificationErrors = {
    /**
     * Invalid provider
     */
    400: unknown;
    /**
     * Forbidden
     */
    403: unknown;
    /**
     * Invitation not found
     */
    404: unknown;
};

export type StartInvitationSsoVerificationResponses = {
    /**
     * SSO verification intent created
     */
    200: unknown;
};

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';
};

export type ListVolumesResponses = {
    /**
     * A list of volumes
     */
    200: Array<{
        id: number;
        shortId: string;
        name: string;
        config: {
            backend: 'nfs';
            server: string;
            exportPath: string;
            port?: string | number;
            version: '3' | '4' | '4.1';
            readOnly?: boolean;
        } | {
            backend: 'smb';
            server: string;
            share: string;
            username?: string;
            password?: string;
            guest?: boolean;
            mapToContainerUidGid?: boolean;
            vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
            domain?: string;
            port?: string | number;
            readOnly?: boolean;
        } | {
            backend: 'webdav';
            server: string;
            path: string;
            username?: string;
            password?: string;
            port?: string | number;
            readOnly?: boolean;
            ssl?: boolean;
        } | {
            backend: 'directory';
            path: string;
            readOnly?: false;
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            readOnly?: boolean;
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            username: string;
            password?: string;
            privateKey?: string;
            path: string;
            readOnly?: boolean;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
        };
        createdAt: number;
        updatedAt: number;
        lastHealthCheck: number;
        type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
        status: 'mounted' | 'unmounted' | 'error';
        lastError: string | null;
        provisioningId?: string | null;
        autoRemount: boolean;
    }>;
};

export type ListVolumesResponse = ListVolumesResponses[keyof ListVolumesResponses];

export type CreateVolumeData = {
    body: {
        name: string;
        config: {
            backend: 'nfs';
            server: string;
            exportPath: string;
            port?: string | number;
            version: '3' | '4' | '4.1';
            readOnly?: boolean;
        } | {
            backend: 'smb';
            server: string;
            share: string;
            username?: string;
            password?: string;
            guest?: boolean;
            mapToContainerUidGid?: boolean;
            vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
            domain?: string;
            port?: string | number;
            readOnly?: boolean;
        } | {
            backend: 'webdav';
            server: string;
            path: string;
            username?: string;
            password?: string;
            port?: string | number;
            readOnly?: boolean;
            ssl?: boolean;
        } | {
            backend: 'directory';
            path: string;
            readOnly?: false;
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            readOnly?: boolean;
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            username: string;
            password?: string;
            privateKey?: string;
            path: string;
            readOnly?: boolean;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
        };
    };
    path?: never;
    query?: never;
    url: '/api/v1/volumes';
};

export type CreateVolumeResponses = {
    /**
     * Volume created successfully
     */
    201: {
        id: number;
        shortId: string;
        name: string;
        config: {
            backend: 'nfs';
            server: string;
            exportPath: string;
            port?: string | number;
            version: '3' | '4' | '4.1';
            readOnly?: boolean;
        } | {
            backend: 'smb';
            server: string;
            share: string;
            username?: string;
            password?: string;
            guest?: boolean;
            mapToContainerUidGid?: boolean;
            vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
            domain?: string;
            port?: string | number;
            readOnly?: boolean;
        } | {
            backend: 'webdav';
            server: string;
            path: string;
            username?: string;
            password?: string;
            port?: string | number;
            readOnly?: boolean;
            ssl?: boolean;
        } | {
            backend: 'directory';
            path: string;
            readOnly?: false;
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            readOnly?: boolean;
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            username: string;
            password?: string;
            privateKey?: string;
            path: string;
            readOnly?: boolean;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
        };
        createdAt: number;
        updatedAt: number;
        lastHealthCheck: number;
        type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
        status: 'mounted' | 'unmounted' | 'error';
        lastError: string | null;
        provisioningId?: string | null;
        autoRemount: boolean;
    };
};

export type CreateVolumeResponse = CreateVolumeResponses[keyof CreateVolumeResponses];

export type TestConnectionData = {
    body: {
        config: {
            backend: 'nfs';
            server: string;
            exportPath: string;
            port?: string | number;
            version: '3' | '4' | '4.1';
            readOnly?: boolean;
        } | {
            backend: 'smb';
            server: string;
            share: string;
            username?: string;
            password?: string;
            guest?: boolean;
            mapToContainerUidGid?: boolean;
            vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
            domain?: string;
            port?: string | number;
            readOnly?: boolean;
        } | {
            backend: 'webdav';
            server: string;
            path: string;
            username?: string;
            password?: string;
            port?: string | number;
            readOnly?: boolean;
            ssl?: boolean;
        } | {
            backend: 'directory';
            path: string;
            readOnly?: false;
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            readOnly?: boolean;
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            username: string;
            password?: string;
            privateKey?: string;
            path: string;
            readOnly?: boolean;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
        };
    };
    path?: never;
    query?: never;
    url: '/api/v1/volumes/test-connection';
};

export type TestConnectionResponses = {
    /**
     * Connection test result
     */
    200: {
        success: boolean;
        message: string;
    };
};

export type TestConnectionResponse = TestConnectionResponses[keyof TestConnectionResponses];

export type DeleteVolumeData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/volumes/{shortId}';
};

export type DeleteVolumeResponses = {
    /**
     * 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}';
};

export type GetVolumeErrors = {
    /**
     * Volume not found
     */
    404: unknown;
};

export type GetVolumeResponses = {
    /**
     * Volume details
     */
    200: {
        volume: {
            id: number;
            shortId: string;
            name: string;
            config: {
                backend: 'nfs';
                server: string;
                exportPath: string;
                port?: string | number;
                version: '3' | '4' | '4.1';
                readOnly?: boolean;
            } | {
                backend: 'smb';
                server: string;
                share: string;
                username?: string;
                password?: string;
                guest?: boolean;
                mapToContainerUidGid?: boolean;
                vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
                domain?: string;
                port?: string | number;
                readOnly?: boolean;
            } | {
                backend: 'webdav';
                server: string;
                path: string;
                username?: string;
                password?: string;
                port?: string | number;
                readOnly?: boolean;
                ssl?: boolean;
            } | {
                backend: 'directory';
                path: string;
                readOnly?: false;
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                readOnly?: boolean;
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                username: string;
                password?: string;
                privateKey?: string;
                path: string;
                readOnly?: boolean;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
            };
            createdAt: number;
            updatedAt: number;
            lastHealthCheck: number;
            type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
            status: 'mounted' | 'unmounted' | 'error';
            lastError: string | null;
            provisioningId?: string | null;
            autoRemount: boolean;
        };
        statfs: {
            total?: number;
            used?: number;
            free?: number;
        };
    };
};

export type GetVolumeResponse = GetVolumeResponses[keyof GetVolumeResponses];

export type UpdateVolumeData = {
    body: {
        name?: string;
        autoRemount?: boolean;
        config?: {
            backend: 'nfs';
            server: string;
            exportPath: string;
            port?: string | number;
            version: '3' | '4' | '4.1';
            readOnly?: boolean;
        } | {
            backend: 'smb';
            server: string;
            share: string;
            username?: string;
            password?: string;
            guest?: boolean;
            mapToContainerUidGid?: boolean;
            vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
            domain?: string;
            port?: string | number;
            readOnly?: boolean;
        } | {
            backend: 'webdav';
            server: string;
            path: string;
            username?: string;
            password?: string;
            port?: string | number;
            readOnly?: boolean;
            ssl?: boolean;
        } | {
            backend: 'directory';
            path: string;
            readOnly?: false;
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            readOnly?: boolean;
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            username: string;
            password?: string;
            privateKey?: string;
            path: string;
            readOnly?: boolean;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
        };
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/volumes/{shortId}';
};

export type UpdateVolumeErrors = {
    /**
     * Volume not found
     */
    404: unknown;
};

export type UpdateVolumeResponses = {
    /**
     * Volume updated successfully
     */
    200: {
        id: number;
        shortId: string;
        name: string;
        config: {
            backend: 'nfs';
            server: string;
            exportPath: string;
            port?: string | number;
            version: '3' | '4' | '4.1';
            readOnly?: boolean;
        } | {
            backend: 'smb';
            server: string;
            share: string;
            username?: string;
            password?: string;
            guest?: boolean;
            mapToContainerUidGid?: boolean;
            vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
            domain?: string;
            port?: string | number;
            readOnly?: boolean;
        } | {
            backend: 'webdav';
            server: string;
            path: string;
            username?: string;
            password?: string;
            port?: string | number;
            readOnly?: boolean;
            ssl?: boolean;
        } | {
            backend: 'directory';
            path: string;
            readOnly?: false;
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            readOnly?: boolean;
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            username: string;
            password?: string;
            privateKey?: string;
            path: string;
            readOnly?: boolean;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
        };
        createdAt: number;
        updatedAt: number;
        lastHealthCheck: number;
        type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
        status: 'mounted' | 'unmounted' | 'error';
        lastError: string | null;
        provisioningId?: string | null;
        autoRemount: boolean;
    };
};

export type UpdateVolumeResponse = UpdateVolumeResponses[keyof UpdateVolumeResponses];

export type MountVolumeData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/volumes/{shortId}/mount';
};

export type MountVolumeResponses = {
    /**
     * Volume mounted successfully
     */
    200: {
        status: 'mounted' | 'unmounted' | 'error';
        error?: string;
    };
};

export type MountVolumeResponse = MountVolumeResponses[keyof MountVolumeResponses];

export type UnmountVolumeData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/volumes/{shortId}/unmount';
};

export type UnmountVolumeResponses = {
    /**
     * Volume unmounted successfully
     */
    200: {
        status: 'mounted' | 'unmounted' | 'error';
        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';
};

export type HealthCheckVolumeErrors = {
    /**
     * Volume not found
     */
    404: unknown;
};

export type HealthCheckVolumeResponses = {
    /**
     * Volume health check result
     */
    200: {
        status: 'mounted' | 'unmounted' | 'error';
        error?: string;
    };
};

export type HealthCheckVolumeResponse = HealthCheckVolumeResponses[keyof HealthCheckVolumeResponses];

export type ListFilesData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: {
        path?: string;
        offset?: number;
        limit?: number;
    };
    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';
            size?: number;
            modifiedAt?: number;
        }>;
        path: string;
        offset: number;
        limit: number;
        total: number;
        hasMore: boolean;
    };
};

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';
};

export type BrowseFilesystemResponses = {
    /**
     * List of directories in the specified path
     */
    200: {
        directories: Array<{
            name: string;
            path: string;
            type: 'directory';
            size?: unknown;
            modifiedAt?: number;
        }>;
        path: string;
    };
};

export type BrowseFilesystemResponse = BrowseFilesystemResponses[keyof BrowseFilesystemResponses];

export type ListRepositoriesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/repositories';
};

export type ListRepositoriesResponses = {
    /**
     * List of repositories
     */
    200: Array<{
        id: string;
        shortId: string;
        provisioningId: string | null;
        name: string;
        type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
        config: {
            backend: 's3';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'r2';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'local';
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'gcs';
            bucket: string;
            projectId: string;
            credentialsJson: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'azure';
            container: string;
            accountName: string;
            accountKey: string;
            endpointSuffix?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rest';
            url: string;
            username?: string;
            password?: string;
            path?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            user: string;
            path: string;
            privateKey: string;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        };
        compressionMode: 'off' | 'auto' | 'max' | null;
        status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
        lastChecked: number | null;
        lastError: string | null;
        doctorResult: {
            success: boolean;
            steps: Array<{
                step: string;
                success: boolean;
                output: string | null;
                error: string | null;
            }>;
            completedAt: number;
        } | null;
        createdAt: number;
        updatedAt: number;
    }>;
};

export type ListRepositoriesResponse = ListRepositoriesResponses[keyof ListRepositoriesResponses];

export type CreateRepositoryData = {
    body: {
        name: string;
        compressionMode?: 'off' | 'auto' | 'max';
        config: {
            backend: 's3';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'r2';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'local';
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'gcs';
            bucket: string;
            projectId: string;
            credentialsJson: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'azure';
            container: string;
            accountName: string;
            accountKey: string;
            endpointSuffix?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rest';
            url: string;
            username?: string;
            password?: string;
            path?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            user: string;
            path: string;
            privateKey: string;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        };
    };
    path?: never;
    query?: never;
    url: '/api/v1/repositories';
};

export type CreateRepositoryResponses = {
    /**
     * Repository created successfully
     */
    201: {
        message: string;
        repository: {
            id: string;
            shortId: string;
            name: string;
        };
    };
};

export type CreateRepositoryResponse = CreateRepositoryResponses[keyof CreateRepositoryResponses];

export type ListRcloneRemotesData = {
    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;
    }>;
};

export type ListRcloneRemotesResponse = ListRcloneRemotesResponses[keyof ListRcloneRemotesResponses];

export type DeleteRepositoryData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}';
};

export type DeleteRepositoryResponses = {
    /**
     * 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}';
};

export type GetRepositoryResponses = {
    /**
     * Repository details
     */
    200: {
        id: string;
        shortId: string;
        provisioningId: string | null;
        name: string;
        type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
        config: {
            backend: 's3';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'r2';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'local';
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'gcs';
            bucket: string;
            projectId: string;
            credentialsJson: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'azure';
            container: string;
            accountName: string;
            accountKey: string;
            endpointSuffix?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rest';
            url: string;
            username?: string;
            password?: string;
            path?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            user: string;
            path: string;
            privateKey: string;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        };
        compressionMode: 'off' | 'auto' | 'max' | null;
        status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
        lastChecked: number | null;
        lastError: string | null;
        doctorResult: {
            success: boolean;
            steps: Array<{
                step: string;
                success: boolean;
                output: string | null;
                error: string | null;
            }>;
            completedAt: number;
        } | null;
        createdAt: number;
        updatedAt: number;
    };
};

export type GetRepositoryResponse = GetRepositoryResponses[keyof GetRepositoryResponses];

export type UpdateRepositoryData = {
    body: {
        name?: string;
        compressionMode?: 'off' | 'auto' | 'max';
        config?: {
            backend: 's3';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'r2';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'local';
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'gcs';
            bucket: string;
            projectId: string;
            credentialsJson: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'azure';
            container: string;
            accountName: string;
            accountKey: string;
            endpointSuffix?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rest';
            url: string;
            username?: string;
            password?: string;
            path?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            user: string;
            path: string;
            privateKey: string;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        };
    };
    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;
};

export type UpdateRepositoryResponses = {
    /**
     * Repository updated successfully
     */
    200: {
        id: string;
        shortId: string;
        provisioningId: string | null;
        name: string;
        type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
        config: {
            backend: 's3';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'r2';
            endpoint: string;
            bucket: string;
            accessKeyId: string;
            secretAccessKey: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'local';
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'gcs';
            bucket: string;
            projectId: string;
            credentialsJson: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'azure';
            container: string;
            accountName: string;
            accountKey: string;
            endpointSuffix?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rclone';
            remote: string;
            path: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'rest';
            url: string;
            username?: string;
            password?: string;
            path?: string;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        } | {
            backend: 'sftp';
            host: string;
            port?: string | number;
            user: string;
            path: string;
            privateKey: string;
            skipHostKeyCheck?: boolean;
            knownHosts?: string;
            allowLegacySshRsa?: boolean;
            isExistingRepository?: boolean;
            customPassword?: string;
            cacert?: string;
            insecureTls?: boolean;
            uploadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
            downloadLimit?: {
                enabled?: boolean;
                value?: number;
                unit?: 'Kbps' | 'Mbps' | 'Gbps';
            };
        };
        compressionMode: 'off' | 'auto' | 'max' | null;
        status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
        lastChecked: number | null;
        lastError: string | null;
        doctorResult: {
            success: boolean;
            steps: Array<{
                step: string;
                success: boolean;
                output: string | null;
                error: string | null;
            }>;
            completedAt: number;
        } | null;
        createdAt: number;
        updatedAt: number;
    };
};

export type UpdateRepositoryResponse = UpdateRepositoryResponses[keyof UpdateRepositoryResponses];

export type GetRepositoryStatsData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/stats';
};

export type GetRepositoryStatsResponses = {
    /**
     * Repository statistics
     */
    200: {
        total_size?: number;
        total_uncompressed_size?: number;
        compression_ratio?: number;
        compression_progress?: number;
        compression_space_saving?: number;
        snapshots_count?: number;
    };
};

export type GetRepositoryStatsResponse = GetRepositoryStatsResponses[keyof GetRepositoryStatsResponses];

export type RefreshRepositoryStatsData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/stats/refresh';
};

export type RefreshRepositoryStatsResponses = {
    /**
     * Refreshed repository statistics
     */
    200: {
        total_size?: number;
        total_uncompressed_size?: number;
        compression_ratio?: number;
        compression_progress?: number;
        compression_space_saving?: number;
        snapshots_count?: number;
    };
};

export type RefreshRepositoryStatsResponse = RefreshRepositoryStatsResponses[keyof RefreshRepositoryStatsResponses];

export type DeleteSnapshotsData = {
    body: {
        snapshotIds: Array<string>;
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/snapshots';
};

export type DeleteSnapshotsResponses = {
    /**
     * 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';
};

export type ListSnapshotsResponses = {
    /**
     * List of snapshots
     */
    200: Array<{
        short_id: string;
        time: number;
        paths: Array<string>;
        size: number;
        duration: number;
        tags: Array<string>;
        retentionCategories: Array<string>;
        hostname?: string;
        summary?: {
            files_new: number;
            files_changed: number;
            files_unmodified: number;
            dirs_new: number;
            dirs_changed: number;
            dirs_unmodified: number;
            data_blobs: number;
            tree_blobs: number;
            data_added: number;
            data_added_packed?: number;
            total_files_processed: number;
            total_bytes_processed: number;
            backup_start: string;
            backup_end: string;
        };
    }>;
};

export type ListSnapshotsResponse = ListSnapshotsResponses[keyof ListSnapshotsResponses];

export type RefreshSnapshotsData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/snapshots/refresh';
};

export type RefreshSnapshotsResponses = {
    /**
     * Snapshot cache cleared and refreshed
     */
    200: {
        message: string;
        count: number;
    };
};

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}';
};

export type DeleteSnapshotResponses = {
    /**
     * 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}';
};

export type GetSnapshotDetailsResponses = {
    /**
     * Snapshot details
     */
    200: {
        short_id: string;
        time: number;
        paths: Array<string>;
        size: number;
        duration: number;
        tags: Array<string>;
        retentionCategories: Array<string>;
        hostname?: string;
        summary?: {
            files_new: number;
            files_changed: number;
            files_unmodified: number;
            dirs_new: number;
            dirs_changed: number;
            dirs_unmodified: number;
            data_blobs: number;
            tree_blobs: number;
            data_added: number;
            data_added_packed?: number;
            total_files_processed: number;
            total_bytes_processed: number;
            backup_start: string;
            backup_end: string;
        };
    };
};

export type GetSnapshotDetailsResponse = GetSnapshotDetailsResponses[keyof GetSnapshotDetailsResponses];

export type ListSnapshotFilesData = {
    body?: never;
    path: {
        shortId: string;
        snapshotId: string;
    };
    query?: {
        path?: string;
        offset?: number;
        limit?: number;
    };
    url: '/api/v1/repositories/{shortId}/snapshots/{snapshotId}/files';
};

export type ListSnapshotFilesResponses = {
    /**
     * List of files and directories in the snapshot
     */
    200: {
        snapshot: {
            id: string;
            short_id: string;
            time: string;
            hostname?: string;
            paths: Array<string>;
        };
        files: Array<{
            name: string;
            type: string;
            path: string;
            uid?: number;
            gid?: number;
            size?: number;
            mode?: number;
            mtime?: string;
            atime?: string;
            ctime?: string;
        }>;
        offset: number;
        limit: number;
        total: number;
        hasMore: boolean;
    };
};

export type ListSnapshotFilesResponse = ListSnapshotFilesResponses[keyof ListSnapshotFilesResponses];

export type DumpSnapshotData = {
    body?: never;
    path: {
        shortId: string;
        snapshotId: string;
    };
    query?: {
        path?: string;
        kind?: 'file' | 'dir';
    };
    url: '/api/v1/repositories/{shortId}/snapshots/{snapshotId}/dump';
};

export type DumpSnapshotResponses = {
    /**
     * Snapshot content stream
     */
    200: Blob | File;
};

export type DumpSnapshotResponse = DumpSnapshotResponses[keyof DumpSnapshotResponses];

export type RestoreSnapshotData = {
    body: {
        snapshotId: string;
        include?: Array<string>;
        selectedItemKind?: 'file' | 'dir';
        exclude?: Array<string>;
        excludeXattr?: Array<string>;
        delete?: boolean;
        targetPath?: string;
        targetAgentId?: string;
        overwrite?: 'always' | 'if-changed' | 'if-newer' | 'never';
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/restore';
};

export type RestoreSnapshotResponses = {
    /**
     * Snapshot restore started
     */
    202: {
        restoreId: string;
        status: 'started';
    };
};

export type RestoreSnapshotResponse = RestoreSnapshotResponses[keyof RestoreSnapshotResponses];

export type CancelDoctorData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/doctor';
};

export type CancelDoctorErrors = {
    /**
     * No doctor operation is currently running
     */
    409: unknown;
};

export type CancelDoctorResponses = {
    /**
     * 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';
};

export type StartDoctorErrors = {
    /**
     * Doctor operation already in progress
     */
    409: unknown;
};

export type StartDoctorResponses = {
    /**
     * 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';
};

export type UnlockRepositoryResponses = {
    /**
     * Repository unlocked successfully
     */
    200: {
        success: boolean;
        message: string;
    };
};

export type UnlockRepositoryResponse = UnlockRepositoryResponses[keyof UnlockRepositoryResponses];

export type TagSnapshotsData = {
    body: {
        snapshotIds: Array<string>;
        add?: Array<string>;
        remove?: Array<string>;
        set?: Array<string>;
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/snapshots/tag';
};

export type TagSnapshotsResponses = {
    /**
     * Snapshots tagged successfully
     */
    200: {
        message: string;
    };
};

export type TagSnapshotsResponse = TagSnapshotsResponses[keyof TagSnapshotsResponses];

export type DevPanelExecData = {
    body: {
        command: string;
        args?: Array<string>;
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/repositories/{shortId}/exec';
};

export type DevPanelExecErrors = {
    /**
     * Dev panel not enabled
     */
    403: unknown;
};

export type DevPanelExecResponses = {
    /**
     * 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';
};

export type ListBackupSchedulesResponses = {
    /**
     * List of backup schedules
     */
    200: Array<{
        id: number;
        shortId: string;
        name: string;
        volumeId: number;
        repositoryId: string;
        enabled: boolean;
        cronExpression: string;
        retentionPolicy: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        } | null;
        excludePatterns: Array<string> | null;
        excludeIfPresent: Array<string> | null;
        includePaths: Array<string> | null;
        includePatterns: Array<string> | null;
        oneFileSystem: boolean;
        customResticParams: Array<string> | null;
        backupWebhooks: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries: number;
        retryDelay: number;
        lastBackupAt: number | null;
        lastBackupStatus: 'success' | 'error' | 'in_progress' | 'warning' | null;
        lastBackupError: string | null;
        nextBackupAt: number | null;
        createdAt: number;
        updatedAt: number;
        volume: {
            id: number;
            shortId: string;
            name: string;
            config: {
                backend: 'nfs';
                server: string;
                exportPath: string;
                port?: string | number;
                version: '3' | '4' | '4.1';
                readOnly?: boolean;
            } | {
                backend: 'smb';
                server: string;
                share: string;
                username?: string;
                password?: string;
                guest?: boolean;
                mapToContainerUidGid?: boolean;
                vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
                domain?: string;
                port?: string | number;
                readOnly?: boolean;
            } | {
                backend: 'webdav';
                server: string;
                path: string;
                username?: string;
                password?: string;
                port?: string | number;
                readOnly?: boolean;
                ssl?: boolean;
            } | {
                backend: 'directory';
                path: string;
                readOnly?: false;
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                readOnly?: boolean;
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                username: string;
                password?: string;
                privateKey?: string;
                path: string;
                readOnly?: boolean;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
            };
            createdAt: number;
            updatedAt: number;
            lastHealthCheck: number;
            type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
            status: 'mounted' | 'unmounted' | 'error';
            lastError: string | null;
            provisioningId?: string | null;
            autoRemount: boolean;
        };
        repository: {
            id: string;
            shortId: string;
            provisioningId: string | null;
            name: string;
            type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
            config: {
                backend: 's3';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'r2';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'local';
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'gcs';
                bucket: string;
                projectId: string;
                credentialsJson: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'azure';
                container: string;
                accountName: string;
                accountKey: string;
                endpointSuffix?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rest';
                url: string;
                username?: string;
                password?: string;
                path?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                user: string;
                path: string;
                privateKey: string;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            };
            compressionMode: 'off' | 'auto' | 'max' | null;
            status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
            lastChecked: number | null;
            lastError: string | null;
            doctorResult: {
                success: boolean;
                steps: Array<{
                    step: string;
                    success: boolean;
                    output: string | null;
                    error: string | null;
                }>;
                completedAt: number;
            } | null;
            createdAt: number;
            updatedAt: number;
        };
    }>;
};

export type ListBackupSchedulesResponse = ListBackupSchedulesResponses[keyof ListBackupSchedulesResponses];

export type CreateBackupScheduleData = {
    body: {
        name: string;
        volumeId: string | number;
        repositoryId: string;
        enabled: boolean;
        cronExpression: string;
        retentionPolicy?: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        };
        excludePatterns?: Array<string>;
        excludeIfPresent?: Array<string>;
        includePaths?: Array<string>;
        includePatterns?: Array<string>;
        oneFileSystem?: boolean;
        tags?: Array<string>;
        customResticParams?: Array<string>;
        backupWebhooks?: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries?: number;
        retryDelay?: number;
    };
    path?: never;
    query?: never;
    url: '/api/v1/backups';
};

export type CreateBackupScheduleResponses = {
    /**
     * Backup schedule created successfully
     */
    201: {
        id: number;
        shortId: string;
        name: string;
        volumeId: number;
        repositoryId: string;
        enabled: boolean;
        cronExpression: string;
        retentionPolicy: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        } | null;
        excludePatterns: Array<string> | null;
        excludeIfPresent: Array<string> | null;
        includePaths: Array<string> | null;
        includePatterns: Array<string> | null;
        oneFileSystem: boolean;
        customResticParams: Array<string> | null;
        backupWebhooks: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries: number;
        retryDelay: number;
        lastBackupAt: number | null;
        lastBackupStatus: 'success' | 'error' | 'in_progress' | 'warning' | null;
        lastBackupError: string | null;
        nextBackupAt: number | null;
        createdAt: number;
        updatedAt: number;
    };
};

export type CreateBackupScheduleResponse = CreateBackupScheduleResponses[keyof CreateBackupScheduleResponses];

export type DeleteBackupScheduleData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}';
};

export type DeleteBackupScheduleResponses = {
    /**
     * 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}';
};

export type GetBackupScheduleResponses = {
    /**
     * Backup schedule details
     */
    200: {
        id: number;
        shortId: string;
        name: string;
        volumeId: number;
        repositoryId: string;
        enabled: boolean;
        cronExpression: string;
        retentionPolicy: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        } | null;
        excludePatterns: Array<string> | null;
        excludeIfPresent: Array<string> | null;
        includePaths: Array<string> | null;
        includePatterns: Array<string> | null;
        oneFileSystem: boolean;
        customResticParams: Array<string> | null;
        backupWebhooks: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries: number;
        retryDelay: number;
        lastBackupAt: number | null;
        lastBackupStatus: 'success' | 'error' | 'in_progress' | 'warning' | null;
        lastBackupError: string | null;
        nextBackupAt: number | null;
        createdAt: number;
        updatedAt: number;
        volume: {
            id: number;
            shortId: string;
            name: string;
            config: {
                backend: 'nfs';
                server: string;
                exportPath: string;
                port?: string | number;
                version: '3' | '4' | '4.1';
                readOnly?: boolean;
            } | {
                backend: 'smb';
                server: string;
                share: string;
                username?: string;
                password?: string;
                guest?: boolean;
                mapToContainerUidGid?: boolean;
                vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
                domain?: string;
                port?: string | number;
                readOnly?: boolean;
            } | {
                backend: 'webdav';
                server: string;
                path: string;
                username?: string;
                password?: string;
                port?: string | number;
                readOnly?: boolean;
                ssl?: boolean;
            } | {
                backend: 'directory';
                path: string;
                readOnly?: false;
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                readOnly?: boolean;
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                username: string;
                password?: string;
                privateKey?: string;
                path: string;
                readOnly?: boolean;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
            };
            createdAt: number;
            updatedAt: number;
            lastHealthCheck: number;
            type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
            status: 'mounted' | 'unmounted' | 'error';
            lastError: string | null;
            provisioningId?: string | null;
            autoRemount: boolean;
        };
        repository: {
            id: string;
            shortId: string;
            provisioningId: string | null;
            name: string;
            type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
            config: {
                backend: 's3';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'r2';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'local';
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'gcs';
                bucket: string;
                projectId: string;
                credentialsJson: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'azure';
                container: string;
                accountName: string;
                accountKey: string;
                endpointSuffix?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rest';
                url: string;
                username?: string;
                password?: string;
                path?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                user: string;
                path: string;
                privateKey: string;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            };
            compressionMode: 'off' | 'auto' | 'max' | null;
            status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
            lastChecked: number | null;
            lastError: string | null;
            doctorResult: {
                success: boolean;
                steps: Array<{
                    step: string;
                    success: boolean;
                    output: string | null;
                    error: string | null;
                }>;
                completedAt: number;
            } | null;
            createdAt: number;
            updatedAt: number;
        };
    };
};

export type GetBackupScheduleResponse = GetBackupScheduleResponses[keyof GetBackupScheduleResponses];

export type UpdateBackupScheduleData = {
    body: {
        name?: string;
        repositoryId: string;
        enabled?: boolean;
        cronExpression: string;
        retentionPolicy?: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        };
        excludePatterns?: Array<string>;
        excludeIfPresent?: Array<string>;
        includePaths?: Array<string>;
        includePatterns?: Array<string>;
        oneFileSystem?: boolean;
        tags?: Array<string>;
        customResticParams?: Array<string>;
        backupWebhooks?: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries?: number;
        retryDelay?: number;
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}';
};

export type UpdateBackupScheduleResponses = {
    /**
     * Backup schedule updated successfully
     */
    200: {
        id: number;
        shortId: string;
        name: string;
        volumeId: number;
        repositoryId: string;
        enabled: boolean;
        cronExpression: string;
        retentionPolicy: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        } | null;
        excludePatterns: Array<string> | null;
        excludeIfPresent: Array<string> | null;
        includePaths: Array<string> | null;
        includePatterns: Array<string> | null;
        oneFileSystem: boolean;
        customResticParams: Array<string> | null;
        backupWebhooks: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries: number;
        retryDelay: number;
        lastBackupAt: number | null;
        lastBackupStatus: 'success' | 'error' | 'in_progress' | 'warning' | null;
        lastBackupError: string | null;
        nextBackupAt: number | null;
        createdAt: number;
        updatedAt: number;
    };
};

export type UpdateBackupScheduleResponse = UpdateBackupScheduleResponses[keyof UpdateBackupScheduleResponses];

export type GetBackupScheduleForVolumeData = {
    body?: never;
    path: {
        volumeShortId: string;
    };
    query?: never;
    url: '/api/v1/backups/volume/{volumeShortId}';
};

export type GetBackupScheduleForVolumeResponses = {
    /**
     * Backup schedule details for the volume
     */
    200: {
        id: number;
        shortId: string;
        name: string;
        volumeId: number;
        repositoryId: string;
        enabled: boolean;
        cronExpression: string;
        retentionPolicy: {
            keepLast?: number;
            keepHourly?: number;
            keepDaily?: number;
            keepWeekly?: number;
            keepMonthly?: number;
            keepYearly?: number;
            keepWithinDuration?: string;
        } | null;
        excludePatterns: Array<string> | null;
        excludeIfPresent: Array<string> | null;
        includePaths: Array<string> | null;
        includePatterns: Array<string> | null;
        oneFileSystem: boolean;
        customResticParams: Array<string> | null;
        backupWebhooks: {
            pre: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
            post: {
                url: string;
                headers?: Array<string>;
                body?: string;
            } | null;
        } | null;
        maxRetries: number;
        retryDelay: number;
        lastBackupAt: number | null;
        lastBackupStatus: 'success' | 'error' | 'in_progress' | 'warning' | null;
        lastBackupError: string | null;
        nextBackupAt: number | null;
        createdAt: number;
        updatedAt: number;
        volume: {
            id: number;
            shortId: string;
            name: string;
            config: {
                backend: 'nfs';
                server: string;
                exportPath: string;
                port?: string | number;
                version: '3' | '4' | '4.1';
                readOnly?: boolean;
            } | {
                backend: 'smb';
                server: string;
                share: string;
                username?: string;
                password?: string;
                guest?: boolean;
                mapToContainerUidGid?: boolean;
                vers?: '1.0' | '2.0' | '2.1' | '3.0' | 'auto';
                domain?: string;
                port?: string | number;
                readOnly?: boolean;
            } | {
                backend: 'webdav';
                server: string;
                path: string;
                username?: string;
                password?: string;
                port?: string | number;
                readOnly?: boolean;
                ssl?: boolean;
            } | {
                backend: 'directory';
                path: string;
                readOnly?: false;
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                readOnly?: boolean;
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                username: string;
                password?: string;
                privateKey?: string;
                path: string;
                readOnly?: boolean;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
            };
            createdAt: number;
            updatedAt: number;
            lastHealthCheck: number;
            type: 'nfs' | 'smb' | 'directory' | 'webdav' | 'rclone' | 'sftp';
            status: 'mounted' | 'unmounted' | 'error';
            lastError: string | null;
            provisioningId?: string | null;
            autoRemount: boolean;
        };
        repository: {
            id: string;
            shortId: string;
            provisioningId: string | null;
            name: string;
            type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
            config: {
                backend: 's3';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'r2';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'local';
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'gcs';
                bucket: string;
                projectId: string;
                credentialsJson: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'azure';
                container: string;
                accountName: string;
                accountKey: string;
                endpointSuffix?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rest';
                url: string;
                username?: string;
                password?: string;
                path?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                user: string;
                path: string;
                privateKey: string;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            };
            compressionMode: 'off' | 'auto' | 'max' | null;
            status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
            lastChecked: number | null;
            lastError: string | null;
            doctorResult: {
                success: boolean;
                steps: Array<{
                    step: string;
                    success: boolean;
                    output: string | null;
                    error: string | null;
                }>;
                completedAt: number;
            } | null;
            createdAt: number;
            updatedAt: number;
        };
    } | null;
};

export type GetBackupScheduleForVolumeResponse = GetBackupScheduleForVolumeResponses[keyof GetBackupScheduleForVolumeResponses];

export type RunBackupNowData = {
    body?: never;
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}/run';
};

export type RunBackupNowResponses = {
    /**
     * 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';
};

export type StopBackupErrors = {
    /**
     * No backup is currently running for this schedule
     */
    409: unknown;
};

export type StopBackupResponses = {
    /**
     * 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';
};

export type RunForgetResponses = {
    /**
     * 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';
};

export type GetScheduleNotificationsResponses = {
    /**
     * List of notification assignments for the schedule
     */
    200: Array<{
        scheduleId: number;
        destinationId: number;
        notifyOnStart: boolean;
        notifyOnSuccess: boolean;
        notifyOnWarning: boolean;
        notifyOnFailure: boolean;
        createdAt: number;
        destination: {
            id: number;
            name: string;
            enabled: boolean;
            status: 'healthy' | 'error' | 'unknown';
            lastChecked: number | null;
            lastError: string | null;
            type: 'email' | 'slack' | 'discord' | 'gotify' | 'ntfy' | 'pushover' | 'telegram' | 'generic' | 'custom';
            config: {
                type: 'email';
                smtpHost: string;
                smtpPort: number;
                username?: string;
                password?: string;
                from: string;
                fromName?: string;
                to: Array<string>;
                useTLS: boolean;
            } | {
                type: 'slack';
                webhookUrl: string;
                username?: string;
                iconEmoji?: string;
            } | {
                type: 'discord';
                webhookUrl: string;
                username?: string;
                avatarUrl?: string;
                threadId?: string;
            } | {
                type: 'gotify';
                serverUrl: string;
                token: string;
                path?: string;
                priority: number;
            } | {
                type: 'ntfy';
                serverUrl?: string;
                topic: string;
                priority: 'max' | 'high' | 'default' | 'low' | 'min';
                username?: string;
                password?: string;
                accessToken?: string;
            } | {
                type: 'pushover';
                userKey: string;
                apiToken: string;
                devices?: string;
                priority: -1 | 0 | 1;
            } | {
                type: 'telegram';
                botToken: string;
                chatId: string;
                threadId?: string;
            } | {
                type: 'generic';
                url: string;
                method: 'GET' | 'POST';
                contentType?: string;
                headers?: Array<string>;
                useJson?: boolean;
                titleKey?: string;
                messageKey?: string;
            } | {
                type: 'custom';
                shoutrrrUrl: string;
            };
            createdAt: number;
            updatedAt: number;
        };
    }>;
};

export type GetScheduleNotificationsResponse = GetScheduleNotificationsResponses[keyof GetScheduleNotificationsResponses];

export type UpdateScheduleNotificationsData = {
    body: {
        assignments: Array<{
            destinationId: number;
            notifyOnStart: boolean;
            notifyOnSuccess: boolean;
            notifyOnWarning: boolean;
            notifyOnFailure: boolean;
        }>;
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}/notifications';
};

export type UpdateScheduleNotificationsResponses = {
    /**
     * Notification assignments updated successfully
     */
    200: Array<{
        scheduleId: number;
        destinationId: number;
        notifyOnStart: boolean;
        notifyOnSuccess: boolean;
        notifyOnWarning: boolean;
        notifyOnFailure: boolean;
        createdAt: number;
        destination: {
            id: number;
            name: string;
            enabled: boolean;
            status: 'healthy' | 'error' | 'unknown';
            lastChecked: number | null;
            lastError: string | null;
            type: 'email' | 'slack' | 'discord' | 'gotify' | 'ntfy' | 'pushover' | 'telegram' | 'generic' | 'custom';
            config: {
                type: 'email';
                smtpHost: string;
                smtpPort: number;
                username?: string;
                password?: string;
                from: string;
                fromName?: string;
                to: Array<string>;
                useTLS: boolean;
            } | {
                type: 'slack';
                webhookUrl: string;
                username?: string;
                iconEmoji?: string;
            } | {
                type: 'discord';
                webhookUrl: string;
                username?: string;
                avatarUrl?: string;
                threadId?: string;
            } | {
                type: 'gotify';
                serverUrl: string;
                token: string;
                path?: string;
                priority: number;
            } | {
                type: 'ntfy';
                serverUrl?: string;
                topic: string;
                priority: 'max' | 'high' | 'default' | 'low' | 'min';
                username?: string;
                password?: string;
                accessToken?: string;
            } | {
                type: 'pushover';
                userKey: string;
                apiToken: string;
                devices?: string;
                priority: -1 | 0 | 1;
            } | {
                type: 'telegram';
                botToken: string;
                chatId: string;
                threadId?: string;
            } | {
                type: 'generic';
                url: string;
                method: 'GET' | 'POST';
                contentType?: string;
                headers?: Array<string>;
                useJson?: boolean;
                titleKey?: string;
                messageKey?: string;
            } | {
                type: 'custom';
                shoutrrrUrl: string;
            };
            createdAt: number;
            updatedAt: number;
        };
    }>;
};

export type UpdateScheduleNotificationsResponse = UpdateScheduleNotificationsResponses[keyof UpdateScheduleNotificationsResponses];

export type GetScheduleMirrorsData = {
    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<{
        scheduleId: string;
        repositoryId: string;
        enabled: boolean;
        lastCopyAt: number | null;
        lastCopyStatus: 'success' | 'error' | 'in_progress' | null;
        lastCopyError: string | null;
        createdAt: number;
        repository: {
            id: string;
            shortId: string;
            provisioningId: string | null;
            name: string;
            type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
            config: {
                backend: 's3';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'r2';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'local';
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'gcs';
                bucket: string;
                projectId: string;
                credentialsJson: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'azure';
                container: string;
                accountName: string;
                accountKey: string;
                endpointSuffix?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rest';
                url: string;
                username?: string;
                password?: string;
                path?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                user: string;
                path: string;
                privateKey: string;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            };
            compressionMode: 'off' | 'auto' | 'max' | null;
            status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
            lastChecked: number | null;
            lastError: string | null;
            doctorResult: {
                success: boolean;
                steps: Array<{
                    step: string;
                    success: boolean;
                    output: string | null;
                    error: string | null;
                }>;
                completedAt: number;
            } | null;
            createdAt: number;
            updatedAt: number;
        };
    }>;
};

export type GetScheduleMirrorsResponse = GetScheduleMirrorsResponses[keyof GetScheduleMirrorsResponses];

export type UpdateScheduleMirrorsData = {
    body: {
        mirrors: Array<{
            repositoryId: string;
            enabled: boolean;
        }>;
    };
    path: {
        shortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}/mirrors';
};

export type UpdateScheduleMirrorsResponses = {
    /**
     * Mirror assignments updated successfully
     */
    200: Array<{
        scheduleId: string;
        repositoryId: string;
        enabled: boolean;
        lastCopyAt: number | null;
        lastCopyStatus: 'success' | 'error' | 'in_progress' | null;
        lastCopyError: string | null;
        createdAt: number;
        repository: {
            id: string;
            shortId: string;
            provisioningId: string | null;
            name: string;
            type: 'local' | 's3' | 'r2' | 'gcs' | 'azure' | 'rclone' | 'rest' | 'sftp';
            config: {
                backend: 's3';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'r2';
                endpoint: string;
                bucket: string;
                accessKeyId: string;
                secretAccessKey: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'local';
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'gcs';
                bucket: string;
                projectId: string;
                credentialsJson: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'azure';
                container: string;
                accountName: string;
                accountKey: string;
                endpointSuffix?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rclone';
                remote: string;
                path: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'rest';
                url: string;
                username?: string;
                password?: string;
                path?: string;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            } | {
                backend: 'sftp';
                host: string;
                port?: string | number;
                user: string;
                path: string;
                privateKey: string;
                skipHostKeyCheck?: boolean;
                knownHosts?: string;
                allowLegacySshRsa?: boolean;
                isExistingRepository?: boolean;
                customPassword?: string;
                cacert?: string;
                insecureTls?: boolean;
                uploadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
                downloadLimit?: {
                    enabled?: boolean;
                    value?: number;
                    unit?: 'Kbps' | 'Mbps' | 'Gbps';
                };
            };
            compressionMode: 'off' | 'auto' | 'max' | null;
            status: 'healthy' | 'error' | 'unknown' | 'doctor' | 'cancelled' | null;
            lastChecked: number | null;
            lastError: string | null;
            doctorResult: {
                success: boolean;
                steps: Array<{
                    step: string;
                    success: boolean;
                    output: string | null;
                    error: string | null;
                }>;
                completedAt: number;
            } | null;
            createdAt: number;
            updatedAt: number;
        };
    }>;
};

export type UpdateScheduleMirrorsResponse = UpdateScheduleMirrorsResponses[keyof UpdateScheduleMirrorsResponses];

export type GetMirrorSyncStatusData = {
    body?: never;
    path: {
        shortId: string;
        mirrorShortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}/mirrors/{mirrorShortId}/status';
};

export type GetMirrorSyncStatusResponses = {
    /**
     * Mirror sync status with missing snapshots
     */
    200: {
        sourceCount: number;
        mirrorCount: number;
        missingSnapshots: Array<{
            short_id: string;
            time: string;
            size: number;
        }>;
    };
};

export type GetMirrorSyncStatusResponse = GetMirrorSyncStatusResponses[keyof GetMirrorSyncStatusResponses];

export type SyncMirrorData = {
    body: {
        snapshotIds?: Array<string>;
    };
    path: {
        shortId: string;
        mirrorShortId: string;
    };
    query?: never;
    url: '/api/v1/backups/{shortId}/mirrors/{mirrorShortId}/sync';
};

export type SyncMirrorErrors = {
    /**
     * Mirror is already syncing
     */
    409: unknown;
};

export type SyncMirrorResponses = {
    /**
     * Mirror sync started successfully
     */
    200: {
        success: boolean;
    };
};

export type SyncMirrorResponse = SyncMirrorResponses[keyof SyncMirrorResponses];

export type GetMirrorCompatibilityData = {
    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<{
        repositoryId: string;
        compatible: boolean;
        reason: string | null;
    }>;
};

export type GetMirrorCompatibilityResponse = GetMirrorCompatibilityResponses[keyof GetMirrorCompatibilityResponses];

export type ReorderBackupSchedulesData = {
    body: {
        scheduleShortIds: Array<string>;
    };
    path?: never;
    query?: never;
    url: '/api/v1/backups/reorder';
};

export type ReorderBackupSchedulesResponses = {
    /**
     * 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';
};

export type GetBackupProgressResponses = {
    /**
     * Current backup progress or null if not yet available
     */
    200: {
        scheduleId: string;
        volumeName: string;
        repositoryName: string;
        seconds_elapsed?: number;
        seconds_remaining?: number;
        percent_done?: number;
        total_files?: number;
        files_done?: number;
        total_bytes?: number;
        bytes_done?: number;
        current_files?: Array<string>;
    } | null;
};

export type GetBackupProgressResponse = GetBackupProgressResponses[keyof GetBackupProgressResponses];

export type ListNotificationDestinationsData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/notifications/destinations';
};

export type ListNotificationDestinationsResponses = {
    /**
     * A list of notification destinations
     */
    200: Array<{
        id: number;
        name: string;
        enabled: boolean;
        status: 'healthy' | 'error' | 'unknown';
        lastChecked: number | null;
        lastError: string | null;
        type: 'email' | 'slack' | 'discord' | 'gotify' | 'ntfy' | 'pushover' | 'telegram' | 'generic' | 'custom';
        config: {
            type: 'email';
            smtpHost: string;
            smtpPort: number;
            username?: string;
            password?: string;
            from: string;
            fromName?: string;
            to: Array<string>;
            useTLS: boolean;
        } | {
            type: 'slack';
            webhookUrl: string;
            username?: string;
            iconEmoji?: string;
        } | {
            type: 'discord';
            webhookUrl: string;
            username?: string;
            avatarUrl?: string;
            threadId?: string;
        } | {
            type: 'gotify';
            serverUrl: string;
            token: string;
            path?: string;
            priority: number;
        } | {
            type: 'ntfy';
            serverUrl?: string;
            topic: string;
            priority: 'max' | 'high' | 'default' | 'low' | 'min';
            username?: string;
            password?: string;
            accessToken?: string;
        } | {
            type: 'pushover';
            userKey: string;
            apiToken: string;
            devices?: string;
            priority: -1 | 0 | 1;
        } | {
            type: 'telegram';
            botToken: string;
            chatId: string;
            threadId?: string;
        } | {
            type: 'generic';
            url: string;
            method: 'GET' | 'POST';
            contentType?: string;
            headers?: Array<string>;
            useJson?: boolean;
            titleKey?: string;
            messageKey?: string;
        } | {
            type: 'custom';
            shoutrrrUrl: string;
        };
        createdAt: number;
        updatedAt: number;
    }>;
};

export type ListNotificationDestinationsResponse = ListNotificationDestinationsResponses[keyof ListNotificationDestinationsResponses];

export type CreateNotificationDestinationData = {
    body: {
        name: string;
        config: {
            type: 'email';
            smtpHost: string;
            smtpPort: number;
            username?: string;
            password?: string;
            from: string;
            fromName?: string;
            to: Array<string>;
            useTLS: boolean;
        } | {
            type: 'slack';
            webhookUrl: string;
            username?: string;
            iconEmoji?: string;
        } | {
            type: 'discord';
            webhookUrl: string;
            username?: string;
            avatarUrl?: string;
            threadId?: string;
        } | {
            type: 'gotify';
            serverUrl: string;
            token: string;
            path?: string;
            priority: number;
        } | {
            type: 'ntfy';
            serverUrl?: string;
            topic: string;
            priority: 'max' | 'high' | 'default' | 'low' | 'min';
            username?: string;
            password?: string;
            accessToken?: string;
        } | {
            type: 'pushover';
            userKey: string;
            apiToken: string;
            devices?: string;
            priority: -1 | 0 | 1;
        } | {
            type: 'telegram';
            botToken: string;
            chatId: string;
            threadId?: string;
        } | {
            type: 'generic';
            url: string;
            method: 'GET' | 'POST';
            contentType?: string;
            headers?: Array<string>;
            useJson?: boolean;
            titleKey?: string;
            messageKey?: string;
        } | {
            type: 'custom';
            shoutrrrUrl: string;
        };
    };
    path?: never;
    query?: never;
    url: '/api/v1/notifications/destinations';
};

export type CreateNotificationDestinationResponses = {
    /**
     * Notification destination created successfully
     */
    201: {
        id: number;
        name: string;
        enabled: boolean;
        status: 'healthy' | 'error' | 'unknown';
        lastChecked: number | null;
        lastError: string | null;
        type: 'email' | 'slack' | 'discord' | 'gotify' | 'ntfy' | 'pushover' | 'telegram' | 'generic' | 'custom';
        config: {
            type: 'email';
            smtpHost: string;
            smtpPort: number;
            username?: string;
            password?: string;
            from: string;
            fromName?: string;
            to: Array<string>;
            useTLS: boolean;
        } | {
            type: 'slack';
            webhookUrl: string;
            username?: string;
            iconEmoji?: string;
        } | {
            type: 'discord';
            webhookUrl: string;
            username?: string;
            avatarUrl?: string;
            threadId?: string;
        } | {
            type: 'gotify';
            serverUrl: string;
            token: string;
            path?: string;
            priority: number;
        } | {
            type: 'ntfy';
            serverUrl?: string;
            topic: string;
            priority: 'max' | 'high' | 'default' | 'low' | 'min';
            username?: string;
            password?: string;
            accessToken?: string;
        } | {
            type: 'pushover';
            userKey: string;
            apiToken: string;
            devices?: string;
            priority: -1 | 0 | 1;
        } | {
            type: 'telegram';
            botToken: string;
            chatId: string;
            threadId?: string;
        } | {
            type: 'generic';
            url: string;
            method: 'GET' | 'POST';
            contentType?: string;
            headers?: Array<string>;
            useJson?: boolean;
            titleKey?: string;
            messageKey?: string;
        } | {
            type: 'custom';
            shoutrrrUrl: string;
        };
        createdAt: number;
        updatedAt: number;
    };
};

export type CreateNotificationDestinationResponse = CreateNotificationDestinationResponses[keyof CreateNotificationDestinationResponses];

export type DeleteNotificationDestinationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/v1/notifications/destinations/{id}';
};

export type DeleteNotificationDestinationErrors = {
    /**
     * Notification destination not found
     */
    404: unknown;
};

export type DeleteNotificationDestinationResponses = {
    /**
     * Notification destination deleted successfully
     */
    200: {
        message: string;
    };
};

export type DeleteNotificationDestinationResponse = DeleteNotificationDestinationResponses[keyof DeleteNotificationDestinationResponses];

export type GetNotificationDestinationData = {
    body?: never;
    path: {
        id: string;
    };
    query?: never;
    url: '/api/v1/notifications/destinations/{id}';
};

export type GetNotificationDestinationErrors = {
    /**
     * Notification destination not found
     */
    404: unknown;
};

export type GetNotificationDestinationResponses = {
    /**
     * Notification destination details
     */
    200: {
        id: number;
        name: string;
        enabled: boolean;
        status: 'healthy' | 'error' | 'unknown';
        lastChecked: number | null;
        lastError: string | null;
        type: 'email' | 'slack' | 'discord' | 'gotify' | 'ntfy' | 'pushover' | 'telegram' | 'generic' | 'custom';
        config: {
            type: 'email';
            smtpHost: string;
            smtpPort: number;
            username?: string;
            password?: string;
            from: string;
            fromName?: string;
            to: Array<string>;
            useTLS: boolean;
        } | {
            type: 'slack';
            webhookUrl: string;
            username?: string;
            iconEmoji?: string;
        } | {
            type: 'discord';
            webhookUrl: string;
            username?: string;
            avatarUrl?: string;
            threadId?: string;
        } | {
            type: 'gotify';
            serverUrl: string;
            token: string;
            path?: string;
            priority: number;
        } | {
            type: 'ntfy';
            serverUrl?: string;
            topic: string;
            priority: 'max' | 'high' | 'default' | 'low' | 'min';
            username?: string;
            password?: string;
            accessToken?: string;
        } | {
            type: 'pushover';
            userKey: string;
            apiToken: string;
            devices?: string;
            priority: -1 | 0 | 1;
        } | {
            type: 'telegram';
            botToken: string;
            chatId: string;
            threadId?: string;
        } | {
            type: 'generic';
            url: string;
            method: 'GET' | 'POST';
            contentType?: string;
            headers?: Array<string>;
            useJson?: boolean;
            titleKey?: string;
            messageKey?: string;
        } | {
            type: 'custom';
            shoutrrrUrl: string;
        };
        createdAt: number;
        updatedAt: number;
    };
};

export type GetNotificationDestinationResponse = GetNotificationDestinationResponses[keyof GetNotificationDestinationResponses];

export type UpdateNotificationDestinationData = {
    body: {
        name?: string;
        enabled?: boolean;
        config?: {
            type: 'email';
            smtpHost: string;
            smtpPort: number;
            username?: string;
            password?: string;
            from: string;
            fromName?: string;
            to: Array<string>;
            useTLS: boolean;
        } | {
            type: 'slack';
            webhookUrl: string;
            username?: string;
            iconEmoji?: string;
        } | {
            type: 'discord';
            webhookUrl: string;
            username?: string;
            avatarUrl?: string;
            threadId?: string;
        } | {
            type: 'gotify';
            serverUrl: string;
            token: string;
            path?: string;
            priority: number;
        } | {
            type: 'ntfy';
            serverUrl?: string;
            topic: string;
            priority: 'max' | 'high' | 'default' | 'low' | 'min';
            username?: string;
            password?: string;
            accessToken?: string;
        } | {
            type: 'pushover';
            userKey: string;
            apiToken: string;
            devices?: string;
            priority: -1 | 0 | 1;
        } | {
            type: 'telegram';
            botToken: string;
            chatId: string;
            threadId?: string;
        } | {
            type: 'generic';
            url: string;
            method: 'GET' | 'POST';
            contentType?: string;
            headers?: Array<string>;
            useJson?: boolean;
            titleKey?: string;
            messageKey?: string;
        } | {
            type: 'custom';
            shoutrrrUrl: string;
        };
    };
    path: {
        id: string;
    };
    query?: never;
    url: '/api/v1/notifications/destinations/{id}';
};

export type UpdateNotificationDestinationErrors = {
    /**
     * Notification destination not found
     */
    404: unknown;
};

export type UpdateNotificationDestinationResponses = {
    /**
     * Notification destination updated successfully
     */
    200: {
        id: number;
        name: string;
        enabled: boolean;
        status: 'healthy' | 'error' | 'unknown';
        lastChecked: number | null;
        lastError: string | null;
        type: 'email' | 'slack' | 'discord' | 'gotify' | 'ntfy' | 'pushover' | 'telegram' | 'generic' | 'custom';
        config: {
            type: 'email';
            smtpHost: string;
            smtpPort: number;
            username?: string;
            password?: string;
            from: string;
            fromName?: string;
            to: Array<string>;
            useTLS: boolean;
        } | {
            type: 'slack';
            webhookUrl: string;
            username?: string;
            iconEmoji?: string;
        } | {
            type: 'discord';
            webhookUrl: string;
            username?: string;
            avatarUrl?: string;
            threadId?: string;
        } | {
            type: 'gotify';
            serverUrl: string;
            token: string;
            path?: string;
            priority: number;
        } | {
            type: 'ntfy';
            serverUrl?: string;
            topic: string;
            priority: 'max' | 'high' | 'default' | 'low' | 'min';
            username?: string;
            password?: string;
            accessToken?: string;
        } | {
            type: 'pushover';
            userKey: string;
            apiToken: string;
            devices?: string;
            priority: -1 | 0 | 1;
        } | {
            type: 'telegram';
            botToken: string;
            chatId: string;
            threadId?: string;
        } | {
            type: 'generic';
            url: string;
            method: 'GET' | 'POST';
            contentType?: string;
            headers?: Array<string>;
            useJson?: boolean;
            titleKey?: string;
            messageKey?: string;
        } | {
            type: 'custom';
            shoutrrrUrl: string;
        };
        createdAt: number;
        updatedAt: number;
    };
};

export type UpdateNotificationDestinationResponse = UpdateNotificationDestinationResponses[keyof UpdateNotificationDestinationResponses];

export type TestNotificationDestinationData = {
    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;
};

export type TestNotificationDestinationResponses = {
    /**
     * Test notification sent successfully
     */
    200: {
        success: boolean;
    };
};

export type TestNotificationDestinationResponse = TestNotificationDestinationResponses[keyof TestNotificationDestinationResponses];

export type GetSystemInfoData = {
    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;
        };
    };
};

export type GetSystemInfoResponse = GetSystemInfoResponses[keyof GetSystemInfoResponses];

export type GetUpdatesData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/system/updates';
};

export type GetUpdatesResponses = {
    /**
     * Update information and missed releases
     */
    200: {
        currentVersion: string;
        latestVersion: string;
        hasUpdate: boolean;
        missedReleases: Array<{
            version: string;
            url: string;
            publishedAt: string;
            body: string;
        }>;
    };
};

export type GetUpdatesResponse = GetUpdatesResponses[keyof GetUpdatesResponses];

export type GetRegistrationStatusData = {
    body?: never;
    path?: never;
    query?: never;
    url: '/api/v1/system/registration-status';
};

export type GetRegistrationStatusResponses = {
    /**
     * 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';
};

export type SetRegistrationStatusResponses = {
    /**
     * 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';
};

export type DownloadResticPasswordResponses = {
    /**
     * 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';
};

export type GetDevPanelResponses = {
    /**
     * Dev panel status
     */
    200: {
        enabled: boolean;
    };
};

export type GetDevPanelResponse = GetDevPanelResponses[keyof GetDevPanelResponses];
