export type FakeWaybackCapture = { original: string; timestamp: string; statuscode: string; mimetype?: string; // (release 37 S2) the content digest the scan listing answers (default DIGEST). digest?: string; }; export const CAPTURES: FakeWaybackCapture[]; // Release 37 (lane A): page captures, served raw (`id_`). export type FakePageCapture = FakeWaybackCapture & { body?: () => string | Buffer; offsite?: string }; export const PAGE_CAPTURES: FakePageCapture[]; export const PAGE_ARTICLE_URL: string; export const PAGE_ARTICLE_TS: string; export const PAGE_ARTICLE_LATER_TS: string; export const PAGE_TOOLBAR_URL: string; export const PAGE_TOOLBAR_TS: string; export const PAGE_BIG_URL: string; export const PAGE_BIG_TS: string; export const PAGE_PLAIN_URL: string; export const PAGE_PLAIN_TS: string; export const PAGE_IMAGE_URL: string; export const PAGE_IMAGE_TS: string; export const PAGE_JUMP_URL: string; export const PAGE_JUMP_TS: string; // Release 37 (lane D): a capture of several items, and archived images (`im_`). export const PAGE_SPLIT_URL: string; export const PAGE_SPLIT_TS: string; export const PAGE_SPLIT_POSTS: string[]; export const PAGE_CAPTURES_SPLIT: FakePageCapture[]; export const IMAGE_PNG: Buffer; export const VIDEOS: string[]; // Release 37 (lane E): Save Page Now. export const FAKE_SPN_ACCESS: string; export const FAKE_SPN_SECRET: string; export const SPN_CAPTURE_TS: string; export type FakeWayback = { base: string; requests: { path: string; at: number; method?: string }[]; // (release 37 lane E) the SPN forms posted, and the captures SPN made. spnForms: Record[]; spnCaptures: FakePageCapture[]; fetch(url: string | URL, init?: RequestInit): Promise; close(): Promise; }; export function startFakeWayback(opts?: { captures?: FakeWaybackCapture[]; videos?: string[]; // (release 32 R8) ids whose format stream answers (default: videos). streams?: string[]; busyTimes?: number; downTimes?: number; streamBusyTimes?: number; // (release 37) the page captures served raw (default PAGE_CAPTURES + PAGE_CAPTURES_SPLIT). pageCaptures?: FakePageCapture[]; // (release 37 lane F) originals CDX and their captures answer 403 for. excluded?: string[]; // (release 37 S2) the Nth scan listing request and every one after answer 503. scanRefuseFrom?: number; // (release 37 lane E) Save Page Now: the keys it takes, 429s first, polls // answered pending, URLs whose capture fails or is refused, bodies by URL, // the capture timestamp. spn?: { access?: string; secret?: string; busyTimes?: number; pendingPolls?: number; failUrls?: string[]; refuseUrls?: string[]; pages?: Record; timestamp?: string; }; }): Promise; // (release 37 S2) the scan listing: a blog with posts, assets, a 404, a second host. export const SCAN_CAPTURES: FakeWaybackCapture[]; export function scanListing(captures: FakeWaybackCapture[], q: URLSearchParams): unknown[];