import { ExtensionErrorKind } from './extensionProtocol'; export declare class ExtensionRpcError extends Error { kind: ExtensionErrorKind; constructor(kind: ExtensionErrorKind, message: string); } export type ExtensionApiResponse = { status: number; statusText: string; headers: Record; body: string; }; type ExtensionReply = { id: string; response?: ExtensionApiResponse; error?: { kind: ExtensionErrorKind; message: string; }; }; export type ScreenshotUploadReply = { response: ExtensionApiResponse; width: number; height: number; }; export declare const RELAY_DISCOVERY_TIMEOUT_MS = 3000; type RequestProps = { type: string; replyType: string; payload?: Record; timeoutMs?: number; progressType?: string; onProgress?: () => void; }; export declare function requestFromExtension({ type, replyType, payload, timeoutMs, progressType, onProgress, }: RequestProps): Promise; /** * Asks the extension to capture the tab and upload the image itself. `onCaptured` fires as soon as the capture is * done, before the upload finishes, so the page can put itself back the way it was. */ export declare function uploadScreenshotViaExtension(onCaptured: () => void): Promise; export {};