chore: remove all deprecated endpoints/properties from server and mobile app (#9724)

* chore: remove deprecated title property from MemoryLaneResponseDto

* chore: remove deprecated webpPath and resizePath from MetadataSearchDto

* chore: remove deprecated sharedUserIds property from Album AddUsersDto

* chore: remove deprecated sharedUsers property from AlbumResponseDto

* chore: remove deprecated sharedWithUserIds property from CreateAlbumDto

* chore: remove deprecated isExternal and isReadOnly properties from AssetResponseDto

* chore: remove deprecated /server-info endpoint

* chore: bloody linters
This commit is contained in:
Zack Pollard 2024-05-24 15:37:01 +01:00 committed by GitHub
parent 1f5d82e9d9
commit 39d2c4f37b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 66 additions and 451 deletions

View File

@ -383,7 +383,6 @@ describe('/albums', () => {
description: '', description: '',
albumThumbnailAssetId: null, albumThumbnailAssetId: null,
shared: false, shared: false,
sharedUsers: [],
albumUsers: [], albumUsers: [],
hasSharedLink: false, hasSharedLink: false,
assets: [], assets: [],
@ -611,7 +610,11 @@ describe('/albums', () => {
expect(status).toBe(200); expect(status).toBe(200);
expect(body).toEqual( expect(body).toEqual(
expect.objectContaining({ expect.objectContaining({
sharedUsers: [expect.objectContaining({ id: user2.userId })], albumUsers: [
expect.objectContaining({
user: expect.objectContaining({ id: user2.userId }),
}),
],
}), }),
); );
}); });

View File

@ -15,16 +15,16 @@ describe('/server-info', () => {
nonAdmin = await utils.userSetup(admin.accessToken, createUserDto.user1); nonAdmin = await utils.userSetup(admin.accessToken, createUserDto.user1);
}); });
describe('GET /server-info', () => { describe('GET /server-info/storage', () => {
it('should require authentication', async () => { it('should require authentication', async () => {
const { status, body } = await request(app).get('/server-info'); const { status, body } = await request(app).get('/server-info/storage');
expect(status).toBe(401); expect(status).toBe(401);
expect(body).toEqual(errorDto.unauthorized); expect(body).toEqual(errorDto.unauthorized);
}); });
it('should return the disk information', async () => { it('should return the disk information', async () => {
const { status, body } = await request(app) const { status, body } = await request(app)
.get('/server-info') .get('/server-info/storage')
.set('Authorization', `Bearer ${admin.accessToken}`); .set('Authorization', `Bearer ${admin.accessToken}`);
expect(status).toBe(200); expect(status).toBe(200);
expect(body).toEqual({ expect(body).toEqual({

View File

@ -145,9 +145,10 @@ class Album {
.remoteIdEqualTo(dto.albumThumbnailAssetId) .remoteIdEqualTo(dto.albumThumbnailAssetId)
.findFirst(); .findFirst();
} }
if (dto.sharedUsers.isNotEmpty) { if (dto.albumUsers.isNotEmpty) {
final users = await db.users final users = await db.users.getAllById(
.getAllById(dto.sharedUsers.map((e) => e.id).toList(growable: false)); dto.albumUsers.map((e) => e.user.id).toList(growable: false),
);
a.sharedUsers.addAll(users.cast()); a.sharedUsers.addAll(users.cast());
} }
if (dto.assets.isNotEmpty) { if (dto.assets.isNotEmpty) {

View File

@ -180,7 +180,14 @@ class AlbumService {
CreateAlbumDto( CreateAlbumDto(
albumName: albumName, albumName: albumName,
assetIds: assets.map((asset) => asset.remoteId!).toList(), assetIds: assets.map((asset) => asset.remoteId!).toList(),
sharedWithUserIds: sharedUsers.map((e) => e.id).toList(), albumUsers: sharedUsers
.map(
(e) => AlbumUserCreateDto(
userId: e.id,
role: AlbumUserRole.editor,
),
)
.toList(),
), ),
); );
if (remote != null) { if (remote != null) {

View File

@ -8,6 +8,8 @@ import 'package:isar/isar.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:openapi/api.dart'; import 'package:openapi/api.dart';
import '../utils/string_helper.dart';
final memoryServiceProvider = StateProvider<MemoryService>((ref) { final memoryServiceProvider = StateProvider<MemoryService>((ref) {
return MemoryService( return MemoryService(
ref.watch(apiServiceProvider), ref.watch(apiServiceProvider),
@ -36,13 +38,13 @@ class MemoryService {
} }
List<Memory> memories = []; List<Memory> memories = [];
for (final MemoryLaneResponseDto(:title, :assets) in data) { for (final MemoryLaneResponseDto(:yearsAgo, :assets) in data) {
final dbAssets = final dbAssets =
await _db.assets.getAllByRemoteId(assets.map((e) => e.id)); await _db.assets.getAllByRemoteId(assets.map((e) => e.id));
if (dbAssets.isNotEmpty) { if (dbAssets.isNotEmpty) {
memories.add( memories.add(
Memory( Memory(
title: title, title: '$yearsAgo year${s(yearsAgo)} ago',
assets: dbAssets, assets: dbAssets,
), ),
); );

View File

@ -362,15 +362,15 @@ class SyncService {
// update shared users // update shared users
final List<User> sharedUsers = album.sharedUsers.toList(growable: false); final List<User> sharedUsers = album.sharedUsers.toList(growable: false);
sharedUsers.sort((a, b) => a.id.compareTo(b.id)); sharedUsers.sort((a, b) => a.id.compareTo(b.id));
dto.sharedUsers.sort((a, b) => a.id.compareTo(b.id)); dto.albumUsers.sort((a, b) => a.user.id.compareTo(b.user.id));
final List<String> userIdsToAdd = []; final List<String> userIdsToAdd = [];
final List<User> usersToUnlink = []; final List<User> usersToUnlink = [];
diffSortedListsSync( diffSortedListsSync(
dto.sharedUsers, dto.albumUsers,
sharedUsers, sharedUsers,
compare: (UserResponseDto a, User b) => a.id.compareTo(b.id), compare: (AlbumUserResponseDto a, User b) => a.user.id.compareTo(b.id),
both: (a, b) => false, both: (a, b) => false,
onlyFirst: (UserResponseDto a) => userIdsToAdd.add(a.id), onlyFirst: (AlbumUserResponseDto a) => userIdsToAdd.add(a.user.id),
onlySecond: (User a) => usersToUnlink.add(a), onlySecond: (User a) => usersToUnlink.add(a),
); );
@ -905,7 +905,7 @@ bool _hasAlbumResponseDtoChanged(AlbumResponseDto dto, Album a) {
dto.albumName != a.name || dto.albumName != a.name ||
dto.albumThumbnailAssetId != a.thumbnail.value?.remoteId || dto.albumThumbnailAssetId != a.thumbnail.value?.remoteId ||
dto.shared != a.shared || dto.shared != a.shared ||
dto.sharedUsers.length != a.sharedUsers.length || dto.albumUsers.length != a.sharedUsers.length ||
!dto.updatedAt.isAtSameMomentAs(a.modifiedAt) || !dto.updatedAt.isAtSameMomentAs(a.modifiedAt) ||
!isAtSameMomentAs(dto.startDate, a.startDate) || !isAtSameMomentAs(dto.startDate, a.startDate) ||
!isAtSameMomentAs(dto.endDate, a.endDate) || !isAtSameMomentAs(dto.endDate, a.endDate) ||

View File

@ -3,3 +3,5 @@ extension StringExtension on String {
return "${this[0].toUpperCase()}${substring(1).toLowerCase()}"; return "${this[0].toUpperCase()}${substring(1).toLowerCase()}";
} }
} }
String s(num count) => (count == 1 ? '' : 's');

View File

@ -117,7 +117,6 @@ Class | Method | HTTP request | Description
*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | *AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout |
*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | *AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up |
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | *AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
*DeprecatedApi* | [**getServerInfo**](doc//DeprecatedApi.md#getserverinfo) | **GET** /server-info |
*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | *DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive |
*DownloadApi* | [**downloadFile**](doc//DownloadApi.md#downloadfile) | **POST** /download/asset/{id} | *DownloadApi* | [**downloadFile**](doc//DownloadApi.md#downloadfile) | **POST** /download/asset/{id} |
*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | *DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info |
@ -173,7 +172,6 @@ Class | Method | HTTP request | Description
*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | *SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart |
*ServerInfoApi* | [**getServerConfig**](doc//ServerInfoApi.md#getserverconfig) | **GET** /server-info/config | *ServerInfoApi* | [**getServerConfig**](doc//ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
*ServerInfoApi* | [**getServerFeatures**](doc//ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features | *ServerInfoApi* | [**getServerFeatures**](doc//ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
*ServerInfoApi* | [**getServerInfo**](doc//ServerInfoApi.md#getserverinfo) | **GET** /server-info |
*ServerInfoApi* | [**getServerStatistics**](doc//ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics | *ServerInfoApi* | [**getServerStatistics**](doc//ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics |
*ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version | *ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
*ServerInfoApi* | [**getStorage**](doc//ServerInfoApi.md#getstorage) | **GET** /server-info/storage | *ServerInfoApi* | [**getStorage**](doc//ServerInfoApi.md#getstorage) | **GET** /server-info/storage |

View File

@ -35,7 +35,6 @@ part 'api/album_api.dart';
part 'api/asset_api.dart'; part 'api/asset_api.dart';
part 'api/audit_api.dart'; part 'api/audit_api.dart';
part 'api/authentication_api.dart'; part 'api/authentication_api.dart';
part 'api/deprecated_api.dart';
part 'api/download_api.dart'; part 'api/download_api.dart';
part 'api/duplicate_api.dart'; part 'api/duplicate_api.dart';
part 'api/face_api.dart'; part 'api/face_api.dart';

View File

@ -1,62 +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 DeprecatedApi {
DeprecatedApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// This property was deprecated in v1.106.0
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerInfoWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/server-info';
// 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.106.0
Future<ServerStorageResponseDto?> getServerInfo() async {
final response = await getServerInfoWithHttpInfo();
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;
}
}

View File

@ -98,50 +98,6 @@ class ServerInfoApi {
return null; return null;
} }
/// This property was deprecated in v1.106.0
///
/// Note: This method returns the HTTP [Response].
Future<Response> getServerInfoWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/server-info';
// 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.106.0
Future<ServerStorageResponseDto?> getServerInfo() async {
final response = await getServerInfoWithHttpInfo();
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-info/statistics' operation and returns the [Response]. /// Performs an HTTP 'GET /server-info/statistics' operation and returns the [Response].
Future<Response> getServerStatisticsWithHttpInfo() async { Future<Response> getServerStatisticsWithHttpInfo() async {
// ignore: prefer_const_declarations // ignore: prefer_const_declarations

View File

@ -14,32 +14,25 @@ class AddUsersDto {
/// Returns a new [AddUsersDto] instance. /// Returns a new [AddUsersDto] instance.
AddUsersDto({ AddUsersDto({
this.albumUsers = const [], this.albumUsers = const [],
this.sharedUserIds = const [],
}); });
List<AlbumUserAddDto> albumUsers; List<AlbumUserAddDto> albumUsers;
/// This property was deprecated in v1.102.0
List<String> sharedUserIds;
@override @override
bool operator ==(Object other) => identical(this, other) || other is AddUsersDto && bool operator ==(Object other) => identical(this, other) || other is AddUsersDto &&
_deepEquality.equals(other.albumUsers, albumUsers) && _deepEquality.equals(other.albumUsers, albumUsers);
_deepEquality.equals(other.sharedUserIds, sharedUserIds);
@override @override
int get hashCode => int get hashCode =>
// ignore: unnecessary_parenthesis // ignore: unnecessary_parenthesis
(albumUsers.hashCode) + (albumUsers.hashCode);
(sharedUserIds.hashCode);
@override @override
String toString() => 'AddUsersDto[albumUsers=$albumUsers, sharedUserIds=$sharedUserIds]'; String toString() => 'AddUsersDto[albumUsers=$albumUsers]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
json[r'albumUsers'] = this.albumUsers; json[r'albumUsers'] = this.albumUsers;
json[r'sharedUserIds'] = this.sharedUserIds;
return json; return json;
} }
@ -52,9 +45,6 @@ class AddUsersDto {
return AddUsersDto( return AddUsersDto(
albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']), albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']),
sharedUserIds: json[r'sharedUserIds'] is Iterable
? (json[r'sharedUserIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
); );
} }
return null; return null;

View File

@ -29,7 +29,6 @@ class AlbumResponseDto {
required this.owner, required this.owner,
required this.ownerId, required this.ownerId,
required this.shared, required this.shared,
this.sharedUsers = const [],
this.startDate, this.startDate,
required this.updatedAt, required this.updatedAt,
}); });
@ -84,9 +83,6 @@ class AlbumResponseDto {
bool shared; bool shared;
/// This property was deprecated in v1.102.0
List<UserResponseDto> sharedUsers;
/// ///
/// Please note: This property should have been non-nullable! Since the specification file /// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated /// does not include a default value (using the "default:" property), however, the generated
@ -115,7 +111,6 @@ class AlbumResponseDto {
other.owner == owner && other.owner == owner &&
other.ownerId == ownerId && other.ownerId == ownerId &&
other.shared == shared && other.shared == shared &&
_deepEquality.equals(other.sharedUsers, sharedUsers) &&
other.startDate == startDate && other.startDate == startDate &&
other.updatedAt == updatedAt; other.updatedAt == updatedAt;
@ -138,12 +133,11 @@ class AlbumResponseDto {
(owner.hashCode) + (owner.hashCode) +
(ownerId.hashCode) + (ownerId.hashCode) +
(shared.hashCode) + (shared.hashCode) +
(sharedUsers.hashCode) +
(startDate == null ? 0 : startDate!.hashCode) + (startDate == null ? 0 : startDate!.hashCode) +
(updatedAt.hashCode); (updatedAt.hashCode);
@override @override
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, albumUsers=$albumUsers, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, startDate=$startDate, updatedAt=$updatedAt]'; String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, albumUsers=$albumUsers, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, startDate=$startDate, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -179,7 +173,6 @@ class AlbumResponseDto {
json[r'owner'] = this.owner; json[r'owner'] = this.owner;
json[r'ownerId'] = this.ownerId; json[r'ownerId'] = this.ownerId;
json[r'shared'] = this.shared; json[r'shared'] = this.shared;
json[r'sharedUsers'] = this.sharedUsers;
if (this.startDate != null) { if (this.startDate != null) {
json[r'startDate'] = this.startDate!.toUtc().toIso8601String(); json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
} else { } else {
@ -213,7 +206,6 @@ class AlbumResponseDto {
owner: UserResponseDto.fromJson(json[r'owner'])!, owner: UserResponseDto.fromJson(json[r'owner'])!,
ownerId: mapValueOfType<String>(json, r'ownerId')!, ownerId: mapValueOfType<String>(json, r'ownerId')!,
shared: mapValueOfType<bool>(json, r'shared')!, shared: mapValueOfType<bool>(json, r'shared')!,
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
startDate: mapDateTime(json, r'startDate', r''), startDate: mapDateTime(json, r'startDate', r''),
updatedAt: mapDateTime(json, r'updatedAt', r'')!, updatedAt: mapDateTime(json, r'updatedAt', r'')!,
); );
@ -276,7 +268,6 @@ class AlbumResponseDto {
'owner', 'owner',
'ownerId', 'ownerId',
'shared', 'shared',
'sharedUsers',
'updatedAt', 'updatedAt',
}; };
} }

View File

@ -24,10 +24,8 @@ class AssetResponseDto {
required this.hasMetadata, required this.hasMetadata,
required this.id, required this.id,
required this.isArchived, required this.isArchived,
this.isExternal,
required this.isFavorite, required this.isFavorite,
required this.isOffline, required this.isOffline,
this.isReadOnly,
required this.isTrashed, required this.isTrashed,
this.libraryId, this.libraryId,
this.livePhotoVideoId, this.livePhotoVideoId,
@ -77,28 +75,10 @@ class AssetResponseDto {
bool isArchived; bool isArchived;
/// This property was deprecated in v1.104.0
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isExternal;
bool isFavorite; bool isFavorite;
bool isOffline; bool isOffline;
/// This property was deprecated in v1.104.0
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isReadOnly;
bool isTrashed; bool isTrashed;
/// This property was deprecated in v1.106.0 /// This property was deprecated in v1.106.0
@ -161,10 +141,8 @@ class AssetResponseDto {
other.hasMetadata == hasMetadata && other.hasMetadata == hasMetadata &&
other.id == id && other.id == id &&
other.isArchived == isArchived && other.isArchived == isArchived &&
other.isExternal == isExternal &&
other.isFavorite == isFavorite && other.isFavorite == isFavorite &&
other.isOffline == isOffline && other.isOffline == isOffline &&
other.isReadOnly == isReadOnly &&
other.isTrashed == isTrashed && other.isTrashed == isTrashed &&
other.libraryId == libraryId && other.libraryId == libraryId &&
other.livePhotoVideoId == livePhotoVideoId && other.livePhotoVideoId == livePhotoVideoId &&
@ -198,10 +176,8 @@ class AssetResponseDto {
(hasMetadata.hashCode) + (hasMetadata.hashCode) +
(id.hashCode) + (id.hashCode) +
(isArchived.hashCode) + (isArchived.hashCode) +
(isExternal == null ? 0 : isExternal!.hashCode) +
(isFavorite.hashCode) + (isFavorite.hashCode) +
(isOffline.hashCode) + (isOffline.hashCode) +
(isReadOnly == null ? 0 : isReadOnly!.hashCode) +
(isTrashed.hashCode) + (isTrashed.hashCode) +
(libraryId == null ? 0 : libraryId!.hashCode) + (libraryId == null ? 0 : libraryId!.hashCode) +
(livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) +
@ -222,7 +198,7 @@ class AssetResponseDto {
(updatedAt.hashCode); (updatedAt.hashCode);
@override @override
String toString() => 'AssetResponseDto[checksum=$checksum, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, id=$id, isArchived=$isArchived, isExternal=$isExternal, isFavorite=$isFavorite, isOffline=$isOffline, isReadOnly=$isReadOnly, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, stack=$stack, stackCount=$stackCount, stackParentId=$stackParentId, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt]'; String toString() => 'AssetResponseDto[checksum=$checksum, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, id=$id, isArchived=$isArchived, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, stack=$stack, stackCount=$stackCount, stackParentId=$stackParentId, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -245,18 +221,8 @@ class AssetResponseDto {
json[r'hasMetadata'] = this.hasMetadata; json[r'hasMetadata'] = this.hasMetadata;
json[r'id'] = this.id; json[r'id'] = this.id;
json[r'isArchived'] = this.isArchived; json[r'isArchived'] = this.isArchived;
if (this.isExternal != null) {
json[r'isExternal'] = this.isExternal;
} else {
// json[r'isExternal'] = null;
}
json[r'isFavorite'] = this.isFavorite; json[r'isFavorite'] = this.isFavorite;
json[r'isOffline'] = this.isOffline; json[r'isOffline'] = this.isOffline;
if (this.isReadOnly != null) {
json[r'isReadOnly'] = this.isReadOnly;
} else {
// json[r'isReadOnly'] = null;
}
json[r'isTrashed'] = this.isTrashed; json[r'isTrashed'] = this.isTrashed;
if (this.libraryId != null) { if (this.libraryId != null) {
json[r'libraryId'] = this.libraryId; json[r'libraryId'] = this.libraryId;
@ -325,10 +291,8 @@ class AssetResponseDto {
hasMetadata: mapValueOfType<bool>(json, r'hasMetadata')!, hasMetadata: mapValueOfType<bool>(json, r'hasMetadata')!,
id: mapValueOfType<String>(json, r'id')!, id: mapValueOfType<String>(json, r'id')!,
isArchived: mapValueOfType<bool>(json, r'isArchived')!, isArchived: mapValueOfType<bool>(json, r'isArchived')!,
isExternal: mapValueOfType<bool>(json, r'isExternal'),
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!, isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
isOffline: mapValueOfType<bool>(json, r'isOffline')!, isOffline: mapValueOfType<bool>(json, r'isOffline')!,
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly'),
isTrashed: mapValueOfType<bool>(json, r'isTrashed')!, isTrashed: mapValueOfType<bool>(json, r'isTrashed')!,
libraryId: mapValueOfType<String>(json, r'libraryId'), libraryId: mapValueOfType<String>(json, r'libraryId'),
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'), livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),

View File

@ -17,12 +17,10 @@ class CreateAlbumDto {
this.albumUsers = const [], this.albumUsers = const [],
this.assetIds = const [], this.assetIds = const [],
this.description, this.description,
this.sharedWithUserIds = const [],
}); });
String albumName; String albumName;
/// This property was added in v1.104.0
List<AlbumUserCreateDto> albumUsers; List<AlbumUserCreateDto> albumUsers;
List<String> assetIds; List<String> assetIds;
@ -35,16 +33,12 @@ class CreateAlbumDto {
/// ///
String? description; String? description;
/// This property was deprecated in v1.104.0
List<String> sharedWithUserIds;
@override @override
bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto && bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto &&
other.albumName == albumName && other.albumName == albumName &&
_deepEquality.equals(other.albumUsers, albumUsers) && _deepEquality.equals(other.albumUsers, albumUsers) &&
_deepEquality.equals(other.assetIds, assetIds) && _deepEquality.equals(other.assetIds, assetIds) &&
other.description == description && other.description == description;
_deepEquality.equals(other.sharedWithUserIds, sharedWithUserIds);
@override @override
int get hashCode => int get hashCode =>
@ -52,11 +46,10 @@ class CreateAlbumDto {
(albumName.hashCode) + (albumName.hashCode) +
(albumUsers.hashCode) + (albumUsers.hashCode) +
(assetIds.hashCode) + (assetIds.hashCode) +
(description == null ? 0 : description!.hashCode) + (description == null ? 0 : description!.hashCode);
(sharedWithUserIds.hashCode);
@override @override
String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description, sharedWithUserIds=$sharedWithUserIds]'; String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -68,7 +61,6 @@ class CreateAlbumDto {
} else { } else {
// json[r'description'] = null; // json[r'description'] = null;
} }
json[r'sharedWithUserIds'] = this.sharedWithUserIds;
return json; return json;
} }
@ -86,9 +78,6 @@ class CreateAlbumDto {
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false) ? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
: const [], : const [],
description: mapValueOfType<String>(json, r'description'), description: mapValueOfType<String>(json, r'description'),
sharedWithUserIds: json[r'sharedWithUserIds'] is Iterable
? (json[r'sharedWithUserIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
); );
} }
return null; return null;

View File

@ -14,37 +14,30 @@ class MemoryLaneResponseDto {
/// Returns a new [MemoryLaneResponseDto] instance. /// Returns a new [MemoryLaneResponseDto] instance.
MemoryLaneResponseDto({ MemoryLaneResponseDto({
this.assets = const [], this.assets = const [],
required this.title,
required this.yearsAgo, required this.yearsAgo,
}); });
List<AssetResponseDto> assets; List<AssetResponseDto> assets;
/// This property was deprecated in v1.100.0
String title;
int yearsAgo; int yearsAgo;
@override @override
bool operator ==(Object other) => identical(this, other) || other is MemoryLaneResponseDto && bool operator ==(Object other) => identical(this, other) || other is MemoryLaneResponseDto &&
_deepEquality.equals(other.assets, assets) && _deepEquality.equals(other.assets, assets) &&
other.title == title &&
other.yearsAgo == yearsAgo; other.yearsAgo == yearsAgo;
@override @override
int get hashCode => int get hashCode =>
// ignore: unnecessary_parenthesis // ignore: unnecessary_parenthesis
(assets.hashCode) + (assets.hashCode) +
(title.hashCode) +
(yearsAgo.hashCode); (yearsAgo.hashCode);
@override @override
String toString() => 'MemoryLaneResponseDto[assets=$assets, title=$title, yearsAgo=$yearsAgo]'; String toString() => 'MemoryLaneResponseDto[assets=$assets, yearsAgo=$yearsAgo]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
json[r'assets'] = this.assets; json[r'assets'] = this.assets;
json[r'title'] = this.title;
json[r'yearsAgo'] = this.yearsAgo; json[r'yearsAgo'] = this.yearsAgo;
return json; return json;
} }
@ -58,7 +51,6 @@ class MemoryLaneResponseDto {
return MemoryLaneResponseDto( return MemoryLaneResponseDto(
assets: AssetResponseDto.listFromJson(json[r'assets']), assets: AssetResponseDto.listFromJson(json[r'assets']),
title: mapValueOfType<String>(json, r'title')!,
yearsAgo: mapValueOfType<int>(json, r'yearsAgo')!, yearsAgo: mapValueOfType<int>(json, r'yearsAgo')!,
); );
} }
@ -108,7 +100,6 @@ class MemoryLaneResponseDto {
/// The list of required keys that must be present in a JSON. /// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{ static const requiredKeys = <String>{
'assets', 'assets',
'title',
'yearsAgo', 'yearsAgo',
}; };
} }

View File

@ -39,7 +39,6 @@ class MetadataSearchDto {
this.page, this.page,
this.personIds = const [], this.personIds = const [],
this.previewPath, this.previewPath,
this.resizePath,
this.size, this.size,
this.state, this.state,
this.takenAfter, this.takenAfter,
@ -50,7 +49,6 @@ class MetadataSearchDto {
this.type, this.type,
this.updatedAfter, this.updatedAfter,
this.updatedBefore, this.updatedBefore,
this.webpPath,
this.withArchived = false, this.withArchived = false,
this.withDeleted, this.withDeleted,
this.withExif, this.withExif,
@ -261,15 +259,6 @@ class MetadataSearchDto {
/// ///
String? previewPath; String? previewPath;
/// This property was deprecated in v1.100.0
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? resizePath;
/// Minimum value: 1 /// Minimum value: 1
/// Maximum value: 1000 /// Maximum value: 1000
/// ///
@ -352,15 +341,6 @@ class MetadataSearchDto {
/// ///
DateTime? updatedBefore; DateTime? updatedBefore;
/// This property was deprecated in v1.100.0
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? webpPath;
bool withArchived; bool withArchived;
/// ///
@ -423,7 +403,6 @@ class MetadataSearchDto {
other.page == page && other.page == page &&
_deepEquality.equals(other.personIds, personIds) && _deepEquality.equals(other.personIds, personIds) &&
other.previewPath == previewPath && other.previewPath == previewPath &&
other.resizePath == resizePath &&
other.size == size && other.size == size &&
other.state == state && other.state == state &&
other.takenAfter == takenAfter && other.takenAfter == takenAfter &&
@ -434,7 +413,6 @@ class MetadataSearchDto {
other.type == type && other.type == type &&
other.updatedAfter == updatedAfter && other.updatedAfter == updatedAfter &&
other.updatedBefore == updatedBefore && other.updatedBefore == updatedBefore &&
other.webpPath == webpPath &&
other.withArchived == withArchived && other.withArchived == withArchived &&
other.withDeleted == withDeleted && other.withDeleted == withDeleted &&
other.withExif == withExif && other.withExif == withExif &&
@ -470,7 +448,6 @@ class MetadataSearchDto {
(page == null ? 0 : page!.hashCode) + (page == null ? 0 : page!.hashCode) +
(personIds.hashCode) + (personIds.hashCode) +
(previewPath == null ? 0 : previewPath!.hashCode) + (previewPath == null ? 0 : previewPath!.hashCode) +
(resizePath == null ? 0 : resizePath!.hashCode) +
(size == null ? 0 : size!.hashCode) + (size == null ? 0 : size!.hashCode) +
(state == null ? 0 : state!.hashCode) + (state == null ? 0 : state!.hashCode) +
(takenAfter == null ? 0 : takenAfter!.hashCode) + (takenAfter == null ? 0 : takenAfter!.hashCode) +
@ -481,7 +458,6 @@ class MetadataSearchDto {
(type == null ? 0 : type!.hashCode) + (type == null ? 0 : type!.hashCode) +
(updatedAfter == null ? 0 : updatedAfter!.hashCode) + (updatedAfter == null ? 0 : updatedAfter!.hashCode) +
(updatedBefore == null ? 0 : updatedBefore!.hashCode) + (updatedBefore == null ? 0 : updatedBefore!.hashCode) +
(webpPath == null ? 0 : webpPath!.hashCode) +
(withArchived.hashCode) + (withArchived.hashCode) +
(withDeleted == null ? 0 : withDeleted!.hashCode) + (withDeleted == null ? 0 : withDeleted!.hashCode) +
(withExif == null ? 0 : withExif!.hashCode) + (withExif == null ? 0 : withExif!.hashCode) +
@ -489,7 +465,7 @@ class MetadataSearchDto {
(withStacked == null ? 0 : withStacked!.hashCode); (withStacked == null ? 0 : withStacked!.hashCode);
@override @override
String toString() => 'MetadataSearchDto[checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceAssetId=$deviceAssetId, deviceId=$deviceId, encodedVideoPath=$encodedVideoPath, id=$id, isArchived=$isArchived, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, isVisible=$isVisible, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, resizePath=$resizePath, size=$size, state=$state, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, webpPath=$webpPath, withArchived=$withArchived, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; String toString() => 'MetadataSearchDto[checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, deviceAssetId=$deviceAssetId, deviceId=$deviceId, encodedVideoPath=$encodedVideoPath, id=$id, isArchived=$isArchived, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, isVisible=$isVisible, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, size=$size, state=$state, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, withArchived=$withArchived, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -619,11 +595,6 @@ class MetadataSearchDto {
} else { } else {
// json[r'previewPath'] = null; // json[r'previewPath'] = null;
} }
if (this.resizePath != null) {
json[r'resizePath'] = this.resizePath;
} else {
// json[r'resizePath'] = null;
}
if (this.size != null) { if (this.size != null) {
json[r'size'] = this.size; json[r'size'] = this.size;
} else { } else {
@ -673,11 +644,6 @@ class MetadataSearchDto {
json[r'updatedBefore'] = this.updatedBefore!.toUtc().toIso8601String(); json[r'updatedBefore'] = this.updatedBefore!.toUtc().toIso8601String();
} else { } else {
// json[r'updatedBefore'] = null; // json[r'updatedBefore'] = null;
}
if (this.webpPath != null) {
json[r'webpPath'] = this.webpPath;
} else {
// json[r'webpPath'] = null;
} }
json[r'withArchived'] = this.withArchived; json[r'withArchived'] = this.withArchived;
if (this.withDeleted != null) { if (this.withDeleted != null) {
@ -739,7 +705,6 @@ class MetadataSearchDto {
? (json[r'personIds'] as Iterable).cast<String>().toList(growable: false) ? (json[r'personIds'] as Iterable).cast<String>().toList(growable: false)
: const [], : const [],
previewPath: mapValueOfType<String>(json, r'previewPath'), previewPath: mapValueOfType<String>(json, r'previewPath'),
resizePath: mapValueOfType<String>(json, r'resizePath'),
size: num.parse('${json[r'size']}'), size: num.parse('${json[r'size']}'),
state: mapValueOfType<String>(json, r'state'), state: mapValueOfType<String>(json, r'state'),
takenAfter: mapDateTime(json, r'takenAfter', r''), takenAfter: mapDateTime(json, r'takenAfter', r''),
@ -750,7 +715,6 @@ class MetadataSearchDto {
type: AssetTypeEnum.fromJson(json[r'type']), type: AssetTypeEnum.fromJson(json[r'type']),
updatedAfter: mapDateTime(json, r'updatedAfter', r''), updatedAfter: mapDateTime(json, r'updatedAfter', r''),
updatedBefore: mapDateTime(json, r'updatedBefore', r''), updatedBefore: mapDateTime(json, r'updatedBefore', r''),
webpPath: mapValueOfType<String>(json, r'webpPath'),
withArchived: mapValueOfType<bool>(json, r'withArchived') ?? false, withArchived: mapValueOfType<bool>(json, r'withArchived') ?? false,
withDeleted: mapValueOfType<bool>(json, r'withDeleted'), withDeleted: mapValueOfType<bool>(json, r'withDeleted'),
withExif: mapValueOfType<bool>(json, r'withExif'), withExif: mapValueOfType<bool>(json, r'withExif'),

View File

@ -4399,44 +4399,6 @@
] ]
} }
}, },
"/server-info": {
"get": {
"deprecated": true,
"description": "This property was deprecated in v1.106.0",
"operationId": "getServerInfo",
"parameters": [],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerStorageResponseDto"
}
}
},
"description": ""
}
},
"security": [
{
"bearer": []
},
{
"cookie": []
},
{
"api_key": []
}
],
"tags": [
"Server Info",
"Deprecated"
],
"x-immich-lifecycle": {
"deprecatedAt": "v1.106.0"
}
}
},
"/server-info/config": { "/server-info/config": {
"get": { "get": {
"operationId": "getServerConfig", "operationId": "getServerConfig",
@ -6738,15 +6700,6 @@
"$ref": "#/components/schemas/AlbumUserAddDto" "$ref": "#/components/schemas/AlbumUserAddDto"
}, },
"type": "array" "type": "array"
},
"sharedUserIds": {
"deprecated": true,
"description": "This property was deprecated in v1.102.0",
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
} }
}, },
"required": [ "required": [
@ -6844,14 +6797,6 @@
"shared": { "shared": {
"type": "boolean" "type": "boolean"
}, },
"sharedUsers": {
"deprecated": true,
"description": "This property was deprecated in v1.102.0",
"items": {
"$ref": "#/components/schemas/UserResponseDto"
},
"type": "array"
},
"startDate": { "startDate": {
"format": "date-time", "format": "date-time",
"type": "string" "type": "string"
@ -6875,7 +6820,6 @@
"owner", "owner",
"ownerId", "ownerId",
"shared", "shared",
"sharedUsers",
"updatedAt" "updatedAt"
], ],
"type": "object" "type": "object"
@ -7495,22 +7439,12 @@
"isArchived": { "isArchived": {
"type": "boolean" "type": "boolean"
}, },
"isExternal": {
"deprecated": true,
"description": "This property was deprecated in v1.104.0",
"type": "boolean"
},
"isFavorite": { "isFavorite": {
"type": "boolean" "type": "boolean"
}, },
"isOffline": { "isOffline": {
"type": "boolean" "type": "boolean"
}, },
"isReadOnly": {
"deprecated": true,
"description": "This property was deprecated in v1.104.0",
"type": "boolean"
},
"isTrashed": { "isTrashed": {
"type": "boolean" "type": "boolean"
}, },
@ -7801,7 +7735,6 @@
"type": "string" "type": "string"
}, },
"albumUsers": { "albumUsers": {
"description": "This property was added in v1.104.0",
"items": { "items": {
"$ref": "#/components/schemas/AlbumUserCreateDto" "$ref": "#/components/schemas/AlbumUserCreateDto"
}, },
@ -7816,15 +7749,6 @@
}, },
"description": { "description": {
"type": "string" "type": "string"
},
"sharedWithUserIds": {
"deprecated": true,
"description": "This property was deprecated in v1.104.0",
"items": {
"format": "uuid",
"type": "string"
},
"type": "array"
} }
}, },
"required": [ "required": [
@ -8672,18 +8596,12 @@
}, },
"type": "array" "type": "array"
}, },
"title": {
"deprecated": true,
"description": "This property was deprecated in v1.100.0",
"type": "string"
},
"yearsAgo": { "yearsAgo": {
"type": "integer" "type": "integer"
} }
}, },
"required": [ "required": [
"assets", "assets",
"title",
"yearsAgo" "yearsAgo"
], ],
"type": "object" "type": "object"
@ -8874,11 +8792,6 @@
"previewPath": { "previewPath": {
"type": "string" "type": "string"
}, },
"resizePath": {
"deprecated": true,
"description": "This property was deprecated in v1.100.0",
"type": "string"
},
"size": { "size": {
"maximum": 1000, "maximum": 1000,
"minimum": 1, "minimum": 1,
@ -8917,11 +8830,6 @@
"format": "date-time", "format": "date-time",
"type": "string" "type": "string"
}, },
"webpPath": {
"deprecated": true,
"description": "This property was deprecated in v1.100.0",
"type": "string"
},
"withArchived": { "withArchived": {
"default": false, "default": false,
"type": "boolean" "type": "boolean"

View File

@ -123,12 +123,8 @@ export type AssetResponseDto = {
hasMetadata: boolean; hasMetadata: boolean;
id: string; id: string;
isArchived: boolean; isArchived: boolean;
/** This property was deprecated in v1.104.0 */
isExternal?: boolean;
isFavorite: boolean; isFavorite: boolean;
isOffline: boolean; isOffline: boolean;
/** This property was deprecated in v1.104.0 */
isReadOnly?: boolean;
isTrashed: boolean; isTrashed: boolean;
/** This property was deprecated in v1.106.0 */ /** This property was deprecated in v1.106.0 */
libraryId?: string | null; libraryId?: string | null;
@ -166,8 +162,6 @@ export type AlbumResponseDto = {
owner: UserResponseDto; owner: UserResponseDto;
ownerId: string; ownerId: string;
shared: boolean; shared: boolean;
/** This property was deprecated in v1.102.0 */
sharedUsers: UserResponseDto[];
startDate?: string; startDate?: string;
updatedAt: string; updatedAt: string;
}; };
@ -177,12 +171,9 @@ export type AlbumUserCreateDto = {
}; };
export type CreateAlbumDto = { export type CreateAlbumDto = {
albumName: string; albumName: string;
/** This property was added in v1.104.0 */
albumUsers?: AlbumUserCreateDto[]; albumUsers?: AlbumUserCreateDto[];
assetIds?: string[]; assetIds?: string[];
description?: string; description?: string;
/** This property was deprecated in v1.104.0 */
sharedWithUserIds?: string[];
}; };
export type AlbumCountResponseDto = { export type AlbumCountResponseDto = {
notShared: number; notShared: number;
@ -213,8 +204,6 @@ export type AlbumUserAddDto = {
}; };
export type AddUsersDto = { export type AddUsersDto = {
albumUsers: AlbumUserAddDto[]; albumUsers: AlbumUserAddDto[];
/** This property was deprecated in v1.102.0 */
sharedUserIds?: string[];
}; };
export type ApiKeyResponseDto = { export type ApiKeyResponseDto = {
createdAt: string; createdAt: string;
@ -285,8 +274,6 @@ export type MapMarkerResponseDto = {
}; };
export type MemoryLaneResponseDto = { export type MemoryLaneResponseDto = {
assets: AssetResponseDto[]; assets: AssetResponseDto[];
/** This property was deprecated in v1.100.0 */
title: string;
yearsAgo: number; yearsAgo: number;
}; };
export type UpdateStackParentDto = { export type UpdateStackParentDto = {
@ -660,8 +647,6 @@ export type MetadataSearchDto = {
page?: number; page?: number;
personIds?: string[]; personIds?: string[];
previewPath?: string; previewPath?: string;
/** This property was deprecated in v1.100.0 */
resizePath?: string;
size?: number; size?: number;
state?: string; state?: string;
takenAfter?: string; takenAfter?: string;
@ -672,8 +657,6 @@ export type MetadataSearchDto = {
"type"?: AssetTypeEnum; "type"?: AssetTypeEnum;
updatedAfter?: string; updatedAfter?: string;
updatedBefore?: string; updatedBefore?: string;
/** This property was deprecated in v1.100.0 */
webpPath?: string;
withArchived?: boolean; withArchived?: boolean;
withDeleted?: boolean; withDeleted?: boolean;
withExif?: boolean; withExif?: boolean;
@ -745,15 +728,6 @@ export type SmartSearchDto = {
withDeleted?: boolean; withDeleted?: boolean;
withExif?: boolean; withExif?: boolean;
}; };
export type ServerStorageResponseDto = {
diskAvailable: string;
diskAvailableRaw: number;
diskSize: string;
diskSizeRaw: number;
diskUsagePercentage: number;
diskUse: string;
diskUseRaw: number;
};
export type ServerConfigDto = { export type ServerConfigDto = {
externalDomain: string; externalDomain: string;
isInitialized: boolean; isInitialized: boolean;
@ -801,6 +775,15 @@ export type ServerStatsResponseDto = {
usageByUser: UsageByUserDto[]; usageByUser: UsageByUserDto[];
videos: number; videos: number;
}; };
export type ServerStorageResponseDto = {
diskAvailable: string;
diskAvailableRaw: number;
diskSize: string;
diskSizeRaw: number;
diskUsagePercentage: number;
diskUse: string;
diskUseRaw: number;
};
export type ServerThemeDto = { export type ServerThemeDto = {
customCss: string; customCss: string;
}; };
@ -2277,17 +2260,6 @@ export function getSearchSuggestions({ country, make, model, state, $type }: {
...opts ...opts
})); }));
} }
/**
* This property was deprecated in v1.106.0
*/
export function getServerInfo(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ServerStorageResponseDto;
}>("/server-info", {
...opts
}));
}
export function getServerConfig(opts?: Oazapfts.RequestOpts) { export function getServerConfig(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{ return oazapfts.ok(oazapfts.fetchJson<{
status: 200; status: 200;

View File

@ -1,6 +1,5 @@
import { Controller, Get } from '@nestjs/common'; import { Controller, Get } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger'; import { ApiTags } from '@nestjs/swagger';
import { EndpointLifecycle } from 'src/decorators';
import { import {
ServerConfigDto, ServerConfigDto,
ServerFeaturesDto, ServerFeaturesDto,
@ -23,13 +22,6 @@ export class ServerInfoController {
private versionService: VersionService, private versionService: VersionService,
) {} ) {}
@Get()
@EndpointLifecycle({ deprecatedAt: 'v1.106.0' })
@Authenticated()
getServerInfo(): Promise<ServerStorageResponseDto> {
return this.service.getStorage();
}
@Get('storage') @Get('storage')
@Authenticated() @Authenticated()
getStorage(): Promise<ServerStorageResponseDto> { getStorage(): Promise<ServerStorageResponseDto> {

View File

@ -2,7 +2,6 @@ import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer'; import { Type } from 'class-transformer';
import { ArrayNotEmpty, IsArray, IsEnum, IsString, ValidateNested } from 'class-validator'; import { ArrayNotEmpty, IsArray, IsEnum, IsString, ValidateNested } from 'class-validator';
import _ from 'lodash'; import _ from 'lodash';
import { PropertyLifecycle } from 'src/decorators';
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto'; import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
import { AuthDto } from 'src/dtos/auth.dto'; import { AuthDto } from 'src/dtos/auth.dto';
import { UserResponseDto, mapUser } from 'src/dtos/user.dto'; import { UserResponseDto, mapUser } from 'src/dtos/user.dto';
@ -25,10 +24,6 @@ export class AlbumUserAddDto {
} }
export class AddUsersDto { export class AddUsersDto {
@ValidateUUID({ each: true, optional: true })
@PropertyLifecycle({ deprecatedAt: 'v1.102.0' })
sharedUserIds?: string[];
@ArrayNotEmpty() @ArrayNotEmpty()
albumUsers!: AlbumUserAddDto[]; albumUsers!: AlbumUserAddDto[];
} }
@ -55,13 +50,8 @@ export class CreateAlbumDto {
@IsArray() @IsArray()
@ValidateNested({ each: true }) @ValidateNested({ each: true })
@Type(() => AlbumUserCreateDto) @Type(() => AlbumUserCreateDto)
@PropertyLifecycle({ addedAt: 'v1.104.0' })
albumUsers?: AlbumUserCreateDto[]; albumUsers?: AlbumUserCreateDto[];
@ValidateUUID({ optional: true, each: true })
@PropertyLifecycle({ deprecatedAt: 'v1.104.0' })
sharedWithUserIds?: string[];
@ValidateUUID({ optional: true, each: true }) @ValidateUUID({ optional: true, each: true })
assetIds?: string[]; assetIds?: string[];
} }
@ -137,8 +127,6 @@ export class AlbumResponseDto {
updatedAt!: Date; updatedAt!: Date;
albumThumbnailAssetId!: string | null; albumThumbnailAssetId!: string | null;
shared!: boolean; shared!: boolean;
@PropertyLifecycle({ deprecatedAt: 'v1.102.0' })
sharedUsers!: UserResponseDto[];
albumUsers!: AlbumUserResponseDto[]; albumUsers!: AlbumUserResponseDto[];
hasSharedLink!: boolean; hasSharedLink!: boolean;
assets!: AssetResponseDto[]; assets!: AssetResponseDto[];
@ -192,7 +180,6 @@ export const mapAlbum = (entity: AlbumEntity, withAssets: boolean, auth?: AuthDt
id: entity.id, id: entity.id,
ownerId: entity.ownerId, ownerId: entity.ownerId,
owner: mapUser(entity.owner), owner: mapUser(entity.owner),
sharedUsers,
albumUsers: albumUsersSorted, albumUsers: albumUsersSorted,
shared: hasSharedUser || hasSharedLink, shared: hasSharedUser || hasSharedLink,
hasSharedLink, hasSharedLink,

View File

@ -37,10 +37,6 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
isArchived!: boolean; isArchived!: boolean;
isTrashed!: boolean; isTrashed!: boolean;
isOffline!: boolean; isOffline!: boolean;
@PropertyLifecycle({ deprecatedAt: 'v1.104.0' })
isExternal?: boolean;
@PropertyLifecycle({ deprecatedAt: 'v1.104.0' })
isReadOnly?: boolean;
exifInfo?: ExifResponseDto; exifInfo?: ExifResponseDto;
smartInfo?: SmartInfoResponseDto; smartInfo?: SmartInfoResponseDto;
tags?: TagResponseDto[]; tags?: TagResponseDto[];
@ -129,17 +125,12 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As
: undefined, : undefined,
stackCount: entity.stack?.assets?.length ?? null, stackCount: entity.stack?.assets?.length ?? null,
isOffline: entity.isOffline, isOffline: entity.isOffline,
isExternal: false,
isReadOnly: false,
hasMetadata: true, hasMetadata: true,
duplicateId: entity.duplicateId, duplicateId: entity.duplicateId,
}; };
} }
export class MemoryLaneResponseDto { export class MemoryLaneResponseDto {
@PropertyLifecycle({ deprecatedAt: 'v1.100.0' })
title!: string;
@ApiProperty({ type: 'integer' }) @ApiProperty({ type: 'integer' })
yearsAgo!: number; yearsAgo!: number;

View File

@ -1,7 +1,6 @@
import { ApiProperty } from '@nestjs/swagger'; import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer'; import { Type } from 'class-transformer';
import { IsEnum, IsInt, IsNotEmpty, IsString, Max, Min } from 'class-validator'; import { IsEnum, IsInt, IsNotEmpty, IsString, Max, Min } from 'class-validator';
import { PropertyLifecycle } from 'src/decorators';
import { AlbumResponseDto } from 'src/dtos/album.dto'; import { AlbumResponseDto } from 'src/dtos/album.dto';
import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AssetResponseDto } from 'src/dtos/asset-response.dto';
import { AssetOrder } from 'src/entities/album.entity'; import { AssetOrder } from 'src/entities/album.entity';
@ -155,18 +154,6 @@ export class MetadataSearchDto extends BaseSearchDto {
@Optional() @Optional()
originalPath?: string; originalPath?: string;
@IsString()
@IsNotEmpty()
@Optional()
@PropertyLifecycle({ deprecatedAt: 'v1.100.0' })
resizePath?: string;
@IsString()
@IsNotEmpty()
@Optional()
@PropertyLifecycle({ deprecatedAt: 'v1.100.0' })
webpPath?: string;
@IsString() @IsString()
@IsNotEmpty() @IsNotEmpty()
@Optional() @Optional()

View File

@ -185,7 +185,7 @@ describe(AlbumService.name, () => {
await sut.create(authStub.admin, { await sut.create(authStub.admin, {
albumName: 'Empty album', albumName: 'Empty album',
sharedWithUserIds: ['user-id'], albumUsers: [{ userId: 'user-id', role: AlbumUserRole.EDITOR }],
description: '', description: '',
assetIds: ['123'], assetIds: ['123'],
}); });
@ -208,7 +208,7 @@ describe(AlbumService.name, () => {
await expect( await expect(
sut.create(authStub.admin, { sut.create(authStub.admin, {
albumName: 'Empty album', albumName: 'Empty album',
sharedWithUserIds: ['user-3'], albumUsers: [{ userId: 'user-3', role: AlbumUserRole.EDITOR }],
}), }),
).rejects.toBeInstanceOf(BadRequestException); ).rejects.toBeInstanceOf(BadRequestException);
expect(userMock.get).toHaveBeenCalledWith('user-3', {}); expect(userMock.get).toHaveBeenCalledWith('user-3', {});

View File

@ -14,7 +14,7 @@ import {
} from 'src/dtos/album.dto'; } from 'src/dtos/album.dto';
import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto';
import { AuthDto } from 'src/dtos/auth.dto'; import { AuthDto } from 'src/dtos/auth.dto';
import { AlbumUserEntity, AlbumUserRole } from 'src/entities/album-user.entity'; import { AlbumUserEntity } from 'src/entities/album-user.entity';
import { AlbumEntity } from 'src/entities/album.entity'; import { AlbumEntity } from 'src/entities/album.entity';
import { AssetEntity } from 'src/entities/asset.entity'; import { AssetEntity } from 'src/entities/asset.entity';
import { IAccessRepository } from 'src/interfaces/access.interface'; import { IAccessRepository } from 'src/interfaces/access.interface';
@ -115,9 +115,6 @@ export class AlbumService {
async create(auth: AuthDto, dto: CreateAlbumDto): Promise<AlbumResponseDto> { async create(auth: AuthDto, dto: CreateAlbumDto): Promise<AlbumResponseDto> {
const albumUsers = dto.albumUsers || []; const albumUsers = dto.albumUsers || [];
for (const userId of dto.sharedWithUserIds || []) {
albumUsers.push({ userId, role: AlbumUserRole.EDITOR });
}
for (const { userId } of albumUsers) { for (const { userId } of albumUsers) {
const exists = await this.userRepository.get(userId, {}); const exists = await this.userRepository.get(userId, {});
@ -216,15 +213,7 @@ export class AlbumService {
return results; return results;
} }
async addUsers(auth: AuthDto, id: string, { albumUsers, sharedUserIds }: AddUsersDto): Promise<AlbumResponseDto> { async addUsers(auth: AuthDto, id: string, { albumUsers }: AddUsersDto): Promise<AlbumResponseDto> {
// Remove once deprecated sharedUserIds is removed
if (!albumUsers) {
if (!sharedUserIds) {
throw new BadRequestException('No users provided');
}
albumUsers = sharedUserIds.map((userId) => ({ userId, role: AlbumUserRole.EDITOR }));
}
await this.access.requirePermission(auth, Permission.ALBUM_SHARE, id); await this.access.requirePermission(auth, Permission.ALBUM_SHARE, id);
const album = await this.findOrFail(id, { withAssets: false }); const album = await this.findOrFail(id, { withAssets: false });

View File

@ -78,9 +78,6 @@ export class SearchService {
checksum = Buffer.from(dto.checksum, encoding); checksum = Buffer.from(dto.checksum, encoding);
} }
dto.previewPath ??= dto.resizePath;
dto.thumbnailPath ??= dto.webpPath;
const page = dto.page ?? 1; const page = dto.page ?? 1;
const size = dto.size || 250; const size = dto.size || 250;
const enumToOrder = { [AssetOrder.ASC]: 'ASC', [AssetOrder.DESC]: 'DESC' } as const; const enumToOrder = { [AssetOrder.ASC]: 'ASC', [AssetOrder.DESC]: 'DESC' } as const;

View File

@ -57,7 +57,6 @@ const assetResponse: AssetResponseDto = {
resized: false, resized: false,
thumbhash: null, thumbhash: null,
fileModifiedAt: today, fileModifiedAt: today,
isExternal: false,
isOffline: false, isOffline: false,
fileCreatedAt: today, fileCreatedAt: today,
localDateTime: today, localDateTime: today,
@ -100,7 +99,6 @@ const albumResponse: AlbumResponseDto = {
id: 'album-123', id: 'album-123',
ownerId: 'admin_id', ownerId: 'admin_id',
owner: mapUser(userStub.admin), owner: mapUser(userStub.admin),
sharedUsers: [],
albumUsers: [], albumUsers: [],
shared: false, shared: false,
hasSharedLink: false, hasSharedLink: false,

View File

@ -88,7 +88,7 @@
<div class="w-full">{user.name}</div> <div class="w-full">{user.name}</div>
<div>Owner</div> <div>Owner</div>
</div> </div>
{#each album.sharedUsers as user (user.id)} {#each album.albumUsers as { user } (user.id)}
<div class="flex items-center gap-2 py-2"> <div class="flex items-center gap-2 py-2">
<div> <div>
<UserAvatar {user} size="md" /> <UserAvatar {user} size="md" />

View File

@ -42,8 +42,8 @@
users = data.filter((user) => !(user.deletedAt || user.id === album.ownerId)); users = data.filter((user) => !(user.deletedAt || user.id === album.ownerId));
// Remove the existed shared users from the album // Remove the existed shared users from the album
for (const sharedUser of album.sharedUsers) { for (const sharedUser of album.albumUsers) {
users = users.filter((user) => user.id !== sharedUser.id); users = users.filter((user) => user.id !== sharedUser.user.id);
} }
}); });

View File

@ -571,7 +571,7 @@
</div> </div>
{/if} {/if}
{#if currentAlbum && currentAlbum.sharedUsers.length > 0 && asset.owner} {#if currentAlbum && currentAlbum.albumUsers.length > 0 && asset.owner}
<section class="px-6 dark:text-immich-dark-fg mt-4"> <section class="px-6 dark:text-immich-dark-fg mt-4">
<p class="text-sm">SHARED BY</p> <p class="text-sm">SHARED BY</p>
<div class="flex gap-4 pt-4"> <div class="flex gap-4 pt-4">

View File

@ -136,7 +136,7 @@
assetGridWidth = isShowActivity ? globalWidth - (globalWidth < 768 ? 360 : 460) : globalWidth; assetGridWidth = isShowActivity ? globalWidth - (globalWidth < 768 ? 360 : 460) : globalWidth;
} }
$: showActivityStatus = $: showActivityStatus =
album.sharedUsers.length > 0 && !$showAssetViewer && (album.isActivityEnabled || $numberOfComments > 0); album.albumUsers.length > 0 && !$showAssetViewer && (album.isActivityEnabled || $numberOfComments > 0);
$: isEditor = $: isEditor =
album.albumUsers.find(({ user: { id } }) => id === $user.id)?.role === AlbumUserRole.Editor || album.albumUsers.find(({ user: { id } }) => id === $user.id)?.role === AlbumUserRole.Editor ||
@ -158,7 +158,7 @@
backUrl = url || AppRoute.ALBUMS; backUrl = url || AppRoute.ALBUMS;
if (backUrl === AppRoute.SHARING && album.sharedUsers.length === 0 && !album.hasSharedLink) { if (backUrl === AppRoute.SHARING && album.albumUsers.length === 0 && !album.hasSharedLink) {
isCreatingSharedAlbum = true; isCreatingSharedAlbum = true;
} }
}); });
@ -229,7 +229,7 @@
isShowActivity = !isShowActivity; isShowActivity = !isShowActivity;
}; };
$: if (album.sharedUsers.length > 0) { $: if (album.albumUsers.length > 0) {
handlePromiseError(getFavorite()); handlePromiseError(getFavorite());
handlePromiseError(getNumberOfComments()); handlePromiseError(getNumberOfComments());
} }
@ -342,7 +342,7 @@
try { try {
await refreshAlbum(); await refreshAlbum();
viewMode = album.sharedUsers.length > 0 ? ViewMode.VIEW_USERS : ViewMode.VIEW; viewMode = album.albumUsers.length > 0 ? ViewMode.VIEW_USERS : ViewMode.VIEW;
} catch (error) { } catch (error) {
handleError(error, 'Error deleting shared user'); handleError(error, 'Error deleting shared user');
} }
@ -482,7 +482,7 @@
{/if} {/if}
{/if} {/if}
{#if isCreatingSharedAlbum && album.sharedUsers.length === 0} {#if isCreatingSharedAlbum && album.albumUsers.length === 0}
<Button <Button
size="sm" size="sm"
rounded="lg" rounded="lg"
@ -546,7 +546,7 @@
{album} {album}
{assetStore} {assetStore}
{assetInteractionStore} {assetInteractionStore}
isShared={album.sharedUsers.length > 0} isShared={album.albumUsers.length > 0}
isSelectionMode={viewMode === ViewMode.SELECT_THUMBNAIL} isSelectionMode={viewMode === ViewMode.SELECT_THUMBNAIL}
singleSelect={viewMode === ViewMode.SELECT_THUMBNAIL} singleSelect={viewMode === ViewMode.SELECT_THUMBNAIL}
showArchiveIcon showArchiveIcon
@ -563,7 +563,7 @@
{/if} {/if}
<!-- ALBUM SHARING --> <!-- ALBUM SHARING -->
{#if album.sharedUsers.length > 0 || (album.hasSharedLink && isOwned)} {#if album.albumUsers.length > 0 || (album.hasSharedLink && isOwned)}
<div class="my-3 flex gap-x-1"> <div class="my-3 flex gap-x-1">
<!-- link --> <!-- link -->
{#if album.hasSharedLink && isOwned} {#if album.hasSharedLink && isOwned}
@ -649,7 +649,7 @@
{/key} {/key}
</main> </main>
</div> </div>
{#if album.sharedUsers.length > 0 && album && isShowActivity && $user && !$showAssetViewer} {#if album.albumUsers.length > 0 && album && isShowActivity && $user && !$showAssetViewer}
<div class="flex"> <div class="flex">
<div <div
transition:fly={{ duration: 150 }} transition:fly={{ duration: 150 }}

View File

@ -15,7 +15,6 @@ export const albumFactory = Sync.makeFactory<AlbumResponseDto>({
ownerId: Sync.each(() => faker.string.uuid()), ownerId: Sync.each(() => faker.string.uuid()),
owner: userFactory.build(), owner: userFactory.build(),
shared: false, shared: false,
sharedUsers: [],
albumUsers: [], albumUsers: [],
hasSharedLink: false, hasSharedLink: false,
isActivityEnabled: true, isActivityEnabled: true,