-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: front and back ws analytics query and ui (#234)
- Loading branch information
Showing
25 changed files
with
1,676 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
import type { CountryCode } from "../../../CountryCode"; | ||
import type { ZZ } from "./ZZ"; | ||
|
||
export type CountryCodeOrZZ = ZZ | CountryCode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
import type { Analytics } from "../../../app-analytics/Analytics"; | ||
|
||
export type Output = { analytics: Analytics }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
import type { AnalyticsQueryKind } from "../../../app-analytics/AnalyticsQueryKind"; | ||
import type { CountryCodeOrZZ } from "./CountryCodeOrZZ"; | ||
|
||
export type Query = { | ||
kind: AnalyticsQueryKind; | ||
stations: string[] | undefined; | ||
app_kind: string | null; | ||
app_version: string | null; | ||
country_code: CountryCodeOrZZ | null; | ||
min_duration_ms?: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type ZZ = "ZZ"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
import type { AnalyticsItem } from "./AnalyticsItem"; | ||
import type { AnalyticsQueryKind } from "./AnalyticsQueryKind"; | ||
import type { AnalyticsStation } from "./AnalyticsStation"; | ||
import type { AppKindVersion } from "./AppKindVersion"; | ||
import type { CountryCode } from "../CountryCode"; | ||
import type { DateTime } from "../DateTime"; | ||
import type { YearMonthDay } from "./YearMonthDay"; | ||
import type { YearMonthDayHour } from "./YearMonthDayHour"; | ||
|
||
export type Analytics = { | ||
is_now: boolean; | ||
kind: AnalyticsQueryKind; | ||
stations: Array<AnalyticsStation>; | ||
since: /** time::DateTime */ string; | ||
until: /** time::DateTime */ string; | ||
utc_offset_minutes: number; | ||
sessions: number; | ||
ips: number; | ||
total_duration_ms: number; | ||
max_concurrent_listeners?: number; | ||
max_concurrent_listeners_date?: DateTime; | ||
by_day: Array<AnalyticsItem<YearMonthDay>>; | ||
by_hour: Array<AnalyticsItem<YearMonthDayHour>> | null; | ||
by_country: Array<AnalyticsItem<CountryCode | null>>; | ||
by_station: Array<AnalyticsItem<string>>; | ||
by_app_kind: Array<AnalyticsItem<string | null>>; | ||
by_app_version: Array<AnalyticsItem<AppKindVersion>>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
import type { DateTime } from "../DateTime"; | ||
|
||
export type AnalyticsItem<K> = { | ||
key: K; | ||
sessions: number; | ||
ips: number; | ||
total_duration_ms: number; | ||
total_transfer_bytes: number; | ||
max_concurrent_listeners?: number; | ||
max_concurrent_listeners_date?: DateTime; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type AnalyticsQueryKind = { | ||
now: { offset_date: /** time::DateTime */ string }; | ||
} | { | ||
time_range: { | ||
since: /** time::DateTime */ string; | ||
until: /** time::DateTime */ string; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
import type { DateTime } from "../DateTime"; | ||
|
||
export type AnalyticsStation = { | ||
_id: string; | ||
name: string; | ||
created_at: DateTime; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type AppKindVersion = { kind: string | null; version: number | null }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type YearMonthDay = { year: number; month: number; day: number }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. | ||
|
||
export type YearMonthDayHour = { | ||
year: number; | ||
month: number; | ||
day: number; | ||
hour: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.