export type GetApiCompanyEnrichPeopleArgs = {id: number}; export type GetApiCompanyEnrichPeopleOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get a person's full profile by their CompanyEnrich ID. Returns name, title, company, location, social links, and more. * * GET /company-enrich/people */ export const getApiCompanyEnrichPeople = async (args: GetApiCompanyEnrichPeopleArgs, options?: GetApiCompanyEnrichPeopleOptions) => { 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(/\/+$/, '')}/company-enrich/people${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 };