mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-07 19:59:07 +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:
4
mobile/.fvm/fvm_config.json
Normal file
4
mobile/.fvm/fvm_config.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"flutterSdkVersion": "3.7.0",
|
||||
"flavors": {}
|
||||
}
|
||||
3
mobile/.gitignore
vendored
3
mobile/.gitignore
vendored
@@ -32,6 +32,7 @@
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
.fvm/flutter_sdk
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
@@ -48,4 +49,4 @@ app.*.map.json
|
||||
/android/app/release
|
||||
|
||||
# Fastlane
|
||||
ios/fastlane/report.xml
|
||||
ios/fastlane/report.xml
|
||||
|
||||
@@ -120,8 +120,8 @@ class AlbumViewerPage extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
Widget buildAlbumDateRange(Album album) {
|
||||
final DateTime startDate = album.assets.first.createdAt;
|
||||
final DateTime endDate = album.assets.last.createdAt; //Need default.
|
||||
final DateTime startDate = album.assets.first.fileCreatedAt;
|
||||
final DateTime endDate = album.assets.last.fileCreatedAt; //Need default.
|
||||
final String startDateText =
|
||||
DateFormat(startDate.year == endDate.year ? 'LLL d' : 'LLL d, y')
|
||||
.format(startDate);
|
||||
|
||||
@@ -146,7 +146,7 @@ class ExifBottomSheet extends HookConsumerWidget {
|
||||
buildDate() {
|
||||
return Text(
|
||||
DateFormat('date_format'.tr()).format(
|
||||
assetDetail.createdAt.toLocal(),
|
||||
assetDetail.fileCreatedAt.toLocal(),
|
||||
),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -2,26 +2,26 @@ import 'dart:convert';
|
||||
|
||||
class CurrentUploadAsset {
|
||||
final String id;
|
||||
final DateTime createdAt;
|
||||
final DateTime fileCreatedAt;
|
||||
final String fileName;
|
||||
final String fileType;
|
||||
|
||||
CurrentUploadAsset({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.fileCreatedAt,
|
||||
required this.fileName,
|
||||
required this.fileType,
|
||||
});
|
||||
|
||||
CurrentUploadAsset copyWith({
|
||||
String? id,
|
||||
DateTime? createdAt,
|
||||
DateTime? fileCreatedAt,
|
||||
String? fileName,
|
||||
String? fileType,
|
||||
}) {
|
||||
return CurrentUploadAsset(
|
||||
id: id ?? this.id,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
fileCreatedAt: fileCreatedAt ?? this.fileCreatedAt,
|
||||
fileName: fileName ?? this.fileName,
|
||||
fileType: fileType ?? this.fileType,
|
||||
);
|
||||
@@ -31,7 +31,7 @@ class CurrentUploadAsset {
|
||||
final result = <String, dynamic>{};
|
||||
|
||||
result.addAll({'id': id});
|
||||
result.addAll({'createdAt': createdAt.millisecondsSinceEpoch});
|
||||
result.addAll({'fileCreatedAt': fileCreatedAt.millisecondsSinceEpoch});
|
||||
result.addAll({'fileName': fileName});
|
||||
result.addAll({'fileType': fileType});
|
||||
|
||||
@@ -41,7 +41,7 @@ class CurrentUploadAsset {
|
||||
factory CurrentUploadAsset.fromMap(Map<String, dynamic> map) {
|
||||
return CurrentUploadAsset(
|
||||
id: map['id'] ?? '',
|
||||
createdAt: DateTime.fromMillisecondsSinceEpoch(map['createdAt']),
|
||||
fileCreatedAt: DateTime.fromMillisecondsSinceEpoch(map['fileCreatedAt']),
|
||||
fileName: map['fileName'] ?? '',
|
||||
fileType: map['fileType'] ?? '',
|
||||
);
|
||||
@@ -54,7 +54,7 @@ class CurrentUploadAsset {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CurrentUploadAsset(id: $id, createdAt: $createdAt, fileName: $fileName, fileType: $fileType)';
|
||||
return 'CurrentUploadAsset(id: $id, fileCreatedAt: $fileCreatedAt, fileName: $fileName, fileType: $fileType)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -63,7 +63,7 @@ class CurrentUploadAsset {
|
||||
|
||||
return other is CurrentUploadAsset &&
|
||||
other.id == id &&
|
||||
other.createdAt == createdAt &&
|
||||
other.fileCreatedAt == fileCreatedAt &&
|
||||
other.fileName == fileName &&
|
||||
other.fileType == fileType;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ class CurrentUploadAsset {
|
||||
@override
|
||||
int get hashCode {
|
||||
return id.hashCode ^
|
||||
createdAt.hashCode ^
|
||||
fileCreatedAt.hashCode ^
|
||||
fileName.hashCode ^
|
||||
fileType.hashCode;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:photo_manager/photo_manager.dart';
|
||||
|
||||
class ErrorUploadAsset {
|
||||
final String id;
|
||||
final DateTime createdAt;
|
||||
final DateTime fileCreatedAt;
|
||||
final String fileName;
|
||||
final String fileType;
|
||||
final AssetEntity asset;
|
||||
@@ -10,7 +10,7 @@ class ErrorUploadAsset {
|
||||
|
||||
const ErrorUploadAsset({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.fileCreatedAt,
|
||||
required this.fileName,
|
||||
required this.fileType,
|
||||
required this.asset,
|
||||
@@ -19,7 +19,7 @@ class ErrorUploadAsset {
|
||||
|
||||
ErrorUploadAsset copyWith({
|
||||
String? id,
|
||||
DateTime? createdAt,
|
||||
DateTime? fileCreatedAt,
|
||||
String? fileName,
|
||||
String? fileType,
|
||||
AssetEntity? asset,
|
||||
@@ -27,7 +27,7 @@ class ErrorUploadAsset {
|
||||
}) {
|
||||
return ErrorUploadAsset(
|
||||
id: id ?? this.id,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
fileCreatedAt: fileCreatedAt ?? this.fileCreatedAt,
|
||||
fileName: fileName ?? this.fileName,
|
||||
fileType: fileType ?? this.fileType,
|
||||
asset: asset ?? this.asset,
|
||||
@@ -37,7 +37,7 @@ class ErrorUploadAsset {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ErrorUploadAsset(id: $id, createdAt: $createdAt, fileName: $fileName, fileType: $fileType, asset: $asset, errorMessage: $errorMessage)';
|
||||
return 'ErrorUploadAsset(id: $id, fileCreatedAt: $fileCreatedAt, fileName: $fileName, fileType: $fileType, asset: $asset, errorMessage: $errorMessage)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -46,7 +46,7 @@ class ErrorUploadAsset {
|
||||
|
||||
return other is ErrorUploadAsset &&
|
||||
other.id == id &&
|
||||
other.createdAt == createdAt &&
|
||||
other.fileCreatedAt == fileCreatedAt &&
|
||||
other.fileName == fileName &&
|
||||
other.fileType == fileType &&
|
||||
other.asset == asset &&
|
||||
@@ -56,7 +56,7 @@ class ErrorUploadAsset {
|
||||
@override
|
||||
int get hashCode {
|
||||
return id.hashCode ^
|
||||
createdAt.hashCode ^
|
||||
fileCreatedAt.hashCode ^
|
||||
fileName.hashCode ^
|
||||
fileType.hashCode ^
|
||||
asset.hashCode ^
|
||||
|
||||
@@ -55,7 +55,7 @@ class BackupNotifier extends StateNotifier<BackUpState> {
|
||||
selectedAlbumsBackupAssetsIds: const {},
|
||||
currentUploadAsset: CurrentUploadAsset(
|
||||
id: '...',
|
||||
createdAt: DateTime.parse('2020-10-04'),
|
||||
fileCreatedAt: DateTime.parse('2020-10-04'),
|
||||
fileName: '...',
|
||||
fileType: '...',
|
||||
),
|
||||
|
||||
@@ -260,8 +260,8 @@ class BackupService {
|
||||
req.fields['deviceAssetId'] = entity.id;
|
||||
req.fields['deviceId'] = deviceId;
|
||||
req.fields['assetType'] = _getAssetType(entity.type);
|
||||
req.fields['createdAt'] = entity.createDateTime.toIso8601String();
|
||||
req.fields['modifiedAt'] = entity.modifiedDateTime.toIso8601String();
|
||||
req.fields['fileCreatedAt'] = entity.createDateTime.toIso8601String();
|
||||
req.fields['fileModifiedAt'] = entity.modifiedDateTime.toIso8601String();
|
||||
req.fields['isFavorite'] = entity.isFavorite.toString();
|
||||
req.fields['fileExtension'] = fileExtension;
|
||||
req.fields['duration'] = entity.videoDuration.toString();
|
||||
@@ -278,7 +278,7 @@ class BackupService {
|
||||
setCurrentUploadAssetCb(
|
||||
CurrentUploadAsset(
|
||||
id: entity.id,
|
||||
createdAt: entity.createDateTime.year == 1970
|
||||
fileCreatedAt: entity.createDateTime.year == 1970
|
||||
? entity.modifiedDateTime
|
||||
: entity.createDateTime,
|
||||
fileName: originalFileName,
|
||||
@@ -308,7 +308,7 @@ class BackupService {
|
||||
ErrorUploadAsset(
|
||||
asset: entity,
|
||||
id: entity.id,
|
||||
createdAt: entity.createDateTime,
|
||||
fileCreatedAt: entity.createDateTime,
|
||||
fileName: originalFileName,
|
||||
fileType: _getAssetType(entity.type),
|
||||
errorMessage: error['error'],
|
||||
|
||||
@@ -20,7 +20,7 @@ class CurrentUploadingAssetInfoBox extends HookConsumerWidget {
|
||||
String getAssetCreationDate() {
|
||||
return DateFormat.yMMMMd('en_US').format(
|
||||
DateTime.parse(
|
||||
asset.createdAt.toString(),
|
||||
asset.fileCreatedAt.toString(),
|
||||
).toLocal(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class FailedBackupStatusPage extends HookConsumerWidget {
|
||||
Text(
|
||||
DateFormat.yMMMMd('en_US').format(
|
||||
DateTime.parse(
|
||||
errorAsset.createdAt.toString(),
|
||||
errorAsset.fileCreatedAt.toString(),
|
||||
).toLocal(),
|
||||
),
|
||||
style: TextStyle(
|
||||
|
||||
@@ -82,14 +82,14 @@ class RenderList {
|
||||
if (groupBy == GroupAssetsBy.day) {
|
||||
return assets.groupListsBy(
|
||||
(element) {
|
||||
final date = element.createdAt.toLocal();
|
||||
final date = element.fileCreatedAt.toLocal();
|
||||
return DateTime(date.year, date.month, date.day);
|
||||
},
|
||||
);
|
||||
} else if (groupBy == GroupAssetsBy.month) {
|
||||
return assets.groupListsBy(
|
||||
(element) {
|
||||
final date = element.createdAt.toLocal();
|
||||
final date = element.fileCreatedAt.toLocal();
|
||||
return DateTime(date.year, date.month);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -10,8 +10,8 @@ import 'package:path/path.dart' as p;
|
||||
class Asset {
|
||||
Asset.remote(AssetResponseDto remote)
|
||||
: remoteId = remote.id,
|
||||
createdAt = DateTime.parse(remote.createdAt),
|
||||
modifiedAt = DateTime.parse(remote.modifiedAt),
|
||||
fileCreatedAt = DateTime.parse(remote.fileCreatedAt),
|
||||
fileModifiedAt = DateTime.parse(remote.fileModifiedAt),
|
||||
durationInSeconds = remote.duration.toDuration().inSeconds,
|
||||
fileName = p.basename(remote.originalPath),
|
||||
height = remote.exifInfo?.exifImageHeight?.toInt(),
|
||||
@@ -37,11 +37,11 @@ class Asset {
|
||||
deviceAssetId = local.id,
|
||||
deviceId = Hive.box(userInfoBox).get(deviceIdKey),
|
||||
ownerId = owner,
|
||||
modifiedAt = local.modifiedDateTime.toUtc(),
|
||||
fileModifiedAt = local.modifiedDateTime.toUtc(),
|
||||
isFavorite = local.isFavorite,
|
||||
createdAt = local.createDateTime.toUtc() {
|
||||
if (createdAt.year == 1970) {
|
||||
createdAt = modifiedAt;
|
||||
fileCreatedAt = local.createDateTime.toUtc() {
|
||||
if (fileCreatedAt.year == 1970) {
|
||||
fileCreatedAt = fileModifiedAt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ class Asset {
|
||||
required this.deviceAssetId,
|
||||
required this.deviceId,
|
||||
required this.ownerId,
|
||||
required this.createdAt,
|
||||
required this.modifiedAt,
|
||||
required this.fileCreatedAt,
|
||||
required this.fileModifiedAt,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
required this.durationInSeconds,
|
||||
@@ -74,10 +74,10 @@ class Asset {
|
||||
width: width!,
|
||||
height: height!,
|
||||
duration: durationInSeconds,
|
||||
createDateSecond: createdAt.millisecondsSinceEpoch ~/ 1000,
|
||||
createDateSecond: fileCreatedAt.millisecondsSinceEpoch ~/ 1000,
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
modifiedDateSecond: modifiedAt.millisecondsSinceEpoch ~/ 1000,
|
||||
modifiedDateSecond: fileModifiedAt.millisecondsSinceEpoch ~/ 1000,
|
||||
title: fileName,
|
||||
);
|
||||
}
|
||||
@@ -94,9 +94,9 @@ class Asset {
|
||||
|
||||
String ownerId;
|
||||
|
||||
DateTime createdAt;
|
||||
DateTime fileCreatedAt;
|
||||
|
||||
DateTime modifiedAt;
|
||||
DateTime fileModifiedAt;
|
||||
|
||||
double? latitude;
|
||||
|
||||
@@ -146,8 +146,8 @@ class Asset {
|
||||
json["deviceAssetId"] = deviceAssetId;
|
||||
json["deviceId"] = deviceId;
|
||||
json["ownerId"] = ownerId;
|
||||
json["createdAt"] = createdAt.millisecondsSinceEpoch;
|
||||
json["modifiedAt"] = modifiedAt.millisecondsSinceEpoch;
|
||||
json["fileCreatedAt"] = fileCreatedAt.millisecondsSinceEpoch;
|
||||
json["fileModifiedAt"] = fileModifiedAt.millisecondsSinceEpoch;
|
||||
json["latitude"] = latitude;
|
||||
json["longitude"] = longitude;
|
||||
json["durationInSeconds"] = durationInSeconds;
|
||||
@@ -171,10 +171,10 @@ class Asset {
|
||||
deviceAssetId: json["deviceAssetId"],
|
||||
deviceId: json["deviceId"],
|
||||
ownerId: json["ownerId"],
|
||||
createdAt:
|
||||
DateTime.fromMillisecondsSinceEpoch(json["createdAt"], isUtc: true),
|
||||
modifiedAt: DateTime.fromMillisecondsSinceEpoch(
|
||||
json["modifiedAt"],
|
||||
fileCreatedAt:
|
||||
DateTime.fromMillisecondsSinceEpoch(json["fileCreatedAt"], isUtc: true),
|
||||
fileModifiedAt: DateTime.fromMillisecondsSinceEpoch(
|
||||
json["fileModifiedAt"],
|
||||
isUtc: true,
|
||||
),
|
||||
latitude: json["latitude"],
|
||||
|
||||
@@ -302,11 +302,11 @@ final assetGroupByMonthYearProvider = StateProvider((ref) {
|
||||
ref.watch(assetProvider).allAssets.where((e) => e.isRemote).toList();
|
||||
|
||||
assets.sortByCompare<DateTime>(
|
||||
(e) => e.createdAt,
|
||||
(e) => e.fileCreatedAt,
|
||||
(a, b) => b.compareTo(a),
|
||||
);
|
||||
|
||||
return assets.groupListsBy(
|
||||
(element) => DateFormat('MMMM, y').format(element.createdAt.toLocal()),
|
||||
(element) => DateFormat('MMMM, y').format(element.fileCreatedAt.toLocal()),
|
||||
);
|
||||
});
|
||||
|
||||
2
mobile/openapi/README.md
generated
2
mobile/openapi/README.md
generated
@@ -3,7 +3,7 @@ Immich API
|
||||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.47.2
|
||||
- API version: 1.47.3
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
12
mobile/openapi/doc/APIKeyApi.md
generated
12
mobile/openapi/doc/APIKeyApi.md
generated
@@ -71,7 +71,7 @@ No authorization required
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
final api_instance = APIKeyApi();
|
||||
final id = 8.14; // num |
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
api_instance.deleteKey(id);
|
||||
@@ -84,7 +84,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **num**| |
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -113,7 +113,7 @@ No authorization required
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
final api_instance = APIKeyApi();
|
||||
final id = 8.14; // num |
|
||||
final id = id_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.getKey(id);
|
||||
@@ -127,7 +127,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **num**| |
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -195,7 +195,7 @@ No authorization required
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
final api_instance = APIKeyApi();
|
||||
final id = 8.14; // num |
|
||||
final id = id_example; // String |
|
||||
final aPIKeyUpdateDto = APIKeyUpdateDto(); // APIKeyUpdateDto |
|
||||
|
||||
try {
|
||||
@@ -210,7 +210,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **num**| |
|
||||
**id** | **String**| |
|
||||
**aPIKeyUpdateDto** | [**APIKeyUpdateDto**](APIKeyUpdateDto.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
2
mobile/openapi/doc/APIKeyResponseDto.md
generated
2
mobile/openapi/doc/APIKeyResponseDto.md
generated
@@ -8,7 +8,7 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **int** | |
|
||||
**id** | **String** | |
|
||||
**name** | **String** | |
|
||||
**createdAt** | **String** | |
|
||||
**updatedAt** | **String** | |
|
||||
|
||||
12
mobile/openapi/doc/AssetApi.md
generated
12
mobile/openapi/doc/AssetApi.md
generated
@@ -1109,7 +1109,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **uploadFile**
|
||||
> AssetFileUploadResponseDto uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration)
|
||||
> AssetFileUploadResponseDto uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration)
|
||||
|
||||
|
||||
|
||||
@@ -1130,8 +1130,8 @@ final assetType = ; // AssetTypeEnum |
|
||||
final assetData = BINARY_DATA_HERE; // MultipartFile |
|
||||
final deviceAssetId = deviceAssetId_example; // String |
|
||||
final deviceId = deviceId_example; // String |
|
||||
final createdAt = createdAt_example; // String |
|
||||
final modifiedAt = modifiedAt_example; // String |
|
||||
final fileCreatedAt = fileCreatedAt_example; // String |
|
||||
final fileModifiedAt = fileModifiedAt_example; // String |
|
||||
final isFavorite = true; // bool |
|
||||
final fileExtension = fileExtension_example; // String |
|
||||
final livePhotoData = BINARY_DATA_HERE; // MultipartFile |
|
||||
@@ -1139,7 +1139,7 @@ final isVisible = true; // bool |
|
||||
final duration = duration_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration);
|
||||
final result = api_instance.uploadFile(assetType, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AssetApi->uploadFile: $e\n');
|
||||
@@ -1154,8 +1154,8 @@ Name | Type | Description | Notes
|
||||
**assetData** | **MultipartFile**| |
|
||||
**deviceAssetId** | **String**| |
|
||||
**deviceId** | **String**| |
|
||||
**createdAt** | **String**| |
|
||||
**modifiedAt** | **String**| |
|
||||
**fileCreatedAt** | **String**| |
|
||||
**fileModifiedAt** | **String**| |
|
||||
**isFavorite** | **bool**| |
|
||||
**fileExtension** | **String**| |
|
||||
**livePhotoData** | **MultipartFile**| | [optional]
|
||||
|
||||
4
mobile/openapi/doc/AssetResponseDto.md
generated
4
mobile/openapi/doc/AssetResponseDto.md
generated
@@ -15,8 +15,8 @@ Name | Type | Description | Notes
|
||||
**deviceId** | **String** | |
|
||||
**originalPath** | **String** | |
|
||||
**resizePath** | **String** | |
|
||||
**createdAt** | **String** | |
|
||||
**modifiedAt** | **String** | |
|
||||
**fileCreatedAt** | **String** | |
|
||||
**fileModifiedAt** | **String** | |
|
||||
**updatedAt** | **String** | |
|
||||
**isFavorite** | **bool** | |
|
||||
**mimeType** | **String** | |
|
||||
|
||||
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',
|
||||
|
||||
6
mobile/openapi/test/api_key_api_test.dart
generated
6
mobile/openapi/test/api_key_api_test.dart
generated
@@ -26,14 +26,14 @@ void main() {
|
||||
|
||||
//
|
||||
//
|
||||
//Future deleteKey(num id) async
|
||||
//Future deleteKey(String id) async
|
||||
test('test deleteKey', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//
|
||||
//
|
||||
//Future<APIKeyResponseDto> getKey(num id) async
|
||||
//Future<APIKeyResponseDto> getKey(String id) async
|
||||
test('test getKey', () async {
|
||||
// TODO
|
||||
});
|
||||
@@ -47,7 +47,7 @@ void main() {
|
||||
|
||||
//
|
||||
//
|
||||
//Future<APIKeyResponseDto> updateKey(num id, APIKeyUpdateDto aPIKeyUpdateDto) async
|
||||
//Future<APIKeyResponseDto> updateKey(String id, APIKeyUpdateDto aPIKeyUpdateDto) async
|
||||
test('test updateKey', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ void main() {
|
||||
// final instance = APIKeyResponseDto();
|
||||
|
||||
group('test APIKeyResponseDto', () {
|
||||
// int id
|
||||
// String id
|
||||
test('to test the property `id`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
2
mobile/openapi/test/asset_api_test.dart
generated
2
mobile/openapi/test/asset_api_test.dart
generated
@@ -173,7 +173,7 @@ void main() {
|
||||
|
||||
//
|
||||
//
|
||||
//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
|
||||
//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
|
||||
test('test uploadFile', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
8
mobile/openapi/test/asset_response_dto_test.dart
generated
8
mobile/openapi/test/asset_response_dto_test.dart
generated
@@ -51,13 +51,13 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String createdAt
|
||||
test('to test the property `createdAt`', () async {
|
||||
// String fileCreatedAt
|
||||
test('to test the property `fileCreatedAt`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String modifiedAt
|
||||
test('to test the property `modifiedAt`', () async {
|
||||
// String fileModifiedAt
|
||||
test('to test the property `fileModifiedAt`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
@@ -1513,5 +1513,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
sdks:
|
||||
dart: ">=2.19.0 <3.0.0"
|
||||
dart: ">=2.19.0 <4.0.0"
|
||||
flutter: ">=3.3.0"
|
||||
|
||||
@@ -16,8 +16,8 @@ void main() {
|
||||
deviceAssetId: '$i',
|
||||
deviceId: '',
|
||||
ownerId: '',
|
||||
createdAt: date,
|
||||
modifiedAt: date,
|
||||
fileCreatedAt: date,
|
||||
fileModifiedAt: date,
|
||||
durationInSeconds: 0,
|
||||
fileName: '',
|
||||
isFavorite: false,
|
||||
@@ -29,25 +29,25 @@ void main() {
|
||||
|
||||
assets.addAll(
|
||||
testAssets.sublist(0, 5).map((e) {
|
||||
e.createdAt = DateTime(2022, 1, 5);
|
||||
e.fileCreatedAt = DateTime(2022, 1, 5);
|
||||
return e;
|
||||
}).toList(),
|
||||
);
|
||||
assets.addAll(
|
||||
testAssets.sublist(5, 10).map((e) {
|
||||
e.createdAt = DateTime(2022, 1, 10);
|
||||
e.fileCreatedAt = DateTime(2022, 1, 10);
|
||||
return e;
|
||||
}).toList(),
|
||||
);
|
||||
assets.addAll(
|
||||
testAssets.sublist(10, 15).map((e) {
|
||||
e.createdAt = DateTime(2022, 2, 17);
|
||||
e.fileCreatedAt = DateTime(2022, 2, 17);
|
||||
return e;
|
||||
}).toList(),
|
||||
);
|
||||
assets.addAll(
|
||||
testAssets.sublist(15, 30).map((e) {
|
||||
e.createdAt = DateTime(2022, 10, 15);
|
||||
e.fileCreatedAt = DateTime(2022, 10, 15);
|
||||
return e;
|
||||
}).toList(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user