import type { WidgetCallbacks, WidgetData, WidgetOptions, WidgetSamplerLog, WidgetType } from "./domain"; import { type TimestampField } from "./services/WidgetStateManager"; export interface WidgetConfig { instanceKey: string; type: WidgetType; data: WidgetData; options?: WidgetOptions; callbacks: WidgetCallbacks; } type ShowHandler = (config: WidgetConfig) => void; type DismissHandler = () => void; export declare function _registerHost(show: ShowHandler, dismiss: DismissHandler): void; export declare function _unregisterHost(): void; export declare class SoluCXWidget { private _instanceKey; private _type; private _data; private _options; private _callbacks; private constructor(); static create(instanceKey: string): SoluCXWidget; setData(data: WidgetData): this; setOptions(options: WidgetOptions): this; setCallbacks(callbacks: WidgetCallbacks): this; setType(type: WidgetType): this; show(): void; static dismiss(): void; /** * Build the storage ID from the builder state. * Uses instanceKey + journey (from data) + userId (from data). */ private _buildStorageId; private _createStateManager; /** * Override a specific event timestamp. * Uses instanceKey from create() and journey/userId from setData(). * * @param field - The timestamp field to override (e.g., 'lastFirstAccess', 'lastDismiss') * @param date - The date to set (Date object or timestamp in milliseconds). Use 0 to clear. */ overrideTimestamp(field: TimestampField, date: Date | number): Promise; /** * Get the current widget logs. * Uses instanceKey from create() and journey/userId from setData(). */ getWidgetLogs(): Promise; /** * Clear all widget logs. * Uses instanceKey from create() and journey/userId from setData(). */ clearWidgetLogs(): Promise; private _cleanup; } export {}; //# sourceMappingURL=SoluCXWidget.d.ts.map