export type CreateApiAppointmentsIdPatientsPatientIdArrivalArgs = {id: number, patientId: number}; export type CreateApiAppointmentsIdPatientsPatientIdArrivalOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Mark a single patient's arrival in a group appointment * * POST /appointments/{id}/patients/{patientId}/arrival */ export const createApiAppointmentsIdPatientsPatientIdArrival = async (args: CreateApiAppointmentsIdPatientsPatientIdArrivalArgs, options?: CreateApiAppointmentsIdPatientsPatientIdArrivalOptions) => { const {baseUrl = "https://api.splose.com/v1", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "text") if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/appointments/${encodeURIComponent(String(args.id))}/patients/${encodeURIComponent(String(args.patientId))}/arrival${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };