export type DeleteApiV1PropertyradarPortfolioPortfolioIdArgs = {PortfolioId: string}; export type DeleteApiV1PropertyradarPortfolioPortfolioIdOptions = {baseUrl?: string | undefined, apikey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Portfolio * * DELETE /v1/propertyradar/portfolio/{PortfolioId} * * Also accepts auth: oauth2 */ export const deleteApiV1PropertyradarPortfolioPortfolioId = async (args: DeleteApiV1PropertyradarPortfolioPortfolioIdArgs, options?: DeleteApiV1PropertyradarPortfolioPortfolioIdOptions) => { const {baseUrl = "https://api.domain.com.au", fetch: fetchFn = fetch, apikey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apikey !== undefined) headers.set("x-api-key", apikey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/propertyradar/portfolio/${encodeURIComponent(String(args.PortfolioId))}${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 };