export type CreateFaqRequest = {answer_en?: string | undefined, answer_kr?: string | undefined, cd_faq_cate?: string | undefined, quest_en?: string | undefined, quest_kr?: string | undefined}; export type CreateApiBapiV1FaqArgs = {body: CreateFaqRequest}; export type CreateApiBapiV1FaqOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * FAQ 등록 * * POST /bapi/v1/faq */ export const createApiBapiV1Faq = async (args: CreateApiBapiV1FaqArgs, options?: CreateApiBapiV1FaqOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v1/faq${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 res.blob() };