export type AdminNoticePopupRequest = {contentsEn?: string | undefined, contentsKr?: string | undefined, endTimestamp?: number | undefined, imageEnUrl?: string | undefined, imageKrUrl?: string | undefined, linkEnUrl?: string | undefined, linkKrUrl?: string | undefined, startTimestamp?: number | undefined, titleEn?: string | undefined, titleKr?: string | undefined}; export type UpdateApiBapiV1InfoPopupIdArgs = {id: string, body: AdminNoticePopupRequest}; export type UpdateApiBapiV1InfoPopupIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 공지팝업 수정 * * PUT /bapi/v1/info/popup/{id} */ export const updateApiBapiV1InfoPopupId = async (args: UpdateApiBapiV1InfoPopupIdArgs, options?: UpdateApiBapiV1InfoPopupIdOptions) => { 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/info/popup/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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() };