import type { AggregatedConditions, AirQualityData, AggregatorOptions, Coordinates, RiskAssessment, SourceResult } from '../types/index.js'; export type RiskLayer = keyof NonNullable; type DirectKeys = Exclude; export type RiskHook = { layer: RiskLayer; weight: number; score: (data: T) => number; factorLabel?: string; }; export type DirectSource = { kind: 'direct'; id: string; key: K; fetch: (coords: Coordinates, opts: AggregatorOptions) => Promise>>; freshnessMinutes: number; /** Whether this source has meaningful coverage at the given location. */ appliesTo: (coords: Coordinates) => boolean; risk?: RiskHook>; apply: (c: Partial, r: SourceResult>) => void; }; export type MergedSource = { kind: 'merged'; id: string; group: 'airQuality'; fetch: (coords: Coordinates, opts: AggregatorOptions) => Promise>; freshnessMinutes: number; /** Whether this source has meaningful coverage at the given location. */ appliesTo: (coords: Coordinates) => boolean; }; type AnyDirectSource = { [K in DirectKeys]: DirectSource; }[DirectKeys]; export type SourceDefinition = AnyDirectSource | MergedSource; export declare const SOURCES: readonly SourceDefinition[]; export declare const MERGED_RISK: { airQuality: RiskHook; }; export {};