import { EventEmitter } from 'eventemitter3'; export declare type AvailableMessages = EmployerSettingsCommittedMessageV1 | EmployerSettingsUpdatedMessageV1 | LoadedMessageV1 | MfaVerificationCompleteMessageV1 | OnboardingIntentCompletedMessageV1 | OnboardingSessionCommittedMessageV1 | OnboardingSessionFinishedMessageV1 | OnboardingStepChangedMessageV1 | ToastMessageV1 | WindowDimensionChangeMessageV1; export declare class Embed { iframe: HTMLIFrameElement; loader: HTMLDivElement | null; handleMessageBound: (event: MessageEvent) => void; options: Options; bus: EventEmitter; allowedOrigins: Array; responsiveTimer: ReturnType | null; embedSuccessfullyInitialized: boolean; constructor(options: Options); teardown(): void; on(event: K, cb: (data: MessageKindToTypeMap[K]) => void): EventEmitter; off(event: K, cb: (data: MessageKindToTypeMap[K]) => void): EventEmitter; once(event: K, cb: (data: MessageKindToTypeMap[K]) => void): EventEmitter; private handleMessage; } export declare type EmployerSettingsCommittedDataV1 = null; export declare type EmployerSettingsCommittedMessageV1 = { data: EmployerSettingsCommittedDataV1; kind: MESSAGE_KIND.EMPLOYER_SETTINGS_COMMITTED; version: "v1"; }; export declare type EmployerSettingsUpdatedDataV1 = null; export declare type EmployerSettingsUpdatedMessageV1 = { data: EmployerSettingsUpdatedDataV1; kind: MESSAGE_KIND.EMPLOYER_SETTINGS_UPDATED; version: "v1"; }; export declare type LoadedMessageDataV1 = null; export declare type LoadedMessageV1 = { data: LoadedMessageDataV1; kind: MESSAGE_KIND.LOADED; version: "v1"; }; export declare enum MESSAGE_KIND { EMPLOYER_SETTINGS_COMMITTED = "employerSettingsCommitted", EMPLOYER_SETTINGS_UPDATED = "employerSettingsUpdated", LOADED = "loaded", MFA_VERIFICATION_COMPLETED = "mfa_verification:complete", ONBOARDING_INTENT_COMPLETED = "onboardingIntentCompleted", ONBOARDING_SESSION_COMMITTED = "onboardingSessionCommitted", ONBOARDING_STEP_CHANGED = "onboardingStepChanged", ONBOARDING_SESSION_FINISHED = "onboardingSessionFinished", TOAST = "toast", WINDOW_DIMENSION_CHANGE = "windowDimensionChange" } export declare type MessageKindToTypeMap = { [MESSAGE_KIND.EMPLOYER_SETTINGS_COMMITTED]: EmployerSettingsCommittedDataV1; [MESSAGE_KIND.EMPLOYER_SETTINGS_UPDATED]: EmployerSettingsUpdatedDataV1; [MESSAGE_KIND.LOADED]: null; [MESSAGE_KIND.MFA_VERIFICATION_COMPLETED]: MfaVerificationCompleteDataV1; [MESSAGE_KIND.ONBOARDING_INTENT_COMPLETED]: OnboardingIntentCompletedDataV1; [MESSAGE_KIND.ONBOARDING_SESSION_COMMITTED]: OnboardingSessionCommittedDataV1; [MESSAGE_KIND.ONBOARDING_SESSION_FINISHED]: OnboardingSessionFinishedDataV1; [MESSAGE_KIND.ONBOARDING_STEP_CHANGED]: OnboardingStepChangedDataV1; [MESSAGE_KIND.TOAST]: ToastMessageDataV1; [MESSAGE_KIND.WINDOW_DIMENSION_CHANGE]: WindowDimensionChangeMessageDataV1; }; export declare type MfaVerificationCompleteDataV1 = { /** * A ISO 8601 compliant date time string indicating when the MFA session was * verified. This will be `null` when verifications attempts have been exceeded. */ verified_at: string | null; }; /** * A message type emitted when the user has either completed their MFA session or * have exceeded the maximum number of attempts. Successful attempts will have their * `verified_at` property as an ISO-8601 string, while failed attempts will be `null`. */ export declare type MfaVerificationCompleteMessageV1 = { data: MfaVerificationCompleteDataV1; kind: MESSAGE_KIND.MFA_VERIFICATION_COMPLETED; version: "v1"; }; export declare type OnboardingIntentCompletedDataV1 = null; export declare type OnboardingIntentCompletedMessageV1 = { data: OnboardingIntentCompletedDataV1; kind: MESSAGE_KIND.ONBOARDING_INTENT_COMPLETED; version: "v1"; }; export declare type OnboardingSessionCommittedDataV1 = null; export declare type OnboardingSessionCommittedMessageV1 = { data: OnboardingSessionCommittedDataV1; kind: MESSAGE_KIND.ONBOARDING_SESSION_COMMITTED; version: "v1"; }; export declare type OnboardingSessionFinishedDataV1 = null; export declare type OnboardingSessionFinishedMessageV1 = { data: OnboardingSessionFinishedDataV1; kind: MESSAGE_KIND.ONBOARDING_SESSION_FINISHED; version: "v1"; }; export declare type OnboardingStepChangedDataV1 = { current_step: string; steps: string[]; }; export declare type OnboardingStepChangedMessageV1 = { data: OnboardingStepChangedDataV1; kind: MESSAGE_KIND.ONBOARDING_STEP_CHANGED; version: "v1"; }; export declare type Options = { element: HTMLElement; extraAllowedOrigins?: Array; createLoader?: () => HTMLDivElement; loaderClass?: string; onLoadError?: () => void; url: string; }; export declare type ToastKindV1 = "success" | "error" | "info" | "warning"; export declare type ToastMessageDataV1 = null; export declare type ToastMessageV1 = { data: { kind: ToastKindV1; message: string; }; kind: MESSAGE_KIND.TOAST; version: "v1"; }; export declare type WindowDimensionChangeMessageDataV1 = { bounds: DOMRect; }; export declare type WindowDimensionChangeMessageV1 = { data: WindowDimensionChangeMessageDataV1; kind: MESSAGE_KIND.WINDOW_DIMENSION_CHANGE; version: "v1"; }; export { }