export type DeleteApiBrandIdSignalsSignalIdReactionArgs = {brand_id: number, signal_id: number}; export type DeleteApiBrandIdSignalsSignalIdReactionOptions = {baseUrl?: string | undefined, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Clear Signal Reaction * * DELETE /{brand_id}/signals/{signal_id}/reaction */ export const deleteApiBrandIdSignalsSignalIdReaction = async (args: DeleteApiBrandIdSignalsSignalIdReactionArgs, options?: DeleteApiBrandIdSignalsSignalIdReactionOptions) => { const {baseUrl = "https://api.scrunchai.com/v1", fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/${encodeURIComponent(String(args.brand_id))}/signals/${encodeURIComponent(String(args.signal_id))}/reaction${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 };