import * as z from "zod"; export declare const PREVIEW_HEALTH_IFRAME_RPC_CHANNEL_ID: "replo:preview-health-iframe-rpc"; export declare const PREVIEW_HEALTH_IFRAME_RPC_CHANNEL_VERSION: 1; export declare const previewErrorDetailSchema: z.ZodObject<{ message: z.ZodString; name: z.ZodNullable; stack: z.ZodNullable; componentStack: z.ZodNullable; digest: z.ZodNullable; }, z.core.$strip>; export declare const previewHealthSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ status: z.ZodLiteral<"ok">; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral<"error">; source: z.ZodEnum<{ boundary: "boundary"; root: "root"; build: "build"; }>; error: z.ZodObject<{ message: z.ZodString; name: z.ZodNullable; stack: z.ZodNullable; componentStack: z.ZodNullable; digest: z.ZodNullable; }, z.core.$strip>; }, z.core.$strip>], "status">; declare const previewStatusReportSchema: z.ZodObject<{ route: z.ZodString; documentId: z.ZodString; seq: z.ZodNumber; health: z.ZodDiscriminatedUnion<[z.ZodObject<{ status: z.ZodLiteral<"ok">; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral<"error">; source: z.ZodEnum<{ boundary: "boundary"; root: "root"; build: "build"; }>; error: z.ZodObject<{ message: z.ZodString; name: z.ZodNullable; stack: z.ZodNullable; componentStack: z.ZodNullable; digest: z.ZodNullable; }, z.core.$strip>; }, z.core.$strip>], "status">; }, z.core.$strip>; declare const previewDiagnosticReportSchema: z.ZodObject<{ route: z.ZodString; documentId: z.ZodString; diagnostic: z.ZodObject<{ origin: z.ZodEnum<{ boundary: "boundary"; root: "root"; build: "build"; runtime: "runtime"; recoverable: "recoverable"; console: "console"; rejection: "rejection"; }>; impact: z.ZodEnum<{ unknown: "unknown"; page: "page"; }>; error: z.ZodObject<{ message: z.ZodString; name: z.ZodNullable; stack: z.ZodNullable; componentStack: z.ZodNullable; digest: z.ZodNullable; }, z.core.$strip>; at: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; export type PreviewErrorDetail = z.infer; export type PreviewHealth = z.infer; export type PreviewStatusReport = z.infer; export type PreviewDiagnosticReport = z.infer; export declare const previewHealthToEditorMethodConfig: { documentArrived: { inputSchema: z.ZodObject<{ route: z.ZodString; }, z.core.$strip>; outputSchema: z.ZodVoid; }; statusChanged: { inputSchema: z.ZodObject<{ route: z.ZodString; documentId: z.ZodString; seq: z.ZodNumber; health: z.ZodDiscriminatedUnion<[z.ZodObject<{ status: z.ZodLiteral<"ok">; }, z.core.$strip>, z.ZodObject<{ status: z.ZodLiteral<"error">; source: z.ZodEnum<{ boundary: "boundary"; root: "root"; build: "build"; }>; error: z.ZodObject<{ message: z.ZodString; name: z.ZodNullable; stack: z.ZodNullable; componentStack: z.ZodNullable; digest: z.ZodNullable; }, z.core.$strip>; }, z.core.$strip>], "status">; }, z.core.$strip>; outputSchema: z.ZodVoid; }; diagnosticRecorded: { inputSchema: z.ZodObject<{ route: z.ZodString; documentId: z.ZodString; diagnostic: z.ZodObject<{ origin: z.ZodEnum<{ boundary: "boundary"; root: "root"; build: "build"; runtime: "runtime"; recoverable: "recoverable"; console: "console"; rejection: "rejection"; }>; impact: z.ZodEnum<{ unknown: "unknown"; page: "page"; }>; error: z.ZodObject<{ message: z.ZodString; name: z.ZodNullable; stack: z.ZodNullable; componentStack: z.ZodNullable; digest: z.ZodNullable; }, z.core.$strip>; at: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; outputSchema: z.ZodVoid; }; }; export declare const editorToPreviewHealthMethodConfig: {}; /** * Editor side of a preview iframe's health channel. `report` is the full * status from current runtimes and null from older runtimes, which only say * ok or error. */ export declare function subscribeToPreviewHealth({ getFrameWindow, onDocumentArrived, onStatus, onDiagnostic, }: { getFrameWindow: () => Window | null; onDocumentArrived?: () => void; onStatus: (update: { status: PreviewHealth["status"]; report: PreviewStatusReport | null; }) => void; onDiagnostic?: (report: PreviewDiagnosticReport) => void; }): () => void; export {};