mirror of
https://github.com/immich-app/immich.git
synced 2025-12-27 09:14:55 +03:00
feat: sub-pages for integrity reports
This commit is contained in:
@@ -323,51 +323,6 @@
|
||||
}
|
||||
},
|
||||
"/admin/maintenance": {
|
||||
"get": {
|
||||
"description": "...",
|
||||
"operationId": "getIntegrityReport",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MaintenanceIntegrityReportResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Get integrity report",
|
||||
"tags": [
|
||||
"Maintenance (admin)"
|
||||
],
|
||||
"x-immich-admin-only": true,
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v9.9.9",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v9.9.9",
|
||||
"state": "Alpha"
|
||||
}
|
||||
],
|
||||
"x-immich-permission": "maintenance",
|
||||
"x-immich-state": "Alpha"
|
||||
},
|
||||
"post": {
|
||||
"description": "Put Immich into or take it out of maintenance mode",
|
||||
"operationId": "setMaintenanceMode",
|
||||
@@ -417,6 +372,110 @@
|
||||
"x-immich-state": "Alpha"
|
||||
}
|
||||
},
|
||||
"/admin/maintenance/integrity/report": {
|
||||
"post": {
|
||||
"description": "...",
|
||||
"operationId": "getIntegrityReport",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MaintenanceGetIntegrityReportDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MaintenanceIntegrityReportResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Get integrity report by type",
|
||||
"tags": [
|
||||
"Maintenance (admin)"
|
||||
],
|
||||
"x-immich-admin-only": true,
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v9.9.9",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v9.9.9",
|
||||
"state": "Alpha"
|
||||
}
|
||||
],
|
||||
"x-immich-permission": "maintenance",
|
||||
"x-immich-state": "Alpha"
|
||||
}
|
||||
},
|
||||
"/admin/maintenance/integrity/summary": {
|
||||
"get": {
|
||||
"description": "...",
|
||||
"operationId": "getIntegrityReportSummary",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MaintenanceIntegrityReportSummaryResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Get integrity report summary",
|
||||
"tags": [
|
||||
"Maintenance (admin)"
|
||||
],
|
||||
"x-immich-admin-only": true,
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v9.9.9",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v9.9.9",
|
||||
"state": "Alpha"
|
||||
}
|
||||
],
|
||||
"x-immich-permission": "maintenance",
|
||||
"x-immich-state": "Alpha"
|
||||
}
|
||||
},
|
||||
"/admin/maintenance/login": {
|
||||
"post": {
|
||||
"description": "Login with maintenance token or cookie to receive current information and perform further actions.",
|
||||
@@ -16634,6 +16693,14 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"IntegrityReportType": {
|
||||
"enum": [
|
||||
"orphan_file",
|
||||
"missing_file",
|
||||
"checksum_mismatch"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"JobCreateDto": {
|
||||
"properties": {
|
||||
"name": {
|
||||
@@ -16965,6 +17032,21 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MaintenanceGetIntegrityReportDto": {
|
||||
"properties": {
|
||||
"type": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrityReportType"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MaintenanceIntegrityReportDto": {
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -16974,12 +17056,11 @@
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"orphan_file",
|
||||
"missing_file",
|
||||
"checksum_mismatch"
|
||||
],
|
||||
"type": "string"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrityReportType"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -17003,6 +17084,25 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MaintenanceIntegrityReportSummaryResponseDto": {
|
||||
"properties": {
|
||||
"checksum_mismatch": {
|
||||
"type": "integer"
|
||||
},
|
||||
"missing_file": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orphan_file": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"checksum_mismatch",
|
||||
"missing_file",
|
||||
"orphan_file"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MaintenanceLoginDto": {
|
||||
"properties": {
|
||||
"token": {
|
||||
|
||||
@@ -40,16 +40,24 @@ export type ActivityStatisticsResponseDto = {
|
||||
comments: number;
|
||||
likes: number;
|
||||
};
|
||||
export type SetMaintenanceModeDto = {
|
||||
action: MaintenanceAction;
|
||||
};
|
||||
export type MaintenanceGetIntegrityReportDto = {
|
||||
"type": IntegrityReportType;
|
||||
};
|
||||
export type MaintenanceIntegrityReportDto = {
|
||||
id: string;
|
||||
path: string;
|
||||
"type": Type;
|
||||
"type": IntegrityReportType;
|
||||
};
|
||||
export type MaintenanceIntegrityReportResponseDto = {
|
||||
items: MaintenanceIntegrityReportDto[];
|
||||
};
|
||||
export type SetMaintenanceModeDto = {
|
||||
action: MaintenanceAction;
|
||||
export type MaintenanceIntegrityReportSummaryResponseDto = {
|
||||
checksum_mismatch: number;
|
||||
missing_file: number;
|
||||
orphan_file: number;
|
||||
};
|
||||
export type MaintenanceLoginDto = {
|
||||
token?: string;
|
||||
@@ -1874,17 +1882,6 @@ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) {
|
||||
method: "POST"
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Get integrity report
|
||||
*/
|
||||
export function getIntegrityReport(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: MaintenanceIntegrityReportResponseDto;
|
||||
}>("/admin/maintenance", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Set maintenance mode
|
||||
*/
|
||||
@@ -1897,6 +1894,32 @@ export function setMaintenanceMode({ setMaintenanceModeDto }: {
|
||||
body: setMaintenanceModeDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Get integrity report by type
|
||||
*/
|
||||
export function getIntegrityReport({ maintenanceGetIntegrityReportDto }: {
|
||||
maintenanceGetIntegrityReportDto: MaintenanceGetIntegrityReportDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 201;
|
||||
data: MaintenanceIntegrityReportResponseDto;
|
||||
}>("/admin/maintenance/integrity/report", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: maintenanceGetIntegrityReportDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Get integrity report summary
|
||||
*/
|
||||
export function getIntegrityReportSummary(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: MaintenanceIntegrityReportSummaryResponseDto;
|
||||
}>("/admin/maintenance/integrity/summary", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Log into maintenance mode
|
||||
*/
|
||||
@@ -5173,15 +5196,15 @@ export enum UserAvatarColor {
|
||||
Gray = "gray",
|
||||
Amber = "amber"
|
||||
}
|
||||
export enum Type {
|
||||
OrphanFile = "orphan_file",
|
||||
MissingFile = "missing_file",
|
||||
ChecksumMismatch = "checksum_mismatch"
|
||||
}
|
||||
export enum MaintenanceAction {
|
||||
Start = "start",
|
||||
End = "end"
|
||||
}
|
||||
export enum IntegrityReportType {
|
||||
OrphanFile = "orphan_file",
|
||||
MissingFile = "missing_file",
|
||||
ChecksumMismatch = "checksum_mismatch"
|
||||
}
|
||||
export enum NotificationLevel {
|
||||
Success = "success",
|
||||
Error = "error",
|
||||
|
||||
Reference in New Issue
Block a user