export type DeleteApiAgentQuickResponseQuickResponseIdArgs = {quick_response_id: string}; export type DeleteApiAgentQuickResponseQuickResponseIdOptions = {baseUrl: string, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Agent Quick Response * * DELETE /agent/quick-response/{quick_response_id} * * Also accepts auth: OAuth2PasswordBearer */ export const deleteApiAgentQuickResponseQuickResponseId = async (args: DeleteApiAgentQuickResponseQuickResponseIdArgs, options: DeleteApiAgentQuickResponseQuickResponseIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("x-api-key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/agent/quick-response/${encodeURIComponent(String(args.quick_response_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 };