export type GetApiRocketreachPersonCheckStatusArgs = {id?: number | undefined, ids?: string | undefined}; export type GetApiRocketreachPersonCheckStatusOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Check the status of a pending person lookup request. Free, no credit cost. * * GET /rocketreach/person/checkStatus */ export const getApiRocketreachPersonCheckStatus = async (args: GetApiRocketreachPersonCheckStatusArgs, options?: GetApiRocketreachPersonCheckStatusOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.id != null) query.append("id", String(args.id)) if (args.ids != null) query.append("ids", String(args.ids)) const url = `${baseUrl.replace(/\/+$/, '')}/rocketreach/person/checkStatus${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 };