mirror of
https://github.com/kennethnym/aris.git
synced 2026-02-02 13:11:17 +00:00
feat: add @aris/source-weatherkit package
Implements FeedSource for WeatherKit API. Depends on location source, provides weather context for downstream sources, and produces weather feed items. Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
27
packages/aris-source-weatherkit/src/weather-context.ts
Normal file
27
packages/aris-source-weatherkit/src/weather-context.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { ContextKey } from "@aris/core"
|
||||
|
||||
import { contextKey } from "@aris/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("weather")
|
||||
Reference in New Issue
Block a user