import '../../models/user_model.dart';

typedef CreateUserResult = ({UserModel user, String secret});

abstract class UserService {
  /// Returns all users.
  Future<List<UserModel>> getUsers();

  /// Creates a new user and returns the user along with the generated secret.
  Future<CreateUserResult> createUser(
    String username, {
    String? phoneNumber,
  });

  /// Resets the secret for [userId] and returns the new secret.
  Future<String> resetSecret(String userId);

  /// Logs out the user with the given [userId] by incrementing their token version.
  Future<void> logoutUser(String userId);
}
