feat: Add reports about live agent load (#4537)

* feat: Add reports about live agent load
This commit is contained in:
Aswin Dev P.S
2022-04-25 20:04:41 +05:30
committed by GitHub
parent 899176a793
commit 676796ddc7
28 changed files with 758 additions and 48 deletions

View File

@@ -44,6 +44,15 @@ class ReportsAPI extends ApiClient {
});
}
getConversationMetric(type = 'account', page = 1) {
return axios.get(`${this.url}/conversations`, {
params: {
type,
page,
},
});
}
getAgentReports(since, until) {
return axios.get(`${this.url}/agents`, {
params: { since, until },

View File

@@ -97,5 +97,18 @@ describe('#Reports API', () => {
}
);
});
it('#getConversationMetric', () => {
reportsAPI.getConversationMetric('account');
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/conversations',
{
params: {
type: 'account',
page: 1,
},
}
);
});
});
});