export type GetApiSignalbasePeopleArgs = {page?: number | undefined, limit?: number | undefined, title?: string | undefined, function?: string | undefined, seniority?: string | undefined, country?: string | undefined, exclude_countries?: string | undefined, city?: string | undefined, company_size?: string | undefined, industry?: string | undefined, linkedin_url?: string | undefined, company_domain?: string | undefined, company_linkedin_url?: string | undefined, signal_type?: string | undefined, signal_date_range?: string | undefined, include_former?: boolean | undefined, count?: string | undefined}; export type GetApiSignalbasePeopleOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Discover people across employees and job-change subjects, filtered by title, function, seniority, geography, and signal activity. 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. * * GET /signalbase/people */ export const getApiSignalbasePeople = async (args: GetApiSignalbasePeopleArgs, options?: GetApiSignalbasePeopleOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.page != null) query.append("page", String(args.page)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.title != null) query.append("title", String(args.title)) if (args.function != null) query.append("function", String(args.function)) if (args.seniority != null) query.append("seniority", String(args.seniority)) if (args.country != null) query.append("country", String(args.country)) if (args.exclude_countries != null) query.append("exclude_countries", String(args.exclude_countries)) if (args.city != null) query.append("city", String(args.city)) if (args.company_size != null) query.append("company_size", String(args.company_size)) if (args.industry != null) query.append("industry", String(args.industry)) if (args.linkedin_url != null) query.append("linkedin_url", String(args.linkedin_url)) if (args.company_domain != null) query.append("company_domain", String(args.company_domain)) if (args.company_linkedin_url != null) query.append("company_linkedin_url", String(args.company_linkedin_url)) if (args.signal_type != null) query.append("signal_type", String(args.signal_type)) if (args.signal_date_range != null) query.append("signal_date_range", String(args.signal_date_range)) if (args.include_former != null) query.append("include_former", String(args.include_former)) if (args.count != null) query.append("count", String(args.count)) const url = `${baseUrl.replace(/\/+$/, '')}/signalbase/people${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };