export type CreateApiFullenrichPeopleSearchArgs = {body: {current_company_domains?: Array | undefined, current_company_names?: Array | undefined, current_position_titles?: Array | undefined, current_position_seniority_level?: Array | undefined, current_company_industries?: Array | undefined, current_company_headcounts?: Array | undefined, current_company_headquarters?: Array | undefined, person_locations?: Array | undefined, person_names?: Array | undefined, person_professional_network_urls?: Array | undefined, current_position_job_functions?: Array | undefined, person_skills?: Array | undefined, limit?: number | undefined, offset?: number | undefined, search_after?: string | undefined}}; export type CreateApiFullenrichPeopleSearchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search for people based on various filters including job title, company, location, industry, and more. Multiple filters within the same field use AND logic. Returns professional details and company lite info. Costs 0.25 credits per result. * * POST /fullenrich/people/search */ export const createApiFullenrichPeopleSearch = async (args: CreateApiFullenrichPeopleSearchArgs, options?: CreateApiFullenrichPeopleSearchOptions) => { 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(/\/+$/, '')}/fullenrich/people/search${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 };