mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
feat: system integrity check in restore flow
This commit is contained in:
@@ -46,11 +46,14 @@ export type SetMaintenanceModeDto = {
|
||||
};
|
||||
export type MaintenanceListBackupsResponseDto = {
|
||||
backups: string[];
|
||||
failedBackups: string[];
|
||||
};
|
||||
export type MaintenanceUploadBackupDto = {
|
||||
file?: Blob;
|
||||
};
|
||||
export type MaintenanceIntegrityResponseDto = {
|
||||
storageHeuristics: object;
|
||||
storageIntegrity: object;
|
||||
};
|
||||
export type MaintenanceLoginDto = {
|
||||
token?: string;
|
||||
};
|
||||
@@ -1901,6 +1904,30 @@ export function deleteBackup({ filename }: {
|
||||
method: "DELETE"
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Download backup
|
||||
*/
|
||||
export function downloadBackup({ filename }: {
|
||||
filename: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
data: Blob;
|
||||
}>(`/admin/maintenance/backups/${encodeURIComponent(filename)}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Get integrity and heuristics
|
||||
*/
|
||||
export function integrityCheck(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: MaintenanceIntegrityResponseDto;
|
||||
}>("/admin/maintenance/integrity", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Log into maintenance mode
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user