export type CreateApiFiberV1GithubToLinkedinPollingArgs = {body: {githubAgentRunId: string, cursor?: string | undefined, pageSize?: number | undefined}}; export type CreateApiFiberV1GithubToLinkedinPollingOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Polls the status of a GitHub to LinkedIn batch lookup. * * POST /fiber/v1/github-to-linkedin/polling */ export const createApiFiberV1GithubToLinkedinPolling = async (args: CreateApiFiberV1GithubToLinkedinPollingArgs, options?: CreateApiFiberV1GithubToLinkedinPollingOptions) => { 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/github-to-linkedin/polling${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 };