UNPKG

customerio-gist-web

Version:

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

37 lines (36 loc) 1.97 kB
import EventEmitter from './utilities/event-emitter'; import type { GistConfig, GistMessage, DisplaySettings, ColorScheme } from './types'; import type { InboxMessage } from './managers/inbox-message-manager'; export default class Gist { static events: EventEmitter; static config: GistConfig; static initialized: boolean; static currentMessages: GistMessage[]; static overlayInstanceId: string | null; static currentRoute: string | null; static routeInitialized: boolean; static isDocumentVisible: boolean; static setup(config: GistConfig): Promise<void>; static setupDebugOverlay(): void; static setCurrentRoute(route: string): Promise<void>; static setUserToken(userToken: string, expiryDate?: Date): Promise<void>; static setUserLocale(userLocale: string): void; static setColorScheme(colorScheme: ColorScheme): void; static setCustomAttribute(key: string, value: unknown): boolean; static clearCustomAttributes(): void; static removeCustomAttribute(key: string): boolean; static clearUserToken(): Promise<void>; static dismissMessage(instanceId: string): Promise<void>; static embedMessage(message: GistMessage, elementId: string): Promise<string | null>; static showMessage(message: GistMessage): Promise<string | null>; static updateMessageDisplaySettings(instanceId: string, displaySettings: DisplaySettings): boolean; static messageShown(message: GistMessage): void; static messageDismissed(message: GistMessage | null): void; static messageError(message: GistMessage): void; static messageAction(message: GistMessage, action: string, name: string): void; static getInboxUnopenedCount(): Promise<number>; static getInboxMessages(): Promise<InboxMessage[]>; static updateInboxMessageOpenState(queueId: string, opened: boolean): Promise<void>; static removeInboxMessage(queueId: string): Promise<void>; static isInboxEnabled(): boolean; }