feat: APIs to filter reports (#2889)

Fixes #2823
This commit is contained in:
Tejaswini Chile 2021-08-27 22:46:32 +05:30 committed by GitHub
parent f94abaef5f
commit 65f3e83afd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 542 additions and 61 deletions

View file

@ -23,12 +23,13 @@ describe('#Reports API', () => {
1621621800
);
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/account',
'/api/v2/reports',
{
params: {
metric: 'conversations_count',
since: 1621103400,
until: 1621621800,
type: 'account'
},
}
);
@ -37,11 +38,12 @@ describe('#Reports API', () => {
it('#getAccountSummary', () => {
reportsAPI.getAccountSummary(1621103400, 1621621800);
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/account_summary',
'/api/v2/reports/summary',
{
params: {
since: 1621103400,
until: 1621621800,
type: 'account'
},
}
);