import 'package:dartz/dartz.dart'; import 'package:flowy_infra/notifier.dart'; import 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; import 'package:flowy_sdk/protobuf/flowy-workspace-infra/workspace_create.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-core/errors.pb.dart'; export 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart'; export 'package:flowy_sdk/protobuf/flowy-user-infra/protobuf.dart' show UserProfile; abstract class IUser { UserProfile get user; Future> fetchUserProfile(String userId); Future, WorkspaceError>> fetchWorkspaces(); Future> deleteWorkspace(String workspaceId); Future> signOut(); Future> initUser(); } typedef UserProfileUpdatedNotifierValue = Either; typedef AuthNotifierValue = Either; typedef WorkspaceUpdatedNotifierValue = Either, WorkspaceError>; abstract class IUserListener { void start(); PublishNotifier get profileUpdatedNotifier; PublishNotifier get authDidChangedNotifier; PublishNotifier get workspaceUpdatedNotifier; Future stop(); }