-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
78 lines (64 loc) · 2.18 KB
/
types.ts
File metadata and controls
78 lines (64 loc) · 2.18 KB
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
export type View = 'map' | 'forecast' | 'alerts' | 'trends' | 'settings';
export type Pollutant = 'PM2.5' | 'O3' | 'NO2' | 'SO2' | 'CH2O' | 'Aerosol Index' | 'AQI';
export type DataSource = 'satellite' | 'ground';
export type Sensitivity = 'none' | 'child' | 'elderly' | 'asthma' | 'athlete';
// NEW Persona types
export type PersonaCategory = 'health_guardian' | 'public_official' | 'tourism_pro' | 'resident';
export type PopulationGroup = 'children' | 'elderly' | 'athletes' | 'respiratory_patients' | 'general_community';
export type PublicSector = 'transportation' | 'parks_recreation' | 'municipal_governance' | 'environmental_protection';
export type TourismFocus = 'itinerary_planning' | 'visitor_advisories' | 'hotel_operations';
export type PrimaryUseCase = 'plan_outdoor_activities' | 'manage_indoor_air' | 'issue_public_warnings' | 'adjust_transportation' | 'plan_public_events' | 'advise_tourists';
export interface Location {
name: string;
lat: number;
lon: number;
}
export interface UserSettings {
location: string;
sensitivity: Sensitivity;
// New persona fields
personaCategory: PersonaCategory;
jobTitle: string;
organization: string;
// Arrays for multi-select
populationGroups: PopulationGroup[];
primaryUseCases: PrimaryUseCase[];
// Single select
publicSector: PublicSector | '';
tourismFocus: TourismFocus | '';
}
export interface Alert {
id: number;
pollutant: Pollutant;
threshold: number; // AQI value
active: boolean;
}
export interface PollutantLayer {
id: Pollutant;
name: string;
unit: string;
gradient: string;
}
// New types for API data
export interface AirQualityMeasurement {
parameter: Pollutant | string;
value: number;
unit: string;
}
export interface CurrentAirQuality {
aqi: number;
primaryPollutant: Pollutant;
category: string;
summary: string;
measurements: AirQualityMeasurement[];
}
export interface Weather {
temperature: number;
feelsLike: number;
windSpeed: number;
windDirection: string;
}
export interface ForecastAqi {
hourly: { time: string; [key: string]: number | string }[];
daily: { day: string; [key: string]: number | string }[];
}