mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore!: queue endpoint migration
This commit is contained in:
@@ -5525,61 +5525,6 @@
|
||||
}
|
||||
},
|
||||
"/jobs": {
|
||||
"get": {
|
||||
"deprecated": true,
|
||||
"description": "Retrieve the counts of the current queue, as well as the current status.",
|
||||
"operationId": "getQueuesLegacy",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/QueuesResponseLegacyDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Retrieve queue counts and status",
|
||||
"tags": [
|
||||
"Jobs",
|
||||
"Deprecated"
|
||||
],
|
||||
"x-immich-admin-only": true,
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Beta"
|
||||
},
|
||||
{
|
||||
"version": "v2",
|
||||
"state": "Stable"
|
||||
},
|
||||
{
|
||||
"version": "v2.4.0",
|
||||
"state": "Deprecated"
|
||||
}
|
||||
],
|
||||
"x-immich-permission": "job.read",
|
||||
"x-immich-state": "Deprecated"
|
||||
},
|
||||
"post": {
|
||||
"description": "Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.",
|
||||
"operationId": "createJob",
|
||||
@@ -5633,82 +5578,6 @@
|
||||
"x-immich-state": "Stable"
|
||||
}
|
||||
},
|
||||
"/jobs/{name}": {
|
||||
"put": {
|
||||
"deprecated": true,
|
||||
"description": "Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.",
|
||||
"operationId": "runQueueCommandLegacy",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/QueueName"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/QueueCommandDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Run jobs",
|
||||
"tags": [
|
||||
"Jobs",
|
||||
"Deprecated"
|
||||
],
|
||||
"x-immich-admin-only": true,
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Beta"
|
||||
},
|
||||
{
|
||||
"version": "v2",
|
||||
"state": "Stable"
|
||||
},
|
||||
{
|
||||
"version": "v2.4.0",
|
||||
"state": "Deprecated"
|
||||
}
|
||||
],
|
||||
"x-immich-permission": "job.create",
|
||||
"x-immich-state": "Deprecated"
|
||||
}
|
||||
},
|
||||
"/libraries": {
|
||||
"get": {
|
||||
"description": "Retrieve a list of external libraries.",
|
||||
@@ -20539,32 +20408,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"QueueCommand": {
|
||||
"description": "Queue command to execute",
|
||||
"enum": [
|
||||
"start",
|
||||
"pause",
|
||||
"resume",
|
||||
"empty",
|
||||
"clear-failed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"QueueCommandDto": {
|
||||
"properties": {
|
||||
"command": {
|
||||
"$ref": "#/components/schemas/QueueCommand"
|
||||
},
|
||||
"force": {
|
||||
"description": "Force the command execution (if applicable)",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"command"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueDeleteDto": {
|
||||
"properties": {
|
||||
"failed": {
|
||||
@@ -20669,21 +20512,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueResponseLegacyDto": {
|
||||
"properties": {
|
||||
"jobCounts": {
|
||||
"$ref": "#/components/schemas/QueueStatisticsDto"
|
||||
},
|
||||
"queueStatus": {
|
||||
"$ref": "#/components/schemas/QueueStatusLegacyDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"jobCounts",
|
||||
"queueStatus"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueStatisticsDto": {
|
||||
"properties": {
|
||||
"active": {
|
||||
@@ -20733,23 +20561,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueStatusLegacyDto": {
|
||||
"properties": {
|
||||
"isActive": {
|
||||
"description": "Whether the queue is currently active (has running jobs)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"isPaused": {
|
||||
"description": "Whether the queue is paused",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"isActive",
|
||||
"isPaused"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"QueueUpdateDto": {
|
||||
"properties": {
|
||||
"isPaused": {
|
||||
@@ -20759,85 +20570,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"QueuesResponseLegacyDto": {
|
||||
"properties": {
|
||||
"backgroundTask": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"backupDatabase": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"duplicateDetection": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"editor": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"faceDetection": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"facialRecognition": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"library": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"metadataExtraction": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"migration": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"notifications": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"ocr": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"search": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"sidecar": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"smartSearch": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"storageTemplateMigration": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"thumbnailGeneration": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"videoConversion": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
},
|
||||
"workflow": {
|
||||
"$ref": "#/components/schemas/QueueResponseLegacyDto"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"backgroundTask",
|
||||
"backupDatabase",
|
||||
"duplicateDetection",
|
||||
"editor",
|
||||
"faceDetection",
|
||||
"facialRecognition",
|
||||
"library",
|
||||
"metadataExtraction",
|
||||
"migration",
|
||||
"notifications",
|
||||
"ocr",
|
||||
"search",
|
||||
"sidecar",
|
||||
"smartSearch",
|
||||
"storageTemplateMigration",
|
||||
"thumbnailGeneration",
|
||||
"videoConversion",
|
||||
"workflow"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RandomSearchDto": {
|
||||
"properties": {
|
||||
"albumIds": {
|
||||
|
||||
@@ -1205,58 +1205,9 @@ export type FaceDto = {
|
||||
/** Face ID */
|
||||
id: string;
|
||||
};
|
||||
export type QueueStatisticsDto = {
|
||||
/** Number of active jobs */
|
||||
active: number;
|
||||
/** Number of completed jobs */
|
||||
completed: number;
|
||||
/** Number of delayed jobs */
|
||||
delayed: number;
|
||||
/** Number of failed jobs */
|
||||
failed: number;
|
||||
/** Number of paused jobs */
|
||||
paused: number;
|
||||
/** Number of waiting jobs */
|
||||
waiting: number;
|
||||
};
|
||||
export type QueueStatusLegacyDto = {
|
||||
/** Whether the queue is currently active (has running jobs) */
|
||||
isActive: boolean;
|
||||
/** Whether the queue is paused */
|
||||
isPaused: boolean;
|
||||
};
|
||||
export type QueueResponseLegacyDto = {
|
||||
jobCounts: QueueStatisticsDto;
|
||||
queueStatus: QueueStatusLegacyDto;
|
||||
};
|
||||
export type QueuesResponseLegacyDto = {
|
||||
backgroundTask: QueueResponseLegacyDto;
|
||||
backupDatabase: QueueResponseLegacyDto;
|
||||
duplicateDetection: QueueResponseLegacyDto;
|
||||
editor: QueueResponseLegacyDto;
|
||||
faceDetection: QueueResponseLegacyDto;
|
||||
facialRecognition: QueueResponseLegacyDto;
|
||||
library: QueueResponseLegacyDto;
|
||||
metadataExtraction: QueueResponseLegacyDto;
|
||||
migration: QueueResponseLegacyDto;
|
||||
notifications: QueueResponseLegacyDto;
|
||||
ocr: QueueResponseLegacyDto;
|
||||
search: QueueResponseLegacyDto;
|
||||
sidecar: QueueResponseLegacyDto;
|
||||
smartSearch: QueueResponseLegacyDto;
|
||||
storageTemplateMigration: QueueResponseLegacyDto;
|
||||
thumbnailGeneration: QueueResponseLegacyDto;
|
||||
videoConversion: QueueResponseLegacyDto;
|
||||
workflow: QueueResponseLegacyDto;
|
||||
};
|
||||
export type JobCreateDto = {
|
||||
name: ManualJobName;
|
||||
};
|
||||
export type QueueCommandDto = {
|
||||
command: QueueCommand;
|
||||
/** Force the command execution (if applicable) */
|
||||
force?: boolean;
|
||||
};
|
||||
export type LibraryResponseDto = {
|
||||
/** Number of assets */
|
||||
assetCount: number;
|
||||
@@ -1611,6 +1562,20 @@ export type PluginTriggerResponseDto = {
|
||||
contextType: PluginContextType;
|
||||
"type": PluginTriggerType;
|
||||
};
|
||||
export type QueueStatisticsDto = {
|
||||
/** Number of active jobs */
|
||||
active: number;
|
||||
/** Number of completed jobs */
|
||||
completed: number;
|
||||
/** Number of delayed jobs */
|
||||
delayed: number;
|
||||
/** Number of failed jobs */
|
||||
failed: number;
|
||||
/** Number of paused jobs */
|
||||
paused: number;
|
||||
/** Number of waiting jobs */
|
||||
waiting: number;
|
||||
};
|
||||
export type QueueResponseDto = {
|
||||
/** Whether the queue is paused */
|
||||
isPaused: boolean;
|
||||
@@ -4553,17 +4518,6 @@ export function reassignFacesById({ id, faceDto }: {
|
||||
body: faceDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Retrieve queue counts and status
|
||||
*/
|
||||
export function getQueuesLegacy(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: QueuesResponseLegacyDto;
|
||||
}>("/jobs", {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Create a manual job
|
||||
*/
|
||||
@@ -4576,22 +4530,6 @@ export function createJob({ jobCreateDto }: {
|
||||
body: jobCreateDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Run jobs
|
||||
*/
|
||||
export function runQueueCommandLegacy({ name, queueCommandDto }: {
|
||||
name: QueueName;
|
||||
queueCommandDto: QueueCommandDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: QueueResponseLegacyDto;
|
||||
}>(`/jobs/${encodeURIComponent(name)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "PUT",
|
||||
body: queueCommandDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Retrieve libraries
|
||||
*/
|
||||
@@ -7041,33 +6979,6 @@ export enum ManualJobName {
|
||||
MemoryCreate = "memory-create",
|
||||
BackupDatabase = "backup-database"
|
||||
}
|
||||
export enum QueueName {
|
||||
ThumbnailGeneration = "thumbnailGeneration",
|
||||
MetadataExtraction = "metadataExtraction",
|
||||
VideoConversion = "videoConversion",
|
||||
FaceDetection = "faceDetection",
|
||||
FacialRecognition = "facialRecognition",
|
||||
SmartSearch = "smartSearch",
|
||||
DuplicateDetection = "duplicateDetection",
|
||||
BackgroundTask = "backgroundTask",
|
||||
StorageTemplateMigration = "storageTemplateMigration",
|
||||
Migration = "migration",
|
||||
Search = "search",
|
||||
Sidecar = "sidecar",
|
||||
Library = "library",
|
||||
Notifications = "notifications",
|
||||
BackupDatabase = "backupDatabase",
|
||||
Ocr = "ocr",
|
||||
Workflow = "workflow",
|
||||
Editor = "editor"
|
||||
}
|
||||
export enum QueueCommand {
|
||||
Start = "start",
|
||||
Pause = "pause",
|
||||
Resume = "resume",
|
||||
Empty = "empty",
|
||||
ClearFailed = "clear-failed"
|
||||
}
|
||||
export enum MemorySearchOrder {
|
||||
Asc = "asc",
|
||||
Desc = "desc",
|
||||
@@ -7098,6 +7009,26 @@ export enum PluginTriggerType {
|
||||
AssetCreate = "AssetCreate",
|
||||
PersonRecognized = "PersonRecognized"
|
||||
}
|
||||
export enum QueueName {
|
||||
ThumbnailGeneration = "thumbnailGeneration",
|
||||
MetadataExtraction = "metadataExtraction",
|
||||
VideoConversion = "videoConversion",
|
||||
FaceDetection = "faceDetection",
|
||||
FacialRecognition = "facialRecognition",
|
||||
SmartSearch = "smartSearch",
|
||||
DuplicateDetection = "duplicateDetection",
|
||||
BackgroundTask = "backgroundTask",
|
||||
StorageTemplateMigration = "storageTemplateMigration",
|
||||
Migration = "migration",
|
||||
Search = "search",
|
||||
Sidecar = "sidecar",
|
||||
Library = "library",
|
||||
Notifications = "notifications",
|
||||
BackupDatabase = "backupDatabase",
|
||||
Ocr = "ocr",
|
||||
Workflow = "workflow",
|
||||
Editor = "editor"
|
||||
}
|
||||
export enum QueueJobStatus {
|
||||
Active = "active",
|
||||
Failed = "failed",
|
||||
|
||||
Reference in New Issue
Block a user