diff --git a/mobile/openapi/lib/api/activities_api.dart b/mobile/openapi/lib/api/activities_api.dart index 5c83ba7db..67015499f 100644 Binary files a/mobile/openapi/lib/api/activities_api.dart and b/mobile/openapi/lib/api/activities_api.dart differ diff --git a/mobile/openapi/lib/api/albums_api.dart b/mobile/openapi/lib/api/albums_api.dart index fa7a562ad..10674b894 100644 Binary files a/mobile/openapi/lib/api/albums_api.dart and b/mobile/openapi/lib/api/albums_api.dart differ diff --git a/mobile/openapi/lib/api/api_keys_api.dart b/mobile/openapi/lib/api/api_keys_api.dart index cf54ac5c0..e86c63bc6 100644 Binary files a/mobile/openapi/lib/api/api_keys_api.dart and b/mobile/openapi/lib/api/api_keys_api.dart differ diff --git a/mobile/openapi/lib/api/assets_api.dart b/mobile/openapi/lib/api/assets_api.dart index 3cb62785b..c0de1a080 100644 Binary files a/mobile/openapi/lib/api/assets_api.dart and b/mobile/openapi/lib/api/assets_api.dart differ diff --git a/mobile/openapi/lib/api/authentication_api.dart b/mobile/openapi/lib/api/authentication_api.dart index 5482a9fc5..a74af33a4 100644 Binary files a/mobile/openapi/lib/api/authentication_api.dart and b/mobile/openapi/lib/api/authentication_api.dart differ diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart index 7aa9662c2..f9a496b99 100644 Binary files a/mobile/openapi/lib/api/deprecated_api.dart and b/mobile/openapi/lib/api/deprecated_api.dart differ diff --git a/mobile/openapi/lib/api/download_api.dart b/mobile/openapi/lib/api/download_api.dart index 675996f93..62c97bfc9 100644 Binary files a/mobile/openapi/lib/api/download_api.dart and b/mobile/openapi/lib/api/download_api.dart differ diff --git a/mobile/openapi/lib/api/duplicates_api.dart b/mobile/openapi/lib/api/duplicates_api.dart index d8b45d21a..9df6e4658 100644 Binary files a/mobile/openapi/lib/api/duplicates_api.dart and b/mobile/openapi/lib/api/duplicates_api.dart differ diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dart index 44e3d53f8..2f8e6be60 100644 Binary files a/mobile/openapi/lib/api/faces_api.dart and b/mobile/openapi/lib/api/faces_api.dart differ diff --git a/mobile/openapi/lib/api/jobs_api.dart b/mobile/openapi/lib/api/jobs_api.dart index 182bb14e4..4c935828a 100644 Binary files a/mobile/openapi/lib/api/jobs_api.dart and b/mobile/openapi/lib/api/jobs_api.dart differ diff --git a/mobile/openapi/lib/api/libraries_api.dart b/mobile/openapi/lib/api/libraries_api.dart index 86acce76b..9258f8e3e 100644 Binary files a/mobile/openapi/lib/api/libraries_api.dart and b/mobile/openapi/lib/api/libraries_api.dart differ diff --git a/mobile/openapi/lib/api/map_api.dart b/mobile/openapi/lib/api/map_api.dart index ffe72df45..da4f3dffc 100644 Binary files a/mobile/openapi/lib/api/map_api.dart and b/mobile/openapi/lib/api/map_api.dart differ diff --git a/mobile/openapi/lib/api/memories_api.dart b/mobile/openapi/lib/api/memories_api.dart index 9b62cce9c..f9280101e 100644 Binary files a/mobile/openapi/lib/api/memories_api.dart and b/mobile/openapi/lib/api/memories_api.dart differ diff --git a/mobile/openapi/lib/api/notifications_api.dart b/mobile/openapi/lib/api/notifications_api.dart index 501cc70a2..1d276efaa 100644 Binary files a/mobile/openapi/lib/api/notifications_api.dart and b/mobile/openapi/lib/api/notifications_api.dart differ diff --git a/mobile/openapi/lib/api/partners_api.dart b/mobile/openapi/lib/api/partners_api.dart index 9f10ea4d1..eb5d5f580 100644 Binary files a/mobile/openapi/lib/api/partners_api.dart and b/mobile/openapi/lib/api/partners_api.dart differ diff --git a/mobile/openapi/lib/api/people_api.dart b/mobile/openapi/lib/api/people_api.dart index 35dbac4e9..68c16785c 100644 Binary files a/mobile/openapi/lib/api/people_api.dart and b/mobile/openapi/lib/api/people_api.dart differ diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart index 1b58702c4..4d9e1172b 100644 Binary files a/mobile/openapi/lib/api/search_api.dart and b/mobile/openapi/lib/api/search_api.dart differ diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart index 7abdabcd3..9e250b83b 100644 Binary files a/mobile/openapi/lib/api/server_api.dart and b/mobile/openapi/lib/api/server_api.dart differ diff --git a/mobile/openapi/lib/api/sessions_api.dart b/mobile/openapi/lib/api/sessions_api.dart index d54f52064..63528d17a 100644 Binary files a/mobile/openapi/lib/api/sessions_api.dart and b/mobile/openapi/lib/api/sessions_api.dart differ diff --git a/mobile/openapi/lib/api/shared_links_api.dart b/mobile/openapi/lib/api/shared_links_api.dart index dd372b962..e32c56675 100644 Binary files a/mobile/openapi/lib/api/shared_links_api.dart and b/mobile/openapi/lib/api/shared_links_api.dart differ diff --git a/mobile/openapi/lib/api/stacks_api.dart b/mobile/openapi/lib/api/stacks_api.dart index 6d6c4506b..0f76f3396 100644 Binary files a/mobile/openapi/lib/api/stacks_api.dart and b/mobile/openapi/lib/api/stacks_api.dart differ diff --git a/mobile/openapi/lib/api/sync_api.dart b/mobile/openapi/lib/api/sync_api.dart index fe2876ddd..9e594d6ac 100644 Binary files a/mobile/openapi/lib/api/sync_api.dart and b/mobile/openapi/lib/api/sync_api.dart differ diff --git a/mobile/openapi/lib/api/system_config_api.dart b/mobile/openapi/lib/api/system_config_api.dart index a03b9d3e7..2ab3879b8 100644 Binary files a/mobile/openapi/lib/api/system_config_api.dart and b/mobile/openapi/lib/api/system_config_api.dart differ diff --git a/mobile/openapi/lib/api/system_metadata_api.dart b/mobile/openapi/lib/api/system_metadata_api.dart index 3fcceb8e4..f6b9bad1d 100644 Binary files a/mobile/openapi/lib/api/system_metadata_api.dart and b/mobile/openapi/lib/api/system_metadata_api.dart differ diff --git a/mobile/openapi/lib/api/tags_api.dart b/mobile/openapi/lib/api/tags_api.dart index f6cfc8720..a0cdb91ac 100644 Binary files a/mobile/openapi/lib/api/tags_api.dart and b/mobile/openapi/lib/api/tags_api.dart differ diff --git a/mobile/openapi/lib/api/timeline_api.dart b/mobile/openapi/lib/api/timeline_api.dart index 2d3ced610..2d142e3d6 100644 Binary files a/mobile/openapi/lib/api/timeline_api.dart and b/mobile/openapi/lib/api/timeline_api.dart differ diff --git a/mobile/openapi/lib/api/trash_api.dart b/mobile/openapi/lib/api/trash_api.dart index 982dbcbed..480d19960 100644 Binary files a/mobile/openapi/lib/api/trash_api.dart and b/mobile/openapi/lib/api/trash_api.dart differ diff --git a/mobile/openapi/lib/api/users_admin_api.dart b/mobile/openapi/lib/api/users_admin_api.dart index 58263504c..e4fc1673e 100644 Binary files a/mobile/openapi/lib/api/users_admin_api.dart and b/mobile/openapi/lib/api/users_admin_api.dart differ diff --git a/mobile/openapi/lib/api/users_api.dart b/mobile/openapi/lib/api/users_api.dart index cd31617e7..c8891ba0c 100644 Binary files a/mobile/openapi/lib/api/users_api.dart and b/mobile/openapi/lib/api/users_api.dart differ diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 8c491ca47..9a1e6a693 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -78,7 +78,8 @@ "tags": [ "Activities" ], - "x-immich-permission": "activity.read" + "x-immich-permission": "activity.read", + "description": "This endpoint requires the `activity.read` permission." }, "post": { "operationId": "createActivity", @@ -119,7 +120,8 @@ "tags": [ "Activities" ], - "x-immich-permission": "activity.create" + "x-immich-permission": "activity.create", + "description": "This endpoint requires the `activity.create` permission." } }, "/activities/statistics": { @@ -171,7 +173,8 @@ "tags": [ "Activities" ], - "x-immich-permission": "activity.statistics" + "x-immich-permission": "activity.statistics", + "description": "This endpoint requires the `activity.statistics` permission." } }, "/activities/{id}": { @@ -207,7 +210,8 @@ "tags": [ "Activities" ], - "x-immich-permission": "activity.delete" + "x-immich-permission": "activity.delete", + "description": "This endpoint requires the `activity.delete` permission." } }, "/admin/notifications": { @@ -249,7 +253,8 @@ ], "tags": [ "Notifications (Admin)" - ] + ], + "x-immich-admin-only": true } }, "/admin/notifications/templates/{name}": { @@ -300,7 +305,8 @@ ], "tags": [ "Notifications (Admin)" - ] + ], + "x-immich-admin-only": true } }, "/admin/notifications/test-email": { @@ -342,7 +348,8 @@ ], "tags": [ "Notifications (Admin)" - ] + ], + "x-immich-admin-only": true } }, "/admin/users": { @@ -396,7 +403,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.read" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.read", + "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." }, "post": { "operationId": "createUserAdmin", @@ -437,7 +446,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.create" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.create", + "description": "This endpoint is an admin-only route, and requires the `adminUser.create` permission." } }, "/admin/users/{id}": { @@ -490,7 +501,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.delete" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.delete", + "description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission." }, "get": { "operationId": "getUserAdmin", @@ -531,7 +544,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.read" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.read", + "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." }, "put": { "operationId": "updateUserAdmin", @@ -582,7 +597,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.update" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.update", + "description": "This endpoint is an admin-only route, and requires the `adminUser.update` permission." } }, "/admin/users/{id}/preferences": { @@ -625,7 +642,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.read" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.read", + "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." }, "put": { "operationId": "updateUserPreferencesAdmin", @@ -676,7 +695,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.update" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.update", + "description": "This endpoint is an admin-only route, and requires the `adminUser.update` permission." } }, "/admin/users/{id}/restore": { @@ -719,7 +740,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.delete" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.delete", + "description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission." } }, "/admin/users/{id}/statistics": { @@ -786,7 +809,9 @@ "tags": [ "Users (admin)" ], - "x-immich-permission": "adminUser.read" + "x-immich-admin-only": true, + "x-immich-permission": "adminUser.read", + "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." } }, "/albums": { @@ -841,7 +866,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "album.read" + "x-immich-permission": "album.read", + "description": "This endpoint requires the `album.read` permission." }, "post": { "operationId": "createAlbum", @@ -882,7 +908,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "album.create" + "x-immich-permission": "album.create", + "description": "This endpoint requires the `album.create` permission." } }, "/albums/statistics": { @@ -915,7 +942,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "album.statistics" + "x-immich-permission": "album.statistics", + "description": "This endpoint requires the `album.statistics` permission." } }, "/albums/{id}": { @@ -951,7 +979,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "album.delete" + "x-immich-permission": "album.delete", + "description": "This endpoint requires the `album.delete` permission." }, "get": { "operationId": "getAlbumInfo", @@ -1016,7 +1045,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "album.read" + "x-immich-permission": "album.read", + "description": "This endpoint requires the `album.read` permission." }, "patch": { "operationId": "updateAlbumInfo", @@ -1067,7 +1097,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "album.update" + "x-immich-permission": "album.update", + "description": "This endpoint requires the `album.update` permission." } }, "/albums/{id}/assets": { @@ -1123,7 +1154,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.delete" + "x-immich-permission": "albumAsset.delete", + "description": "This endpoint requires the `albumAsset.delete` permission." }, "put": { "operationId": "addAssetsToAlbum", @@ -1193,7 +1225,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.create" + "x-immich-permission": "albumAsset.create", + "description": "This endpoint requires the `albumAsset.create` permission." } }, "/albums/{id}/user/{userId}": { @@ -1237,7 +1270,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "albumUser.delete" + "x-immich-permission": "albumUser.delete", + "description": "This endpoint requires the `albumUser.delete` permission." }, "put": { "operationId": "updateAlbumUser", @@ -1289,7 +1323,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "albumUser.update" + "x-immich-permission": "albumUser.update", + "description": "This endpoint requires the `albumUser.update` permission." } }, "/albums/{id}/users": { @@ -1342,7 +1377,8 @@ "tags": [ "Albums" ], - "x-immich-permission": "albumUser.create" + "x-immich-permission": "albumUser.create", + "description": "This endpoint requires the `albumUser.create` permission." } }, "/api-keys": { @@ -1378,7 +1414,8 @@ "tags": [ "API Keys" ], - "x-immich-permission": "apiKey.read" + "x-immich-permission": "apiKey.read", + "description": "This endpoint requires the `apiKey.read` permission." }, "post": { "operationId": "createApiKey", @@ -1419,7 +1456,8 @@ "tags": [ "API Keys" ], - "x-immich-permission": "apiKey.create" + "x-immich-permission": "apiKey.create", + "description": "This endpoint requires the `apiKey.create` permission." } }, "/api-keys/{id}": { @@ -1455,7 +1493,8 @@ "tags": [ "API Keys" ], - "x-immich-permission": "apiKey.delete" + "x-immich-permission": "apiKey.delete", + "description": "This endpoint requires the `apiKey.delete` permission." }, "get": { "operationId": "getApiKey", @@ -1496,7 +1535,8 @@ "tags": [ "API Keys" ], - "x-immich-permission": "apiKey.read" + "x-immich-permission": "apiKey.read", + "description": "This endpoint requires the `apiKey.read` permission." }, "put": { "operationId": "updateApiKey", @@ -1547,7 +1587,8 @@ "tags": [ "API Keys" ], - "x-immich-permission": "apiKey.update" + "x-immich-permission": "apiKey.update", + "description": "This endpoint requires the `apiKey.update` permission." } }, "/assets": { @@ -1583,7 +1624,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.delete" + "x-immich-permission": "asset.delete", + "description": "This endpoint requires the `asset.delete` permission." }, "post": { "operationId": "uploadAsset", @@ -1651,7 +1693,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.upload" + "x-immich-permission": "asset.upload", + "description": "This endpoint requires the `asset.upload` permission." }, "put": { "operationId": "updateAssets", @@ -1685,7 +1728,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.update" + "x-immich-permission": "asset.update", + "description": "This endpoint requires the `asset.update` permission." } }, "/assets/bulk-upload-check": { @@ -1860,7 +1904,7 @@ "/assets/random": { "get": { "deprecated": true, - "description": "This property was deprecated in v1.116.0", + "description": "This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission.", "operationId": "getRandom", "parameters": [ { @@ -1964,7 +2008,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.statistics" + "x-immich-permission": "asset.statistics", + "description": "This endpoint requires the `asset.statistics` permission." } }, "/assets/{id}": { @@ -2023,7 +2068,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." }, "put": { "operationId": "updateAsset", @@ -2074,7 +2120,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.update" + "x-immich-permission": "asset.update", + "description": "This endpoint requires the `asset.update` permission." } }, "/assets/{id}/original": { @@ -2134,10 +2181,11 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.download" + "x-immich-permission": "asset.download", + "description": "This endpoint requires the `asset.download` permission." }, "put": { - "description": "Replace the asset with new file, without changing its id", + "description": "Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission.", "operationId": "replaceAsset", "parameters": [ { @@ -2274,7 +2322,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.view" + "x-immich-permission": "asset.view", + "description": "This endpoint requires the `asset.view` permission." } }, "/assets/{id}/video/playback": { @@ -2334,7 +2383,8 @@ "tags": [ "Assets" ], - "x-immich-permission": "asset.view" + "x-immich-permission": "asset.view", + "description": "This endpoint requires the `asset.view` permission." } }, "/auth/admin-sign-up": { @@ -2408,7 +2458,8 @@ "tags": [ "Authentication" ], - "x-immich-permission": "auth.changePassword" + "x-immich-permission": "auth.changePassword", + "description": "This endpoint requires the `auth.changePassword` permission." } }, "/auth/login": { @@ -2507,7 +2558,8 @@ "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.delete" + "x-immich-permission": "pinCode.delete", + "description": "This endpoint requires the `pinCode.delete` permission." }, "post": { "operationId": "setupPinCode", @@ -2541,7 +2593,8 @@ "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.create" + "x-immich-permission": "pinCode.create", + "description": "This endpoint requires the `pinCode.create` permission." }, "put": { "operationId": "changePinCode", @@ -2575,7 +2628,8 @@ "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.update" + "x-immich-permission": "pinCode.update", + "description": "This endpoint requires the `pinCode.update` permission." } }, "/auth/session/lock": { @@ -2760,7 +2814,8 @@ "tags": [ "Download" ], - "x-immich-permission": "asset.download" + "x-immich-permission": "asset.download", + "description": "This endpoint requires the `asset.download` permission." } }, "/download/info": { @@ -2820,7 +2875,8 @@ "tags": [ "Download" ], - "x-immich-permission": "asset.download" + "x-immich-permission": "asset.download", + "description": "This endpoint requires the `asset.download` permission." } }, "/duplicates": { @@ -2856,7 +2912,8 @@ "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.delete" + "x-immich-permission": "duplicate.delete", + "description": "This endpoint requires the `duplicate.delete` permission." }, "get": { "operationId": "getAssetDuplicates", @@ -2890,7 +2947,8 @@ "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.read" + "x-immich-permission": "duplicate.read", + "description": "This endpoint requires the `duplicate.read` permission." } }, "/duplicates/{id}": { @@ -2926,7 +2984,8 @@ "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.delete" + "x-immich-permission": "duplicate.delete", + "description": "This endpoint requires the `duplicate.delete` permission." } }, "/faces": { @@ -2972,7 +3031,8 @@ "tags": [ "Faces" ], - "x-immich-permission": "face.read" + "x-immich-permission": "face.read", + "description": "This endpoint requires the `face.read` permission." }, "post": { "operationId": "createFace", @@ -3006,7 +3066,8 @@ "tags": [ "Faces" ], - "x-immich-permission": "face.create" + "x-immich-permission": "face.create", + "description": "This endpoint requires the `face.create` permission." } }, "/faces/{id}": { @@ -3052,7 +3113,8 @@ "tags": [ "Faces" ], - "x-immich-permission": "face.delete" + "x-immich-permission": "face.delete", + "description": "This endpoint requires the `face.delete` permission." }, "put": { "operationId": "reassignFacesById", @@ -3103,7 +3165,8 @@ "tags": [ "Faces" ], - "x-immich-permission": "face.update" + "x-immich-permission": "face.update", + "description": "This endpoint requires the `face.update` permission." } }, "/jobs": { @@ -3136,7 +3199,9 @@ "tags": [ "Jobs" ], - "x-immich-permission": "job.read" + "x-immich-admin-only": true, + "x-immich-permission": "job.read", + "description": "This endpoint is an admin-only route, and requires the `job.read` permission." }, "post": { "operationId": "createJob", @@ -3170,7 +3235,9 @@ "tags": [ "Jobs" ], - "x-immich-permission": "job.create" + "x-immich-admin-only": true, + "x-immich-permission": "job.create", + "description": "This endpoint is an admin-only route, and requires the `job.create` permission." } }, "/jobs/{id}": { @@ -3222,7 +3289,9 @@ "tags": [ "Jobs" ], - "x-immich-permission": "job.create" + "x-immich-admin-only": true, + "x-immich-permission": "job.create", + "description": "This endpoint is an admin-only route, and requires the `job.create` permission." } }, "/libraries": { @@ -3258,7 +3327,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.read" + "x-immich-admin-only": true, + "x-immich-permission": "library.read", + "description": "This endpoint is an admin-only route, and requires the `library.read` permission." }, "post": { "operationId": "createLibrary", @@ -3299,7 +3370,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.create" + "x-immich-admin-only": true, + "x-immich-permission": "library.create", + "description": "This endpoint is an admin-only route, and requires the `library.create` permission." } }, "/libraries/{id}": { @@ -3335,7 +3408,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.delete" + "x-immich-admin-only": true, + "x-immich-permission": "library.delete", + "description": "This endpoint is an admin-only route, and requires the `library.delete` permission." }, "get": { "operationId": "getLibrary", @@ -3376,7 +3451,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.read" + "x-immich-admin-only": true, + "x-immich-permission": "library.read", + "description": "This endpoint is an admin-only route, and requires the `library.read` permission." }, "put": { "operationId": "updateLibrary", @@ -3427,7 +3504,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.update" + "x-immich-admin-only": true, + "x-immich-permission": "library.update", + "description": "This endpoint is an admin-only route, and requires the `library.update` permission." } }, "/libraries/{id}/scan": { @@ -3463,7 +3542,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.update" + "x-immich-admin-only": true, + "x-immich-permission": "library.update", + "description": "This endpoint is an admin-only route, and requires the `library.update` permission." } }, "/libraries/{id}/statistics": { @@ -3506,7 +3587,9 @@ "tags": [ "Libraries" ], - "x-immich-permission": "library.statistics" + "x-immich-admin-only": true, + "x-immich-permission": "library.statistics", + "description": "This endpoint is an admin-only route, and requires the `library.statistics` permission." } }, "/libraries/{id}/validate": { @@ -3558,13 +3641,30 @@ ], "tags": [ "Libraries" - ] + ], + "x-immich-admin-only": true } }, "/map/markers": { "get": { "operationId": "getMapMarkers", "parameters": [ + { + "name": "isArchived", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "isFavorite", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, { "name": "fileCreatedAfter", "required": false, @@ -3583,22 +3683,6 @@ "type": "string" } }, - { - "name": "isArchived", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "isFavorite", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, { "name": "withPartners", "required": false, @@ -3768,7 +3852,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memory.read" + "x-immich-permission": "memory.read", + "description": "This endpoint requires the `memory.read` permission." }, "post": { "operationId": "createMemory", @@ -3809,7 +3894,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memory.create" + "x-immich-permission": "memory.create", + "description": "This endpoint requires the `memory.create` permission." } }, "/memories/statistics": { @@ -3876,7 +3962,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memory.statistics" + "x-immich-permission": "memory.statistics", + "description": "This endpoint requires the `memory.statistics` permission." } }, "/memories/{id}": { @@ -3912,7 +3999,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memory.delete" + "x-immich-permission": "memory.delete", + "description": "This endpoint requires the `memory.delete` permission." }, "get": { "operationId": "getMemory", @@ -3953,7 +4041,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memory.read" + "x-immich-permission": "memory.read", + "description": "This endpoint requires the `memory.read` permission." }, "put": { "operationId": "updateMemory", @@ -4004,7 +4093,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memory.update" + "x-immich-permission": "memory.update", + "description": "This endpoint requires the `memory.update` permission." } }, "/memories/{id}/assets": { @@ -4060,7 +4150,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memoryAsset.delete" + "x-immich-permission": "memoryAsset.delete", + "description": "This endpoint requires the `memoryAsset.delete` permission." }, "put": { "operationId": "addMemoryAssets", @@ -4114,7 +4205,8 @@ "tags": [ "Memories" ], - "x-immich-permission": "memoryAsset.create" + "x-immich-permission": "memoryAsset.create", + "description": "This endpoint requires the `memoryAsset.create` permission." } }, "/notifications": { @@ -4150,7 +4242,8 @@ "tags": [ "Notifications" ], - "x-immich-permission": "notification.delete" + "x-immich-permission": "notification.delete", + "description": "This endpoint requires the `notification.delete` permission." }, "get": { "operationId": "getNotifications", @@ -4218,7 +4311,8 @@ "tags": [ "Notifications" ], - "x-immich-permission": "notification.read" + "x-immich-permission": "notification.read", + "description": "This endpoint requires the `notification.read` permission." }, "put": { "operationId": "updateNotifications", @@ -4252,7 +4346,8 @@ "tags": [ "Notifications" ], - "x-immich-permission": "notification.update" + "x-immich-permission": "notification.update", + "description": "This endpoint requires the `notification.update` permission." } }, "/notifications/{id}": { @@ -4288,7 +4383,8 @@ "tags": [ "Notifications" ], - "x-immich-permission": "notification.delete" + "x-immich-permission": "notification.delete", + "description": "This endpoint requires the `notification.delete` permission." }, "get": { "operationId": "getNotification", @@ -4329,7 +4425,8 @@ "tags": [ "Notifications" ], - "x-immich-permission": "notification.read" + "x-immich-permission": "notification.read", + "description": "This endpoint requires the `notification.read` permission." }, "put": { "operationId": "updateNotification", @@ -4380,7 +4477,8 @@ "tags": [ "Notifications" ], - "x-immich-permission": "notification.update" + "x-immich-permission": "notification.update", + "description": "This endpoint requires the `notification.update` permission." } }, "/oauth/authorize": { @@ -4575,7 +4673,8 @@ "tags": [ "Partners" ], - "x-immich-permission": "partner.read" + "x-immich-permission": "partner.read", + "description": "This endpoint requires the `partner.read` permission." } }, "/partners/{id}": { @@ -4611,7 +4710,8 @@ "tags": [ "Partners" ], - "x-immich-permission": "partner.delete" + "x-immich-permission": "partner.delete", + "description": "This endpoint requires the `partner.delete` permission." }, "post": { "operationId": "createPartner", @@ -4652,7 +4752,8 @@ "tags": [ "Partners" ], - "x-immich-permission": "partner.create" + "x-immich-permission": "partner.create", + "description": "This endpoint requires the `partner.create` permission." }, "put": { "operationId": "updatePartner", @@ -4703,7 +4804,8 @@ "tags": [ "Partners" ], - "x-immich-permission": "partner.update" + "x-immich-permission": "partner.update", + "description": "This endpoint requires the `partner.update` permission." } }, "/people": { @@ -4739,7 +4841,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.delete" + "x-immich-permission": "person.delete", + "description": "This endpoint requires the `person.delete` permission." }, "get": { "operationId": "getAllPeople", @@ -4820,7 +4923,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.read" + "x-immich-permission": "person.read", + "description": "This endpoint requires the `person.read` permission." }, "post": { "operationId": "createPerson", @@ -4861,7 +4965,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.create" + "x-immich-permission": "person.create", + "description": "This endpoint requires the `person.create` permission." }, "put": { "operationId": "updatePeople", @@ -4905,7 +5010,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.update" + "x-immich-permission": "person.update", + "description": "This endpoint requires the `person.update` permission." } }, "/people/{id}": { @@ -4941,7 +5047,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.delete" + "x-immich-permission": "person.delete", + "description": "This endpoint requires the `person.delete` permission." }, "get": { "operationId": "getPerson", @@ -4982,7 +5089,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.read" + "x-immich-permission": "person.read", + "description": "This endpoint requires the `person.read` permission." }, "put": { "operationId": "updatePerson", @@ -5033,7 +5141,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.update" + "x-immich-permission": "person.update", + "description": "This endpoint requires the `person.update` permission." } }, "/people/{id}/merge": { @@ -5089,7 +5198,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.merge" + "x-immich-permission": "person.merge", + "description": "This endpoint requires the `person.merge` permission." } }, "/people/{id}/reassign": { @@ -5145,7 +5255,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.reassign" + "x-immich-permission": "person.reassign", + "description": "This endpoint requires the `person.reassign` permission." } }, "/people/{id}/statistics": { @@ -5188,7 +5299,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.statistics" + "x-immich-permission": "person.statistics", + "description": "This endpoint requires the `person.statistics` permission." } }, "/people/{id}/thumbnail": { @@ -5232,7 +5344,8 @@ "tags": [ "People" ], - "x-immich-permission": "person.read" + "x-immich-permission": "person.read", + "description": "This endpoint requires the `person.read` permission." } }, "/search/cities": { @@ -5268,7 +5381,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/explore": { @@ -5304,7 +5418,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/large-assets": { @@ -5622,7 +5737,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/metadata": { @@ -5665,7 +5781,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/person": { @@ -5718,7 +5835,8 @@ "tags": [ "Search" ], - "x-immich-permission": "person.read" + "x-immich-permission": "person.read", + "description": "This endpoint requires the `person.read` permission." } }, "/search/places": { @@ -5763,7 +5881,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/random": { @@ -5809,7 +5928,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/smart": { @@ -5852,7 +5972,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/search/statistics": { @@ -5895,7 +6016,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.statistics" + "x-immich-permission": "asset.statistics", + "description": "This endpoint requires the `asset.statistics` permission." } }, "/search/suggestions": { @@ -5981,7 +6103,8 @@ "tags": [ "Search" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/server/about": { @@ -6014,7 +6137,8 @@ "tags": [ "Server" ], - "x-immich-permission": "server.about" + "x-immich-permission": "server.about", + "description": "This endpoint requires the `server.about` permission." } }, "/server/apk-links": { @@ -6047,7 +6171,8 @@ "tags": [ "Server" ], - "x-immich-permission": "server.apkLinks" + "x-immich-permission": "server.apkLinks", + "description": "This endpoint requires the `server.apkLinks` permission." } }, "/server/config": { @@ -6115,7 +6240,9 @@ "tags": [ "Server" ], - "x-immich-permission": "serverLicense.delete" + "x-immich-admin-only": true, + "x-immich-permission": "serverLicense.delete", + "description": "This endpoint is an admin-only route, and requires the `serverLicense.delete` permission." }, "get": { "operationId": "getServerLicense", @@ -6149,7 +6276,9 @@ "tags": [ "Server" ], - "x-immich-permission": "serverLicense.read" + "x-immich-admin-only": true, + "x-immich-permission": "serverLicense.read", + "description": "This endpoint is an admin-only route, and requires the `serverLicense.read` permission." }, "put": { "operationId": "setServerLicense", @@ -6190,7 +6319,9 @@ "tags": [ "Server" ], - "x-immich-permission": "serverLicense.update" + "x-immich-admin-only": true, + "x-immich-permission": "serverLicense.update", + "description": "This endpoint is an admin-only route, and requires the `serverLicense.update` permission." } }, "/server/media-types": { @@ -6265,7 +6396,9 @@ "tags": [ "Server" ], - "x-immich-permission": "server.statistics" + "x-immich-admin-only": true, + "x-immich-permission": "server.statistics", + "description": "This endpoint is an admin-only route, and requires the `server.statistics` permission." } }, "/server/storage": { @@ -6298,7 +6431,8 @@ "tags": [ "Server" ], - "x-immich-permission": "server.storage" + "x-immich-permission": "server.storage", + "description": "This endpoint requires the `server.storage` permission." } }, "/server/theme": { @@ -6422,7 +6556,8 @@ "tags": [ "Sessions" ], - "x-immich-permission": "session.delete" + "x-immich-permission": "session.delete", + "description": "This endpoint requires the `session.delete` permission." }, "get": { "operationId": "getSessions", @@ -6456,7 +6591,8 @@ "tags": [ "Sessions" ], - "x-immich-permission": "session.read" + "x-immich-permission": "session.read", + "description": "This endpoint requires the `session.read` permission." }, "post": { "operationId": "createSession", @@ -6497,7 +6633,8 @@ "tags": [ "Sessions" ], - "x-immich-permission": "session.create" + "x-immich-permission": "session.create", + "description": "This endpoint requires the `session.create` permission." } }, "/sessions/{id}": { @@ -6533,7 +6670,8 @@ "tags": [ "Sessions" ], - "x-immich-permission": "session.delete" + "x-immich-permission": "session.delete", + "description": "This endpoint requires the `session.delete` permission." }, "put": { "operationId": "updateSession", @@ -6584,7 +6722,8 @@ "tags": [ "Sessions" ], - "x-immich-permission": "session.update" + "x-immich-permission": "session.update", + "description": "This endpoint requires the `session.update` permission." } }, "/sessions/{id}/lock": { @@ -6620,7 +6759,8 @@ "tags": [ "Sessions" ], - "x-immich-permission": "session.lock" + "x-immich-permission": "session.lock", + "description": "This endpoint requires the `session.lock` permission." } }, "/shared-links": { @@ -6666,7 +6806,8 @@ "tags": [ "Shared Links" ], - "x-immich-permission": "sharedLink.read" + "x-immich-permission": "sharedLink.read", + "description": "This endpoint requires the `sharedLink.read` permission." }, "post": { "operationId": "createSharedLink", @@ -6707,21 +6848,14 @@ "tags": [ "Shared Links" ], - "x-immich-permission": "sharedLink.create" + "x-immich-permission": "sharedLink.create", + "description": "This endpoint requires the `sharedLink.create` permission." } }, "/shared-links/me": { "get": { "operationId": "getMySharedLink", "parameters": [ - { - "name": "key", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "password", "required": false, @@ -6732,7 +6866,7 @@ } }, { - "name": "slug", + "name": "token", "required": false, "in": "query", "schema": { @@ -6740,7 +6874,15 @@ } }, { - "name": "token", + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "slug", "required": false, "in": "query", "schema": { @@ -6809,7 +6951,8 @@ "tags": [ "Shared Links" ], - "x-immich-permission": "sharedLink.delete" + "x-immich-permission": "sharedLink.delete", + "description": "This endpoint requires the `sharedLink.delete` permission." }, "get": { "operationId": "getSharedLinkById", @@ -6850,7 +6993,8 @@ "tags": [ "Shared Links" ], - "x-immich-permission": "sharedLink.read" + "x-immich-permission": "sharedLink.read", + "description": "This endpoint requires the `sharedLink.read` permission." }, "patch": { "operationId": "updateSharedLink", @@ -6901,7 +7045,8 @@ "tags": [ "Shared Links" ], - "x-immich-permission": "sharedLink.update" + "x-immich-permission": "sharedLink.update", + "description": "This endpoint requires the `sharedLink.update` permission." } }, "/shared-links/{id}/assets": { @@ -7077,7 +7222,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.delete" + "x-immich-permission": "stack.delete", + "description": "This endpoint requires the `stack.delete` permission." }, "get": { "operationId": "searchStacks", @@ -7121,7 +7267,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.read" + "x-immich-permission": "stack.read", + "description": "This endpoint requires the `stack.read` permission." }, "post": { "operationId": "createStack", @@ -7162,7 +7309,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.create" + "x-immich-permission": "stack.create", + "description": "This endpoint requires the `stack.create` permission." } }, "/stacks/{id}": { @@ -7198,7 +7346,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.delete" + "x-immich-permission": "stack.delete", + "description": "This endpoint requires the `stack.delete` permission." }, "get": { "operationId": "getStack", @@ -7239,7 +7388,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.read" + "x-immich-permission": "stack.read", + "description": "This endpoint requires the `stack.read` permission." }, "put": { "operationId": "updateStack", @@ -7290,7 +7440,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.update" + "x-immich-permission": "stack.update", + "description": "This endpoint requires the `stack.update` permission." } }, "/stacks/{id}/assets/{assetId}": { @@ -7335,7 +7486,8 @@ "tags": [ "Stacks" ], - "x-immich-permission": "stack.update" + "x-immich-permission": "stack.update", + "description": "This endpoint requires the `stack.update` permission." } }, "/sync/ack": { @@ -7371,7 +7523,8 @@ "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.delete" + "x-immich-permission": "syncCheckpoint.delete", + "description": "This endpoint requires the `syncCheckpoint.delete` permission." }, "get": { "operationId": "getSyncAck", @@ -7405,7 +7558,8 @@ "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.read" + "x-immich-permission": "syncCheckpoint.read", + "description": "This endpoint requires the `syncCheckpoint.read` permission." }, "post": { "operationId": "sendSyncAck", @@ -7439,7 +7593,8 @@ "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.update" + "x-immich-permission": "syncCheckpoint.update", + "description": "This endpoint requires the `syncCheckpoint.update` permission." } }, "/sync/delta-sync": { @@ -7562,7 +7717,8 @@ "tags": [ "Sync" ], - "x-immich-permission": "sync.stream" + "x-immich-permission": "sync.stream", + "description": "This endpoint requires the `sync.stream` permission." } }, "/system-config": { @@ -7595,7 +7751,9 @@ "tags": [ "System Config" ], - "x-immich-permission": "systemConfig.read" + "x-immich-admin-only": true, + "x-immich-permission": "systemConfig.read", + "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." }, "put": { "operationId": "updateConfig", @@ -7636,7 +7794,9 @@ "tags": [ "System Config" ], - "x-immich-permission": "systemConfig.update" + "x-immich-admin-only": true, + "x-immich-permission": "systemConfig.update", + "description": "This endpoint is an admin-only route, and requires the `systemConfig.update` permission." } }, "/system-config/defaults": { @@ -7669,7 +7829,9 @@ "tags": [ "System Config" ], - "x-immich-permission": "systemConfig.read" + "x-immich-admin-only": true, + "x-immich-permission": "systemConfig.read", + "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." } }, "/system-config/storage-template-options": { @@ -7702,7 +7864,9 @@ "tags": [ "System Config" ], - "x-immich-permission": "systemConfig.read" + "x-immich-admin-only": true, + "x-immich-permission": "systemConfig.read", + "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." } }, "/system-metadata/admin-onboarding": { @@ -7735,7 +7899,9 @@ "tags": [ "System Metadata" ], - "x-immich-permission": "systemMetadata.read" + "x-immich-admin-only": true, + "x-immich-permission": "systemMetadata.read", + "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." }, "post": { "operationId": "updateAdminOnboarding", @@ -7769,7 +7935,9 @@ "tags": [ "System Metadata" ], - "x-immich-permission": "systemMetadata.update" + "x-immich-admin-only": true, + "x-immich-permission": "systemMetadata.update", + "description": "This endpoint is an admin-only route, and requires the `systemMetadata.update` permission." } }, "/system-metadata/reverse-geocoding-state": { @@ -7802,7 +7970,9 @@ "tags": [ "System Metadata" ], - "x-immich-permission": "systemMetadata.read" + "x-immich-admin-only": true, + "x-immich-permission": "systemMetadata.read", + "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." } }, "/system-metadata/version-check-state": { @@ -7835,7 +8005,9 @@ "tags": [ "System Metadata" ], - "x-immich-permission": "systemMetadata.read" + "x-immich-admin-only": true, + "x-immich-permission": "systemMetadata.read", + "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." } }, "/tags": { @@ -7871,7 +8043,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.read" + "x-immich-permission": "tag.read", + "description": "This endpoint requires the `tag.read` permission." }, "post": { "operationId": "createTag", @@ -7912,7 +8085,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.create" + "x-immich-permission": "tag.create", + "description": "This endpoint requires the `tag.create` permission." }, "put": { "operationId": "upsertTags", @@ -7956,7 +8130,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.create" + "x-immich-permission": "tag.create", + "description": "This endpoint requires the `tag.create` permission." } }, "/tags/assets": { @@ -7999,7 +8174,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.asset" + "x-immich-permission": "tag.asset", + "description": "This endpoint requires the `tag.asset` permission." } }, "/tags/{id}": { @@ -8035,7 +8211,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.delete" + "x-immich-permission": "tag.delete", + "description": "This endpoint requires the `tag.delete` permission." }, "get": { "operationId": "getTagById", @@ -8076,7 +8253,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.read" + "x-immich-permission": "tag.read", + "description": "This endpoint requires the `tag.read` permission." }, "put": { "operationId": "updateTag", @@ -8127,7 +8305,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.update" + "x-immich-permission": "tag.update", + "description": "This endpoint requires the `tag.update` permission." } }, "/tags/{id}/assets": { @@ -8183,7 +8362,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.asset" + "x-immich-permission": "tag.asset", + "description": "This endpoint requires the `tag.asset` permission." }, "put": { "operationId": "tagAssets", @@ -8237,7 +8417,8 @@ "tags": [ "Tags" ], - "x-immich-permission": "tag.asset" + "x-immich-permission": "tag.asset", + "description": "This endpoint requires the `tag.asset` permission." } }, "/timeline/bucket": { @@ -8391,7 +8572,8 @@ "tags": [ "Timeline" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/timeline/buckets": { @@ -8538,7 +8720,8 @@ "tags": [ "Timeline" ], - "x-immich-permission": "asset.read" + "x-immich-permission": "asset.read", + "description": "This endpoint requires the `asset.read` permission." } }, "/trash/empty": { @@ -8571,7 +8754,8 @@ "tags": [ "Trash" ], - "x-immich-permission": "asset.delete" + "x-immich-permission": "asset.delete", + "description": "This endpoint requires the `asset.delete` permission." } }, "/trash/restore": { @@ -8604,7 +8788,8 @@ "tags": [ "Trash" ], - "x-immich-permission": "asset.delete" + "x-immich-permission": "asset.delete", + "description": "This endpoint requires the `asset.delete` permission." } }, "/trash/restore/assets": { @@ -8647,7 +8832,8 @@ "tags": [ "Trash" ], - "x-immich-permission": "asset.delete" + "x-immich-permission": "asset.delete", + "description": "This endpoint requires the `asset.delete` permission." } }, "/users": { @@ -8683,7 +8869,8 @@ "tags": [ "Users" ], - "x-immich-permission": "user.read" + "x-immich-permission": "user.read", + "description": "This endpoint requires the `user.read` permission." } }, "/users/me": { @@ -8716,7 +8903,8 @@ "tags": [ "Users" ], - "x-immich-permission": "user.read" + "x-immich-permission": "user.read", + "description": "This endpoint requires the `user.read` permission." }, "put": { "operationId": "updateMyUser", @@ -8757,7 +8945,8 @@ "tags": [ "Users" ], - "x-immich-permission": "user.update" + "x-immich-permission": "user.update", + "description": "This endpoint requires the `user.update` permission." } }, "/users/me/license": { @@ -8783,7 +8972,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userLicense.delete" + "x-immich-permission": "userLicense.delete", + "description": "This endpoint requires the `userLicense.delete` permission." }, "get": { "operationId": "getUserLicense", @@ -8814,7 +9004,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userLicense.read" + "x-immich-permission": "userLicense.read", + "description": "This endpoint requires the `userLicense.read` permission." }, "put": { "operationId": "setUserLicense", @@ -8855,7 +9046,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userLicense.update" + "x-immich-permission": "userLicense.update", + "description": "This endpoint requires the `userLicense.update` permission." } }, "/users/me/onboarding": { @@ -8881,7 +9073,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.delete" + "x-immich-permission": "userOnboarding.delete", + "description": "This endpoint requires the `userOnboarding.delete` permission." }, "get": { "operationId": "getUserOnboarding", @@ -8912,7 +9105,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.read" + "x-immich-permission": "userOnboarding.read", + "description": "This endpoint requires the `userOnboarding.read` permission." }, "put": { "operationId": "setUserOnboarding", @@ -8953,7 +9147,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.update" + "x-immich-permission": "userOnboarding.update", + "description": "This endpoint requires the `userOnboarding.update` permission." } }, "/users/me/preferences": { @@ -8986,7 +9181,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userPreference.read" + "x-immich-permission": "userPreference.read", + "description": "This endpoint requires the `userPreference.read` permission." }, "put": { "operationId": "updateMyPreferences", @@ -9027,7 +9223,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userPreference.update" + "x-immich-permission": "userPreference.update", + "description": "This endpoint requires the `userPreference.update` permission." } }, "/users/profile-image": { @@ -9053,7 +9250,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.delete" + "x-immich-permission": "userProfileImage.delete", + "description": "This endpoint requires the `userProfileImage.delete` permission." }, "post": { "operationId": "createProfileImage", @@ -9095,7 +9293,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.update" + "x-immich-permission": "userProfileImage.update", + "description": "This endpoint requires the `userProfileImage.update` permission." } }, "/users/{id}": { @@ -9138,7 +9337,8 @@ "tags": [ "Users" ], - "x-immich-permission": "user.read" + "x-immich-permission": "user.read", + "description": "This endpoint requires the `user.read` permission." } }, "/users/{id}/profile-image": { @@ -9182,7 +9382,8 @@ "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.read" + "x-immich-permission": "userProfileImage.read", + "description": "This endpoint requires the `userProfileImage.read` permission." } }, "/view/folder": { diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 33f0da8a0..53a2f4b14 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1578,6 +1578,9 @@ export type CreateProfileImageResponseDto = { profileImagePath: string; userId: string; }; +/** + * This endpoint requires the `activity.read` permission. + */ export function getActivities({ albumId, assetId, level, $type, userId }: { albumId: string; assetId?: string; @@ -1598,6 +1601,9 @@ export function getActivities({ albumId, assetId, level, $type, userId }: { ...opts })); } +/** + * This endpoint requires the `activity.create` permission. + */ export function createActivity({ activityCreateDto }: { activityCreateDto: ActivityCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -1610,6 +1616,9 @@ export function createActivity({ activityCreateDto }: { body: activityCreateDto }))); } +/** + * This endpoint requires the `activity.statistics` permission. + */ export function getActivityStatistics({ albumId, assetId }: { albumId: string; assetId?: string; @@ -1624,6 +1633,9 @@ export function getActivityStatistics({ albumId, assetId }: { ...opts })); } +/** + * This endpoint requires the `activity.delete` permission. + */ export function deleteActivity({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1669,6 +1681,9 @@ export function sendTestEmailAdmin({ systemConfigSmtpDto }: { body: systemConfigSmtpDto }))); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + */ export function searchUsersAdmin({ id, withDeleted }: { id?: string; withDeleted?: boolean; @@ -1683,6 +1698,9 @@ export function searchUsersAdmin({ id, withDeleted }: { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.create` permission. + */ export function createUserAdmin({ userAdminCreateDto }: { userAdminCreateDto: UserAdminCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -1695,6 +1713,9 @@ export function createUserAdmin({ userAdminCreateDto }: { body: userAdminCreateDto }))); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + */ export function deleteUserAdmin({ id, userAdminDeleteDto }: { id: string; userAdminDeleteDto: UserAdminDeleteDto; @@ -1708,6 +1729,9 @@ export function deleteUserAdmin({ id, userAdminDeleteDto }: { body: userAdminDeleteDto }))); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + */ export function getUserAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1718,6 +1742,9 @@ export function getUserAdmin({ id }: { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.update` permission. + */ export function updateUserAdmin({ id, userAdminUpdateDto }: { id: string; userAdminUpdateDto: UserAdminUpdateDto; @@ -1731,6 +1758,9 @@ export function updateUserAdmin({ id, userAdminUpdateDto }: { body: userAdminUpdateDto }))); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + */ export function getUserPreferencesAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1741,6 +1771,9 @@ export function getUserPreferencesAdmin({ id }: { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.update` permission. + */ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { id: string; userPreferencesUpdateDto: UserPreferencesUpdateDto; @@ -1754,6 +1787,9 @@ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { body: userPreferencesUpdateDto }))); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + */ export function restoreUserAdmin({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1765,6 +1801,9 @@ export function restoreUserAdmin({ id }: { method: "POST" })); } +/** + * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + */ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility }: { id: string; isFavorite?: boolean; @@ -1782,6 +1821,9 @@ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility } ...opts })); } +/** + * This endpoint requires the `album.read` permission. + */ export function getAllAlbums({ assetId, shared }: { assetId?: string; shared?: boolean; @@ -1796,6 +1838,9 @@ export function getAllAlbums({ assetId, shared }: { ...opts })); } +/** + * This endpoint requires the `album.create` permission. + */ export function createAlbum({ createAlbumDto }: { createAlbumDto: CreateAlbumDto; }, opts?: Oazapfts.RequestOpts) { @@ -1808,6 +1853,9 @@ export function createAlbum({ createAlbumDto }: { body: createAlbumDto }))); } +/** + * This endpoint requires the `album.statistics` permission. + */ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -1816,6 +1864,9 @@ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `album.delete` permission. + */ export function deleteAlbum({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1824,6 +1875,9 @@ export function deleteAlbum({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `album.read` permission. + */ export function getAlbumInfo({ id, key, slug, withoutAssets }: { id: string; key?: string; @@ -1841,6 +1895,9 @@ export function getAlbumInfo({ id, key, slug, withoutAssets }: { ...opts })); } +/** + * This endpoint requires the `album.update` permission. + */ export function updateAlbumInfo({ id, updateAlbumDto }: { id: string; updateAlbumDto: UpdateAlbumDto; @@ -1854,6 +1911,9 @@ export function updateAlbumInfo({ id, updateAlbumDto }: { body: updateAlbumDto }))); } +/** + * This endpoint requires the `albumAsset.delete` permission. + */ export function removeAssetFromAlbum({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; @@ -1867,6 +1927,9 @@ export function removeAssetFromAlbum({ id, bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `albumAsset.create` permission. + */ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { id: string; key?: string; @@ -1885,6 +1948,9 @@ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `albumUser.delete` permission. + */ export function removeUserFromAlbum({ id, userId }: { id: string; userId: string; @@ -1894,6 +1960,9 @@ export function removeUserFromAlbum({ id, userId }: { method: "DELETE" })); } +/** + * This endpoint requires the `albumUser.update` permission. + */ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { id: string; userId: string; @@ -1905,6 +1974,9 @@ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { body: updateAlbumUserDto }))); } +/** + * This endpoint requires the `albumUser.create` permission. + */ export function addUsersToAlbum({ id, addUsersDto }: { id: string; addUsersDto: AddUsersDto; @@ -1918,6 +1990,9 @@ export function addUsersToAlbum({ id, addUsersDto }: { body: addUsersDto }))); } +/** + * This endpoint requires the `apiKey.read` permission. + */ export function getApiKeys(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -1926,6 +2001,9 @@ export function getApiKeys(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `apiKey.create` permission. + */ export function createApiKey({ apiKeyCreateDto }: { apiKeyCreateDto: ApiKeyCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -1938,6 +2016,9 @@ export function createApiKey({ apiKeyCreateDto }: { body: apiKeyCreateDto }))); } +/** + * This endpoint requires the `apiKey.delete` permission. + */ export function deleteApiKey({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1946,6 +2027,9 @@ export function deleteApiKey({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `apiKey.read` permission. + */ export function getApiKey({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -1956,6 +2040,9 @@ export function getApiKey({ id }: { ...opts })); } +/** + * This endpoint requires the `apiKey.update` permission. + */ export function updateApiKey({ id, apiKeyUpdateDto }: { id: string; apiKeyUpdateDto: ApiKeyUpdateDto; @@ -1969,6 +2056,9 @@ export function updateApiKey({ id, apiKeyUpdateDto }: { body: apiKeyUpdateDto }))); } +/** + * This endpoint requires the `asset.delete` permission. + */ export function deleteAssets({ assetBulkDeleteDto }: { assetBulkDeleteDto: AssetBulkDeleteDto; }, opts?: Oazapfts.RequestOpts) { @@ -1978,6 +2068,9 @@ export function deleteAssets({ assetBulkDeleteDto }: { body: assetBulkDeleteDto }))); } +/** + * This endpoint requires the `asset.upload` permission. + */ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: { key?: string; slug?: string; @@ -1999,6 +2092,9 @@ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: }) }))); } +/** + * This endpoint requires the `asset.update` permission. + */ export function updateAssets({ assetBulkUpdateDto }: { assetBulkUpdateDto: AssetBulkUpdateDto; }, opts?: Oazapfts.RequestOpts) { @@ -2061,7 +2157,7 @@ export function runAssetJobs({ assetJobsDto }: { }))); } /** - * This property was deprecated in v1.116.0 + * This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. */ export function getRandom({ count }: { count?: number; @@ -2075,6 +2171,9 @@ export function getRandom({ count }: { ...opts })); } +/** + * This endpoint requires the `asset.statistics` permission. + */ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { isFavorite?: boolean; isTrashed?: boolean; @@ -2091,6 +2190,9 @@ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function getAssetInfo({ id, key, slug }: { id: string; key?: string; @@ -2106,6 +2208,9 @@ export function getAssetInfo({ id, key, slug }: { ...opts })); } +/** + * This endpoint requires the `asset.update` permission. + */ export function updateAsset({ id, updateAssetDto }: { id: string; updateAssetDto: UpdateAssetDto; @@ -2119,6 +2224,9 @@ export function updateAsset({ id, updateAssetDto }: { body: updateAssetDto }))); } +/** + * This endpoint requires the `asset.download` permission. + */ export function downloadAsset({ id, key, slug }: { id: string; key?: string; @@ -2155,6 +2263,9 @@ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { body: assetMediaReplaceDto }))); } +/** + * This endpoint requires the `asset.view` permission. + */ export function viewAsset({ id, key, size, slug }: { id: string; key?: string; @@ -2172,6 +2283,9 @@ export function viewAsset({ id, key, size, slug }: { ...opts })); } +/** + * This endpoint requires the `asset.view` permission. + */ export function playAssetVideo({ id, key, slug }: { id: string; key?: string; @@ -2199,6 +2313,9 @@ export function signUpAdmin({ signUpDto }: { body: signUpDto }))); } +/** + * This endpoint requires the `auth.changePassword` permission. + */ export function changePassword({ changePasswordDto }: { changePasswordDto: ChangePasswordDto; }, opts?: Oazapfts.RequestOpts) { @@ -2232,6 +2349,9 @@ export function logout(opts?: Oazapfts.RequestOpts) { method: "POST" })); } +/** + * This endpoint requires the `pinCode.delete` permission. + */ export function resetPinCode({ pinCodeResetDto }: { pinCodeResetDto: PinCodeResetDto; }, opts?: Oazapfts.RequestOpts) { @@ -2241,6 +2361,9 @@ export function resetPinCode({ pinCodeResetDto }: { body: pinCodeResetDto }))); } +/** + * This endpoint requires the `pinCode.create` permission. + */ export function setupPinCode({ pinCodeSetupDto }: { pinCodeSetupDto: PinCodeSetupDto; }, opts?: Oazapfts.RequestOpts) { @@ -2250,6 +2373,9 @@ export function setupPinCode({ pinCodeSetupDto }: { body: pinCodeSetupDto }))); } +/** + * This endpoint requires the `pinCode.update` permission. + */ export function changePinCode({ pinCodeChangeDto }: { pinCodeChangeDto: PinCodeChangeDto; }, opts?: Oazapfts.RequestOpts) { @@ -2291,6 +2417,9 @@ export function validateAccessToken(opts?: Oazapfts.RequestOpts) { method: "POST" })); } +/** + * This endpoint requires the `asset.download` permission. + */ export function downloadArchive({ key, slug, assetIdsDto }: { key?: string; slug?: string; @@ -2308,6 +2437,9 @@ export function downloadArchive({ key, slug, assetIdsDto }: { body: assetIdsDto }))); } +/** + * This endpoint requires the `asset.download` permission. + */ export function getDownloadInfo({ key, slug, downloadInfoDto }: { key?: string; slug?: string; @@ -2325,6 +2457,9 @@ export function getDownloadInfo({ key, slug, downloadInfoDto }: { body: downloadInfoDto }))); } +/** + * This endpoint requires the `duplicate.delete` permission. + */ export function deleteDuplicates({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { @@ -2334,6 +2469,9 @@ export function deleteDuplicates({ bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `duplicate.read` permission. + */ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2342,6 +2480,9 @@ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `duplicate.delete` permission. + */ export function deleteDuplicate({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2350,6 +2491,9 @@ export function deleteDuplicate({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `face.read` permission. + */ export function getFaces({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2362,6 +2506,9 @@ export function getFaces({ id }: { ...opts })); } +/** + * This endpoint requires the `face.create` permission. + */ export function createFace({ assetFaceCreateDto }: { assetFaceCreateDto: AssetFaceCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -2371,6 +2518,9 @@ export function createFace({ assetFaceCreateDto }: { body: assetFaceCreateDto }))); } +/** + * This endpoint requires the `face.delete` permission. + */ export function deleteFace({ id, assetFaceDeleteDto }: { id: string; assetFaceDeleteDto: AssetFaceDeleteDto; @@ -2381,6 +2531,9 @@ export function deleteFace({ id, assetFaceDeleteDto }: { body: assetFaceDeleteDto }))); } +/** + * This endpoint requires the `face.update` permission. + */ export function reassignFacesById({ id, faceDto }: { id: string; faceDto: FaceDto; @@ -2394,6 +2547,9 @@ export function reassignFacesById({ id, faceDto }: { body: faceDto }))); } +/** + * This endpoint is an admin-only route, and requires the `job.read` permission. + */ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2402,6 +2558,9 @@ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `job.create` permission. + */ export function createJob({ jobCreateDto }: { jobCreateDto: JobCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -2411,6 +2570,9 @@ export function createJob({ jobCreateDto }: { body: jobCreateDto }))); } +/** + * This endpoint is an admin-only route, and requires the `job.create` permission. + */ export function sendJobCommand({ id, jobCommandDto }: { id: JobName; jobCommandDto: JobCommandDto; @@ -2424,6 +2586,9 @@ export function sendJobCommand({ id, jobCommandDto }: { body: jobCommandDto }))); } +/** + * This endpoint is an admin-only route, and requires the `library.read` permission. + */ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2432,6 +2597,9 @@ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `library.create` permission. + */ export function createLibrary({ createLibraryDto }: { createLibraryDto: CreateLibraryDto; }, opts?: Oazapfts.RequestOpts) { @@ -2444,6 +2612,9 @@ export function createLibrary({ createLibraryDto }: { body: createLibraryDto }))); } +/** + * This endpoint is an admin-only route, and requires the `library.delete` permission. + */ export function deleteLibrary({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2452,6 +2623,9 @@ export function deleteLibrary({ id }: { method: "DELETE" })); } +/** + * This endpoint is an admin-only route, and requires the `library.read` permission. + */ export function getLibrary({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2462,6 +2636,9 @@ export function getLibrary({ id }: { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `library.update` permission. + */ export function updateLibrary({ id, updateLibraryDto }: { id: string; updateLibraryDto: UpdateLibraryDto; @@ -2475,6 +2652,9 @@ export function updateLibrary({ id, updateLibraryDto }: { body: updateLibraryDto }))); } +/** + * This endpoint is an admin-only route, and requires the `library.update` permission. + */ export function scanLibrary({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2483,6 +2663,9 @@ export function scanLibrary({ id }: { method: "POST" })); } +/** + * This endpoint is an admin-only route, and requires the `library.statistics` permission. + */ export function getLibraryStatistics({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2506,11 +2689,11 @@ export function validate({ id, validateLibraryDto }: { body: validateLibraryDto }))); } -export function getMapMarkers({ fileCreatedAfter, fileCreatedBefore, isArchived, isFavorite, withPartners, withSharedAlbums }: { - fileCreatedAfter?: string; - fileCreatedBefore?: string; +export function getMapMarkers({ isArchived, isFavorite, fileCreatedAfter, fileCreatedBefore, withPartners, withSharedAlbums }: { isArchived?: boolean; isFavorite?: boolean; + fileCreatedAfter?: string; + fileCreatedBefore?: string; withPartners?: boolean; withSharedAlbums?: boolean; }, opts?: Oazapfts.RequestOpts) { @@ -2518,10 +2701,10 @@ export function getMapMarkers({ fileCreatedAfter, fileCreatedBefore, isArchived, status: 200; data: MapMarkerResponseDto[]; }>(`/map/markers${QS.query(QS.explode({ - fileCreatedAfter, - fileCreatedBefore, isArchived, isFavorite, + fileCreatedAfter, + fileCreatedBefore, withPartners, withSharedAlbums }))}`, { @@ -2542,6 +2725,9 @@ export function reverseGeocode({ lat, lon }: { ...opts })); } +/** + * This endpoint requires the `memory.read` permission. + */ export function searchMemories({ $for, isSaved, isTrashed, $type }: { $for?: string; isSaved?: boolean; @@ -2560,6 +2746,9 @@ export function searchMemories({ $for, isSaved, isTrashed, $type }: { ...opts })); } +/** + * This endpoint requires the `memory.create` permission. + */ export function createMemory({ memoryCreateDto }: { memoryCreateDto: MemoryCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -2572,6 +2761,9 @@ export function createMemory({ memoryCreateDto }: { body: memoryCreateDto }))); } +/** + * This endpoint requires the `memory.statistics` permission. + */ export function memoriesStatistics({ $for, isSaved, isTrashed, $type }: { $for?: string; isSaved?: boolean; @@ -2590,6 +2782,9 @@ export function memoriesStatistics({ $for, isSaved, isTrashed, $type }: { ...opts })); } +/** + * This endpoint requires the `memory.delete` permission. + */ export function deleteMemory({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2598,6 +2793,9 @@ export function deleteMemory({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `memory.read` permission. + */ export function getMemory({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2608,6 +2806,9 @@ export function getMemory({ id }: { ...opts })); } +/** + * This endpoint requires the `memory.update` permission. + */ export function updateMemory({ id, memoryUpdateDto }: { id: string; memoryUpdateDto: MemoryUpdateDto; @@ -2621,6 +2822,9 @@ export function updateMemory({ id, memoryUpdateDto }: { body: memoryUpdateDto }))); } +/** + * This endpoint requires the `memoryAsset.delete` permission. + */ export function removeMemoryAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; @@ -2634,6 +2838,9 @@ export function removeMemoryAssets({ id, bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `memoryAsset.create` permission. + */ export function addMemoryAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; @@ -2647,6 +2854,9 @@ export function addMemoryAssets({ id, bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `notification.delete` permission. + */ export function deleteNotifications({ notificationDeleteAllDto }: { notificationDeleteAllDto: NotificationDeleteAllDto; }, opts?: Oazapfts.RequestOpts) { @@ -2656,6 +2866,9 @@ export function deleteNotifications({ notificationDeleteAllDto }: { body: notificationDeleteAllDto }))); } +/** + * This endpoint requires the `notification.read` permission. + */ export function getNotifications({ id, level, $type, unread }: { id?: string; level?: NotificationLevel; @@ -2674,6 +2887,9 @@ export function getNotifications({ id, level, $type, unread }: { ...opts })); } +/** + * This endpoint requires the `notification.update` permission. + */ export function updateNotifications({ notificationUpdateAllDto }: { notificationUpdateAllDto: NotificationUpdateAllDto; }, opts?: Oazapfts.RequestOpts) { @@ -2683,6 +2899,9 @@ export function updateNotifications({ notificationUpdateAllDto }: { body: notificationUpdateAllDto }))); } +/** + * This endpoint requires the `notification.delete` permission. + */ export function deleteNotification({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2691,6 +2910,9 @@ export function deleteNotification({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `notification.read` permission. + */ export function getNotification({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2701,6 +2923,9 @@ export function getNotification({ id }: { ...opts })); } +/** + * This endpoint requires the `notification.update` permission. + */ export function updateNotification({ id, notificationUpdateDto }: { id: string; notificationUpdateDto: NotificationUpdateDto; @@ -2764,6 +2989,9 @@ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { method: "POST" })); } +/** + * This endpoint requires the `partner.read` permission. + */ export function getPartners({ direction }: { direction: PartnerDirection; }, opts?: Oazapfts.RequestOpts) { @@ -2776,6 +3004,9 @@ export function getPartners({ direction }: { ...opts })); } +/** + * This endpoint requires the `partner.delete` permission. + */ export function removePartner({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2784,6 +3015,9 @@ export function removePartner({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `partner.create` permission. + */ export function createPartner({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2795,6 +3029,9 @@ export function createPartner({ id }: { method: "POST" })); } +/** + * This endpoint requires the `partner.update` permission. + */ export function updatePartner({ id, updatePartnerDto }: { id: string; updatePartnerDto: UpdatePartnerDto; @@ -2808,6 +3045,9 @@ export function updatePartner({ id, updatePartnerDto }: { body: updatePartnerDto }))); } +/** + * This endpoint requires the `person.delete` permission. + */ export function deletePeople({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { @@ -2817,6 +3057,9 @@ export function deletePeople({ bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `person.read` permission. + */ export function getAllPeople({ closestAssetId, closestPersonId, page, size, withHidden }: { closestAssetId?: string; closestPersonId?: string; @@ -2837,6 +3080,9 @@ export function getAllPeople({ closestAssetId, closestPersonId, page, size, with ...opts })); } +/** + * This endpoint requires the `person.create` permission. + */ export function createPerson({ personCreateDto }: { personCreateDto: PersonCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -2849,6 +3095,9 @@ export function createPerson({ personCreateDto }: { body: personCreateDto }))); } +/** + * This endpoint requires the `person.update` permission. + */ export function updatePeople({ peopleUpdateDto }: { peopleUpdateDto: PeopleUpdateDto; }, opts?: Oazapfts.RequestOpts) { @@ -2861,6 +3110,9 @@ export function updatePeople({ peopleUpdateDto }: { body: peopleUpdateDto }))); } +/** + * This endpoint requires the `person.delete` permission. + */ export function deletePerson({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2869,6 +3121,9 @@ export function deletePerson({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `person.read` permission. + */ export function getPerson({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2879,6 +3134,9 @@ export function getPerson({ id }: { ...opts })); } +/** + * This endpoint requires the `person.update` permission. + */ export function updatePerson({ id, personUpdateDto }: { id: string; personUpdateDto: PersonUpdateDto; @@ -2892,6 +3150,9 @@ export function updatePerson({ id, personUpdateDto }: { body: personUpdateDto }))); } +/** + * This endpoint requires the `person.merge` permission. + */ export function mergePerson({ id, mergePersonDto }: { id: string; mergePersonDto: MergePersonDto; @@ -2905,6 +3166,9 @@ export function mergePerson({ id, mergePersonDto }: { body: mergePersonDto }))); } +/** + * This endpoint requires the `person.reassign` permission. + */ export function reassignFaces({ id, assetFaceUpdateDto }: { id: string; assetFaceUpdateDto: AssetFaceUpdateDto; @@ -2918,6 +3182,9 @@ export function reassignFaces({ id, assetFaceUpdateDto }: { body: assetFaceUpdateDto }))); } +/** + * This endpoint requires the `person.statistics` permission. + */ export function getPersonStatistics({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2928,6 +3195,9 @@ export function getPersonStatistics({ id }: { ...opts })); } +/** + * This endpoint requires the `person.read` permission. + */ export function getPersonThumbnail({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -2938,6 +3208,9 @@ export function getPersonThumbnail({ id }: { ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2946,6 +3219,9 @@ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function getExploreData(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2954,6 +3230,9 @@ export function getExploreData(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: { albumIds?: string[]; city?: string | null; @@ -3027,6 +3306,9 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat method: "POST" })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function searchAssets({ metadataSearchDto }: { metadataSearchDto: MetadataSearchDto; }, opts?: Oazapfts.RequestOpts) { @@ -3039,6 +3321,9 @@ export function searchAssets({ metadataSearchDto }: { body: metadataSearchDto }))); } +/** + * This endpoint requires the `person.read` permission. + */ export function searchPerson({ name, withHidden }: { name: string; withHidden?: boolean; @@ -3053,6 +3338,9 @@ export function searchPerson({ name, withHidden }: { ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function searchPlaces({ name }: { name: string; }, opts?: Oazapfts.RequestOpts) { @@ -3065,6 +3353,9 @@ export function searchPlaces({ name }: { ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function searchRandom({ randomSearchDto }: { randomSearchDto: RandomSearchDto; }, opts?: Oazapfts.RequestOpts) { @@ -3077,6 +3368,9 @@ export function searchRandom({ randomSearchDto }: { body: randomSearchDto }))); } +/** + * This endpoint requires the `asset.read` permission. + */ export function searchSmart({ smartSearchDto }: { smartSearchDto: SmartSearchDto; }, opts?: Oazapfts.RequestOpts) { @@ -3089,6 +3383,9 @@ export function searchSmart({ smartSearchDto }: { body: smartSearchDto }))); } +/** + * This endpoint requires the `asset.statistics` permission. + */ export function searchAssetStatistics({ statisticsSearchDto }: { statisticsSearchDto: StatisticsSearchDto; }, opts?: Oazapfts.RequestOpts) { @@ -3101,6 +3398,9 @@ export function searchAssetStatistics({ statisticsSearchDto }: { body: statisticsSearchDto }))); } +/** + * This endpoint requires the `asset.read` permission. + */ export function getSearchSuggestions({ country, includeNull, make, model, state, $type }: { country?: string; includeNull?: boolean; @@ -3123,6 +3423,9 @@ export function getSearchSuggestions({ country, includeNull, make, model, state, ...opts })); } +/** + * This endpoint requires the `server.about` permission. + */ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3131,6 +3434,9 @@ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `server.apkLinks` permission. + */ export function getApkLinks(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3155,12 +3461,18 @@ export function getServerFeatures(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + */ export function deleteServerLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/server/license", { ...opts, method: "DELETE" })); } +/** + * This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + */ export function getServerLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3171,6 +3483,9 @@ export function getServerLicense(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + */ export function setServerLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; }, opts?: Oazapfts.RequestOpts) { @@ -3199,6 +3514,9 @@ export function pingServer(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `server.statistics` permission. + */ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3207,6 +3525,9 @@ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `server.storage` permission. + */ export function getStorage(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3247,12 +3568,18 @@ export function getVersionHistory(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `session.delete` permission. + */ export function deleteAllSessions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/sessions", { ...opts, method: "DELETE" })); } +/** + * This endpoint requires the `session.read` permission. + */ export function getSessions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3261,6 +3588,9 @@ export function getSessions(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `session.create` permission. + */ export function createSession({ sessionCreateDto }: { sessionCreateDto: SessionCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -3273,6 +3603,9 @@ export function createSession({ sessionCreateDto }: { body: sessionCreateDto }))); } +/** + * This endpoint requires the `session.delete` permission. + */ export function deleteSession({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3281,6 +3614,9 @@ export function deleteSession({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `session.update` permission. + */ export function updateSession({ id, sessionUpdateDto }: { id: string; sessionUpdateDto: SessionUpdateDto; @@ -3294,6 +3630,9 @@ export function updateSession({ id, sessionUpdateDto }: { body: sessionUpdateDto }))); } +/** + * This endpoint requires the `session.lock` permission. + */ export function lockSession({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3302,6 +3641,9 @@ export function lockSession({ id }: { method: "POST" })); } +/** + * This endpoint requires the `sharedLink.read` permission. + */ export function getAllSharedLinks({ albumId }: { albumId?: string; }, opts?: Oazapfts.RequestOpts) { @@ -3314,6 +3656,9 @@ export function getAllSharedLinks({ albumId }: { ...opts })); } +/** + * This endpoint requires the `sharedLink.create` permission. + */ export function createSharedLink({ sharedLinkCreateDto }: { sharedLinkCreateDto: SharedLinkCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -3326,24 +3671,27 @@ export function createSharedLink({ sharedLinkCreateDto }: { body: sharedLinkCreateDto }))); } -export function getMySharedLink({ key, password, slug, token }: { - key?: string; +export function getMySharedLink({ password, token, key, slug }: { password?: string; - slug?: string; token?: string; + key?: string; + slug?: string; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; data: SharedLinkResponseDto; }>(`/shared-links/me${QS.query(QS.explode({ - key, password, - slug, - token + token, + key, + slug }))}`, { ...opts })); } +/** + * This endpoint requires the `sharedLink.delete` permission. + */ export function removeSharedLink({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3352,6 +3700,9 @@ export function removeSharedLink({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `sharedLink.read` permission. + */ export function getSharedLinkById({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3362,6 +3713,9 @@ export function getSharedLinkById({ id }: { ...opts })); } +/** + * This endpoint requires the `sharedLink.update` permission. + */ export function updateSharedLink({ id, sharedLinkEditDto }: { id: string; sharedLinkEditDto: SharedLinkEditDto; @@ -3411,6 +3765,9 @@ export function addSharedLinkAssets({ id, key, slug, assetIdsDto }: { body: assetIdsDto }))); } +/** + * This endpoint requires the `stack.delete` permission. + */ export function deleteStacks({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { @@ -3420,6 +3777,9 @@ export function deleteStacks({ bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `stack.read` permission. + */ export function searchStacks({ primaryAssetId }: { primaryAssetId?: string; }, opts?: Oazapfts.RequestOpts) { @@ -3432,6 +3792,9 @@ export function searchStacks({ primaryAssetId }: { ...opts })); } +/** + * This endpoint requires the `stack.create` permission. + */ export function createStack({ stackCreateDto }: { stackCreateDto: StackCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -3444,6 +3807,9 @@ export function createStack({ stackCreateDto }: { body: stackCreateDto }))); } +/** + * This endpoint requires the `stack.delete` permission. + */ export function deleteStack({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3452,6 +3818,9 @@ export function deleteStack({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `stack.read` permission. + */ export function getStack({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3462,6 +3831,9 @@ export function getStack({ id }: { ...opts })); } +/** + * This endpoint requires the `stack.update` permission. + */ export function updateStack({ id, stackUpdateDto }: { id: string; stackUpdateDto: StackUpdateDto; @@ -3475,6 +3847,9 @@ export function updateStack({ id, stackUpdateDto }: { body: stackUpdateDto }))); } +/** + * This endpoint requires the `stack.update` permission. + */ export function removeAssetFromStack({ assetId, id }: { assetId: string; id: string; @@ -3484,6 +3859,9 @@ export function removeAssetFromStack({ assetId, id }: { method: "DELETE" })); } +/** + * This endpoint requires the `syncCheckpoint.delete` permission. + */ export function deleteSyncAck({ syncAckDeleteDto }: { syncAckDeleteDto: SyncAckDeleteDto; }, opts?: Oazapfts.RequestOpts) { @@ -3493,6 +3871,9 @@ export function deleteSyncAck({ syncAckDeleteDto }: { body: syncAckDeleteDto }))); } +/** + * This endpoint requires the `syncCheckpoint.read` permission. + */ export function getSyncAck(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3501,6 +3882,9 @@ export function getSyncAck(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `syncCheckpoint.update` permission. + */ export function sendSyncAck({ syncAckSetDto }: { syncAckSetDto: SyncAckSetDto; }, opts?: Oazapfts.RequestOpts) { @@ -3534,6 +3918,9 @@ export function getFullSyncForUser({ assetFullSyncDto }: { body: assetFullSyncDto }))); } +/** + * This endpoint requires the `sync.stream` permission. + */ export function getSyncStream({ syncStreamDto }: { syncStreamDto: SyncStreamDto; }, opts?: Oazapfts.RequestOpts) { @@ -3543,6 +3930,9 @@ export function getSyncStream({ syncStreamDto }: { body: syncStreamDto }))); } +/** + * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + */ export function getConfig(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3551,6 +3941,9 @@ export function getConfig(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + */ export function updateConfig({ systemConfigDto }: { systemConfigDto: SystemConfigDto; }, opts?: Oazapfts.RequestOpts) { @@ -3563,6 +3956,9 @@ export function updateConfig({ systemConfigDto }: { body: systemConfigDto }))); } +/** + * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + */ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3571,6 +3967,9 @@ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + */ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3579,6 +3978,9 @@ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + */ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3587,6 +3989,9 @@ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + */ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { adminOnboardingUpdateDto: AdminOnboardingUpdateDto; }, opts?: Oazapfts.RequestOpts) { @@ -3596,6 +4001,9 @@ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { body: adminOnboardingUpdateDto }))); } +/** + * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + */ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3604,6 +4012,9 @@ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + */ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3612,6 +4023,9 @@ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `tag.read` permission. + */ export function getAllTags(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3620,6 +4034,9 @@ export function getAllTags(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `tag.create` permission. + */ export function createTag({ tagCreateDto }: { tagCreateDto: TagCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -3632,6 +4049,9 @@ export function createTag({ tagCreateDto }: { body: tagCreateDto }))); } +/** + * This endpoint requires the `tag.create` permission. + */ export function upsertTags({ tagUpsertDto }: { tagUpsertDto: TagUpsertDto; }, opts?: Oazapfts.RequestOpts) { @@ -3644,6 +4064,9 @@ export function upsertTags({ tagUpsertDto }: { body: tagUpsertDto }))); } +/** + * This endpoint requires the `tag.asset` permission. + */ export function bulkTagAssets({ tagBulkAssetsDto }: { tagBulkAssetsDto: TagBulkAssetsDto; }, opts?: Oazapfts.RequestOpts) { @@ -3656,6 +4079,9 @@ export function bulkTagAssets({ tagBulkAssetsDto }: { body: tagBulkAssetsDto }))); } +/** + * This endpoint requires the `tag.delete` permission. + */ export function deleteTag({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3664,6 +4090,9 @@ export function deleteTag({ id }: { method: "DELETE" })); } +/** + * This endpoint requires the `tag.read` permission. + */ export function getTagById({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3674,6 +4103,9 @@ export function getTagById({ id }: { ...opts })); } +/** + * This endpoint requires the `tag.update` permission. + */ export function updateTag({ id, tagUpdateDto }: { id: string; tagUpdateDto: TagUpdateDto; @@ -3687,6 +4119,9 @@ export function updateTag({ id, tagUpdateDto }: { body: tagUpdateDto }))); } +/** + * This endpoint requires the `tag.asset` permission. + */ export function untagAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; @@ -3700,6 +4135,9 @@ export function untagAssets({ id, bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `tag.asset` permission. + */ export function tagAssets({ id, bulkIdsDto }: { id: string; bulkIdsDto: BulkIdsDto; @@ -3713,6 +4151,9 @@ export function tagAssets({ id, bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `asset.read` permission. + */ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, timeBucket, userId, visibility, withPartners, withStacked }: { albumId?: string; isFavorite?: boolean; @@ -3749,6 +4190,9 @@ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, pers ...opts })); } +/** + * This endpoint requires the `asset.read` permission. + */ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, userId, visibility, withPartners, withStacked }: { albumId?: string; isFavorite?: boolean; @@ -3783,6 +4227,9 @@ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, per ...opts })); } +/** + * This endpoint requires the `asset.delete` permission. + */ export function emptyTrash(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3792,6 +4239,9 @@ export function emptyTrash(opts?: Oazapfts.RequestOpts) { method: "POST" })); } +/** + * This endpoint requires the `asset.delete` permission. + */ export function restoreTrash(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3801,6 +4251,9 @@ export function restoreTrash(opts?: Oazapfts.RequestOpts) { method: "POST" })); } +/** + * This endpoint requires the `asset.delete` permission. + */ export function restoreAssets({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; }, opts?: Oazapfts.RequestOpts) { @@ -3813,6 +4266,9 @@ export function restoreAssets({ bulkIdsDto }: { body: bulkIdsDto }))); } +/** + * This endpoint requires the `user.read` permission. + */ export function searchUsers(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3821,6 +4277,9 @@ export function searchUsers(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `user.read` permission. + */ export function getMyUser(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3829,6 +4288,9 @@ export function getMyUser(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `user.update` permission. + */ export function updateMyUser({ userUpdateMeDto }: { userUpdateMeDto: UserUpdateMeDto; }, opts?: Oazapfts.RequestOpts) { @@ -3841,12 +4303,18 @@ export function updateMyUser({ userUpdateMeDto }: { body: userUpdateMeDto }))); } +/** + * This endpoint requires the `userLicense.delete` permission. + */ export function deleteUserLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/me/license", { ...opts, method: "DELETE" })); } +/** + * This endpoint requires the `userLicense.read` permission. + */ export function getUserLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3855,6 +4323,9 @@ export function getUserLicense(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `userLicense.update` permission. + */ export function setUserLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; }, opts?: Oazapfts.RequestOpts) { @@ -3867,12 +4338,18 @@ export function setUserLicense({ licenseKeyDto }: { body: licenseKeyDto }))); } +/** + * This endpoint requires the `userOnboarding.delete` permission. + */ export function deleteUserOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/me/onboarding", { ...opts, method: "DELETE" })); } +/** + * This endpoint requires the `userOnboarding.read` permission. + */ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3881,6 +4358,9 @@ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `userOnboarding.update` permission. + */ export function setUserOnboarding({ onboardingDto }: { onboardingDto: OnboardingDto; }, opts?: Oazapfts.RequestOpts) { @@ -3893,6 +4373,9 @@ export function setUserOnboarding({ onboardingDto }: { body: onboardingDto }))); } +/** + * This endpoint requires the `userPreference.read` permission. + */ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3901,6 +4384,9 @@ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * This endpoint requires the `userPreference.update` permission. + */ export function updateMyPreferences({ userPreferencesUpdateDto }: { userPreferencesUpdateDto: UserPreferencesUpdateDto; }, opts?: Oazapfts.RequestOpts) { @@ -3913,12 +4399,18 @@ export function updateMyPreferences({ userPreferencesUpdateDto }: { body: userPreferencesUpdateDto }))); } +/** + * This endpoint requires the `userProfileImage.delete` permission. + */ export function deleteProfileImage(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/profile-image", { ...opts, method: "DELETE" })); } +/** + * This endpoint requires the `userProfileImage.update` permission. + */ export function createProfileImage({ createProfileImageDto }: { createProfileImageDto: CreateProfileImageDto; }, opts?: Oazapfts.RequestOpts) { @@ -3931,6 +4423,9 @@ export function createProfileImage({ createProfileImageDto }: { body: createProfileImageDto }))); } +/** + * This endpoint requires the `user.read` permission. + */ export function getUser({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { @@ -3941,6 +4436,9 @@ export function getUser({ id }: { ...opts })); } +/** + * This endpoint requires the `userProfileImage.read` permission. + */ export function getProfileImage({ id }: { id: string; }, opts?: Oazapfts.RequestOpts) { diff --git a/server/src/enum.ts b/server/src/enum.ts index 666b9fc50..93d271f19 100644 --- a/server/src/enum.ts +++ b/server/src/enum.ts @@ -413,6 +413,11 @@ export enum LogLevel { Fatal = 'fatal', } +export enum ApiCustomExtension { + Permission = 'x-immich-permission', + AdminOnly = 'x-immich-admin-only', +} + export enum MetadataKey { AuthRoute = 'auth_route', AdminRoute = 'admin_route', diff --git a/server/src/middleware/auth.guard.ts b/server/src/middleware/auth.guard.ts index 38ff1c373..80d7a3743 100644 --- a/server/src/middleware/auth.guard.ts +++ b/server/src/middleware/auth.guard.ts @@ -10,7 +10,7 @@ import { Reflector } from '@nestjs/core'; import { ApiBearerAuth, ApiCookieAuth, ApiExtension, ApiOkResponse, ApiQuery, ApiSecurity } from '@nestjs/swagger'; import { Request } from 'express'; import { AuthDto } from 'src/dtos/auth.dto'; -import { ImmichQuery, MetadataKey, Permission } from 'src/enum'; +import { ApiCustomExtension, ImmichQuery, MetadataKey, Permission } from 'src/enum'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { AuthService, LoginDetails } from 'src/services/auth.service'; import { UAParser } from 'ua-parser-js'; @@ -19,16 +19,20 @@ type AdminRoute = { admin?: true }; type SharedLinkRoute = { sharedLink?: true }; type AuthenticatedOptions = { permission?: Permission } & (AdminRoute | SharedLinkRoute); -export const Authenticated = (options?: AuthenticatedOptions): MethodDecorator => { +export const Authenticated = (options: AuthenticatedOptions = {}): MethodDecorator => { const decorators: MethodDecorator[] = [ ApiBearerAuth(), ApiCookieAuth(), ApiSecurity(MetadataKey.ApiKeySecurity), - SetMetadata(MetadataKey.AuthRoute, options || {}), + SetMetadata(MetadataKey.AuthRoute, options), ]; + if ((options as AdminRoute).admin) { + decorators.push(ApiExtension(ApiCustomExtension.AdminOnly, true)); + } + if (options?.permission) { - decorators.push(ApiExtension('x-immich-permission', options.permission)); + decorators.push(ApiExtension(ApiCustomExtension.Permission, options.permission ?? Permission.All)); } if ((options as SharedLinkRoute)?.sharedLink) { diff --git a/server/src/utils/misc.ts b/server/src/utils/misc.ts index 3acb72b66..a32632b52 100644 --- a/server/src/utils/misc.ts +++ b/server/src/utils/misc.ts @@ -6,7 +6,11 @@ import { SwaggerDocumentOptions, SwaggerModule, } from '@nestjs/swagger'; -import { ReferenceObject, SchemaObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface'; +import { + OperationObject, + ReferenceObject, + SchemaObject, +} from '@nestjs/swagger/dist/interfaces/open-api-spec.interface'; import _ from 'lodash'; import { writeFileSync } from 'node:fs'; import path from 'node:path'; @@ -15,7 +19,7 @@ import parse from 'picomatch/lib/parse'; import { SystemConfig } from 'src/config'; import { CLIP_MODEL_INFO, serverVersion } from 'src/constants'; import { extraSyncModels } from 'src/dtos/sync.dto'; -import { ImmichCookie, ImmichHeader, MetadataKey } from 'src/enum'; +import { ApiCustomExtension, ImmichCookie, ImmichHeader, MetadataKey } from 'src/enum'; import { LoggingRepository } from 'src/repositories/logging.repository'; export class ImmichStartupError extends Error {} @@ -198,7 +202,12 @@ const patchOpenAPI = (document: OpenAPIObject) => { trace: path.trace, }; - for (const operation of Object.values(operations)) { + for (const operation of Object.values(operations) as Array< + OperationObject & { + [ApiCustomExtension.AdminOnly]?: boolean; + [ApiCustomExtension.Permission]?: string; + } + >) { if (!operation) { continue; } @@ -211,12 +220,21 @@ const patchOpenAPI = (document: OpenAPIObject) => { // console.log(`${routeToErrorMessage(operation.operationId).padEnd(40)} (${operation.operationId})`); } - if (operation.description === '') { - delete operation.description; - } + const adminOnly = operation[ApiCustomExtension.AdminOnly] ?? false; + const permission = operation[ApiCustomExtension.Permission]; + if (permission) { + let description = (operation.description || '').trim(); + if (description && !description.endsWith('.')) { + description += '. '; + } - if (operation.parameters) { - operation.parameters = _.orderBy(operation.parameters, 'name'); + operation.description = + description + + `This endpoint ${adminOnly ? 'is an admin-only route, and ' : ''}requires the \`${permission}\` permission.`; + + if (operation.parameters) { + operation.parameters = _.orderBy(operation.parameters, 'name'); + } } } }