import { AccountInfo } from "../services/auth/types";
import { Area } from "../services/product/type";
import { BaseApi } from "./baseApi";

class AuthApi extends BaseApi {
  constructor() {
    super("/auth");
  }

  async requestOtp({ email }) {
    return this.authPost("/request-otp", { email });
  }

  async verifyOtp({ email, otp }) {
    return this.authPost<AccountInfo>("/verify-otp", { email, otpCode: otp });
  }
}

export const authApi = new AuthApi();
