feat: ability to delete all reports (and corresponding objects)

This commit is contained in:
izzy
2025-12-02 11:59:23 +00:00
parent 806a2880ca
commit 6cfd1994c4
15 changed files with 232 additions and 53 deletions

View File

@@ -429,10 +429,10 @@
"x-immich-state": "Alpha"
}
},
"/admin/maintenance/integrity/report/{id}/file": {
"/admin/maintenance/integrity/report/{id}": {
"delete": {
"description": "...",
"operationId": "deleteIntegrityReportFile",
"operationId": "deleteIntegrityReport",
"parameters": [
{
"name": "id",
@@ -460,7 +460,7 @@
"api_key": []
}
],
"summary": "Delete associated file if it exists",
"summary": "Delete report entry and perform corresponding deletion action",
"tags": [
"Maintenance (admin)"
],
@@ -477,7 +477,9 @@
],
"x-immich-permission": "maintenance",
"x-immich-state": "Alpha"
},
}
},
"/admin/maintenance/integrity/report/{id}/file": {
"get": {
"description": "...",
"operationId": "getIntegrityReportFile",
@@ -16943,7 +16945,8 @@
"IntegrityMissingFiles",
"IntegrityMissingFilesRefresh",
"IntegrityChecksumFiles",
"IntegrityChecksumFilesRefresh"
"IntegrityChecksumFilesRefresh",
"IntegrityReportDelete"
],
"type": "string"
},
@@ -17289,7 +17292,10 @@
"integrity-checksum-mismatch",
"integrity-missing-files-refresh",
"integrity-orphan-files-refresh",
"integrity-checksum-mismatch-refresh"
"integrity-checksum-mismatch-refresh",
"integrity-missing-files-delete-all",
"integrity-orphan-files-delete-all",
"integrity-checksum-mismatch-delete-all"
],
"type": "string"
},

View File

@@ -1910,12 +1910,12 @@ export function getIntegrityReport({ maintenanceGetIntegrityReportDto }: {
})));
}
/**
* Delete associated file if it exists
* Delete report entry and perform corresponding deletion action
*/
export function deleteIntegrityReportFile({ id }: {
export function deleteIntegrityReport({ id }: {
id: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText(`/admin/maintenance/integrity/report/${encodeURIComponent(id)}/file`, {
return oazapfts.ok(oazapfts.fetchText(`/admin/maintenance/integrity/report/${encodeURIComponent(id)}`, {
...opts,
method: "DELETE"
}));
@@ -5484,7 +5484,10 @@ export enum ManualJobName {
IntegrityChecksumMismatch = "integrity-checksum-mismatch",
IntegrityMissingFilesRefresh = "integrity-missing-files-refresh",
IntegrityOrphanFilesRefresh = "integrity-orphan-files-refresh",
IntegrityChecksumMismatchRefresh = "integrity-checksum-mismatch-refresh"
IntegrityChecksumMismatchRefresh = "integrity-checksum-mismatch-refresh",
IntegrityMissingFilesDeleteAll = "integrity-missing-files-delete-all",
IntegrityOrphanFilesDeleteAll = "integrity-orphan-files-delete-all",
IntegrityChecksumMismatchDeleteAll = "integrity-checksum-mismatch-delete-all"
}
export enum QueueName {
ThumbnailGeneration = "thumbnailGeneration",
@@ -5600,7 +5603,8 @@ export enum JobName {
IntegrityMissingFiles = "IntegrityMissingFiles",
IntegrityMissingFilesRefresh = "IntegrityMissingFilesRefresh",
IntegrityChecksumFiles = "IntegrityChecksumFiles",
IntegrityChecksumFilesRefresh = "IntegrityChecksumFilesRefresh"
IntegrityChecksumFilesRefresh = "IntegrityChecksumFilesRefresh",
IntegrityReportDelete = "IntegrityReportDelete"
}
export enum SearchSuggestionType {
Country = "country",