export type CreateApiApolloApiV1PeopleMatchArgs = {body: {email?: string | undefined, linkedin_url?: string | undefined, first_name?: string | undefined, last_name?: string | undefined, organization_name?: string | undefined, domain?: string | undefined, reveal_personal_emails?: boolean | undefined, reveal_phone_number?: boolean | undefined}}; export type CreateApiApolloApiV1PeopleMatchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Enrich a person by email, LinkedIn URL, name+company, or other identifiers. Returns contact details, job info, and social profiles. * * POST /apollo/api/v1/people/match */ export const createApiApolloApiV1PeopleMatch = async (args: CreateApiApolloApiV1PeopleMatchArgs, options?: CreateApiApolloApiV1PeopleMatchOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/apollo/api/v1/people/match${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };