feat: download csv report, download file, delete file

This commit is contained in:
izzy
2025-12-01 14:20:38 +00:00
parent fec8923431
commit 06fcd54b9f
10 changed files with 572 additions and 28 deletions

View File

@@ -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
*/