export type UpdateApiV1ReservationBookingIdRepliedArgs = {id: number}; export type UpdateApiV1ReservationBookingIdRepliedOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Marks a booking as replied * * PUT /v1/reservation/booking/{id}/replied */ export const updateApiV1ReservationBookingIdReplied = async (args: UpdateApiV1ReservationBookingIdRepliedArgs, options?: UpdateApiV1ReservationBookingIdRepliedOptions) => { const {baseUrl = "https://api.lodgify.com", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKey !== undefined) headers.set("X-ApiKey", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/reservation/booking/${encodeURIComponent(String(args.id))}/replied${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };