/** * Service for interacting with the MSC GeoMet weather-alerts API * (Environment and Climate Change Canada) — * https://api.weather.gc.ca/collections/weather-alerts * * A keyless OGC API Features endpoint. Queried with a small bbox (±0.25°) * around a point, `f=json`. Live-verified (2026-08-13, see "MSC GeoMet * (Canada)" in `docs/plans/international-alerts-plan.md`): a zero-result bbox * returns HTTP 200 with `numberMatched: 0` — the happy empty path, not an * error — and `status_en: "ended"` items **remain in the collection**, so * expiry filtering is always required at read time (both on a fresh fetch * and on a cache hit, since a cached feature can cross its own expiry * between fetch and a later read). * * Like `acis.ts`, this is not one of the project's original data sources — * errors surface as plain, sanitized `Error`s (no `ApiError` union changes). */ import type { GeoMetAlertFeature } from '../types/geomet.js'; export interface GeoMetServiceConfig { baseURL?: string; timeout?: number; maxRetries?: number; } /** * Filter a raw feature list down to alerts that are still active: drops * features whose `status_en` means ended/expired, and features whose * `expiration_datetime` is in the past. Pure function, no I/O — applied on * every `getAlerts` return (fresh fetch or cache hit) so a cached entry * never serves a just-expired alert. */ export declare function filterActiveGeoMetAlerts(features: GeoMetAlertFeature[], now?: Date): GeoMetAlertFeature[]; /** * MSC GeoMet (Environment and Climate Change Canada) weather-alerts API * client. No API key required. */ export declare class GeoMetService { private client; private cache; private maxRetries; constructor(config?: GeoMetServiceConfig); /** * Fetch currently active weather alerts near a point from MSC GeoMet. * Queries a small bbox (±0.25°) around the coordinates and returns only * unexpired, non-ended features — expiry filtering is applied both to a * fresh fetch and to a cache hit, since raw (unfiltered) results are what * gets cached. */ getAlerts(latitude: number, longitude: number): Promise; /** * Request with retry/backoff, mirroring `NOAAService.makeRequest` * (`src/services/noaa.ts:175-199`): exponential backoff with jitter, * retrying only on messages that indicate a transient failure (rate * limit, server error, timeout). * @private */ private makeRequest; /** * Handle API errors. GeoMet has no service literal in `ApiError` (it is * not one of the project's original data sources), so errors are * surfaced as plain, sanitized `Error`s — following `AcisService`'s * precedent (`src/services/acis.ts`). * @private */ private handleError; } //# sourceMappingURL=geomet.d.ts.map