export type DeleteApiAppYelpAutorespondersBusinessIdMessagesMessageIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete a local Yelp autoresponder response-flow message * * DELETE /app/yelp/autoresponders/{businessId}/messages/{messageId} */ export const deleteApiAppYelpAutorespondersBusinessIdMessagesMessageId = async (options: DeleteApiAppYelpAutorespondersBusinessIdMessagesMessageIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/app/yelp/autoresponders/${encodeURIComponent(String(args.businessId))}/messages/${encodeURIComponent(String(args.messageId))}${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 };