aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-07 10:53:35 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commit901bcf5c188ea79350fecd499ad76460b866617b (patch)
tree1e79f26cc3f2b952371d31bfa9b94a2b150be38a /shared/models
parentac907dc7c158056e9b6a5cb58acd27df5c7c2670 (diff)
downloadPeerTube-901bcf5c188ea79350fecd499ad76460b866617b.tar.gz
PeerTube-901bcf5c188ea79350fecd499ad76460b866617b.tar.zst
PeerTube-901bcf5c188ea79350fecd499ad76460b866617b.zip
Add ability to set start/end date to timeserie
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/videos/stats/index.ts4
-rw-r--r--shared/models/videos/stats/video-stats-timeserie-group-interval.type.ts1
-rw-r--r--shared/models/videos/stats/video-stats-timeserie-query.model.ts4
-rw-r--r--shared/models/videos/stats/video-stats-timeserie.model.ts4
4 files changed, 12 insertions, 1 deletions
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 @@
1export * from './video-stats-overall.model' 1export * from './video-stats-overall.model'
2export * from './video-stats-retention.model' 2export * from './video-stats-retention.model'
3export * from './video-stats-timeserie.model' 3export * from './video-stats-timeserie-group-interval.type'
4export * from './video-stats-timeserie-query.model'
4export * from './video-stats-timeserie-metric.type' 5export * from './video-stats-timeserie-metric.type'
6export * 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 @@
1export interface VideoStatsTimeserieQuery {
2 startDate?: string
3 endDate?: string
4}
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 @@
1import { VideoStatsTimeserieGroupInterval } from './video-stats-timeserie-group-interval.type'
2
1export interface VideoStatsTimeserie { 3export interface VideoStatsTimeserie {
4 groupInterval: VideoStatsTimeserieGroupInterval
5
2 data: { 6 data: {
3 date: string 7 date: string
4 value: number 8 value: number