export type CreateApiCompanyEnrichPeopleSearchScrollArgs = {body: {pageSize: number, cursor?: string | undefined, companyFilter?: Record | undefined, query?: string | undefined, positionQuery?: Array | undefined, atCurrentCompanyAfter?: string | undefined, atCurrentCompanyBefore?: string | undefined, atCurrentPositionAfter?: string | undefined, atCurrentPositionBefore?: string | undefined, exclude?: Record | undefined, countries?: Array | undefined, domains?: Array | undefined, seniority?: Array | undefined, department?: Array | undefined}}; export type CreateApiCompanyEnrichPeopleSearchScrollOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Search people with cursor-based pagination for large result sets. Accepts the same filters as /people/search. No 10,000 result limit unlike the standard search endpoint. 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 /company-enrich/people/search/scroll */ export const createApiCompanyEnrichPeopleSearchScroll = async (args: CreateApiCompanyEnrichPeopleSearchScrollArgs, options?: CreateApiCompanyEnrichPeopleSearchScrollOptions) => { 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(/\/+$/, '')}/company-enrich/people/search/scroll${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 };