export type CreateApiApiWalletCashoutNegateManualTrackIdWalletEventIdArgs = {trackId: string, walletEventId: number}; export type CreateApiApiWalletCashoutNegateManualTrackIdWalletEventIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * negateCashout * * POST /api/wallet/cashout/negate/manual/{trackId}/{walletEventId} */ export const createApiApiWalletCashoutNegateManualTrackIdWalletEventId = async (args: CreateApiApiWalletCashoutNegateManualTrackIdWalletEventIdArgs, options: CreateApiApiWalletCashoutNegateManualTrackIdWalletEventIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/wallet/cashout/negate/manual/${encodeURIComponent(String(args.trackId))}/${encodeURIComponent(String(args.walletEventId))}${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 undefined };