mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-03-05 13:39:23 +00:00
infra(server)!: fix typeorm asset entity relations (#1782)
* fix: add correct relations to asset typeorm entity * fix: add missing createdAt column to asset entity * ci: run check to make sure generated API is up-to-date * ci: cancel workflows that aren't for the latest commit in a branch * chore: add fvm config for flutter
This commit is contained in:
30
mobile/openapi/lib/api/api_key_api.dart
generated
30
mobile/openapi/lib/api/api_key_api.dart
generated
@@ -74,11 +74,11 @@ class APIKeyApi {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] id (required):
|
||||
Future<Response> deleteKeyWithHttpInfo(num id,) async {
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteKeyWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/api-key/{id}'
|
||||
.replaceAll('{id}', id.toString());
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
@@ -105,8 +105,8 @@ class APIKeyApi {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] id (required):
|
||||
Future<void> deleteKey(num id,) async {
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteKey(String id,) async {
|
||||
final response = await deleteKeyWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@@ -119,11 +119,11 @@ class APIKeyApi {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] id (required):
|
||||
Future<Response> getKeyWithHttpInfo(num id,) async {
|
||||
/// * [String] id (required):
|
||||
Future<Response> getKeyWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/api-key/{id}'
|
||||
.replaceAll('{id}', id.toString());
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
@@ -150,8 +150,8 @@ class APIKeyApi {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] id (required):
|
||||
Future<APIKeyResponseDto?> getKey(num id,) async {
|
||||
/// * [String] id (required):
|
||||
Future<APIKeyResponseDto?> getKey(String id,) async {
|
||||
final response = await getKeyWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
@@ -219,13 +219,13 @@ class APIKeyApi {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] id (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
|
||||
Future<Response> updateKeyWithHttpInfo(num id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
||||
Future<Response> updateKeyWithHttpInfo(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/api-key/{id}'
|
||||
.replaceAll('{id}', id.toString());
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = aPIKeyUpdateDto;
|
||||
@@ -252,10 +252,10 @@ class APIKeyApi {
|
||||
///
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [num] id (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [APIKeyUpdateDto] aPIKeyUpdateDto (required):
|
||||
Future<APIKeyResponseDto?> updateKey(num id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
||||
Future<APIKeyResponseDto?> updateKey(String id, APIKeyUpdateDto aPIKeyUpdateDto,) async {
|
||||
final response = await updateKeyWithHttpInfo(id, aPIKeyUpdateDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
|
||||
22
mobile/openapi/lib/api/asset_api.dart
generated
22
mobile/openapi/lib/api/asset_api.dart
generated
@@ -1224,9 +1224,9 @@ class AssetApi {
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
///
|
||||
/// * [String] createdAt (required):
|
||||
/// * [String] fileCreatedAt (required):
|
||||
///
|
||||
/// * [String] modifiedAt (required):
|
||||
/// * [String] fileModifiedAt (required):
|
||||
///
|
||||
/// * [bool] isFavorite (required):
|
||||
///
|
||||
@@ -1237,7 +1237,7 @@ class AssetApi {
|
||||
/// * [bool] isVisible:
|
||||
///
|
||||
/// * [String] duration:
|
||||
Future<Response> uploadFileWithHttpInfo(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
Future<Response> uploadFileWithHttpInfo(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String fileCreatedAt, String fileModifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/asset/upload';
|
||||
|
||||
@@ -1274,13 +1274,13 @@ class AssetApi {
|
||||
hasFields = true;
|
||||
mp.fields[r'deviceId'] = parameterToString(deviceId);
|
||||
}
|
||||
if (createdAt != null) {
|
||||
if (fileCreatedAt != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'createdAt'] = parameterToString(createdAt);
|
||||
mp.fields[r'fileCreatedAt'] = parameterToString(fileCreatedAt);
|
||||
}
|
||||
if (modifiedAt != null) {
|
||||
if (fileModifiedAt != null) {
|
||||
hasFields = true;
|
||||
mp.fields[r'modifiedAt'] = parameterToString(modifiedAt);
|
||||
mp.fields[r'fileModifiedAt'] = parameterToString(fileModifiedAt);
|
||||
}
|
||||
if (isFavorite != null) {
|
||||
hasFields = true;
|
||||
@@ -1325,9 +1325,9 @@ class AssetApi {
|
||||
///
|
||||
/// * [String] deviceId (required):
|
||||
///
|
||||
/// * [String] createdAt (required):
|
||||
/// * [String] fileCreatedAt (required):
|
||||
///
|
||||
/// * [String] modifiedAt (required):
|
||||
/// * [String] fileModifiedAt (required):
|
||||
///
|
||||
/// * [bool] isFavorite (required):
|
||||
///
|
||||
@@ -1338,8 +1338,8 @@ class AssetApi {
|
||||
/// * [bool] isVisible:
|
||||
///
|
||||
/// * [String] duration:
|
||||
Future<AssetFileUploadResponseDto?> uploadFile(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
final response = await uploadFileWithHttpInfo(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData: livePhotoData, isVisible: isVisible, duration: duration, );
|
||||
Future<AssetFileUploadResponseDto?> uploadFile(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String fileCreatedAt, String fileModifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||
final response = await uploadFileWithHttpInfo(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData: livePhotoData, isVisible: isVisible, duration: duration, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class APIKeyResponseDto {
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
int id;
|
||||
String id;
|
||||
|
||||
String name;
|
||||
|
||||
@@ -73,7 +73,7 @@ class APIKeyResponseDto {
|
||||
}());
|
||||
|
||||
return APIKeyResponseDto(
|
||||
id: mapValueOfType<int>(json, r'id')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
createdAt: mapValueOfType<String>(json, r'createdAt')!,
|
||||
updatedAt: mapValueOfType<String>(json, r'updatedAt')!,
|
||||
|
||||
30
mobile/openapi/lib/model/asset_response_dto.dart
generated
30
mobile/openapi/lib/model/asset_response_dto.dart
generated
@@ -20,8 +20,8 @@ class AssetResponseDto {
|
||||
required this.deviceId,
|
||||
required this.originalPath,
|
||||
required this.resizePath,
|
||||
required this.createdAt,
|
||||
required this.modifiedAt,
|
||||
required this.fileCreatedAt,
|
||||
required this.fileModifiedAt,
|
||||
required this.updatedAt,
|
||||
required this.isFavorite,
|
||||
required this.mimeType,
|
||||
@@ -48,9 +48,9 @@ class AssetResponseDto {
|
||||
|
||||
String? resizePath;
|
||||
|
||||
String createdAt;
|
||||
String fileCreatedAt;
|
||||
|
||||
String modifiedAt;
|
||||
String fileModifiedAt;
|
||||
|
||||
String updatedAt;
|
||||
|
||||
@@ -93,8 +93,8 @@ class AssetResponseDto {
|
||||
other.deviceId == deviceId &&
|
||||
other.originalPath == originalPath &&
|
||||
other.resizePath == resizePath &&
|
||||
other.createdAt == createdAt &&
|
||||
other.modifiedAt == modifiedAt &&
|
||||
other.fileCreatedAt == fileCreatedAt &&
|
||||
other.fileModifiedAt == fileModifiedAt &&
|
||||
other.updatedAt == updatedAt &&
|
||||
other.isFavorite == isFavorite &&
|
||||
other.mimeType == mimeType &&
|
||||
@@ -116,8 +116,8 @@ class AssetResponseDto {
|
||||
(deviceId.hashCode) +
|
||||
(originalPath.hashCode) +
|
||||
(resizePath == null ? 0 : resizePath!.hashCode) +
|
||||
(createdAt.hashCode) +
|
||||
(modifiedAt.hashCode) +
|
||||
(fileCreatedAt.hashCode) +
|
||||
(fileModifiedAt.hashCode) +
|
||||
(updatedAt.hashCode) +
|
||||
(isFavorite.hashCode) +
|
||||
(mimeType == null ? 0 : mimeType!.hashCode) +
|
||||
@@ -130,7 +130,7 @@ class AssetResponseDto {
|
||||
(tags.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, resizePath=$resizePath, createdAt=$createdAt, modifiedAt=$modifiedAt, updatedAt=$updatedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags]';
|
||||
String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, resizePath=$resizePath, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, updatedAt=$updatedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -145,8 +145,8 @@ class AssetResponseDto {
|
||||
} else {
|
||||
// json[r'resizePath'] = null;
|
||||
}
|
||||
json[r'createdAt'] = this.createdAt;
|
||||
json[r'modifiedAt'] = this.modifiedAt;
|
||||
json[r'fileCreatedAt'] = this.fileCreatedAt;
|
||||
json[r'fileModifiedAt'] = this.fileModifiedAt;
|
||||
json[r'updatedAt'] = this.updatedAt;
|
||||
json[r'isFavorite'] = this.isFavorite;
|
||||
if (this.mimeType != null) {
|
||||
@@ -210,8 +210,8 @@ class AssetResponseDto {
|
||||
deviceId: mapValueOfType<String>(json, r'deviceId')!,
|
||||
originalPath: mapValueOfType<String>(json, r'originalPath')!,
|
||||
resizePath: mapValueOfType<String>(json, r'resizePath'),
|
||||
createdAt: mapValueOfType<String>(json, r'createdAt')!,
|
||||
modifiedAt: mapValueOfType<String>(json, r'modifiedAt')!,
|
||||
fileCreatedAt: mapValueOfType<String>(json, r'fileCreatedAt')!,
|
||||
fileModifiedAt: mapValueOfType<String>(json, r'fileModifiedAt')!,
|
||||
updatedAt: mapValueOfType<String>(json, r'updatedAt')!,
|
||||
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
|
||||
mimeType: mapValueOfType<String>(json, r'mimeType'),
|
||||
@@ -278,8 +278,8 @@ class AssetResponseDto {
|
||||
'deviceId',
|
||||
'originalPath',
|
||||
'resizePath',
|
||||
'createdAt',
|
||||
'modifiedAt',
|
||||
'fileCreatedAt',
|
||||
'fileModifiedAt',
|
||||
'updatedAt',
|
||||
'isFavorite',
|
||||
'mimeType',
|
||||
|
||||
Reference in New Issue
Block a user