Skip to content

Type Aliases

Bootloader


Bootloader: {
  hasLoaded: boolean;
  scopes: Record<string, Scope>;
  tokens: Record<string, string>;
  queueName: string;
  config: ( token: string, configuration?: object ) => boolean;
  install: ( uri: string, params?: object ) => Promise<Element>;
  listen: ( action: string, params?: object ) => void;
  onLoad: ( handler: Callback ) => boolean;
  onUnload: ( handler: Callback ) => void;
  provide: ( type: string, params?: object ) => void;
  push: ( value: string ) => void;
  style: ( uri: string, params?: object ) => Promise<Element>;
  track: ( label: string, event: EventSpecObj ) => boolean;
  answer: () => number;
  print: ( value: string ) => void;
  version: () => string;
  getScope: ( scope: string ) => Scope;
  getState: () => State;
 }

Referenced in:
Namespace

References to:
State

Learn More:
EventSpecObj

Callback


Callback: (...args: any[]) => any;

Referenced in:
Scope

DatastoreModule


DatastoreModule: {
  getStore: (name: string, params?: Record<string, any>) => Store;
}

Referenced in:
Namespace

EventModule


EventModule: {
  track: ( event: string, eventModel: EventSpecObj ) => void;
  pub: ( topic: string, params?: Record<string, any> ) => void;
  sub: ( topic: string, cb: Callback, filter?: any ) => void;
  push: ( params?: Record<string, any> ) => void;
  getDatalayer: () => any;
  getRulesets: () => any;
 }

Referenced in:
Namespace

Learn More:
EventSpecObj

FacebookApp


FacebookApp: {
  appID: string;
  version: string;
}

Referenced in:
Shopper Login

LayoutConfig


LayoutConfig: {
  id: string;
  location: string;
  position: string;
  attributes: object;
}

Referenced in:
Layout Manager

LitModule


LitModule: {
  html: any;
  render: ( ...args: any[] ) => void;
}

Referenced in:
Namespace

Namespace


Namespace: {
  accountID: string;
  queuedEvents: Record<string, any>;
  tokens: Record<string, any>;
  bootloader: () => Scope;
  datastore: () => DatastoreModule;
  events: () => EventModule;
  network: () => NetworkModule;
  lit: () => LitModule;
  plugins: () => Record<string, any>;
  pluginDetails: ()=> Record<string, any>;
  services: () => Record<string, any>;
  version: () => string;
  name: () => string;
  latest: () => string;
}

Referenced in:
Scope

Learn More:
DatastoreModule >
EventModule >
LitModule >
NetworkModule

NetworkCapabilities


NetworkCapabilities: {
  xhr: boolean;
  beacon: boolean;
  image: boolean;
}

Referenced in:
NetworkCapabilities

NetworkModule


NetworkModule: {
  request: (uri: string, params?: Record<string, any>) => any;
  capabilities: () => NetworkCapabilities;
}

Referenced in:
Namespace

PopupConfig


PopupConfig: {
  plugin_id: string;
  context_id: string;
  css_url: string;
  display_type: string;
  popupTimer: number;
  visitThreshold: number;
  scrollPersentThreshold: number;
  scrollTrigger: boolean;
  disableConvertedUsers: boolean;
  disaleNewVisit: boolean;
  maxContentDisplayCount: number;
  cookieExpirationDays: number;
}

Referenced in:
Popup

Position


Position: "top" |
  "bottom" |
  "left" |
  "right" |
  "top-left" |
  "top-right" |
  "bottom-left" |
  "bottom-right";

Referenced in:
Notifications

Scope


Scope: {
  name: boolean;
  tokens: Record<string, string>;
  version: string;
  install: ( uri: string, params?: Record<string, any> ) => Promise<Element>;
  listen: ( action: string, params?: Record<string, any> ) => void;
  onLoad: ( handler: [Callback](#callback) ) => void;
  onUnLoad: ( handler: [Callback](#callback) ) => void;
  provideExtnsion: ( type: string, params?: Record<string, any> ) => void;
  provideNamespace: ( params?: Record<string, any> ) => void;
  provideToken: ( token: string, configuration?: Record<string, any> ) => boolean;
  style: ( uri: string, params? Record<string, any> ): Promise<Element>;
  track: ( label: string, event: [EventSpecObj](./event_specification.md) ) => boolean;
  utils: () => Record<string, any>;
  getExtensionConstructors: ( type: string ) => Record<string, any>;
  getNamespaces: () => Record<string, Namespace>;
  getState: () => State;
 }

Referenced in:
Bootloader

Store


Store: {
  get: ( key: string ) => any;
  getAll: () => Record<string, any>;
  set: ( key: string, value: any ) => void;
  getsert: ( key: string, defaultValue: any ) => any;
  delete: ( key: string ) => null | any;
  getName: () => string;
  getPersistenceType: () => string;
  getPersistenceLevel: () => string;
 }

Referenced in:
DatastoreModule

State


State: {
  isNewVisit: boolean;
  isNewVisitor: boolean;
  optOut: {
    optedOut: boolean;
  }
  user: {
    id: string;
  }
  pageview: {
    id: string;
    page: {
      url: URL;
      referrer: URL;
    }
  }
  visit: {
    id: string;
    originalURL: URL;
    originalReferrer: URL;
    source: string;
    medium: string;
    campaign: string;
    stats: {
      firstSeenTstamp: number;
      currentVisitTstamp: number;
      lastVisitTstamp: number;
      visitCount: number;
    }
  }
}

Referenced in:
Bootloader

References to:
URL

URL


URL: {
  fragment: Record<string, unknown>;
  query: Record<string, string>;
  raw: string;
  scheme?: string;
  host?: string;
  port?: string;
  path?: string;
}

Referenced in:
State


Last update: 2023-04-13