import { client } from "../client"; import type { User } from "../client"; export type LoginBody = { username: string; password: string; }; /** One school on offer: its registry uuid (what `POST /auth/school` takes) and display name. */ export type SchoolChoice = { id: string; name: string; }; export type SchoolChoiceResponse = { username: string; schools: SchoolChoice[]; }; export type LoginResponse = User | SchoolChoiceResponse; export function postLogin(body: LoginBody): Promise { return client("/auth/login", { method: "POST", body }); }