import {ResponseInnerMessage, ActionInnerMessage, ReplyMessageOptions} from '../common/types'; import CbIframe from './cb-iframe'; import ComponentField from './component-field'; import IDealField from './ideal-field'; export declare const CHILD_IFRAME_NAME: (name: string, id: string) => string; export interface CbIframeClientInterface { createMasterFrame(): Promise; createCbFrame(componentField: ComponentField, containerElement: HTMLElement): Promise; register(message: ActionInnerMessage, frame: CbIframe): Promise; register(message: ActionInnerMessage, frame: CbIframe): Promise; send(message: ActionInnerMessage, name: string, options?: ReplyMessageOptions): Promise; listen(event: MessageEvent): any; deregister(name: string): any; } interface CbIframeClient { constructor(); createMasterFrame(): Promise; /** * replaces existing div element with the given id with a corresponding iframe element */ createCbFrame(componentField: ComponentField, containerElement: HTMLElement): Promise; createIDealFrame(componentField: IDealField, containerElement: HTMLElement, opts: any): Promise; /** * For registering a component/Field to Master * @param message - action message * @param name - iframe name */ register(message: ActionInnerMessage, frame: CbIframe): Promise; /** * Message communication with master * @param message - action message * @param name - iframe name * @param options - message Options */ send(message: ActionInnerMessage, name: string, options?: ReplyMessageOptions): Promise; listen(event: MessageEvent): void; deregister(name: string): void; } declare const cbIframeClient: CbIframeClient; export default cbIframeClient;