Static
addAttach event handler callback that needs to be invoked when user has remained inactive for the idleTimeout duration.
The event handler callback.
Unique event handler id that was generated by SDK when the event handler was attached.
Static
addAttach event handler callback that needs to be invoked when SDK gets initialized.
The event handler callback.
Unique event handler id that was generated by SDK when the event handler was attached.
Static
addAttach event handler callback that needs to be invoked when SDK shuts down.
The event handler callback.
Unique event handler id that was generated by SDK when the event handler was attached.
Static
getGet the default conversation for this SDK instance. Before calling this method, it is mandatory for the 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 SDK during initialization. See init method. If no class was provided to the SDK during initialization, then the default conversation class will be AxpConversationCore and there is no need to specify the type.
The type of the conversation class that was provided to the SDK during initialization.
InstanceType of class T that extends AxpConversationCore and was provided to the SDK in init method.
Static
initInitialize the SDK and conversation with the given parameters. Before any operation can be performed with the SDK, it must be initialized. The initialization process creates a new session for the current user (identified by the JWT) and returns a AxpUserSession object that contains the Conversation object corresponding to the User's ongoing conversation.
Initialization data required to initialize the SDK.
A promise that resolves to AxpUserSession with conversation of type AxpConversationCore.
Initialize the SDK and conversation with the given parameters. Before any operation can be performed with the SDK, it must be initialized. The initialization process creates a new session for the current user (identified by the JWT) and returns a AxpUserSession object that contains the Conversation object corresponding to the User's ongoing conversation.
Initialization data required to initialize the SDK.
Enhanced(Mixed) class that extends AxpConversationCore, which was generated by applying the Mixins.
A promise that resolves to AxpUserSession with conversation of type EnhancedConversationClass.
const AxpConversationMixedClass = AxpMessagingConversation();
const SDKUserSession = await AxpOmniSdk.init({
displayName: <displayName>,
token: <jwt_token>,
integrationId: <integration_id>,
host: <region>,
appKey: <appKey>,
logLevel: <logLevel>,
idleTimeoutDuration: <idleTimeOutDuration>,
idleShutdownGraceTimeoutDuration: <graceTimeoutDuration>,
jwtProvider: <jwtProviderImpl>
}, AxpConversationMixedClass);
Static
removeStatic
removeStatic
removeStatic
resetReset the idle timer to indicate the SDK that the user session is still active. The SDK already resets the timeout when it receives a request internally from the modules or other sub modules(AXP Messaging).
Invoke this method only when client want to indicate a user's activity visible only to the client (apart from the above mentioned activities).
Static
setStatic
setStatic
shutdownShutdown the SDK and closes the session with AXP. After shutdown, if the SDK is required to be used again, re-initialize it by calling init. Before calling this method, it is mandatory for the SDK to be initialized.
Optional
shutdownReason: ShutdownReasonReason for shutting down the SDK.
Static
version
Entry point for applications to configure and use the SDK. This class contains various utility methods to initialize and shutdown the SDK. Few other functionalities like setting log level, resetting idle timeout, setting event listeners for SDK events are also provided in this class.