From 901bcf5c188ea79350fecd499ad76460b866617b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Apr 2022 10:53:35 +0200 Subject: Add ability to set start/end date to timeserie --- shared/models/videos/stats/index.ts | 4 +++- .../models/videos/stats/video-stats-timeserie-group-interval.type.ts | 1 + shared/models/videos/stats/video-stats-timeserie-query.model.ts | 4 ++++ shared/models/videos/stats/video-stats-timeserie.model.ts | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 shared/models/videos/stats/video-stats-timeserie-group-interval.type.ts create mode 100644 shared/models/videos/stats/video-stats-timeserie-query.model.ts (limited to 'shared/models') diff --git a/shared/models/videos/stats/index.ts b/shared/models/videos/stats/index.ts index d1e9c167c..5c4c9df2a 100644 --- a/shared/models/videos/stats/index.ts +++ b/shared/models/videos/stats/index.ts @@ -1,4 +1,6 @@ export * from './video-stats-overall.model' export * from './video-stats-retention.model' -export * from './video-stats-timeserie.model' +export * from './video-stats-timeserie-group-interval.type' +export * from './video-stats-timeserie-query.model' export * from './video-stats-timeserie-metric.type' +export * from './video-stats-timeserie.model' diff --git a/shared/models/videos/stats/video-stats-timeserie-group-interval.type.ts b/shared/models/videos/stats/video-stats-timeserie-group-interval.type.ts new file mode 100644 index 000000000..9609ecb72 --- /dev/null +++ b/shared/models/videos/stats/video-stats-timeserie-group-interval.type.ts @@ -0,0 +1 @@ +export type VideoStatsTimeserieGroupInterval = 'one_day' | 'one_hour' | 'ten_minutes' | 'one_minute' diff --git a/shared/models/videos/stats/video-stats-timeserie-query.model.ts b/shared/models/videos/stats/video-stats-timeserie-query.model.ts new file mode 100644 index 000000000..f3a8430e1 --- /dev/null +++ b/shared/models/videos/stats/video-stats-timeserie-query.model.ts @@ -0,0 +1,4 @@ +export interface VideoStatsTimeserieQuery { + startDate?: string + endDate?: string +} diff --git a/shared/models/videos/stats/video-stats-timeserie.model.ts b/shared/models/videos/stats/video-stats-timeserie.model.ts index d95e34f1d..99bbbe2e3 100644 --- a/shared/models/videos/stats/video-stats-timeserie.model.ts +++ b/shared/models/videos/stats/video-stats-timeserie.model.ts @@ -1,4 +1,8 @@ +import { VideoStatsTimeserieGroupInterval } from './video-stats-timeserie-group-interval.type' + export interface VideoStatsTimeserie { + groupInterval: VideoStatsTimeserieGroupInterval + data: { date: string value: number -- cgit v1.2.3