-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
113 lines (99 loc) · 2.06 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
export interface Song {
id: number;
name: string | null;
thumbnail_url: string | null;
artist: Artist;
}
export interface Artist {
id: number;
name: string | null;
thumbnail_url: string | null;
}
export interface StationNowPlaying {
id: number;
timestamp: string;
song: Song | null;
}
export interface StationUptime {
is_up?: boolean;
latencyMs?: number;
statusMessage?: string;
rawData?: any;
}
export interface Post {
id: number;
title: string;
description: string;
link: string;
published: string;
}
export interface StationReview {
id: number;
stars: number;
message: string | null;
}
// TODO: update the below types with the added fields
export interface Station {
id: number;
slug: string;
order: number;
title: string;
website: string | null;
email: string | null;
stream_url: string;
proxy_stream_url: string;
hls_stream_url: string;
thumbnail_url: string | null;
total_listeners: number;
description: string | null;
description_action_title: string | null;
description_link: string | null;
feature_latest_post: boolean;
facebook_page_id: string | null;
posts: Post[];
uptime?: StationUptime;
now_playing?: StationNowPlaying;
reviews: StationReview[];
}
export interface StationGroup {
id: number;
slug: string;
name: string;
order: number;
station_to_station_groups: {
station_id: number;
}[];
}
export interface StationsMetadata {
station_groups: StationGroup[];
stations: Station[];
}
export interface Review {
user_name: String | null;
ip_address: String;
session_id: String;
station_id: bigint;
stars: number;
message: String | null;
}
export interface ClientSideReview {
user_name: String | null;
station_id: bigint;
stars: number;
message: String | null;
}
export interface ListeningEvent {
ip_address: String | null;
session_id: String;
station_id: bigint;
info: any;
}
export interface ClientSideListeningEvent {
station_id: bigint;
info: any;
}
export interface SeoMetadata {
title: string;
description?: string;
keywords?: string;
}