export type DeleteApiV1ReservationEnquiryIdArgs = {id: number}; export type DeleteApiV1ReservationEnquiryIdOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Moves an enquiry to the trash. * * DELETE /v1/reservation/enquiry/{id} */ export const deleteApiV1ReservationEnquiryId = async (args: DeleteApiV1ReservationEnquiryIdArgs, options?: DeleteApiV1ReservationEnquiryIdOptions) => { 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/enquiry/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };