forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

postInstanceWeeklyPlanMaterialize.ts11 lines, 622 bytesHistoryRawDownload
1import { client } from "../client";
2import type { MaterializeReport } from "../client";
3
4/** `from`/`to` are UTC unix-millis naming school days; `apply: false` is a dry run. */
5export type MaterializeBody = { from: number; to: number; apply?: boolean };
6
7// Expands the resolved week into dated lessons. Additive and idempotent:
8// holiday days and already-scheduled starts are skipped and counted.
9export function postInstanceWeeklyPlanMaterialize(id: string, body: MaterializeBody): Promise<MaterializeReport> {
10 return client<MaterializeReport>(`/instances/${id}/weekly-plan/materialize`, { method: "POST", body });
11}