import { client } from "./client"; import { setCachedSettings } from "./getSettings"; import type { ExamKindSetting, GradeBand, SchoolSettings } from "./types"; export type PatchSettingsBody = { exam_kinds?: ExamKindSetting[]; attendance_statuses?: string[]; grade_bands?: GradeBand[]; max_file_bytes?: number; }; export function patchSettings(body: PatchSettingsBody): Promise { return client("/settings", { method: "PATCH", body }).then((settings) => { setCachedSettings(settings); return settings; }); }