export type CreateApiFiberV1KitchenSinkPersonArgs = {body: {profileIdentifier?: Record | undefined, emailAddress?: string | undefined, personName?: Record | undefined, jobTitle?: Record | undefined, companyIdentifier?: string | undefined, companyName?: Record | undefined, companyDomain?: Record | undefined, numProfiles?: number | undefined, liveFetch?: boolean | undefined, forceCompanyMatch?: boolean | undefined, fuzzySearch?: boolean | undefined, getDetailedEducation?: boolean | undefined, getDetailedWorkExperience?: boolean | undefined}}; export type CreateApiFiberV1KitchenSinkPersonOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search for a person using a variety of parameters such as LinkedIn slug, LinkedIn URL, or their current company information. Returns profile data for the person if found. * * POST /fiber/v1/kitchen-sink/person */ export const createApiFiberV1KitchenSinkPerson = async (args: CreateApiFiberV1KitchenSinkPersonArgs, options?: CreateApiFiberV1KitchenSinkPersonOptions) => { 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(/\/+$/, '')}/fiber/v1/kitchen-sink/person${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 };