mirror of
https://github.com/immich-app/immich.git
synced 2025-02-17 19:49:40 +02:00
chore(server): deprecate resized property (#12143)
* chore: add dummy resized value for release * openapi * add deprecation life cycle info * use correct default value
This commit is contained in:
parent
b1e780561d
commit
b3b599e071
20
mobile/openapi/lib/model/asset_response_dto.dart
generated
20
mobile/openapi/lib/model/asset_response_dto.dart
generated
@ -36,6 +36,7 @@ class AssetResponseDto {
|
||||
this.owner,
|
||||
required this.ownerId,
|
||||
this.people = const [],
|
||||
this.resized,
|
||||
this.smartInfo,
|
||||
this.stack,
|
||||
this.tags = const [],
|
||||
@ -111,6 +112,15 @@ class AssetResponseDto {
|
||||
|
||||
List<PersonWithFacesResponseDto> people;
|
||||
|
||||
/// This property was deprecated in v1.113.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? resized;
|
||||
|
||||
///
|
||||
/// 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
|
||||
@ -156,6 +166,7 @@ class AssetResponseDto {
|
||||
other.owner == owner &&
|
||||
other.ownerId == ownerId &&
|
||||
_deepEquality.equals(other.people, people) &&
|
||||
other.resized == resized &&
|
||||
other.smartInfo == smartInfo &&
|
||||
other.stack == stack &&
|
||||
_deepEquality.equals(other.tags, tags) &&
|
||||
@ -190,6 +201,7 @@ class AssetResponseDto {
|
||||
(owner == null ? 0 : owner!.hashCode) +
|
||||
(ownerId.hashCode) +
|
||||
(people.hashCode) +
|
||||
(resized == null ? 0 : resized!.hashCode) +
|
||||
(smartInfo == null ? 0 : smartInfo!.hashCode) +
|
||||
(stack == null ? 0 : stack!.hashCode) +
|
||||
(tags.hashCode) +
|
||||
@ -199,7 +211,7 @@ class AssetResponseDto {
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@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, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, smartInfo=$smartInfo, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, unassignedFaces=$unassignedFaces, 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, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, unassignedFaces=$unassignedFaces, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -250,6 +262,11 @@ class AssetResponseDto {
|
||||
}
|
||||
json[r'ownerId'] = this.ownerId;
|
||||
json[r'people'] = this.people;
|
||||
if (this.resized != null) {
|
||||
json[r'resized'] = this.resized;
|
||||
} else {
|
||||
// json[r'resized'] = null;
|
||||
}
|
||||
if (this.smartInfo != null) {
|
||||
json[r'smartInfo'] = this.smartInfo;
|
||||
} else {
|
||||
@ -303,6 +320,7 @@ class AssetResponseDto {
|
||||
owner: UserResponseDto.fromJson(json[r'owner']),
|
||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||
people: PersonWithFacesResponseDto.listFromJson(json[r'people']),
|
||||
resized: mapValueOfType<bool>(json, r'resized'),
|
||||
smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']),
|
||||
stack: AssetStackResponseDto.fromJson(json[r'stack']),
|
||||
tags: TagResponseDto.listFromJson(json[r'tags']),
|
||||
|
@ -8395,6 +8395,11 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"resized": {
|
||||
"deprecated": true,
|
||||
"description": "This property was deprecated in v1.113.0",
|
||||
"type": "boolean"
|
||||
},
|
||||
"smartInfo": {
|
||||
"$ref": "#/components/schemas/SmartInfoResponseDto"
|
||||
},
|
||||
|
@ -261,6 +261,8 @@ export type AssetResponseDto = {
|
||||
owner?: UserResponseDto;
|
||||
ownerId: string;
|
||||
people?: PersonWithFacesResponseDto[];
|
||||
/** This property was deprecated in v1.113.0 */
|
||||
resized?: boolean;
|
||||
smartInfo?: SmartInfoResponseDto;
|
||||
stack?: (AssetStackResponseDto) | null;
|
||||
tags?: TagResponseDto[];
|
||||
|
@ -53,6 +53,9 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
|
||||
checksum!: string;
|
||||
stack?: AssetStackResponseDto | null;
|
||||
duplicateId?: string | null;
|
||||
|
||||
@PropertyLifecycle({ deprecatedAt: 'v1.113.0' })
|
||||
resized?: boolean;
|
||||
}
|
||||
|
||||
export class AssetStackResponseDto {
|
||||
@ -148,6 +151,7 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As
|
||||
isOffline: entity.isOffline,
|
||||
hasMetadata: true,
|
||||
duplicateId: entity.duplicateId,
|
||||
resized: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user