-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
32 lines (30 loc) · 831 Bytes
/
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
export interface AirPollutionEntry {
dt: number;
main: {
aqi: number;
};
components: {
co: number;
no: number;
no2: number;
o3: number;
so2: number;
pm2_5: number;
pm10: number;
nh3: number;
};
}
export interface AirPollutionResponse {
coord: number[];
list: AirPollutionEntry[];
}
export const LONDON_LAT = 51.52551620;
export const LONDON_LON = 0.03521630;
const TOPIC = "airPollutionTopic";
export const DATA_KEY = [TOPIC, "airPollutionData"];
export const LAST_UPDATED_KEY = [TOPIC, "lastUpdated"];
export const NEXT_UPDATE_KEY = [TOPIC, "nextUpdate"];
export const LAST_MESSAGE_DELIVERY_KEY = [TOPIC, "lastMessageDelivery"];
export const DELIVERY_FAILED_KEY = [TOPIC, "deliveryFailed"];
export const LOCK_KEY = [TOPIC, "lock"];
export const ONE_HOUR_IN_MS = 60 * 60 * 1000;