export type GetApiBapiV1WalletHistoryBuyCancelArgs = {pageSize: number, pageNum: number, socialEmail?: string | undefined}; export type GetApiBapiV1WalletHistoryBuyCancelOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 유저의 환불 내역 * * GET /bapi/v1/wallet/history/buy/cancel */ export const getApiBapiV1WalletHistoryBuyCancel = async (args: GetApiBapiV1WalletHistoryBuyCancelArgs, options?: GetApiBapiV1WalletHistoryBuyCancelOptions) => { 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.socialEmail != null) query.append("socialEmail", String(args.socialEmail)) if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v1/wallet/history/buy/cancel${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() };