import { LoginDto } from '@app/domain/authentification/dto/login-dto';
import { Observable } from 'rxjs';
import { User } from '@app/domain/users/user.model';
import { RegisterDto } from '@app/domain/authentification/dto/register-dto';

export interface AuthResponse {
  isValid: boolean;
  token: string;
  record: User;
}
export interface AuthRepository {
  login(loginDto: LoginDto): Observable<AuthResponse>;
  register(registerDto: RegisterDto): Observable<User>;
  logout(): void;

  isAuthenticated(): boolean;
  isEmailVerified(): boolean;

  get(): User | undefined;

  sendRequestPasswordReset(email: string): Observable<boolean>;
  confirmPasswordReset(
    resetToken: string,
    newPassword: string,
    confirmPassword: string
  ): Observable<boolean>;

  sendVerificationEmail(email: string): Observable<boolean>;
}
