2024-09-16 22:26:14 +02:00
|
|
|
import 'package:immich_mobile/entities/album.entity.dart';
|
|
|
|
import 'package:immich_mobile/entities/asset.entity.dart';
|
2024-09-24 14:50:21 +02:00
|
|
|
import 'package:immich_mobile/entities/device_asset.entity.dart';
|
2024-09-16 22:26:14 +02:00
|
|
|
import 'package:immich_mobile/entities/user.entity.dart';
|
|
|
|
|
|
|
|
abstract interface class IAssetRepository {
|
2024-09-20 15:32:37 +02:00
|
|
|
Future<Asset?> getByRemoteId(String id);
|
|
|
|
Future<List<Asset>> getAllByRemoteId(Iterable<String> ids);
|
2024-09-16 22:26:14 +02:00
|
|
|
Future<List<Asset>> getByAlbum(Album album, {User? notOwnedBy});
|
|
|
|
Future<void> deleteById(List<int> ids);
|
2024-09-24 08:24:48 +02:00
|
|
|
Future<List<Asset>> getAll({
|
|
|
|
required int ownerId,
|
|
|
|
bool? remote,
|
|
|
|
int limit = 100,
|
|
|
|
});
|
2024-09-24 14:50:21 +02:00
|
|
|
Future<List<Asset>> updateAll(List<Asset> assets);
|
2024-09-24 08:24:48 +02:00
|
|
|
|
|
|
|
Future<List<Asset>> getMatches({
|
|
|
|
required List<Asset> assets,
|
|
|
|
required int ownerId,
|
|
|
|
bool? remote,
|
|
|
|
int limit = 100,
|
|
|
|
});
|
2024-09-24 14:50:21 +02:00
|
|
|
|
|
|
|
Future<List<DeviceAsset?>> getDeviceAssetsById(List<Object> ids);
|
|
|
|
Future<void> upsertDeviceAssets(List<DeviceAsset> deviceAssets);
|
2024-09-16 22:26:14 +02:00
|
|
|
}
|