Static
addAttach event handler callback that needs to be invoked when user has remained inactive for the duration configured in InitParams.idleTimeoutDuration.
The event handler callback.
Unique event handler id that was generated by Omni SDK when the event handler was attached.
Static
addAttach event handler callback that needs to be invoked when Omni SDK gets initialized.
The event handler callback.
Unique event handler id that was generated by Omni SDK when the event handler was attached.
Static
addAttach event handler callback that needs to be invoked when Omni SDK shuts down.
The event handler callback.
Unique event handler id that was generated by Omni SDK when the event handler was attached.
Static
createInitiate a new conversation between the current user (identified by the JWT) and the contact center.
Note: Before calling this method, it is mandatory for the Omni SDK to be initialized.
A promise that resolves to a conversation object of type CoreConversation.
Initiate a new conversation between the current user (identified by the JWT) and the contact center. The EnhancedConversationClass provided here should be the same used to initialize the Omni SDK Note: Before calling this method, it is mandatory for the Omni SDK to be initialized.
Enhanced (Mixed) class that extends CoreConversation, which was generated by applying the Mixins. This should be the same class that was provided to the the Omni SDK during initialization in init method.
A promise that resolves to a conversation object of type EnhancedConversationClass.
Static
getGet the default conversation of the User if one exists.
Note: Before calling this method, it is mandatory for the Omni SDK to be initialized.
Note: In order to fully leverage the advantages of TypeScript, it is recommended to specify the type of the conversation class that was provided to the Omni SDK during initialization. See init method. If no class was provided to the Omni SDK during initialization, then the default conversation class will be CoreConversation and there is no need to specify the type.
The type of the conversation class that was provided to the Omni SDK during initialization.
Instance of class T (that extends CoreConversation and was provided to the Omni SDK in init method) if the default conversation exists, else undefined.
Static
initInitialize the Omni SDK with the given parameters. Before any operation can be performed with the Omni SDK, it must be initialized. The initialization process creates a new session for the current user (identified by the JWT) and returns a UserSession object that contains the Conversation object corresponding to the User's ongoing conversation.
Initialization data required to initialize the Omni SDK.
A promise that resolves to UserSession with conversation of type CoreConversation.
Initialize the Omni SDK with the given parameters. Before any operation can be performed with the Omni SDK, it must be initialized. The initialization process creates a new session for the current user (identified by the JWT) and returns a UserSession object that contains the Conversation object corresponding to the User's ongoing conversation.
Initialization data required to initialize the Omni SDK.
Enhanced (Mixed) class that extends CoreConversation, which was generated by applying the Mixins.
A promise that resolves to UserSession with conversation of type EnhancedConversationClass.
const ConversationMixedClass = MessagingConversation();
const omniSdkUserSession = await AvayaInfinityOmniSdk.init({
displayName: <displayName>,
token: <jwt_token>,
integrationId: <integration_id>,
host: <region>,
logLevel: <logLevel>,
idleTimeoutDuration: <idleTimeOutDuration>,
idleShutdownGraceTimeoutDuration: <graceTimeoutDuration>,
jwtProvider: <jwtProviderImpl>
}, ConversationMixedClass);
Static
removeStatic
removeStatic
removeStatic
resetReset the idle timer to indicate the Omni SDK that the user session is still active. The Omni SDK automatically resets the timeout when selective methods from other Omni SDK modules are called for e.g when a message is sent by the User through Avaya Infinity Messaging Module.
Call this method to keep the session active when the User's actions are visible to the client but not traceable by the Omni SDK. Examples of such activities could include when the User is browsing/interacting with the website.
Static
setStatic
setStatic
shutdownShutdown the Omni SDK and close the session with Avaya Infinity servers. To use the Omni SDK again after shutdown, re-initialize it by calling init.
Note: Before calling this method, it is mandatory for the Omni SDK to be initialized.
Optional
shutdownReason: ShutdownReasonReason for shutting down the Omni SDK.
Static
version
Entry point for applications to configure and use the Omni SDK. This class contains utility methods to initialize and shutdown the Omni SDK. Few other functionalities like setting log level, resetting idle timeout, setting event listeners for common Omni SDK events are also provided in this class.