export type GetApiBapiV1WalletGiftReceiveArgs = {pageSize: number, pageNum: number, loginId?: string | undefined, startDate?: number | undefined, endDate?: number | undefined, sortType?: ('AMOUNT_ASC' | 'AMOUNT_DESC' | 'ASC' | 'DESC' | 'NONE' | 'PRICE_ASC' | 'PRICE_DESC' | 'UNIT_PRICE_ASC' | 'UNIT_PRICE_DESC') | undefined}; export type GetApiBapiV1WalletGiftReceiveOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 유저의 받은 선물 리스트 * * GET /bapi/v1/wallet/gift/receive */ export const getApiBapiV1WalletGiftReceive = async (args: GetApiBapiV1WalletGiftReceiveArgs, options?: GetApiBapiV1WalletGiftReceiveOptions) => { 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.pageSize != null) query.append("pageSize", String(args.pageSize)) if (args.pageNum != null) query.append("pageNum", String(args.pageNum)) if (args.loginId != null) query.append("loginId", String(args.loginId)) if (args.startDate != null) query.append("startDate", String(args.startDate)) if (args.endDate != null) query.append("endDate", String(args.endDate)) if (args.sortType != null) query.append("sortType", String(args.sortType)) if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v1/wallet/gift/receive${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() };