UNPKG

customerio-gist-web

Version:

Build beautiful in-app flows with no code and deliver them instantly to your app. http://customer.io

22 lines (21 loc) 1.66 kB
import type { GistMessage, DisplaySettings } from '../types'; export declare const wideOverlayPositions: readonly string[]; export declare function fetchMessageByInstanceId(instanceId: string): GistMessage | undefined; export declare function isQueueIdAlreadyShowing(queueId: string | undefined): boolean; export declare function fetchMessageByElementId(elementId: string | null | undefined): GistMessage | null; export declare function removeMessageByInstanceId(instanceId: string): void; export declare function updateMessageByInstanceId(instanceId: string, message: GistMessage): void; export declare function mapOverlayPositionToElementId(overlayPosition: string | undefined): string; export declare function mapElementIdToOverlayPosition(elementId: string | undefined | null): string | undefined; export declare function matchesRouteRule(rule: string): boolean; /** * Whether a step's page-url refers to the page the visitor is currently on. * Compared by pathname only: authored URLs stay environment-agnostic (staging * and production hosts differ) and query/hash noise is ignored. Relative URLs * resolve against the current location. Unparseable values fail open (treated * as matching) so a bad authored URL can't strand a tour mid-way. */ export declare function matchesPageUrl(pageUrl: string): boolean; export declare function getCurrentDisplayType(message: GistMessage): 'modal' | 'overlay' | 'inline' | 'tooltip'; export declare function hasDisplayChanged(currentMessage: GistMessage, displaySettings: DisplaySettings): boolean; export declare function applyDisplaySettings(message: GistMessage, displaySettings: DisplaySettings): void;