High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
refactor(server): controller cleanup (#11923)
Jason Rasmussen3be1aaaaa480
diff --git a/mobile/lib/services/api.service.dart b/mobile/lib/services/api.service.dartindex 6ff62d4b3a..4a3cfb19a2 100644--- a/mobile/lib/services/api.service.dart+++ b/mobile/lib/services/api.service.dart@@ -18,7 +18,7 @@ class ApiService implements Authentication {late AlbumsApi albumsApi;late AssetsApi assetsApi;late SearchApi searchApi;- late ServerInfoApi serverInfoApi;+ late ServerApi serverInfoApi;late MapApi mapApi;late PartnersApi partnersApi;late PeopleApi peopleApi;@@ -50,7 +50,7 @@ class ApiService implements Authentication {oAuthApi = OAuthApi(_apiClient);albumsApi = AlbumsApi(_apiClient);assetsApi = AssetsApi(_apiClient);- serverInfoApi = ServerInfoApi(_apiClient);+ serverInfoApi = ServerApi(_apiClient);searchApi = SearchApi(_apiClient);mapApi = MapApi(_apiClient);partnersApi = PartnersApi(_apiClient);diff --git a/mobile/openapi/README.md b/mobile/openapi/README.mdindex c49b5052d8..4e7dfb35fe 100644--- a/mobile/openapi/README.md+++ b/mobile/openapi/README.md@@ -115,16 +115,7 @@ Class | Method | HTTP request | Description*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout |*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up |*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |-*DeprecatedApi* | [**getAboutInfo**](doc//DeprecatedApi.md#getaboutinfo) | **GET** /server-info/about |*DeprecatedApi* | [**getPersonAssets**](doc//DeprecatedApi.md#getpersonassets) | **GET** /people/{id}/assets |-*DeprecatedApi* | [**getServerConfig**](doc//DeprecatedApi.md#getserverconfig) | **GET** /server-info/config |-*DeprecatedApi* | [**getServerFeatures**](doc//DeprecatedApi.md#getserverfeatures) | **GET** /server-info/features |-*DeprecatedApi* | [**getServerStatistics**](doc//DeprecatedApi.md#getserverstatistics) | **GET** /server-info/statistics |-*DeprecatedApi* | [**getServerVersion**](doc//DeprecatedApi.md#getserverversion) | **GET** /server-info/version |-*DeprecatedApi* | [**getStorage**](doc//DeprecatedApi.md#getstorage) | **GET** /server-info/storage |-*DeprecatedApi* | [**getSupportedMediaTypes**](doc//DeprecatedApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |-*DeprecatedApi* | [**getTheme**](doc//DeprecatedApi.md#gettheme) | **GET** /server-info/theme |-*DeprecatedApi* | [**pingServer**](doc//DeprecatedApi.md#pingserver) | **GET** /server-info/ping |*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive |*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info |*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates |@@ -182,17 +173,17 @@ Class | Method | HTTP request | Description*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places |*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart |*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license |+*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about |+*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config |+*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features |*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license |+*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics |+*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version |+*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage |+*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types |+*ServerApi* | [**getTheme**](doc//ServerApi.md#gettheme) | **GET** /server/theme |+*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping |*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license |-*ServerInfoApi* | [**getAboutInfo**](doc//ServerInfoApi.md#getaboutinfo) | **GET** /server-info/about |-*ServerInfoApi* | [**getServerConfig**](doc//ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |-*ServerInfoApi* | [**getServerFeatures**](doc//ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |-*ServerInfoApi* | [**getServerStatistics**](doc//ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics |-*ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version |-*ServerInfoApi* | [**getStorage**](doc//ServerInfoApi.md#getstorage) | **GET** /server-info/storage |-*ServerInfoApi* | [**getSupportedMediaTypes**](doc//ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |-*ServerInfoApi* | [**getTheme**](doc//ServerInfoApi.md#gettheme) | **GET** /server-info/theme |-*ServerInfoApi* | [**pingServer**](doc//ServerInfoApi.md#pingserver) | **GET** /server-info/ping |*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions |*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} |*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions |diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dartindex a6f860dda2..1179bff56d 100644--- a/mobile/openapi/lib/api.dart+++ b/mobile/openapi/lib/api.dart@@ -51,7 +51,6 @@ part 'api/partners_api.dart';part 'api/people_api.dart';part 'api/search_api.dart';part 'api/server_api.dart';-part 'api/server_info_api.dart';part 'api/sessions_api.dart';part 'api/shared_links_api.dart';part 'api/stacks_api.dart';diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dartindex e1e09ae4b2..96cb3c2ef0 100644--- a/mobile/openapi/lib/api/deprecated_api.dart+++ b/mobile/openapi/lib/api/deprecated_api.dart@@ -16,50 +16,6 @@ class DeprecatedApi {final ApiClient apiClient;- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getAboutInfoWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/about';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerAboutResponseDto?> getAboutInfo() async {- final response = await getAboutInfoWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerAboutResponseDto',) as ServerAboutResponseDto;-- }- return null;- }-/// This property was deprecated in v1.113.0////// Note: This method returns the HTTP [Response].@@ -115,356 +71,4 @@ class DeprecatedApi {}return null;}-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerConfigWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/config';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerConfigDto?> getServerConfig() async {- final response = await getServerConfigWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerConfigDto',) as ServerConfigDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerFeaturesWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/features';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerFeaturesDto?> getServerFeatures() async {- final response = await getServerFeaturesWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerFeaturesDto',) as ServerFeaturesDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerStatisticsWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/statistics';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerStatsResponseDto?> getServerStatistics() async {- final response = await getServerStatisticsWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStatsResponseDto',) as ServerStatsResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerVersionWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/version';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerVersionResponseDto?> getServerVersion() async {- final response = await getServerVersionWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerVersionResponseDto',) as ServerVersionResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getStorageWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/storage';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerStorageResponseDto?> getStorage() async {- final response = await getStorageWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStorageResponseDto',) as ServerStorageResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getSupportedMediaTypesWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/media-types';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerMediaTypesResponseDto?> getSupportedMediaTypes() async {- final response = await getSupportedMediaTypesWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getThemeWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/theme';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerThemeDto?> getTheme() async {- final response = await getThemeWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerThemeDto',) as ServerThemeDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> pingServerWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/ping';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerPingResponse?> pingServer() async {- final response = await pingServerWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerPingResponse',) as ServerPingResponse;-- }- return null;- }}diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dartindex 9cb52514c2..bde8d595b6 100644--- a/mobile/openapi/lib/api/server_api.dart+++ b/mobile/openapi/lib/api/server_api.dart@@ -49,6 +49,129 @@ class ServerApi {}}+ /// Performs an HTTP 'GET /server/about' operation and returns the [Response].+ Future<Response> getAboutInfoWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/about';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerAboutResponseDto?> getAboutInfo() async {+ final response = await getAboutInfoWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerAboutResponseDto',) as ServerAboutResponseDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/config' operation and returns the [Response].+ Future<Response> getServerConfigWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/config';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerConfigDto?> getServerConfig() async {+ final response = await getServerConfigWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerConfigDto',) as ServerConfigDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/features' operation and returns the [Response].+ Future<Response> getServerFeaturesWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/features';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerFeaturesDto?> getServerFeatures() async {+ final response = await getServerFeaturesWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerFeaturesDto',) as ServerFeaturesDto;++ }+ return null;+ }+/// Performs an HTTP 'GET /server/license' operation and returns the [Response].Future<Response> getServerLicenseWithHttpInfo() async {// ignore: prefer_const_declarations@@ -90,6 +213,252 @@ class ServerApi {return null;}+ /// Performs an HTTP 'GET /server/statistics' operation and returns the [Response].+ Future<Response> getServerStatisticsWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/statistics';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerStatsResponseDto?> getServerStatistics() async {+ final response = await getServerStatisticsWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStatsResponseDto',) as ServerStatsResponseDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/version' operation and returns the [Response].+ Future<Response> getServerVersionWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/version';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerVersionResponseDto?> getServerVersion() async {+ final response = await getServerVersionWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerVersionResponseDto',) as ServerVersionResponseDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/storage' operation and returns the [Response].+ Future<Response> getStorageWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/storage';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerStorageResponseDto?> getStorage() async {+ final response = await getStorageWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStorageResponseDto',) as ServerStorageResponseDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/media-types' operation and returns the [Response].+ Future<Response> getSupportedMediaTypesWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/media-types';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerMediaTypesResponseDto?> getSupportedMediaTypes() async {+ final response = await getSupportedMediaTypesWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/theme' operation and returns the [Response].+ Future<Response> getThemeWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/theme';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerThemeDto?> getTheme() async {+ final response = await getThemeWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerThemeDto',) as ServerThemeDto;++ }+ return null;+ }++ /// Performs an HTTP 'GET /server/ping' operation and returns the [Response].+ Future<Response> pingServerWithHttpInfo() async {+ // ignore: prefer_const_declarations+ final path = r'/server/ping';++ // ignore: prefer_final_locals+ Object? postBody;++ final queryParams = <QueryParam>[];+ final headerParams = <String, String>{};+ final formParams = <String, String>{};++ const contentTypes = <String>[];+++ return apiClient.invokeAPI(+ path,+ 'GET',+ queryParams,+ postBody,+ headerParams,+ formParams,+ contentTypes.isEmpty ? null : contentTypes.first,+ );+ }++ Future<ServerPingResponse?> pingServer() async {+ final response = await pingServerWithHttpInfo();+ if (response.statusCode >= HttpStatus.badRequest) {+ throw ApiException(response.statusCode, await _decodeBodyBytes(response));+ }+ // When a remote server returns no body with a status of 204, we shall not decode it.+ // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"+ // FormatException when trying to decode an empty string.+ if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {+ return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerPingResponse',) as ServerPingResponse;++ }+ return null;+ }+/// Performs an HTTP 'PUT /server/license' operation and returns the [Response]./// Parameters:///diff --git a/mobile/openapi/lib/api/server_info_api.dart b/mobile/openapi/lib/api/server_info_api.dartdeleted file mode 100644index dc58a94fd0..0000000000--- a/mobile/openapi/lib/api/server_info_api.dart+++ /dev/null@@ -1,414 +0,0 @@-//-// AUTO-GENERATED FILE, DO NOT MODIFY!-//-// @dart=2.18--// ignore_for_file: unused_element, unused_import-// ignore_for_file: always_put_required_named_parameters_first-// ignore_for_file: constant_identifier_names-// ignore_for_file: lines_longer_than_80_chars--part of openapi.api;---class ServerInfoApi {- ServerInfoApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;-- final ApiClient apiClient;-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getAboutInfoWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/about';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerAboutResponseDto?> getAboutInfo() async {- final response = await getAboutInfoWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerAboutResponseDto',) as ServerAboutResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerConfigWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/config';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerConfigDto?> getServerConfig() async {- final response = await getServerConfigWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerConfigDto',) as ServerConfigDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerFeaturesWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/features';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerFeaturesDto?> getServerFeatures() async {- final response = await getServerFeaturesWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerFeaturesDto',) as ServerFeaturesDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerStatisticsWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/statistics';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerStatsResponseDto?> getServerStatistics() async {- final response = await getServerStatisticsWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStatsResponseDto',) as ServerStatsResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getServerVersionWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/version';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerVersionResponseDto?> getServerVersion() async {- final response = await getServerVersionWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerVersionResponseDto',) as ServerVersionResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getStorageWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/storage';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerStorageResponseDto?> getStorage() async {- final response = await getStorageWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStorageResponseDto',) as ServerStorageResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getSupportedMediaTypesWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/media-types';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerMediaTypesResponseDto?> getSupportedMediaTypes() async {- final response = await getSupportedMediaTypesWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> getThemeWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/theme';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerThemeDto?> getTheme() async {- final response = await getThemeWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerThemeDto',) as ServerThemeDto;-- }- return null;- }-- /// This property was deprecated in v1.107.0- ///- /// Note: This method returns the HTTP [Response].- Future<Response> pingServerWithHttpInfo() async {- // ignore: prefer_const_declarations- final path = r'/server-info/ping';-- // ignore: prefer_final_locals- Object? postBody;-- final queryParams = <QueryParam>[];- final headerParams = <String, String>{};- final formParams = <String, String>{};-- const contentTypes = <String>[];--- return apiClient.invokeAPI(- path,- 'GET',- queryParams,- postBody,- headerParams,- formParams,- contentTypes.isEmpty ? null : contentTypes.first,- );- }-- /// This property was deprecated in v1.107.0- Future<ServerPingResponse?> pingServer() async {- final response = await pingServerWithHttpInfo();- if (response.statusCode >= HttpStatus.badRequest) {- throw ApiException(response.statusCode, await _decodeBodyBytes(response));- }- // When a remote server returns no body with a status of 204, we shall not decode it.- // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"- // FormatException when trying to decode an empty string.- if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {- return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerPingResponse',) as ServerPingResponse;-- }- return null;- }-}diff --git a/mobile/openapi/lib/model/permission.dart b/mobile/openapi/lib/model/permission.dartindex 3a9b61d81c..3f89c9826d 100644--- a/mobile/openapi/lib/model/permission.dart+++ b/mobile/openapi/lib/model/permission.dart@@ -36,7 +36,6 @@ class Permission {static const assetPeriodRead = Permission._(r'asset.read');static const assetPeriodUpdate = Permission._(r'asset.update');static const assetPeriodDelete = Permission._(r'asset.delete');- static const assetPeriodRestore = Permission._(r'asset.restore');static const assetPeriodShare = Permission._(r'asset.share');static const assetPeriodView = Permission._(r'asset.view');static const assetPeriodDownload = Permission._(r'asset.download');@@ -78,6 +77,9 @@ class Permission {static const personPeriodStatistics = Permission._(r'person.statistics');static const personPeriodMerge = Permission._(r'person.merge');static const personPeriodReassign = Permission._(r'person.reassign');+ static const sessionPeriodRead = Permission._(r'session.read');+ static const sessionPeriodUpdate = Permission._(r'session.update');+ static const sessionPeriodDelete = Permission._(r'session.delete');static const sharedLinkPeriodCreate = Permission._(r'sharedLink.create');static const sharedLinkPeriodRead = Permission._(r'sharedLink.read');static const sharedLinkPeriodUpdate = Permission._(r'sharedLink.update');@@ -114,7 +116,6 @@ class Permission {assetPeriodRead,assetPeriodUpdate,assetPeriodDelete,- assetPeriodRestore,assetPeriodShare,assetPeriodView,assetPeriodDownload,@@ -156,6 +157,9 @@ class Permission {personPeriodStatistics,personPeriodMerge,personPeriodReassign,+ sessionPeriodRead,+ sessionPeriodUpdate,+ sessionPeriodDelete,sharedLinkPeriodCreate,sharedLinkPeriodRead,sharedLinkPeriodUpdate,@@ -227,7 +231,6 @@ class PermissionTypeTransformer {case r'asset.read': return Permission.assetPeriodRead;case r'asset.update': return Permission.assetPeriodUpdate;case r'asset.delete': return Permission.assetPeriodDelete;- case r'asset.restore': return Permission.assetPeriodRestore;case r'asset.share': return Permission.assetPeriodShare;case r'asset.view': return Permission.assetPeriodView;case r'asset.download': return Permission.assetPeriodDownload;@@ -269,6 +272,9 @@ class PermissionTypeTransformer {case r'person.statistics': return Permission.personPeriodStatistics;case r'person.merge': return Permission.personPeriodMerge;case r'person.reassign': return Permission.personPeriodReassign;+ case r'session.read': return Permission.sessionPeriodRead;+ case r'session.update': return Permission.sessionPeriodUpdate;+ case r'session.delete': return Permission.sessionPeriodDelete;case r'sharedLink.create': return Permission.sharedLinkPeriodCreate;case r'sharedLink.read': return Permission.sharedLinkPeriodRead;case r'sharedLink.update': return Permission.sharedLinkPeriodUpdate;diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.jsonindex 16c25562a6..35fecdb1ee 100644--- a/open-api/immich-openapi-specs.json+++ b/open-api/immich-openapi-specs.json@@ -3643,7 +3643,7 @@"operationId": "unlinkOAuthAccount","parameters": [],"responses": {- "201": {+ "200": {"content": {"application/json": {"schema": {@@ -4771,10 +4771,8 @@]}},- "/server-info/about": {+ "/server/about": {"get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0","operationId": "getAboutInfo","parameters": [],"responses": {@@ -4801,18 +4799,12 @@}],"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }+ "Server"+ ]}},- "/server-info/config": {+ "/server/config": {"get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0","operationId": "getServerConfig","parameters": [],"responses": {@@ -4828,18 +4820,12 @@}},"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }+ "Server"+ ]}},- "/server-info/features": {+ "/server/features": {"get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0","operationId": "getServerFeatures","parameters": [],"responses": {@@ -4855,84 +4841,50 @@}},"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }+ "Server"+ ]}},- "/server-info/media-types": {- "get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0",- "operationId": "getSupportedMediaTypes",+ "/server/license": {+ "delete": {+ "operationId": "deleteServerLicense","parameters": [],"responses": {"200": {- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/ServerMediaTypesResponseDto"- }- }- },"description": ""}},- "tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }- }- },- "/server-info/ping": {- "get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0",- "operationId": "pingServer",- "parameters": [],- "responses": {- "200": {- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/ServerPingResponse"- }- }- },- "description": ""+ "security": [+ {+ "bearer": []+ },+ {+ "cookie": []+ },+ {+ "api_key": []}- },- "tags": [- "Server Info",- "Deprecated"],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }- }- },- "/server-info/statistics": {+ "tags": [+ "Server"+ ]+ },"get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0",- "operationId": "getServerStatistics",+ "operationId": "getServerLicense","parameters": [],"responses": {"200": {"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ServerStatsResponseDto"+ "$ref": "#/components/schemas/LicenseResponseDto"}}},"description": ""+ },+ "404": {+ "description": ""}},"security": [@@ -4947,26 +4899,28 @@}],"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }- }- },- "/server-info/storage": {- "get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0",- "operationId": "getStorage",+ "Server"+ ]+ },+ "put": {+ "operationId": "setServerLicense","parameters": [],+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/LicenseKeyDto"+ }+ }+ },+ "required": true+ },"responses": {"200": {"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ServerStorageResponseDto"+ "$ref": "#/components/schemas/LicenseResponseDto"}}},@@ -4985,26 +4939,20 @@}],"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }+ "Server"+ ]}},- "/server-info/theme": {+ "/server/media-types": {"get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0",- "operationId": "getTheme",+ "operationId": "getSupportedMediaTypes","parameters": [],"responses": {"200": {"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ServerThemeDto"+ "$ref": "#/components/schemas/ServerMediaTypesResponseDto"}}},@@ -5012,26 +4960,20 @@}},"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }+ "Server"+ ]}},- "/server-info/version": {+ "/server/ping": {"get": {- "deprecated": true,- "description": "This property was deprecated in v1.107.0",- "operationId": "getServerVersion",+ "operationId": "pingServer","parameters": [],"responses": {"200": {"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/ServerVersionResponseDto"+ "$ref": "#/components/schemas/ServerPingResponse"}}},@@ -5039,20 +4981,23 @@}},"tags": [- "Server Info",- "Deprecated"- ],- "x-immich-lifecycle": {- "deprecatedAt": "v1.107.0"- }+ "Server"+ ]}},- "/server/license": {- "delete": {- "operationId": "deleteServerLicense",+ "/server/statistics": {+ "get": {+ "operationId": "getServerStatistics","parameters": [],"responses": {"200": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ServerStatsResponseDto"+ }+ }+ },"description": ""}},@@ -5070,23 +5015,22 @@"tags": ["Server"]- },+ }+ },+ "/server/storage": {"get": {- "operationId": "getServerLicense",+ "operationId": "getStorage","parameters": [],"responses": {"200": {"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/LicenseResponseDto"+ "$ref": "#/components/schemas/ServerStorageResponseDto"}}},"description": ""- },- "404": {- "description": ""}},"security": [@@ -5103,43 +5047,45 @@"tags": ["Server"]- },- "put": {- "operationId": "setServerLicense",+ }+ },+ "/server/theme": {+ "get": {+ "operationId": "getTheme","parameters": [],- "requestBody": {- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/LicenseKeyDto"+ "responses": {+ "200": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ServerThemeDto"+ }}- }- },- "required": true+ },+ "description": ""+ }},+ "tags": [+ "Server"+ ]+ }+ },+ "/server/version": {+ "get": {+ "operationId": "getServerVersion",+ "parameters": [],"responses": {"200": {"content": {"application/json": {"schema": {- "$ref": "#/components/schemas/LicenseResponseDto"+ "$ref": "#/components/schemas/ServerVersionResponseDto"}}},"description": ""}},- "security": [- {- "bearer": []- },- {- "cookie": []- },- {- "api_key": []- }- ],"tags": ["Server"]@@ -9972,7 +9918,6 @@"asset.read","asset.update","asset.delete",- "asset.restore","asset.share","asset.view","asset.download",@@ -10014,6 +9959,9 @@"person.statistics","person.merge","person.reassign",+ "session.read",+ "session.update",+ "session.delete","sharedLink.create","sharedLink.read","sharedLink.update",diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.tsindex c6d8d3e3ba..80394ad901 100644--- a/open-api/typescript-sdk/src/fetch-client.ts+++ b/open-api/typescript-sdk/src/fetch-client.ts@@ -869,6 +869,15 @@ export type ServerFeaturesDto = {smartSearch: boolean;trash: boolean;};+export type LicenseResponseDto = {+ activatedAt: string;+ activationKey: string;+ licenseKey: string;+};+export type LicenseKeyDto = {+ activationKey: string;+ licenseKey: string;+};export type ServerMediaTypesResponseDto = {image: string[];sidecar: string[];@@ -909,15 +918,6 @@ export type ServerVersionResponseDto = {minor: number;patch: number;};-export type LicenseResponseDto = {- activatedAt: string;- activationKey: string;- licenseKey: string;-};-export type LicenseKeyDto = {- activationKey: string;- licenseKey: string;-};export type SessionResponseDto = {createdAt: string;current: boolean;@@ -2168,7 +2168,7 @@ export function redirectOAuthToMobile(opts?: Oazapfts.RequestOpts) {}export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{- status: 201;+ status: 200;data: UserAdminResponseDto;}>("/oauth/unlink", {...opts,@@ -2458,133 +2458,106 @@ export function getSearchSuggestions({ country, includeNull, make, model, state,...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getAboutInfo(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerAboutResponseDto;- }>("/server-info/about", {+ }>("/server/about", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getServerConfig(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerConfigDto;- }>("/server-info/config", {+ }>("/server/config", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getServerFeatures(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerFeaturesDto;- }>("/server-info/features", {+ }>("/server/features", {...opts}));}-/**- * This property was deprecated in v1.107.0- */+export function deleteServerLicense(opts?: Oazapfts.RequestOpts) {+ return oazapfts.ok(oazapfts.fetchText("/server/license", {+ ...opts,+ method: "DELETE"+ }));+}+export function getServerLicense(opts?: Oazapfts.RequestOpts) {+ return oazapfts.ok(oazapfts.fetchJson<{+ status: 200;+ data: LicenseResponseDto;+ } | {+ status: 404;+ }>("/server/license", {+ ...opts+ }));+}+export function setServerLicense({ licenseKeyDto }: {+ licenseKeyDto: LicenseKeyDto;+}, opts?: Oazapfts.RequestOpts) {+ return oazapfts.ok(oazapfts.fetchJson<{+ status: 200;+ data: LicenseResponseDto;+ }>("/server/license", oazapfts.json({+ ...opts,+ method: "PUT",+ body: licenseKeyDto+ })));+}export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerMediaTypesResponseDto;- }>("/server-info/media-types", {+ }>("/server/media-types", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function pingServer(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerPingResponseRead;- }>("/server-info/ping", {+ }>("/server/ping", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getServerStatistics(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerStatsResponseDto;- }>("/server-info/statistics", {+ }>("/server/statistics", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getStorage(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerStorageResponseDto;- }>("/server-info/storage", {+ }>("/server/storage", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getTheme(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerThemeDto;- }>("/server-info/theme", {+ }>("/server/theme", {...opts}));}-/**- * This property was deprecated in v1.107.0- */export function getServerVersion(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchJson<{status: 200;data: ServerVersionResponseDto;- }>("/server-info/version", {+ }>("/server/version", {...opts}));}-export function deleteServerLicense(opts?: Oazapfts.RequestOpts) {- return oazapfts.ok(oazapfts.fetchText("/server/license", {- ...opts,- method: "DELETE"- }));-}-export function getServerLicense(opts?: Oazapfts.RequestOpts) {- return oazapfts.ok(oazapfts.fetchJson<{- status: 200;- data: LicenseResponseDto;- } | {- status: 404;- }>("/server/license", {- ...opts- }));-}-export function setServerLicense({ licenseKeyDto }: {- licenseKeyDto: LicenseKeyDto;-}, opts?: Oazapfts.RequestOpts) {- return oazapfts.ok(oazapfts.fetchJson<{- status: 200;- data: LicenseResponseDto;- }>("/server/license", oazapfts.json({- ...opts,- method: "PUT",- body: licenseKeyDto- })));-}export function deleteAllSessions(opts?: Oazapfts.RequestOpts) {return oazapfts.ok(oazapfts.fetchText("/sessions", {...opts,@@ -3205,7 +3178,6 @@ export enum Permission {AssetRead = "asset.read",AssetUpdate = "asset.update",AssetDelete = "asset.delete",- AssetRestore = "asset.restore",AssetShare = "asset.share",AssetView = "asset.view",AssetDownload = "asset.download",@@ -3247,6 +3219,9 @@ export enum Permission {PersonStatistics = "person.statistics",PersonMerge = "person.merge",PersonReassign = "person.reassign",+ SessionRead = "session.read",+ SessionUpdate = "session.update",+ SessionDelete = "session.delete",SharedLinkCreate = "sharedLink.create",SharedLinkRead = "sharedLink.read",SharedLinkUpdate = "sharedLink.update",diff --git a/server/src/controllers/activity.controller.ts b/server/src/controllers/activity.controller.tsindex 9b06f82f3a..b91f2902d5 100644--- a/server/src/controllers/activity.controller.ts+++ b/server/src/controllers/activity.controller.ts@@ -25,12 +25,6 @@ export class ActivityController {return this.service.getAll(auth, dto);}- @Get('statistics')- @Authenticated({ permission: Permission.ACTIVITY_STATISTICS })- getActivityStatistics(@Auth() auth: AuthDto, @Query() dto: ActivityDto): Promise<ActivityStatisticsResponseDto> {- return this.service.getStatistics(auth, dto);- }-@Post()@Authenticated({ permission: Permission.ACTIVITY_CREATE })async createActivity(@@ -45,6 +39,12 @@ export class ActivityController {return value;}+ @Get('statistics')+ @Authenticated({ permission: Permission.ACTIVITY_STATISTICS })+ getActivityStatistics(@Auth() auth: AuthDto, @Query() dto: ActivityDto): Promise<ActivityStatisticsResponseDto> {+ return this.service.getStatistics(auth, dto);+ }+@Delete(':id')@HttpCode(HttpStatus.NO_CONTENT)@Authenticated({ permission: Permission.ACTIVITY_DELETE })diff --git a/server/src/controllers/asset-media.controller.ts b/server/src/controllers/asset-media.controller.tsindex 48fea8b8a6..fb5ec58f25 100644--- a/server/src/controllers/asset-media.controller.ts+++ b/server/src/controllers/asset-media.controller.ts@@ -93,8 +93,8 @@ export class AssetMediaController {@Put(':id/original')@UseInterceptors(FileUploadInterceptor)@ApiConsumes('multipart/form-data')- @Authenticated({ sharedLink: true })@EndpointLifecycle({ addedAt: 'v1.106.0' })+ @Authenticated({ sharedLink: true })async replaceAsset(@Auth() auth: AuthDto,@Param() { id }: UUIDParamDto,diff --git a/server/src/controllers/asset.controller.ts b/server/src/controllers/asset.controller.tsindex f275aa7242..c6fdac1710 100644--- a/server/src/controllers/asset.controller.ts+++ b/server/src/controllers/asset.controller.ts@@ -51,8 +51,8 @@ export class AssetController {}@Post('jobs')- @HttpCode(HttpStatus.NO_CONTENT)@Authenticated()+ @HttpCode(HttpStatus.NO_CONTENT)runAssetJobs(@Auth() auth: AuthDto, @Body() dto: AssetJobsDto): Promise<void> {return this.service.run(auth, dto);}diff --git a/server/src/controllers/library.controller.ts b/server/src/controllers/library.controller.tsindex 18ba43c0a6..a45617fc2a 100644--- a/server/src/controllers/library.controller.ts+++ b/server/src/controllers/library.controller.ts@@ -31,18 +31,18 @@ export class LibraryController {return this.service.create(dto);}- @Put(':id')- @Authenticated({ permission: Permission.LIBRARY_UPDATE, admin: true })- updateLibrary(@Param() { id }: UUIDParamDto, @Body() dto: UpdateLibraryDto): Promise<LibraryResponseDto> {- return this.service.update(id, dto);- }-@Get(':id')@Authenticated({ permission: Permission.LIBRARY_READ, admin: true })getLibrary(@Param() { id }: UUIDParamDto): Promise<LibraryResponseDto> {return this.service.get(id);}+ @Put(':id')+ @Authenticated({ permission: Permission.LIBRARY_UPDATE, admin: true })+ updateLibrary(@Param() { id }: UUIDParamDto, @Body() dto: UpdateLibraryDto): Promise<LibraryResponseDto> {+ return this.service.update(id, dto);+ }+@Post(':id/validate')@HttpCode(200)@Authenticated({ admin: true })diff --git a/server/src/controllers/notification.controller.ts b/server/src/controllers/notification.controller.tsindex cc07022a93..2772e93b5d 100644--- a/server/src/controllers/notification.controller.ts+++ b/server/src/controllers/notification.controller.ts@@ -1,4 +1,4 @@-import { Body, Controller, HttpCode, Post } from '@nestjs/common';+import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';import { ApiTags } from '@nestjs/swagger';import { AuthDto } from 'src/dtos/auth.dto';import { SystemConfigSmtpDto } from 'src/dtos/system-config.dto';@@ -11,7 +11,7 @@ export class NotificationController {constructor(private service: NotificationService) {}@Post('test-email')- @HttpCode(200)+ @HttpCode(HttpStatus.OK)@Authenticated({ admin: true })sendTestEmail(@Auth() auth: AuthDto, @Body() dto: SystemConfigSmtpDto) {return this.service.sendTestEmail(auth.user.id, dto);diff --git a/server/src/controllers/oauth.controller.ts b/server/src/controllers/oauth.controller.tsindex 764e67d676..b733dc612b 100644--- a/server/src/controllers/oauth.controller.ts+++ b/server/src/controllers/oauth.controller.ts@@ -1,4 +1,4 @@-import { Body, Controller, Get, HttpStatus, Post, Redirect, Req, Res } from '@nestjs/common';+import { Body, Controller, Get, HttpCode, HttpStatus, Post, Redirect, Req, Res } from '@nestjs/common';import { ApiTags } from '@nestjs/swagger';import { Request, Response } from 'express';import { AuthType } from 'src/constants';@@ -58,6 +58,7 @@ export class OAuthController {}@Post('unlink')+ @HttpCode(HttpStatus.OK)@Authenticated()unlinkOAuthAccount(@Auth() auth: AuthDto): Promise<UserAdminResponseDto> {return this.service.unlink(auth);diff --git a/server/src/controllers/partner.controller.ts b/server/src/controllers/partner.controller.tsindex 0662243d61..6830fdd52f 100644--- a/server/src/controllers/partner.controller.ts+++ b/server/src/controllers/partner.controller.ts@@ -1,9 +1,8 @@import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';-import { ApiQuery, ApiTags } from '@nestjs/swagger';+import { ApiTags } from '@nestjs/swagger';import { AuthDto } from 'src/dtos/auth.dto';import { PartnerResponseDto, PartnerSearchDto, UpdatePartnerDto } from 'src/dtos/partner.dto';import { Permission } from 'src/enum';-import { PartnerDirection } from 'src/interfaces/partner.interface';import { Auth, Authenticated } from 'src/middleware/auth.guard';import { PartnerService } from 'src/services/partner.service';import { UUIDParamDto } from 'src/validation';@@ -14,9 +13,7 @@ export class PartnerController {constructor(private service: PartnerService) {}@Get()- @ApiQuery({ name: 'direction', type: 'string', enum: PartnerDirection, required: true })@Authenticated({ permission: Permission.PARTNER_READ })- // TODO: remove 'direction' and convert to full query dtogetPartners(@Auth() auth: AuthDto, @Query() dto: PartnerSearchDto): Promise<PartnerResponseDto[]> {return this.service.search(auth, dto);}diff --git a/server/src/controllers/server-info.controller.ts b/server/src/controllers/server-info.controller.tsindex 812016f4eb..245bbbd347 100644--- a/server/src/controllers/server-info.controller.ts+++ b/server/src/controllers/server-info.controller.ts@@ -1,5 +1,5 @@import { Controller, Get } from '@nestjs/common';-import { ApiTags } from '@nestjs/swagger';+import { ApiExcludeController, ApiTags } from '@nestjs/swagger';import { EndpointLifecycle } from 'src/decorators';import {ServerAboutResponseDto,@@ -16,6 +16,7 @@ import { Authenticated } from 'src/middleware/auth.guard';import { ServerService } from 'src/services/server.service';import { VersionService } from 'src/services/version.service';+@ApiExcludeController()@ApiTags('Server Info')@Controller('server-info')export class ServerInfoController {@@ -68,9 +69,9 @@ export class ServerInfoController {return this.service.getConfig();}- @Authenticated({ admin: true })- @EndpointLifecycle({ deprecatedAt: 'v1.107.0' })@Get('statistics')+ @EndpointLifecycle({ deprecatedAt: 'v1.107.0' })+ @Authenticated({ admin: true })getServerStatistics(): Promise<ServerStatsResponseDto> {return this.service.getStatistics();}diff --git a/server/src/controllers/server.controller.ts b/server/src/controllers/server.controller.tsindex 0c615223e2..75becfe341 100644--- a/server/src/controllers/server.controller.ts+++ b/server/src/controllers/server.controller.ts@@ -1,5 +1,5 @@import { Body, Controller, Delete, Get, Put } from '@nestjs/common';-import { ApiExcludeEndpoint, ApiNotFoundResponse, ApiTags } from '@nestjs/swagger';+import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger';import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto';import {ServerAboutResponseDto,@@ -26,57 +26,48 @@ export class ServerController {@Get('about')@Authenticated()- @ApiExcludeEndpoint()getAboutInfo(): Promise<ServerAboutResponseDto> {return this.service.getAboutInfo();}@Get('storage')@Authenticated()- @ApiExcludeEndpoint()getStorage(): Promise<ServerStorageResponseDto> {return this.service.getStorage();}@Get('ping')- @ApiExcludeEndpoint()pingServer(): ServerPingResponse {return this.service.ping();}@Get('version')- @ApiExcludeEndpoint()getServerVersion(): ServerVersionResponseDto {return this.versionService.getVersion();}@Get('features')- @ApiExcludeEndpoint()getServerFeatures(): Promise<ServerFeaturesDto> {return this.service.getFeatures();}@Get('theme')- @ApiExcludeEndpoint()getTheme(): Promise<ServerThemeDto> {return this.service.getTheme();}@Get('config')- @ApiExcludeEndpoint()getServerConfig(): Promise<ServerConfigDto> {return this.service.getConfig();}- @Authenticated({ admin: true })@Get('statistics')- @ApiExcludeEndpoint()+ @Authenticated({ admin: true })getServerStatistics(): Promise<ServerStatsResponseDto> {return this.service.getStatistics();}@Get('media-types')- @ApiExcludeEndpoint()getSupportedMediaTypes(): ServerMediaTypesResponseDto {return this.service.getSupportedMediaTypes();}diff --git a/server/src/controllers/session.controller.ts b/server/src/controllers/session.controller.tsindex a1fb4779a5..d526c2e599 100644--- a/server/src/controllers/session.controller.ts+++ b/server/src/controllers/session.controller.ts@@ -2,6 +2,7 @@ import { Controller, Delete, Get, HttpCode, HttpStatus, Param } from '@nestjs/coimport { ApiTags } from '@nestjs/swagger';import { AuthDto } from 'src/dtos/auth.dto';import { SessionResponseDto } from 'src/dtos/session.dto';+import { Permission } from 'src/enum';import { Auth, Authenticated } from 'src/middleware/auth.guard';import { SessionService } from 'src/services/session.service';import { UUIDParamDto } from 'src/validation';@@ -12,21 +13,21 @@ export class SessionController {constructor(private service: SessionService) {}@Get()- @Authenticated()+ @Authenticated({ permission: Permission.SESSION_READ })getSessions(@Auth() auth: AuthDto): Promise<SessionResponseDto[]> {return this.service.getAll(auth);}@Delete()+ @Authenticated({ permission: Permission.SESSION_DELETE })@HttpCode(HttpStatus.NO_CONTENT)- @Authenticated()deleteAllSessions(@Auth() auth: AuthDto): Promise<void> {return this.service.deleteAll(auth);}@Delete(':id')+ @Authenticated({ permission: Permission.SESSION_DELETE })@HttpCode(HttpStatus.NO_CONTENT)- @Authenticated()deleteSession(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<void> {return this.service.delete(auth, id);}diff --git a/server/src/controllers/stack.controller.ts b/server/src/controllers/stack.controller.tsindex 184fa96b38..188952eba5 100644--- a/server/src/controllers/stack.controller.ts+++ b/server/src/controllers/stack.controller.ts@@ -26,8 +26,8 @@ export class StackController {}@Delete()- @HttpCode(HttpStatus.NO_CONTENT)@Authenticated({ permission: Permission.STACK_DELETE })+ @HttpCode(HttpStatus.NO_CONTENT)deleteStacks(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise<void> {return this.service.deleteAll(auth, dto);}diff --git a/server/src/controllers/timeline.controller.ts b/server/src/controllers/timeline.controller.tsindex 53c62f70ed..92de84d346 100644--- a/server/src/controllers/timeline.controller.ts+++ b/server/src/controllers/timeline.controller.ts@@ -3,6 +3,7 @@ import { ApiTags } from '@nestjs/swagger';import { AssetResponseDto } from 'src/dtos/asset-response.dto';import { AuthDto } from 'src/dtos/auth.dto';import { TimeBucketAssetDto, TimeBucketDto, TimeBucketResponseDto } from 'src/dtos/time-bucket.dto';+import { Permission } from 'src/enum';import { Auth, Authenticated } from 'src/middleware/auth.guard';import { TimelineService } from 'src/services/timeline.service';@@ -11,14 +12,14 @@ import { TimelineService } from 'src/services/timeline.service';export class TimelineController {constructor(private service: TimelineService) {}- @Authenticated({ sharedLink: true })@Get('buckets')+ @Authenticated({ permission: Permission.ASSET_READ, sharedLink: true })getTimeBuckets(@Auth() auth: AuthDto, @Query() dto: TimeBucketDto): Promise<TimeBucketResponseDto[]> {return this.service.getTimeBuckets(auth, dto);}- @Authenticated({ sharedLink: true })@Get('bucket')+ @Authenticated({ permission: Permission.ASSET_READ, sharedLink: true })getTimeBucket(@Auth() auth: AuthDto, @Query() dto: TimeBucketAssetDto): Promise<AssetResponseDto[]> {return this.service.getTimeBucket(auth, dto) as Promise<AssetResponseDto[]>;}diff --git a/server/src/controllers/trash.controller.ts b/server/src/controllers/trash.controller.tsindex eae49d4ad1..20adbb11bb 100644--- a/server/src/controllers/trash.controller.ts+++ b/server/src/controllers/trash.controller.ts@@ -2,6 +2,7 @@ import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';import { ApiTags } from '@nestjs/swagger';import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto';import { AuthDto } from 'src/dtos/auth.dto';+import { Permission } from 'src/enum';import { Auth, Authenticated } from 'src/middleware/auth.guard';import { TrashService } from 'src/services/trash.service';@@ -12,21 +13,21 @@ export class TrashController {@Post('empty')@HttpCode(HttpStatus.NO_CONTENT)- @Authenticated()+ @Authenticated({ permission: Permission.ASSET_DELETE })emptyTrash(@Auth() auth: AuthDto): Promise<void> {return this.service.empty(auth);}@Post('restore')@HttpCode(HttpStatus.NO_CONTENT)- @Authenticated()+ @Authenticated({ permission: Permission.ASSET_DELETE })restoreTrash(@Auth() auth: AuthDto): Promise<void> {return this.service.restore(auth);}@Post('restore/assets')@HttpCode(HttpStatus.NO_CONTENT)- @Authenticated()+ @Authenticated({ permission: Permission.ASSET_DELETE })restoreAssets(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise<void> {return this.service.restoreAssets(auth, dto);}diff --git a/server/src/enum.ts b/server/src/enum.tsindex 64cb1f118a..25ccbf961e 100644--- a/server/src/enum.ts+++ b/server/src/enum.ts@@ -54,7 +54,6 @@ export enum Permission {ASSET_READ = 'asset.read',ASSET_UPDATE = 'asset.update',ASSET_DELETE = 'asset.delete',- ASSET_RESTORE = 'asset.restore',ASSET_SHARE = 'asset.share',ASSET_VIEW = 'asset.view',ASSET_DOWNLOAD = 'asset.download',@@ -107,6 +106,10 @@ export enum Permission {PERSON_MERGE = 'person.merge',PERSON_REASSIGN = 'person.reassign',+ SESSION_READ = 'session.read',+ SESSION_UPDATE = 'session.update',+ SESSION_DELETE = 'session.delete',+SHARED_LINK_CREATE = 'sharedLink.create',SHARED_LINK_READ = 'sharedLink.read',SHARED_LINK_UPDATE = 'sharedLink.update',diff --git a/server/src/services/trash.service.ts b/server/src/services/trash.service.tsindex f64aef0516..8376ba9221 100644--- a/server/src/services/trash.service.ts+++ b/server/src/services/trash.service.ts@@ -20,7 +20,7 @@ export class TrashService {async restoreAssets(auth: AuthDto, dto: BulkIdsDto): Promise<void> {const { ids } = dto;- await requireAccess(this.access, { auth, permission: Permission.ASSET_RESTORE, ids });+ await requireAccess(this.access, { auth, permission: Permission.ASSET_DELETE, ids });await this.restoreAndSend(auth, ids);}diff --git a/server/src/utils/access.ts b/server/src/utils/access.tsindex 9367b0987e..45badeec73 100644--- a/server/src/utils/access.ts+++ b/server/src/utils/access.ts@@ -147,10 +147,6 @@ const checkOtherAccess = async (access: IAccessRepository, request: OtherAccessRreturn await access.asset.checkOwnerAccess(auth.user.id, ids);}- case Permission.ASSET_RESTORE: {- return await access.asset.checkOwnerAccess(auth.user.id, ids);- }-case Permission.ALBUM_READ: {const isOwner = await access.album.checkOwnerAccess(auth.user.id, ids);const isShared = await access.album.checkSharedAlbumAccess(