/** * NWS (National Weather Service) SDK — real-time U.S. weather forecasts, * alerts, and station observations. * * API docs: https://www.weather.gov/documentation/services-web-api * OpenAPI spec: https://api.weather.gov/openapi.json * Rate limit: not formally documented; designed for real-time public use. Be polite. * Auth: none. NWS requires a descriptive User-Agent header per their guidelines. * * Usage: * import { getForecast, getActiveAlerts } from "us-gov-open-data-mcp/sdk/nws"; * const fc = await getForecast({ lat: 38.89, lon: -77.04 }); * const alerts = await getActiveAlerts({ area: "CA" }); */ /** Gridpoint + zone metadata for a lat/lon, returned by /points. */ export interface PointInfo { gridId: string; gridX: number; gridY: number; forecastOffice: string; timeZone: string; radarStation: string | null; forecastZoneId: string | null; countyZoneId: string | null; fireWeatherZoneId: string | null; observationStationsUrl: string; relativeLocation: { city: string; state: string; } | null; } /** One period of a forecast (typically 12 hours daytime / 12 hours overnight). */ export interface ForecastPeriod { number: number; name: string; startTime: string; endTime: string; isDaytime: boolean; temperature: number; temperatureUnit: string; temperatureTrend: string | null; probabilityOfPrecipitation: number | null; windSpeed: string; windDirection: string; shortForecast: string; detailedForecast: string; } /** Active weather alert (subset of GeoJSON Feature properties). */ export interface Alert { id: string; event: string; severity: string; certainty: string; urgency: string; status: string; messageType: string; sent: string; effective: string; onset: string | null; expires: string; ends: string | null; senderName: string; headline: string | null; description: string; instruction: string | null; areaDesc: string; category: string; } /** Observation station (subset of GeoJSON Feature properties). */ export interface Station { stationIdentifier: string; name: string; elevationMeters: number | null; timeZone: string; latitude: number; longitude: number; } /** Latest observation from a station (SI units). */ export interface Observation { station: string; timestamp: string; textDescription: string; temperatureC: number | null; dewpointC: number | null; windSpeedKmh: number | null; windDirectionDeg: number | null; barometricPressurePa: number | null; visibilityM: number | null; relativeHumidityPct: number | null; } /** Get gridpoint + zone metadata for a lat/lon. */ export declare function getPointInfo(opts: { lat: number; lon: number; }): Promise; /** Get the 7-day forecast for a lat/lon (resolves the gridpoint internally). */ export declare function getForecast(opts: { lat: number; lon: number; }): Promise<{ updated: string; generatedAt: string; units: string; periods: ForecastPeriod[]; point: PointInfo; }>; /** Get the hourly forecast (next ~156 hours) for a lat/lon. */ export declare function getForecastHourly(opts: { lat: number; lon: number; }): Promise<{ updated: string; periods: ForecastPeriod[]; point: PointInfo; }>; /** Get the public zone forecast (text-based, by zone ID). */ export declare function getZoneForecast(zoneId: string): Promise<{ updated: string; periods: Array<{ number: number; name: string; detailedForecast: string; }>; }>; /** Get currently-active alerts, optionally filtered by area, zone, or point. */ export declare function getActiveAlerts(opts?: { area?: string; zone?: string; point?: string; status?: string; messageType?: string; severity?: string; urgency?: string; }): Promise; /** Get a single alert by its URN (e.g. "urn:oid:2.49.0.1.840…"). Full URLs are also accepted. * Returns null if the alert is not found. */ export declare function getAlert(id: string): Promise; /** List all alert event types (e.g. "Tornado Warning", "Flood Watch"). */ export declare function getAlertTypes(): Promise; /** List observation stations near a lat/lon. `limit` is applied client-side * (the upstream endpoint does not accept a query limit). */ export declare function getStationsNear(opts: { lat: number; lon: number; limit?: number; }): Promise; /** Get the latest observation from a station (SI units). Returns null if the * station is unknown or has no recent observations. */ export declare function getLatestObservation(stationId: string): Promise; /** Get the NWS glossary (term → definition). */ export declare function getGlossary(): Promise>; /** * Clear Cache. */ export declare function clearCache(): void; //# sourceMappingURL=sdk.d.ts.map