part of '../auth.dart';

abstract class IAuthRepository {
  Future<Either<AuthFailure, CheckPhone>> checkPhone({
    required String phoneNumber,
  });

  Future<Either<AuthFailure, Register>> register({
    required String phoneNumber,
    required String name,
    required DateTime birthDate,
  });

  Future<Either<AuthFailure, Verify>> verify({
    required String registrationToken,
    required String otpCode,
  });

  Future<Either<AuthFailure, Login>> setPassword({
    required String registrationToken,
    required String password,
    required String confirmPassword,
  });

  Future<Either<AuthFailure, Login>> login({
    required String phoneNumber,
    required String password,
  });

  Future<Either<AuthFailure, Resend>> resend({
    required String phoneNumber,
    required String purpose,
  });

  Future<bool> hasToken();

  Future<Either<AuthFailure, User>> currentUser();

  Future<Either<AuthFailure, Unit>> logout();
}
