import type { Logger } from "pino"; import type { CurrentWeather, DailyForecast, WeatherLocation, WeatherService } from "../../types/weather.js"; import type { HttpClient } from "../http/http-client.js"; /** * Configuration for the OpenWeatherMap service. */ export interface OpenWeatherMapConfig { /** API key from openweathermap.org. */ apiKey: string; /** Location for weather queries. */ location: WeatherLocation; /** API base URL (default: https://api.openweathermap.org). */ baseUrl?: string; } /** * Weather service implementation using OpenWeatherMap. * * Uses the One Call API 3.0 for both current conditions and forecast. * Requires an API key from https://openweathermap.org/api. * * @example * ```ts * import { createEngine, OpenWeatherMapService } from "ts-home-automation"; * * const engine = createEngine({ * automationsDir: "...", * weather: (http, logger) => * new OpenWeatherMapService({ * apiKey: process.env.OWM_API_KEY!, * location: { latitude: 49.4, longitude: 8.7 }, * }, http, logger), * }); * ``` */ export declare class OpenWeatherMapService implements WeatherService { private readonly config; private readonly http; private readonly logger; private readonly baseUrl; /** Cached API response with TTL. */ private cache; /** Cache TTL in milliseconds (default: 5 minutes). */ private readonly cacheTtlMs; constructor(config: OpenWeatherMapConfig, http: HttpClient, logger: Logger); getCurrent(): Promise; getForecast(days?: number): Promise; private fetchOneCall; } //# sourceMappingURL=openweathermap-service.d.ts.map