forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

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

patchAcceptReschedule.ts10 lines, 522 bytesHistoryRawDownload
1import { client } from "../client";
2import type { Appointment } from "../client";
3
4// The backend pins which proposal is being accepted: the caller echoes the
5// proposed window it read, and a superseded proposal returns 409.
6export type AcceptRescheduleBody = { proposed_starts_at: number; proposed_ends_at: number };
7
8export function patchAcceptReschedule(id: string, body: AcceptRescheduleBody): Promise<Appointment> {
9 return client<Appointment>(`/appointments/${id}/reschedule/accept`, { method: "PATCH", body });
10}