import { EventEmitter, ListenerFn } from "eventemitter3"; import { Disposer, MetaframePipeId, MetapageId } from "./core"; import { JsonRpcMethodsFromChild, SetupIframeServerResponseData } from "./jsonrpc"; import { MetaframeInputMap } from "./v0_4"; import { VersionsMetapage } from "./versions"; export declare enum MetaframeLoadingState { WaitingForPageLoad = "WaitingForPageLoad", SentSetupIframeClientRequest = "SentSetupIframeClientRequest", Ready = "Ready" } export declare enum MetaframeEvents { Connected = "connected", Error = "error", Input = "input", Inputs = "inputs", Message = "message" } export type MetaframeOptions = { disableHashChangeEvent?: boolean; }; export declare class Metaframe extends EventEmitter { static readonly version: "0.3" | "0.4" | "0.5" | "0.6" | "1" | "2"; static readonly ERROR = MetaframeEvents.Error; static readonly CONNECTED = MetaframeEvents.Connected; static readonly INPUT = MetaframeEvents.Input; static readonly INPUTS = MetaframeEvents.Inputs; static readonly MESSAGE = MetaframeEvents.Message; static deserializeInputs: (inputs: MetaframeInputMap) => Promise; static serializeInputs: (inputs: MetaframeInputMap) => Promise; _inputPipeValues: MetaframeInputMap; _outputPipeValues: MetaframeInputMap; _parentId: MetapageId | undefined; _parentVersion: VersionsMetapage | undefined; _isIframe: boolean; _state: MetaframeLoadingState; _messageSendCount: number; debug: boolean; color: string | undefined; isInputOutputBlobSerialization: boolean; id: string; constructor(options?: MetaframeOptions); _resolveSetupIframeServerResponse(params: SetupIframeServerResponseData): void; isConnected(): boolean; connected(): Promise; addListenerReturnDisposer(event: MetaframeEvents | JsonRpcMethodsFromChild, listener: ListenerFn): Disposer; log(o: any, color?: string, backgroundColor?: string): void; warn(o: any): void; error(err: any): void; logInternal(o: any, color?: string, backgroundColor?: string): void; dispose(): void; addListener(event: MetaframeEvents | JsonRpcMethodsFromChild, listener: ListenerFn): this; onInput(pipeId: MetaframePipeId, listener: any): Disposer; onInputs(listener: (m: MetaframeInputMap) => void): Disposer; setInput(pipeId: MetaframePipeId, blob: any): void; setInputs(inputs: MetaframeInputMap): Promise; setInternalInputsAndNotify(inputs: MetaframeInputMap): Promise; getInput(pipeId: MetaframePipeId): any; getInputs(): MetaframeInputMap; setOutput(pipeId: MetaframePipeId, updateBlob: any): void; setOutputs(outputs: MetaframeInputMap): Promise; disableNotifyOnHashUrlChange(): void; _onHashUrlChange(_: any): void; sendRpc(method: JsonRpcMethodsFromChild, params: any): void; onMessage(e: MessageEvent): void; setParameter(key: string, value: any): void; getParameter(key: string): string | undefined; setParameterBoolean(key: string, value: boolean | undefined): void; getParameterBoolean(key: string): boolean | undefined; setParameterJson(key: string, value: any): void; getParameterJson(key: string): T | undefined; setParameterBase64(key: string, value: string | undefined): void; getParameterBase64(key: string): string | undefined; setParameterFloat(key: string, value: number | undefined): void; getParameterFloat(key: string): number | undefined; setParameterInt(key: string, value: number | undefined): void; getParameterInt(key: string): number | undefined; deleteParameter(key: string): void; } //# sourceMappingURL=Metaframe.d.ts.map