From 1fc98990ab6fc3e292fa8d285ceb787eeea07652 Mon Sep 17 00:00:00 2001 From: izzy Date: Fri, 14 Nov 2025 14:54:06 +0000 Subject: [PATCH] refactor: use respondWithCookie refactor: merge start/end into one route refactor: rename MaintenanceRepository to AppRepository chore: use new ApiTag/Endpoint refactor: apply other requested changes --- e2e/src/api/specs/maintenance.e2e-spec.ts | 54 +- open-api/immich-openapi-specs.json | 7966 +---------------- open-api/typescript-sdk/src/fetch-client.ts | 2847 +----- server/src/app.module.ts | 4 +- server/src/constants.ts | 1 + .../maintenance-worker.controller.ts | 29 +- .../src/controllers/maintenance.controller.ts | 41 +- server/src/dtos/maintenance.dto.ts | 7 +- server/src/enum.ts | 1 + server/src/main.ts | 34 +- .../src/middleware/maintenance-auth.guard.ts | 2 +- ...enance.repository.ts => app.repository.ts} | 4 +- server/src/repositories/index.ts | 4 +- .../maintenance-worker.repository.ts | 4 +- server/src/services/base.service.ts | 6 +- server/src/services/maintenance.service.ts | 9 +- server/src/workers/api.ts | 4 +- server/src/workers/maintenance.ts | 4 +- server/src/workers/microservices.ts | 4 +- server/test/utils.ts | 8 +- .../admin-settings/MaintenanceSettings.svelte | 8 +- web/src/routes/maintenance/+page.svelte | 8 +- 22 files changed, 1041 insertions(+), 10008 deletions(-) rename server/src/repositories/{maintenance.repository.ts => app.repository.ts} (90%) diff --git a/e2e/src/api/specs/maintenance.e2e-spec.ts b/e2e/src/api/specs/maintenance.e2e-spec.ts index db39480ac8..b4c39b2455 100644 --- a/e2e/src/api/specs/maintenance.e2e-spec.ts +++ b/e2e/src/api/specs/maintenance.e2e-spec.ts @@ -34,41 +34,41 @@ describe('/admin/maintenance', () => { }); }); - describe('POST /end', async () => { - it('should not work out of maintenance mode', async () => { - const { status, body } = await request(app) - .post('/admin/maintenance/end') - .set('Authorization', `Bearer ${admin.accessToken}`) - .send(); - expect(status).toBe(400); - expect(body).toEqual(errorDto.badRequest('Not in maintenance mode')); - }); - }); - // => enter maintenance mode - describe.sequential('POST /start', () => { + describe.sequential('POST /', () => { it('should require authentication', async () => { - const { status, body } = await request(app).post('/admin/maintenance/start').send(); + const { status, body } = await request(app).post('/admin/maintenance').send({ + maintenanceMode: false + }); expect(status).toBe(401); expect(body).toEqual(errorDto.unauthorized); }); it('should only work for admins', async () => { const { status, body } = await request(app) - .post('/admin/maintenance/start') + .post('/admin/maintenance') .set('Authorization', `Bearer ${nonAdmin.accessToken}`) - .send(); + .send({ maintenanceMode: false }); expect(status).toBe(403); expect(body).toEqual(errorDto.forbidden); }); + it('should be a no-op if try to exit maintenance mode', async () => { + const { status } = await request(app) + .post('/admin/maintenance') + .set('Authorization', `Bearer ${admin.accessToken}`) + .send({ maintenanceMode: false }); + expect(status).toBe(201); + }); + it('should enter maintenance mode', async () => { const { status, headers } = await request(app) - .post('/admin/maintenance/start') + .post('/admin/maintenance') .set('Authorization', `Bearer ${admin.accessToken}`) - .send(); - + .send({ + maintenaceMode: true + }); expect(status).toBe(201); cookie = headers['set-cookie'][0].split(';')[0]; @@ -134,21 +134,25 @@ describe('/admin/maintenance', () => { }); }); - describe('POST /start', async () => { - it('should not work in maintenance mode', async () => { - const { status, body } = await request(app).post('/admin/maintenance/start').set('cookie', cookie!).send(); - expect(status).toBe(400); - expect(body).toEqual(errorDto.badRequest('Already in maintenance mode')); + describe('POST /', async () => { + it('should be a no-op if try to enter maintenance mode', async () => { + const { status } = await request(app) + .post('/admin/maintenance') + .set('cookie', cookie!) + .send({ maintenanceMode: true }); + expect(status).toBe(201); }); }); }); // => exit maintenance mode - describe.sequential('POST /end', () => { + describe.sequential('POST /', () => { it('should exit maintenance mode', async () => { console.info('using', cookie!); - const { status } = await request(app).post('/admin/maintenance/end').set('cookie', cookie!).send(); + const { status } = await request(app).post('/admin/maintenance').set('cookie', cookie!).send({ + maintenanceMode: false + }); expect(status).toBe(201); diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 8cbb0ce40e..39c418eb19 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -17,7 +17,7 @@ }, { "name": "assetId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -26,7 +26,7 @@ }, { "name": "level", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/ReactionLevel" @@ -34,7 +34,7 @@ }, { "name": "type", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/ReactionType" @@ -42,7 +42,7 @@ }, { "name": "userId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -52,16 +52,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ActivityResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -113,13 +103,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivityResponseDto" - } - } - }, "description": "" } }, @@ -172,7 +155,7 @@ }, { "name": "assetId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -182,13 +165,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivityStatisticsResponseDto" - } - } - }, "description": "" } }, @@ -322,10 +298,21 @@ "x-immich-state": "Stable" } }, - "/admin/maintenance/end": { + "/admin/maintenance": { "post": { - "operationId": "endMaintenance", + "description": "Put Immich into or take it out of maintenance mode", + "operationId": "setMaintenanceMode", "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetMaintenanceModeDto" + } + } + }, + "required": true + }, "responses": { "201": { "description": "" @@ -342,15 +329,28 @@ "api_key": [] } ], + "summary": "Set maintenance mode", "tags": [ "Maintenance (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "maintenance" + "x-immich-history": [ + { + "version": "v2.3.0", + "state": "Added" + }, + { + "version": "v2.3.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.", "operationId": "maintenanceLogin", "parameters": [], "requestBody": { @@ -375,36 +375,21 @@ "description": "" } }, - "tags": [ - "Maintenance (admin)" - ] - } - }, - "/admin/maintenance/start": { - "post": { - "operationId": "startMaintenance", - "parameters": [], - "responses": { - "201": { - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], + "summary": "Log into maintenance mode", "tags": [ "Maintenance (admin)" ], - "x-immich-admin-only": true, - "x-immich-permission": "maintenance" + "x-immich-history": [ + { + "version": "v2.3.0", + "state": "Added" + }, + { + "version": "v2.3.0", + "state": "Alpha" + } + ], + "x-immich-state": "Alpha" } }, "/admin/notifications": { @@ -424,13 +409,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationDto" - } - } - }, "description": "" } }, @@ -493,13 +471,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TemplateResponseDto" - } - } - }, "description": "" } }, @@ -553,13 +524,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TestEmailResponseDto" - } - } - }, "description": "" } }, @@ -603,7 +567,7 @@ "parameters": [ { "name": "id", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -612,7 +576,7 @@ }, { "name": "withDeleted", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -621,16 +585,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/UserAdminResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -683,13 +637,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -754,13 +701,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -813,13 +753,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -882,13 +815,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -943,13 +869,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserPreferencesResponseDto" - } - } - }, "description": "" } }, @@ -1012,13 +931,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserPreferencesResponseDto" - } - } - }, "description": "" } }, @@ -1073,13 +985,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -1134,16 +1039,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/SessionResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -1197,7 +1092,7 @@ }, { "name": "isFavorite", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -1205,7 +1100,7 @@ }, { "name": "isTrashed", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -1213,7 +1108,7 @@ }, { "name": "visibility", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/AssetVisibility" @@ -1222,13 +1117,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetStatsResponseDto" - } - } - }, "description": "" } }, @@ -1273,9 +1161,8 @@ "parameters": [ { "name": "assetId", - "required": false, + "required": true, "in": "query", - "description": "Only returns albums that contain the asset\nIgnores the shared parameter\nundefined: get all albums", "schema": { "format": "uuid", "type": "string" @@ -1283,7 +1170,7 @@ }, { "name": "shared", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -1292,16 +1179,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AlbumResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -1353,13 +1230,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlbumResponseDto" - } - } - }, "description": "" } }, @@ -1430,13 +1300,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlbumsAddAssetsResponseDto" - } - } - }, "description": "" } }, @@ -1480,13 +1343,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlbumStatisticsResponseDto" - } - } - }, "description": "" } }, @@ -1606,7 +1462,7 @@ }, { "name": "withoutAssets", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -1615,13 +1471,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlbumResponseDto" - } - } - }, "description": "" } }, @@ -1683,13 +1532,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlbumResponseDto" - } - } - }, "description": "" } }, @@ -1753,16 +1595,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -1840,16 +1672,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -2043,13 +1865,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlbumResponseDto" - } - } - }, "description": "" } }, @@ -2093,16 +1908,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/APIKeyResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -2154,13 +1959,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIKeyCreateResponseDto" - } - } - }, "description": "" } }, @@ -2204,13 +2002,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIKeyResponseDto" - } - } - }, "description": "" } }, @@ -2314,13 +2105,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIKeyResponseDto" - } - } - }, "description": "" } }, @@ -2382,13 +2166,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIKeyResponseDto" - } - } - }, "description": "" } }, @@ -2520,13 +2297,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetMediaResponseDto" - } - } - }, "description": "" } }, @@ -2631,13 +2401,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetBulkUploadCheckResponseDto" - } - } - }, "description": "" } }, @@ -2732,28 +2495,9 @@ "deprecated": true, "description": "Get all asset of a device that are in the database, ID only.", "operationId": "getAllUserAssetsByDeviceId", - "parameters": [ - { - "name": "deviceId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], + "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -2803,13 +2547,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CheckExistingAssetsResponseDto" - } - } - }, "description": "" } }, @@ -2902,29 +2639,9 @@ "deprecated": true, "description": "Retrieve a specified number of random assets for the authenticated user.", "operationId": "getRandom", - "parameters": [ - { - "name": "count", - "required": false, - "in": "query", - "schema": { - "minimum": 1, - "type": "number" - } - } - ], + "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -2966,7 +2683,7 @@ "parameters": [ { "name": "isFavorite", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -2974,7 +2691,7 @@ }, { "name": "isTrashed", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -2982,7 +2699,7 @@ }, { "name": "visibility", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/AssetVisibility" @@ -2991,13 +2708,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetStatsResponseDto" - } - } - }, "description": "" } }, @@ -3067,13 +2777,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetResponseDto" - } - } - }, "description": "" } }, @@ -3135,13 +2838,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetResponseDto" - } - } - }, "description": "" } }, @@ -3195,16 +2891,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetMetadataResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -3266,16 +2952,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetMetadataResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -3396,13 +3072,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetMetadataResponseDto" - } - } - }, "description": "" } }, @@ -3456,16 +3125,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetOcrResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -3621,13 +3280,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetMediaResponseDto" - } - } - }, "description": "" } }, @@ -3686,7 +3338,7 @@ }, { "name": "size", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/AssetMediaSize" @@ -3841,13 +3493,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -3889,13 +3534,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -3949,13 +3587,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponseDto" - } - } - }, "description": "" } }, @@ -3987,13 +3618,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LogoutResponseDto" - } - } - }, "description": "" } }, @@ -4285,13 +3909,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthStatusResponseDto" - } - } - }, "description": "" } }, @@ -4319,13 +3936,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidateAccessTokenResponseDto" - } - } - }, "description": "" } }, @@ -4473,13 +4083,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownloadResponseDto" - } - } - }, "description": "" } }, @@ -4574,16 +4177,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/DuplicateResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -4690,16 +4283,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetFaceResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -4875,13 +4458,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonResponseDto" - } - } - }, "description": "" } }, @@ -4925,13 +4501,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AllJobStatusResponseDto" - } - } - }, "description": "" } }, @@ -5047,13 +4616,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStatusDto" - } - } - }, "description": "" } }, @@ -5098,16 +4660,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/LibraryResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -5160,13 +4712,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LibraryResponseDto" - } - } - }, "description": "" } }, @@ -5273,13 +4818,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LibraryResponseDto" - } - } - }, "description": "" } }, @@ -5342,13 +4880,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LibraryResponseDto" - } - } - }, "description": "" } }, @@ -5457,13 +4988,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LibraryStatsResponseDto" - } - } - }, "description": "" } }, @@ -5528,13 +5052,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidateLibraryResponseDto" - } - } - }, "description": "" } }, @@ -5578,7 +5095,7 @@ "parameters": [ { "name": "fileCreatedAfter", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -5587,7 +5104,7 @@ }, { "name": "fileCreatedBefore", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -5596,7 +5113,7 @@ }, { "name": "isArchived", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5604,7 +5121,7 @@ }, { "name": "isFavorite", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5612,7 +5129,7 @@ }, { "name": "withPartners", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5620,7 +5137,7 @@ }, { "name": "withSharedAlbums", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5629,16 +5146,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/MapMarkerResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -5700,16 +5207,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/MapReverseGeocodeResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -5752,7 +5249,7 @@ "parameters": [ { "name": "for", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -5761,7 +5258,7 @@ }, { "name": "isSaved", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5769,7 +5266,7 @@ }, { "name": "isTrashed", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5777,7 +5274,7 @@ }, { "name": "order", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/MemorySearchOrder" @@ -5785,17 +5282,16 @@ }, { "name": "size", - "required": false, + "required": true, "in": "query", "description": "Number of memories to return", "schema": { - "minimum": 1, "type": "integer" } }, { "name": "type", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/MemoryType" @@ -5804,16 +5300,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/MemoryResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -5865,13 +5351,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryResponseDto" - } - } - }, "description": "" } }, @@ -5915,7 +5394,7 @@ "parameters": [ { "name": "for", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -5924,7 +5403,7 @@ }, { "name": "isSaved", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5932,7 +5411,7 @@ }, { "name": "isTrashed", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -5940,7 +5419,7 @@ }, { "name": "order", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/MemorySearchOrder" @@ -5948,17 +5427,16 @@ }, { "name": "size", - "required": false, + "required": true, "in": "query", "description": "Number of memories to return", "schema": { - "minimum": 1, "type": "integer" } }, { "name": "type", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/MemoryType" @@ -5967,13 +5445,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryStatisticsResponseDto" - } - } - }, "description": "" } }, @@ -6078,13 +5549,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryResponseDto" - } - } - }, "description": "" } }, @@ -6146,13 +5610,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryResponseDto" - } - } - }, "description": "" } }, @@ -6216,16 +5673,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -6287,16 +5734,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -6391,7 +5828,7 @@ "parameters": [ { "name": "id", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -6400,7 +5837,7 @@ }, { "name": "level", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/NotificationLevel" @@ -6408,7 +5845,7 @@ }, { "name": "type", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/NotificationType" @@ -6416,7 +5853,7 @@ }, { "name": "unread", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -6425,16 +5862,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/NotificationDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -6590,13 +6017,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationDto" - } - } - }, "description": "" } }, @@ -6658,13 +6078,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationDto" - } - } - }, "description": "" } }, @@ -6718,13 +6131,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthAuthorizeResponseDto" - } - } - }, "description": "" } }, @@ -6766,13 +6172,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponseDto" - } - } - }, "description": "" } }, @@ -6814,13 +6213,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -6894,13 +6286,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -6952,16 +6337,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PartnerResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -7013,13 +6388,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PartnerResponseDto" - } - } - }, "description": "" } }, @@ -7125,13 +6493,6 @@ ], "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PartnerResponseDto" - } - } - }, "description": "" } }, @@ -7191,13 +6552,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PartnerResponseDto" - } - } - }, "description": "" } }, @@ -7292,7 +6646,7 @@ "parameters": [ { "name": "closestAssetId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -7301,7 +6655,7 @@ }, { "name": "closestPersonId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -7312,10 +6666,7 @@ "name": "page", "required": false, "in": "query", - "description": "Page number for pagination", "schema": { - "minimum": 1, - "default": 1, "type": "number" } }, @@ -7323,17 +6674,13 @@ "name": "size", "required": false, "in": "query", - "description": "Number of items per page", "schema": { - "minimum": 1, - "maximum": 1000, - "default": 500, "type": "number" } }, { "name": "withHidden", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -7342,13 +6689,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeopleResponseDto" - } - } - }, "description": "" } }, @@ -7400,13 +6740,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonResponseDto" - } - } - }, "description": "" } }, @@ -7458,16 +6791,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -7572,13 +6895,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonResponseDto" - } - } - }, "description": "" } }, @@ -7640,13 +6956,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonResponseDto" - } - } - }, "description": "" } }, @@ -7710,16 +7019,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -7783,16 +7082,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PersonResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -7846,13 +7135,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonStatisticsResponseDto" - } - } - }, "description": "" } }, @@ -7957,16 +7239,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8010,16 +7282,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/SearchExploreResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8063,37 +7325,18 @@ "parameters": [ { "name": "albumIds", - "required": false, + "required": true, "in": "query", "schema": { "type": "array", "items": { - "type": "string", - "format": "uuid" + "type": "string" } } }, - { - "name": "city", - "required": false, - "in": "query", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "name": "country", - "required": false, - "in": "query", - "schema": { - "nullable": true, - "type": "string" - } - }, { "name": "createdAfter", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8102,24 +7345,16 @@ }, { "name": "createdBefore", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", "type": "string" } }, - { - "name": "deviceId", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "isEncoded", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8127,7 +7362,7 @@ }, { "name": "isFavorite", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8135,7 +7370,7 @@ }, { "name": "isMotion", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8143,7 +7378,7 @@ }, { "name": "isNotInAlbum", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8151,122 +7386,50 @@ }, { "name": "isOffline", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" } }, - { - "name": "lensModel", - "required": false, - "in": "query", - "schema": { - "nullable": true, - "type": "string" - } - }, { "name": "libraryId", - "required": false, + "required": true, "in": "query", "schema": { - "format": "uuid", - "nullable": true, - "type": "string" - } - }, - { - "name": "make", - "required": false, - "in": "query", - "schema": { - "type": "string" + "$ref": "#/components/schemas/Object" } }, { "name": "minFileSize", - "required": false, + "required": true, "in": "query", "schema": { - "minimum": 0, "type": "integer" } }, - { - "name": "model", - "required": false, - "in": "query", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "name": "ocr", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "personIds", - "required": false, + "required": true, "in": "query", "schema": { "type": "array", "items": { - "type": "string", - "format": "uuid" + "type": "string" } } }, - { - "name": "rating", - "required": false, - "in": "query", - "schema": { - "minimum": -1, - "maximum": 5, - "type": "number" - } - }, - { - "name": "size", - "required": false, - "in": "query", - "schema": { - "minimum": 1, - "maximum": 1000, - "type": "number" - } - }, - { - "name": "state", - "required": false, - "in": "query", - "schema": { - "nullable": true, - "type": "string" - } - }, { "name": "tagIds", - "required": false, + "required": true, "in": "query", "schema": { - "nullable": true, - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "$ref": "#/components/schemas/Object" } }, { "name": "takenAfter", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8275,7 +7438,7 @@ }, { "name": "takenBefore", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8284,7 +7447,7 @@ }, { "name": "trashedAfter", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8293,7 +7456,7 @@ }, { "name": "trashedBefore", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8302,7 +7465,7 @@ }, { "name": "type", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/AssetTypeEnum" @@ -8310,7 +7473,7 @@ }, { "name": "updatedAfter", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8319,7 +7482,7 @@ }, { "name": "updatedBefore", - "required": false, + "required": true, "in": "query", "schema": { "format": "date-time", @@ -8328,7 +7491,7 @@ }, { "name": "visibility", - "required": false, + "required": true, "in": "query", "schema": { "$ref": "#/components/schemas/AssetVisibility" @@ -8336,7 +7499,7 @@ }, { "name": "withDeleted", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8344,7 +7507,7 @@ }, { "name": "withExif", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8353,16 +7516,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8416,13 +7569,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResponseDto" - } - } - }, "description": "" } }, @@ -8464,17 +7610,9 @@ "description": "Search for people by name.", "operationId": "searchPerson", "parameters": [ - { - "name": "name", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "withHidden", - "required": false, + "required": true, "in": "query", "schema": { "type": "boolean" @@ -8483,16 +7621,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PersonResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8533,28 +7661,9 @@ "get": { "description": "Search for places by name.", "operationId": "searchPlaces", - "parameters": [ - { - "name": "name", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], + "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/PlacesResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8608,16 +7717,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8671,13 +7770,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResponseDto" - } - } - }, "description": "" } }, @@ -8731,13 +7823,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchStatisticsResponseDto" - } - } - }, "description": "" } }, @@ -8779,17 +7864,9 @@ "description": "Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.", "operationId": "getSearchSuggestions", "parameters": [ - { - "name": "country", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "includeNull", - "required": false, + "required": true, "in": "query", "x-immich-history": [ { @@ -8806,38 +7883,6 @@ "type": "boolean" } }, - { - "name": "lensModel", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "make", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "model", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "state", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "type", "required": true, @@ -8849,16 +7894,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -8902,13 +7937,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerAboutResponseDto" - } - } - }, "description": "" } }, @@ -8952,13 +7980,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerApkLinksDto" - } - } - }, "description": "" } }, @@ -9002,13 +8023,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerConfigDto" - } - } - }, "description": "" } }, @@ -9040,13 +8054,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerFeaturesDto" - } - } - }, "description": "" } }, @@ -9119,16 +8126,6 @@ "operationId": "getServerLicense", "parameters": [], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseResponseDto" - } - } - }, - "description": "" - }, "404": { "description": "" } @@ -9182,13 +8179,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseResponseDto" - } - } - }, "description": "" } }, @@ -9233,13 +8223,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerMediaTypesResponseDto" - } - } - }, "description": "" } }, @@ -9271,13 +8254,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerPingResponse" - } - } - }, "description": "" } }, @@ -9309,13 +8285,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerStatsResponseDto" - } - } - }, "description": "" } }, @@ -9360,13 +8329,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerStorageResponseDto" - } - } - }, "description": "" } }, @@ -9410,13 +8372,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerThemeDto" - } - } - }, "description": "" } }, @@ -9448,13 +8403,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerVersionResponseDto" - } - } - }, "description": "" } }, @@ -9486,13 +8434,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCheckStateResponseDto" - } - } - }, "description": "" } }, @@ -9536,16 +8477,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ServerVersionHistoryResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -9618,16 +8549,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/SessionResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -9679,13 +8600,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionCreateResponseDto" - } - } - }, "description": "" } }, @@ -9800,13 +8714,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionResponseDto" - } - } - }, "description": "" } }, @@ -9903,7 +8810,7 @@ "parameters": [ { "name": "albumId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -9913,16 +8820,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/SharedLinkResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -9974,13 +8871,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SharedLinkResponseDto" - } - } - }, "description": "" } }, @@ -10032,7 +8922,7 @@ }, { "name": "password", - "required": false, + "required": true, "in": "query", "schema": { "example": "password", @@ -10046,25 +8936,10 @@ "schema": { "type": "string" } - }, - { - "name": "token", - "required": false, - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SharedLinkResponseDto" - } - } - }, "description": "" } }, @@ -10168,13 +9043,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SharedLinkResponseDto" - } - } - }, "description": "" } }, @@ -10236,13 +9104,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SharedLinkResponseDto" - } - } - }, "description": "" } }, @@ -10322,16 +9183,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetIdsResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -10408,16 +9259,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetIdsResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -10511,7 +9352,7 @@ "parameters": [ { "name": "primaryAssetId", - "required": false, + "required": true, "in": "query", "schema": { "format": "uuid", @@ -10521,16 +9362,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/StackResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -10582,13 +9413,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StackResponseDto" - } - } - }, "description": "" } }, @@ -10693,13 +9517,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StackResponseDto" - } - } - }, "description": "" } }, @@ -10761,13 +9578,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StackResponseDto" - } - } - }, "description": "" } }, @@ -10924,16 +9734,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/SyncAckDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -11039,13 +9839,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetDeltaSyncResponseDto" - } - } - }, "description": "" } }, @@ -11096,16 +9889,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -11198,13 +9981,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemConfigDto" - } - } - }, "description": "" } }, @@ -11257,13 +10033,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemConfigDto" - } - } - }, "description": "" } }, @@ -11308,13 +10077,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemConfigDto" - } - } - }, "description": "" } }, @@ -11359,13 +10121,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemConfigTemplateStorageOptionDto" - } - } - }, "description": "" } }, @@ -11410,13 +10165,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AdminOnboardingUpdateDto" - } - } - }, "description": "" } }, @@ -11513,13 +10261,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReverseGeocodingStateResponseDto" - } - } - }, "description": "" } }, @@ -11564,13 +10305,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCheckStateResponseDto" - } - } - }, "description": "" } }, @@ -11615,16 +10349,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/TagResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -11676,13 +10400,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResponseDto" - } - } - }, "description": "" } }, @@ -11734,16 +10451,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/TagResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -11797,13 +10504,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagBulkAssetsResponseDto" - } - } - }, "description": "" } }, @@ -11908,13 +10608,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResponseDto" - } - } - }, "description": "" } }, @@ -11976,13 +10669,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResponseDto" - } - } - }, "description": "" } }, @@ -12046,16 +10732,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -12117,16 +10793,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/BulkIdResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -12170,7 +10836,7 @@ "parameters": [ { "name": "albumId", - "required": false, + "required": true, "in": "query", "description": "Filter assets belonging to a specific album", "schema": { @@ -12180,7 +10846,7 @@ }, { "name": "isFavorite", - "required": false, + "required": true, "in": "query", "description": "Filter by favorite status (true for favorites only, false for non-favorites only)", "schema": { @@ -12189,7 +10855,7 @@ }, { "name": "isTrashed", - "required": false, + "required": true, "in": "query", "description": "Filter by trash status (true for trashed assets only, false for non-trashed only)", "schema": { @@ -12206,7 +10872,7 @@ }, { "name": "order", - "required": false, + "required": true, "in": "query", "description": "Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)", "schema": { @@ -12215,7 +10881,7 @@ }, { "name": "personId", - "required": false, + "required": true, "in": "query", "description": "Filter assets containing a specific person (face recognition)", "schema": { @@ -12233,7 +10899,7 @@ }, { "name": "tagId", - "required": false, + "required": true, "in": "query", "description": "Filter assets with a specific tag", "schema": { @@ -12253,7 +10919,7 @@ }, { "name": "userId", - "required": false, + "required": true, "in": "query", "description": "Filter assets by specific user ID", "schema": { @@ -12263,7 +10929,7 @@ }, { "name": "visibility", - "required": false, + "required": true, "in": "query", "description": "Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)", "schema": { @@ -12272,7 +10938,7 @@ }, { "name": "withCoordinates", - "required": false, + "required": true, "in": "query", "description": "Include location data in the response", "schema": { @@ -12281,7 +10947,7 @@ }, { "name": "withPartners", - "required": false, + "required": true, "in": "query", "description": "Include assets shared by partners", "schema": { @@ -12290,7 +10956,7 @@ }, { "name": "withStacked", - "required": false, + "required": true, "in": "query", "description": "Include stacked assets in the response. When true, only primary assets from stacks are returned.", "schema": { @@ -12346,7 +11012,7 @@ "parameters": [ { "name": "albumId", - "required": false, + "required": true, "in": "query", "description": "Filter assets belonging to a specific album", "schema": { @@ -12356,7 +11022,7 @@ }, { "name": "isFavorite", - "required": false, + "required": true, "in": "query", "description": "Filter by favorite status (true for favorites only, false for non-favorites only)", "schema": { @@ -12365,7 +11031,7 @@ }, { "name": "isTrashed", - "required": false, + "required": true, "in": "query", "description": "Filter by trash status (true for trashed assets only, false for non-trashed only)", "schema": { @@ -12382,7 +11048,7 @@ }, { "name": "order", - "required": false, + "required": true, "in": "query", "description": "Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)", "schema": { @@ -12391,7 +11057,7 @@ }, { "name": "personId", - "required": false, + "required": true, "in": "query", "description": "Filter assets containing a specific person (face recognition)", "schema": { @@ -12409,7 +11075,7 @@ }, { "name": "tagId", - "required": false, + "required": true, "in": "query", "description": "Filter assets with a specific tag", "schema": { @@ -12419,7 +11085,7 @@ }, { "name": "userId", - "required": false, + "required": true, "in": "query", "description": "Filter assets by specific user ID", "schema": { @@ -12429,7 +11095,7 @@ }, { "name": "visibility", - "required": false, + "required": true, "in": "query", "description": "Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)", "schema": { @@ -12438,7 +11104,7 @@ }, { "name": "withCoordinates", - "required": false, + "required": true, "in": "query", "description": "Include location data in the response", "schema": { @@ -12447,7 +11113,7 @@ }, { "name": "withPartners", - "required": false, + "required": true, "in": "query", "description": "Include assets shared by partners", "schema": { @@ -12456,7 +11122,7 @@ }, { "name": "withStacked", - "required": false, + "required": true, "in": "query", "description": "Include stacked assets in the response. When true, only primary assets from stacks are returned.", "schema": { @@ -12466,16 +11132,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/TimeBucketsResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -12515,13 +11171,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrashResponseDto" - } - } - }, "description": "" } }, @@ -12565,13 +11214,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrashResponseDto" - } - } - }, "description": "" } }, @@ -12625,13 +11267,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrashResponseDto" - } - } - }, "description": "" } }, @@ -12675,16 +11310,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/UserResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -12728,13 +11353,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -12786,13 +11404,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAdminResponseDto" - } - } - }, "description": "" } }, @@ -12877,13 +11488,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseResponseDto" - } - } - }, "description": "" } }, @@ -12935,13 +11539,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseResponseDto" - } - } - }, "description": "" } }, @@ -13026,13 +11623,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OnboardingResponseDto" - } - } - }, "description": "" } }, @@ -13084,13 +11674,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OnboardingResponseDto" - } - } - }, "description": "" } }, @@ -13134,13 +11717,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserPreferencesResponseDto" - } - } - }, "description": "" } }, @@ -13192,13 +11768,6 @@ }, "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserPreferencesResponseDto" - } - } - }, "description": "" } }, @@ -13294,13 +11863,6 @@ }, "responses": { "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProfileImageResponseDto" - } - } - }, "description": "" } }, @@ -13354,13 +11916,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResponseDto" - } - } - }, "description": "" } }, @@ -13474,16 +12029,6 @@ ], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -13526,16 +12071,6 @@ "parameters": [], "responses": { "200": { - "content": { - "application/json": { - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - }, "description": "" } }, @@ -13627,6 +12162,10 @@ "name": "Libraries", "description": "An external library is made up of input file paths or expressions that are scanned for asset files. Discovered files are automatically imported. Assets much be unique within a library, but can be duplicated across libraries. Each user has a default upload library, and can have one or more external libraries." }, + { + "name": "Maintenance (admin)", + "description": "Maintenance mode allows you to put Immich in a read-only state to perform various operations." + }, { "name": "Map", "description": "Map endpoints include supplemental functionality related to geolocation, such as reverse geocoding and retrieving map markers for assets with geolocation data." @@ -13735,14 +12274,10 @@ "schemas": { "APIKeyCreateDto": { "properties": { - "name": { - "type": "string" - }, "permissions": { "items": { "$ref": "#/components/schemas/Permission" }, - "minItems": 1, "type": "array" } }, @@ -13751,66 +12286,18 @@ ], "type": "object" }, - "APIKeyCreateResponseDto": { - "properties": { - "apiKey": { - "$ref": "#/components/schemas/APIKeyResponseDto" - }, - "secret": { - "type": "string" - } - }, - "required": [ - "apiKey", - "secret" - ], - "type": "object" - }, - "APIKeyResponseDto": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "permissions": { - "items": { - "$ref": "#/components/schemas/Permission" - }, - "type": "array" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "createdAt", - "id", - "name", - "permissions", - "updatedAt" - ], - "type": "object" - }, "APIKeyUpdateDto": { "properties": { - "name": { - "type": "string" - }, "permissions": { "items": { "$ref": "#/components/schemas/Permission" }, - "minItems": 1, "type": "array" } }, + "required": [ + "permissions" + ], "type": "object" }, "ActivityCreateDto": { @@ -13823,9 +12310,6 @@ "format": "uuid", "type": "string" }, - "comment": { - "type": "string" - }, "type": { "allOf": [ { @@ -13836,75 +12320,13 @@ }, "required": [ "albumId", + "assetId", "type" ], "type": "object" }, - "ActivityResponseDto": { - "properties": { - "assetId": { - "nullable": true, - "type": "string" - }, - "comment": { - "nullable": true, - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ReactionType" - } - ] - }, - "user": { - "$ref": "#/components/schemas/UserResponseDto" - } - }, - "required": [ - "assetId", - "createdAt", - "id", - "type", - "user" - ], - "type": "object" - }, - "ActivityStatisticsResponseDto": { - "properties": { - "comments": { - "type": "integer" - }, - "likes": { - "type": "integer" - } - }, - "required": [ - "comments", - "likes" - ], - "type": "object" - }, "AddUsersDto": { - "properties": { - "albumUsers": { - "items": { - "$ref": "#/components/schemas/AlbumUserAddDto" - }, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "albumUsers" - ], + "properties": {}, "type": "object" }, "AdminOnboardingUpdateDto": { @@ -13918,181 +12340,6 @@ ], "type": "object" }, - "AlbumResponseDto": { - "properties": { - "albumName": { - "type": "string" - }, - "albumThumbnailAssetId": { - "nullable": true, - "type": "string" - }, - "albumUsers": { - "items": { - "$ref": "#/components/schemas/AlbumUserResponseDto" - }, - "type": "array" - }, - "assetCount": { - "type": "integer" - }, - "assets": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - }, - "contributorCounts": { - "items": { - "$ref": "#/components/schemas/ContributorCountResponseDto" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "description": { - "type": "string" - }, - "endDate": { - "format": "date-time", - "type": "string" - }, - "hasSharedLink": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "isActivityEnabled": { - "type": "boolean" - }, - "lastModifiedAssetTimestamp": { - "format": "date-time", - "type": "string" - }, - "order": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetOrder" - } - ] - }, - "owner": { - "$ref": "#/components/schemas/UserResponseDto" - }, - "ownerId": { - "type": "string" - }, - "shared": { - "type": "boolean" - }, - "startDate": { - "format": "date-time", - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "albumName", - "albumThumbnailAssetId", - "albumUsers", - "assetCount", - "assets", - "createdAt", - "description", - "hasSharedLink", - "id", - "isActivityEnabled", - "owner", - "ownerId", - "shared", - "updatedAt" - ], - "type": "object" - }, - "AlbumStatisticsResponseDto": { - "properties": { - "notShared": { - "type": "integer" - }, - "owned": { - "type": "integer" - }, - "shared": { - "type": "integer" - } - }, - "required": [ - "notShared", - "owned", - "shared" - ], - "type": "object" - }, - "AlbumUserAddDto": { - "properties": { - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/AlbumUserRole" - } - ], - "default": "editor" - }, - "userId": { - "format": "uuid", - "type": "string" - } - }, - "required": [ - "userId" - ], - "type": "object" - }, - "AlbumUserCreateDto": { - "properties": { - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/AlbumUserRole" - } - ] - }, - "userId": { - "format": "uuid", - "type": "string" - } - }, - "required": [ - "role", - "userId" - ], - "type": "object" - }, - "AlbumUserResponseDto": { - "properties": { - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/AlbumUserRole" - } - ] - }, - "user": { - "$ref": "#/components/schemas/UserResponseDto" - } - }, - "required": [ - "role", - "user" - ], - "type": "object" - }, "AlbumUserRole": { "enum": [ "editor", @@ -14123,123 +12370,6 @@ ], "type": "object" }, - "AlbumsAddAssetsResponseDto": { - "properties": { - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/BulkIdErrorReason" - } - ] - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ], - "type": "object" - }, - "AlbumsResponse": { - "properties": { - "defaultAssetOrder": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetOrder" - } - ], - "default": "desc" - } - }, - "required": [ - "defaultAssetOrder" - ], - "type": "object" - }, - "AlbumsUpdate": { - "properties": { - "defaultAssetOrder": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetOrder" - } - ] - } - }, - "type": "object" - }, - "AllJobStatusResponseDto": { - "properties": { - "backgroundTask": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "backupDatabase": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "duplicateDetection": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "faceDetection": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "facialRecognition": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "library": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "metadataExtraction": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "migration": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "notifications": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "ocr": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "search": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "sidecar": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "smartSearch": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "storageTemplateMigration": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "thumbnailGeneration": { - "$ref": "#/components/schemas/JobStatusDto" - }, - "videoConversion": { - "$ref": "#/components/schemas/JobStatusDto" - } - }, - "required": [ - "backgroundTask", - "backupDatabase", - "duplicateDetection", - "faceDetection", - "facialRecognition", - "library", - "metadataExtraction", - "migration", - "notifications", - "ocr", - "search", - "sidecar", - "smartSearch", - "storageTemplateMigration", - "thumbnailGeneration", - "videoConversion" - ], - "type": "object" - }, "AssetBulkDeleteDto": { "properties": { "force": { @@ -14254,25 +12384,13 @@ } }, "required": [ + "force", "ids" ], "type": "object" }, "AssetBulkUpdateDto": { "properties": { - "dateTimeOriginal": { - "type": "string" - }, - "dateTimeRelative": { - "type": "number" - }, - "description": { - "type": "string" - }, - "duplicateId": { - "nullable": true, - "type": "string" - }, "ids": { "items": { "format": "uuid", @@ -14283,20 +12401,6 @@ "isFavorite": { "type": "boolean" }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "rating": { - "maximum": 5, - "minimum": -1, - "type": "number" - }, - "timeZone": { - "type": "string" - }, "visibility": { "allOf": [ { @@ -14306,84 +12410,14 @@ } }, "required": [ - "ids" + "ids", + "isFavorite", + "visibility" ], "type": "object" }, "AssetBulkUploadCheckDto": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetBulkUploadCheckItem" - }, - "type": "array" - } - }, - "required": [ - "assets" - ], - "type": "object" - }, - "AssetBulkUploadCheckItem": { - "properties": { - "checksum": { - "description": "base64 or hex encoded sha1 hash", - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "checksum", - "id" - ], - "type": "object" - }, - "AssetBulkUploadCheckResponseDto": { - "properties": { - "results": { - "items": { - "$ref": "#/components/schemas/AssetBulkUploadCheckResult" - }, - "type": "array" - } - }, - "required": [ - "results" - ], - "type": "object" - }, - "AssetBulkUploadCheckResult": { - "properties": { - "action": { - "enum": [ - "accept", - "reject" - ], - "type": "string" - }, - "assetId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isTrashed": { - "type": "boolean" - }, - "reason": { - "enum": [ - "duplicate", - "unsupported-format" - ], - "type": "string" - } - }, - "required": [ - "action", - "id" - ], + "properties": {}, "type": "object" }, "AssetCopyDto": { @@ -14418,7 +12452,12 @@ } }, "required": [ + "albums", + "favorite", + "sharedLinks", + "sidecar", "sourceId", + "stack", "targetId" ], "type": "object" @@ -14443,31 +12482,6 @@ ], "type": "object" }, - "AssetDeltaSyncResponseDto": { - "properties": { - "deleted": { - "items": { - "type": "string" - }, - "type": "array" - }, - "needsFullSync": { - "type": "boolean" - }, - "upserted": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - } - }, - "required": [ - "deleted", - "needsFullSync", - "upserted" - ], - "type": "object" - }, "AssetFaceCreateDto": { "properties": { "assetId": { @@ -14510,140 +12524,11 @@ "type": "object" }, "AssetFaceDeleteDto": { - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - }, - "AssetFaceResponseDto": { - "properties": { - "boundingBoxX1": { - "type": "integer" - }, - "boundingBoxX2": { - "type": "integer" - }, - "boundingBoxY1": { - "type": "integer" - }, - "boundingBoxY2": { - "type": "integer" - }, - "id": { - "format": "uuid", - "type": "string" - }, - "imageHeight": { - "type": "integer" - }, - "imageWidth": { - "type": "integer" - }, - "person": { - "allOf": [ - { - "$ref": "#/components/schemas/PersonResponseDto" - } - ], - "nullable": true - }, - "sourceType": { - "allOf": [ - { - "$ref": "#/components/schemas/SourceType" - } - ] - } - }, - "required": [ - "boundingBoxX1", - "boundingBoxX2", - "boundingBoxY1", - "boundingBoxY2", - "id", - "imageHeight", - "imageWidth", - "person" - ], + "properties": {}, "type": "object" }, "AssetFaceUpdateDto": { - "properties": { - "data": { - "items": { - "$ref": "#/components/schemas/AssetFaceUpdateItem" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "AssetFaceUpdateItem": { - "properties": { - "assetId": { - "format": "uuid", - "type": "string" - }, - "personId": { - "format": "uuid", - "type": "string" - } - }, - "required": [ - "assetId", - "personId" - ], - "type": "object" - }, - "AssetFaceWithoutPersonResponseDto": { - "properties": { - "boundingBoxX1": { - "type": "integer" - }, - "boundingBoxX2": { - "type": "integer" - }, - "boundingBoxY1": { - "type": "integer" - }, - "boundingBoxY2": { - "type": "integer" - }, - "id": { - "format": "uuid", - "type": "string" - }, - "imageHeight": { - "type": "integer" - }, - "imageWidth": { - "type": "integer" - }, - "sourceType": { - "allOf": [ - { - "$ref": "#/components/schemas/SourceType" - } - ] - } - }, - "required": [ - "boundingBoxX1", - "boundingBoxX2", - "boundingBoxY1", - "boundingBoxY2", - "id", - "imageHeight", - "imageWidth" - ], + "properties": {}, "type": "object" }, "AssetFullSyncDto": { @@ -14653,7 +12538,6 @@ "type": "string" }, "limit": { - "minimum": 1, "type": "integer" }, "updatedUntil": { @@ -14666,8 +12550,10 @@ } }, "required": [ + "lastId", "limit", - "updatedUntil" + "updatedUntil", + "userId" ], "type": "object" }, @@ -14686,29 +12572,6 @@ ], "type": "object" }, - "AssetIdsResponseDto": { - "properties": { - "assetId": { - "type": "string" - }, - "error": { - "enum": [ - "duplicate", - "no_permission", - "not_found" - ], - "type": "string" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "assetId", - "success" - ], - "type": "object" - }, "AssetJobName": { "enum": [ "refresh-faces", @@ -14747,15 +12610,6 @@ "format": "binary", "type": "string" }, - "deviceAssetId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "duration": { - "type": "string" - }, "fileCreatedAt": { "format": "date-time", "type": "string" @@ -14764,9 +12618,6 @@ "format": "date-time", "type": "string" }, - "filename": { - "type": "string" - }, "isFavorite": { "type": "boolean" }, @@ -14774,12 +12625,6 @@ "format": "uuid", "type": "string" }, - "metadata": { - "items": { - "$ref": "#/components/schemas/AssetMetadataUpsertItemDto" - }, - "type": "array" - }, "sidecarData": { "format": "binary", "type": "string" @@ -14794,11 +12639,11 @@ }, "required": [ "assetData", - "deviceAssetId", - "deviceId", "fileCreatedAt", "fileModifiedAt", - "metadata" + "isFavorite", + "livePhotoVideoId", + "visibility" ], "type": "object" }, @@ -14808,15 +12653,6 @@ "format": "binary", "type": "string" }, - "deviceAssetId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "duration": { - "type": "string" - }, "fileCreatedAt": { "format": "date-time", "type": "string" @@ -14824,39 +12660,15 @@ "fileModifiedAt": { "format": "date-time", "type": "string" - }, - "filename": { - "type": "string" } }, "required": [ "assetData", - "deviceAssetId", - "deviceId", "fileCreatedAt", "fileModifiedAt" ], "type": "object" }, - "AssetMediaResponseDto": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetMediaStatus" - } - ] - } - }, - "required": [ - "id", - "status" - ], - "type": "object" - }, "AssetMediaSize": { "enum": [ "fullsize", @@ -14865,157 +12677,14 @@ ], "type": "string" }, - "AssetMediaStatus": { - "enum": [ - "created", - "replaced", - "duplicate" - ], - "type": "string" - }, "AssetMetadataKey": { "enum": [ "mobile-app" ], "type": "string" }, - "AssetMetadataResponseDto": { - "properties": { - "key": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetMetadataKey" - } - ] - }, - "updatedAt": { - "format": "date-time", - "type": "string" - }, - "value": { - "type": "object" - } - }, - "required": [ - "key", - "updatedAt", - "value" - ], - "type": "object" - }, "AssetMetadataUpsertDto": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/AssetMetadataUpsertItemDto" - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "AssetMetadataUpsertItemDto": { - "properties": { - "key": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetMetadataKey" - } - ] - }, - "value": { - "type": "object" - } - }, - "required": [ - "key", - "value" - ], - "type": "object" - }, - "AssetOcrResponseDto": { - "properties": { - "assetId": { - "format": "uuid", - "type": "string" - }, - "boxScore": { - "description": "Confidence score for text detection box", - "format": "double", - "type": "number" - }, - "id": { - "format": "uuid", - "type": "string" - }, - "text": { - "description": "Recognized text", - "type": "string" - }, - "textScore": { - "description": "Confidence score for text recognition", - "format": "double", - "type": "number" - }, - "x1": { - "description": "Normalized x coordinate of box corner 1 (0-1)", - "format": "double", - "type": "number" - }, - "x2": { - "description": "Normalized x coordinate of box corner 2 (0-1)", - "format": "double", - "type": "number" - }, - "x3": { - "description": "Normalized x coordinate of box corner 3 (0-1)", - "format": "double", - "type": "number" - }, - "x4": { - "description": "Normalized x coordinate of box corner 4 (0-1)", - "format": "double", - "type": "number" - }, - "y1": { - "description": "Normalized y coordinate of box corner 1 (0-1)", - "format": "double", - "type": "number" - }, - "y2": { - "description": "Normalized y coordinate of box corner 2 (0-1)", - "format": "double", - "type": "number" - }, - "y3": { - "description": "Normalized y coordinate of box corner 3 (0-1)", - "format": "double", - "type": "number" - }, - "y4": { - "description": "Normalized y coordinate of box corner 4 (0-1)", - "format": "double", - "type": "number" - } - }, - "required": [ - "assetId", - "boxScore", - "id", - "text", - "textScore", - "x1", - "x2", - "x3", - "x4", - "y1", - "y2", - "y3", - "y4" - ], + "properties": {}, "type": "object" }, "AssetOrder": { @@ -15025,234 +12694,6 @@ ], "type": "string" }, - "AssetResponseDto": { - "properties": { - "checksum": { - "description": "base64 encoded sha1 hash", - "type": "string" - }, - "createdAt": { - "description": "The UTC timestamp when the asset was originally uploaded to Immich.", - "example": "2024-01-15T20:30:00.000Z", - "format": "date-time", - "type": "string" - }, - "deviceAssetId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "duplicateId": { - "nullable": true, - "type": "string" - }, - "duration": { - "type": "string" - }, - "exifInfo": { - "$ref": "#/components/schemas/ExifResponseDto" - }, - "fileCreatedAt": { - "description": "The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken.", - "example": "2024-01-15T19:30:00.000Z", - "format": "date-time", - "type": "string" - }, - "fileModifiedAt": { - "description": "The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken.", - "example": "2024-01-16T10:15:00.000Z", - "format": "date-time", - "type": "string" - }, - "hasMetadata": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "isArchived": { - "type": "boolean" - }, - "isFavorite": { - "type": "boolean" - }, - "isOffline": { - "type": "boolean" - }, - "isTrashed": { - "type": "boolean" - }, - "libraryId": { - "deprecated": true, - "nullable": true, - "type": "string", - "x-immich-history": [ - { - "version": "v1", - "state": "Added" - }, - { - "version": "v1", - "state": "Deprecated" - } - ], - "x-immich-state": "Deprecated" - }, - "livePhotoVideoId": { - "nullable": true, - "type": "string" - }, - "localDateTime": { - "description": "The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months.", - "example": "2024-01-15T14:30:00.000Z", - "format": "date-time", - "type": "string" - }, - "originalFileName": { - "type": "string" - }, - "originalMimeType": { - "type": "string" - }, - "originalPath": { - "type": "string" - }, - "owner": { - "$ref": "#/components/schemas/UserResponseDto" - }, - "ownerId": { - "type": "string" - }, - "people": { - "items": { - "$ref": "#/components/schemas/PersonWithFacesResponseDto" - }, - "type": "array" - }, - "resized": { - "deprecated": true, - "type": "boolean", - "x-immich-history": [ - { - "version": "v1", - "state": "Added" - }, - { - "version": "v1.113.0", - "state": "Deprecated" - } - ], - "x-immich-state": "Deprecated" - }, - "stack": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetStackResponseDto" - } - ], - "nullable": true - }, - "tags": { - "items": { - "$ref": "#/components/schemas/TagResponseDto" - }, - "type": "array" - }, - "thumbhash": { - "nullable": true, - "type": "string" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetTypeEnum" - } - ] - }, - "unassignedFaces": { - "items": { - "$ref": "#/components/schemas/AssetFaceWithoutPersonResponseDto" - }, - "type": "array" - }, - "updatedAt": { - "description": "The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified.", - "example": "2024-01-16T12:45:30.000Z", - "format": "date-time", - "type": "string" - }, - "visibility": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetVisibility" - } - ] - } - }, - "required": [ - "checksum", - "createdAt", - "deviceAssetId", - "deviceId", - "duration", - "fileCreatedAt", - "fileModifiedAt", - "hasMetadata", - "id", - "isArchived", - "isFavorite", - "isOffline", - "isTrashed", - "localDateTime", - "originalFileName", - "originalPath", - "ownerId", - "thumbhash", - "type", - "updatedAt", - "visibility" - ], - "type": "object" - }, - "AssetStackResponseDto": { - "properties": { - "assetCount": { - "type": "integer" - }, - "id": { - "type": "string" - }, - "primaryAssetId": { - "type": "string" - } - }, - "required": [ - "assetCount", - "id", - "primaryAssetId" - ], - "type": "object" - }, - "AssetStatsResponseDto": { - "properties": { - "images": { - "type": "integer" - }, - "total": { - "type": "integer" - }, - "videos": { - "type": "integer" - } - }, - "required": [ - "images", - "total", - "videos" - ], - "type": "object" - }, "AssetTypeEnum": { "enum": [ "IMAGE", @@ -15271,85 +12712,6 @@ ], "type": "string" }, - "AudioCodec": { - "enum": [ - "mp3", - "aac", - "libopus", - "pcm_s16le" - ], - "type": "string" - }, - "AuthStatusResponseDto": { - "properties": { - "expiresAt": { - "type": "string" - }, - "isElevated": { - "type": "boolean" - }, - "password": { - "type": "boolean" - }, - "pinCode": { - "type": "boolean" - }, - "pinExpiresAt": { - "type": "string" - } - }, - "required": [ - "isElevated", - "password", - "pinCode" - ], - "type": "object" - }, - "AvatarUpdate": { - "properties": { - "color": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAvatarColor" - } - ] - } - }, - "type": "object" - }, - "BulkIdErrorReason": { - "enum": [ - "duplicate", - "no_permission", - "not_found", - "unknown" - ], - "type": "string" - }, - "BulkIdResponseDto": { - "properties": { - "error": { - "enum": [ - "duplicate", - "no_permission", - "not_found", - "unknown" - ], - "type": "string" - }, - "id": { - "type": "string" - }, - "success": { - "type": "boolean" - } - }, - "required": [ - "id", - "success" - ], - "type": "object" - }, "BulkIdsDto": { "properties": { "ids": { @@ -15365,49 +12727,6 @@ ], "type": "object" }, - "CLIPConfig": { - "properties": { - "enabled": { - "type": "boolean" - }, - "modelName": { - "type": "string" - } - }, - "required": [ - "enabled", - "modelName" - ], - "type": "object" - }, - "CQMode": { - "enum": [ - "auto", - "cqp", - "icq" - ], - "type": "string" - }, - "CastResponse": { - "properties": { - "gCastEnabled": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "gCastEnabled" - ], - "type": "object" - }, - "CastUpdate": { - "properties": { - "gCastEnabled": { - "type": "boolean" - } - }, - "type": "object" - }, "ChangePasswordDto": { "properties": { "invalidateSessions": { @@ -15416,7 +12735,6 @@ }, "newPassword": { "example": "password", - "minLength": 8, "type": "string" }, "password": { @@ -15425,64 +12743,14 @@ } }, "required": [ + "invalidateSessions", "newPassword", "password" ], "type": "object" }, "CheckExistingAssetsDto": { - "properties": { - "deviceAssetIds": { - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array" - }, - "deviceId": { - "type": "string" - } - }, - "required": [ - "deviceAssetIds", - "deviceId" - ], - "type": "object" - }, - "CheckExistingAssetsResponseDto": { - "properties": { - "existingIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "existingIds" - ], - "type": "object" - }, - "Colorspace": { - "enum": [ - "srgb", - "p3" - ], - "type": "string" - }, - "ContributorCountResponseDto": { - "properties": { - "assetCount": { - "type": "integer" - }, - "userId": { - "type": "string" - } - }, - "required": [ - "assetCount", - "userId" - ], + "properties": {}, "type": "object" }, "CreateAlbumDto": { @@ -15490,49 +12758,22 @@ "albumName": { "type": "string" }, - "albumUsers": { - "items": { - "$ref": "#/components/schemas/AlbumUserCreateDto" - }, - "type": "array" - }, "assetIds": { "items": { "format": "uuid", "type": "string" }, "type": "array" - }, - "description": { - "type": "string" } }, "required": [ - "albumName" + "albumName", + "assetIds" ], "type": "object" }, "CreateLibraryDto": { "properties": { - "exclusionPatterns": { - "items": { - "type": "string" - }, - "maxItems": 128, - "type": "array", - "uniqueItems": true - }, - "importPaths": { - "items": { - "type": "string" - }, - "maxItems": 128, - "type": "array", - "uniqueItems": true - }, - "name": { - "type": "string" - }, "ownerId": { "format": "uuid", "type": "string" @@ -15555,64 +12796,6 @@ ], "type": "object" }, - "CreateProfileImageResponseDto": { - "properties": { - "profileChangedAt": { - "format": "date-time", - "type": "string" - }, - "profileImagePath": { - "type": "string" - }, - "userId": { - "type": "string" - } - }, - "required": [ - "profileChangedAt", - "profileImagePath", - "userId" - ], - "type": "object" - }, - "DatabaseBackupConfig": { - "properties": { - "cronExpression": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "keepLastAmount": { - "minimum": 1, - "type": "number" - } - }, - "required": [ - "cronExpression", - "enabled", - "keepLastAmount" - ], - "type": "object" - }, - "DownloadArchiveInfo": { - "properties": { - "assetIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "size": { - "type": "integer" - } - }, - "required": [ - "assetIds", - "size" - ], - "type": "object" - }, "DownloadInfoDto": { "properties": { "albumId": { @@ -15620,7 +12803,6 @@ "type": "string" }, "archiveSize": { - "minimum": 1, "type": "integer" }, "assetIds": { @@ -15635,241 +12817,14 @@ "type": "string" } }, - "type": "object" - }, - "DownloadResponse": { - "properties": { - "archiveSize": { - "type": "integer" - }, - "includeEmbeddedVideos": { - "default": false, - "type": "boolean" - } - }, "required": [ + "albumId", "archiveSize", - "includeEmbeddedVideos" + "assetIds", + "userId" ], "type": "object" }, - "DownloadResponseDto": { - "properties": { - "archives": { - "items": { - "$ref": "#/components/schemas/DownloadArchiveInfo" - }, - "type": "array" - }, - "totalSize": { - "type": "integer" - } - }, - "required": [ - "archives", - "totalSize" - ], - "type": "object" - }, - "DownloadUpdate": { - "properties": { - "archiveSize": { - "minimum": 1, - "type": "integer" - }, - "includeEmbeddedVideos": { - "type": "boolean" - } - }, - "type": "object" - }, - "DuplicateDetectionConfig": { - "properties": { - "enabled": { - "type": "boolean" - }, - "maxDistance": { - "format": "double", - "maximum": 0.1, - "minimum": 0.001, - "type": "number" - } - }, - "required": [ - "enabled", - "maxDistance" - ], - "type": "object" - }, - "DuplicateResponseDto": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - }, - "duplicateId": { - "type": "string" - } - }, - "required": [ - "assets", - "duplicateId" - ], - "type": "object" - }, - "EmailNotificationsResponse": { - "properties": { - "albumInvite": { - "type": "boolean" - }, - "albumUpdate": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "albumInvite", - "albumUpdate", - "enabled" - ], - "type": "object" - }, - "EmailNotificationsUpdate": { - "properties": { - "albumInvite": { - "type": "boolean" - }, - "albumUpdate": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - } - }, - "type": "object" - }, - "ExifResponseDto": { - "properties": { - "city": { - "default": null, - "nullable": true, - "type": "string" - }, - "country": { - "default": null, - "nullable": true, - "type": "string" - }, - "dateTimeOriginal": { - "default": null, - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "default": null, - "nullable": true, - "type": "string" - }, - "exifImageHeight": { - "default": null, - "nullable": true, - "type": "number" - }, - "exifImageWidth": { - "default": null, - "nullable": true, - "type": "number" - }, - "exposureTime": { - "default": null, - "nullable": true, - "type": "string" - }, - "fNumber": { - "default": null, - "nullable": true, - "type": "number" - }, - "fileSizeInByte": { - "default": null, - "format": "int64", - "nullable": true, - "type": "integer" - }, - "focalLength": { - "default": null, - "nullable": true, - "type": "number" - }, - "iso": { - "default": null, - "nullable": true, - "type": "number" - }, - "latitude": { - "default": null, - "nullable": true, - "type": "number" - }, - "lensModel": { - "default": null, - "nullable": true, - "type": "string" - }, - "longitude": { - "default": null, - "nullable": true, - "type": "number" - }, - "make": { - "default": null, - "nullable": true, - "type": "string" - }, - "model": { - "default": null, - "nullable": true, - "type": "string" - }, - "modifyDate": { - "default": null, - "format": "date-time", - "nullable": true, - "type": "string" - }, - "orientation": { - "default": null, - "nullable": true, - "type": "string" - }, - "projectionType": { - "default": null, - "nullable": true, - "type": "string" - }, - "rating": { - "default": null, - "nullable": true, - "type": "number" - }, - "state": { - "default": null, - "nullable": true, - "type": "string" - }, - "timeZone": { - "default": null, - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, "FaceDto": { "properties": { "id": { @@ -15882,75 +12837,6 @@ ], "type": "object" }, - "FacialRecognitionConfig": { - "properties": { - "enabled": { - "type": "boolean" - }, - "maxDistance": { - "format": "double", - "maximum": 2, - "minimum": 0.1, - "type": "number" - }, - "minFaces": { - "minimum": 1, - "type": "integer" - }, - "minScore": { - "format": "double", - "maximum": 1, - "minimum": 0.1, - "type": "number" - }, - "modelName": { - "type": "string" - } - }, - "required": [ - "enabled", - "maxDistance", - "minFaces", - "minScore", - "modelName" - ], - "type": "object" - }, - "FoldersResponse": { - "properties": { - "enabled": { - "default": false, - "type": "boolean" - }, - "sidebarWeb": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "enabled", - "sidebarWeb" - ], - "type": "object" - }, - "FoldersUpdate": { - "properties": { - "enabled": { - "type": "boolean" - }, - "sidebarWeb": { - "type": "boolean" - } - }, - "type": "object" - }, - "ImageFormat": { - "enum": [ - "jpeg", - "webp" - ], - "type": "string" - }, "JobCommand": { "enum": [ "start", @@ -15975,38 +12861,8 @@ } }, "required": [ - "command" - ], - "type": "object" - }, - "JobCountsDto": { - "properties": { - "active": { - "type": "integer" - }, - "completed": { - "type": "integer" - }, - "delayed": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "paused": { - "type": "integer" - }, - "waiting": { - "type": "integer" - } - }, - "required": [ - "active", - "completed", - "delayed", - "failed", - "paused", - "waiting" + "command", + "force" ], "type": "object" }, @@ -16046,114 +12902,6 @@ ], "type": "string" }, - "JobSettingsDto": { - "properties": { - "concurrency": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "concurrency" - ], - "type": "object" - }, - "JobStatusDto": { - "properties": { - "jobCounts": { - "$ref": "#/components/schemas/JobCountsDto" - }, - "queueStatus": { - "$ref": "#/components/schemas/QueueStatusDto" - } - }, - "required": [ - "jobCounts", - "queueStatus" - ], - "type": "object" - }, - "LibraryResponseDto": { - "properties": { - "assetCount": { - "type": "integer" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "exclusionPatterns": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "importPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "refreshedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "assetCount", - "createdAt", - "exclusionPatterns", - "id", - "importPaths", - "name", - "ownerId", - "refreshedAt", - "updatedAt" - ], - "type": "object" - }, - "LibraryStatsResponseDto": { - "properties": { - "photos": { - "default": 0, - "type": "integer" - }, - "total": { - "default": 0, - "type": "integer" - }, - "usage": { - "default": 0, - "format": "int64", - "type": "integer" - }, - "videos": { - "default": 0, - "type": "integer" - } - }, - "required": [ - "photos", - "total", - "usage", - "videos" - ], - "type": "object" - }, "LicenseKeyDto": { "properties": { "activationKey": { @@ -16170,43 +12918,10 @@ ], "type": "object" }, - "LicenseResponseDto": { - "properties": { - "activatedAt": { - "format": "date-time", - "type": "string" - }, - "activationKey": { - "type": "string" - }, - "licenseKey": { - "pattern": "/IM(SV|CL)(-[\\dA-Za-z]{4}){8}/", - "type": "string" - } - }, - "required": [ - "activatedAt", - "activationKey", - "licenseKey" - ], - "type": "object" - }, - "LogLevel": { - "enum": [ - "verbose", - "debug", - "log", - "warn", - "error", - "fatal" - ], - "type": "string" - }, "LoginCredentialDto": { "properties": { "email": { "example": "testuser@email.com", - "format": "email", "type": "string" }, "password": { @@ -16220,79 +12935,6 @@ ], "type": "object" }, - "LoginResponseDto": { - "properties": { - "accessToken": { - "type": "string" - }, - "isAdmin": { - "type": "boolean" - }, - "isOnboarded": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "profileImagePath": { - "type": "string" - }, - "shouldChangePassword": { - "type": "boolean" - }, - "userEmail": { - "type": "string" - }, - "userId": { - "type": "string" - } - }, - "required": [ - "accessToken", - "isAdmin", - "isOnboarded", - "name", - "profileImagePath", - "shouldChangePassword", - "userEmail", - "userId" - ], - "type": "object" - }, - "LogoutResponseDto": { - "properties": { - "redirectUri": { - "type": "string" - }, - "successful": { - "type": "boolean" - } - }, - "required": [ - "redirectUri", - "successful" - ], - "type": "object" - }, - "MachineLearningAvailabilityChecksDto": { - "properties": { - "enabled": { - "type": "boolean" - }, - "interval": { - "type": "number" - }, - "timeout": { - "type": "number" - } - }, - "required": [ - "enabled", - "interval", - "timeout" - ], - "type": "object" - }, "MaintenanceAuthDto": { "properties": { "username": { @@ -16323,93 +12965,6 @@ ], "type": "string" }, - "MapMarkerResponseDto": { - "properties": { - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, - "id": { - "type": "string" - }, - "lat": { - "format": "double", - "type": "number" - }, - "lon": { - "format": "double", - "type": "number" - }, - "state": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "city", - "country", - "id", - "lat", - "lon", - "state" - ], - "type": "object" - }, - "MapReverseGeocodeResponseDto": { - "properties": { - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, - "state": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "city", - "country", - "state" - ], - "type": "object" - }, - "MemoriesResponse": { - "properties": { - "duration": { - "default": 5, - "type": "integer" - }, - "enabled": { - "default": true, - "type": "boolean" - } - }, - "required": [ - "duration", - "enabled" - ], - "type": "object" - }, - "MemoriesUpdate": { - "properties": { - "duration": { - "minimum": 1, - "type": "integer" - }, - "enabled": { - "type": "boolean" - } - }, - "type": "object" - }, "MemoryCreateDto": { "properties": { "assetIds": { @@ -16419,9 +12974,6 @@ }, "type": "array" }, - "data": { - "$ref": "#/components/schemas/OnThisDayDto" - }, "isSaved": { "type": "boolean" }, @@ -16442,78 +12994,11 @@ } }, "required": [ - "data", - "memoryAt", - "type" - ], - "type": "object" - }, - "MemoryResponseDto": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "data": { - "$ref": "#/components/schemas/OnThisDayDto" - }, - "deletedAt": { - "format": "date-time", - "type": "string" - }, - "hideAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "isSaved": { - "type": "boolean" - }, - "memoryAt": { - "format": "date-time", - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "seenAt": { - "format": "date-time", - "type": "string" - }, - "showAt": { - "format": "date-time", - "type": "string" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryType" - } - ] - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "assets", - "createdAt", - "data", - "id", + "assetIds", "isSaved", "memoryAt", - "ownerId", - "type", - "updatedAt" + "seenAt", + "type" ], "type": "object" }, @@ -16525,17 +13010,6 @@ ], "type": "string" }, - "MemoryStatisticsResponseDto": { - "properties": { - "total": { - "type": "integer" - } - }, - "required": [ - "total" - ], - "type": "object" - }, "MemoryType": { "enum": [ "on_this_day" @@ -16556,6 +13030,11 @@ "type": "string" } }, + "required": [ + "isSaved", + "memoryAt", + "seenAt" + ], "type": "object" }, "MergePersonDto": { @@ -16582,17 +13061,6 @@ }, "type": "array" }, - "checksum": { - "type": "string" - }, - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, "createdAfter": { "format": "date-time", "type": "string" @@ -16604,15 +13072,6 @@ "description": { "type": "string" }, - "deviceAssetId": { - "type": "string" - }, - "deviceId": { - "type": "string" - }, - "encodedVideoPath": { - "type": "string" - }, "id": { "format": "uuid", "type": "string" @@ -16632,24 +13091,9 @@ "isOffline": { "type": "boolean" }, - "lensModel": { - "nullable": true, - "type": "string" - }, "libraryId": { "format": "uuid", - "nullable": true, - "type": "string" - }, - "make": { - "type": "string" - }, - "model": { - "nullable": true, - "type": "string" - }, - "ocr": { - "type": "string" + "type": "object" }, "order": { "allOf": [ @@ -16662,13 +13106,6 @@ "originalFileName": { "type": "string" }, - "originalPath": { - "type": "string" - }, - "page": { - "minimum": 1, - "type": "number" - }, "personIds": { "items": { "format": "uuid", @@ -16676,30 +13113,9 @@ }, "type": "array" }, - "previewPath": { - "type": "string" - }, - "rating": { - "maximum": 5, - "minimum": -1, - "type": "number" - }, - "size": { - "maximum": 1000, - "minimum": 1, - "type": "number" - }, - "state": { - "nullable": true, - "type": "string" - }, "tagIds": { - "items": { - "format": "uuid", - "type": "string" - }, - "nullable": true, - "type": "array" + "format": "uuid", + "type": "object" }, "takenAfter": { "format": "date-time", @@ -16709,9 +13125,6 @@ "format": "date-time", "type": "string" }, - "thumbnailPath": { - "type": "string" - }, "trashedAfter": { "format": "date-time", "type": "string" @@ -16755,17 +13168,39 @@ "type": "boolean" } }, + "required": [ + "albumIds", + "createdAfter", + "createdBefore", + "description", + "id", + "isEncoded", + "isFavorite", + "isMotion", + "isNotInAlbum", + "isOffline", + "libraryId", + "order", + "originalFileName", + "personIds", + "tagIds", + "takenAfter", + "takenBefore", + "trashedAfter", + "trashedBefore", + "type", + "updatedAfter", + "updatedBefore", + "visibility", + "withDeleted", + "withExif", + "withPeople", + "withStacked" + ], "type": "object" }, "NotificationCreateDto": { "properties": { - "data": { - "type": "object" - }, - "description": { - "nullable": true, - "type": "string" - }, "level": { "allOf": [ { @@ -16775,11 +13210,7 @@ }, "readAt": { "format": "date-time", - "nullable": true, - "type": "string" - }, - "title": { - "type": "string" + "type": "object" }, "type": { "allOf": [ @@ -16794,7 +13225,9 @@ } }, "required": [ - "title", + "level", + "readAt", + "type", "userId" ], "type": "object" @@ -16814,52 +13247,6 @@ ], "type": "object" }, - "NotificationDto": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "data": { - "type": "object" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "level": { - "allOf": [ - { - "$ref": "#/components/schemas/NotificationLevel" - } - ] - }, - "readAt": { - "format": "date-time", - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/NotificationType" - } - ] - } - }, - "required": [ - "createdAt", - "id", - "level", - "title", - "type" - ], - "type": "object" - }, "NotificationLevel": { "enum": [ "success", @@ -16891,12 +13278,12 @@ }, "readAt": { "format": "date-time", - "nullable": true, - "type": "string" + "type": "object" } }, "required": [ - "ids" + "ids", + "readAt" ], "type": "object" }, @@ -16904,31 +13291,16 @@ "properties": { "readAt": { "format": "date-time", - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "OAuthAuthorizeResponseDto": { - "properties": { - "url": { - "type": "string" + "type": "object" } }, "required": [ - "url" + "readAt" ], "type": "object" }, "OAuthCallbackDto": { "properties": { - "codeVerifier": { - "type": "string" - }, - "state": { - "type": "string" - }, "url": { "type": "string" } @@ -16939,73 +13311,11 @@ "type": "object" }, "OAuthConfigDto": { - "properties": { - "codeChallenge": { - "type": "string" - }, - "redirectUri": { - "type": "string" - }, - "state": { - "type": "string" - } - }, - "required": [ - "redirectUri" - ], + "properties": {}, "type": "object" }, - "OAuthTokenEndpointAuthMethod": { - "enum": [ - "client_secret_post", - "client_secret_basic" - ], - "type": "string" - }, - "OcrConfig": { - "properties": { - "enabled": { - "type": "boolean" - }, - "maxResolution": { - "minimum": 1, - "type": "integer" - }, - "minDetectionScore": { - "format": "double", - "maximum": 1, - "minimum": 0.1, - "type": "number" - }, - "minRecognitionScore": { - "format": "double", - "maximum": 1, - "minimum": 0.1, - "type": "number" - }, - "modelName": { - "type": "string" - } - }, - "required": [ - "enabled", - "maxResolution", - "minDetectionScore", - "minRecognitionScore", - "modelName" - ], - "type": "object" - }, - "OnThisDayDto": { - "properties": { - "year": { - "minimum": 1, - "type": "number" - } - }, - "required": [ - "year" - ], + "Object": { + "properties": {}, "type": "object" }, "OnboardingDto": { @@ -17019,17 +13329,6 @@ ], "type": "object" }, - "OnboardingResponseDto": { - "properties": { - "isOnboarded": { - "type": "boolean" - } - }, - "required": [ - "isOnboarded" - ], - "type": "object" - }, "PartnerCreateDto": { "properties": { "sharedWithId": { @@ -17049,170 +13348,12 @@ ], "type": "string" }, - "PartnerResponseDto": { - "properties": { - "avatarColor": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAvatarColor" - } - ] - }, - "email": { - "type": "string" - }, - "id": { - "type": "string" - }, - "inTimeline": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "profileChangedAt": { - "format": "date-time", - "type": "string" - }, - "profileImagePath": { - "type": "string" - } - }, - "required": [ - "avatarColor", - "email", - "id", - "name", - "profileChangedAt", - "profileImagePath" - ], - "type": "object" - }, "PartnerUpdateDto": { - "properties": { - "inTimeline": { - "type": "boolean" - } - }, - "required": [ - "inTimeline" - ], - "type": "object" - }, - "PeopleResponse": { - "properties": { - "enabled": { - "default": true, - "type": "boolean" - }, - "sidebarWeb": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "enabled", - "sidebarWeb" - ], - "type": "object" - }, - "PeopleResponseDto": { - "properties": { - "hasNextPage": { - "type": "boolean", - "x-immich-history": [ - { - "version": "v1.110.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" - }, - "hidden": { - "type": "integer" - }, - "people": { - "items": { - "$ref": "#/components/schemas/PersonResponseDto" - }, - "type": "array" - }, - "total": { - "type": "integer" - } - }, - "required": [ - "hidden", - "people", - "total" - ], - "type": "object" - }, - "PeopleUpdate": { - "properties": { - "enabled": { - "type": "boolean" - }, - "sidebarWeb": { - "type": "boolean" - } - }, + "properties": {}, "type": "object" }, "PeopleUpdateDto": { - "properties": { - "people": { - "items": { - "$ref": "#/components/schemas/PeopleUpdateItem" - }, - "type": "array" - } - }, - "required": [ - "people" - ], - "type": "object" - }, - "PeopleUpdateItem": { - "properties": { - "birthDate": { - "description": "Person date of birth.\nNote: the mobile app cannot currently set the birth date to null.", - "format": "date", - "nullable": true, - "type": "string" - }, - "color": { - "nullable": true, - "type": "string" - }, - "featureFaceAssetId": { - "description": "Asset is used to get the feature face thumbnail.", - "format": "uuid", - "type": "string" - }, - "id": { - "description": "Person id.", - "type": "string" - }, - "isFavorite": { - "type": "boolean" - }, - "isHidden": { - "description": "Person visibility", - "type": "boolean" - }, - "name": { - "description": "Person name.", - "type": "string" - } - }, - "required": [ - "id" - ], + "properties": {}, "type": "object" }, "Permission": { @@ -17354,126 +13495,30 @@ "PersonCreateDto": { "properties": { "birthDate": { - "description": "Person date of birth.\nNote: the mobile app cannot currently set the birth date to null.", "format": "date", - "nullable": true, - "type": "string" - }, - "color": { - "nullable": true, - "type": "string" + "type": "object" }, "isFavorite": { "type": "boolean" }, "isHidden": { - "description": "Person visibility", "type": "boolean" - }, - "name": { - "description": "Person name.", - "type": "string" - } - }, - "type": "object" - }, - "PersonResponseDto": { - "properties": { - "birthDate": { - "format": "date", - "nullable": true, - "type": "string" - }, - "color": { - "type": "string", - "x-immich-history": [ - { - "version": "v1.126.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" - }, - "id": { - "type": "string" - }, - "isFavorite": { - "type": "boolean", - "x-immich-history": [ - { - "version": "v1.126.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" - }, - "isHidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "thumbnailPath": { - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "x-immich-history": [ - { - "version": "v1.107.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" } }, "required": [ "birthDate", - "id", - "isHidden", - "name", - "thumbnailPath" - ], - "type": "object" - }, - "PersonStatisticsResponseDto": { - "properties": { - "assets": { - "type": "integer" - } - }, - "required": [ - "assets" + "isFavorite", + "isHidden" ], "type": "object" }, "PersonUpdateDto": { "properties": { "birthDate": { - "description": "Person date of birth.\nNote: the mobile app cannot currently set the birth date to null.", "format": "date", - "nullable": true, - "type": "string" - }, - "color": { - "nullable": true, - "type": "string" + "type": "object" }, "featureFaceAssetId": { - "description": "Asset is used to get the feature face thumbnail.", "format": "uuid", "type": "string" }, @@ -17481,92 +13526,14 @@ "type": "boolean" }, "isHidden": { - "description": "Person visibility", "type": "boolean" - }, - "name": { - "description": "Person name.", - "type": "string" - } - }, - "type": "object" - }, - "PersonWithFacesResponseDto": { - "properties": { - "birthDate": { - "format": "date", - "nullable": true, - "type": "string" - }, - "color": { - "type": "string", - "x-immich-history": [ - { - "version": "v1.126.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" - }, - "faces": { - "items": { - "$ref": "#/components/schemas/AssetFaceWithoutPersonResponseDto" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "isFavorite": { - "type": "boolean", - "x-immich-history": [ - { - "version": "v1.126.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" - }, - "isHidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "thumbnailPath": { - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "x-immich-history": [ - { - "version": "v1.107.0", - "state": "Added" - }, - { - "version": "v2", - "state": "Stable" - } - ], - "x-immich-state": "Stable" } }, "required": [ "birthDate", - "faces", - "id", - "isHidden", - "name", - "thumbnailPath" + "featureFaceAssetId", + "isFavorite", + "isHidden" ], "type": "object" }, @@ -17576,29 +13543,27 @@ "example": "123456", "type": "string" }, - "password": { - "type": "string" - }, "pinCode": { "example": "123456", "type": "string" } }, "required": [ - "newPinCode" + "newPinCode", + "pinCode" ], "type": "object" }, "PinCodeResetDto": { "properties": { - "password": { - "type": "string" - }, "pinCode": { "example": "123456", "type": "string" } }, + "required": [ + "pinCode" + ], "type": "object" }, "PinCodeSetupDto": { @@ -17613,72 +13578,6 @@ ], "type": "object" }, - "PlacesResponseDto": { - "properties": { - "admin1name": { - "type": "string" - }, - "admin2name": { - "type": "string" - }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "required": [ - "latitude", - "longitude", - "name" - ], - "type": "object" - }, - "PurchaseResponse": { - "properties": { - "hideBuyButtonUntil": { - "type": "string" - }, - "showSupportBadge": { - "type": "boolean" - } - }, - "required": [ - "hideBuyButtonUntil", - "showSupportBadge" - ], - "type": "object" - }, - "PurchaseUpdate": { - "properties": { - "hideBuyButtonUntil": { - "type": "string" - }, - "showSupportBadge": { - "type": "boolean" - } - }, - "type": "object" - }, - "QueueStatusDto": { - "properties": { - "isActive": { - "type": "boolean" - }, - "isPaused": { - "type": "boolean" - } - }, - "required": [ - "isActive", - "isPaused" - ], - "type": "object" - }, "RandomSearchDto": { "properties": { "albumIds": { @@ -17688,14 +13587,6 @@ }, "type": "array" }, - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, "createdAfter": { "format": "date-time", "type": "string" @@ -17704,9 +13595,6 @@ "format": "date-time", "type": "string" }, - "deviceId": { - "type": "string" - }, "isEncoded": { "type": "boolean" }, @@ -17722,24 +13610,9 @@ "isOffline": { "type": "boolean" }, - "lensModel": { - "nullable": true, - "type": "string" - }, "libraryId": { "format": "uuid", - "nullable": true, - "type": "string" - }, - "make": { - "type": "string" - }, - "model": { - "nullable": true, - "type": "string" - }, - "ocr": { - "type": "string" + "type": "object" }, "personIds": { "items": { @@ -17748,27 +13621,9 @@ }, "type": "array" }, - "rating": { - "maximum": 5, - "minimum": -1, - "type": "number" - }, - "size": { - "maximum": 1000, - "minimum": 1, - "type": "number" - }, - "state": { - "nullable": true, - "type": "string" - }, "tagIds": { - "items": { - "format": "uuid", - "type": "string" - }, - "nullable": true, - "type": "array" + "format": "uuid", + "type": "object" }, "takenAfter": { "format": "date-time", @@ -17821,28 +13676,33 @@ "type": "boolean" } }, - "type": "object" - }, - "RatingsResponse": { - "properties": { - "enabled": { - "default": false, - "type": "boolean" - } - }, "required": [ - "enabled" + "albumIds", + "createdAfter", + "createdBefore", + "isEncoded", + "isFavorite", + "isMotion", + "isNotInAlbum", + "isOffline", + "libraryId", + "personIds", + "tagIds", + "takenAfter", + "takenBefore", + "trashedAfter", + "trashedBefore", + "type", + "updatedAfter", + "updatedBefore", + "visibility", + "withDeleted", + "withExif", + "withPeople", + "withStacked" ], "type": "object" }, - "RatingsUpdate": { - "properties": { - "enabled": { - "type": "boolean" - } - }, - "type": "object" - }, "ReactionLevel": { "enum": [ "album", @@ -17857,178 +13717,6 @@ ], "type": "string" }, - "ReverseGeocodingStateResponseDto": { - "properties": { - "lastImportFileName": { - "nullable": true, - "type": "string" - }, - "lastUpdate": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "lastImportFileName", - "lastUpdate" - ], - "type": "object" - }, - "SearchAlbumResponseDto": { - "properties": { - "count": { - "type": "integer" - }, - "facets": { - "items": { - "$ref": "#/components/schemas/SearchFacetResponseDto" - }, - "type": "array" - }, - "items": { - "items": { - "$ref": "#/components/schemas/AlbumResponseDto" - }, - "type": "array" - }, - "total": { - "type": "integer" - } - }, - "required": [ - "count", - "facets", - "items", - "total" - ], - "type": "object" - }, - "SearchAssetResponseDto": { - "properties": { - "count": { - "type": "integer" - }, - "facets": { - "items": { - "$ref": "#/components/schemas/SearchFacetResponseDto" - }, - "type": "array" - }, - "items": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - }, - "nextPage": { - "nullable": true, - "type": "string" - }, - "total": { - "type": "integer" - } - }, - "required": [ - "count", - "facets", - "items", - "nextPage", - "total" - ], - "type": "object" - }, - "SearchExploreItem": { - "properties": { - "data": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "value": { - "type": "string" - } - }, - "required": [ - "data", - "value" - ], - "type": "object" - }, - "SearchExploreResponseDto": { - "properties": { - "fieldName": { - "type": "string" - }, - "items": { - "items": { - "$ref": "#/components/schemas/SearchExploreItem" - }, - "type": "array" - } - }, - "required": [ - "fieldName", - "items" - ], - "type": "object" - }, - "SearchFacetCountResponseDto": { - "properties": { - "count": { - "type": "integer" - }, - "value": { - "type": "string" - } - }, - "required": [ - "count", - "value" - ], - "type": "object" - }, - "SearchFacetResponseDto": { - "properties": { - "counts": { - "items": { - "$ref": "#/components/schemas/SearchFacetCountResponseDto" - }, - "type": "array" - }, - "fieldName": { - "type": "string" - } - }, - "required": [ - "counts", - "fieldName" - ], - "type": "object" - }, - "SearchResponseDto": { - "properties": { - "albums": { - "$ref": "#/components/schemas/SearchAlbumResponseDto" - }, - "assets": { - "$ref": "#/components/schemas/SearchAssetResponseDto" - } - }, - "required": [ - "albums", - "assets" - ], - "type": "object" - }, - "SearchStatisticsResponseDto": { - "properties": { - "total": { - "type": "integer" - } - }, - "required": [ - "total" - ], - "type": "object" - }, "SearchSuggestionType": { "enum": [ "country", @@ -18040,519 +13728,20 @@ ], "type": "string" }, - "ServerAboutResponseDto": { - "properties": { - "build": { - "type": "string" - }, - "buildImage": { - "type": "string" - }, - "buildImageUrl": { - "type": "string" - }, - "buildUrl": { - "type": "string" - }, - "exiftool": { - "type": "string" - }, - "ffmpeg": { - "type": "string" - }, - "imagemagick": { - "type": "string" - }, - "libvips": { - "type": "string" - }, - "licensed": { - "type": "boolean" - }, - "nodejs": { - "type": "string" - }, - "repository": { - "type": "string" - }, - "repositoryUrl": { - "type": "string" - }, - "sourceCommit": { - "type": "string" - }, - "sourceRef": { - "type": "string" - }, - "sourceUrl": { - "type": "string" - }, - "thirdPartyBugFeatureUrl": { - "type": "string" - }, - "thirdPartyDocumentationUrl": { - "type": "string" - }, - "thirdPartySourceUrl": { - "type": "string" - }, - "thirdPartySupportUrl": { - "type": "string" - }, - "version": { - "type": "string" - }, - "versionUrl": { - "type": "string" - } - }, - "required": [ - "licensed", - "version", - "versionUrl" - ], - "type": "object" - }, - "ServerApkLinksDto": { - "properties": { - "arm64v8a": { - "type": "string" - }, - "armeabiv7a": { - "type": "string" - }, - "universal": { - "type": "string" - }, - "x86_64": { - "type": "string" - } - }, - "required": [ - "arm64v8a", - "armeabiv7a", - "universal", - "x86_64" - ], - "type": "object" - }, - "ServerConfigDto": { - "properties": { - "externalDomain": { - "type": "string" - }, - "isInitialized": { - "type": "boolean" - }, - "isOnboarded": { - "type": "boolean" - }, - "loginPageMessage": { - "type": "string" - }, - "maintenanceMode": { - "type": "boolean" - }, - "mapDarkStyleUrl": { - "type": "string" - }, - "mapLightStyleUrl": { - "type": "string" - }, - "oauthButtonText": { - "type": "string" - }, - "publicUsers": { - "type": "boolean" - }, - "trashDays": { - "type": "integer" - }, - "userDeleteDelay": { - "type": "integer" - } - }, - "required": [ - "externalDomain", - "isInitialized", - "isOnboarded", - "loginPageMessage", - "maintenanceMode", - "mapDarkStyleUrl", - "mapLightStyleUrl", - "oauthButtonText", - "publicUsers", - "trashDays", - "userDeleteDelay" - ], - "type": "object" - }, - "ServerFeaturesDto": { - "properties": { - "configFile": { - "type": "boolean" - }, - "duplicateDetection": { - "type": "boolean" - }, - "email": { - "type": "boolean" - }, - "facialRecognition": { - "type": "boolean" - }, - "importFaces": { - "type": "boolean" - }, - "map": { - "type": "boolean" - }, - "oauth": { - "type": "boolean" - }, - "oauthAutoLaunch": { - "type": "boolean" - }, - "ocr": { - "type": "boolean" - }, - "passwordLogin": { - "type": "boolean" - }, - "reverseGeocoding": { - "type": "boolean" - }, - "search": { - "type": "boolean" - }, - "sidecar": { - "type": "boolean" - }, - "smartSearch": { - "type": "boolean" - }, - "trash": { - "type": "boolean" - } - }, - "required": [ - "configFile", - "duplicateDetection", - "email", - "facialRecognition", - "importFaces", - "map", - "oauth", - "oauthAutoLaunch", - "ocr", - "passwordLogin", - "reverseGeocoding", - "search", - "sidecar", - "smartSearch", - "trash" - ], - "type": "object" - }, - "ServerMediaTypesResponseDto": { - "properties": { - "image": { - "items": { - "type": "string" - }, - "type": "array" - }, - "sidecar": { - "items": { - "type": "string" - }, - "type": "array" - }, - "video": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "image", - "sidecar", - "video" - ], - "type": "object" - }, - "ServerPingResponse": { - "properties": { - "res": { - "example": "pong", - "readOnly": true, - "type": "string" - } - }, - "required": [ - "res" - ], - "type": "object" - }, - "ServerStatsResponseDto": { - "properties": { - "photos": { - "default": 0, - "type": "integer" - }, - "usage": { - "default": 0, - "format": "int64", - "type": "integer" - }, - "usageByUser": { - "default": [], - "example": [ - { - "photos": 1, - "videos": 1, - "diskUsageRaw": 2, - "usagePhotos": 1, - "usageVideos": 1 - } - ], - "items": { - "$ref": "#/components/schemas/UsageByUserDto" - }, - "title": "Array of usage for each user", - "type": "array" - }, - "usagePhotos": { - "default": 0, - "format": "int64", - "type": "integer" - }, - "usageVideos": { - "default": 0, - "format": "int64", - "type": "integer" - }, - "videos": { - "default": 0, - "type": "integer" - } - }, - "required": [ - "photos", - "usage", - "usageByUser", - "usagePhotos", - "usageVideos", - "videos" - ], - "type": "object" - }, - "ServerStorageResponseDto": { - "properties": { - "diskAvailable": { - "type": "string" - }, - "diskAvailableRaw": { - "format": "int64", - "type": "integer" - }, - "diskSize": { - "type": "string" - }, - "diskSizeRaw": { - "format": "int64", - "type": "integer" - }, - "diskUsagePercentage": { - "format": "double", - "type": "number" - }, - "diskUse": { - "type": "string" - }, - "diskUseRaw": { - "format": "int64", - "type": "integer" - } - }, - "required": [ - "diskAvailable", - "diskAvailableRaw", - "diskSize", - "diskSizeRaw", - "diskUsagePercentage", - "diskUse", - "diskUseRaw" - ], - "type": "object" - }, - "ServerThemeDto": { - "properties": { - "customCss": { - "type": "string" - } - }, - "required": [ - "customCss" - ], - "type": "object" - }, - "ServerVersionHistoryResponseDto": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "createdAt", - "id", - "version" - ], - "type": "object" - }, - "ServerVersionResponseDto": { - "properties": { - "major": { - "type": "integer" - }, - "minor": { - "type": "integer" - }, - "patch": { - "type": "integer" - } - }, - "required": [ - "major", - "minor", - "patch" - ], - "type": "object" - }, "SessionCreateDto": { - "properties": { - "deviceOS": { - "type": "string" - }, - "deviceType": { - "type": "string" - }, - "duration": { - "description": "session duration, in seconds", - "minimum": 1, - "type": "number" - } - }, - "type": "object" - }, - "SessionCreateResponseDto": { - "properties": { - "appVersion": { - "nullable": true, - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "current": { - "type": "boolean" - }, - "deviceOS": { - "type": "string" - }, - "deviceType": { - "type": "string" - }, - "expiresAt": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isPendingSyncReset": { - "type": "boolean" - }, - "token": { - "type": "string" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "appVersion", - "createdAt", - "current", - "deviceOS", - "deviceType", - "id", - "isPendingSyncReset", - "token", - "updatedAt" - ], - "type": "object" - }, - "SessionResponseDto": { - "properties": { - "appVersion": { - "nullable": true, - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "current": { - "type": "boolean" - }, - "deviceOS": { - "type": "string" - }, - "deviceType": { - "type": "string" - }, - "expiresAt": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isPendingSyncReset": { - "type": "boolean" - }, - "updatedAt": { - "type": "string" - } - }, - "required": [ - "appVersion", - "createdAt", - "current", - "deviceOS", - "deviceType", - "id", - "isPendingSyncReset", - "updatedAt" - ], + "properties": {}, "type": "object" }, "SessionUnlockDto": { "properties": { - "password": { - "type": "string" - }, "pinCode": { "example": "123456", "type": "string" } }, + "required": [ + "pinCode" + ], "type": "object" }, "SessionUpdateDto": { @@ -18561,6 +13750,20 @@ "type": "boolean" } }, + "required": [ + "isPendingSyncReset" + ], + "type": "object" + }, + "SetMaintenanceModeDto": { + "properties": { + "maintenanceMode": { + "type": "boolean" + } + }, + "required": [ + "maintenanceMode" + ], "type": "object" }, "SharedLinkCreateDto": { @@ -18570,7 +13773,6 @@ "type": "string" }, "allowDownload": { - "default": true, "type": "boolean" }, "allowUpload": { @@ -18583,28 +13785,13 @@ }, "type": "array" }, - "description": { - "nullable": true, - "type": "string" - }, "expiresAt": { - "default": null, "format": "date-time", - "nullable": true, - "type": "string" - }, - "password": { - "nullable": true, - "type": "string" + "type": "object" }, "showMetadata": { - "default": true, "type": "boolean" }, - "slug": { - "nullable": true, - "type": "string" - }, "type": { "allOf": [ { @@ -18614,6 +13801,12 @@ } }, "required": [ + "albumId", + "allowDownload", + "allowUpload", + "assetIds", + "expiresAt", + "showMetadata", "type" ], "type": "object" @@ -18627,108 +13820,17 @@ "type": "boolean" }, "changeExpiryTime": { - "description": "Few clients cannot send null to set the expiryTime to never.\nSetting this flag and not sending expiryAt is considered as null instead.\nClients that can send null values can ignore this.", "type": "boolean" }, - "description": { - "nullable": true, - "type": "string" - }, - "expiresAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "password": { - "nullable": true, - "type": "string" - }, "showMetadata": { "type": "boolean" - }, - "slug": { - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, - "SharedLinkResponseDto": { - "properties": { - "album": { - "$ref": "#/components/schemas/AlbumResponseDto" - }, - "allowDownload": { - "type": "boolean" - }, - "allowUpload": { - "type": "boolean" - }, - "assets": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "description": { - "nullable": true, - "type": "string" - }, - "expiresAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "id": { - "type": "string" - }, - "key": { - "type": "string" - }, - "password": { - "nullable": true, - "type": "string" - }, - "showMetadata": { - "type": "boolean" - }, - "slug": { - "nullable": true, - "type": "string" - }, - "token": { - "nullable": true, - "type": "string" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/SharedLinkType" - } - ] - }, - "userId": { - "type": "string" } }, "required": [ "allowDownload", "allowUpload", - "assets", - "createdAt", - "description", - "expiresAt", - "id", - "key", - "password", - "showMetadata", - "slug", - "type", - "userId" + "changeExpiryTime", + "showMetadata" ], "type": "object" }, @@ -18739,39 +13841,10 @@ ], "type": "string" }, - "SharedLinksResponse": { - "properties": { - "enabled": { - "default": true, - "type": "boolean" - }, - "sidebarWeb": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "enabled", - "sidebarWeb" - ], - "type": "object" - }, - "SharedLinksUpdate": { - "properties": { - "enabled": { - "type": "boolean" - }, - "sidebarWeb": { - "type": "boolean" - } - }, - "type": "object" - }, "SignUpDto": { "properties": { "email": { "example": "testuser@email.com", - "format": "email", "type": "string" }, "name": { @@ -18799,14 +13872,6 @@ }, "type": "array" }, - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, "createdAfter": { "format": "date-time", "type": "string" @@ -18815,9 +13880,6 @@ "format": "date-time", "type": "string" }, - "deviceId": { - "type": "string" - }, "isEncoded": { "type": "boolean" }, @@ -18833,31 +13895,9 @@ "isOffline": { "type": "boolean" }, - "language": { - "type": "string" - }, - "lensModel": { - "nullable": true, - "type": "string" - }, "libraryId": { "format": "uuid", - "nullable": true, - "type": "string" - }, - "make": { - "type": "string" - }, - "model": { - "nullable": true, - "type": "string" - }, - "ocr": { - "type": "string" - }, - "page": { - "minimum": 1, - "type": "number" + "type": "object" }, "personIds": { "items": { @@ -18873,27 +13913,9 @@ "format": "uuid", "type": "string" }, - "rating": { - "maximum": 5, - "minimum": -1, - "type": "number" - }, - "size": { - "maximum": 1000, - "minimum": 1, - "type": "number" - }, - "state": { - "nullable": true, - "type": "string" - }, "tagIds": { - "items": { - "format": "uuid", - "type": "string" - }, - "nullable": true, - "type": "array" + "format": "uuid", + "type": "object" }, "takenAfter": { "format": "date-time", @@ -18940,25 +13962,40 @@ "type": "boolean" } }, - "type": "object" - }, - "SourceType": { - "enum": [ - "machine-learning", - "exif", - "manual" + "required": [ + "albumIds", + "createdAfter", + "createdBefore", + "isEncoded", + "isFavorite", + "isMotion", + "isNotInAlbum", + "isOffline", + "libraryId", + "personIds", + "query", + "queryAssetId", + "tagIds", + "takenAfter", + "takenBefore", + "trashedAfter", + "trashedBefore", + "type", + "updatedAfter", + "updatedBefore", + "visibility", + "withDeleted", + "withExif" ], - "type": "string" + "type": "object" }, "StackCreateDto": { "properties": { "assetIds": { - "description": "first asset becomes the primary", "items": { "format": "uuid", "type": "string" }, - "minItems": 2, "type": "array" } }, @@ -18967,28 +14004,6 @@ ], "type": "object" }, - "StackResponseDto": { - "properties": { - "assets": { - "items": { - "$ref": "#/components/schemas/AssetResponseDto" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "primaryAssetId": { - "type": "string" - } - }, - "required": [ - "assets", - "id", - "primaryAssetId" - ], - "type": "object" - }, "StackUpdateDto": { "properties": { "primaryAssetId": { @@ -18996,6 +14011,9 @@ "type": "string" } }, + "required": [ + "primaryAssetId" + ], "type": "object" }, "StatisticsSearchDto": { @@ -19007,14 +14025,6 @@ }, "type": "array" }, - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, "createdAfter": { "format": "date-time", "type": "string" @@ -19026,9 +14036,6 @@ "description": { "type": "string" }, - "deviceId": { - "type": "string" - }, "isEncoded": { "type": "boolean" }, @@ -19044,24 +14051,9 @@ "isOffline": { "type": "boolean" }, - "lensModel": { - "nullable": true, - "type": "string" - }, "libraryId": { "format": "uuid", - "nullable": true, - "type": "string" - }, - "make": { - "type": "string" - }, - "model": { - "nullable": true, - "type": "string" - }, - "ocr": { - "type": "string" + "type": "object" }, "personIds": { "items": { @@ -19070,22 +14062,9 @@ }, "type": "array" }, - "rating": { - "maximum": 5, - "minimum": -1, - "type": "number" - }, - "state": { - "nullable": true, - "type": "string" - }, "tagIds": { - "items": { - "format": "uuid", - "type": "string" - }, - "nullable": true, - "type": "array" + "format": "uuid", + "type": "object" }, "takenAfter": { "format": "date-time", @@ -19126,6 +14105,28 @@ ] } }, + "required": [ + "albumIds", + "createdAfter", + "createdBefore", + "description", + "isEncoded", + "isFavorite", + "isMotion", + "isNotInAlbum", + "isOffline", + "libraryId", + "personIds", + "tagIds", + "takenAfter", + "takenBefore", + "trashedAfter", + "trashedBefore", + "type", + "updatedAfter", + "updatedBefore", + "visibility" + ], "type": "object" }, "SyncAckDeleteDto": { @@ -19137,40 +14138,13 @@ "type": "array" } }, - "type": "object" - }, - "SyncAckDto": { - "properties": { - "ack": { - "type": "string" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/SyncEntityType" - } - ] - } - }, "required": [ - "ack", - "type" + "types" ], "type": "object" }, "SyncAckSetDto": { - "properties": { - "acks": { - "items": { - "type": "string" - }, - "maxItems": 1000, - "type": "array" - } - }, - "required": [ - "acks" - ], + "properties": {}, "type": "object" }, "SyncAckV1": { @@ -19178,299 +14152,113 @@ "type": "object" }, "SyncAlbumDeleteV1": { - "properties": { - "albumId": { - "type": "string" - } - }, - "required": [ - "albumId" - ], + "properties": {}, "type": "object" }, "SyncAlbumToAssetDeleteV1": { - "properties": { - "albumId": { - "type": "string" - }, - "assetId": { - "type": "string" - } - }, - "required": [ - "albumId", - "assetId" - ], + "properties": {}, "type": "object" }, "SyncAlbumToAssetV1": { - "properties": { - "albumId": { - "type": "string" - }, - "assetId": { - "type": "string" - } - }, - "required": [ - "albumId", - "assetId" - ], + "properties": {}, "type": "object" }, "SyncAlbumUserDeleteV1": { - "properties": { - "albumId": { - "type": "string" - }, - "userId": { - "type": "string" - } - }, - "required": [ - "albumId", - "userId" - ], + "properties": {}, "type": "object" }, "SyncAlbumUserV1": { "properties": { - "albumId": { - "type": "string" - }, "role": { "allOf": [ { "$ref": "#/components/schemas/AlbumUserRole" } ] - }, - "userId": { - "type": "string" } }, "required": [ - "albumId", - "role", - "userId" + "role" ], "type": "object" }, "SyncAlbumV1": { "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isActivityEnabled": { - "type": "boolean" - }, - "name": { - "type": "string" - }, "order": { "allOf": [ { "$ref": "#/components/schemas/AssetOrder" } ] - }, - "ownerId": { - "type": "string" - }, - "thumbnailAssetId": { - "nullable": true, - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" } }, "required": [ - "createdAt", - "description", - "id", - "isActivityEnabled", - "name", - "order", - "ownerId", - "thumbnailAssetId", - "updatedAt" + "order" ], "type": "object" }, "SyncAssetDeleteV1": { - "properties": { - "assetId": { - "type": "string" - } - }, - "required": [ - "assetId" - ], + "properties": {}, "type": "object" }, "SyncAssetExifV1": { "properties": { - "assetId": { - "type": "string" - }, - "city": { - "nullable": true, - "type": "string" - }, - "country": { - "nullable": true, - "type": "string" - }, - "dateTimeOriginal": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "description": { - "nullable": true, - "type": "string" - }, "exifImageHeight": { - "nullable": true, "type": "integer" }, "exifImageWidth": { - "nullable": true, "type": "integer" }, - "exposureTime": { - "nullable": true, - "type": "string" - }, "fNumber": { "format": "double", - "nullable": true, "type": "number" }, "fileSizeInByte": { - "nullable": true, "type": "integer" }, "focalLength": { "format": "double", - "nullable": true, "type": "number" }, "fps": { "format": "double", - "nullable": true, "type": "number" }, "iso": { - "nullable": true, "type": "integer" }, "latitude": { "format": "double", - "nullable": true, "type": "number" }, - "lensModel": { - "nullable": true, - "type": "string" - }, "longitude": { "format": "double", - "nullable": true, "type": "number" }, - "make": { - "nullable": true, - "type": "string" - }, - "model": { - "nullable": true, - "type": "string" - }, - "modifyDate": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "orientation": { - "nullable": true, - "type": "string" - }, - "profileDescription": { - "nullable": true, - "type": "string" - }, - "projectionType": { - "nullable": true, - "type": "string" - }, "rating": { - "nullable": true, "type": "integer" - }, - "state": { - "nullable": true, - "type": "string" - }, - "timeZone": { - "nullable": true, - "type": "string" } }, "required": [ - "assetId", - "city", - "country", - "dateTimeOriginal", - "description", "exifImageHeight", "exifImageWidth", - "exposureTime", "fNumber", "fileSizeInByte", "focalLength", "fps", "iso", "latitude", - "lensModel", "longitude", - "make", - "model", - "modifyDate", - "orientation", - "profileDescription", - "projectionType", - "rating", - "state", - "timeZone" + "rating" ], "type": "object" }, "SyncAssetFaceDeleteV1": { - "properties": { - "assetFaceId": { - "type": "string" - } - }, - "required": [ - "assetFaceId" - ], + "properties": {}, "type": "object" }, "SyncAssetFaceV1": { "properties": { - "assetId": { - "type": "string" - }, "boundingBoxX1": { "type": "integer" }, @@ -19483,42 +14271,25 @@ "boundingBoxY2": { "type": "integer" }, - "id": { - "type": "string" - }, "imageHeight": { "type": "integer" }, "imageWidth": { "type": "integer" - }, - "personId": { - "nullable": true, - "type": "string" - }, - "sourceType": { - "type": "string" } }, "required": [ - "assetId", "boundingBoxX1", "boundingBoxX2", "boundingBoxY1", "boundingBoxY2", - "id", "imageHeight", - "imageWidth", - "personId", - "sourceType" + "imageWidth" ], "type": "object" }, "SyncAssetMetadataDeleteV1": { "properties": { - "assetId": { - "type": "string" - }, "key": { "allOf": [ { @@ -19528,91 +14299,27 @@ } }, "required": [ - "assetId", "key" ], "type": "object" }, "SyncAssetMetadataV1": { "properties": { - "assetId": { - "type": "string" - }, "key": { "allOf": [ { "$ref": "#/components/schemas/AssetMetadataKey" } ] - }, - "value": { - "type": "object" } }, "required": [ - "assetId", - "key", - "value" + "key" ], "type": "object" }, "SyncAssetV1": { "properties": { - "checksum": { - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "duration": { - "nullable": true, - "type": "string" - }, - "fileCreatedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "fileModifiedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "id": { - "type": "string" - }, - "isFavorite": { - "type": "boolean" - }, - "libraryId": { - "nullable": true, - "type": "string" - }, - "livePhotoVideoId": { - "nullable": true, - "type": "string" - }, - "localDateTime": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "originalFileName": { - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "stackId": { - "nullable": true, - "type": "string" - }, - "thumbhash": { - "nullable": true, - "type": "string" - }, "type": { "allOf": [ { @@ -19629,20 +14336,6 @@ } }, "required": [ - "checksum", - "deletedAt", - "duration", - "fileCreatedAt", - "fileModifiedAt", - "id", - "isFavorite", - "libraryId", - "livePhotoVideoId", - "localDateTime", - "originalFileName", - "ownerId", - "stackId", - "thumbhash", "type", "visibility" ], @@ -19655,66 +14348,19 @@ { "$ref": "#/components/schemas/UserAvatarColor" } - ], - "nullable": true - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "email": { - "type": "string" - }, - "hasProfileImage": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "isAdmin": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "oauthId": { - "type": "string" - }, - "pinCode": { - "nullable": true, - "type": "string" - }, - "profileChangedAt": { - "format": "date-time", - "type": "string" + ] }, "quotaSizeInBytes": { - "nullable": true, "type": "integer" }, "quotaUsageInBytes": { "type": "integer" - }, - "storageLabel": { - "nullable": true, - "type": "string" } }, "required": [ "avatarColor", - "deletedAt", - "email", - "hasProfileImage", - "id", - "isAdmin", - "name", - "oauthId", - "pinCode", - "profileChangedAt", "quotaSizeInBytes", - "quotaUsageInBytes", - "storageLabel" + "quotaUsageInBytes" ], "type": "object" }, @@ -19775,212 +14421,46 @@ "type": "string" }, "SyncMemoryAssetDeleteV1": { - "properties": { - "assetId": { - "type": "string" - }, - "memoryId": { - "type": "string" - } - }, - "required": [ - "assetId", - "memoryId" - ], + "properties": {}, "type": "object" }, "SyncMemoryAssetV1": { - "properties": { - "assetId": { - "type": "string" - }, - "memoryId": { - "type": "string" - } - }, - "required": [ - "assetId", - "memoryId" - ], + "properties": {}, "type": "object" }, "SyncMemoryDeleteV1": { - "properties": { - "memoryId": { - "type": "string" - } - }, - "required": [ - "memoryId" - ], + "properties": {}, "type": "object" }, "SyncMemoryV1": { "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "data": { - "type": "object" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "hideAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "id": { - "type": "string" - }, - "isSaved": { - "type": "boolean" - }, - "memoryAt": { - "format": "date-time", - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "seenAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "showAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, "type": { "allOf": [ { "$ref": "#/components/schemas/MemoryType" } ] - }, - "updatedAt": { - "format": "date-time", - "type": "string" } }, "required": [ - "createdAt", - "data", - "deletedAt", - "hideAt", - "id", - "isSaved", - "memoryAt", - "ownerId", - "seenAt", - "showAt", - "type", - "updatedAt" + "type" ], "type": "object" }, "SyncPartnerDeleteV1": { - "properties": { - "sharedById": { - "type": "string" - }, - "sharedWithId": { - "type": "string" - } - }, - "required": [ - "sharedById", - "sharedWithId" - ], + "properties": {}, "type": "object" }, "SyncPartnerV1": { - "properties": { - "inTimeline": { - "type": "boolean" - }, - "sharedById": { - "type": "string" - }, - "sharedWithId": { - "type": "string" - } - }, - "required": [ - "inTimeline", - "sharedById", - "sharedWithId" - ], + "properties": {}, "type": "object" }, "SyncPersonDeleteV1": { - "properties": { - "personId": { - "type": "string" - } - }, - "required": [ - "personId" - ], + "properties": {}, "type": "object" }, "SyncPersonV1": { - "properties": { - "birthDate": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "color": { - "nullable": true, - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "faceAssetId": { - "nullable": true, - "type": "string" - }, - "id": { - "type": "string" - }, - "isFavorite": { - "type": "boolean" - }, - "isHidden": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "birthDate", - "color", - "createdAt", - "faceAssetId", - "id", - "isFavorite", - "isHidden", - "name", - "ownerId", - "updatedAt" - ], + "properties": {}, "type": "object" }, "SyncRequestType": { @@ -20013,43 +14493,11 @@ "type": "object" }, "SyncStackDeleteV1": { - "properties": { - "stackId": { - "type": "string" - } - }, - "required": [ - "stackId" - ], + "properties": {}, "type": "object" }, "SyncStackV1": { - "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "primaryAssetId": { - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "createdAt", - "id", - "ownerId", - "primaryAssetId", - "updatedAt" - ], + "properties": {}, "type": "object" }, "SyncStreamDto": { @@ -20065,19 +14513,13 @@ } }, "required": [ + "reset", "types" ], "type": "object" }, "SyncUserDeleteV1": { - "properties": { - "userId": { - "type": "string" - } - }, - "required": [ - "userId" - ], + "properties": {}, "type": "object" }, "SyncUserMetadataDeleteV1": { @@ -20088,14 +14530,10 @@ "$ref": "#/components/schemas/UserMetadataKey" } ] - }, - "userId": { - "type": "string" } }, "required": [ - "key", - "userId" + "key" ], "type": "object" }, @@ -20107,18 +14545,10 @@ "$ref": "#/components/schemas/UserMetadataKey" } ] - }, - "userId": { - "type": "string" - }, - "value": { - "type": "object" } }, "required": [ - "key", - "userId", - "value" + "key" ], "type": "object" }, @@ -20129,947 +14559,29 @@ { "$ref": "#/components/schemas/UserAvatarColor" } - ], - "nullable": true - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "email": { - "type": "string" - }, - "hasProfileImage": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profileChangedAt": { - "format": "date-time", - "type": "string" + ] } }, "required": [ - "avatarColor", - "deletedAt", - "email", - "hasProfileImage", - "id", - "name", - "profileChangedAt" - ], - "type": "object" - }, - "SystemConfigBackupsDto": { - "properties": { - "database": { - "$ref": "#/components/schemas/DatabaseBackupConfig" - } - }, - "required": [ - "database" + "avatarColor" ], "type": "object" }, "SystemConfigDto": { - "properties": { - "backup": { - "$ref": "#/components/schemas/SystemConfigBackupsDto" - }, - "ffmpeg": { - "$ref": "#/components/schemas/SystemConfigFFmpegDto" - }, - "image": { - "$ref": "#/components/schemas/SystemConfigImageDto" - }, - "job": { - "$ref": "#/components/schemas/SystemConfigJobDto" - }, - "library": { - "$ref": "#/components/schemas/SystemConfigLibraryDto" - }, - "logging": { - "$ref": "#/components/schemas/SystemConfigLoggingDto" - }, - "machineLearning": { - "$ref": "#/components/schemas/SystemConfigMachineLearningDto" - }, - "map": { - "$ref": "#/components/schemas/SystemConfigMapDto" - }, - "metadata": { - "$ref": "#/components/schemas/SystemConfigMetadataDto" - }, - "newVersionCheck": { - "$ref": "#/components/schemas/SystemConfigNewVersionCheckDto" - }, - "nightlyTasks": { - "$ref": "#/components/schemas/SystemConfigNightlyTasksDto" - }, - "notifications": { - "$ref": "#/components/schemas/SystemConfigNotificationsDto" - }, - "oauth": { - "$ref": "#/components/schemas/SystemConfigOAuthDto" - }, - "passwordLogin": { - "$ref": "#/components/schemas/SystemConfigPasswordLoginDto" - }, - "reverseGeocoding": { - "$ref": "#/components/schemas/SystemConfigReverseGeocodingDto" - }, - "server": { - "$ref": "#/components/schemas/SystemConfigServerDto" - }, - "storageTemplate": { - "$ref": "#/components/schemas/SystemConfigStorageTemplateDto" - }, - "templates": { - "$ref": "#/components/schemas/SystemConfigTemplatesDto" - }, - "theme": { - "$ref": "#/components/schemas/SystemConfigThemeDto" - }, - "trash": { - "$ref": "#/components/schemas/SystemConfigTrashDto" - }, - "user": { - "$ref": "#/components/schemas/SystemConfigUserDto" - } - }, - "required": [ - "backup", - "ffmpeg", - "image", - "job", - "library", - "logging", - "machineLearning", - "map", - "metadata", - "newVersionCheck", - "nightlyTasks", - "notifications", - "oauth", - "passwordLogin", - "reverseGeocoding", - "server", - "storageTemplate", - "templates", - "theme", - "trash", - "user" - ], - "type": "object" - }, - "SystemConfigFFmpegDto": { - "properties": { - "accel": { - "allOf": [ - { - "$ref": "#/components/schemas/TranscodeHWAccel" - } - ] - }, - "accelDecode": { - "type": "boolean" - }, - "acceptedAudioCodecs": { - "items": { - "$ref": "#/components/schemas/AudioCodec" - }, - "type": "array" - }, - "acceptedContainers": { - "items": { - "$ref": "#/components/schemas/VideoContainer" - }, - "type": "array" - }, - "acceptedVideoCodecs": { - "items": { - "$ref": "#/components/schemas/VideoCodec" - }, - "type": "array" - }, - "bframes": { - "maximum": 16, - "minimum": -1, - "type": "integer" - }, - "cqMode": { - "allOf": [ - { - "$ref": "#/components/schemas/CQMode" - } - ] - }, - "crf": { - "maximum": 51, - "minimum": 0, - "type": "integer" - }, - "gopSize": { - "minimum": 0, - "type": "integer" - }, - "maxBitrate": { - "type": "string" - }, - "preferredHwDevice": { - "type": "string" - }, - "preset": { - "type": "string" - }, - "refs": { - "maximum": 6, - "minimum": 0, - "type": "integer" - }, - "targetAudioCodec": { - "allOf": [ - { - "$ref": "#/components/schemas/AudioCodec" - } - ] - }, - "targetResolution": { - "type": "string" - }, - "targetVideoCodec": { - "allOf": [ - { - "$ref": "#/components/schemas/VideoCodec" - } - ] - }, - "temporalAQ": { - "type": "boolean" - }, - "threads": { - "minimum": 0, - "type": "integer" - }, - "tonemap": { - "allOf": [ - { - "$ref": "#/components/schemas/ToneMapping" - } - ] - }, - "transcode": { - "allOf": [ - { - "$ref": "#/components/schemas/TranscodePolicy" - } - ] - }, - "twoPass": { - "type": "boolean" - } - }, - "required": [ - "accel", - "accelDecode", - "acceptedAudioCodecs", - "acceptedContainers", - "acceptedVideoCodecs", - "bframes", - "cqMode", - "crf", - "gopSize", - "maxBitrate", - "preferredHwDevice", - "preset", - "refs", - "targetAudioCodec", - "targetResolution", - "targetVideoCodec", - "temporalAQ", - "threads", - "tonemap", - "transcode", - "twoPass" - ], - "type": "object" - }, - "SystemConfigFacesDto": { - "properties": { - "import": { - "type": "boolean" - } - }, - "required": [ - "import" - ], - "type": "object" - }, - "SystemConfigGeneratedFullsizeImageDto": { - "properties": { - "enabled": { - "type": "boolean" - }, - "format": { - "allOf": [ - { - "$ref": "#/components/schemas/ImageFormat" - } - ] - }, - "quality": { - "maximum": 100, - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "enabled", - "format", - "quality" - ], - "type": "object" - }, - "SystemConfigGeneratedImageDto": { - "properties": { - "format": { - "allOf": [ - { - "$ref": "#/components/schemas/ImageFormat" - } - ] - }, - "quality": { - "maximum": 100, - "minimum": 1, - "type": "integer" - }, - "size": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "format", - "quality", - "size" - ], - "type": "object" - }, - "SystemConfigImageDto": { - "properties": { - "colorspace": { - "allOf": [ - { - "$ref": "#/components/schemas/Colorspace" - } - ] - }, - "extractEmbedded": { - "type": "boolean" - }, - "fullsize": { - "$ref": "#/components/schemas/SystemConfigGeneratedFullsizeImageDto" - }, - "preview": { - "$ref": "#/components/schemas/SystemConfigGeneratedImageDto" - }, - "thumbnail": { - "$ref": "#/components/schemas/SystemConfigGeneratedImageDto" - } - }, - "required": [ - "colorspace", - "extractEmbedded", - "fullsize", - "preview", - "thumbnail" - ], - "type": "object" - }, - "SystemConfigJobDto": { - "properties": { - "backgroundTask": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "faceDetection": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "library": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "metadataExtraction": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "migration": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "notifications": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "ocr": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "search": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "sidecar": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "smartSearch": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "thumbnailGeneration": { - "$ref": "#/components/schemas/JobSettingsDto" - }, - "videoConversion": { - "$ref": "#/components/schemas/JobSettingsDto" - } - }, - "required": [ - "backgroundTask", - "faceDetection", - "library", - "metadataExtraction", - "migration", - "notifications", - "ocr", - "search", - "sidecar", - "smartSearch", - "thumbnailGeneration", - "videoConversion" - ], - "type": "object" - }, - "SystemConfigLibraryDto": { - "properties": { - "scan": { - "$ref": "#/components/schemas/SystemConfigLibraryScanDto" - }, - "watch": { - "$ref": "#/components/schemas/SystemConfigLibraryWatchDto" - } - }, - "required": [ - "scan", - "watch" - ], - "type": "object" - }, - "SystemConfigLibraryScanDto": { - "properties": { - "cronExpression": { - "type": "string" - }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "cronExpression", - "enabled" - ], - "type": "object" - }, - "SystemConfigLibraryWatchDto": { - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": [ - "enabled" - ], - "type": "object" - }, - "SystemConfigLoggingDto": { - "properties": { - "enabled": { - "type": "boolean" - }, - "level": { - "allOf": [ - { - "$ref": "#/components/schemas/LogLevel" - } - ] - } - }, - "required": [ - "enabled", - "level" - ], - "type": "object" - }, - "SystemConfigMachineLearningDto": { - "properties": { - "availabilityChecks": { - "$ref": "#/components/schemas/MachineLearningAvailabilityChecksDto" - }, - "clip": { - "$ref": "#/components/schemas/CLIPConfig" - }, - "duplicateDetection": { - "$ref": "#/components/schemas/DuplicateDetectionConfig" - }, - "enabled": { - "type": "boolean" - }, - "facialRecognition": { - "$ref": "#/components/schemas/FacialRecognitionConfig" - }, - "ocr": { - "$ref": "#/components/schemas/OcrConfig" - }, - "urls": { - "format": "uri", - "items": { - "format": "uri", - "type": "string" - }, - "minItems": 1, - "type": "array" - } - }, - "required": [ - "availabilityChecks", - "clip", - "duplicateDetection", - "enabled", - "facialRecognition", - "ocr", - "urls" - ], - "type": "object" - }, - "SystemConfigMapDto": { - "properties": { - "darkStyle": { - "format": "uri", - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "lightStyle": { - "format": "uri", - "type": "string" - } - }, - "required": [ - "darkStyle", - "enabled", - "lightStyle" - ], - "type": "object" - }, - "SystemConfigMetadataDto": { - "properties": { - "faces": { - "$ref": "#/components/schemas/SystemConfigFacesDto" - } - }, - "required": [ - "faces" - ], - "type": "object" - }, - "SystemConfigNewVersionCheckDto": { - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": [ - "enabled" - ], - "type": "object" - }, - "SystemConfigNightlyTasksDto": { - "properties": { - "clusterNewFaces": { - "type": "boolean" - }, - "databaseCleanup": { - "type": "boolean" - }, - "generateMemories": { - "type": "boolean" - }, - "missingThumbnails": { - "type": "boolean" - }, - "startTime": { - "type": "string" - }, - "syncQuotaUsage": { - "type": "boolean" - } - }, - "required": [ - "clusterNewFaces", - "databaseCleanup", - "generateMemories", - "missingThumbnails", - "startTime", - "syncQuotaUsage" - ], - "type": "object" - }, - "SystemConfigNotificationsDto": { - "properties": { - "smtp": { - "$ref": "#/components/schemas/SystemConfigSmtpDto" - } - }, - "required": [ - "smtp" - ], - "type": "object" - }, - "SystemConfigOAuthDto": { - "properties": { - "autoLaunch": { - "type": "boolean" - }, - "autoRegister": { - "type": "boolean" - }, - "buttonText": { - "type": "string" - }, - "clientId": { - "type": "string" - }, - "clientSecret": { - "type": "string" - }, - "defaultStorageQuota": { - "format": "int64", - "minimum": 0, - "nullable": true, - "type": "integer" - }, - "enabled": { - "type": "boolean" - }, - "issuerUrl": { - "type": "string" - }, - "mobileOverrideEnabled": { - "type": "boolean" - }, - "mobileRedirectUri": { - "format": "uri", - "type": "string" - }, - "profileSigningAlgorithm": { - "type": "string" - }, - "roleClaim": { - "type": "string" - }, - "scope": { - "type": "string" - }, - "signingAlgorithm": { - "type": "string" - }, - "storageLabelClaim": { - "type": "string" - }, - "storageQuotaClaim": { - "type": "string" - }, - "timeout": { - "minimum": 1, - "type": "integer" - }, - "tokenEndpointAuthMethod": { - "allOf": [ - { - "$ref": "#/components/schemas/OAuthTokenEndpointAuthMethod" - } - ] - } - }, - "required": [ - "autoLaunch", - "autoRegister", - "buttonText", - "clientId", - "clientSecret", - "defaultStorageQuota", - "enabled", - "issuerUrl", - "mobileOverrideEnabled", - "mobileRedirectUri", - "profileSigningAlgorithm", - "roleClaim", - "scope", - "signingAlgorithm", - "storageLabelClaim", - "storageQuotaClaim", - "timeout", - "tokenEndpointAuthMethod" - ], - "type": "object" - }, - "SystemConfigPasswordLoginDto": { - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": [ - "enabled" - ], - "type": "object" - }, - "SystemConfigReverseGeocodingDto": { - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": [ - "enabled" - ], - "type": "object" - }, - "SystemConfigServerDto": { - "properties": { - "externalDomain": { - "format": "uri", - "type": "string" - }, - "loginPageMessage": { - "type": "string" - }, - "publicUsers": { - "type": "boolean" - } - }, - "required": [ - "externalDomain", - "loginPageMessage", - "publicUsers" - ], + "properties": {}, "type": "object" }, "SystemConfigSmtpDto": { "properties": { "enabled": { "type": "boolean" - }, - "from": { - "type": "string" - }, - "replyTo": { - "type": "string" - }, - "transport": { - "$ref": "#/components/schemas/SystemConfigSmtpTransportDto" } }, "required": [ - "enabled", - "from", - "replyTo", - "transport" - ], - "type": "object" - }, - "SystemConfigSmtpTransportDto": { - "properties": { - "host": { - "type": "string" - }, - "ignoreCert": { - "type": "boolean" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 0, - "type": "number" - }, - "secure": { - "type": "boolean" - }, - "username": { - "type": "string" - } - }, - "required": [ - "host", - "ignoreCert", - "password", - "port", - "secure", - "username" - ], - "type": "object" - }, - "SystemConfigStorageTemplateDto": { - "properties": { - "enabled": { - "type": "boolean" - }, - "hashVerificationEnabled": { - "type": "boolean" - }, - "template": { - "type": "string" - } - }, - "required": [ - "enabled", - "hashVerificationEnabled", - "template" - ], - "type": "object" - }, - "SystemConfigTemplateEmailsDto": { - "properties": { - "albumInviteTemplate": { - "type": "string" - }, - "albumUpdateTemplate": { - "type": "string" - }, - "welcomeTemplate": { - "type": "string" - } - }, - "required": [ - "albumInviteTemplate", - "albumUpdateTemplate", - "welcomeTemplate" - ], - "type": "object" - }, - "SystemConfigTemplateStorageOptionDto": { - "properties": { - "dayOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hourOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "minuteOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "monthOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "presetOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "secondOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "weekOptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "yearOptions": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "dayOptions", - "hourOptions", - "minuteOptions", - "monthOptions", - "presetOptions", - "secondOptions", - "weekOptions", - "yearOptions" - ], - "type": "object" - }, - "SystemConfigTemplatesDto": { - "properties": { - "email": { - "$ref": "#/components/schemas/SystemConfigTemplateEmailsDto" - } - }, - "required": [ - "email" - ], - "type": "object" - }, - "SystemConfigThemeDto": { - "properties": { - "customCss": { - "type": "string" - } - }, - "required": [ - "customCss" - ], - "type": "object" - }, - "SystemConfigTrashDto": { - "properties": { - "days": { - "minimum": 0, - "type": "integer" - }, - "enabled": { - "type": "boolean" - } - }, - "required": [ - "days", "enabled" ], "type": "object" }, - "SystemConfigUserDto": { - "properties": { - "deleteDelay": { - "minimum": 1, - "type": "integer" - } - }, - "required": [ - "deleteDelay" - ], - "type": "object" - }, "TagBulkAssetsDto": { "properties": { "assetIds": { @@ -21093,158 +14605,28 @@ ], "type": "object" }, - "TagBulkAssetsResponseDto": { - "properties": { - "count": { - "type": "integer" - } - }, - "required": [ - "count" - ], - "type": "object" - }, "TagCreateDto": { "properties": { - "color": { - "pattern": "^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$", - "type": "string" - }, - "name": { - "type": "string" - }, "parentId": { "format": "uuid", - "nullable": true, - "type": "string" + "type": "object" } }, "required": [ - "name" - ], - "type": "object" - }, - "TagResponseDto": { - "properties": { - "color": { - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "parentId": { - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "createdAt", - "id", - "name", - "updatedAt", - "value" + "parentId" ], "type": "object" }, "TagUpdateDto": { - "properties": { - "color": { - "nullable": true, - "type": "string" - } - }, + "properties": {}, "type": "object" }, "TagUpsertDto": { - "properties": { - "tags": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "tags" - ], - "type": "object" - }, - "TagsResponse": { - "properties": { - "enabled": { - "default": true, - "type": "boolean" - }, - "sidebarWeb": { - "default": true, - "type": "boolean" - } - }, - "required": [ - "enabled", - "sidebarWeb" - ], - "type": "object" - }, - "TagsUpdate": { - "properties": { - "enabled": { - "type": "boolean" - }, - "sidebarWeb": { - "type": "boolean" - } - }, + "properties": {}, "type": "object" }, "TemplateDto": { - "properties": { - "template": { - "type": "string" - } - }, - "required": [ - "template" - ], - "type": "object" - }, - "TemplateResponseDto": { - "properties": { - "html": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "html", - "name" - ], - "type": "object" - }, - "TestEmailResponseDto": { - "properties": { - "messageId": { - "type": "string" - } - }, - "required": [ - "messageId" - ], + "properties": {}, "type": "object" }, "TimeBucketAssetResponseDto": { @@ -21404,82 +14786,18 @@ "ownerId", "projectionType", "ratio", + "stack", "thumbhash", "visibility" ], "type": "object" }, - "TimeBucketsResponseDto": { - "properties": { - "count": { - "description": "Number of assets in this time bucket", - "example": 42, - "type": "integer" - }, - "timeBucket": { - "description": "Time bucket identifier in YYYY-MM-DD format representing the start of the time period", - "example": "2024-01-01", - "type": "string" - } - }, - "required": [ - "count", - "timeBucket" - ], - "type": "object" - }, - "ToneMapping": { - "enum": [ - "hable", - "mobius", - "reinhard", - "disabled" - ], - "type": "string" - }, - "TranscodeHWAccel": { - "enum": [ - "nvenc", - "qsv", - "vaapi", - "rkmpp", - "disabled" - ], - "type": "string" - }, - "TranscodePolicy": { - "enum": [ - "all", - "optimal", - "bitrate", - "required", - "disabled" - ], - "type": "string" - }, - "TrashResponseDto": { - "properties": { - "count": { - "type": "integer" - } - }, - "required": [ - "count" - ], - "type": "object" - }, "UpdateAlbumDto": { "properties": { - "albumName": { - "type": "string" - }, "albumThumbnailAssetId": { "format": "uuid", "type": "string" }, - "description": { - "type": "string" - }, "isActivityEnabled": { "type": "boolean" }, @@ -21491,6 +14809,11 @@ ] } }, + "required": [ + "albumThumbnailAssetId", + "isActivityEnabled", + "order" + ], "type": "object" }, "UpdateAlbumUserDto": { @@ -21510,30 +14833,12 @@ }, "UpdateAssetDto": { "properties": { - "dateTimeOriginal": { - "type": "string" - }, - "description": { - "type": "string" - }, "isFavorite": { "type": "boolean" }, - "latitude": { - "type": "number" - }, "livePhotoVideoId": { "format": "uuid", - "nullable": true, - "type": "string" - }, - "longitude": { - "type": "number" - }, - "rating": { - "maximum": 5, - "minimum": -1, - "type": "number" + "type": "object" }, "visibility": { "allOf": [ @@ -21543,74 +14848,15 @@ ] } }, + "required": [ + "isFavorite", + "livePhotoVideoId", + "visibility" + ], "type": "object" }, "UpdateLibraryDto": { - "properties": { - "exclusionPatterns": { - "items": { - "type": "string" - }, - "maxItems": 128, - "type": "array", - "uniqueItems": true - }, - "importPaths": { - "items": { - "type": "string" - }, - "maxItems": 128, - "type": "array", - "uniqueItems": true - }, - "name": { - "type": "string" - } - }, - "type": "object" - }, - "UsageByUserDto": { - "properties": { - "photos": { - "type": "integer" - }, - "quotaSizeInBytes": { - "format": "int64", - "nullable": true, - "type": "integer" - }, - "usage": { - "format": "int64", - "type": "integer" - }, - "usagePhotos": { - "format": "int64", - "type": "integer" - }, - "usageVideos": { - "format": "int64", - "type": "integer" - }, - "userId": { - "type": "string" - }, - "userName": { - "type": "string" - }, - "videos": { - "type": "integer" - } - }, - "required": [ - "photos", - "quotaSizeInBytes", - "usage", - "usagePhotos", - "usageVideos", - "userId", - "userName", - "videos" - ], + "properties": {}, "type": "object" }, "UserAdminCreateDto": { @@ -21620,43 +14866,28 @@ { "$ref": "#/components/schemas/UserAvatarColor" } - ], - "nullable": true - }, - "email": { - "format": "email", - "type": "string" + ] }, "isAdmin": { "type": "boolean" }, - "name": { - "type": "string" - }, "notify": { "type": "boolean" }, - "password": { - "type": "string" - }, "quotaSizeInBytes": { "format": "int64", - "minimum": 0, - "nullable": true, "type": "integer" }, "shouldChangePassword": { "type": "boolean" - }, - "storageLabel": { - "nullable": true, - "type": "string" } }, "required": [ - "email", - "name", - "password" + "avatarColor", + "isAdmin", + "notify", + "quotaSizeInBytes", + "shouldChangePassword" ], "type": "object" }, @@ -21666,103 +14897,8 @@ "type": "boolean" } }, - "type": "object" - }, - "UserAdminResponseDto": { - "properties": { - "avatarColor": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAvatarColor" - } - ] - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "deletedAt": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "email": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isAdmin": { - "type": "boolean" - }, - "license": { - "allOf": [ - { - "$ref": "#/components/schemas/UserLicense" - } - ], - "nullable": true - }, - "name": { - "type": "string" - }, - "oauthId": { - "type": "string" - }, - "profileChangedAt": { - "format": "date-time", - "type": "string" - }, - "profileImagePath": { - "type": "string" - }, - "quotaSizeInBytes": { - "format": "int64", - "nullable": true, - "type": "integer" - }, - "quotaUsageInBytes": { - "format": "int64", - "nullable": true, - "type": "integer" - }, - "shouldChangePassword": { - "type": "boolean" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/UserStatus" - } - ] - }, - "storageLabel": { - "nullable": true, - "type": "string" - }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, "required": [ - "avatarColor", - "createdAt", - "deletedAt", - "email", - "id", - "isAdmin", - "license", - "name", - "oauthId", - "profileChangedAt", - "profileImagePath", - "quotaSizeInBytes", - "quotaUsageInBytes", - "shouldChangePassword", - "status", - "storageLabel", - "updatedAt" + "force" ], "type": "object" }, @@ -21773,41 +14909,30 @@ { "$ref": "#/components/schemas/UserAvatarColor" } - ], - "nullable": true - }, - "email": { - "format": "email", - "type": "string" + ] }, "isAdmin": { "type": "boolean" }, - "name": { - "type": "string" - }, - "password": { - "type": "string" - }, "pinCode": { "example": "123456", - "nullable": true, - "type": "string" + "type": "object" }, "quotaSizeInBytes": { "format": "int64", - "minimum": 0, - "nullable": true, "type": "integer" }, "shouldChangePassword": { "type": "boolean" - }, - "storageLabel": { - "nullable": true, - "type": "string" } }, + "required": [ + "avatarColor", + "isAdmin", + "pinCode", + "quotaSizeInBytes", + "shouldChangePassword" + ], "type": "object" }, "UserAvatarColor": { @@ -21825,26 +14950,6 @@ ], "type": "string" }, - "UserLicense": { - "properties": { - "activatedAt": { - "format": "date-time", - "type": "string" - }, - "activationKey": { - "type": "string" - }, - "licenseKey": { - "type": "string" - } - }, - "required": [ - "activatedAt", - "activationKey", - "licenseKey" - ], - "type": "object" - }, "UserMetadataKey": { "enum": [ "preferences", @@ -21853,142 +14958,10 @@ ], "type": "string" }, - "UserPreferencesResponseDto": { - "properties": { - "albums": { - "$ref": "#/components/schemas/AlbumsResponse" - }, - "cast": { - "$ref": "#/components/schemas/CastResponse" - }, - "download": { - "$ref": "#/components/schemas/DownloadResponse" - }, - "emailNotifications": { - "$ref": "#/components/schemas/EmailNotificationsResponse" - }, - "folders": { - "$ref": "#/components/schemas/FoldersResponse" - }, - "memories": { - "$ref": "#/components/schemas/MemoriesResponse" - }, - "people": { - "$ref": "#/components/schemas/PeopleResponse" - }, - "purchase": { - "$ref": "#/components/schemas/PurchaseResponse" - }, - "ratings": { - "$ref": "#/components/schemas/RatingsResponse" - }, - "sharedLinks": { - "$ref": "#/components/schemas/SharedLinksResponse" - }, - "tags": { - "$ref": "#/components/schemas/TagsResponse" - } - }, - "required": [ - "albums", - "cast", - "download", - "emailNotifications", - "folders", - "memories", - "people", - "purchase", - "ratings", - "sharedLinks", - "tags" - ], - "type": "object" - }, "UserPreferencesUpdateDto": { - "properties": { - "albums": { - "$ref": "#/components/schemas/AlbumsUpdate" - }, - "avatar": { - "$ref": "#/components/schemas/AvatarUpdate" - }, - "cast": { - "$ref": "#/components/schemas/CastUpdate" - }, - "download": { - "$ref": "#/components/schemas/DownloadUpdate" - }, - "emailNotifications": { - "$ref": "#/components/schemas/EmailNotificationsUpdate" - }, - "folders": { - "$ref": "#/components/schemas/FoldersUpdate" - }, - "memories": { - "$ref": "#/components/schemas/MemoriesUpdate" - }, - "people": { - "$ref": "#/components/schemas/PeopleUpdate" - }, - "purchase": { - "$ref": "#/components/schemas/PurchaseUpdate" - }, - "ratings": { - "$ref": "#/components/schemas/RatingsUpdate" - }, - "sharedLinks": { - "$ref": "#/components/schemas/SharedLinksUpdate" - }, - "tags": { - "$ref": "#/components/schemas/TagsUpdate" - } - }, + "properties": {}, "type": "object" }, - "UserResponseDto": { - "properties": { - "avatarColor": { - "allOf": [ - { - "$ref": "#/components/schemas/UserAvatarColor" - } - ] - }, - "email": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "profileChangedAt": { - "format": "date-time", - "type": "string" - }, - "profileImagePath": { - "type": "string" - } - }, - "required": [ - "avatarColor", - "email", - "id", - "name", - "profileChangedAt", - "profileImagePath" - ], - "type": "object" - }, - "UserStatus": { - "enum": [ - "active", - "removing", - "deleted" - ], - "type": "string" - }, "UserUpdateMeDto": { "properties": { "avatarColor": { @@ -21996,118 +14969,17 @@ { "$ref": "#/components/schemas/UserAvatarColor" } - ], - "nullable": true - }, - "email": { - "format": "email", - "type": "string" - }, - "name": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "type": "object" - }, - "ValidateAccessTokenResponseDto": { - "properties": { - "authStatus": { - "type": "boolean" + ] } }, "required": [ - "authStatus" + "avatarColor" ], "type": "object" }, "ValidateLibraryDto": { - "properties": { - "exclusionPatterns": { - "items": { - "type": "string" - }, - "maxItems": 128, - "type": "array", - "uniqueItems": true - }, - "importPaths": { - "items": { - "type": "string" - }, - "maxItems": 128, - "type": "array", - "uniqueItems": true - } - }, + "properties": {}, "type": "object" - }, - "ValidateLibraryImportPathResponseDto": { - "properties": { - "importPath": { - "type": "string" - }, - "isValid": { - "default": false, - "type": "boolean" - }, - "message": { - "type": "string" - } - }, - "required": [ - "importPath", - "isValid" - ], - "type": "object" - }, - "ValidateLibraryResponseDto": { - "properties": { - "importPaths": { - "items": { - "$ref": "#/components/schemas/ValidateLibraryImportPathResponseDto" - }, - "type": "array" - } - }, - "type": "object" - }, - "VersionCheckStateResponseDto": { - "properties": { - "checkedAt": { - "nullable": true, - "type": "string" - }, - "releaseVersion": { - "nullable": true, - "type": "string" - } - }, - "required": [ - "checkedAt", - "releaseVersion" - ], - "type": "object" - }, - "VideoCodec": { - "enum": [ - "h264", - "hevc", - "vp9", - "av1" - ], - "type": "string" - }, - "VideoContainer": { - "enum": [ - "mov", - "mp4", - "ogg", - "webm" - ], - "type": "string" } } } diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 9d3274ad77..4480d3f03b 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -14,584 +14,114 @@ const oazapfts = Oazapfts.runtime(defaults); export const servers = { server1: "/api" }; -export type UserResponseDto = { - avatarColor: UserAvatarColor; - email: string; - id: string; - name: string; - profileChangedAt: string; - profileImagePath: string; -}; -export type ActivityResponseDto = { - assetId: string | null; - comment?: string | null; - createdAt: string; - id: string; - "type": ReactionType; - user: UserResponseDto; -}; export type ActivityCreateDto = { albumId: string; - assetId?: string; - comment?: string; + assetId: string; "type": ReactionType; }; -export type ActivityStatisticsResponseDto = { - comments: number; - likes: number; +export type SetMaintenanceModeDto = { + maintenanceMode: boolean; }; export type MaintenanceLoginDto = { token?: string; }; -export type MaintenanceAuthDto = { - username: string; -}; export type NotificationCreateDto = { - data?: object; - description?: string | null; - level?: NotificationLevel; - readAt?: string | null; - title: string; - "type"?: NotificationType; + level: NotificationLevel; + readAt: object; + "type": NotificationType; userId: string; }; -export type NotificationDto = { - createdAt: string; - data?: object; - description?: string; - id: string; - level: NotificationLevel; - readAt?: string; - title: string; - "type": NotificationType; -}; -export type TemplateDto = { - template: string; -}; -export type TemplateResponseDto = { - html: string; - name: string; -}; -export type SystemConfigSmtpTransportDto = { - host: string; - ignoreCert: boolean; - password: string; - port: number; - secure: boolean; - username: string; -}; +export type TemplateDto = {}; export type SystemConfigSmtpDto = { enabled: boolean; - "from": string; - replyTo: string; - transport: SystemConfigSmtpTransportDto; -}; -export type TestEmailResponseDto = { - messageId: string; -}; -export type UserLicense = { - activatedAt: string; - activationKey: string; - licenseKey: string; -}; -export type UserAdminResponseDto = { - avatarColor: UserAvatarColor; - createdAt: string; - deletedAt: string | null; - email: string; - id: string; - isAdmin: boolean; - license: (UserLicense) | null; - name: string; - oauthId: string; - profileChangedAt: string; - profileImagePath: string; - quotaSizeInBytes: number | null; - quotaUsageInBytes: number | null; - shouldChangePassword: boolean; - status: UserStatus; - storageLabel: string | null; - updatedAt: string; }; export type UserAdminCreateDto = { - avatarColor?: (UserAvatarColor) | null; - email: string; - isAdmin?: boolean; - name: string; - notify?: boolean; - password: string; - quotaSizeInBytes?: number | null; - shouldChangePassword?: boolean; - storageLabel?: string | null; + avatarColor: UserAvatarColor; + isAdmin: boolean; + notify: boolean; + quotaSizeInBytes: number; + shouldChangePassword: boolean; }; export type UserAdminDeleteDto = { - force?: boolean; + force: boolean; }; export type UserAdminUpdateDto = { - avatarColor?: (UserAvatarColor) | null; - email?: string; - isAdmin?: boolean; - name?: string; - password?: string; - pinCode?: string | null; - quotaSizeInBytes?: number | null; - shouldChangePassword?: boolean; - storageLabel?: string | null; -}; -export type AlbumsResponse = { - defaultAssetOrder: AssetOrder; -}; -export type CastResponse = { - gCastEnabled: boolean; -}; -export type DownloadResponse = { - archiveSize: number; - includeEmbeddedVideos: boolean; -}; -export type EmailNotificationsResponse = { - albumInvite: boolean; - albumUpdate: boolean; - enabled: boolean; -}; -export type FoldersResponse = { - enabled: boolean; - sidebarWeb: boolean; -}; -export type MemoriesResponse = { - duration: number; - enabled: boolean; -}; -export type PeopleResponse = { - enabled: boolean; - sidebarWeb: boolean; -}; -export type PurchaseResponse = { - hideBuyButtonUntil: string; - showSupportBadge: boolean; -}; -export type RatingsResponse = { - enabled: boolean; -}; -export type SharedLinksResponse = { - enabled: boolean; - sidebarWeb: boolean; -}; -export type TagsResponse = { - enabled: boolean; - sidebarWeb: boolean; -}; -export type UserPreferencesResponseDto = { - albums: AlbumsResponse; - cast: CastResponse; - download: DownloadResponse; - emailNotifications: EmailNotificationsResponse; - folders: FoldersResponse; - memories: MemoriesResponse; - people: PeopleResponse; - purchase: PurchaseResponse; - ratings: RatingsResponse; - sharedLinks: SharedLinksResponse; - tags: TagsResponse; -}; -export type AlbumsUpdate = { - defaultAssetOrder?: AssetOrder; -}; -export type AvatarUpdate = { - color?: UserAvatarColor; -}; -export type CastUpdate = { - gCastEnabled?: boolean; -}; -export type DownloadUpdate = { - archiveSize?: number; - includeEmbeddedVideos?: boolean; -}; -export type EmailNotificationsUpdate = { - albumInvite?: boolean; - albumUpdate?: boolean; - enabled?: boolean; -}; -export type FoldersUpdate = { - enabled?: boolean; - sidebarWeb?: boolean; -}; -export type MemoriesUpdate = { - duration?: number; - enabled?: boolean; -}; -export type PeopleUpdate = { - enabled?: boolean; - sidebarWeb?: boolean; -}; -export type PurchaseUpdate = { - hideBuyButtonUntil?: string; - showSupportBadge?: boolean; -}; -export type RatingsUpdate = { - enabled?: boolean; -}; -export type SharedLinksUpdate = { - enabled?: boolean; - sidebarWeb?: boolean; -}; -export type TagsUpdate = { - enabled?: boolean; - sidebarWeb?: boolean; -}; -export type UserPreferencesUpdateDto = { - albums?: AlbumsUpdate; - avatar?: AvatarUpdate; - cast?: CastUpdate; - download?: DownloadUpdate; - emailNotifications?: EmailNotificationsUpdate; - folders?: FoldersUpdate; - memories?: MemoriesUpdate; - people?: PeopleUpdate; - purchase?: PurchaseUpdate; - ratings?: RatingsUpdate; - sharedLinks?: SharedLinksUpdate; - tags?: TagsUpdate; -}; -export type SessionResponseDto = { - appVersion: string | null; - createdAt: string; - current: boolean; - deviceOS: string; - deviceType: string; - expiresAt?: string; - id: string; - isPendingSyncReset: boolean; - updatedAt: string; -}; -export type AssetStatsResponseDto = { - images: number; - total: number; - videos: number; -}; -export type AlbumUserResponseDto = { - role: AlbumUserRole; - user: UserResponseDto; -}; -export type ExifResponseDto = { - city?: string | null; - country?: string | null; - dateTimeOriginal?: string | null; - description?: string | null; - exifImageHeight?: number | null; - exifImageWidth?: number | null; - exposureTime?: string | null; - fNumber?: number | null; - fileSizeInByte?: number | null; - focalLength?: number | null; - iso?: number | null; - latitude?: number | null; - lensModel?: string | null; - longitude?: number | null; - make?: string | null; - model?: string | null; - modifyDate?: string | null; - orientation?: string | null; - projectionType?: string | null; - rating?: number | null; - state?: string | null; - timeZone?: string | null; -}; -export type AssetFaceWithoutPersonResponseDto = { - boundingBoxX1: number; - boundingBoxX2: number; - boundingBoxY1: number; - boundingBoxY2: number; - id: string; - imageHeight: number; - imageWidth: number; - sourceType?: SourceType; -}; -export type PersonWithFacesResponseDto = { - birthDate: string | null; - color?: string; - faces: AssetFaceWithoutPersonResponseDto[]; - id: string; - isFavorite?: boolean; - isHidden: boolean; - name: string; - thumbnailPath: string; - updatedAt?: string; -}; -export type AssetStackResponseDto = { - assetCount: number; - id: string; - primaryAssetId: string; -}; -export type TagResponseDto = { - color?: string; - createdAt: string; - id: string; - name: string; - parentId?: string; - updatedAt: string; - value: string; -}; -export type AssetResponseDto = { - /** base64 encoded sha1 hash */ - checksum: string; - /** The UTC timestamp when the asset was originally uploaded to Immich. */ - createdAt: string; - deviceAssetId: string; - deviceId: string; - duplicateId?: string | null; - duration: string; - exifInfo?: ExifResponseDto; - /** The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken. */ - fileCreatedAt: string; - /** The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken. */ - fileModifiedAt: string; - hasMetadata: boolean; - id: string; - isArchived: boolean; - isFavorite: boolean; - isOffline: boolean; - isTrashed: boolean; - libraryId?: string | null; - livePhotoVideoId?: string | null; - /** The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by "local" days and months. */ - localDateTime: string; - originalFileName: string; - originalMimeType?: string; - originalPath: string; - owner?: UserResponseDto; - ownerId: string; - people?: PersonWithFacesResponseDto[]; - resized?: boolean; - stack?: (AssetStackResponseDto) | null; - tags?: TagResponseDto[]; - thumbhash: string | null; - "type": AssetTypeEnum; - unassignedFaces?: AssetFaceWithoutPersonResponseDto[]; - /** The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified. */ - updatedAt: string; - visibility: AssetVisibility; -}; -export type ContributorCountResponseDto = { - assetCount: number; - userId: string; -}; -export type AlbumResponseDto = { - albumName: string; - albumThumbnailAssetId: string | null; - albumUsers: AlbumUserResponseDto[]; - assetCount: number; - assets: AssetResponseDto[]; - contributorCounts?: ContributorCountResponseDto[]; - createdAt: string; - description: string; - endDate?: string; - hasSharedLink: boolean; - id: string; - isActivityEnabled: boolean; - lastModifiedAssetTimestamp?: string; - order?: AssetOrder; - owner: UserResponseDto; - ownerId: string; - shared: boolean; - startDate?: string; - updatedAt: string; -}; -export type AlbumUserCreateDto = { - role: AlbumUserRole; - userId: string; + avatarColor: UserAvatarColor; + isAdmin: boolean; + pinCode: object; + quotaSizeInBytes: number; + shouldChangePassword: boolean; }; +export type UserPreferencesUpdateDto = {}; export type CreateAlbumDto = { albumName: string; - albumUsers?: AlbumUserCreateDto[]; - assetIds?: string[]; - description?: string; + assetIds: string[]; }; export type AlbumsAddAssetsDto = { albumIds: string[]; assetIds: string[]; }; -export type AlbumsAddAssetsResponseDto = { - error?: BulkIdErrorReason; - success: boolean; -}; -export type AlbumStatisticsResponseDto = { - notShared: number; - owned: number; - shared: number; -}; export type UpdateAlbumDto = { - albumName?: string; - albumThumbnailAssetId?: string; - description?: string; - isActivityEnabled?: boolean; - order?: AssetOrder; + albumThumbnailAssetId: string; + isActivityEnabled: boolean; + order: AssetOrder; }; export type BulkIdsDto = { ids: string[]; }; -export type BulkIdResponseDto = { - error?: Error; - id: string; - success: boolean; -}; export type UpdateAlbumUserDto = { role: AlbumUserRole; }; -export type AlbumUserAddDto = { - role?: AlbumUserRole; - userId: string; -}; -export type AddUsersDto = { - albumUsers: AlbumUserAddDto[]; -}; -export type ApiKeyResponseDto = { - createdAt: string; - id: string; - name: string; - permissions: Permission[]; - updatedAt: string; -}; +export type AddUsersDto = {}; export type ApiKeyCreateDto = { - name?: string; permissions: Permission[]; }; -export type ApiKeyCreateResponseDto = { - apiKey: ApiKeyResponseDto; - secret: string; -}; export type ApiKeyUpdateDto = { - name?: string; - permissions?: Permission[]; + permissions: Permission[]; }; export type AssetBulkDeleteDto = { - force?: boolean; + force: boolean; ids: string[]; }; -export type AssetMetadataUpsertItemDto = { - key: AssetMetadataKey; - value: object; -}; export type AssetMediaCreateDto = { assetData: Blob; - deviceAssetId: string; - deviceId: string; - duration?: string; fileCreatedAt: string; fileModifiedAt: string; - filename?: string; - isFavorite?: boolean; - livePhotoVideoId?: string; - metadata: AssetMetadataUpsertItemDto[]; + isFavorite: boolean; + livePhotoVideoId: string; sidecarData?: Blob; - visibility?: AssetVisibility; -}; -export type AssetMediaResponseDto = { - id: string; - status: AssetMediaStatus; + visibility: AssetVisibility; }; export type AssetBulkUpdateDto = { - dateTimeOriginal?: string; - dateTimeRelative?: number; - description?: string; - duplicateId?: string | null; ids: string[]; - isFavorite?: boolean; - latitude?: number; - longitude?: number; - rating?: number; - timeZone?: string; - visibility?: AssetVisibility; -}; -export type AssetBulkUploadCheckItem = { - /** base64 or hex encoded sha1 hash */ - checksum: string; - id: string; -}; -export type AssetBulkUploadCheckDto = { - assets: AssetBulkUploadCheckItem[]; -}; -export type AssetBulkUploadCheckResult = { - action: Action; - assetId?: string; - id: string; - isTrashed?: boolean; - reason?: Reason; -}; -export type AssetBulkUploadCheckResponseDto = { - results: AssetBulkUploadCheckResult[]; + isFavorite: boolean; + visibility: AssetVisibility; }; +export type AssetBulkUploadCheckDto = {}; export type AssetCopyDto = { - albums?: boolean; - favorite?: boolean; - sharedLinks?: boolean; - sidecar?: boolean; + albums: boolean; + favorite: boolean; + sharedLinks: boolean; + sidecar: boolean; sourceId: string; - stack?: boolean; + stack: boolean; targetId: string; }; -export type CheckExistingAssetsDto = { - deviceAssetIds: string[]; - deviceId: string; -}; -export type CheckExistingAssetsResponseDto = { - existingIds: string[]; -}; +export type CheckExistingAssetsDto = {}; export type AssetJobsDto = { assetIds: string[]; name: AssetJobName; }; export type UpdateAssetDto = { - dateTimeOriginal?: string; - description?: string; - isFavorite?: boolean; - latitude?: number; - livePhotoVideoId?: string | null; - longitude?: number; - rating?: number; - visibility?: AssetVisibility; -}; -export type AssetMetadataResponseDto = { - key: AssetMetadataKey; - updatedAt: string; - value: object; -}; -export type AssetMetadataUpsertDto = { - items: AssetMetadataUpsertItemDto[]; -}; -export type AssetOcrResponseDto = { - assetId: string; - /** Confidence score for text detection box */ - boxScore: number; - id: string; - /** Recognized text */ - text: string; - /** Confidence score for text recognition */ - textScore: number; - /** Normalized x coordinate of box corner 1 (0-1) */ - x1: number; - /** Normalized x coordinate of box corner 2 (0-1) */ - x2: number; - /** Normalized x coordinate of box corner 3 (0-1) */ - x3: number; - /** Normalized x coordinate of box corner 4 (0-1) */ - x4: number; - /** Normalized y coordinate of box corner 1 (0-1) */ - y1: number; - /** Normalized y coordinate of box corner 2 (0-1) */ - y2: number; - /** Normalized y coordinate of box corner 3 (0-1) */ - y3: number; - /** Normalized y coordinate of box corner 4 (0-1) */ - y4: number; + isFavorite: boolean; + livePhotoVideoId: object; + visibility: AssetVisibility; }; +export type AssetMetadataUpsertDto = {}; export type AssetMediaReplaceDto = { assetData: Blob; - deviceAssetId: string; - deviceId: string; - duration?: string; fileCreatedAt: string; fileModifiedAt: string; - filename?: string; }; export type SignUpDto = { email: string; @@ -599,7 +129,7 @@ export type SignUpDto = { password: string; }; export type ChangePasswordDto = { - invalidateSessions?: boolean; + invalidateSessions: boolean; newPassword: string; password: string; }; @@ -607,87 +137,27 @@ export type LoginCredentialDto = { email: string; password: string; }; -export type LoginResponseDto = { - accessToken: string; - isAdmin: boolean; - isOnboarded: boolean; - name: string; - profileImagePath: string; - shouldChangePassword: boolean; - userEmail: string; - userId: string; -}; -export type LogoutResponseDto = { - redirectUri: string; - successful: boolean; -}; export type PinCodeResetDto = { - password?: string; - pinCode?: string; + pinCode: string; }; export type PinCodeSetupDto = { pinCode: string; }; export type PinCodeChangeDto = { newPinCode: string; - password?: string; - pinCode?: string; + pinCode: string; }; export type SessionUnlockDto = { - password?: string; - pinCode?: string; -}; -export type AuthStatusResponseDto = { - expiresAt?: string; - isElevated: boolean; - password: boolean; - pinCode: boolean; - pinExpiresAt?: string; -}; -export type ValidateAccessTokenResponseDto = { - authStatus: boolean; + pinCode: string; }; export type AssetIdsDto = { assetIds: string[]; }; export type DownloadInfoDto = { - albumId?: string; - archiveSize?: number; - assetIds?: string[]; - userId?: string; -}; -export type DownloadArchiveInfo = { + albumId: string; + archiveSize: number; assetIds: string[]; - size: number; -}; -export type DownloadResponseDto = { - archives: DownloadArchiveInfo[]; - totalSize: number; -}; -export type DuplicateResponseDto = { - assets: AssetResponseDto[]; - duplicateId: string; -}; -export type PersonResponseDto = { - birthDate: string | null; - color?: string; - id: string; - isFavorite?: boolean; - isHidden: boolean; - name: string; - thumbnailPath: string; - updatedAt?: string; -}; -export type AssetFaceResponseDto = { - boundingBoxX1: number; - boundingBoxX2: number; - boundingBoxY1: number; - boundingBoxY2: number; - id: string; - imageHeight: number; - imageWidth: number; - person: (PersonResponseDto) | null; - sourceType?: SourceType; + userId: string; }; export type AssetFaceCreateDto = { assetId: string; @@ -699,914 +169,230 @@ export type AssetFaceCreateDto = { x: number; y: number; }; -export type AssetFaceDeleteDto = { - force: boolean; -}; +export type AssetFaceDeleteDto = {}; export type FaceDto = { id: string; }; -export type JobCountsDto = { - active: number; - completed: number; - delayed: number; - failed: number; - paused: number; - waiting: number; -}; -export type QueueStatusDto = { - isActive: boolean; - isPaused: boolean; -}; -export type JobStatusDto = { - jobCounts: JobCountsDto; - queueStatus: QueueStatusDto; -}; -export type AllJobStatusResponseDto = { - backgroundTask: JobStatusDto; - backupDatabase: JobStatusDto; - duplicateDetection: JobStatusDto; - faceDetection: JobStatusDto; - facialRecognition: JobStatusDto; - library: JobStatusDto; - metadataExtraction: JobStatusDto; - migration: JobStatusDto; - notifications: JobStatusDto; - ocr: JobStatusDto; - search: JobStatusDto; - sidecar: JobStatusDto; - smartSearch: JobStatusDto; - storageTemplateMigration: JobStatusDto; - thumbnailGeneration: JobStatusDto; - videoConversion: JobStatusDto; -}; export type JobCreateDto = { name: ManualJobName; }; export type JobCommandDto = { command: JobCommand; - force?: boolean; -}; -export type LibraryResponseDto = { - assetCount: number; - createdAt: string; - exclusionPatterns: string[]; - id: string; - importPaths: string[]; - name: string; - ownerId: string; - refreshedAt: string | null; - updatedAt: string; + force: boolean; }; export type CreateLibraryDto = { - exclusionPatterns?: string[]; - importPaths?: string[]; - name?: string; ownerId: string; }; -export type UpdateLibraryDto = { - exclusionPatterns?: string[]; - importPaths?: string[]; - name?: string; -}; -export type LibraryStatsResponseDto = { - photos: number; - total: number; - usage: number; - videos: number; -}; -export type ValidateLibraryDto = { - exclusionPatterns?: string[]; - importPaths?: string[]; -}; -export type ValidateLibraryImportPathResponseDto = { - importPath: string; - isValid: boolean; - message?: string; -}; -export type ValidateLibraryResponseDto = { - importPaths?: ValidateLibraryImportPathResponseDto[]; -}; -export type MapMarkerResponseDto = { - city: string | null; - country: string | null; - id: string; - lat: number; - lon: number; - state: string | null; -}; -export type MapReverseGeocodeResponseDto = { - city: string | null; - country: string | null; - state: string | null; -}; -export type OnThisDayDto = { - year: number; -}; -export type MemoryResponseDto = { - assets: AssetResponseDto[]; - createdAt: string; - data: OnThisDayDto; - deletedAt?: string; - hideAt?: string; - id: string; +export type UpdateLibraryDto = {}; +export type ValidateLibraryDto = {}; +export type MemoryCreateDto = { + assetIds: string[]; isSaved: boolean; memoryAt: string; - ownerId: string; - seenAt?: string; - showAt?: string; + seenAt: string; "type": MemoryType; - updatedAt: string; -}; -export type MemoryCreateDto = { - assetIds?: string[]; - data: OnThisDayDto; - isSaved?: boolean; - memoryAt: string; - seenAt?: string; - "type": MemoryType; -}; -export type MemoryStatisticsResponseDto = { - total: number; }; export type MemoryUpdateDto = { - isSaved?: boolean; - memoryAt?: string; - seenAt?: string; + isSaved: boolean; + memoryAt: string; + seenAt: string; }; export type NotificationDeleteAllDto = { ids: string[]; }; export type NotificationUpdateAllDto = { ids: string[]; - readAt?: string | null; + readAt: object; }; export type NotificationUpdateDto = { - readAt?: string | null; -}; -export type OAuthConfigDto = { - codeChallenge?: string; - redirectUri: string; - state?: string; -}; -export type OAuthAuthorizeResponseDto = { - url: string; + readAt: object; }; +export type OAuthConfigDto = {}; export type OAuthCallbackDto = { - codeVerifier?: string; - state?: string; url: string; }; -export type PartnerResponseDto = { - avatarColor: UserAvatarColor; - email: string; - id: string; - inTimeline?: boolean; - name: string; - profileChangedAt: string; - profileImagePath: string; -}; export type PartnerCreateDto = { sharedWithId: string; }; -export type PartnerUpdateDto = { - inTimeline: boolean; -}; -export type PeopleResponseDto = { - hasNextPage?: boolean; - hidden: number; - people: PersonResponseDto[]; - total: number; -}; +export type PartnerUpdateDto = {}; export type PersonCreateDto = { - /** Person date of birth. - Note: the mobile app cannot currently set the birth date to null. */ - birthDate?: string | null; - color?: string | null; - isFavorite?: boolean; - /** Person visibility */ - isHidden?: boolean; - /** Person name. */ - name?: string; -}; -export type PeopleUpdateItem = { - /** Person date of birth. - Note: the mobile app cannot currently set the birth date to null. */ - birthDate?: string | null; - color?: string | null; - /** Asset is used to get the feature face thumbnail. */ - featureFaceAssetId?: string; - /** Person id. */ - id: string; - isFavorite?: boolean; - /** Person visibility */ - isHidden?: boolean; - /** Person name. */ - name?: string; -}; -export type PeopleUpdateDto = { - people: PeopleUpdateItem[]; + birthDate: object; + isFavorite: boolean; + isHidden: boolean; }; +export type PeopleUpdateDto = {}; export type PersonUpdateDto = { - /** Person date of birth. - Note: the mobile app cannot currently set the birth date to null. */ - birthDate?: string | null; - color?: string | null; - /** Asset is used to get the feature face thumbnail. */ - featureFaceAssetId?: string; - isFavorite?: boolean; - /** Person visibility */ - isHidden?: boolean; - /** Person name. */ - name?: string; + birthDate: object; + featureFaceAssetId: string; + isFavorite: boolean; + isHidden: boolean; }; export type MergePersonDto = { ids: string[]; }; -export type AssetFaceUpdateItem = { - assetId: string; - personId: string; -}; -export type AssetFaceUpdateDto = { - data: AssetFaceUpdateItem[]; -}; -export type PersonStatisticsResponseDto = { - assets: number; -}; -export type SearchExploreItem = { - data: AssetResponseDto; - value: string; -}; -export type SearchExploreResponseDto = { - fieldName: string; - items: SearchExploreItem[]; -}; +export type AssetFaceUpdateDto = {}; +export type Object = {}; export type MetadataSearchDto = { - albumIds?: string[]; - checksum?: string; - city?: string | null; - country?: string | null; - createdAfter?: string; - createdBefore?: string; - description?: string; - deviceAssetId?: string; - deviceId?: string; - encodedVideoPath?: string; - id?: string; - isEncoded?: boolean; - isFavorite?: boolean; - isMotion?: boolean; - isNotInAlbum?: boolean; - isOffline?: boolean; - lensModel?: string | null; - libraryId?: string | null; - make?: string; - model?: string | null; - ocr?: string; - order?: AssetOrder; - originalFileName?: string; - originalPath?: string; - page?: number; - personIds?: string[]; - previewPath?: string; - rating?: number; - size?: number; - state?: string | null; - tagIds?: string[] | null; - takenAfter?: string; - takenBefore?: string; - thumbnailPath?: string; - trashedAfter?: string; - trashedBefore?: string; - "type"?: AssetTypeEnum; - updatedAfter?: string; - updatedBefore?: string; - visibility?: AssetVisibility; - withDeleted?: boolean; - withExif?: boolean; - withPeople?: boolean; - withStacked?: boolean; -}; -export type SearchFacetCountResponseDto = { - count: number; - value: string; -}; -export type SearchFacetResponseDto = { - counts: SearchFacetCountResponseDto[]; - fieldName: string; -}; -export type SearchAlbumResponseDto = { - count: number; - facets: SearchFacetResponseDto[]; - items: AlbumResponseDto[]; - total: number; -}; -export type SearchAssetResponseDto = { - count: number; - facets: SearchFacetResponseDto[]; - items: AssetResponseDto[]; - nextPage: string | null; - total: number; -}; -export type SearchResponseDto = { - albums: SearchAlbumResponseDto; - assets: SearchAssetResponseDto; -}; -export type PlacesResponseDto = { - admin1name?: string; - admin2name?: string; - latitude: number; - longitude: number; - name: string; + albumIds: string[]; + createdAfter: string; + createdBefore: string; + description: string; + id: string; + isEncoded: boolean; + isFavorite: boolean; + isMotion: boolean; + isNotInAlbum: boolean; + isOffline: boolean; + libraryId: object; + order: AssetOrder; + originalFileName: string; + personIds: string[]; + tagIds: object; + takenAfter: string; + takenBefore: string; + trashedAfter: string; + trashedBefore: string; + "type": AssetTypeEnum; + updatedAfter: string; + updatedBefore: string; + visibility: AssetVisibility; + withDeleted: boolean; + withExif: boolean; + withPeople: boolean; + withStacked: boolean; }; export type RandomSearchDto = { - albumIds?: string[]; - city?: string | null; - country?: string | null; - createdAfter?: string; - createdBefore?: string; - deviceId?: string; - isEncoded?: boolean; - isFavorite?: boolean; - isMotion?: boolean; - isNotInAlbum?: boolean; - isOffline?: boolean; - lensModel?: string | null; - libraryId?: string | null; - make?: string; - model?: string | null; - ocr?: string; - personIds?: string[]; - rating?: number; - size?: number; - state?: string | null; - tagIds?: string[] | null; - takenAfter?: string; - takenBefore?: string; - trashedAfter?: string; - trashedBefore?: string; - "type"?: AssetTypeEnum; - updatedAfter?: string; - updatedBefore?: string; - visibility?: AssetVisibility; - withDeleted?: boolean; - withExif?: boolean; - withPeople?: boolean; - withStacked?: boolean; + albumIds: string[]; + createdAfter: string; + createdBefore: string; + isEncoded: boolean; + isFavorite: boolean; + isMotion: boolean; + isNotInAlbum: boolean; + isOffline: boolean; + libraryId: object; + personIds: string[]; + tagIds: object; + takenAfter: string; + takenBefore: string; + trashedAfter: string; + trashedBefore: string; + "type": AssetTypeEnum; + updatedAfter: string; + updatedBefore: string; + visibility: AssetVisibility; + withDeleted: boolean; + withExif: boolean; + withPeople: boolean; + withStacked: boolean; }; export type SmartSearchDto = { - albumIds?: string[]; - city?: string | null; - country?: string | null; - createdAfter?: string; - createdBefore?: string; - deviceId?: string; - isEncoded?: boolean; - isFavorite?: boolean; - isMotion?: boolean; - isNotInAlbum?: boolean; - isOffline?: boolean; - language?: string; - lensModel?: string | null; - libraryId?: string | null; - make?: string; - model?: string | null; - ocr?: string; - page?: number; - personIds?: string[]; - query?: string; - queryAssetId?: string; - rating?: number; - size?: number; - state?: string | null; - tagIds?: string[] | null; - takenAfter?: string; - takenBefore?: string; - trashedAfter?: string; - trashedBefore?: string; - "type"?: AssetTypeEnum; - updatedAfter?: string; - updatedBefore?: string; - visibility?: AssetVisibility; - withDeleted?: boolean; - withExif?: boolean; + albumIds: string[]; + createdAfter: string; + createdBefore: string; + isEncoded: boolean; + isFavorite: boolean; + isMotion: boolean; + isNotInAlbum: boolean; + isOffline: boolean; + libraryId: object; + personIds: string[]; + query: string; + queryAssetId: string; + tagIds: object; + takenAfter: string; + takenBefore: string; + trashedAfter: string; + trashedBefore: string; + "type": AssetTypeEnum; + updatedAfter: string; + updatedBefore: string; + visibility: AssetVisibility; + withDeleted: boolean; + withExif: boolean; }; export type StatisticsSearchDto = { - albumIds?: string[]; - city?: string | null; - country?: string | null; - createdAfter?: string; - createdBefore?: string; - description?: string; - deviceId?: string; - isEncoded?: boolean; - isFavorite?: boolean; - isMotion?: boolean; - isNotInAlbum?: boolean; - isOffline?: boolean; - lensModel?: string | null; - libraryId?: string | null; - make?: string; - model?: string | null; - ocr?: string; - personIds?: string[]; - rating?: number; - state?: string | null; - tagIds?: string[] | null; - takenAfter?: string; - takenBefore?: string; - trashedAfter?: string; - trashedBefore?: string; - "type"?: AssetTypeEnum; - updatedAfter?: string; - updatedBefore?: string; - visibility?: AssetVisibility; -}; -export type SearchStatisticsResponseDto = { - total: number; -}; -export type ServerAboutResponseDto = { - build?: string; - buildImage?: string; - buildImageUrl?: string; - buildUrl?: string; - exiftool?: string; - ffmpeg?: string; - imagemagick?: string; - libvips?: string; - licensed: boolean; - nodejs?: string; - repository?: string; - repositoryUrl?: string; - sourceCommit?: string; - sourceRef?: string; - sourceUrl?: string; - thirdPartyBugFeatureUrl?: string; - thirdPartyDocumentationUrl?: string; - thirdPartySourceUrl?: string; - thirdPartySupportUrl?: string; - version: string; - versionUrl: string; -}; -export type ServerApkLinksDto = { - arm64v8a: string; - armeabiv7a: string; - universal: string; - x86_64: string; -}; -export type ServerConfigDto = { - externalDomain: string; - isInitialized: boolean; - isOnboarded: boolean; - loginPageMessage: string; - maintenanceMode: boolean; - mapDarkStyleUrl: string; - mapLightStyleUrl: string; - oauthButtonText: string; - publicUsers: boolean; - trashDays: number; - userDeleteDelay: number; -}; -export type ServerFeaturesDto = { - configFile: boolean; - duplicateDetection: boolean; - email: boolean; - facialRecognition: boolean; - importFaces: boolean; - map: boolean; - oauth: boolean; - oauthAutoLaunch: boolean; - ocr: boolean; - passwordLogin: boolean; - reverseGeocoding: boolean; - search: boolean; - sidecar: boolean; - smartSearch: boolean; - trash: boolean; -}; -export type LicenseResponseDto = { - activatedAt: string; - activationKey: string; - licenseKey: string; + albumIds: string[]; + createdAfter: string; + createdBefore: string; + description: string; + isEncoded: boolean; + isFavorite: boolean; + isMotion: boolean; + isNotInAlbum: boolean; + isOffline: boolean; + libraryId: object; + personIds: string[]; + tagIds: object; + takenAfter: string; + takenBefore: string; + trashedAfter: string; + trashedBefore: string; + "type": AssetTypeEnum; + updatedAfter: string; + updatedBefore: string; + visibility: AssetVisibility; }; export type LicenseKeyDto = { activationKey: string; licenseKey: string; }; -export type ServerMediaTypesResponseDto = { - image: string[]; - sidecar: string[]; - video: string[]; -}; -export type ServerPingResponse = {}; -export type ServerPingResponseRead = { - res: string; -}; -export type UsageByUserDto = { - photos: number; - quotaSizeInBytes: number | null; - usage: number; - usagePhotos: number; - usageVideos: number; - userId: string; - userName: string; - videos: number; -}; -export type ServerStatsResponseDto = { - photos: number; - usage: number; - usageByUser: UsageByUserDto[]; - usagePhotos: number; - usageVideos: number; - videos: number; -}; -export type ServerStorageResponseDto = { - diskAvailable: string; - diskAvailableRaw: number; - diskSize: string; - diskSizeRaw: number; - diskUsagePercentage: number; - diskUse: string; - diskUseRaw: number; -}; -export type ServerThemeDto = { - customCss: string; -}; -export type ServerVersionResponseDto = { - major: number; - minor: number; - patch: number; -}; -export type VersionCheckStateResponseDto = { - checkedAt: string | null; - releaseVersion: string | null; -}; -export type ServerVersionHistoryResponseDto = { - createdAt: string; - id: string; - version: string; -}; -export type SessionCreateDto = { - deviceOS?: string; - deviceType?: string; - /** session duration, in seconds */ - duration?: number; -}; -export type SessionCreateResponseDto = { - appVersion: string | null; - createdAt: string; - current: boolean; - deviceOS: string; - deviceType: string; - expiresAt?: string; - id: string; - isPendingSyncReset: boolean; - token: string; - updatedAt: string; -}; +export type SessionCreateDto = {}; export type SessionUpdateDto = { - isPendingSyncReset?: boolean; -}; -export type SharedLinkResponseDto = { - album?: AlbumResponseDto; - allowDownload: boolean; - allowUpload: boolean; - assets: AssetResponseDto[]; - createdAt: string; - description: string | null; - expiresAt: string | null; - id: string; - key: string; - password: string | null; - showMetadata: boolean; - slug: string | null; - token?: string | null; - "type": SharedLinkType; - userId: string; + isPendingSyncReset: boolean; }; export type SharedLinkCreateDto = { - albumId?: string; - allowDownload?: boolean; - allowUpload?: boolean; - assetIds?: string[]; - description?: string | null; - expiresAt?: string | null; - password?: string | null; - showMetadata?: boolean; - slug?: string | null; + albumId: string; + allowDownload: boolean; + allowUpload: boolean; + assetIds: string[]; + expiresAt: object; + showMetadata: boolean; "type": SharedLinkType; }; export type SharedLinkEditDto = { - allowDownload?: boolean; - allowUpload?: boolean; - /** Few clients cannot send null to set the expiryTime to never. - Setting this flag and not sending expiryAt is considered as null instead. - Clients that can send null values can ignore this. */ - changeExpiryTime?: boolean; - description?: string | null; - expiresAt?: string | null; - password?: string | null; - showMetadata?: boolean; - slug?: string | null; -}; -export type AssetIdsResponseDto = { - assetId: string; - error?: Error2; - success: boolean; -}; -export type StackResponseDto = { - assets: AssetResponseDto[]; - id: string; - primaryAssetId: string; + allowDownload: boolean; + allowUpload: boolean; + changeExpiryTime: boolean; + showMetadata: boolean; }; export type StackCreateDto = { - /** first asset becomes the primary */ assetIds: string[]; }; export type StackUpdateDto = { - primaryAssetId?: string; + primaryAssetId: string; }; export type SyncAckDeleteDto = { - types?: SyncEntityType[]; -}; -export type SyncAckDto = { - ack: string; - "type": SyncEntityType; -}; -export type SyncAckSetDto = { - acks: string[]; + types: SyncEntityType[]; }; +export type SyncAckSetDto = {}; export type AssetDeltaSyncDto = { updatedAfter: string; userIds: string[]; }; -export type AssetDeltaSyncResponseDto = { - deleted: string[]; - needsFullSync: boolean; - upserted: AssetResponseDto[]; -}; export type AssetFullSyncDto = { - lastId?: string; + lastId: string; limit: number; updatedUntil: string; - userId?: string; + userId: string; }; export type SyncStreamDto = { - reset?: boolean; + reset: boolean; types: SyncRequestType[]; }; -export type DatabaseBackupConfig = { - cronExpression: string; - enabled: boolean; - keepLastAmount: number; -}; -export type SystemConfigBackupsDto = { - database: DatabaseBackupConfig; -}; -export type SystemConfigFFmpegDto = { - accel: TranscodeHWAccel; - accelDecode: boolean; - acceptedAudioCodecs: AudioCodec[]; - acceptedContainers: VideoContainer[]; - acceptedVideoCodecs: VideoCodec[]; - bframes: number; - cqMode: CQMode; - crf: number; - gopSize: number; - maxBitrate: string; - preferredHwDevice: string; - preset: string; - refs: number; - targetAudioCodec: AudioCodec; - targetResolution: string; - targetVideoCodec: VideoCodec; - temporalAQ: boolean; - threads: number; - tonemap: ToneMapping; - transcode: TranscodePolicy; - twoPass: boolean; -}; -export type SystemConfigGeneratedFullsizeImageDto = { - enabled: boolean; - format: ImageFormat; - quality: number; -}; -export type SystemConfigGeneratedImageDto = { - format: ImageFormat; - quality: number; - size: number; -}; -export type SystemConfigImageDto = { - colorspace: Colorspace; - extractEmbedded: boolean; - fullsize: SystemConfigGeneratedFullsizeImageDto; - preview: SystemConfigGeneratedImageDto; - thumbnail: SystemConfigGeneratedImageDto; -}; -export type JobSettingsDto = { - concurrency: number; -}; -export type SystemConfigJobDto = { - backgroundTask: JobSettingsDto; - faceDetection: JobSettingsDto; - library: JobSettingsDto; - metadataExtraction: JobSettingsDto; - migration: JobSettingsDto; - notifications: JobSettingsDto; - ocr: JobSettingsDto; - search: JobSettingsDto; - sidecar: JobSettingsDto; - smartSearch: JobSettingsDto; - thumbnailGeneration: JobSettingsDto; - videoConversion: JobSettingsDto; -}; -export type SystemConfigLibraryScanDto = { - cronExpression: string; - enabled: boolean; -}; -export type SystemConfigLibraryWatchDto = { - enabled: boolean; -}; -export type SystemConfigLibraryDto = { - scan: SystemConfigLibraryScanDto; - watch: SystemConfigLibraryWatchDto; -}; -export type SystemConfigLoggingDto = { - enabled: boolean; - level: LogLevel; -}; -export type MachineLearningAvailabilityChecksDto = { - enabled: boolean; - interval: number; - timeout: number; -}; -export type ClipConfig = { - enabled: boolean; - modelName: string; -}; -export type DuplicateDetectionConfig = { - enabled: boolean; - maxDistance: number; -}; -export type FacialRecognitionConfig = { - enabled: boolean; - maxDistance: number; - minFaces: number; - minScore: number; - modelName: string; -}; -export type OcrConfig = { - enabled: boolean; - maxResolution: number; - minDetectionScore: number; - minRecognitionScore: number; - modelName: string; -}; -export type SystemConfigMachineLearningDto = { - availabilityChecks: MachineLearningAvailabilityChecksDto; - clip: ClipConfig; - duplicateDetection: DuplicateDetectionConfig; - enabled: boolean; - facialRecognition: FacialRecognitionConfig; - ocr: OcrConfig; - urls: string[]; -}; -export type SystemConfigMapDto = { - darkStyle: string; - enabled: boolean; - lightStyle: string; -}; -export type SystemConfigFacesDto = { - "import": boolean; -}; -export type SystemConfigMetadataDto = { - faces: SystemConfigFacesDto; -}; -export type SystemConfigNewVersionCheckDto = { - enabled: boolean; -}; -export type SystemConfigNightlyTasksDto = { - clusterNewFaces: boolean; - databaseCleanup: boolean; - generateMemories: boolean; - missingThumbnails: boolean; - startTime: string; - syncQuotaUsage: boolean; -}; -export type SystemConfigNotificationsDto = { - smtp: SystemConfigSmtpDto; -}; -export type SystemConfigOAuthDto = { - autoLaunch: boolean; - autoRegister: boolean; - buttonText: string; - clientId: string; - clientSecret: string; - defaultStorageQuota: number | null; - enabled: boolean; - issuerUrl: string; - mobileOverrideEnabled: boolean; - mobileRedirectUri: string; - profileSigningAlgorithm: string; - roleClaim: string; - scope: string; - signingAlgorithm: string; - storageLabelClaim: string; - storageQuotaClaim: string; - timeout: number; - tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod; -}; -export type SystemConfigPasswordLoginDto = { - enabled: boolean; -}; -export type SystemConfigReverseGeocodingDto = { - enabled: boolean; -}; -export type SystemConfigServerDto = { - externalDomain: string; - loginPageMessage: string; - publicUsers: boolean; -}; -export type SystemConfigStorageTemplateDto = { - enabled: boolean; - hashVerificationEnabled: boolean; - template: string; -}; -export type SystemConfigTemplateEmailsDto = { - albumInviteTemplate: string; - albumUpdateTemplate: string; - welcomeTemplate: string; -}; -export type SystemConfigTemplatesDto = { - email: SystemConfigTemplateEmailsDto; -}; -export type SystemConfigThemeDto = { - customCss: string; -}; -export type SystemConfigTrashDto = { - days: number; - enabled: boolean; -}; -export type SystemConfigUserDto = { - deleteDelay: number; -}; -export type SystemConfigDto = { - backup: SystemConfigBackupsDto; - ffmpeg: SystemConfigFFmpegDto; - image: SystemConfigImageDto; - job: SystemConfigJobDto; - library: SystemConfigLibraryDto; - logging: SystemConfigLoggingDto; - machineLearning: SystemConfigMachineLearningDto; - map: SystemConfigMapDto; - metadata: SystemConfigMetadataDto; - newVersionCheck: SystemConfigNewVersionCheckDto; - nightlyTasks: SystemConfigNightlyTasksDto; - notifications: SystemConfigNotificationsDto; - oauth: SystemConfigOAuthDto; - passwordLogin: SystemConfigPasswordLoginDto; - reverseGeocoding: SystemConfigReverseGeocodingDto; - server: SystemConfigServerDto; - storageTemplate: SystemConfigStorageTemplateDto; - templates: SystemConfigTemplatesDto; - theme: SystemConfigThemeDto; - trash: SystemConfigTrashDto; - user: SystemConfigUserDto; -}; -export type SystemConfigTemplateStorageOptionDto = { - dayOptions: string[]; - hourOptions: string[]; - minuteOptions: string[]; - monthOptions: string[]; - presetOptions: string[]; - secondOptions: string[]; - weekOptions: string[]; - yearOptions: string[]; -}; +export type SystemConfigDto = {}; export type AdminOnboardingUpdateDto = { isOnboarded: boolean; }; -export type ReverseGeocodingStateResponseDto = { - lastImportFileName: string | null; - lastUpdate: string | null; -}; export type TagCreateDto = { - color?: string; - name: string; - parentId?: string | null; -}; -export type TagUpsertDto = { - tags: string[]; + parentId: object; }; +export type TagUpsertDto = {}; export type TagBulkAssetsDto = { assetIds: string[]; tagIds: string[]; }; -export type TagBulkAssetsResponseDto = { - count: number; -}; -export type TagUpdateDto = { - color?: string | null; -}; +export type TagUpdateDto = {}; export type TimeBucketAssetResponseDto = { /** Array of city names extracted from EXIF GPS data */ city: (string | null)[]; @@ -1639,29 +425,14 @@ export type TimeBucketAssetResponseDto = { /** Array of aspect ratios (width/height) for each asset */ ratio: number[]; /** Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets) */ - stack?: (string[] | null)[]; + stack: (string[] | null)[]; /** Array of BlurHash strings for generating asset previews (base64 encoded) */ thumbhash: (string | null)[]; /** Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED) */ visibility: AssetVisibility[]; }; -export type TimeBucketsResponseDto = { - /** Number of assets in this time bucket */ - count: number; - /** Time bucket identifier in YYYY-MM-DD format representing the start of the time period */ - timeBucket: string; -}; -export type TrashResponseDto = { - count: number; -}; export type UserUpdateMeDto = { - avatarColor?: (UserAvatarColor) | null; - email?: string; - name?: string; - password?: string; -}; -export type OnboardingResponseDto = { - isOnboarded: boolean; + avatarColor: UserAvatarColor; }; export type OnboardingDto = { isOnboarded: boolean; @@ -1669,25 +440,17 @@ export type OnboardingDto = { export type CreateProfileImageDto = { file: Blob; }; -export type CreateProfileImageResponseDto = { - profileChangedAt: string; - profileImagePath: string; - userId: string; -}; /** * List all activities */ export function getActivities({ albumId, assetId, level, $type, userId }: { albumId: string; - assetId?: string; - level?: ReactionLevel; - $type?: ReactionType; - userId?: string; + assetId: string; + level: ReactionLevel; + $type: ReactionType; + userId: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ActivityResponseDto[]; - }>(`/activities${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/activities${QS.query(QS.explode({ albumId, assetId, level, @@ -1703,10 +466,7 @@ export function getActivities({ albumId, assetId, level, $type, userId }: { export function createActivity({ activityCreateDto }: { activityCreateDto: ActivityCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: ActivityResponseDto; - }>("/activities", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/activities", oazapfts.json({ ...opts, method: "POST", body: activityCreateDto @@ -1717,12 +477,9 @@ export function createActivity({ activityCreateDto }: { */ export function getActivityStatistics({ albumId, assetId }: { albumId: string; - assetId?: string; + assetId: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ActivityStatisticsResponseDto; - }>(`/activities/statistics${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/activities/statistics${QS.query(QS.explode({ albumId, assetId }))}`, { @@ -1749,40 +506,37 @@ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) { method: "POST" })); } -export function endMaintenance(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchText("/admin/maintenance/end", { +/** + * Set maintenance mode + */ +export function setMaintenanceMode({ setMaintenanceModeDto }: { + setMaintenanceModeDto: SetMaintenanceModeDto; +}, opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchText("/admin/maintenance", oazapfts.json({ ...opts, - method: "POST" - })); + method: "POST", + body: setMaintenanceModeDto + }))); } +/** + * Log into maintenance mode + */ export function maintenanceLogin({ maintenanceLoginDto }: { maintenanceLoginDto: MaintenanceLoginDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: MaintenanceAuthDto; - }>("/admin/maintenance/login", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/admin/maintenance/login", oazapfts.json({ ...opts, method: "POST", body: maintenanceLoginDto }))); } -export function startMaintenance(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchText("/admin/maintenance/start", { - ...opts, - method: "POST" - })); -} /** * Create a notification */ export function createNotification({ notificationCreateDto }: { notificationCreateDto: NotificationCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: NotificationDto; - }>("/admin/notifications", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/admin/notifications", oazapfts.json({ ...opts, method: "POST", body: notificationCreateDto @@ -1795,10 +549,7 @@ export function getNotificationTemplateAdmin({ name, templateDto }: { name: string; templateDto: TemplateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TemplateResponseDto; - }>(`/admin/notifications/templates/${encodeURIComponent(name)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/admin/notifications/templates/${encodeURIComponent(name)}`, oazapfts.json({ ...opts, method: "POST", body: templateDto @@ -1810,10 +561,7 @@ export function getNotificationTemplateAdmin({ name, templateDto }: { export function sendTestEmailAdmin({ systemConfigSmtpDto }: { systemConfigSmtpDto: SystemConfigSmtpDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TestEmailResponseDto; - }>("/admin/notifications/test-email", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/admin/notifications/test-email", oazapfts.json({ ...opts, method: "POST", body: systemConfigSmtpDto @@ -1823,13 +571,10 @@ export function sendTestEmailAdmin({ systemConfigSmtpDto }: { * Search users */ export function searchUsersAdmin({ id, withDeleted }: { - id?: string; - withDeleted?: boolean; + id: string; + withDeleted: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto[]; - }>(`/admin/users${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/admin/users${QS.query(QS.explode({ id, withDeleted }))}`, { @@ -1842,10 +587,7 @@ export function searchUsersAdmin({ id, withDeleted }: { export function createUserAdmin({ userAdminCreateDto }: { userAdminCreateDto: UserAdminCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: UserAdminResponseDto; - }>("/admin/users", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/admin/users", oazapfts.json({ ...opts, method: "POST", body: userAdminCreateDto @@ -1858,10 +600,7 @@ export function deleteUserAdmin({ id, userAdminDeleteDto }: { id: string; userAdminDeleteDto: UserAdminDeleteDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "DELETE", body: userAdminDeleteDto @@ -1873,10 +612,7 @@ export function deleteUserAdmin({ id, userAdminDeleteDto }: { export function getUserAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}`, { ...opts })); } @@ -1887,10 +623,7 @@ export function updateUserAdmin({ id, userAdminUpdateDto }: { id: string; userAdminUpdateDto: UserAdminUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: userAdminUpdateDto @@ -1902,10 +635,7 @@ export function updateUserAdmin({ id, userAdminUpdateDto }: { export function getUserPreferencesAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserPreferencesResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}/preferences`, { + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}/preferences`, { ...opts })); } @@ -1916,10 +646,7 @@ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { id: string; userPreferencesUpdateDto: UserPreferencesUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserPreferencesResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}/preferences`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}/preferences`, oazapfts.json({ ...opts, method: "PUT", body: userPreferencesUpdateDto @@ -1931,10 +658,7 @@ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { export function restoreUserAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}/restore`, { + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}/restore`, { ...opts, method: "POST" })); @@ -1945,10 +669,7 @@ export function restoreUserAdmin({ id }: { export function getUserSessionsAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SessionResponseDto[]; - }>(`/admin/users/${encodeURIComponent(id)}/sessions`, { + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}/sessions`, { ...opts })); } @@ -1957,14 +678,11 @@ export function getUserSessionsAdmin({ id }: { */ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility }: { id: string; - isFavorite?: boolean; - isTrashed?: boolean; - visibility?: AssetVisibility; + isFavorite: boolean; + isTrashed: boolean; + visibility: AssetVisibility; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetStatsResponseDto; - }>(`/admin/users/${encodeURIComponent(id)}/statistics${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/admin/users/${encodeURIComponent(id)}/statistics${QS.query(QS.explode({ isFavorite, isTrashed, visibility @@ -1976,13 +694,10 @@ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility } * List all albums */ export function getAllAlbums({ assetId, shared }: { - assetId?: string; - shared?: boolean; + assetId: string; + shared: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AlbumResponseDto[]; - }>(`/albums${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/albums${QS.query(QS.explode({ assetId, shared }))}`, { @@ -1995,10 +710,7 @@ export function getAllAlbums({ assetId, shared }: { export function createAlbum({ createAlbumDto }: { createAlbumDto: CreateAlbumDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: AlbumResponseDto; - }>("/albums", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/albums", oazapfts.json({ ...opts, method: "POST", body: createAlbumDto @@ -2012,10 +724,7 @@ export function addAssetsToAlbums({ key, slug, albumsAddAssetsDto }: { slug?: string; albumsAddAssetsDto: AlbumsAddAssetsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AlbumsAddAssetsResponseDto; - }>(`/albums/assets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/albums/assets${QS.query(QS.explode({ key, slug }))}`, oazapfts.json({ @@ -2028,10 +737,7 @@ export function addAssetsToAlbums({ key, slug, albumsAddAssetsDto }: { * Retrieve album statistics */ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AlbumStatisticsResponseDto; - }>("/albums/statistics", { + return oazapfts.ok(oazapfts.fetchText("/albums/statistics", { ...opts })); } @@ -2053,12 +759,9 @@ export function getAlbumInfo({ id, key, slug, withoutAssets }: { id: string; key?: string; slug?: string; - withoutAssets?: boolean; + withoutAssets: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AlbumResponseDto; - }>(`/albums/${encodeURIComponent(id)}${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}${QS.query(QS.explode({ key, slug, withoutAssets @@ -2073,10 +776,7 @@ export function updateAlbumInfo({ id, updateAlbumDto }: { id: string; updateAlbumDto: UpdateAlbumDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AlbumResponseDto; - }>(`/albums/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PATCH", body: updateAlbumDto @@ -2089,10 +789,7 @@ export function removeAssetFromAlbum({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/albums/${encodeURIComponent(id)}/assets`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}/assets`, oazapfts.json({ ...opts, method: "DELETE", body: bulkIdsDto @@ -2107,10 +804,7 @@ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { slug?: string; bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/albums/${encodeURIComponent(id)}/assets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}/assets${QS.query(QS.explode({ key, slug }))}`, oazapfts.json({ @@ -2152,10 +846,7 @@ export function addUsersToAlbum({ id, addUsersDto }: { id: string; addUsersDto: AddUsersDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AlbumResponseDto; - }>(`/albums/${encodeURIComponent(id)}/users`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/albums/${encodeURIComponent(id)}/users`, oazapfts.json({ ...opts, method: "PUT", body: addUsersDto @@ -2165,10 +856,7 @@ export function addUsersToAlbum({ id, addUsersDto }: { * List all API keys */ export function getApiKeys(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ApiKeyResponseDto[]; - }>("/api-keys", { + return oazapfts.ok(oazapfts.fetchText("/api-keys", { ...opts })); } @@ -2178,10 +866,7 @@ export function getApiKeys(opts?: Oazapfts.RequestOpts) { export function createApiKey({ apiKeyCreateDto }: { apiKeyCreateDto: ApiKeyCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: ApiKeyCreateResponseDto; - }>("/api-keys", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/api-keys", oazapfts.json({ ...opts, method: "POST", body: apiKeyCreateDto @@ -2191,10 +876,7 @@ export function createApiKey({ apiKeyCreateDto }: { * Retrieve the current API key */ export function getMyApiKey(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ApiKeyResponseDto; - }>("/api-keys/me", { + return oazapfts.ok(oazapfts.fetchText("/api-keys/me", { ...opts })); } @@ -2215,10 +897,7 @@ export function deleteApiKey({ id }: { export function getApiKey({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ApiKeyResponseDto; - }>(`/api-keys/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/api-keys/${encodeURIComponent(id)}`, { ...opts })); } @@ -2229,10 +908,7 @@ export function updateApiKey({ id, apiKeyUpdateDto }: { id: string; apiKeyUpdateDto: ApiKeyUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ApiKeyResponseDto; - }>(`/api-keys/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/api-keys/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: apiKeyUpdateDto @@ -2259,10 +935,7 @@ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: xImmichChecksum?: string; assetMediaCreateDto: AssetMediaCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: AssetMediaResponseDto; - }>(`/assets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/assets${QS.query(QS.explode({ key, slug }))}`, oazapfts.multipart({ @@ -2292,10 +965,7 @@ export function updateAssets({ assetBulkUpdateDto }: { export function checkBulkUpload({ assetBulkUploadCheckDto }: { assetBulkUploadCheckDto: AssetBulkUploadCheckDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetBulkUploadCheckResponseDto; - }>("/assets/bulk-upload-check", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/assets/bulk-upload-check", oazapfts.json({ ...opts, method: "POST", body: assetBulkUploadCheckDto @@ -2316,13 +986,8 @@ export function copyAsset({ assetCopyDto }: { /** * Retrieve assets by device ID */ -export function getAllUserAssetsByDeviceId({ deviceId }: { - deviceId: string; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: string[]; - }>(`/assets/device/${encodeURIComponent(deviceId)}`, { +export function getAllUserAssetsByDeviceId(opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchText(`/assets/device/${encodeURIComponent(deviceId)}`, { ...opts })); } @@ -2332,10 +997,7 @@ export function getAllUserAssetsByDeviceId({ deviceId }: { export function checkExistingAssets({ checkExistingAssetsDto }: { checkExistingAssetsDto: CheckExistingAssetsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: CheckExistingAssetsResponseDto; - }>("/assets/exist", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/assets/exist", oazapfts.json({ ...opts, method: "POST", body: checkExistingAssetsDto @@ -2356,15 +1018,8 @@ export function runAssetJobs({ assetJobsDto }: { /** * Get random assets */ -export function getRandom({ count }: { - count?: number; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto[]; - }>(`/assets/random${QS.query(QS.explode({ - count - }))}`, { +export function getRandom(opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchText("/assets/random", { ...opts })); } @@ -2372,14 +1027,11 @@ export function getRandom({ count }: { * Get asset statistics */ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { - isFavorite?: boolean; - isTrashed?: boolean; - visibility?: AssetVisibility; + isFavorite: boolean; + isTrashed: boolean; + visibility: AssetVisibility; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetStatsResponseDto; - }>(`/assets/statistics${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/assets/statistics${QS.query(QS.explode({ isFavorite, isTrashed, visibility @@ -2395,10 +1047,7 @@ export function getAssetInfo({ id, key, slug }: { key?: string; slug?: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto; - }>(`/assets/${encodeURIComponent(id)}${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}${QS.query(QS.explode({ key, slug }))}`, { @@ -2412,10 +1061,7 @@ export function updateAsset({ id, updateAssetDto }: { id: string; updateAssetDto: UpdateAssetDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto; - }>(`/assets/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: updateAssetDto @@ -2427,10 +1073,7 @@ export function updateAsset({ id, updateAssetDto }: { export function getAssetMetadata({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetMetadataResponseDto[]; - }>(`/assets/${encodeURIComponent(id)}/metadata`, { + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}/metadata`, { ...opts })); } @@ -2441,10 +1084,7 @@ export function updateAssetMetadata({ id, assetMetadataUpsertDto }: { id: string; assetMetadataUpsertDto: AssetMetadataUpsertDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetMetadataResponseDto[]; - }>(`/assets/${encodeURIComponent(id)}/metadata`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}/metadata`, oazapfts.json({ ...opts, method: "PUT", body: assetMetadataUpsertDto @@ -2469,10 +1109,7 @@ export function getAssetMetadataByKey({ id, key }: { id: string; key: AssetMetadataKey; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetMetadataResponseDto; - }>(`/assets/${encodeURIComponent(id)}/metadata/${encodeURIComponent(key)}`, { + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}/metadata/${encodeURIComponent(key)}`, { ...opts })); } @@ -2482,10 +1119,7 @@ export function getAssetMetadataByKey({ id, key }: { export function getAssetOcr({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetOcrResponseDto[]; - }>(`/assets/${encodeURIComponent(id)}/ocr`, { + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}/ocr`, { ...opts })); } @@ -2516,10 +1150,7 @@ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { slug?: string; assetMediaReplaceDto: AssetMediaReplaceDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetMediaResponseDto; - }>(`/assets/${encodeURIComponent(id)}/original${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/assets/${encodeURIComponent(id)}/original${QS.query(QS.explode({ key, slug }))}`, oazapfts.multipart({ @@ -2534,7 +1165,7 @@ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { export function viewAsset({ id, key, size, slug }: { id: string; key?: string; - size?: AssetMediaSize; + size: AssetMediaSize; slug?: string; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchBlob<{ @@ -2572,10 +1203,7 @@ export function playAssetVideo({ id, key, slug }: { export function signUpAdmin({ signUpDto }: { signUpDto: SignUpDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: UserAdminResponseDto; - }>("/auth/admin-sign-up", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/auth/admin-sign-up", oazapfts.json({ ...opts, method: "POST", body: signUpDto @@ -2587,10 +1215,7 @@ export function signUpAdmin({ signUpDto }: { export function changePassword({ changePasswordDto }: { changePasswordDto: ChangePasswordDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>("/auth/change-password", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/auth/change-password", oazapfts.json({ ...opts, method: "POST", body: changePasswordDto @@ -2602,10 +1227,7 @@ export function changePassword({ changePasswordDto }: { export function login({ loginCredentialDto }: { loginCredentialDto: LoginCredentialDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: LoginResponseDto; - }>("/auth/login", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/auth/login", oazapfts.json({ ...opts, method: "POST", body: loginCredentialDto @@ -2615,10 +1237,7 @@ export function login({ loginCredentialDto }: { * Logout */ export function logout(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LogoutResponseDto; - }>("/auth/logout", { + return oazapfts.ok(oazapfts.fetchText("/auth/logout", { ...opts, method: "POST" })); @@ -2684,10 +1303,7 @@ export function unlockAuthSession({ sessionUnlockDto }: { * Retrieve auth status */ export function getAuthStatus(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AuthStatusResponseDto; - }>("/auth/status", { + return oazapfts.ok(oazapfts.fetchText("/auth/status", { ...opts })); } @@ -2695,10 +1311,7 @@ export function getAuthStatus(opts?: Oazapfts.RequestOpts) { * Validate access token */ export function validateAccessToken(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ValidateAccessTokenResponseDto; - }>("/auth/validateToken", { + return oazapfts.ok(oazapfts.fetchText("/auth/validateToken", { ...opts, method: "POST" })); @@ -2731,10 +1344,7 @@ export function getDownloadInfo({ key, slug, downloadInfoDto }: { slug?: string; downloadInfoDto: DownloadInfoDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: DownloadResponseDto; - }>(`/download/info${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/download/info${QS.query(QS.explode({ key, slug }))}`, oazapfts.json({ @@ -2759,10 +1369,7 @@ export function deleteDuplicates({ bulkIdsDto }: { * Retrieve duplicates */ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: DuplicateResponseDto[]; - }>("/duplicates", { + return oazapfts.ok(oazapfts.fetchText("/duplicates", { ...opts })); } @@ -2783,10 +1390,7 @@ export function deleteDuplicate({ id }: { export function getFaces({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetFaceResponseDto[]; - }>(`/faces${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/faces${QS.query(QS.explode({ id }))}`, { ...opts @@ -2824,10 +1428,7 @@ export function reassignFacesById({ id, faceDto }: { id: string; faceDto: FaceDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PersonResponseDto; - }>(`/faces/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/faces/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: faceDto @@ -2837,10 +1438,7 @@ export function reassignFacesById({ id, faceDto }: { * Retrieve queue counts and status */ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AllJobStatusResponseDto; - }>("/jobs", { + return oazapfts.ok(oazapfts.fetchText("/jobs", { ...opts })); } @@ -2863,10 +1461,7 @@ export function sendJobCommand({ id, jobCommandDto }: { id: JobName; jobCommandDto: JobCommandDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: JobStatusDto; - }>(`/jobs/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/jobs/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: jobCommandDto @@ -2876,10 +1471,7 @@ export function sendJobCommand({ id, jobCommandDto }: { * Retrieve libraries */ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LibraryResponseDto[]; - }>("/libraries", { + return oazapfts.ok(oazapfts.fetchText("/libraries", { ...opts })); } @@ -2889,10 +1481,7 @@ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { export function createLibrary({ createLibraryDto }: { createLibraryDto: CreateLibraryDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: LibraryResponseDto; - }>("/libraries", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/libraries", oazapfts.json({ ...opts, method: "POST", body: createLibraryDto @@ -2915,10 +1504,7 @@ export function deleteLibrary({ id }: { export function getLibrary({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LibraryResponseDto; - }>(`/libraries/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}`, { ...opts })); } @@ -2929,10 +1515,7 @@ export function updateLibrary({ id, updateLibraryDto }: { id: string; updateLibraryDto: UpdateLibraryDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LibraryResponseDto; - }>(`/libraries/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: updateLibraryDto @@ -2955,10 +1538,7 @@ export function scanLibrary({ id }: { export function getLibraryStatistics({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LibraryStatsResponseDto; - }>(`/libraries/${encodeURIComponent(id)}/statistics`, { + return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}/statistics`, { ...opts })); } @@ -2969,10 +1549,7 @@ export function validate({ id, validateLibraryDto }: { id: string; validateLibraryDto: ValidateLibraryDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ValidateLibraryResponseDto; - }>(`/libraries/${encodeURIComponent(id)}/validate`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/libraries/${encodeURIComponent(id)}/validate`, oazapfts.json({ ...opts, method: "POST", body: validateLibraryDto @@ -2982,17 +1559,14 @@ export function validate({ id, validateLibraryDto }: { * Retrieve map markers */ export function getMapMarkers({ fileCreatedAfter, fileCreatedBefore, isArchived, isFavorite, withPartners, withSharedAlbums }: { - fileCreatedAfter?: string; - fileCreatedBefore?: string; - isArchived?: boolean; - isFavorite?: boolean; - withPartners?: boolean; - withSharedAlbums?: boolean; + fileCreatedAfter: string; + fileCreatedBefore: string; + isArchived: boolean; + isFavorite: boolean; + withPartners: boolean; + withSharedAlbums: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: MapMarkerResponseDto[]; - }>(`/map/markers${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/map/markers${QS.query(QS.explode({ fileCreatedAfter, fileCreatedBefore, isArchived, @@ -3010,10 +1584,7 @@ export function reverseGeocode({ lat, lon }: { lat: number; lon: number; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: MapReverseGeocodeResponseDto[]; - }>(`/map/reverse-geocode${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/map/reverse-geocode${QS.query(QS.explode({ lat, lon }))}`, { @@ -3024,17 +1595,14 @@ export function reverseGeocode({ lat, lon }: { * Retrieve memories */ export function searchMemories({ $for, isSaved, isTrashed, order, size, $type }: { - $for?: string; - isSaved?: boolean; - isTrashed?: boolean; - order?: MemorySearchOrder; - size?: number; - $type?: MemoryType; + $for: string; + isSaved: boolean; + isTrashed: boolean; + order: MemorySearchOrder; + size: number; + $type: MemoryType; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: MemoryResponseDto[]; - }>(`/memories${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/memories${QS.query(QS.explode({ "for": $for, isSaved, isTrashed, @@ -3051,10 +1619,7 @@ export function searchMemories({ $for, isSaved, isTrashed, order, size, $type }: export function createMemory({ memoryCreateDto }: { memoryCreateDto: MemoryCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: MemoryResponseDto; - }>("/memories", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/memories", oazapfts.json({ ...opts, method: "POST", body: memoryCreateDto @@ -3064,17 +1629,14 @@ export function createMemory({ memoryCreateDto }: { * Retrieve memories statistics */ export function memoriesStatistics({ $for, isSaved, isTrashed, order, size, $type }: { - $for?: string; - isSaved?: boolean; - isTrashed?: boolean; - order?: MemorySearchOrder; - size?: number; - $type?: MemoryType; + $for: string; + isSaved: boolean; + isTrashed: boolean; + order: MemorySearchOrder; + size: number; + $type: MemoryType; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: MemoryStatisticsResponseDto; - }>(`/memories/statistics${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/memories/statistics${QS.query(QS.explode({ "for": $for, isSaved, isTrashed, @@ -3102,10 +1664,7 @@ export function deleteMemory({ id }: { export function getMemory({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: MemoryResponseDto; - }>(`/memories/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/memories/${encodeURIComponent(id)}`, { ...opts })); } @@ -3116,10 +1675,7 @@ export function updateMemory({ id, memoryUpdateDto }: { id: string; memoryUpdateDto: MemoryUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: MemoryResponseDto; - }>(`/memories/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/memories/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: memoryUpdateDto @@ -3132,10 +1688,7 @@ export function removeMemoryAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/memories/${encodeURIComponent(id)}/assets`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/memories/${encodeURIComponent(id)}/assets`, oazapfts.json({ ...opts, method: "DELETE", body: bulkIdsDto @@ -3148,10 +1701,7 @@ export function addMemoryAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/memories/${encodeURIComponent(id)}/assets`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/memories/${encodeURIComponent(id)}/assets`, oazapfts.json({ ...opts, method: "PUT", body: bulkIdsDto @@ -3173,15 +1723,12 @@ export function deleteNotifications({ notificationDeleteAllDto }: { * Retrieve notifications */ export function getNotifications({ id, level, $type, unread }: { - id?: string; - level?: NotificationLevel; - $type?: NotificationType; - unread?: boolean; + id: string; + level: NotificationLevel; + $type: NotificationType; + unread: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: NotificationDto[]; - }>(`/notifications${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/notifications${QS.query(QS.explode({ id, level, "type": $type, @@ -3219,10 +1766,7 @@ export function deleteNotification({ id }: { export function getNotification({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: NotificationDto; - }>(`/notifications/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/notifications/${encodeURIComponent(id)}`, { ...opts })); } @@ -3233,10 +1777,7 @@ export function updateNotification({ id, notificationUpdateDto }: { id: string; notificationUpdateDto: NotificationUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: NotificationDto; - }>(`/notifications/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/notifications/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: notificationUpdateDto @@ -3248,10 +1789,7 @@ export function updateNotification({ id, notificationUpdateDto }: { export function startOAuth({ oAuthConfigDto }: { oAuthConfigDto: OAuthConfigDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: OAuthAuthorizeResponseDto; - }>("/oauth/authorize", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/oauth/authorize", oazapfts.json({ ...opts, method: "POST", body: oAuthConfigDto @@ -3263,10 +1801,7 @@ export function startOAuth({ oAuthConfigDto }: { export function finishOAuth({ oAuthCallbackDto }: { oAuthCallbackDto: OAuthCallbackDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: LoginResponseDto; - }>("/oauth/callback", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/oauth/callback", oazapfts.json({ ...opts, method: "POST", body: oAuthCallbackDto @@ -3278,10 +1813,7 @@ export function finishOAuth({ oAuthCallbackDto }: { export function linkOAuthAccount({ oAuthCallbackDto }: { oAuthCallbackDto: OAuthCallbackDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>("/oauth/link", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/oauth/link", oazapfts.json({ ...opts, method: "POST", body: oAuthCallbackDto @@ -3299,10 +1831,7 @@ export function redirectOAuthToMobile(opts?: Oazapfts.RequestOpts) { * Unlink OAuth account */ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>("/oauth/unlink", { + return oazapfts.ok(oazapfts.fetchText("/oauth/unlink", { ...opts, method: "POST" })); @@ -3313,10 +1842,7 @@ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { export function getPartners({ direction }: { direction: PartnerDirection; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PartnerResponseDto[]; - }>(`/partners${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/partners${QS.query(QS.explode({ direction }))}`, { ...opts @@ -3328,10 +1854,7 @@ export function getPartners({ direction }: { export function createPartner({ partnerCreateDto }: { partnerCreateDto: PartnerCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: PartnerResponseDto; - }>("/partners", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/partners", oazapfts.json({ ...opts, method: "POST", body: partnerCreateDto @@ -3354,10 +1877,7 @@ export function removePartner({ id }: { export function createPartnerDeprecated({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: PartnerResponseDto; - }>(`/partners/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/partners/${encodeURIComponent(id)}`, { ...opts, method: "POST" })); @@ -3369,10 +1889,7 @@ export function updatePartner({ id, partnerUpdateDto }: { id: string; partnerUpdateDto: PartnerUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PartnerResponseDto; - }>(`/partners/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/partners/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: partnerUpdateDto @@ -3394,16 +1911,13 @@ export function deletePeople({ bulkIdsDto }: { * Get all people */ export function getAllPeople({ closestAssetId, closestPersonId, page, size, withHidden }: { - closestAssetId?: string; - closestPersonId?: string; + closestAssetId: string; + closestPersonId: string; page?: number; size?: number; - withHidden?: boolean; + withHidden: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PeopleResponseDto; - }>(`/people${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/people${QS.query(QS.explode({ closestAssetId, closestPersonId, page, @@ -3419,10 +1933,7 @@ export function getAllPeople({ closestAssetId, closestPersonId, page, size, with export function createPerson({ personCreateDto }: { personCreateDto: PersonCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: PersonResponseDto; - }>("/people", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/people", oazapfts.json({ ...opts, method: "POST", body: personCreateDto @@ -3434,10 +1945,7 @@ export function createPerson({ personCreateDto }: { export function updatePeople({ peopleUpdateDto }: { peopleUpdateDto: PeopleUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>("/people", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/people", oazapfts.json({ ...opts, method: "PUT", body: peopleUpdateDto @@ -3460,10 +1968,7 @@ export function deletePerson({ id }: { export function getPerson({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PersonResponseDto; - }>(`/people/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/people/${encodeURIComponent(id)}`, { ...opts })); } @@ -3474,10 +1979,7 @@ export function updatePerson({ id, personUpdateDto }: { id: string; personUpdateDto: PersonUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PersonResponseDto; - }>(`/people/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/people/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: personUpdateDto @@ -3490,10 +1992,7 @@ export function mergePerson({ id, mergePersonDto }: { id: string; mergePersonDto: MergePersonDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/people/${encodeURIComponent(id)}/merge`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/people/${encodeURIComponent(id)}/merge`, oazapfts.json({ ...opts, method: "POST", body: mergePersonDto @@ -3506,10 +2005,7 @@ export function reassignFaces({ id, assetFaceUpdateDto }: { id: string; assetFaceUpdateDto: AssetFaceUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PersonResponseDto[]; - }>(`/people/${encodeURIComponent(id)}/reassign`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/people/${encodeURIComponent(id)}/reassign`, oazapfts.json({ ...opts, method: "PUT", body: assetFaceUpdateDto @@ -3521,10 +2017,7 @@ export function reassignFaces({ id, assetFaceUpdateDto }: { export function getPersonStatistics({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PersonStatisticsResponseDto; - }>(`/people/${encodeURIComponent(id)}/statistics`, { + return oazapfts.ok(oazapfts.fetchText(`/people/${encodeURIComponent(id)}/statistics`, { ...opts })); } @@ -3545,10 +2038,7 @@ export function getPersonThumbnail({ id }: { * Retrieve assets by city */ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto[]; - }>("/search/cities", { + return oazapfts.ok(oazapfts.fetchText("/search/cities", { ...opts })); } @@ -3556,75 +2046,49 @@ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { * Retrieve explore data */ export function getExploreData(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SearchExploreResponseDto[]; - }>("/search/explore", { + return oazapfts.ok(oazapfts.fetchText("/search/explore", { ...opts })); } /** * Search large assets */ -export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: { - albumIds?: string[]; - city?: string | null; - country?: string | null; - createdAfter?: string; - createdBefore?: string; - deviceId?: string; - isEncoded?: boolean; - isFavorite?: boolean; - isMotion?: boolean; - isNotInAlbum?: boolean; - isOffline?: boolean; - lensModel?: string | null; - libraryId?: string | null; - make?: string; - minFileSize?: number; - model?: string | null; - ocr?: string; - personIds?: string[]; - rating?: number; - size?: number; - state?: string | null; - tagIds?: string[] | null; - takenAfter?: string; - takenBefore?: string; - trashedAfter?: string; - trashedBefore?: string; - $type?: AssetTypeEnum; - updatedAfter?: string; - updatedBefore?: string; - visibility?: AssetVisibility; - withDeleted?: boolean; - withExif?: boolean; +export function searchLargeAssets({ albumIds, createdAfter, createdBefore, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, libraryId, minFileSize, personIds, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: { + albumIds: string[]; + createdAfter: string; + createdBefore: string; + isEncoded: boolean; + isFavorite: boolean; + isMotion: boolean; + isNotInAlbum: boolean; + isOffline: boolean; + libraryId: Object; + minFileSize: number; + personIds: string[]; + tagIds: Object; + takenAfter: string; + takenBefore: string; + trashedAfter: string; + trashedBefore: string; + $type: AssetTypeEnum; + updatedAfter: string; + updatedBefore: string; + visibility: AssetVisibility; + withDeleted: boolean; + withExif: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto[]; - }>(`/search/large-assets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/search/large-assets${QS.query(QS.explode({ albumIds, - city, - country, createdAfter, createdBefore, - deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, - lensModel, libraryId, - make, minFileSize, - model, - ocr, personIds, - rating, - size, - state, tagIds, takenAfter, takenBefore, @@ -3647,10 +2111,7 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat export function searchAssets({ metadataSearchDto }: { metadataSearchDto: MetadataSearchDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SearchResponseDto; - }>("/search/metadata", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/search/metadata", oazapfts.json({ ...opts, method: "POST", body: metadataSearchDto @@ -3659,15 +2120,10 @@ export function searchAssets({ metadataSearchDto }: { /** * Search people */ -export function searchPerson({ name, withHidden }: { - name: string; - withHidden?: boolean; +export function searchPerson({ withHidden }: { + withHidden: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PersonResponseDto[]; - }>(`/search/person${QS.query(QS.explode({ - name, + return oazapfts.ok(oazapfts.fetchText(`/search/person${QS.query(QS.explode({ withHidden }))}`, { ...opts @@ -3676,15 +2132,8 @@ export function searchPerson({ name, withHidden }: { /** * Search places */ -export function searchPlaces({ name }: { - name: string; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: PlacesResponseDto[]; - }>(`/search/places${QS.query(QS.explode({ - name - }))}`, { +export function searchPlaces(opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchText("/search/places", { ...opts })); } @@ -3694,10 +2143,7 @@ export function searchPlaces({ name }: { export function searchRandom({ randomSearchDto }: { randomSearchDto: RandomSearchDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto[]; - }>("/search/random", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/search/random", oazapfts.json({ ...opts, method: "POST", body: randomSearchDto @@ -3709,10 +2155,7 @@ export function searchRandom({ randomSearchDto }: { export function searchSmart({ smartSearchDto }: { smartSearchDto: SmartSearchDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SearchResponseDto; - }>("/search/smart", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/search/smart", oazapfts.json({ ...opts, method: "POST", body: smartSearchDto @@ -3724,10 +2167,7 @@ export function searchSmart({ smartSearchDto }: { export function searchAssetStatistics({ statisticsSearchDto }: { statisticsSearchDto: StatisticsSearchDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SearchStatisticsResponseDto; - }>("/search/statistics", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/search/statistics", oazapfts.json({ ...opts, method: "POST", body: statisticsSearchDto @@ -3736,25 +2176,12 @@ export function searchAssetStatistics({ statisticsSearchDto }: { /** * Retrieve search suggestions */ -export function getSearchSuggestions({ country, includeNull, lensModel, make, model, state, $type }: { - country?: string; - includeNull?: boolean; - lensModel?: string; - make?: string; - model?: string; - state?: string; +export function getSearchSuggestions({ includeNull, $type }: { + includeNull: boolean; $type: SearchSuggestionType; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: string[]; - }>(`/search/suggestions${QS.query(QS.explode({ - country, + return oazapfts.ok(oazapfts.fetchText(`/search/suggestions${QS.query(QS.explode({ includeNull, - lensModel, - make, - model, - state, "type": $type }))}`, { ...opts @@ -3764,10 +2191,7 @@ export function getSearchSuggestions({ country, includeNull, lensModel, make, mo * Get server information */ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerAboutResponseDto; - }>("/server/about", { + return oazapfts.ok(oazapfts.fetchText("/server/about", { ...opts })); } @@ -3775,10 +2199,7 @@ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { * Get APK links */ export function getApkLinks(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerApkLinksDto; - }>("/server/apk-links", { + return oazapfts.ok(oazapfts.fetchText("/server/apk-links", { ...opts })); } @@ -3786,10 +2207,7 @@ export function getApkLinks(opts?: Oazapfts.RequestOpts) { * Get config */ export function getServerConfig(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerConfigDto; - }>("/server/config", { + return oazapfts.ok(oazapfts.fetchText("/server/config", { ...opts })); } @@ -3797,10 +2215,7 @@ export function getServerConfig(opts?: Oazapfts.RequestOpts) { * Get features */ export function getServerFeatures(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerFeaturesDto; - }>("/server/features", { + return oazapfts.ok(oazapfts.fetchText("/server/features", { ...opts })); } @@ -3817,12 +2232,7 @@ export function deleteServerLicense(opts?: Oazapfts.RequestOpts) { * Get product key */ export function getServerLicense(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LicenseResponseDto; - } | { - status: 404; - }>("/server/license", { + return oazapfts.ok(oazapfts.fetchText("/server/license", { ...opts })); } @@ -3832,10 +2242,7 @@ export function getServerLicense(opts?: Oazapfts.RequestOpts) { export function setServerLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LicenseResponseDto; - }>("/server/license", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/server/license", oazapfts.json({ ...opts, method: "PUT", body: licenseKeyDto @@ -3845,10 +2252,7 @@ export function setServerLicense({ licenseKeyDto }: { * Get supported media types */ export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerMediaTypesResponseDto; - }>("/server/media-types", { + return oazapfts.ok(oazapfts.fetchText("/server/media-types", { ...opts })); } @@ -3856,10 +2260,7 @@ export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) { * Ping */ export function pingServer(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerPingResponseRead; - }>("/server/ping", { + return oazapfts.ok(oazapfts.fetchText("/server/ping", { ...opts })); } @@ -3867,10 +2268,7 @@ export function pingServer(opts?: Oazapfts.RequestOpts) { * Get statistics */ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerStatsResponseDto; - }>("/server/statistics", { + return oazapfts.ok(oazapfts.fetchText("/server/statistics", { ...opts })); } @@ -3878,10 +2276,7 @@ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { * Get storage */ export function getStorage(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerStorageResponseDto; - }>("/server/storage", { + return oazapfts.ok(oazapfts.fetchText("/server/storage", { ...opts })); } @@ -3889,10 +2284,7 @@ export function getStorage(opts?: Oazapfts.RequestOpts) { * Get theme */ export function getTheme(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerThemeDto; - }>("/server/theme", { + return oazapfts.ok(oazapfts.fetchText("/server/theme", { ...opts })); } @@ -3900,10 +2292,7 @@ export function getTheme(opts?: Oazapfts.RequestOpts) { * Get server version */ export function getServerVersion(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerVersionResponseDto; - }>("/server/version", { + return oazapfts.ok(oazapfts.fetchText("/server/version", { ...opts })); } @@ -3911,10 +2300,7 @@ export function getServerVersion(opts?: Oazapfts.RequestOpts) { * Get version check status */ export function getVersionCheck(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: VersionCheckStateResponseDto; - }>("/server/version-check", { + return oazapfts.ok(oazapfts.fetchText("/server/version-check", { ...opts })); } @@ -3922,10 +2308,7 @@ export function getVersionCheck(opts?: Oazapfts.RequestOpts) { * Get version history */ export function getVersionHistory(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ServerVersionHistoryResponseDto[]; - }>("/server/version-history", { + return oazapfts.ok(oazapfts.fetchText("/server/version-history", { ...opts })); } @@ -3942,10 +2325,7 @@ export function deleteAllSessions(opts?: Oazapfts.RequestOpts) { * Retrieve sessions */ export function getSessions(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SessionResponseDto[]; - }>("/sessions", { + return oazapfts.ok(oazapfts.fetchText("/sessions", { ...opts })); } @@ -3955,10 +2335,7 @@ export function getSessions(opts?: Oazapfts.RequestOpts) { export function createSession({ sessionCreateDto }: { sessionCreateDto: SessionCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: SessionCreateResponseDto; - }>("/sessions", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/sessions", oazapfts.json({ ...opts, method: "POST", body: sessionCreateDto @@ -3982,10 +2359,7 @@ export function updateSession({ id, sessionUpdateDto }: { id: string; sessionUpdateDto: SessionUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SessionResponseDto; - }>(`/sessions/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/sessions/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: sessionUpdateDto @@ -4006,12 +2380,9 @@ export function lockSession({ id }: { * Retrieve all shared links */ export function getAllSharedLinks({ albumId }: { - albumId?: string; + albumId: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SharedLinkResponseDto[]; - }>(`/shared-links${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/shared-links${QS.query(QS.explode({ albumId }))}`, { ...opts @@ -4023,10 +2394,7 @@ export function getAllSharedLinks({ albumId }: { export function createSharedLink({ sharedLinkCreateDto }: { sharedLinkCreateDto: SharedLinkCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: SharedLinkResponseDto; - }>("/shared-links", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/shared-links", oazapfts.json({ ...opts, method: "POST", body: sharedLinkCreateDto @@ -4035,20 +2403,15 @@ export function createSharedLink({ sharedLinkCreateDto }: { /** * Retrieve current shared link */ -export function getMySharedLink({ key, password, slug, token }: { +export function getMySharedLink({ key, password, slug }: { key?: string; - password?: string; + password: string; slug?: string; - token?: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SharedLinkResponseDto; - }>(`/shared-links/me${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/shared-links/me${QS.query(QS.explode({ key, password, - slug, - token + slug }))}`, { ...opts })); @@ -4070,10 +2433,7 @@ export function removeSharedLink({ id }: { export function getSharedLinkById({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SharedLinkResponseDto; - }>(`/shared-links/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/shared-links/${encodeURIComponent(id)}`, { ...opts })); } @@ -4084,10 +2444,7 @@ export function updateSharedLink({ id, sharedLinkEditDto }: { id: string; sharedLinkEditDto: SharedLinkEditDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SharedLinkResponseDto; - }>(`/shared-links/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/shared-links/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PATCH", body: sharedLinkEditDto @@ -4102,10 +2459,7 @@ export function removeSharedLinkAssets({ id, key, slug, assetIdsDto }: { slug?: string; assetIdsDto: AssetIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetIdsResponseDto[]; - }>(`/shared-links/${encodeURIComponent(id)}/assets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/shared-links/${encodeURIComponent(id)}/assets${QS.query(QS.explode({ key, slug }))}`, oazapfts.json({ @@ -4123,10 +2477,7 @@ export function addSharedLinkAssets({ id, key, slug, assetIdsDto }: { slug?: string; assetIdsDto: AssetIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetIdsResponseDto[]; - }>(`/shared-links/${encodeURIComponent(id)}/assets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/shared-links/${encodeURIComponent(id)}/assets${QS.query(QS.explode({ key, slug }))}`, oazapfts.json({ @@ -4151,12 +2502,9 @@ export function deleteStacks({ bulkIdsDto }: { * Retrieve stacks */ export function searchStacks({ primaryAssetId }: { - primaryAssetId?: string; + primaryAssetId: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: StackResponseDto[]; - }>(`/stacks${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/stacks${QS.query(QS.explode({ primaryAssetId }))}`, { ...opts @@ -4168,10 +2516,7 @@ export function searchStacks({ primaryAssetId }: { export function createStack({ stackCreateDto }: { stackCreateDto: StackCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: StackResponseDto; - }>("/stacks", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/stacks", oazapfts.json({ ...opts, method: "POST", body: stackCreateDto @@ -4194,10 +2539,7 @@ export function deleteStack({ id }: { export function getStack({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: StackResponseDto; - }>(`/stacks/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/stacks/${encodeURIComponent(id)}`, { ...opts })); } @@ -4208,10 +2550,7 @@ export function updateStack({ id, stackUpdateDto }: { id: string; stackUpdateDto: StackUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: StackResponseDto; - }>(`/stacks/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/stacks/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: stackUpdateDto @@ -4245,10 +2584,7 @@ export function deleteSyncAck({ syncAckDeleteDto }: { * Retrieve acknowledgements */ export function getSyncAck(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SyncAckDto[]; - }>("/sync/ack", { + return oazapfts.ok(oazapfts.fetchText("/sync/ack", { ...opts })); } @@ -4270,10 +2606,7 @@ export function sendSyncAck({ syncAckSetDto }: { export function getDeltaSync({ assetDeltaSyncDto }: { assetDeltaSyncDto: AssetDeltaSyncDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetDeltaSyncResponseDto; - }>("/sync/delta-sync", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/sync/delta-sync", oazapfts.json({ ...opts, method: "POST", body: assetDeltaSyncDto @@ -4285,10 +2618,7 @@ export function getDeltaSync({ assetDeltaSyncDto }: { export function getFullSyncForUser({ assetFullSyncDto }: { assetFullSyncDto: AssetFullSyncDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto[]; - }>("/sync/full-sync", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/sync/full-sync", oazapfts.json({ ...opts, method: "POST", body: assetFullSyncDto @@ -4310,10 +2640,7 @@ export function getSyncStream({ syncStreamDto }: { * Get system configuration */ export function getConfig(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SystemConfigDto; - }>("/system-config", { + return oazapfts.ok(oazapfts.fetchText("/system-config", { ...opts })); } @@ -4323,10 +2650,7 @@ export function getConfig(opts?: Oazapfts.RequestOpts) { export function updateConfig({ systemConfigDto }: { systemConfigDto: SystemConfigDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SystemConfigDto; - }>("/system-config", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/system-config", oazapfts.json({ ...opts, method: "PUT", body: systemConfigDto @@ -4336,10 +2660,7 @@ export function updateConfig({ systemConfigDto }: { * Get system configuration defaults */ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SystemConfigDto; - }>("/system-config/defaults", { + return oazapfts.ok(oazapfts.fetchText("/system-config/defaults", { ...opts })); } @@ -4347,10 +2668,7 @@ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { * Get storage template options */ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: SystemConfigTemplateStorageOptionDto; - }>("/system-config/storage-template-options", { + return oazapfts.ok(oazapfts.fetchText("/system-config/storage-template-options", { ...opts })); } @@ -4358,10 +2676,7 @@ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { * Retrieve admin onboarding */ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AdminOnboardingUpdateDto; - }>("/system-metadata/admin-onboarding", { + return oazapfts.ok(oazapfts.fetchText("/system-metadata/admin-onboarding", { ...opts })); } @@ -4381,10 +2696,7 @@ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { * Retrieve reverse geocoding state */ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: ReverseGeocodingStateResponseDto; - }>("/system-metadata/reverse-geocoding-state", { + return oazapfts.ok(oazapfts.fetchText("/system-metadata/reverse-geocoding-state", { ...opts })); } @@ -4392,10 +2704,7 @@ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { * Retrieve version check state */ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: VersionCheckStateResponseDto; - }>("/system-metadata/version-check-state", { + return oazapfts.ok(oazapfts.fetchText("/system-metadata/version-check-state", { ...opts })); } @@ -4403,10 +2712,7 @@ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { * Retrieve tags */ export function getAllTags(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagResponseDto[]; - }>("/tags", { + return oazapfts.ok(oazapfts.fetchText("/tags", { ...opts })); } @@ -4416,10 +2722,7 @@ export function getAllTags(opts?: Oazapfts.RequestOpts) { export function createTag({ tagCreateDto }: { tagCreateDto: TagCreateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: TagResponseDto; - }>("/tags", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/tags", oazapfts.json({ ...opts, method: "POST", body: tagCreateDto @@ -4431,10 +2734,7 @@ export function createTag({ tagCreateDto }: { export function upsertTags({ tagUpsertDto }: { tagUpsertDto: TagUpsertDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagResponseDto[]; - }>("/tags", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/tags", oazapfts.json({ ...opts, method: "PUT", body: tagUpsertDto @@ -4446,10 +2746,7 @@ export function upsertTags({ tagUpsertDto }: { export function bulkTagAssets({ tagBulkAssetsDto }: { tagBulkAssetsDto: TagBulkAssetsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagBulkAssetsResponseDto; - }>("/tags/assets", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/tags/assets", oazapfts.json({ ...opts, method: "PUT", body: tagBulkAssetsDto @@ -4472,10 +2769,7 @@ export function deleteTag({ id }: { export function getTagById({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagResponseDto; - }>(`/tags/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/tags/${encodeURIComponent(id)}`, { ...opts })); } @@ -4486,10 +2780,7 @@ export function updateTag({ id, tagUpdateDto }: { id: string; tagUpdateDto: TagUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TagResponseDto; - }>(`/tags/${encodeURIComponent(id)}`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/tags/${encodeURIComponent(id)}`, oazapfts.json({ ...opts, method: "PUT", body: tagUpdateDto @@ -4502,10 +2793,7 @@ export function untagAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/tags/${encodeURIComponent(id)}/assets`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/tags/${encodeURIComponent(id)}/assets`, oazapfts.json({ ...opts, method: "DELETE", body: bulkIdsDto @@ -4518,10 +2806,7 @@ export function tagAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: BulkIdResponseDto[]; - }>(`/tags/${encodeURIComponent(id)}/assets`, oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText(`/tags/${encodeURIComponent(id)}/assets`, oazapfts.json({ ...opts, method: "PUT", body: bulkIdsDto @@ -4531,20 +2816,20 @@ export function tagAssets({ id, bulkIdsDto }: { * Get time bucket */ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, timeBucket, userId, visibility, withCoordinates, withPartners, withStacked }: { - albumId?: string; - isFavorite?: boolean; - isTrashed?: boolean; + albumId: string; + isFavorite: boolean; + isTrashed: boolean; key?: string; - order?: AssetOrder; - personId?: string; + order: AssetOrder; + personId: string; slug?: string; - tagId?: string; + tagId: string; timeBucket: string; - userId?: string; - visibility?: AssetVisibility; - withCoordinates?: boolean; - withPartners?: boolean; - withStacked?: boolean; + userId: string; + visibility: AssetVisibility; + withCoordinates: boolean; + withPartners: boolean; + withStacked: boolean; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -4572,24 +2857,21 @@ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, pers * Get time buckets */ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, userId, visibility, withCoordinates, withPartners, withStacked }: { - albumId?: string; - isFavorite?: boolean; - isTrashed?: boolean; + albumId: string; + isFavorite: boolean; + isTrashed: boolean; key?: string; - order?: AssetOrder; - personId?: string; + order: AssetOrder; + personId: string; slug?: string; - tagId?: string; - userId?: string; - visibility?: AssetVisibility; - withCoordinates?: boolean; - withPartners?: boolean; - withStacked?: boolean; + tagId: string; + userId: string; + visibility: AssetVisibility; + withCoordinates: boolean; + withPartners: boolean; + withStacked: boolean; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TimeBucketsResponseDto[]; - }>(`/timeline/buckets${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/timeline/buckets${QS.query(QS.explode({ albumId, isFavorite, isTrashed, @@ -4611,10 +2893,7 @@ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, per * Empty trash */ export function emptyTrash(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TrashResponseDto; - }>("/trash/empty", { + return oazapfts.ok(oazapfts.fetchText("/trash/empty", { ...opts, method: "POST" })); @@ -4623,10 +2902,7 @@ export function emptyTrash(opts?: Oazapfts.RequestOpts) { * Restore trash */ export function restoreTrash(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TrashResponseDto; - }>("/trash/restore", { + return oazapfts.ok(oazapfts.fetchText("/trash/restore", { ...opts, method: "POST" })); @@ -4637,10 +2913,7 @@ export function restoreTrash(opts?: Oazapfts.RequestOpts) { export function restoreAssets({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: TrashResponseDto; - }>("/trash/restore/assets", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/trash/restore/assets", oazapfts.json({ ...opts, method: "POST", body: bulkIdsDto @@ -4650,10 +2923,7 @@ export function restoreAssets({ bulkIdsDto }: { * Get all users */ export function searchUsers(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserResponseDto[]; - }>("/users", { + return oazapfts.ok(oazapfts.fetchText("/users", { ...opts })); } @@ -4661,10 +2931,7 @@ export function searchUsers(opts?: Oazapfts.RequestOpts) { * Get current user */ export function getMyUser(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>("/users/me", { + return oazapfts.ok(oazapfts.fetchText("/users/me", { ...opts })); } @@ -4674,10 +2941,7 @@ export function getMyUser(opts?: Oazapfts.RequestOpts) { export function updateMyUser({ userUpdateMeDto }: { userUpdateMeDto: UserUpdateMeDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserAdminResponseDto; - }>("/users/me", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/users/me", oazapfts.json({ ...opts, method: "PUT", body: userUpdateMeDto @@ -4696,10 +2960,7 @@ export function deleteUserLicense(opts?: Oazapfts.RequestOpts) { * Retrieve user product key */ export function getUserLicense(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LicenseResponseDto; - }>("/users/me/license", { + return oazapfts.ok(oazapfts.fetchText("/users/me/license", { ...opts })); } @@ -4709,10 +2970,7 @@ export function getUserLicense(opts?: Oazapfts.RequestOpts) { export function setUserLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: LicenseResponseDto; - }>("/users/me/license", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/users/me/license", oazapfts.json({ ...opts, method: "PUT", body: licenseKeyDto @@ -4731,10 +2989,7 @@ export function deleteUserOnboarding(opts?: Oazapfts.RequestOpts) { * Retrieve user onboarding */ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: OnboardingResponseDto; - }>("/users/me/onboarding", { + return oazapfts.ok(oazapfts.fetchText("/users/me/onboarding", { ...opts })); } @@ -4744,10 +2999,7 @@ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { export function setUserOnboarding({ onboardingDto }: { onboardingDto: OnboardingDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: OnboardingResponseDto; - }>("/users/me/onboarding", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/users/me/onboarding", oazapfts.json({ ...opts, method: "PUT", body: onboardingDto @@ -4757,10 +3009,7 @@ export function setUserOnboarding({ onboardingDto }: { * Get my preferences */ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserPreferencesResponseDto; - }>("/users/me/preferences", { + return oazapfts.ok(oazapfts.fetchText("/users/me/preferences", { ...opts })); } @@ -4770,10 +3019,7 @@ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { export function updateMyPreferences({ userPreferencesUpdateDto }: { userPreferencesUpdateDto: UserPreferencesUpdateDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserPreferencesResponseDto; - }>("/users/me/preferences", oazapfts.json({ + return oazapfts.ok(oazapfts.fetchText("/users/me/preferences", oazapfts.json({ ...opts, method: "PUT", body: userPreferencesUpdateDto @@ -4794,10 +3040,7 @@ export function deleteProfileImage(opts?: Oazapfts.RequestOpts) { export function createProfileImage({ createProfileImageDto }: { createProfileImageDto: CreateProfileImageDto; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 201; - data: CreateProfileImageResponseDto; - }>("/users/profile-image", oazapfts.multipart({ + return oazapfts.ok(oazapfts.fetchText("/users/profile-image", oazapfts.multipart({ ...opts, method: "POST", body: createProfileImageDto @@ -4809,10 +3052,7 @@ export function createProfileImage({ createProfileImageDto }: { export function getUser({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: UserResponseDto; - }>(`/users/${encodeURIComponent(id)}`, { + return oazapfts.ok(oazapfts.fetchText(`/users/${encodeURIComponent(id)}`, { ...opts })); } @@ -4835,10 +3075,7 @@ export function getProfileImage({ id }: { export function getAssetsByOriginalPath({ path }: { path: string; }, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: AssetResponseDto[]; - }>(`/view/folder${QS.query(QS.explode({ + return oazapfts.ok(oazapfts.fetchText(`/view/folder${QS.query(QS.explode({ path }))}`, { ...opts @@ -4848,10 +3085,7 @@ export function getAssetsByOriginalPath({ path }: { * Retrieve unique paths */ export function getUniqueOriginalPaths(opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchJson<{ - status: 200; - data: string[]; - }>("/view/folder/unique-paths", { + return oazapfts.ok(oazapfts.fetchText("/view/folder/unique-paths", { ...opts })); } @@ -4863,18 +3097,6 @@ export enum ReactionType { Comment = "comment", Like = "like" } -export enum UserAvatarColor { - Primary = "primary", - Pink = "pink", - Red = "red", - Yellow = "yellow", - Blue = "blue", - Green = "green", - Purple = "purple", - Orange = "orange", - Gray = "gray", - Amber = "amber" -} export enum NotificationLevel { Success = "success", Error = "error", @@ -4889,14 +3111,17 @@ export enum NotificationType { AlbumUpdate = "AlbumUpdate", Custom = "Custom" } -export enum UserStatus { - Active = "active", - Removing = "removing", - Deleted = "deleted" -} -export enum AssetOrder { - Asc = "asc", - Desc = "desc" +export enum UserAvatarColor { + Primary = "primary", + Pink = "pink", + Red = "red", + Yellow = "yellow", + Blue = "blue", + Green = "green", + Purple = "purple", + Orange = "orange", + Gray = "gray", + Amber = "amber" } export enum AssetVisibility { Archive = "archive", @@ -4904,33 +3129,14 @@ export enum AssetVisibility { Hidden = "hidden", Locked = "locked" } +export enum AssetOrder { + Asc = "asc", + Desc = "desc" +} export enum AlbumUserRole { Editor = "editor", Viewer = "viewer" } -export enum SourceType { - MachineLearning = "machine-learning", - Exif = "exif", - Manual = "manual" -} -export enum AssetTypeEnum { - Image = "IMAGE", - Video = "VIDEO", - Audio = "AUDIO", - Other = "OTHER" -} -export enum BulkIdErrorReason { - Duplicate = "duplicate", - NoPermission = "no_permission", - NotFound = "not_found", - Unknown = "unknown" -} -export enum Error { - Duplicate = "duplicate", - NoPermission = "no_permission", - NotFound = "not_found", - Unknown = "unknown" -} export enum Permission { All = "all", ActivityCreate = "activity.create", @@ -5064,28 +3270,15 @@ export enum Permission { AdminSessionRead = "adminSession.read", AdminAuthUnlinkAll = "adminAuth.unlinkAll" } -export enum AssetMetadataKey { - MobileApp = "mobile-app" -} -export enum AssetMediaStatus { - Created = "created", - Replaced = "replaced", - Duplicate = "duplicate" -} -export enum Action { - Accept = "accept", - Reject = "reject" -} -export enum Reason { - Duplicate = "duplicate", - UnsupportedFormat = "unsupported-format" -} export enum AssetJobName { RefreshFaces = "refresh-faces", RefreshMetadata = "refresh-metadata", RegenerateThumbnail = "regenerate-thumbnail", TranscodeVideo = "transcode-video" } +export enum AssetMetadataKey { + MobileApp = "mobile-app" +} export enum AssetMediaSize { Fullsize = "fullsize", Preview = "preview", @@ -5136,6 +3329,12 @@ export enum PartnerDirection { SharedBy = "shared-by", SharedWith = "shared-with" } +export enum AssetTypeEnum { + Image = "IMAGE", + Video = "VIDEO", + Audio = "AUDIO", + Other = "OTHER" +} export enum SearchSuggestionType { Country = "country", State = "state", @@ -5148,11 +3347,6 @@ export enum SharedLinkType { Album = "ALBUM", Individual = "INDIVIDUAL" } -export enum Error2 { - Duplicate = "duplicate", - NoPermission = "no_permission", - NotFound = "not_found" -} export enum SyncEntityType { AuthUserV1 = "AuthUserV1", UserV1 = "UserV1", @@ -5224,66 +3418,3 @@ export enum SyncRequestType { AssetFacesV1 = "AssetFacesV1", UserMetadataV1 = "UserMetadataV1" } -export enum TranscodeHWAccel { - Nvenc = "nvenc", - Qsv = "qsv", - Vaapi = "vaapi", - Rkmpp = "rkmpp", - Disabled = "disabled" -} -export enum AudioCodec { - Mp3 = "mp3", - Aac = "aac", - Libopus = "libopus", - PcmS16Le = "pcm_s16le" -} -export enum VideoContainer { - Mov = "mov", - Mp4 = "mp4", - Ogg = "ogg", - Webm = "webm" -} -export enum VideoCodec { - H264 = "h264", - Hevc = "hevc", - Vp9 = "vp9", - Av1 = "av1" -} -export enum CQMode { - Auto = "auto", - Cqp = "cqp", - Icq = "icq" -} -export enum ToneMapping { - Hable = "hable", - Mobius = "mobius", - Reinhard = "reinhard", - Disabled = "disabled" -} -export enum TranscodePolicy { - All = "all", - Optimal = "optimal", - Bitrate = "bitrate", - Required = "required", - Disabled = "disabled" -} -export enum Colorspace { - Srgb = "srgb", - P3 = "p3" -} -export enum ImageFormat { - Jpeg = "jpeg", - Webp = "webp" -} -export enum LogLevel { - Verbose = "verbose", - Debug = "debug", - Log = "log", - Warn = "warn", - Error = "error", - Fatal = "fatal" -} -export enum OAuthTokenEndpointAuthMethod { - ClientSecretPost = "client_secret_post", - ClientSecretBasic = "client_secret_basic" -} diff --git a/server/src/app.module.ts b/server/src/app.module.ts index 39a2786287..2f261b5782 100644 --- a/server/src/app.module.ts +++ b/server/src/app.module.ts @@ -17,11 +17,11 @@ import { GlobalExceptionFilter } from 'src/middleware/global-exception.filter'; import { LoggingInterceptor } from 'src/middleware/logging.interceptor'; import { MaintenanceAuthGuard } from 'src/middleware/maintenance-auth.guard'; import { repositories } from 'src/repositories'; +import { AppRepository } from 'src/repositories/app.repository'; import { ConfigRepository } from 'src/repositories/config.repository'; import { EventRepository } from 'src/repositories/event.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { MaintenanceWorkerRepository } from 'src/repositories/maintenance-worker.repository'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; import { SystemMetadataRepository } from 'src/repositories/system-metadata.repository'; import { teardownTelemetry, TelemetryRepository } from 'src/repositories/telemetry.repository'; import { WebsocketRepository } from 'src/repositories/websocket.repository'; @@ -104,7 +104,7 @@ export class ApiModule extends BaseModule {} ConfigRepository, LoggingRepository, SystemMetadataRepository, - MaintenanceRepository, + AppRepository, MaintenanceWorkerRepository, MaintenanceWorkerService, ...commonMiddleware, diff --git a/server/src/constants.ts b/server/src/constants.ts index ddf8bc91d1..e5bf352c56 100644 --- a/server/src/constants.ts +++ b/server/src/constants.ts @@ -150,6 +150,7 @@ export const endpointTags: Record = { 'Queues and background jobs are used for processing tasks asynchronously. Queues can be paused and resumed as needed.', [ApiTag.Libraries]: 'An external library is made up of input file paths or expressions that are scanned for asset files. Discovered files are automatically imported. Assets much be unique within a library, but can be duplicated across libraries. Each user has a default upload library, and can have one or more external libraries.', + [ApiTag.Maintenance]: 'Maintenance mode allows you to put Immich in a read-only state to perform various operations.', [ApiTag.Map]: 'Map endpoints include supplemental functionality related to geolocation, such as reverse geocoding and retrieving map markers for assets with geolocation data.', [ApiTag.Memories]: diff --git a/server/src/controllers/maintenance-worker.controller.ts b/server/src/controllers/maintenance-worker.controller.ts index 3e6490f40e..19b554a869 100644 --- a/server/src/controllers/maintenance-worker.controller.ts +++ b/server/src/controllers/maintenance-worker.controller.ts @@ -1,13 +1,12 @@ -import { BadRequestException, Body, Controller, Get, Post, Req, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { Body, Controller, Get, Post, Req, Res } from '@nestjs/common'; import { Request, Response } from 'express'; -import { MaintenanceAuthDto, MaintenanceLoginDto } from 'src/dtos/maintenance.dto'; +import { MaintenanceAuthDto, MaintenanceLoginDto, SetMaintenanceModeDto } from 'src/dtos/maintenance.dto'; import { ServerConfigDto } from 'src/dtos/server.dto'; import { ImmichCookie } from 'src/enum'; import { MaintenanceRoute } from 'src/middleware/maintenance-auth.guard'; import { MaintenanceWorkerService } from 'src/services/maintenance-worker.service'; +import { respondWithCookie } from 'src/utils/response'; -@ApiTags('Maintenance (admin)') @Controller() export class MaintenanceWorkerController { constructor(private service: MaintenanceWorkerService) {} @@ -21,23 +20,21 @@ export class MaintenanceWorkerController { async maintenanceLogin( @Req() request: Request, @Body() dto: MaintenanceLoginDto, - @Res({ passthrough: true }) response: Response, + @Res({ passthrough: true }) res: Response, ): Promise { const token = dto.token ?? request.cookies[ImmichCookie.MaintenanceToken]; const auth = await this.service.login(token); - response.cookie(ImmichCookie.MaintenanceToken, token); - return auth; + return respondWithCookie(res, auth, { + isSecure: true, + values: [{ key: ImmichCookie.MaintenanceToken, value: token }], + }); } - @Post('admin/maintenance/start') + @Post('admin/maintenance') @MaintenanceRoute() - startMaintenance(): void { - throw new BadRequestException('Already in maintenance mode'); - } - - @Post('admin/maintenance/end') - @MaintenanceRoute() - async endMaintenance(): Promise { - await this.service.endMaintenance(); + async setMaintenanceMode(@Body() dto: SetMaintenanceModeDto): Promise { + if (!dto.maintenanceMode) { + await this.service.endMaintenance(); + } } } diff --git a/server/src/controllers/maintenance.controller.ts b/server/src/controllers/maintenance.controller.ts index cae46b4a4a..e4a8a2cb86 100644 --- a/server/src/controllers/maintenance.controller.ts +++ b/server/src/controllers/maintenance.controller.ts @@ -1,32 +1,47 @@ import { BadRequestException, Body, Controller, Post, Res } from '@nestjs/common'; import { ApiTags } from '@nestjs/swagger'; import { Response } from 'express'; +import { Endpoint, HistoryBuilder } from 'src/decorators'; import { AuthDto } from 'src/dtos/auth.dto'; -import { MaintenanceAuthDto, MaintenanceLoginDto } from 'src/dtos/maintenance.dto'; -import { ImmichCookie, Permission } from 'src/enum'; +import { MaintenanceAuthDto, MaintenanceLoginDto, SetMaintenanceModeDto } from 'src/dtos/maintenance.dto'; +import { ApiTag, ImmichCookie, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { MaintenanceService } from 'src/services/maintenance.service'; +import { respondWithCookie } from 'src/utils/response'; -@ApiTags('Maintenance (admin)') +@ApiTags(ApiTag.Maintenance) @Controller('admin/maintenance') export class MaintenanceController { constructor(private service: MaintenanceService) {} @Post('login') + @Endpoint({ + summary: 'Log into maintenance mode', + description: 'Login with maintenance token or cookie to receive current information and perform further actions.', + history: new HistoryBuilder().added('v2.3.0').alpha('v2.3.0'), + }) maintenanceLogin(@Body() _dto: MaintenanceLoginDto): MaintenanceAuthDto { throw new BadRequestException('Not in maintenance mode'); } - @Post('start') + @Post() + @Endpoint({ + summary: 'Set maintenance mode', + description: 'Put Immich into or take it out of maintenance mode', + history: new HistoryBuilder().added('v2.3.0').alpha('v2.3.0'), + }) @Authenticated({ permission: Permission.Maintenance, admin: true }) - async startMaintenance(@Auth() auth: AuthDto, @Res({ passthrough: true }) response: Response): Promise { - const { jwt } = await this.service.startMaintenance(auth.user.name); - response.cookie(ImmichCookie.MaintenanceToken, jwt); - } - - @Post('end') - @Authenticated({ permission: Permission.Maintenance, admin: true }) - endMaintenance(): void { - throw new BadRequestException('Not in maintenance mode'); + async setMaintenanceMode( + @Auth() auth: AuthDto, + @Body() dto: SetMaintenanceModeDto, + @Res({ passthrough: true }) res: Response, + ): Promise { + if (dto.maintenanceMode) { + const { jwt } = await this.service.startMaintenance(auth.user.name); + return respondWithCookie(res, undefined, { + isSecure: true, + values: [{ key: ImmichCookie.MaintenanceToken, value: jwt }], + }); + } } } diff --git a/server/src/dtos/maintenance.dto.ts b/server/src/dtos/maintenance.dto.ts index 5887f6f7b4..ab8a172a24 100644 --- a/server/src/dtos/maintenance.dto.ts +++ b/server/src/dtos/maintenance.dto.ts @@ -1,4 +1,9 @@ -import { ValidateString } from 'src/validation'; +import { ValidateBoolean, ValidateString } from 'src/validation'; + +export class SetMaintenanceModeDto { + @ValidateBoolean() + maintenanceMode!: boolean; +} export class MaintenanceLoginDto { @ValidateString({ optional: true }) diff --git a/server/src/enum.ts b/server/src/enum.ts index fca8d8fee3..cfd5d6bfac 100644 --- a/server/src/enum.ts +++ b/server/src/enum.ts @@ -796,6 +796,7 @@ export enum ApiTag { Faces = 'Faces', Jobs = 'Jobs', Libraries = 'Libraries', + Maintenance = 'Maintenance (admin)', Map = 'Map', Memories = 'Memories', Notifications = 'Notifications', diff --git a/server/src/main.ts b/server/src/main.ts index ba5db78d56..b45d4a0630 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -18,17 +18,13 @@ class Workers { /** * Currently running workers */ - workers: Partial>; + workers: Partial void }>> = {}; /** * Fail-safe in case anything dies during restart */ restarting = false; - constructor() { - this.workers = {}; - } - /** * Boot all enabled workers */ @@ -80,17 +76,27 @@ class Workers { const basePath = dirname(__filename); const workerFile = join(basePath, 'workers', `${name}.js`); - const worker: Worker | ChildProcess = - name === ImmichWorker.Api - ? fork(workerFile, [], { - execArgv: process.execArgv.map((arg) => (arg.startsWith('--inspect') ? '--inspect=0.0.0.0:9231' : arg)), - }) - : new Worker(workerFile); + let anyWorker: Worker | ChildProcess; + let kill: () => void; - worker.on('error', (error) => this.onError(name, error)); - worker.on('exit', (exitCode) => this.onExit(name, exitCode)); + if (name === ImmichWorker.Api) { + const worker = fork(workerFile, [], { + execArgv: process.execArgv.map((arg) => (arg.startsWith('--inspect') ? '--inspect=0.0.0.0:9231' : arg)), + }); - this.workers[name] = worker; + kill = () => worker.kill(); + anyWorker = worker; + } else { + const worker = new Worker(workerFile); + + kill = () => worker.terminate(); + anyWorker = worker; + } + + anyWorker.on('error', (error) => this.onError(name, error)); + anyWorker.on('exit', (exitCode) => this.onExit(name, exitCode)); + + this.workers[name] = { kill }; } onError(name: ImmichWorker, error: Error) { diff --git a/server/src/middleware/maintenance-auth.guard.ts b/server/src/middleware/maintenance-auth.guard.ts index 5315cadaeb..f1ddba8e21 100644 --- a/server/src/middleware/maintenance-auth.guard.ts +++ b/server/src/middleware/maintenance-auth.guard.ts @@ -51,7 +51,7 @@ export class MaintenanceAuthGuard implements CanActivate { } const request = context.switchToHttp().getRequest(); - request['auth'] = await this.service.authenticate(request.headers); + request.auth = await this.service.authenticate(request.headers); return true; } diff --git a/server/src/repositories/maintenance.repository.ts b/server/src/repositories/app.repository.ts similarity index 90% rename from server/src/repositories/maintenance.repository.ts rename to server/src/repositories/app.repository.ts index 74c7883682..e6181ef7f3 100644 --- a/server/src/repositories/maintenance.repository.ts +++ b/server/src/repositories/app.repository.ts @@ -2,11 +2,9 @@ import { Injectable } from '@nestjs/common'; import { ExitCode } from 'src/enum'; @Injectable() -export class MaintenanceRepository { +export class AppRepository { private closeFn?: () => Promise; - constructor() {} - exitApp() { /* eslint-disable unicorn/no-process-exit */ void this.closeFn?.().finally(() => process.exit(ExitCode.AppRestart)); diff --git a/server/src/repositories/index.ts b/server/src/repositories/index.ts index 6bc75cddca..c94b31d59c 100644 --- a/server/src/repositories/index.ts +++ b/server/src/repositories/index.ts @@ -3,6 +3,7 @@ import { ActivityRepository } from 'src/repositories/activity.repository'; import { AlbumUserRepository } from 'src/repositories/album-user.repository'; import { AlbumRepository } from 'src/repositories/album.repository'; import { ApiKeyRepository } from 'src/repositories/api-key.repository'; +import { AppRepository } from 'src/repositories/app.repository'; import { AssetJobRepository } from 'src/repositories/asset-job.repository'; import { AssetRepository } from 'src/repositories/asset.repository'; import { AuditRepository } from 'src/repositories/audit.repository'; @@ -18,7 +19,6 @@ import { JobRepository } from 'src/repositories/job.repository'; import { LibraryRepository } from 'src/repositories/library.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { MachineLearningRepository } from 'src/repositories/machine-learning.repository'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; import { MapRepository } from 'src/repositories/map.repository'; import { MediaRepository } from 'src/repositories/media.repository'; import { MemoryRepository } from 'src/repositories/memory.repository'; @@ -55,6 +55,7 @@ export const repositories = [ AlbumUserRepository, AuditRepository, ApiKeyRepository, + AppRepository, AssetRepository, AssetJobRepository, ConfigRepository, @@ -69,7 +70,6 @@ export const repositories = [ LibraryRepository, LoggingRepository, MachineLearningRepository, - MaintenanceRepository, MapRepository, MediaRepository, MemoryRepository, diff --git a/server/src/repositories/maintenance-worker.repository.ts b/server/src/repositories/maintenance-worker.repository.ts index 85bbbf2351..c2510b33cb 100644 --- a/server/src/repositories/maintenance-worker.repository.ts +++ b/server/src/repositories/maintenance-worker.repository.ts @@ -7,9 +7,9 @@ import { WebSocketServer, } from '@nestjs/websockets'; import { Server, Socket } from 'socket.io'; +import { AppRepository } from 'src/repositories/app.repository'; import { AppRestartEvent } from 'src/repositories/event.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; export const serverEvents = ['AppRestart'] as const; export type ServerEvents = (typeof serverEvents)[number]; @@ -30,7 +30,7 @@ export class MaintenanceWorkerRepository implements OnGatewayConnection, OnGatew constructor( private logger: LoggingRepository, - private maintenanceRepository: MaintenanceRepository, + private maintenanceRepository: AppRepository, ) { this.logger.setContext(MaintenanceWorkerRepository.name); } diff --git a/server/src/services/base.service.ts b/server/src/services/base.service.ts index 2ca52a3de9..fd1f1bf486 100644 --- a/server/src/services/base.service.ts +++ b/server/src/services/base.service.ts @@ -10,6 +10,7 @@ import { ActivityRepository } from 'src/repositories/activity.repository'; import { AlbumUserRepository } from 'src/repositories/album-user.repository'; import { AlbumRepository } from 'src/repositories/album.repository'; import { ApiKeyRepository } from 'src/repositories/api-key.repository'; +import { AppRepository } from 'src/repositories/app.repository'; import { AssetJobRepository } from 'src/repositories/asset-job.repository'; import { AssetRepository } from 'src/repositories/asset.repository'; import { AuditRepository } from 'src/repositories/audit.repository'; @@ -25,7 +26,6 @@ import { JobRepository } from 'src/repositories/job.repository'; import { LibraryRepository } from 'src/repositories/library.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { MachineLearningRepository } from 'src/repositories/machine-learning.repository'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; import { MapRepository } from 'src/repositories/map.repository'; import { MediaRepository } from 'src/repositories/media.repository'; import { MemoryRepository } from 'src/repositories/memory.repository'; @@ -65,6 +65,7 @@ export const BASE_SERVICE_DEPENDENCIES = [ AlbumRepository, AlbumUserRepository, ApiKeyRepository, + AppRepository, AssetRepository, AssetJobRepository, AuditRepository, @@ -79,7 +80,6 @@ export const BASE_SERVICE_DEPENDENCIES = [ JobRepository, LibraryRepository, MachineLearningRepository, - MaintenanceRepository, MapRepository, MediaRepository, MemoryRepository, @@ -120,6 +120,7 @@ export class BaseService { protected albumRepository: AlbumRepository, protected albumUserRepository: AlbumUserRepository, protected apiKeyRepository: ApiKeyRepository, + protected appRepository: AppRepository, protected assetRepository: AssetRepository, protected assetJobRepository: AssetJobRepository, protected auditRepository: AuditRepository, @@ -134,7 +135,6 @@ export class BaseService { protected jobRepository: JobRepository, protected libraryRepository: LibraryRepository, protected machineLearningRepository: MachineLearningRepository, - protected maintenanceRepository: MaintenanceRepository, protected mapRepository: MapRepository, protected mediaRepository: MediaRepository, protected memoryRepository: MemoryRepository, diff --git a/server/src/services/maintenance.service.ts b/server/src/services/maintenance.service.ts index 79c1ac8be4..e6808300bc 100644 --- a/server/src/services/maintenance.service.ts +++ b/server/src/services/maintenance.service.ts @@ -1,4 +1,4 @@ -import { BadRequestException, Injectable } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { OnEvent } from 'src/decorators'; import { MaintenanceAuthDto } from 'src/dtos/maintenance.dto'; import { SystemMetadataKey } from 'src/enum'; @@ -19,11 +19,6 @@ export class MaintenanceService extends BaseService { } async startMaintenance(username: string): Promise<{ jwt: string }> { - const { isMaintenanceMode } = await this.getMaintenanceMode(); - if (isMaintenanceMode) { - throw new BadRequestException('Already in maintenance mode'); - } - const secret = generateMaintenanceSecret(); await this.systemMetadataRepository.set(SystemMetadataKey.MaintenanceMode, { isMaintenanceMode: true, secret }); await this.eventRepository.emit('AppRestart', { isMaintenanceMode: true }); @@ -37,7 +32,7 @@ export class MaintenanceService extends BaseService { @OnEvent({ name: 'AppRestart', server: true }) onRestart(): void { - this.maintenanceRepository.exitApp(); + this.appRepository.exitApp(); } async createLoginUrl(auth: MaintenanceAuthDto, secret?: string): Promise { diff --git a/server/src/workers/api.ts b/server/src/workers/api.ts index 330005e2b2..99c08c0fa7 100644 --- a/server/src/workers/api.ts +++ b/server/src/workers/api.ts @@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core'; import { NestExpressApplication } from '@nestjs/platform-express'; import { configureExpress, configureTelemetry } from 'src/app.common'; import { ApiModule } from 'src/app.module'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; +import { AppRepository } from 'src/repositories/app.repository'; import { ApiService } from 'src/services/api.service'; import { isStartUpError } from 'src/utils/misc'; @@ -12,7 +12,7 @@ async function bootstrap() { configureTelemetry(); const app = await NestFactory.create(ApiModule, { bufferLogs: true }); - app.get(MaintenanceRepository).setCloseFn(() => app.close()); + app.get(AppRepository).setCloseFn(() => app.close()); void configureExpress(app, { ssr: ApiService, diff --git a/server/src/workers/maintenance.ts b/server/src/workers/maintenance.ts index 21707e992b..1a66aada23 100644 --- a/server/src/workers/maintenance.ts +++ b/server/src/workers/maintenance.ts @@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core'; import { NestExpressApplication } from '@nestjs/platform-express'; import { configureExpress, configureTelemetry } from 'src/app.common'; import { MaintenanceModule } from 'src/app.module'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; +import { AppRepository } from 'src/repositories/app.repository'; import { MaintenanceWorkerService } from 'src/services/maintenance-worker.service'; import { isStartUpError } from 'src/utils/misc'; @@ -11,7 +11,7 @@ async function bootstrap() { configureTelemetry(); const app = await NestFactory.create(MaintenanceModule, { bufferLogs: true }); - app.get(MaintenanceRepository).setCloseFn(() => app.close()); + app.get(AppRepository).setCloseFn(() => app.close()); void configureExpress(app, { permitSwaggerWrite: false, ssr: MaintenanceWorkerService, diff --git a/server/src/workers/microservices.ts b/server/src/workers/microservices.ts index 0dc640a2c4..8f06b4b0b1 100644 --- a/server/src/workers/microservices.ts +++ b/server/src/workers/microservices.ts @@ -3,9 +3,9 @@ import { isMainThread } from 'node:worker_threads'; import { MicroservicesModule } from 'src/app.module'; import { serverVersion } from 'src/constants'; import { WebSocketAdapter } from 'src/middleware/websocket.adapter'; +import { AppRepository } from 'src/repositories/app.repository'; import { ConfigRepository } from 'src/repositories/config.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; import { bootstrapTelemetry } from 'src/repositories/telemetry.repository'; import { isStartUpError } from 'src/utils/misc'; @@ -18,7 +18,7 @@ export async function bootstrap() { const app = await NestFactory.create(MicroservicesModule, { bufferLogs: true }); const logger = await app.resolve(LoggingRepository); const configRepository = app.get(ConfigRepository); - app.get(MaintenanceRepository).setCloseFn(() => app.close()); + app.get(AppRepository).setCloseFn(() => app.close()); const { environment, host } = configRepository.getEnv(); diff --git a/server/test/utils.ts b/server/test/utils.ts index c94e9021f6..34a0bedaa6 100644 --- a/server/test/utils.ts +++ b/server/test/utils.ts @@ -19,6 +19,7 @@ import { ActivityRepository } from 'src/repositories/activity.repository'; import { AlbumUserRepository } from 'src/repositories/album-user.repository'; import { AlbumRepository } from 'src/repositories/album.repository'; import { ApiKeyRepository } from 'src/repositories/api-key.repository'; +import { AppRepository } from 'src/repositories/app.repository'; import { AssetJobRepository } from 'src/repositories/asset-job.repository'; import { AssetRepository } from 'src/repositories/asset.repository'; import { AuditRepository } from 'src/repositories/audit.repository'; @@ -34,7 +35,6 @@ import { JobRepository } from 'src/repositories/job.repository'; import { LibraryRepository } from 'src/repositories/library.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { MachineLearningRepository } from 'src/repositories/machine-learning.repository'; -import { MaintenanceRepository } from 'src/repositories/maintenance.repository'; import { MapRepository } from 'src/repositories/map.repository'; import { MediaRepository } from 'src/repositories/media.repository'; import { MemoryRepository } from 'src/repositories/memory.repository'; @@ -211,6 +211,7 @@ export type ServiceOverrides = { album: AlbumRepository; albumUser: AlbumUserRepository; apiKey: ApiKeyRepository; + app: AppRepository; audit: AuditRepository; asset: AssetRepository; assetJob: AssetJobRepository; @@ -226,7 +227,6 @@ export type ServiceOverrides = { library: LibraryRepository; logger: LoggingRepository; machineLearning: MachineLearningRepository; - maintenance: MaintenanceRepository; map: MapRepository; media: MediaRepository; memory: MemoryRepository; @@ -286,6 +286,7 @@ export const getMocks = () => { albumUser: automock(AlbumUserRepository), asset: newAssetRepositoryMock(), assetJob: automock(AssetJobRepository), + app: automock(AppRepository, { strict: false }), config: newConfigRepositoryMock(), database: newDatabaseRepositoryMock(), downloadRepository: automock(DownloadRepository, { strict: false }), @@ -297,7 +298,6 @@ export const getMocks = () => { apiKey: automock(ApiKeyRepository), library: automock(LibraryRepository, { strict: false }), machineLearning: automock(MachineLearningRepository, { args: [loggerMock], strict: false }), - maintenance: automock(MaintenanceRepository, { strict: false }), map: automock(MapRepository, { args: [undefined, undefined, { setContext: () => {} }] }), media: newMediaRepositoryMock(), memory: automock(MemoryRepository), @@ -348,6 +348,7 @@ export const newTestService = ( overrides.album || (mocks.album as As), overrides.albumUser || (mocks.albumUser as As), overrides.apiKey || (mocks.apiKey as As), + overrides.app || (mocks.app as As), overrides.asset || (mocks.asset as As), overrides.assetJob || (mocks.assetJob as As), overrides.audit || (mocks.audit as As), @@ -362,7 +363,6 @@ export const newTestService = ( overrides.job || (mocks.job as As), overrides.library || (mocks.library as As), overrides.machineLearning || (mocks.machineLearning as As), - overrides.maintenance || (mocks.maintenance as As), overrides.map || (mocks.map as As), overrides.media || (mocks.media as As), overrides.memory || (mocks.memory as As), diff --git a/web/src/lib/components/admin-settings/MaintenanceSettings.svelte b/web/src/lib/components/admin-settings/MaintenanceSettings.svelte index b319be8fe8..a5181c550b 100644 --- a/web/src/lib/components/admin-settings/MaintenanceSettings.svelte +++ b/web/src/lib/components/admin-settings/MaintenanceSettings.svelte @@ -1,6 +1,6 @@