/** * Octokit-shaped HTTP fetcher for the GitHub connector backfill. * * Production uses `realGitHubFetcher` against `https://api.github.com`. * Tests inject a fake `GitHubFetcher` so they never hit the network. * * Codex P1 #4 mandate: any non-200 response that is NOT a recognized * rate-limit pause MUST throw `GitHubFetchError`. Silently turning * 401/403/404/500 into empty pages produced empty backfills with no * operator signal, so this code path is now load-bearing. */ import type { JsonValue } from './types.js'; import { type RateLimitInfo } from './ratelimit.js'; export declare class GitHubFetchError extends Error { readonly status: number; readonly bodyExcerpt: string; readonly url: string; constructor(status: number, bodyExcerpt: string, url: string); } export interface GitHubBackfillPage { readonly items: ReadonlyArray; readonly next: string | null; readonly rateLimit: RateLimitInfo; } export type GitHubFetcher = (args: { url: string; token: string; }) => Promise; /** * Parse the rel="next" URL from an RFC 5988 `Link` header. * * Header format: `; rel="next", ; rel="last"`. * Returns the URL whose rel parameter is exactly `"next"`, or null. */ export declare function parseNextLink(linkHeader: string): string | null; export declare const realGitHubFetcher: GitHubFetcher; //# sourceMappingURL=octokit-client.d.ts.map