Fakultas Ilmu Komputer UI

types.ts 448 Bytes
Newer Older
1
import { ApiResponse } from 'services/api';
2
3
4
5
6
7
import {
  LoginRequest,
  LoginResponse,
  RegistrationRequest,
  User,
} from 'services/auth/models';
8
9
10
11
12

export interface iUserContext {
  user: User;
  isAuthenticated: boolean;
  isLoading: boolean;
13
  signup: (data: RegistrationRequest) => ApiResponse<LoginResponse>;
14
  login: (data: LoginRequest) => ApiResponse<LoginResponse>;
15
16
17
  loginWithGoogle: () => Promise<void>;
  logout: () => Promise<void>;
}