1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-26 09:52:35 +01:00
immich/mobile/lib/interfaces/user.interface.dart
shenlong aeb3e0a84f
refactor(mobile): split store into repo and service ()
* refactor(mobile): migrate store

* refactor(mobile): expand abbreviations

* chore(mobile): fix lint

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-02-19 13:05:24 -06:00

27 lines
702 B
Dart

import 'package:immich_mobile/entities/user.entity.dart';
import 'package:immich_mobile/interfaces/database.interface.dart';
abstract interface class IUserRepository implements IDatabaseRepository {
Future<User?> get(String id);
Future<User?> getByDbId(int id);
Future<List<User>> getByIds(List<String> ids);
Future<List<User>> getAll({bool self = true, UserSort? sortBy});
/// Returns all users whose assets can be accessed (self+partners)
Future<List<User>> getAllAccessible();
Future<List<User>> upsertAll(List<User> users);
Future<User> update(User user);
Future<void> deleteById(List<int> ids);
Future<User> me();
Future<void> clearTable();
}
enum UserSort { id }