export type CreateApiFiberV1PeopleSearchArgs = {body: {searchParams?: ({country3LetterCode?: Record | undefined, numConnections?: Record | undefined, numFollowers?: Record | undefined, approxAge?: Record | undefined, keywords?: Record | undefined, keywordSearchOptions?: Record | undefined, jobTitleV2?: Record | undefined, exactProfile?: Record | undefined, startedInRole?: string | undefined, startedAtCompany?: string | undefined, location?: Record | undefined, pastJobs?: Record | undefined, languages?: Record | undefined, leftStealthAt?: string | undefined, isInStealth?: boolean | undefined, stealthV2?: string | undefined, jobStatus?: string | undefined, timeZone?: Record | undefined, pastJobText?: Record | undefined, fuzzyName?: Record | undefined, companyMatchMode?: string | undefined, yearsOfExperience?: Record | undefined, jobTitleV3?: Record | undefined, getDetailedEducation?: boolean | undefined, getDetailedWorkExperience?: boolean | undefined, tags?: Record | undefined, education?: Record | undefined}) | undefined, pageSize?: number | undefined, cursor?: string | undefined, currentCompanies?: Array | undefined, prospectExclusionListIDs?: Array | undefined, companyExclusionListIDs?: Array | undefined}}; export type CreateApiFiberV1PeopleSearchOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search for people using filters Pagination billing: call the first page normally and save billing.requestId from the Orthogonal /v1/run response. For later page, offset, or cursor calls on the same logical search, pass parentRequestId with unchanged non-pagination parameters. Valid continuation calls still get their own request IDs and quoted price, but are charged 0. Changing filters starts a new billable request. * * POST /fiber/v1/people-search */ export const createApiFiberV1PeopleSearch = async (args: CreateApiFiberV1PeopleSearchArgs, options?: CreateApiFiberV1PeopleSearchOptions) => { 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/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 };