import { IUserAction } from "@lifeomic/chatbot-tools/dist/actions/user"; import { EWidgetVisualStates as EWidgetVisualState } from "./widget-states"; import { ILoadBavardOptions, BotType } from "./types"; import { IWidgetSettings } from "@lifeomic/chatbot-tools"; import { IConversationCustomMetadata } from "@lifeomic/chatbot-tools/dist/conversations"; import { IConversationLocalStorage } from "./storage"; export declare const Validation: { validateLoadBavardOptions: (value: unknown) => { isValid: boolean; data: { type?: BotType | undefined; secondaryAgentIds?: string[] | undefined; userIdToken?: string | undefined; gaTrackingCode?: string | undefined; debug?: boolean | undefined; dev?: boolean | undefined; demo?: boolean | undefined; widgetId?: number | undefined; config?: any; widgetSettings?: any; startOpen?: boolean | undefined; widgetBaseUrl?: string | undefined; ignorePaths?: boolean | undefined; conversationMetadata?: Record | undefined; resumeConversationId?: string | undefined; agentId: string; }; errors?: undefined; } | { isValid: boolean; errors: ({ path: string; code: "invalid_type"; expected: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "map" | "nan" | "integer" | "float" | "date" | "null" | "array" | "unknown" | "promise" | "void" | "never" | "set"; received: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "map" | "nan" | "integer" | "float" | "date" | "null" | "array" | "unknown" | "promise" | "void" | "never" | "set"; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_literal"; expected: unknown; message: string; fatal?: boolean | undefined; } | { path: string; code: "unrecognized_keys"; keys: string[]; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_union"; unionErrors: import("zod").ZodError[]; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_union_discriminator"; options: import("zod").Primitive[]; message: string; fatal?: boolean | undefined; } | { path: string; received: string | number; code: "invalid_enum_value"; options: (string | number)[]; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_arguments"; argumentsError: import("zod").ZodError; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_return_type"; returnTypeError: import("zod").ZodError; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_date"; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_string"; validation: import("zod").StringValidation; message: string; fatal?: boolean | undefined; } | { path: string; code: "too_small"; minimum: number; inclusive: boolean; exact?: boolean | undefined; type: "string" | "number" | "date" | "array" | "set"; message: string; fatal?: boolean | undefined; } | { path: string; code: "too_big"; maximum: number; inclusive: boolean; exact?: boolean | undefined; type: "string" | "number" | "date" | "array" | "set"; message: string; fatal?: boolean | undefined; } | { path: string; code: "invalid_intersection_types"; message: string; fatal?: boolean | undefined; } | { path: string; code: "not_multiple_of"; multipleOf: number; message: string; fatal?: boolean | undefined; } | { path: string; code: "not_finite"; message: string; fatal?: boolean | undefined; } | { path: string; code: "custom"; params?: { [k: string]: any; } | undefined; message: string; fatal?: boolean | undefined; })[]; data?: undefined; }; }; export declare const styleTemplate: string; export { BotType }; export type { ILoadBavardOptions } from "./types"; declare global { interface Window { loadBavard: (options: ILoadBavardOptions) => Bavard; unloadBavard: (widgetId?: number, clearData?: boolean) => void; bavardClearStorage: (widgetId?: number) => void; bavardSetWidgetSettings: (settings: IWidgetSettings, widgetId?: number) => void; bavard?: Bavard; bavardInstances?: { [widgetId: string | number]: Bavard; }; ga: any; gtag: any; } } declare class Bavard { iframe: HTMLIFrameElement; baseUrl: string; conversationData: IConversationLocalStorage | null; visualState: EWidgetVisualState; agentId: string; secondaryAgentIds?: string[]; userIdToken?: string; conversationMetadata?: IConversationCustomMetadata; gaTrackingCode?: string; debug: boolean; isDev: boolean; isDemo: boolean; widgetId: number; botType: BotType; widgetSettings?: IWidgetSettings; startOpen: boolean; cobrowsingEnabled: boolean; private cobrowsingIntervalId; private mouseX; private mouseY; private messageListener; mouseMoveListener: (ev: MouseEvent) => void; constructor(options: ILoadBavardOptions & { /** * Temporary extension of ILoadBavardOptions to deal with the mobile * app using conversationMetaData. That property needs to be updated * OR the property name here could be changed to match since there * are currently no other paths using that property */ conversationMetaData?: Record; }); updateWidgetSettings(settings: IWidgetSettings): void; onMessage(e: MessageEvent): void; onVisualStateChange(state: EWidgetVisualState): void; onUserAction(userAction: IUserAction): void; setCoBrowsing(enabled: boolean): void; private postMessage; close(): void; private sendGoogleAnalyticsEvent; unload(clearData: boolean): void; setMousePos(x: number, y: number): void; addListeners(): void; removeListeners(): void; } export {};