import { request } from "@/common";

export const Apis = {
  Login: {
    Auth: {
      Login(data: ApiTypes.Login.Auth.Login): Promise<MyResponseType> {
        return request('employee/login/auth/login', { data });
      },
      Logout(): Promise<MyResponseType> {
        return request('employee/login/auth/logout', {});
      },
      Me(): Promise<MyResponseType> {
        return request('employee/login/auth/me', {});
      },
      BindPhoneNumber(data?: ApiTypes.Login.Auth.BindPhoneNumber): Promise<MyResponseType> {
        return request('employee/login/auth/bind_phone_number', { data });
      },
      GetAccessToken(data: ApiTypes.Login.Auth.GetAccessToken): Promise<MyResponseType> {
        return request('employee/login/auth/get_access_token', { data });
      },
      WorkLogin(data: ApiTypes.Login.Auth.WorkLogin): Promise<MyResponseType> {
        return request('employee/login/auth/work_login', { data });
      },
      BindWork(data: ApiTypes.Login.Auth.BindWork): Promise<MyResponseType> {
        return request('employee/login/auth/bind_work', { data });
      },
      GetWorkAccessToken(data: ApiTypes.Login.Auth.GetWorkAccessToken): Promise<MyResponseType> {
        return request('employee/login/auth/get_work_access_token', { data });
      },
      PreUpload(data: ApiTypes.Login.Auth.PreUpload): Promise<MyResponseType> {
        return request('employee/login/auth/pre_upload', { data });
      },
      DoUpload(data: ApiTypes.Login.Auth.DoUpload): Promise<MyResponseType> {
        return request('employee/login/auth/do_upload', { data });
      },
      ImLogin(): Promise<MyResponseType> {
        return request('employee/login/auth/im_login', {});
      },
    },
  },
}