Options
All
  • Public
  • Public/Protected
  • All
Menu

This class is used to send events from the CXone Agent application.

Hierarchy

  • CXoneEventMessenger

Index

Constructors

Properties

agentSession: ACDSessionManager
logger: Logger = ...
pendingSubscriptions: MessageEvent<any>[] = []
windowEventSubscribers: PostMessageEvent[] = []

Accessors

Methods

  • getNextEventHandler(): void
  • init(): void
  • onPostMessageReceived(event: MessageEvent<any>): void
  • onSessionTokenUpdate(): void
  • onWindowUnsubscribe(event: MessageEvent<any>): void
  • processPendingSubscriptions(pendingSubscriptions: MessageEvent<any>[]): void
  • publishEventsToWindows(events: {}[]): void
  • standardizeSubscriptionTypes(subscriptionTypes: string[]): string[]
  • Returns an array with all of the subscription types in a cleaned state.Will not include any invalid subscription types.

    example
    standardizeSubscriptionTypes(event);
    

    Parameters

    • subscriptionTypes: string[]

      subscriptionTypes

    Returns string[]

    • result
  • validateAndCleanContactId(contactId: number): number
  • validateSubscriptionEvent(event: MessageEvent<PostMessageEventData>): { reason: string; status: string }
  • validateWindowObjectIsNew(childWindow: MessageEventSource): boolean
  • Returns true if the window object is not one we already have a reference to This will help avoid sending double messages to a window if they call subscribe twice

    example
    validateWindowObjectIsNew(window);
    

    Parameters

    • childWindow: MessageEventSource

    Returns boolean

    • result

Generated using TypeDoc