@webex/contact-center 3.12.0-task-refactor.12 → 3.12.0-webex-services-ready.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.
Files changed (38) hide show
  1. package/dist/cc.js +32 -0
  2. package/dist/cc.js.map +1 -1
  3. package/dist/index.js +7 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/metrics/behavioral-events.js +49 -0
  6. package/dist/metrics/behavioral-events.js.map +1 -1
  7. package/dist/metrics/constants.js +10 -1
  8. package/dist/metrics/constants.js.map +1 -1
  9. package/dist/services/UserPreference.js +427 -0
  10. package/dist/services/UserPreference.js.map +1 -0
  11. package/dist/services/config/constants.js +22 -1
  12. package/dist/services/config/constants.js.map +1 -1
  13. package/dist/services/config/types.js +20 -0
  14. package/dist/services/config/types.js.map +1 -1
  15. package/dist/types/cc.d.ts +31 -0
  16. package/dist/types/index.d.ts +10 -1
  17. package/dist/types/metrics/constants.d.ts +8 -0
  18. package/dist/types/services/UserPreference.d.ts +118 -0
  19. package/dist/types/services/config/constants.d.ts +21 -0
  20. package/dist/types/services/config/types.d.ts +48 -0
  21. package/dist/types.js.map +1 -1
  22. package/dist/webex.js +1 -1
  23. package/package.json +9 -9
  24. package/src/cc.ts +33 -0
  25. package/src/index.ts +9 -0
  26. package/src/metrics/behavioral-events.ts +50 -0
  27. package/src/metrics/constants.ts +10 -0
  28. package/src/services/UserPreference.ts +509 -0
  29. package/src/services/config/constants.ts +24 -0
  30. package/src/services/config/types.ts +52 -0
  31. package/src/types.ts +9 -2
  32. package/test/unit/spec/cc.ts +1 -6
  33. package/test/unit/spec/services/UserPreference.ts +401 -0
  34. package/test/unit/spec/services/core/Utils.ts +1 -1
  35. package/test/unit/spec/services/core/websocket/WebSocketManager.ts +1 -0
  36. package/test/unit/spec/services/task/TaskManager.ts +143 -2316
  37. package/umd/contact-center.min.js +2 -2
  38. package/umd/contact-center.min.js.map +1 -1
@@ -0,0 +1,509 @@
1
+ import {HTTP_METHODS, WebexSDK} from '../types';
2
+ import type {
3
+ UserPreference as UserPreferenceResponse,
4
+ CreateUserPreferenceRequest,
5
+ UpdateUserPreferenceRequest,
6
+ GetUserPreferenceParams,
7
+ } from './config/types';
8
+ import LoggerProxy from '../logger-proxy';
9
+ import WebexRequest from './core/WebexRequest';
10
+ import MetricsManager from '../metrics/MetricsManager';
11
+ import {WCC_API_GATEWAY} from './constants';
12
+ import {endPointMap} from './config/constants';
13
+ import {METRIC_EVENT_NAMES} from '../metrics/constants';
14
+
15
+ /**
16
+ * UserPreference API class for managing Webex Contact Center user preferences.
17
+ * Provides functionality to get, create, update, and delete user preferences.
18
+ *
19
+ * @class UserPreference
20
+ * @public
21
+ * @example
22
+ * ```typescript
23
+ * import Webex from 'webex';
24
+ *
25
+ * const webex = new Webex({ credentials: 'YOUR_ACCESS_TOKEN' });
26
+ * const cc = webex.cc;
27
+ *
28
+ * // Register and login first
29
+ * await cc.register();
30
+ * await cc.stationLogin({ teamId: 'team123', loginOption: 'BROWSER' });
31
+ *
32
+ * // Get UserPreference API instance from ContactCenter
33
+ * const userPreferenceAPI = cc.userPreference;
34
+ *
35
+ * // Get user preferences for the current user
36
+ * const preferences = await userPreferenceAPI.getUserPreference();
37
+ *
38
+ * // Create new user preferences
39
+ * const newPreferences = await userPreferenceAPI.createUserPreference({
40
+ * userId: 'user123',
41
+ * preferences: { e911Reminder: true }
42
+ * });
43
+ *
44
+ * // Update user preferences
45
+ * const updatedPreferences = await userPreferenceAPI.updateUserPreference('user123', {
46
+ * preferences: { e911Reminder: false }
47
+ * });
48
+ *
49
+ * // Delete user preferences
50
+ * await userPreferenceAPI.deleteUserPreference('user123');
51
+ * ```
52
+ */
53
+ export class UserPreference {
54
+ private webexRequest: WebexRequest;
55
+ private webex: WebexSDK;
56
+ private getUserId: () => string;
57
+ private metricsManager: MetricsManager;
58
+
59
+ /**
60
+ * Creates an instance of UserPreference
61
+ * @param {WebexSDK} webex - The Webex SDK instance
62
+ * @param {() => string} getUserId - Function to get the current user's CI user ID
63
+ * @public
64
+ */
65
+ constructor(webex: WebexSDK, getUserId: () => string) {
66
+ this.webex = webex;
67
+ this.webexRequest = WebexRequest.getInstance({webex});
68
+ this.getUserId = getUserId;
69
+ this.metricsManager = MetricsManager.getInstance({webex});
70
+ }
71
+
72
+ /**
73
+ * Fetches user preferences for a specific user
74
+ * @param {GetUserPreferenceParams} [params] - Optional parameters for fetching preferences
75
+ * @param {string} [params.userId] - User ID to fetch preferences for. Defaults to current user's CI user ID.
76
+ * @param {number} [params.page=0] - Page number (0-indexed). Default: 0
77
+ * @param {number} [params.pageSize=100] - Number of items per page. Default: 100
78
+ * @returns {Promise<UserPreferenceResponse>} Promise resolving to user preferences
79
+ * @throws {Error} If the API call fails
80
+ * @public
81
+ * @example
82
+ * ```typescript
83
+ * // Get preferences for current user
84
+ * const preferences = await userPreferenceAPI.getUserPreference();
85
+ *
86
+ * // Get preferences for a specific user
87
+ * const preferences = await userPreferenceAPI.getUserPreference({ userId: 'user123' });
88
+ *
89
+ * // Get preferences with pagination
90
+ * const preferences = await userPreferenceAPI.getUserPreference({ page: 0, pageSize: 50 });
91
+ * ```
92
+ */
93
+ public async getUserPreference(
94
+ params?: GetUserPreferenceParams
95
+ ): Promise<UserPreferenceResponse> {
96
+ const {userId, page, pageSize} = params || {};
97
+ const targetUserId = userId || this.getUserId();
98
+ const orgId = this.webex.credentials.getOrgId();
99
+
100
+ LoggerProxy.info('Fetching user preferences', {
101
+ module: 'UserPreference',
102
+ method: 'getUserPreference',
103
+ data: {
104
+ orgId,
105
+ userId: targetUserId,
106
+ page,
107
+ pageSize,
108
+ },
109
+ });
110
+
111
+ if (!targetUserId) {
112
+ LoggerProxy.error('getUserPreference called without a valid userId', {
113
+ module: 'UserPreference',
114
+ method: 'getUserPreference',
115
+ data: {
116
+ orgId,
117
+ userId: targetUserId,
118
+ error: 'Missing userId. Ensure user is logged in or provide a userId.',
119
+ },
120
+ });
121
+
122
+ throw new Error('UserPreference: userId is not available.');
123
+ }
124
+
125
+ try {
126
+ let resource = endPointMap.userPreference(orgId, targetUserId);
127
+
128
+ // Build query parameters if provided
129
+ const queryParams: string[] = [];
130
+ if (page !== undefined) queryParams.push(`page=${page}`);
131
+ if (pageSize !== undefined) queryParams.push(`pageSize=${pageSize}`);
132
+ if (queryParams.length > 0) {
133
+ resource = `${resource}?${queryParams.join('&')}`;
134
+ }
135
+
136
+ LoggerProxy.info('Making API request to fetch user preferences', {
137
+ module: 'UserPreference',
138
+ method: 'getUserPreference',
139
+ data: {
140
+ resource,
141
+ service: WCC_API_GATEWAY,
142
+ },
143
+ });
144
+
145
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_GET_SUCCESS);
146
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_GET_FAILED);
147
+
148
+ const response = await this.webexRequest.request({
149
+ service: WCC_API_GATEWAY,
150
+ resource,
151
+ method: HTTP_METHODS.GET,
152
+ });
153
+
154
+ LoggerProxy.info('Successfully retrieved user preferences', {
155
+ module: 'UserPreference',
156
+ method: 'getUserPreference',
157
+ data: {
158
+ statusCode: response.statusCode,
159
+ userId: targetUserId,
160
+ },
161
+ });
162
+
163
+ this.metricsManager.trackEvent(
164
+ METRIC_EVENT_NAMES.USER_PREFERENCE_GET_SUCCESS,
165
+ {
166
+ orgId,
167
+ userId: targetUserId,
168
+ statusCode: response.statusCode,
169
+ },
170
+ ['behavioral', 'operational']
171
+ );
172
+
173
+ return response.body;
174
+ } catch (error) {
175
+ const errorData = {
176
+ orgId,
177
+ userId: targetUserId,
178
+ error: error instanceof Error ? error.message : String(error),
179
+ };
180
+
181
+ LoggerProxy.error('Failed to fetch user preferences', {
182
+ module: 'UserPreference',
183
+ method: 'getUserPreference',
184
+ data: errorData,
185
+ error,
186
+ });
187
+
188
+ this.metricsManager.trackEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_GET_FAILED, errorData, [
189
+ 'behavioral',
190
+ 'operational',
191
+ ]);
192
+
193
+ throw error;
194
+ }
195
+ }
196
+
197
+ /**
198
+ * Creates new user preferences
199
+ * @param {CreateUserPreferenceRequest} data - The user preference data to create
200
+ * @returns {Promise<UserPreference>} Promise resolving to created user preferences
201
+ * @throws {Error} If the API call fails
202
+ * @public
203
+ * @example
204
+ * ```typescript
205
+ * const newPreferences = await userPreferenceAPI.createUserPreference({
206
+ * userId: 'user123',
207
+ * preferences: { e911Reminder: true, notificationSettings: { email: true } }
208
+ * });
209
+ * ```
210
+ */
211
+ public async createUserPreference(
212
+ data: CreateUserPreferenceRequest
213
+ ): Promise<UserPreferenceResponse> {
214
+ const orgId = this.webex.credentials.getOrgId();
215
+
216
+ LoggerProxy.info('Creating user preferences', {
217
+ module: 'UserPreference',
218
+ method: 'createUserPreference',
219
+ data: {
220
+ orgId,
221
+ userId: data.userId,
222
+ },
223
+ });
224
+
225
+ if (!data.userId) {
226
+ LoggerProxy.error('createUserPreference called without a valid userId', {
227
+ module: 'UserPreference',
228
+ method: 'createUserPreference',
229
+ data: {
230
+ orgId,
231
+ error: 'Missing userId in request data.',
232
+ },
233
+ });
234
+
235
+ throw new Error('UserPreference: userId is required to create user preferences.');
236
+ }
237
+
238
+ try {
239
+ const resource = endPointMap.userPreferenceCreate(orgId);
240
+
241
+ LoggerProxy.info('Making API request to create user preferences', {
242
+ module: 'UserPreference',
243
+ method: 'createUserPreference',
244
+ data: {
245
+ resource,
246
+ service: WCC_API_GATEWAY,
247
+ },
248
+ });
249
+
250
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_CREATE_SUCCESS);
251
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_CREATE_FAILED);
252
+
253
+ const response = await this.webexRequest.request({
254
+ service: WCC_API_GATEWAY,
255
+ resource,
256
+ method: HTTP_METHODS.POST,
257
+ body: data,
258
+ });
259
+
260
+ LoggerProxy.info('Successfully created user preferences', {
261
+ module: 'UserPreference',
262
+ method: 'createUserPreference',
263
+ data: {
264
+ statusCode: response.statusCode,
265
+ userId: data.userId,
266
+ },
267
+ });
268
+
269
+ this.metricsManager.trackEvent(
270
+ METRIC_EVENT_NAMES.USER_PREFERENCE_CREATE_SUCCESS,
271
+ {
272
+ orgId,
273
+ userId: data.userId,
274
+ statusCode: response.statusCode,
275
+ },
276
+ ['behavioral', 'operational']
277
+ );
278
+
279
+ return response.body;
280
+ } catch (error) {
281
+ const errorData = {
282
+ orgId,
283
+ userId: data.userId,
284
+ error: error instanceof Error ? error.message : String(error),
285
+ };
286
+
287
+ LoggerProxy.error('Failed to create user preferences', {
288
+ module: 'UserPreference',
289
+ method: 'createUserPreference',
290
+ data: errorData,
291
+ error,
292
+ });
293
+
294
+ this.metricsManager.trackEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_CREATE_FAILED, errorData, [
295
+ 'behavioral',
296
+ 'operational',
297
+ ]);
298
+
299
+ throw error;
300
+ }
301
+ }
302
+
303
+ /**
304
+ * Updates existing user preferences
305
+ * @param {string} userId - User ID to update preferences for
306
+ * @param {UpdateUserPreferenceRequest} data - The user preference data to update
307
+ * @returns {Promise<UserPreference>} Promise resolving to updated user preferences
308
+ * @throws {Error} If the API call fails
309
+ * @public
310
+ * @example
311
+ * ```typescript
312
+ * const updatedPreferences = await userPreferenceAPI.updateUserPreference('user123', {
313
+ * preferences: { e911Reminder: false }
314
+ * });
315
+ * ```
316
+ */
317
+ public async updateUserPreference(
318
+ userId: string,
319
+ data: UpdateUserPreferenceRequest
320
+ ): Promise<UserPreferenceResponse> {
321
+ const orgId = this.webex.credentials.getOrgId();
322
+
323
+ LoggerProxy.info('Updating user preferences', {
324
+ module: 'UserPreference',
325
+ method: 'updateUserPreference',
326
+ data: {
327
+ orgId,
328
+ userId,
329
+ },
330
+ });
331
+
332
+ if (!userId) {
333
+ LoggerProxy.error('updateUserPreference called without a valid userId', {
334
+ module: 'UserPreference',
335
+ method: 'updateUserPreference',
336
+ data: {
337
+ orgId,
338
+ error: 'Missing userId parameter.',
339
+ },
340
+ });
341
+
342
+ throw new Error('UserPreference: userId is required to update user preferences.');
343
+ }
344
+
345
+ try {
346
+ const resource = endPointMap.userPreference(orgId, userId);
347
+
348
+ LoggerProxy.info('Making API request to update user preferences', {
349
+ module: 'UserPreference',
350
+ method: 'updateUserPreference',
351
+ data: {
352
+ resource,
353
+ service: WCC_API_GATEWAY,
354
+ },
355
+ });
356
+
357
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_UPDATE_SUCCESS);
358
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_UPDATE_FAILED);
359
+
360
+ const response = await this.webexRequest.request({
361
+ service: WCC_API_GATEWAY,
362
+ resource,
363
+ method: HTTP_METHODS.PUT,
364
+ body: data,
365
+ });
366
+
367
+ LoggerProxy.info('Successfully updated user preferences', {
368
+ module: 'UserPreference',
369
+ method: 'updateUserPreference',
370
+ data: {
371
+ statusCode: response.statusCode,
372
+ userId,
373
+ },
374
+ });
375
+
376
+ this.metricsManager.trackEvent(
377
+ METRIC_EVENT_NAMES.USER_PREFERENCE_UPDATE_SUCCESS,
378
+ {
379
+ orgId,
380
+ userId,
381
+ statusCode: response.statusCode,
382
+ },
383
+ ['behavioral', 'operational']
384
+ );
385
+
386
+ return response.body;
387
+ } catch (error) {
388
+ const errorData = {
389
+ orgId,
390
+ userId,
391
+ error: error instanceof Error ? error.message : String(error),
392
+ };
393
+
394
+ LoggerProxy.error('Failed to update user preferences', {
395
+ module: 'UserPreference',
396
+ method: 'updateUserPreference',
397
+ data: errorData,
398
+ error,
399
+ });
400
+
401
+ this.metricsManager.trackEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_UPDATE_FAILED, errorData, [
402
+ 'behavioral',
403
+ 'operational',
404
+ ]);
405
+
406
+ throw error;
407
+ }
408
+ }
409
+
410
+ /**
411
+ * Deletes user preferences for a specific user
412
+ * @param {string} userId - User ID to delete preferences for
413
+ * @returns {Promise<void>} Promise resolving when deletion is complete
414
+ * @throws {Error} If the API call fails
415
+ * @public
416
+ * @example
417
+ * ```typescript
418
+ * await userPreferenceAPI.deleteUserPreference('user123');
419
+ * ```
420
+ */
421
+ public async deleteUserPreference(userId: string): Promise<void> {
422
+ const orgId = this.webex.credentials.getOrgId();
423
+
424
+ LoggerProxy.info('Deleting user preferences', {
425
+ module: 'UserPreference',
426
+ method: 'deleteUserPreference',
427
+ data: {
428
+ orgId,
429
+ userId,
430
+ },
431
+ });
432
+
433
+ if (!userId) {
434
+ LoggerProxy.error('deleteUserPreference called without a valid userId', {
435
+ module: 'UserPreference',
436
+ method: 'deleteUserPreference',
437
+ data: {
438
+ orgId,
439
+ error: 'Missing userId parameter.',
440
+ },
441
+ });
442
+
443
+ throw new Error('UserPreference: userId is required to delete user preferences.');
444
+ }
445
+
446
+ try {
447
+ const resource = endPointMap.userPreference(orgId, userId);
448
+
449
+ LoggerProxy.info('Making API request to delete user preferences', {
450
+ module: 'UserPreference',
451
+ method: 'deleteUserPreference',
452
+ data: {
453
+ resource,
454
+ service: WCC_API_GATEWAY,
455
+ },
456
+ });
457
+
458
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_DELETE_SUCCESS);
459
+ this.metricsManager.timeEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_DELETE_FAILED);
460
+
461
+ const response = await this.webexRequest.request({
462
+ service: WCC_API_GATEWAY,
463
+ resource,
464
+ method: HTTP_METHODS.DELETE,
465
+ });
466
+
467
+ LoggerProxy.info('Successfully deleted user preferences', {
468
+ module: 'UserPreference',
469
+ method: 'deleteUserPreference',
470
+ data: {
471
+ statusCode: response.statusCode,
472
+ userId,
473
+ },
474
+ });
475
+
476
+ this.metricsManager.trackEvent(
477
+ METRIC_EVENT_NAMES.USER_PREFERENCE_DELETE_SUCCESS,
478
+ {
479
+ orgId,
480
+ userId,
481
+ statusCode: response.statusCode,
482
+ },
483
+ ['behavioral', 'operational']
484
+ );
485
+ } catch (error) {
486
+ const errorData = {
487
+ orgId,
488
+ userId,
489
+ error: error instanceof Error ? error.message : String(error),
490
+ };
491
+
492
+ LoggerProxy.error('Failed to delete user preferences', {
493
+ module: 'UserPreference',
494
+ method: 'deleteUserPreference',
495
+ data: errorData,
496
+ error,
497
+ });
498
+
499
+ this.metricsManager.trackEvent(METRIC_EVENT_NAMES.USER_PREFERENCE_DELETE_FAILED, errorData, [
500
+ 'behavioral',
501
+ 'operational',
502
+ ]);
503
+
504
+ throw error;
505
+ }
506
+ }
507
+ }
508
+
509
+ export default UserPreference;
@@ -298,4 +298,28 @@ export const endPointMap = {
298
298
  `organization/${orgId}/v2/outdial-ani/${outdialANI}/entry${
299
299
  queryParams ? `?${queryParams}` : ''
300
300
  }`,
301
+
302
+ /**
303
+ * Gets the endpoint for user preference by user ID.
304
+ * @param orgId - Organization ID.
305
+ * @param userId - User ID.
306
+ * @returns The endpoint URL string.
307
+ * @public
308
+ * @example
309
+ * const url = endPointMap.userPreference('org123', 'user456');
310
+ * @ignore
311
+ */
312
+ userPreference: (orgId: string, userId: string) =>
313
+ `organization/${orgId}/user-preference/${userId}`,
314
+
315
+ /**
316
+ * Gets the endpoint for creating user preference.
317
+ * @param orgId - Organization ID.
318
+ * @returns The endpoint URL string.
319
+ * @public
320
+ * @example
321
+ * const url = endPointMap.userPreferenceCreate('org123');
322
+ * @ignore
323
+ */
324
+ userPreferenceCreate: (orgId: string) => `organization/${orgId}/user-preference`,
301
325
  };
@@ -1294,3 +1294,55 @@ export type OutdialAniParams = {
1294
1294
  /** Comma-separated list of attributes to include in response (optional) */
1295
1295
  attributes?: string;
1296
1296
  };
1297
+
1298
+ /**
1299
+ * User preference data structure
1300
+ * @public
1301
+ */
1302
+ export type UserPreference = {
1303
+ /** Unique identifier for the user preference */
1304
+ id: string;
1305
+ /** Organization ID */
1306
+ organizationId: string;
1307
+ /** User ID (CI user ID) */
1308
+ userId: string;
1309
+ /** User preference data as key-value pairs */
1310
+ preferences: Record<string, unknown>;
1311
+ /** Timestamp when this preference was created (Unix timestamp in milliseconds) */
1312
+ createdTime?: number;
1313
+ /** Timestamp when this preference was last updated (Unix timestamp in milliseconds) */
1314
+ lastUpdatedTime?: number;
1315
+ };
1316
+
1317
+ /**
1318
+ * Request payload for creating user preferences
1319
+ * @public
1320
+ */
1321
+ export type CreateUserPreferenceRequest = {
1322
+ /** User ID (CI user ID) */
1323
+ userId: string;
1324
+ /** Desktop preference data as a JSON string (required) */
1325
+ desktopPreference: string;
1326
+ };
1327
+
1328
+ /**
1329
+ * Request payload for updating user preferences
1330
+ * @public
1331
+ */
1332
+ export type UpdateUserPreferenceRequest = {
1333
+ /** Desktop preference data as a JSON string (required) */
1334
+ desktopPreference: string;
1335
+ };
1336
+
1337
+ /**
1338
+ * Query parameters for fetching user preferences
1339
+ * @public
1340
+ */
1341
+ export type GetUserPreferenceParams = {
1342
+ /** User ID to fetch preferences for. Defaults to current user's CI user ID. */
1343
+ userId?: string;
1344
+ /** Page number (0-indexed). Default: 0 */
1345
+ page?: number;
1346
+ /** Number of items per page. Default: 100 */
1347
+ pageSize?: number;
1348
+ };
package/src/types.ts CHANGED
@@ -6,7 +6,12 @@ import {
6
6
  } from '@webex/internal-plugin-metrics/src/metrics.types';
7
7
  import * as Agent from './services/agent/types';
8
8
  import * as Contact from './services/task/types';
9
- import {AIFeatureFlags, Profile} from './services/config/types';
9
+ import {
10
+ AIFeatureFlags,
11
+ Profile,
12
+ CreateUserPreferenceRequest,
13
+ UpdateUserPreferenceRequest,
14
+ } from './services/config/types';
10
15
  import {PaginatedResponse, BaseSearchParams} from './utils/PageCache';
11
16
 
12
17
  /**
@@ -544,7 +549,9 @@ export type RequestBody =
544
549
  | Contact.cancelCtq
545
550
  | Contact.WrapupPayLoad
546
551
  | Contact.DialerPayload
547
- | Contact.PreviewContactPayload;
552
+ | Contact.PreviewContactPayload
553
+ | CreateUserPreferenceRequest
554
+ | UpdateUserPreferenceRequest;
548
555
 
549
556
  /**
550
557
  * Represents the options to fetch buddy agents for the logged in agent.
@@ -403,12 +403,7 @@ describe('webex.cc', () => {
403
403
  isEndConsultEnabled: mockAgentProfile.isEndConsultEnabled,
404
404
  webRtcEnabled: mockAgentProfile.webRtcEnabled,
405
405
  autoWrapup: mockAgentProfile.wrapUpData.wrapUpProps.autoWrapup ?? false,
406
- });
407
- expect(mockTaskManager.setConfigFlags).toHaveBeenCalledWith({
408
- isEndTaskEnabled: mockAgentProfile.isEndTaskEnabled,
409
- isEndConsultEnabled: mockAgentProfile.isEndConsultEnabled,
410
- webRtcEnabled: mockAgentProfile.webRtcEnabled,
411
- autoWrapup: mockAgentProfile.wrapUpData.wrapUpProps.autoWrapup ?? false,
406
+ aiFeature: mockAgentProfile.aiFeature,
412
407
  });
413
408
  expect(reloadSpy).toHaveBeenCalled();
414
409
  expect(result).toEqual(mockAgentProfile);