export type GetApiFundableDealsIdInvestorsArgs = {id: string}; export type GetApiFundableDealsIdInvestorsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get investors in a funding round by id * * GET /fundable/deals/{id}/investors */ export const getApiFundableDealsIdInvestors = async (args: GetApiFundableDealsIdInvestorsArgs, options?: GetApiFundableDealsIdInvestorsOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.id != null) query.append("id", String(args.id)) const url = `${baseUrl.replace(/\/+$/, '')}/fundable/deals/${encodeURIComponent(String(args.id))}/investors${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };