// src/api/auth/login.ts
import instance from "../axiosInstance"
import type { LoginInput } from "./types"
import { endpoints } from "@shared/contracts"

const { auth } = endpoints

export async function login(input: LoginInput) {
  const { data } = await instance.post("/auth/login", input)
  return auth.authResponseSchema.parse(data)
}
