import { IServerResponse } from '@/types/common.types'; import apiClient from '../api-client'; import { IUserLoginRequest, IUserLoginResponse, IAuthorizeResponse, } from '@/types/auth/login.types'; import { AUTH_API_BASE_URL } from '@/shared/constants'; const rootUrl = `${AUTH_API_BASE_URL}`; export const authApiService = { async login(credentials: IUserLoginRequest): Promise { const response = await apiClient.post(`${rootUrl}/login`, credentials); return response.data; }, async logout(): Promise> { const response = await apiClient.get>(`${rootUrl}/logout`); return response.data; }, async verify(): Promise { const response = await apiClient.get(`${rootUrl}/verify`); return response.data; }, async signUp(body: any): Promise> { const response = await apiClient.post>(`${rootUrl}/signup`, body); return response.data; }, async signUpCheck(body: any): Promise> { const response = await apiClient.post>(`${rootUrl}/signup/check`, body); return response.data; }, async resetPassword(email: string): Promise> { const response = await apiClient.post>(`${rootUrl}/reset-password`, { email, }); return response.data; }, async updatePassword(values: any): Promise> { const response = await apiClient.post>( `${rootUrl}/update-password`, values ); return response.data; }, async verifyRecaptchaToken(token: string): Promise> { const response = await apiClient.post>(`${rootUrl}/verify-captcha`, { token, }); return response.data; }, };