export type DeleteApiBapiV3RewardsIssuancesIdArgs = {id: string}; export type DeleteApiBapiV3RewardsIssuancesIdOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 리워드 상품 발급 기록 삭제 * * DELETE /bapi/v3/rewards/issuances/{id} */ export const deleteApiBapiV3RewardsIssuancesId = async (args: DeleteApiBapiV3RewardsIssuancesIdArgs, options?: DeleteApiBapiV3RewardsIssuancesIdOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v3/rewards/issuances/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };