import { ExternalStorage } from '../types/external-storage'; import { WidgetCompanionDefaultLayoutU, WidgetConfig, WidgetSidebarModeU } from '../types/widget-config'; import { WidgetSidebarSideResolvedU } from '../utils/companion-layout'; export declare class StorageCtx { private storage; private config; private KEYS; constructor({ storage, config, }: { storage: ExternalStorage; config: WidgetConfig; }); setContactToken: (token: string) => Promise; getContactToken: () => Promise; clearContactToken: () => Promise; /** * The conversation the visitor was last in. Only a POINTER lives here — the * messages themselves are on the backend — but without it a page reload * drops the visitor into an empty composer beside a conversation that is * still very much alive. */ private activeSessionKey; getActiveSessionId: () => Promise; setActiveSessionId: (sessionId: string) => Promise; clearActiveSessionId: () => Promise; setExternalContactId: (id: string) => Promise; getExternalContactId: () => Promise; private companionKey; private getFiniteNumber; getCompanionPillOffsetX: () => Promise; setCompanionPillOffsetX: (offset: number) => Promise; getCompanionSidebarWidth: () => Promise; setCompanionSidebarWidth: (width: number) => Promise; /** * The visitor's own sidebar side/mode, once they have picked one in the * layout menu. Absent until then, so `companion.sidebar.*` config keeps * deciding for a visitor who never touched the control. Unrecognized stored * values read as absent rather than poisoning the layout. */ getCompanionSidebarSide: () => Promise; setCompanionSidebarSide: (side: WidgetSidebarSideResolvedU) => Promise; /** * The RESTING layout the visitor last picked in the layout menu. Absent * until they pick one, so `companion.defaultLayout` keeps deciding for a * visitor who never touched the control. * * `fullscreen` is deliberately unstorable: it is a mode the visitor enters * on top of a resting layout (Escape drops back out of it), so persisting * it would reopen every future visit full-screen over the host page. */ getCompanionLayout: () => Promise; setCompanionLayout: (layout: WidgetCompanionDefaultLayoutU) => Promise; getCompanionSidebarMode: () => Promise; setCompanionSidebarMode: (mode: WidgetSidebarModeU) => Promise; } //# sourceMappingURL=storage.ctx.d.ts.map