export type DeleteManualAnswerDto = Record; export type CreateApiV1KnowledgeBaseManualAnswersManualAnswerIdDeleteArgs = {manualAnswerId: string, body: DeleteManualAnswerDto}; export type CreateApiV1KnowledgeBaseManualAnswersManualAnswerIdDeleteOptions = {baseUrl?: string | undefined, apikey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a manual answer * * POST /v1/knowledge-base/manual-answers/{manualAnswerId}/delete */ export const createApiV1KnowledgeBaseManualAnswersManualAnswerIdDelete = async (args: CreateApiV1KnowledgeBaseManualAnswersManualAnswerIdDeleteArgs, options?: CreateApiV1KnowledgeBaseManualAnswersManualAnswerIdDeleteOptions) => { const {baseUrl = "https://api.betayum.com", fetch: fetchFn = fetch, apikey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (apikey !== undefined) headers.set("X-API-Key", apikey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/knowledge-base/manual-answers/${encodeURIComponent(String(args.manualAnswerId))}/delete${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };