/// export { protocol } from "./protocol"; declare type EventHandler = (name: string, params: Array) => void; declare type FillerHandle = string; /** * Initializes the API. * * @param url Absolute url of the filler component */ export declare function init(url: string): void; /** * Creates filler component inside container HTML element. * Use options to specify additional parameters. * Filler will be fully initialized after this async call finished. * * Filler will take 100% width and 100% height of the container. * * @param container HTML container element * @param options Additional options * @returns Handle to the filler */ export declare function createFiller(container: HTMLElement, options?: { hideMenu?: boolean; autoresize?: boolean; onEvent?: EventHandler; id?: string; templateId?: string; }): Promise; /** * Destroys filler component. * Removes the component from the DOM and severe the connection to the filler. * * @param handle Handle to the filler */ export declare function destroyFiller(handle: FillerHandle): void; /** * Opens a form provided as Buffer to the API. * * Name must end with *.fo or *.zfo extension. * * @param handle Handle to the filler * @param data Buffer with form data * @param name Name of the form. */ export declare function openForm(handle: FillerHandle, data: Buffer, name: string): Promise; export declare function sendAppEvent(handle: FillerHandle, name: string, params: Array): void; /** * Sets data to the filler. * * @param handle Handle to the filler * @param data Data to be set * @param path Path to the data */ export declare function setDataPart(handle: FillerHandle, path: string, data: string): void; /** * Gets data from the filler. * * @param handle Handle to the filler * @param path Path to the data * @returns Data from the filler * @throws Error if filler is not initialized */ export declare function getDataPart(handle: FillerHandle, path: string): Promise;