export type GetApiFindymailApiIntellimatchDataArgs = {hash: string, page?: number | undefined, per_page?: number | undefined}; export type GetApiFindymailApiIntellimatchDataOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieve paginated company and contact results from a completed Intellimatch search. 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 /findymail/api/intellimatch/data */ export const getApiFindymailApiIntellimatchData = async (args: GetApiFindymailApiIntellimatchDataArgs, options?: GetApiFindymailApiIntellimatchDataOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.hash != null) query.append("hash", String(args.hash)) if (args.page != null) query.append("page", String(args.page)) if (args.per_page != null) query.append("per_page", String(args.per_page)) const url = `${baseUrl.replace(/\/+$/, '')}/findymail/api/intellimatch/data${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 };