mirror of
https://github.com/kennethnym/aris.git
synced 2026-06-13 19:11:18 +01:00
28 lines
652 B
TypeScript
28 lines
652 B
TypeScript
import type { ContextKey } from "@freya/core"
|
|
|
|
import { contextKey } from "@freya/core"
|
|
|
|
import type { ConditionCode } from "./weatherkit"
|
|
|
|
/**
|
|
* Simplified weather context for downstream sources.
|
|
*/
|
|
export interface Weather {
|
|
/** Current temperature */
|
|
temperature: number
|
|
/** Feels-like temperature */
|
|
temperatureApparent: number
|
|
/** Weather condition */
|
|
condition: ConditionCode
|
|
/** Relative humidity (0-1) */
|
|
humidity: number
|
|
/** UV index */
|
|
uvIndex: number
|
|
/** Wind speed */
|
|
windSpeed: number
|
|
/** Is it currently daytime */
|
|
daylight: boolean
|
|
}
|
|
|
|
export const WeatherKey: ContextKey<Weather> = contextKey("freya.weather", "weather")
|