forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

postHoliday.ts10 lines, 474 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Holiday } from "../client";
3
4/** `starts_at`/`ends_at` are the first and last blocked instants, UTC unix-millis. */
5export type CreateHolidayBody = { name: string; kind: string; starts_at: number; ends_at: number };
6
7// Manager+. Past ranges are allowed — the calendar is a record.
8export function postHoliday(body: CreateHolidayBody): Promise<Holiday> {
9 return client<Holiday>("/holidays", { method: "POST", body });
10}