merge: remote-tracking branch 'origin/main' into feat/integrity-checks-izzy

This commit is contained in:
izzy
2026-01-21 17:02:22 +00:00
310 changed files with 18273 additions and 3199 deletions

View File

@@ -322,16 +322,27 @@
"x-immich-state": "Stable"
}
},
<<<<<<< HEAD
"/admin/integrity/report": {
"post": {
"description": "Get all flagged items by integrity report type",
"operationId": "getIntegrityReport",
=======
"/admin/database-backups": {
"delete": {
"description": "Delete a backup by its filename",
"operationId": "deleteDatabaseBackup",
>>>>>>> origin/main
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
<<<<<<< HEAD
"$ref": "#/components/schemas/IntegrityGetReportDto"
=======
"$ref": "#/components/schemas/DatabaseBackupDeleteDto"
>>>>>>> origin/main
}
}
},
@@ -339,6 +350,7 @@
},
"responses": {
"200": {
<<<<<<< HEAD
"content": {
"application/json": {
"schema": {
@@ -346,6 +358,8 @@
}
}
},
=======
>>>>>>> origin/main
"description": ""
}
},
@@ -360,13 +374,20 @@
"api_key": []
}
],
<<<<<<< HEAD
"summary": "Get integrity report by type",
"tags": [
"Maintenance (admin)"
=======
"summary": "Delete database backup",
"tags": [
"Database Backups (admin)"
>>>>>>> origin/main
],
"x-immich-admin-only": true,
"x-immich-history": [
{
<<<<<<< HEAD
"version": "v2.6.0",
"state": "Added"
},
@@ -548,13 +569,33 @@
"get": {
"description": "Get a count of the items flagged in each integrity report",
"operationId": "getIntegrityReportSummary",
=======
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"state": "Alpha"
}
],
"x-immich-permission": "backup.delete",
"x-immich-state": "Alpha"
},
"get": {
"description": "Get the list of the successful and failed backups",
"operationId": "listDatabaseBackups",
>>>>>>> origin/main
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
<<<<<<< HEAD
"$ref": "#/components/schemas/IntegrityReportSummaryResponseDto"
=======
"$ref": "#/components/schemas/DatabaseBackupListResponseDto"
>>>>>>> origin/main
}
}
},
@@ -572,18 +613,32 @@
"api_key": []
}
],
<<<<<<< HEAD
"summary": "Get integrity report summary",
"tags": [
"Maintenance (admin)"
=======
"summary": "List database backups",
"tags": [
"Database Backups (admin)"
>>>>>>> origin/main
],
"x-immich-admin-only": true,
"x-immich-history": [
{
<<<<<<< HEAD
"version": "v2.6.0",
"state": "Added"
},
{
"version": "v2.6.0",
=======
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
>>>>>>> origin/main
"state": "Alpha"
}
],
@@ -591,6 +646,145 @@
"x-immich-state": "Alpha"
}
},
<<<<<<< HEAD
=======
"/admin/database-backups/start-restore": {
"post": {
"description": "Put Immich into maintenance mode to restore a backup (Immich must not be configured)",
"operationId": "startDatabaseRestoreFlow",
"parameters": [],
"responses": {
"201": {
"description": ""
}
},
"summary": "Start database backup restore flow",
"tags": [
"Database Backups (admin)"
],
"x-immich-history": [
{
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"state": "Alpha"
}
],
"x-immich-state": "Alpha"
}
},
"/admin/database-backups/upload": {
"post": {
"description": "Uploads .sql/.sql.gz file to restore backup from",
"operationId": "uploadDatabaseBackup",
"parameters": [],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/DatabaseBackupUploadDto"
}
}
},
"description": "Backup Upload",
"required": true
},
"responses": {
"201": {
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"summary": "Upload database backup",
"tags": [
"Database Backups (admin)"
],
"x-immich-admin-only": true,
"x-immich-history": [
{
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"state": "Alpha"
}
],
"x-immich-permission": "backup.upload",
"x-immich-state": "Alpha"
}
},
"/admin/database-backups/{filename}": {
"get": {
"description": "Downloads the database backup file",
"operationId": "downloadDatabaseBackup",
"parameters": [
{
"name": "filename",
"required": true,
"in": "path",
"schema": {
"format": "string",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/octet-stream": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"summary": "Download database backup",
"tags": [
"Database Backups (admin)"
],
"x-immich-admin-only": true,
"x-immich-history": [
{
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"state": "Alpha"
}
],
"x-immich-permission": "backup.download",
"x-immich-state": "Alpha"
}
},
>>>>>>> origin/main
"/admin/maintenance": {
"post": {
"description": "Put Immich into or take it out of maintenance mode",
@@ -641,6 +835,53 @@
"x-immich-state": "Alpha"
}
},
"/admin/maintenance/detect-install": {
"get": {
"description": "Collect integrity checks and other heuristics about local data.",
"operationId": "detectPriorInstall",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaintenanceDetectInstallResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"summary": "Detect existing install",
"tags": [
"Maintenance (admin)"
],
"x-immich-admin-only": true,
"x-immich-history": [
{
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"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.",
@@ -685,6 +926,40 @@
"x-immich-state": "Alpha"
}
},
"/admin/maintenance/status": {
"get": {
"description": "Fetch information about the currently running maintenance action.",
"operationId": "getMaintenanceStatus",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaintenanceStatusResponseDto"
}
}
},
"description": ""
}
},
"summary": "Get maintenance mode status",
"tags": [
"Maintenance (admin)"
],
"x-immich-history": [
{
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"state": "Alpha"
}
],
"x-immich-state": "Alpha"
}
},
"/admin/notifications": {
"post": {
"description": "Create a new notification for a specific user.",
@@ -14930,6 +15205,10 @@
"name": "Authentication (admin)",
"description": "Administrative endpoints related to authentication."
},
{
"name": "Database Backups (admin)",
"description": "Manage backups of the Immich database."
},
{
"name": "Deprecated",
"description": "Deprecated endpoints that are planned for removal in the next major release."
@@ -16549,6 +16828,20 @@
"isArchived": {
"type": "boolean"
},
"isEdited": {
"type": "boolean",
"x-immich-history": [
{
"version": "v2.5.0",
"state": "Added"
},
{
"version": "v2.5.0",
"state": "Beta"
}
],
"x-immich-state": "Beta"
},
"isFavorite": {
"type": "boolean"
},
@@ -16681,6 +16974,7 @@
"height",
"id",
"isArchived",
"isEdited",
"isFavorite",
"isOffline",
"isTrashed",
@@ -17107,6 +17401,58 @@
],
"type": "object"
},
"DatabaseBackupDeleteDto": {
"properties": {
"backups": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"backups"
],
"type": "object"
},
"DatabaseBackupDto": {
"properties": {
"filename": {
"type": "string"
},
"filesize": {
"type": "number"
}
},
"required": [
"filename",
"filesize"
],
"type": "object"
},
"DatabaseBackupListResponseDto": {
"properties": {
"backups": {
"items": {
"$ref": "#/components/schemas/DatabaseBackupDto"
},
"type": "array"
}
},
"required": [
"backups"
],
"type": "object"
},
"DatabaseBackupUploadDto": {
"properties": {
"file": {
"format": "binary",
"type": "string"
}
},
"type": "object"
},
"DownloadArchiveInfo": {
"properties": {
"assetIds": {
@@ -17874,7 +18220,9 @@
"MaintenanceAction": {
"enum": [
"start",
"end"
"end",
"select_database_restore",
"restore_database"
],
"type": "string"
},
@@ -17889,6 +18237,47 @@
],
"type": "object"
},
"MaintenanceDetectInstallResponseDto": {
"properties": {
"storage": {
"items": {
"$ref": "#/components/schemas/MaintenanceDetectInstallStorageFolderDto"
},
"type": "array"
}
},
"required": [
"storage"
],
"type": "object"
},
"MaintenanceDetectInstallStorageFolderDto": {
"properties": {
"files": {
"type": "number"
},
"folder": {
"allOf": [
{
"$ref": "#/components/schemas/StorageFolder"
}
]
},
"readable": {
"type": "boolean"
},
"writable": {
"type": "boolean"
}
},
"required": [
"files",
"folder",
"readable",
"writable"
],
"type": "object"
},
"MaintenanceLoginDto": {
"properties": {
"token": {
@@ -17897,6 +18286,34 @@
},
"type": "object"
},
"MaintenanceStatusResponseDto": {
"properties": {
"action": {
"allOf": [
{
"$ref": "#/components/schemas/MaintenanceAction"
}
]
},
"active": {
"type": "boolean"
},
"error": {
"type": "string"
},
"progress": {
"type": "number"
},
"task": {
"type": "string"
}
},
"required": [
"action",
"active"
],
"type": "object"
},
"ManualJobName": {
"enum": [
"person-cleanup",
@@ -18874,6 +19291,10 @@
"auth.changePassword",
"authDevice.delete",
"archive.read",
"backup.list",
"backup.download",
"backup.upload",
"backup.delete",
"duplicate.read",
"duplicate.delete",
"face.create",
@@ -20657,6 +21078,9 @@
"$ref": "#/components/schemas/MaintenanceAction"
}
]
},
"restoreBackupFilename": {
"type": "string"
}
},
"required": [
@@ -21229,6 +21653,17 @@
},
"type": "object"
},
"StorageFolder": {
"enum": [
"encoded-video",
"library",
"upload",
"profile",
"thumbs",
"backups"
],
"type": "string"
},
"SyncAckDeleteDto": {
"properties": {
"types": {
@@ -21680,6 +22115,9 @@
"id": {
"type": "string"
},
"isEdited": {
"type": "boolean"
},
"isFavorite": {
"type": "boolean"
},
@@ -21737,6 +22175,7 @@
"fileModifiedAt",
"height",
"id",
"isEdited",
"isFavorite",
"libraryId",
"livePhotoVideoId",

View File

@@ -19,7 +19,7 @@
"@oazapfts/runtime": "^1.0.2"
},
"devDependencies": {
"@types/node": "^24.10.4",
"@types/node": "^24.10.8",
"typescript": "^5.3.3"
},
"repository": {

View File

@@ -40,6 +40,7 @@ export type ActivityStatisticsResponseDto = {
comments: number;
likes: number;
};
<<<<<<< HEAD
export type IntegrityGetReportDto = {
cursor?: string;
limit?: number;
@@ -58,9 +59,33 @@ export type IntegrityReportSummaryResponseDto = {
checksum_mismatch: number;
missing_file: number;
untracked_file: number;
=======
export type DatabaseBackupDeleteDto = {
backups: string[];
};
export type DatabaseBackupDto = {
filename: string;
filesize: number;
};
export type DatabaseBackupListResponseDto = {
backups: DatabaseBackupDto[];
};
export type DatabaseBackupUploadDto = {
file?: Blob;
>>>>>>> origin/main
};
export type SetMaintenanceModeDto = {
action: MaintenanceAction;
restoreBackupFilename?: string;
};
export type MaintenanceDetectInstallStorageFolderDto = {
files: number;
folder: StorageFolder;
readable: boolean;
writable: boolean;
};
export type MaintenanceDetectInstallResponseDto = {
storage: MaintenanceDetectInstallStorageFolderDto[];
};
export type MaintenanceLoginDto = {
token?: string;
@@ -68,6 +93,13 @@ export type MaintenanceLoginDto = {
export type MaintenanceAuthDto = {
username: string;
};
export type MaintenanceStatusResponseDto = {
action: MaintenanceAction;
active: boolean;
error?: string;
progress?: number;
task?: string;
};
export type NotificationCreateDto = {
data?: object;
description?: string | null;
@@ -371,6 +403,7 @@ export type AssetResponseDto = {
height: number | null;
id: string;
isArchived: boolean;
isEdited: boolean;
isFavorite: boolean;
isOffline: boolean;
isTrashed: boolean;
@@ -1957,6 +1990,7 @@ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) {
}));
}
/**
<<<<<<< HEAD
* Get integrity report by type
*/
export function getIntegrityReport({ integrityGetReportDto }: {
@@ -2016,6 +2050,61 @@ export function getIntegrityReportSummary(opts?: Oazapfts.RequestOpts) {
status: 200;
data: IntegrityReportSummaryResponseDto;
}>("/admin/integrity/summary", {
=======
* Delete database backup
*/
export function deleteDatabaseBackup({ databaseBackupDeleteDto }: {
databaseBackupDeleteDto: DatabaseBackupDeleteDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/admin/database-backups", oazapfts.json({
...opts,
method: "DELETE",
body: databaseBackupDeleteDto
})));
}
/**
* List database backups
*/
export function listDatabaseBackups(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: DatabaseBackupListResponseDto;
}>("/admin/database-backups", {
...opts
}));
}
/**
* Start database backup restore flow
*/
export function startDatabaseRestoreFlow(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/admin/database-backups/start-restore", {
...opts,
method: "POST"
}));
}
/**
* Upload database backup
*/
export function uploadDatabaseBackup({ databaseBackupUploadDto }: {
databaseBackupUploadDto: DatabaseBackupUploadDto;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchText("/admin/database-backups/upload", oazapfts.multipart({
...opts,
method: "POST",
body: databaseBackupUploadDto
})));
}
/**
* Download database backup
*/
export function downloadDatabaseBackup({ filename }: {
filename: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchBlob<{
status: 200;
data: Blob;
}>(`/admin/database-backups/${encodeURIComponent(filename)}`, {
>>>>>>> origin/main
...opts
}));
}
@@ -2031,6 +2120,17 @@ export function setMaintenanceMode({ setMaintenanceModeDto }: {
body: setMaintenanceModeDto
})));
}
/**
* Detect existing install
*/
export function detectPriorInstall(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: MaintenanceDetectInstallResponseDto;
}>("/admin/maintenance/detect-install", {
...opts
}));
}
/**
* Log into maintenance mode
*/
@@ -2046,6 +2146,17 @@ export function maintenanceLogin({ maintenanceLoginDto }: {
body: maintenanceLoginDto
})));
}
/**
* Get maintenance mode status
*/
export function getMaintenanceStatus(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: MaintenanceStatusResponseDto;
}>("/admin/maintenance/status", {
...opts
}));
}
/**
* Create a notification
*/
@@ -5401,7 +5512,17 @@ export enum IntegrityReportType {
}
export enum MaintenanceAction {
Start = "start",
End = "end"
End = "end",
SelectDatabaseRestore = "select_database_restore",
RestoreDatabase = "restore_database"
}
export enum StorageFolder {
EncodedVideo = "encoded-video",
Library = "library",
Upload = "upload",
Profile = "profile",
Thumbs = "thumbs",
Backups = "backups"
}
export enum NotificationLevel {
Success = "success",
@@ -5499,6 +5620,10 @@ export enum Permission {
AuthChangePassword = "auth.changePassword",
AuthDeviceDelete = "authDevice.delete",
ArchiveRead = "archive.read",
BackupList = "backup.list",
BackupDownload = "backup.download",
BackupUpload = "backup.upload",
BackupDelete = "backup.delete",
DuplicateRead = "duplicate.read",
DuplicateDelete = "duplicate.delete",
FaceCreate = "face.create",