mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01: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
4 changed files with 30 additions and 1 deletions
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,
|
this.owner,
|
||||||
required this.ownerId,
|
required this.ownerId,
|
||||||
this.people = const [],
|
this.people = const [],
|
||||||
|
this.resized,
|
||||||
this.smartInfo,
|
this.smartInfo,
|
||||||
this.stack,
|
this.stack,
|
||||||
this.tags = const [],
|
this.tags = const [],
|
||||||
|
@ -111,6 +112,15 @@ class AssetResponseDto {
|
||||||
|
|
||||||
List<PersonWithFacesResponseDto> people;
|
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
|
/// 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
|
||||||
|
@ -156,6 +166,7 @@ class AssetResponseDto {
|
||||||
other.owner == owner &&
|
other.owner == owner &&
|
||||||
other.ownerId == ownerId &&
|
other.ownerId == ownerId &&
|
||||||
_deepEquality.equals(other.people, people) &&
|
_deepEquality.equals(other.people, people) &&
|
||||||
|
other.resized == resized &&
|
||||||
other.smartInfo == smartInfo &&
|
other.smartInfo == smartInfo &&
|
||||||
other.stack == stack &&
|
other.stack == stack &&
|
||||||
_deepEquality.equals(other.tags, tags) &&
|
_deepEquality.equals(other.tags, tags) &&
|
||||||
|
@ -190,6 +201,7 @@ class AssetResponseDto {
|
||||||
(owner == null ? 0 : owner!.hashCode) +
|
(owner == null ? 0 : owner!.hashCode) +
|
||||||
(ownerId.hashCode) +
|
(ownerId.hashCode) +
|
||||||
(people.hashCode) +
|
(people.hashCode) +
|
||||||
|
(resized == null ? 0 : resized!.hashCode) +
|
||||||
(smartInfo == null ? 0 : smartInfo!.hashCode) +
|
(smartInfo == null ? 0 : smartInfo!.hashCode) +
|
||||||
(stack == null ? 0 : stack!.hashCode) +
|
(stack == null ? 0 : stack!.hashCode) +
|
||||||
(tags.hashCode) +
|
(tags.hashCode) +
|
||||||
|
@ -199,7 +211,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, 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() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
|
@ -250,6 +262,11 @@ class AssetResponseDto {
|
||||||
}
|
}
|
||||||
json[r'ownerId'] = this.ownerId;
|
json[r'ownerId'] = this.ownerId;
|
||||||
json[r'people'] = this.people;
|
json[r'people'] = this.people;
|
||||||
|
if (this.resized != null) {
|
||||||
|
json[r'resized'] = this.resized;
|
||||||
|
} else {
|
||||||
|
// json[r'resized'] = null;
|
||||||
|
}
|
||||||
if (this.smartInfo != null) {
|
if (this.smartInfo != null) {
|
||||||
json[r'smartInfo'] = this.smartInfo;
|
json[r'smartInfo'] = this.smartInfo;
|
||||||
} else {
|
} else {
|
||||||
|
@ -303,6 +320,7 @@ class AssetResponseDto {
|
||||||
owner: UserResponseDto.fromJson(json[r'owner']),
|
owner: UserResponseDto.fromJson(json[r'owner']),
|
||||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||||
people: PersonWithFacesResponseDto.listFromJson(json[r'people']),
|
people: PersonWithFacesResponseDto.listFromJson(json[r'people']),
|
||||||
|
resized: mapValueOfType<bool>(json, r'resized'),
|
||||||
smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']),
|
smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']),
|
||||||
stack: AssetStackResponseDto.fromJson(json[r'stack']),
|
stack: AssetStackResponseDto.fromJson(json[r'stack']),
|
||||||
tags: TagResponseDto.listFromJson(json[r'tags']),
|
tags: TagResponseDto.listFromJson(json[r'tags']),
|
||||||
|
|
|
@ -8395,6 +8395,11 @@
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
|
"resized": {
|
||||||
|
"deprecated": true,
|
||||||
|
"description": "This property was deprecated in v1.113.0",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"smartInfo": {
|
"smartInfo": {
|
||||||
"$ref": "#/components/schemas/SmartInfoResponseDto"
|
"$ref": "#/components/schemas/SmartInfoResponseDto"
|
||||||
},
|
},
|
||||||
|
|
|
@ -261,6 +261,8 @@ export type AssetResponseDto = {
|
||||||
owner?: UserResponseDto;
|
owner?: UserResponseDto;
|
||||||
ownerId: string;
|
ownerId: string;
|
||||||
people?: PersonWithFacesResponseDto[];
|
people?: PersonWithFacesResponseDto[];
|
||||||
|
/** This property was deprecated in v1.113.0 */
|
||||||
|
resized?: boolean;
|
||||||
smartInfo?: SmartInfoResponseDto;
|
smartInfo?: SmartInfoResponseDto;
|
||||||
stack?: (AssetStackResponseDto) | null;
|
stack?: (AssetStackResponseDto) | null;
|
||||||
tags?: TagResponseDto[];
|
tags?: TagResponseDto[];
|
||||||
|
|
|
@ -53,6 +53,9 @@ export class AssetResponseDto extends SanitizedAssetResponseDto {
|
||||||
checksum!: string;
|
checksum!: string;
|
||||||
stack?: AssetStackResponseDto | null;
|
stack?: AssetStackResponseDto | null;
|
||||||
duplicateId?: string | null;
|
duplicateId?: string | null;
|
||||||
|
|
||||||
|
@PropertyLifecycle({ deprecatedAt: 'v1.113.0' })
|
||||||
|
resized?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AssetStackResponseDto {
|
export class AssetStackResponseDto {
|
||||||
|
@ -148,6 +151,7 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As
|
||||||
isOffline: entity.isOffline,
|
isOffline: entity.isOffline,
|
||||||
hasMetadata: true,
|
hasMetadata: true,
|
||||||
duplicateId: entity.duplicateId,
|
duplicateId: entity.duplicateId,
|
||||||
|
resized: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue