import { vertexvis } from '@vertexvis/frame-streaming-protos';
import { WebSocketClientMock } from '@vertexvis/stream-api';
import { ViewerStream } from '../lib/stream/stream';
interface ViewerStreamOperationCtx {
    stream: ViewerStream;
    ws: WebSocketClientMock;
    viewer: HTMLVertexViewerElement;
}
interface LoadViewerStreamKeyOptions {
    token?: string;
    beforeConnected?: VoidFunction | (() => Promise<void>);
}
export declare const key1 = "urn:vertex:stream-key:123";
export declare const key2 = "urn:vertex:stream-key:234";
export declare function makeViewerStream(): {
    stream: ViewerStream;
    ws: WebSocketClientMock;
};
export declare function loadViewerStreamKey(urn: string, { viewer, stream, ws }: ViewerStreamOperationCtx, { token, beforeConnected, }?: LoadViewerStreamKeyOptions): Promise<void>;
interface GracefulReconnectOptions<T = void> {
    beforeReconnect?: () => Promise<T>;
}
export declare function gracefulReconnect<T = void>({ stream, ws }: ViewerStreamOperationCtx, { beforeReconnect }?: GracefulReconnectOptions<T>): Promise<T | undefined>;
export declare function receiveFrame(ws: WebSocketClientMock, transformPayload?: (payload: vertexvis.protobuf.stream.IDrawFramePayload) => vertexvis.protobuf.stream.IDrawFramePayload): void;
export {};
