This commit is contained in:
problematicconsumer
2023-07-06 17:18:41 +03:30
commit b617c95f62
352 changed files with 21017 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import 'package:fpdart/fpdart.dart';
import 'package:hiddify/domain/profiles/profiles.dart';
abstract class ProfilesRepository {
TaskEither<ProfileFailure, Profile?> get(String id);
Stream<Either<ProfileFailure, Profile?>> watchActiveProfile();
Stream<Either<ProfileFailure, bool>> watchHasAnyProfile();
Stream<Either<ProfileFailure, List<Profile>>> watchAll();
TaskEither<ProfileFailure, Unit> add(Profile baseProfile);
TaskEither<ProfileFailure, Unit> update(Profile baseProfile);
TaskEither<ProfileFailure, Unit> setAsActive(String id);
TaskEither<ProfileFailure, Unit> delete(String id);
}