export type CreateApiBapiV1HederaContractsMigrationFixCanceledGiftsOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * 취소된 선물 토큰 보정 * * POST /bapi/v1/hedera/contracts/migration/fix-canceled-gifts */ export const createApiBapiV1HederaContractsMigrationFixCanceledGifts = async (options?: CreateApiBapiV1HederaContractsMigrationFixCanceledGiftsOptions) => { const {baseUrl = "https://api.wincl.io:443", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/bapi/v1/hedera/contracts/migration/fix-canceled-gifts${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };