@avaya/infinity-omni-sdk-messaging-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt ADDED
@@ -0,0 +1 @@
1
+ License: https://support.avaya.com/css/public/documents/101038288
package/README.md ADDED
@@ -0,0 +1,372 @@
1
+ # Omni SDK Messaging UI
2
+
3
+ Avaya Infinity™ Omni SDK Messaging UI provides a highly customizable user interface as a [Web Component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components) for messaging that can be easily integrated into the Client website to enable messaging capabilities.
4
+
5
+ The Omni SDK Messaging UI is build on top of [Omni SDK Core](https://github.com/Avaya-Infinity/omni-sdk-web/blob/main/core.md) and [Omni SDK Messaging](https://github.com/Avaya-Infinity/omni-sdk-web/blob/main/messaging.md) SDKs. Before using the Avaya Infinity™ Omni SDK Messaging UI, please refer to [this page](https://github.com/Avaya-Infinity/omni-sdk-web/blob/main/README.md#next-steps) for a list of prerequisites.
6
+
7
+ ## Features
8
+
9
+ - **Create and End Conversations:** Allows users to create new conversations and end existing ones.
10
+ - **Show messages with status:** Shows the messages from various sources such as agents, supervisors, and bots with time and status indicators, including real-time updates for messages being sent, successfully delivered to Avaya Infinity™ platform, or requiring a retry due to failure.
11
+ - **Message Organization:** Organizes messages based on the date, providing users with a structured and easily navigable conversation timeline for a seamless and enjoyable messaging experience.
12
+ - **Message History:** Retrieve and display historical messages in a conversation, enabling users to reference messages from previous interactions for context and continuity.
13
+ - **Infinite Scrolling:** Improve user experience by automatically fetching older messages as users scroll to the top, ensuring a seamless and uninterrupted conversation exploration.
14
+ - **Message Retry:** Facilitate communication resilience by allowing users to retry sending messages that may have failed in previous attempts.
15
+ - **Attachments:** Enhances communication capabilities by enabling users to send attachments, either independently or with accompanying text messages, fostering a richer and more interactive messaging experience.
16
+ - **Rich Media:** Supports quick reply rich media messages allowing dynamic and engaging content within the messaging interface.
17
+ - **Rich Text:** Supports markdown formatted rich text messages, enabling users to send and receive messages with enhanced formatting options for enriched expression.
18
+ - **Typing indicators:** Provides real-time typing indicators to show when the participants in a Conversation are typing, enhancing the conversational experience by providing immediate feedback on the other party's engagement.
19
+ - **Print and Download Transcript:** Allows users to print or download the conversation transcript, once the conversation is closed, providing a convenient way to save and share important interactions for future reference.
20
+ - **Customizability**: Provides customizations options for developers to tweak the messaging interface to meet the specific visual requirements of their brand.
21
+
22
+ ## Installation
23
+
24
+ To install the Avaya Infinity™ Omni SDK Messaging UI, run the following command:
25
+
26
+ ```bash
27
+ npm install --save @avaya/infinity-omni-sdk-messaging-ui
28
+ ```
29
+
30
+ The Avaya Infinity™ Omni SDK Messaging UI depends on the Omni SDK Core SDK and Omni SDK Messaging SDK, which are bundled with the Avaya Infinity™ Omni SDK Messaging UI.
31
+
32
+ ## Usage
33
+
34
+ The Avaya Infinity™ Omni SDK Messaging UI exports a Web Component `<avaya-infinity-omni-sdk-messaging-ui>` that should be used in your HTML code. The Messaging UI exports the class responsible for the Web Component as `AvayaInfinityOmniSdkMessagingUi`. To render the Messaging UI on the screen, you need to explicitly [load](#load-messaging-ui) it by passing the required [configuration](#configuration). Once loaded, the Messaging UI instance can be [initialized](#initialization) to start the web chat.
35
+
36
+ **Example:**
37
+
38
+ Your website's main HTML file: `index.html`
39
+
40
+ ```html
41
+ <!-- Your index.html -->
42
+ <!doctype html>
43
+ <html lang="en" dir="ltr">
44
+ <head>
45
+ <meta charset="UTF-8" />
46
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
47
+ <title>Messaging-App-UI</title>
48
+ <script src="/path/to/your-website-script.js"></script>
49
+ </head>
50
+ <body>
51
+ <avaya-infinity-omni-sdk-messaging-ui></avaya-infinity-omni-sdk-messaging-ui>
52
+ </body>
53
+ </html>
54
+ ```
55
+
56
+ ### Configuration
57
+
58
+ As stated above the Avaya Infinity™ Omni SDK Messaging UI requires some configurations to be set before it can be rendered. This should be done by creating a config object of type `MessagingUiConfig` and use it to load the Messaging UI.
59
+
60
+ **Example:**
61
+
62
+ ```js
63
+ const messagingUiConfig = {
64
+ host: "<Avaya Infinity Hostname>",
65
+ integrationId: "<Web Chat Integration Id>",
66
+ // Other optional configurations are omitted for brevity.
67
+ // Please refer to 'MessagingUiConfig' type for more details.
68
+ };
69
+ ```
70
+
71
+ #### Configuration options
72
+
73
+ The Avaya Infinity™ Omni SDK Messaging UI supports following configuration options:
74
+
75
+ | Option | Type | Required/Optional | Description |
76
+ | ---------------------------------- | -------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
77
+ | `host` | `string` | Required | Hostname of the Avaya Infinity™ platform. |
78
+ | `integrationId` | `string` | Required | The Web Chat Integration Id available to your account administrator when the Web Chat Integration was created. |
79
+ | `sessionParameters` | `object` | Optional | The session parameters to be passed to the Avaya Infinity™ platform. |
80
+ | `logLevel` | `LogLevel` | Optional | The log level for the Messaging UI. Default is `WARN`. |
81
+ | `idleTimeoutDuration` | `number` | Optional | The duration in milliseconds after which the user is considered idle. |
82
+ | `idleShutdownGraceTimeoutDuration` | `number` | Optional | The maximum time in milliseconds a user can still remain inactive after the idle timeout, before which the Messaging UI automatically shuts down. |
83
+ | `locale` | `string` | Optional | The locale to be used for the Messaging UI. Default is `en-US`. |
84
+ | `onMessageBubbleClicked` | `function` | Optional | The callback function to be called when the message bubble is clicked. |
85
+ | `onInit` | `function` | Optional | The callback function to be called when the Messaging UI is initialized for the current User (identified by the JWT). |
86
+ | `onShutdown` | `function` | Optional | The callback function to be called when the current session for the current User is closed. |
87
+ | `onIdleTimeout` | `function` | Optional | The callback function to be called when the current User is considered idle. |
88
+ | `beforeMessageSend` | `function` | Optional | The callback function to be called before a message is sent. |
89
+ | `beforeMessageRender` | `function` | Optional | The callback function to be called before a message is rendered on the screen. |
90
+ | `displayStrings` | `DisplayStrings` | Optional | An object containing the display strings and their translations to be used in the Messaging UI. See [custom display strings and translations](#custom-display-strings-and-translations) section. |
91
+ | `emojiMartTranslations` | `Record<Locale,EmojiMartTranslation>` | Optional | Messaging UI uses [Emoji Mart](https://github.com/missive/emoji-mart) Component as emoji picker. This configuration expects an object containing the display strings and their translations to be used for the emoji mart component. |
92
+ | `themeCustomizations` | `Record<string, MessagingUiTheme>` | Optional | An object containing the theme customizations for the Messaging UI. Each key is a theme name and the value is the customizations for that theme. See [theme customization](#theme-customization) section. |
93
+ | `initialTheme` | `string` | Optional | Name of the initial theme to be applied out of the themes provided via the `themeCustomizations` configuration for the Messaging UI. |
94
+
95
+ ### Load Messaging UI
96
+
97
+ The Messaging UI should be loaded by calling the static load method on the class `AvayaInfinityOmniSdkMessagingUi`. This method takes the configuration object of type `MessagingUiConfig` as an argument along with a JWT (see [Authentication](#authentication) section for more details). It returns a `Promise` which resolves when the Messaging UI is loaded successfully.
98
+
99
+ > [!NOTE]
100
+ > The Messaging UI can only be loaded once per page.
101
+
102
+ ```js
103
+ import { AvayaInfinityOmniSdkMessagingUi } from '@avaya/infinity-omni-sdk-messaging-ui';
104
+
105
+ // Your code ...
106
+
107
+ async function loadMessagingUi() {
108
+ // Create the configuration object for the Messaging UI.
109
+ const messagingUiConfig = {
110
+ host: "<Avaya Infinity Hostname>",
111
+ integrationId: "<Web Chat Integration Id>",
112
+ // Other optional configurations are omitted for brevity.
113
+ // Please refer to 'MessagingUiConfig' type for more details.
114
+ };
115
+
116
+ // Fetch the JWT from your backend web application.
117
+ const token = await myBackendServer.fetchToken();
118
+
119
+ // Load the Messaging UI with the configuration and JWT.
120
+ await AvayaInfinityOmniSdkMessagingUi.load(messagingUiConfig, token);
121
+ }
122
+
123
+ // Call the loadMessagingUi function when the window is loaded.
124
+ window.onload = () => {
125
+ // Load the Messaging UI when the window is loaded.
126
+ loadMessagingUi()
127
+ };
128
+ ```
129
+
130
+ ### Authentication
131
+
132
+ The Messaging UI doesn't authenticate the User. It expects the User to be authenticated by your website and its backend web application. The Messaging UI uses JSON Web Tokens (JWT) and requires a valid JWT to function. The JWT is obtained from your own backend web application that communicates with Avaya Infinity™ platform's authentication API.
133
+
134
+ The Messaging UI expects an implementation of the `JwtProvider` interface to be provided during [initialization](#initialization). The `JwtProvider` implementation must have two methods:
135
+
136
+ 1. `onExpiryWarning`: This method will be invoked to notify that the JWT is about to expire. It provides the remaining time before expiration. Your implementation should ideally use this time to fetch a new JWT and set it in the Messaging UI to maintain a seamless user experience.
137
+ 2. `onExpiry`: This method will be invoked to notify that the JWT has expired and the services provided by Messaging UI have been disrupted. When invoked, fetch a new JWT and immediately set it in Messaging UI to resume its services.
138
+
139
+ **Your client should call the `setJwt()` on the instance of `AvayaInfinityOmniSdkMessagingUi` to provide a new JWT to the Messaging UI.**
140
+
141
+ JWT Provider example (in TypeScript):
142
+
143
+ ```typescript
144
+ import { JwtProvider } from "@avaya/infinity-omni-sdk-messaging-ui";
145
+
146
+ class MyJwtProvider implements JwtProvider {
147
+ onExpiryWarning(timeToExpiry: number): void {
148
+ // Fetch the JWT from your backend web application.
149
+ const token = await myBackendServer.fetchToken();
150
+ // Set the new JWT in the Messaging UI.
151
+ AvayaInfinityOmniSdkMessagingUi.getInstance().setJwt(token);
152
+ }
153
+
154
+ onExpiry(): void {
155
+ // Fetch the JWT from your backend web application.
156
+ const token = await myBackendServer.fetchToken();
157
+ // Set the new JWT in the Messaging UI.
158
+ AvayaInfinityOmniSdkMessagingUi.getInstance().setJwt(token);
159
+ }
160
+ }
161
+ ```
162
+
163
+ JWT Provider example (in JavaScript):
164
+
165
+ ```js
166
+ class MyJwtProviderJS {
167
+ onExpiryWarning(timeToExpiry) {
168
+ // Fetch the JWT from your backend web application.
169
+ const token = await myBackendServer.fetchToken();
170
+ // Set the new JWT in the Messaging UI.
171
+ AvayaInfinityOmniSdkMessagingUi.getInstance().setJwt(token);
172
+ }
173
+
174
+ onExpiry() {
175
+ // Fetch the JWT from your backend web application.
176
+ const token = await myBackendServer.fetchToken();
177
+ // Set the new JWT in the Messaging UI.
178
+ AvayaInfinityOmniSdkMessagingUi.getInstance().setJwt(token);
179
+ }
180
+ }
181
+ ```
182
+
183
+ ### Initialization
184
+
185
+ Before the User can start sending messages, the Messaging UI must be initialized. The initialization process creates a new session for the current user (identified by the JWT) post which the user can start sending messages. The initialization can be done by calling the `init` method on the instance of the `<avaya-infinity-omni-sdk-messaging-ui>` Web Component.
186
+
187
+ It can be imported as follows:
188
+
189
+ ```ts
190
+ import { AvayaInfinityOmniSdkMessagingUi } from "@avaya/infinity-omni-sdk-messaging-ui";
191
+ ```
192
+
193
+ Once imported, the instance can be procured by using the static method `getInstance()` on the class `AvayaInfinityOmniSdkMessagingUi`. The `init` method can then be called on the returned instance object to initialize the Avaya Infinity™ Omni SDK Messaging UI.
194
+
195
+ > [!WARNING]
196
+ > Currently Messaging UI supports a single instance, using multiple instances of the `<avaya-infinity-omni-sdk-messaging-ui>` can lead to unpredictable behavior.
197
+
198
+ **Example:**
199
+
200
+ ```js
201
+ const avayaInfinityOmniSdkMessagingUi = AvayaInfinityOmniSdkMessagingUi.getInstance();
202
+
203
+ // Arguments excluded in this example for brevity.
204
+ avayaInfinityOmniSdkMessagingUi.init(...);
205
+ ```
206
+
207
+ The `init()` method takes an object of type `MessagingUiInitParams` containing the following properties:
208
+
209
+ - `jwtProvider`: An implementation of the `JwtProvider` interface. See [Authentication](#authentication) section.
210
+ - `userName` (optional): The name of the current User to be displayed in the Messaging UI.
211
+ - `jwt`: The JWT for the current User.
212
+ - `contextParameters` (optional): The context parameters to be passed to the Avaya Infinity™ platform for routing.
213
+ - `sessionParameters` (optional): The session parameters to be passed to the Avaya Infinity™ platform.
214
+
215
+ The `init()` method returns a `Promise` which resolves when the Messaging UI is initialized successfully.
216
+
217
+ Full example:
218
+
219
+ ```ts
220
+ import { AvayaInfinityOmniSdkMessagingUi } from '@avaya/infinity-omni-sdk-messaging-ui';
221
+
222
+ const avayaInfinityOmniSdkMessagingUi = AvayaInfinityOmniSdkMessagingUi.getInstance();
223
+
224
+ const messagingUiInitParameters = {
225
+ jwtProvider: new MyJwtProvider();
226
+ jwt: '<User JWT>',
227
+ displayName: 'John Doe',
228
+ contextParameters: {
229
+ 'key1': 'value1',
230
+ 'key2': 'value2',
231
+ // ...
232
+ }
233
+ }
234
+
235
+ // Arguments excluded in this example for brevity.
236
+ await avayaInfinityOmniSdkMessagingUi.init(messagingUiInitParameters);
237
+ ```
238
+
239
+ #### Waiting for initialization
240
+
241
+ As shown in above example the `init()` method returns a `Promise` which resolves when the Messaging UI is initialized successfully, developers can `await` on this promise.
242
+
243
+ Alternatively, developers can also listen to the `onInit` callback provided during [configuration](#configuration) to know when the Messaging UI is initialized successfully. The `onInitialized()` callback is called when the Messaging UI is initialized successfully. The instance on which the initialization occurred is passed as an argument to the callback.
244
+
245
+ #### When to initialize
246
+
247
+ Since the initialization process creates a new session for the User, it should be done whenever the User changes. See [shutdown](#shutting-down) section to know how to end the previous User's session when the current User changes.
248
+
249
+ Since, the Messaging UI doesn't authenticate the User, it gives the flexibility to your client website to decide when to initialize the Messaging UI. The initialization can be done when the User logs in or whenever the User clicks on the messaging bubble, or any other flow that suits your website.
250
+
251
+ To know when a User has clicked on the messaging bubble, the Messaging UI provides a callback `onMessageBubbleClicked` which is called when the User clicks on the messaging bubble. This callback must be provided during [configuration](#configuration).
252
+
253
+ The `onMessageBubbleClicked` callback automatically receives the instance of the `<avaya-infinity-omni-sdk-messaging-ui>` Web Component on which the User had clicked. This instance can be used to call the `init` method to initialize the Messaging UI.
254
+
255
+ ### Shutting down
256
+
257
+ Whenever the User changes or the User logs out, the Messaging UI should be shut down to end the current User's session. Post that the Messaging UI can be re-[initialized](#initialization) for the new User.
258
+
259
+ To shutdown, the Messaging UI provides a `shutdown()` method on the instance of the `<avaya-infinity-omni-sdk-messaging-ui>` Web Component. The `shutdown()` method returns a `Promise` which resolves when the Messaging UI is shut down successfully.
260
+
261
+ **Example:**
262
+
263
+ ```ts
264
+ import { AvayaInfinityOmniSdkMessagingUi } from "@avaya/infinity-omni-sdk-messaging-ui";
265
+
266
+ const avayaInfinityOmniSdkMessagingUi = AvayaInfinityOmniSdkMessagingUi.getInstance();
267
+
268
+ await avayaInfinityOmniSdkMessagingUi.shutdown();
269
+ ```
270
+
271
+ Alternatively, you can also listen to the shutdown event by providing the `onShutdown()` callback during [configuration](#configuration). The `onShutdown()` callback is called when the SDK is shut down. The instance on which the shutdown event occurred is passed as an argument to the callback.
272
+
273
+ ### User Activity
274
+
275
+ The Messaging UI internally has two timers to track the User's inactivity.
276
+
277
+ The first timer is the idle timer which is started right after the session is created. This timer expires when there are no activities for the configured duration. Once this timer expires the Messaging UI will emit the Idle Timeout Invoked event and provide the configured grace period duration in the event's payload. The Client can show an appropriate message on the UI, warning the User about inactivity, by handling this event. Any activity from the User like sending a message etc will reset this timer.
278
+
279
+ The second timer is idle shutdown grace timer which runs after the idle timer has expired. This timer provides additional grace period for User or the Client to extend the session. After this timer expires, the session is terminated automatically and the Messaging UI will raise the shutdown event and shut itself down (see [shutdown](#shutting-down) section for more details). If the Client wants to continue it must be reinitialize the SDK to do so.
280
+
281
+ Both the timeout values can be [configured](#configuration).
282
+
283
+ Developers can listen to the Idle Timeout Invoked event by providing the `onIdleTimeout()` callback during [configuration](#configuration). Alternatively, developers can also add listener for the Idle Timeout Invoked event by calling the static method `addIdleTimeOutInvokedListener()` on the class `AvayaInfinityOmniSdkMessagingUi`. Regardless of which approach is used, the callback will be called when the User is considered idle. And the instance on which the event occurred is passed as an argument to the callback.
284
+
285
+ #### Extending the session
286
+
287
+ The Messaging UI provides a static method `resetIdleTimeout()` on the class `AvayaInfinityOmniSdkMessagingUi` to reset the idle timer. This method helps the Client Website to extend the session in scenarios where the Client Website is aware that the User is active based on events from its UI.
288
+
289
+ ### Custom display strings and translations
290
+
291
+ The Messaging UI provides an option to customize the display strings used in the UI. This can be done by providing the `displayStrings` configuration during [initialization](#configuration).
292
+
293
+ Check out the [`DisplayStrings`](https://github.com/Avaya-Infinity/omni-sdk-web/types/_avaya_infinity_omni_sdk_messaging_ui.DisplayStrings.html) type exported by the Messaging UI to know the strings that can be customized.
294
+
295
+ The `displayNames` property of the `DisplayStrings` can take either [`TextConfig`](https://github.com/Avaya-Infinity/omni-sdk-web/types/_avaya_infinity_omni_sdk_messaging_ui.TextConfig.html) or [`displayNameModifier`](https://github.com/Avaya-Infinity/omni-sdk-web/types/_avaya_infinity_omni_sdk_messaging_ui.DisplayNameModifier.html) callback function as a value for each of the participants. This function provides participant name as the parameter and expects a string in return.
296
+
297
+ The locale of the messaging UI can be changed by calling the static method `setLocale()` on the class `AvayaInfinityOmniSdkMessagingUi`, which takes the locale string as an argument.
298
+
299
+ Note: The custom display name to use for anonymous user can be provided through the `userDetails`.
300
+
301
+ ### Theme Customization
302
+
303
+ There are two ways to customize the look and feel of the Messaging UI.
304
+
305
+ #### Theme defined from Admin Console
306
+
307
+ Your account administrator can change the look and feel of the Messaging UI from Avaya Infinity™ Admin Console. When the Messaging UI is loaded, it will automatically fetch the theme defined in the Admin Console for the Web Chat Integration and uses it the default theme.
308
+
309
+ This option allows the account administrator to change the theme without requiring any changes to the client application code. However, the customization are limited to only to basic color options. To achieve more advanced customizations, you can use the [client side custom themes](#custom-themes-through-client-side-configuration).
310
+
311
+ > [!NOTE]
312
+ > Any changes made to the theme in the Admin Console will be reflected in the Messaging UI when the page is refreshed and the Messaging UI is loaded again.
313
+
314
+ #### Custom themes through client side configuration
315
+
316
+ The Messaging UI provides an extensive set of customization options like colors, fonts, icons etc. Developers can create multiple themes and pass them to the Messaging UI in the `themeCustomizations` in the [configuration](#configuration).
317
+
318
+ Themes can be changed at runtime by calling the static method `applyTheme()` on the class `AvayaInfinityOmniSdkMessagingUi` and passing the name of the desired theme.
319
+
320
+ You can switch back to the default theme by calling the static method `applyDefaultTheme()` on the class `AvayaInfinityOmniSdkMessagingUi`.
321
+
322
+ The [`MessagingUiTheme`](https://github.com/Avaya-Infinity/omni-sdk-web/types/_avaya_infinity_omni_sdk_messaging_ui.MessagingUiTheme.html) type exported by the Messaging UI provides the structure of the theme object and all available options that can be changed. The options are organized by the various areas in the UI.
323
+
324
+ > [!NOTE]
325
+ > Browsers on iOS devices may auto zoom on the input fields if their fontSize is less than `16px`. To avoid this behavior, the `fontSize` of the `textInput` field in the theme configuration should be set to `16px` or more.
326
+
327
+ #### Typing indicator customization
328
+
329
+ Messaging UI's typing indicator is composed of three parts namely the participant avatar(s), typing text and animation. They are displayed in the same order. The following customizations are available under the `typingIndicators` section of the `MessagingUiTheme` -
330
+
331
+ 1. Participant avatar(s): The participant avatars can be hidden by setting the `show` property of `participantAvatars` to `false`.
332
+
333
+ 2. Typing text: By default, the typing text will contain names of the participants who are typing. The participant names can be excluded from the typing text by setting the `show` property of `participantNames` to `false` in the `typingText` subsection.
334
+
335
+ 3. Animation: The color of the typing indicator animation can be customized by setting the `indicatorColor` property of `animation`.
336
+
337
+ ### Other utilities and methods
338
+
339
+ In this section we will cover the various utilities and methods provided by the Messaging UI apart from the ones already discussed in the previous sections.
340
+
341
+ #### Instance Properties
342
+
343
+ The Messaging UI provides the following properties on `AvayaInfinityOmniSdkMessagingUi` class instance:
344
+
345
+ - `loaded`: A boolean value indicating whether the Messaging UI is loaded or not. This is available on the instance of the `AvayaInfinityOmniSdkMessagingUi` class.
346
+
347
+ - `initialized`: A boolean value indicating whether the Messaging UI is initialized or not. This is available on the instance of the `AvayaInfinityOmniSdkMessagingUi` class.
348
+
349
+ #### Static Properties
350
+
351
+ The Messaging UI provides the following static properties on `AvayaInfinityOmniSdkMessagingUi` class:
352
+
353
+ - `currentThemeName`: The name of the current theme being used by the Messaging UI. This is available as a static property of the `AvayaInfinityOmniSdkMessagingUi` class.
354
+
355
+ #### Instance Methods
356
+
357
+ The Messaging UI provides the following methods on `AvayaInfinityOmniSdkMessagingUi` class instance:
358
+
359
+ - `minimize()`: Minimizes the Messaging UI to the messaging bubble. This is available as a static method of the `AvayaInfinityOmniSdkMessagingUi` class.
360
+ - `maximize()`: Maximizes the Messaging UI from the messaging bubble. This is available as a static method of the `AvayaInfinityOmniSdkMessagingUi` class. This method can be called only when the Messaging UI has been initialized.
361
+
362
+ #### Static Methods
363
+
364
+ The Messaging UI provides the following static methods on `AvayaInfinityOmniSdkMessagingUi` class:
365
+
366
+ - `setLogLevel()` : Sets the log level for the Messaging UI.
367
+ - `setShutdownListener()`: Sets the event handler callback that needs to be invoked when the Messaging UI is shutdown. This method will override the event handler callback that was provided in the configuration object passed to the `AvayaInfinityOmniSdkMessagingUi.load()` method.
368
+ - `setIdleTimeOutInvokedListener()`: Sets the event handler callback that needs to be invoked when the idle timeout is reached. This method will override the event handler callback that was provided in the configuration object passed to the `AvayaInfinityOmniSdkMessagingUi.load()` method.
369
+ - `setInitializedListener()`: Sets the event handler callback that needs to be invoked when the Messaging UI is initialized. This method will override the event handler callback that was provided in the configuration object passed to the `AvayaInfinityOmniSdkMessagingUi.load()` method.
370
+ - `clearShutdownListener()`: Clears the event handler callback that was attached to the Messaging UI shutdown event. This method will remove the event handler callback that was previously configured.
371
+ - `clearIdleTimeOutInvokedListener()`: Clears the event handler callback that was attached to the Messaging UI idle timeout event. This method will remove the event handler callback that was previously configured.
372
+ - `clearInitializedListener()`: Clears the event handler callback that was attached to the Messaging UI initialization event. This method will remove the event handler callback that was previously configured.