import { client } from "./client"; import { components } from "../generated/api"; type User = components["schemas"]["UserResponse"]; /** * Authentication API endpoints */ export const authApi = { /** * Get current authenticated user */ getMe(): Promise { return client.get("/api/auth/me"); }, /** * Login with email and password */ login(email: string, password: string): Promise { return client.post("/api/auth/login", { email, password }); }, /** * Register a new user with invite code */ register(email: string, password: string, inviteIdentifier: string): Promise { return client.post("/api/auth/register", { email, password, invite_identifier: inviteIdentifier, }); }, /** * Logout current user */ logout(): Promise { return client.post("/api/auth/logout"); }, };