export type GetApiApiV1NoticeActiveArgs = {category?: string | undefined, searchKeyword?: string | undefined, pageSize: number, pageNum: number}; export type GetApiApiV1NoticeActiveOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 활성화된 공지사항 리스트 * * GET /api/v1/notice/active */ export const getApiApiV1NoticeActive = async (args: GetApiApiV1NoticeActiveArgs, options?: GetApiApiV1NoticeActiveOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.category != null) query.append("category", String(args.category)) if (args.searchKeyword != null) query.append("searchKeyword", String(args.searchKeyword)) if (args.pageSize != null) query.append("pageSize", String(args.pageSize)) if (args.pageNum != null) query.append("pageNum", String(args.pageNum)) if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/notice/active${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };