import 'package:immich_mobile/entities/album.entity.dart'; import 'package:immich_mobile/entities/asset.entity.dart'; import 'package:immich_mobile/entities/device_asset.entity.dart'; import 'package:immich_mobile/interfaces/database.interface.dart'; abstract interface class IAssetRepository implements IDatabaseRepository { Future getByRemoteId(String id); Future getByOwnerIdChecksum(int ownerId, String checksum); Future> getAllByRemoteId( Iterable ids, { AssetState? state, }); Future> getAllByOwnerIdChecksum( List ids, List checksums, ); Future> getAll({ required int ownerId, AssetState? state, AssetSort? sortBy, int? limit, }); Future> getAllLocal(); Future> getByAlbum( Album album, { Iterable notOwnedBy = const [], int? ownerId, AssetState? state, AssetSort? sortBy, }); Future update(Asset asset); Future> updateAll(List assets); Future deleteAllByRemoteId(List ids, {AssetState? state}); Future deleteById(List ids); Future> getMatches({ required List assets, required int ownerId, AssetState? state, int limit = 100, }); Future> getDeviceAssetsById(List ids); Future upsertDeviceAssets(List deviceAssets); Future upsertDuplicatedAssets(Iterable duplicatedAssets); Future> getAllDuplicatedAssetIds(); } enum AssetSort { checksum, ownerIdChecksum }