export type DeleteApiRestaurantCuisinesRestaurantCuisineIdArgs = {restaurantCuisineId: number}; export type DeleteApiRestaurantCuisinesRestaurantCuisineIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete restaurant cuisine * * DELETE /restaurant_cuisines/{restaurantCuisineId} */ export const deleteApiRestaurantCuisinesRestaurantCuisineId = async (args: DeleteApiRestaurantCuisinesRestaurantCuisineIdArgs, options: DeleteApiRestaurantCuisinesRestaurantCuisineIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/restaurant_cuisines/${encodeURIComponent(String(args.restaurantCuisineId))}${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 };