mirror of
https://github.com/immich-app/immich.git
synced 2024-11-30 09:47:31 +02:00
3868736799
* refactor(mobile): album api repository for album service
41 lines
923 B
Dart
41 lines
923 B
Dart
import 'package:immich_mobile/entities/album.entity.dart';
|
|
|
|
abstract interface class IAlbumApiRepository {
|
|
Future<Album> get(String id);
|
|
|
|
Future<List<Album>> getAll({bool? shared});
|
|
|
|
Future<Album> create(
|
|
String name, {
|
|
required Iterable<String> assetIds,
|
|
Iterable<String> sharedUserIds = const [],
|
|
});
|
|
|
|
Future<Album> update(
|
|
String albumId, {
|
|
String? name,
|
|
String? thumbnailAssetId,
|
|
String? description,
|
|
bool? activityEnabled,
|
|
});
|
|
|
|
Future<void> delete(String albumId);
|
|
|
|
Future<({List<String> added, List<String> duplicates})> addAssets(
|
|
String albumId,
|
|
Iterable<String> assetIds,
|
|
);
|
|
|
|
Future<({List<String> removed, List<String> failed})> removeAssets(
|
|
String albumId,
|
|
Iterable<String> assetIds,
|
|
);
|
|
|
|
Future<Album> addUsers(
|
|
String albumId,
|
|
Iterable<String> userIds,
|
|
);
|
|
|
|
Future<void> removeUser(String albumId, {required String userId});
|
|
}
|