Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/contact-center/store/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class Store implements IStore {
this.isAddressBookEnabled = Boolean(response.addressBookId);
this.allowConsultToQueue = response.allowConsultToQueue;
this.agentProfile.agentName = response.agentName;
this.agentProfile.isTimeoutDesktopInactivityEnabled = response.isTimeoutDesktopInactivityEnabled;
this.agentProfile.timeoutDesktopInactivityMins = response.timeoutDesktopInactivityMins;
this.dataCenter = (response as {environment?: string}).environment || '';
})
.catch((error) => {
Expand Down
2 changes: 2 additions & 0 deletions packages/contact-center/store/src/store.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ type AgentLoginProfile = {
social: number;
telephony: number;
};
isTimeoutDesktopInactivityEnabled?: boolean;
timeoutDesktopInactivityMins?: number;
};

// Generic pagination params for list-fetching APIs
Expand Down
2 changes: 2 additions & 0 deletions packages/contact-center/store/src/storeEventsWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ class StoreWrapper implements IStoreWrapper {
orgId: profile.orgId || undefined,
roles: profile.roles || undefined,
deviceType: profile.deviceType || undefined,
isTimeoutDesktopInactivityEnabled: profile.isTimeoutDesktopInactivityEnabled || undefined,
Comment thread
zachraymer marked this conversation as resolved.
timeoutDesktopInactivityMins: profile.timeoutDesktopInactivityMins || undefined,
};
});
};
Expand Down
8 changes: 7 additions & 1 deletion packages/contact-center/store/tests/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ describe('Store', () => {
lastStateChangeTimestamp: date,
agentName: mockAgentName,
environment: 'produs1',
isTimeoutDesktopInactivityEnabled: true,
timeoutDesktopInactivityMins: 15,
};
mockWebex.cc.register.mockResolvedValue(mockResponse);

Expand All @@ -104,7 +106,11 @@ describe('Store', () => {
expect(storeInstance.deviceType).toEqual(mockResponse.deviceType);
expect(storeInstance.currentState).toEqual(mockResponse.lastStateAuxCodeId);
expect(storeInstance.lastStateChangeTimestamp).toEqual(date);
expect(storeInstance.agentProfile).toEqual({agentName: mockAgentName});
expect(storeInstance.agentProfile).toEqual({
agentName: mockAgentName,
isTimeoutDesktopInactivityEnabled: true,
timeoutDesktopInactivityMins: 15,
});
expect(storeInstance.dataCenter).toEqual(mockResponse.environment);
});

Expand Down
2 changes: 2 additions & 0 deletions packages/contact-center/store/tests/storeEventsWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ const mockAgentProfile = {
roles: ['agent'],
orgId: 'mockOrgId',
profileType: 'BLENDED',
isTimeoutDesktopInactivityEnabled: true,
timeoutDesktopInactivityMins: 30,
};

const mockAgentProfilePayload = {
Expand Down
Loading