export type DeleteApiV10TargetUnitAccountsAccountIdBuyOutSurplusIncludeArgs = {accountId: number}; export type DeleteApiV10TargetUnitAccountsAccountIdBuyOutSurplusIncludeOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Removes the buy-out excluded (on hold) flag for a specific account * * DELETE /v1.0/target-unit-accounts/{accountId}/buy-out-surplus/include */ export const deleteApiV10TargetUnitAccountsAccountIdBuyOutSurplusInclude = async (args: DeleteApiV10TargetUnitAccountsAccountIdBuyOutSurplusIncludeArgs, options?: DeleteApiV10TargetUnitAccountsAccountIdBuyOutSurplusIncludeOptions) => { const {baseUrl = "http://localhost:8082/api", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1.0/target-unit-accounts/${encodeURIComponent(String(args.accountId))}/buy-out-surplus/include${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 };