mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 09:15:05 +03:00
feat: download csv report, download file, delete file
This commit is contained in:
@@ -1909,6 +1909,43 @@ export function getIntegrityReport({ maintenanceGetIntegrityReportDto }: {
|
||||
body: maintenanceGetIntegrityReportDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Delete associated file if it exists
|
||||
*/
|
||||
export function deleteIntegrityReportFile({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchText(`/admin/maintenance/integrity/report/${encodeURIComponent(id)}/file`, {
|
||||
...opts,
|
||||
method: "DELETE"
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Download the orphan/broken file if one exists
|
||||
*/
|
||||
export function getIntegrityReportFile({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
data: Blob;
|
||||
}>(`/admin/maintenance/integrity/report/${encodeURIComponent(id)}/file`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Export integrity report by type as CSV
|
||||
*/
|
||||
export function getIntegrityReportCsv({ $type }: {
|
||||
$type: IntegrityReportType;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
data: Blob;
|
||||
}>(`/admin/maintenance/integrity/report/${encodeURIComponent($type)}/csv`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Get integrity report summary
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user