import { EventEmitter } from "eventemitter3"; import { OneSchemaError, OneSchemaLaunchParams, OneSchemaLaunchSessionParams, OneSchemaLaunchStatus, OneSchemaParams } from "./config"; /** * OneSchemaImporter class manages the iframe used for importing data in your * application and emits events based on what happens. */ export declare class OneSchemaImporterClass extends EventEmitter { #private; iframe?: HTMLIFrameElement; _hasAttemptedLaunch: boolean; constructor(params: OneSchemaParams); /** * Set the name and version of the client, used for logging/debugging * @param client * @param version */ setClient(client: string, version: string): void; /** * Set the iframe to be used by the OneSchema importer * Should only be used in conjunction with the param of manageDOM false * @param iframe */ setIframe(iframe: HTMLIFrameElement): void; /** * Will change the CSS class of the iframe. * * @param className the new CSS class */ setClassName(className: string): void; /** * Will change the styles of the iframe. * * @param styles the styles to apply */ setStyles(styles: Partial): void; /** * Will change the parent container of the iframe * NOTE: will reload the URL * @param parent DOM element to append to */ setParent(parent: HTMLElement): void; /** * Launch will show the OneSchema window and initialize the importer session * @param launchParams optionally pass in parameter overrides or values not passed into constructor */ launch(launchParams?: Partial & Partial): OneSchemaLaunchStatus; /** * DEPRECATED: use `launch` instead. * Launch session will show the OneSchema window and initialize the importer session with the given session token * @param launchParams optionally pass in parameter overrides or values not passed into constructor */ launchSession(launchParams?: Partial): OneSchemaLaunchStatus; _launch(): void; _initWithRetry(count?: number): void; _resetSession(launchParams?: Partial & Partial): void; /** * Close will stop the importing session and hide the OneSchema window * @param clean will remove the iframe and event listeners if true */ close(clean?: boolean): void; emitErrorEvent(error: OneSchemaError): void; } /** * @param params the settings for the importing session * @returns an instance of the OneSchemaImporter */ export default function oneSchemaImporter(params: OneSchemaParams): OneSchemaImporterClass;