export type DeleteApiAccountHotlistIdKeyItemIdArgs = {id: number, key: string, itemId: number}; export type DeleteApiAccountHotlistIdKeyItemIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove item from hotlist * * DELETE /account/hotlist/{id}/{key}/{itemId} */ export const deleteApiAccountHotlistIdKeyItemId = async (args: DeleteApiAccountHotlistIdKeyItemIdArgs, options?: DeleteApiAccountHotlistIdKeyItemIdOptions) => { const {baseUrl = "https://api.travelify.io", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/account/hotlist/${encodeURIComponent(String(args.id))}/${encodeURIComponent(String(args.key))}/${encodeURIComponent(String(args.itemId))}${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 };