feat(api-gateway): add analytics over time to daily report event

This commit is contained in:
Karol Sójko
2022-08-08 21:05:31 +02:00
parent 31c849cc2d
commit 845f08b060
2 changed files with 18 additions and 0 deletions
+10
View File
@@ -55,6 +55,16 @@ const requestReport = async (
),
},
],
activityStatisticsOverTime: [
{
name: AnalyticsActivity.GeneralActivity,
period: Period.Last30Days,
counts: await analyticsStore.calculateActivityChangesTotalCount(
AnalyticsActivity.GeneralActivity,
Period.Last30Days,
),
},
],
},
}
@@ -12,5 +12,13 @@ export interface DailyAnalyticsReportGeneratedEventPayload {
retention: number
totalCount: number
}>
activityStatisticsOverTime: Array<{
name: string
period: number
counts: Array<{
periodKey: string
totalCount: number
}>
}>
outOfSyncIncidents: number
}