← Public packages
@reng/air-quality
Scrape air-quality.com for AQI, pollutants, pollen, and weather (HA-style field set).
src/types.ts
74 lines · 1.4 KB · TypeScriptexport type AqiStandard =
| 'aqi_cn'
| 'aqi_us'
| 'aqi_au'
| 'aqi_ca'
| 'aqi_nl'
| 'caqi_eu'
| 'daqi_uk'
| 'naqi_in'
export type PlaceHit = {
name: string
description?: string
place: string
placeId: string
urlKey: string
type?: string
lat?: number
lon?: number
}
export type Pollutants = {
pm25: number | null
pm10: number | null
o3: number | null
no2: number | null
co: number | null
so2: number | null
}
export type PollenSnapshot = {
raw: string | null
max: number | null
total: number | string | null
birch: number | string | null
grass: number | string | null
alder: number | string | null
olive: number | string | null
ragweed: number | string | null
mugwort: number | string | null
allergyRisk: number | string | null
}
export type WeatherSnapshot = {
temperatureC: number | null
humidityPct: number | null
windSpeedKph: number | null
windDirection: string | null
windDegrees: number | null
uvIndex: number | null
}
export type AirQualitySnapshot = {
place: {
name: string
path: string
lat?: number
lon?: number
description?: string
}
standard: AqiStandard
source: 'air-quality.com' | 'open-meteo-fallback' | 'beijing-pollen-fallback' | 'mixed-fallback'
url: string | null
aqi: number | null
level: string | null
pollutants: Pollutants
pollen: PollenSnapshot
weather: WeatherSnapshot
updateTime: string | null
summary: string
attribution: string
warnings: string[]
coverageNote: string
}