export type DeleteApiBapiV1QnaIdAnswerArgs = {id: string}; export type DeleteApiBapiV1QnaIdAnswerOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 1:1 문의 답변 삭제 * * DELETE /bapi/v1/qna/{id}/answer */ export const deleteApiBapiV1QnaIdAnswer = async (args: DeleteApiBapiV1QnaIdAnswerArgs, options?: DeleteApiBapiV1QnaIdAnswerOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v1/qna/${encodeURIComponent(String(args.id))}/answer${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 res.blob() };