@mostlyrightmd/weather/hosted
Interfaces
Section titled “Interfaces”SatelliteHostedOptions
Section titled “SatelliteHostedOptions”Properties
Section titled “Properties”apiKey
Section titled “apiKey”
readonlyapiKey:string
The MOSTLYRIGHT_API_KEY sent as x-api-key. Required.
fetchImpl?
Section titled “fetchImpl?”
readonlyoptionalfetchImpl:FetchLike
Injectable fetch (tests). Default: the browser/MV3 global.
fromTime
Section titled “fromTime”
readonlyfromTime:string
Event-time window start (ISO-8601).
hostedUrl
Section titled “hostedUrl”
readonlyhostedUrl:string
The weather serving base URL (MOSTLYRIGHT_WEATHER_HOSTED_URL) — the
deployed mr-serving origin. Required; a missing value throws
HostedConfigError. In the MV3 extension this is build-injected.
readonlyoptionallat:number
Latitude of a coordinate site, in decimal degrees. Given together with
lon, addresses an arbitrary point that need not exist in any station
registry; the site id is derived client-side by deriveSiteId and sent as
the single station= parameter, so the wire contract is unchanged.
Supplying only one of lat/lon throws before any fetch.
readonlyoptionallon:number
Longitude of a coordinate site, in decimal degrees (negative = west). See SatelliteHostedOptions.lat.
product?
Section titled “product?”
readonlyoptionalproduct:string
Optional product id; omit for the server’s per-source default product.
retrievedAt?
Section titled “retrievedAt?”
readonlyoptionalretrievedAt:string
Retrieval timestamp override (ISO-8601 UTC). Default: now.
satellite
Section titled “satellite”
readonlysatellite:string
Explicit satellite id (e.g. "goes16"). Required: the hosted /satellite
endpoint does not auto-route (unlike the Python satellite() dispatch,
which resolves the family client-side before the hosted call), so the
browser shim must name the family or the server returns 422.
signal?
Section titled “signal?”
readonlyoptionalsignal:AbortSignal
Optional AbortSignal for cancellation.
siteId?
Section titled “siteId?”
readonlyoptionalsiteId:string
Override the derived identity of a coordinate site. Coordinate mode only.
It must be the digit-bearing coordinate form: a letter-only / ICAO-shaped
value is refused before any fetch, mirroring Python’s reserved-identifier
rule, because identity is what selects the partition — an accepted
siteId: "KNYC" beside unrelated coordinates would read KNYC’s own
partition.
station?
Section titled “station?”
readonlyoptionalstation:string| readonlystring[]
Single station or a list (ICAO codes, or any site id the fleet has
written). Mutually exclusive with lat/lon: exactly one identity form
must be supplied, and supplying both — or neither — throws before any
fetch. Optional in the type only; the rule is enforced in code.
timezone?
Section titled “timezone?”
readonlyoptionaltimezone:string
IANA timezone for a coordinate site, carried as caller-supplied metadata. Coordinate mode only. It is not sent on the wire and not resolved from the coordinates: doing either would need a geo lookup the browser bundle does not ship.
toTime
Section titled “toTime”
readonlytoTime:string
Event-time window end (ISO-8601).
variable?
Section titled “variable?”
readonlyoptionalvariable:string
Optional single-variable filter.
SatelliteRow
Section titled “SatelliteRow”A canonical satellite row emitted by satelliteHosted. Mirrors the
Python satellite(...) DataFrame row (snake_case wire keys → camelCase
props). Field presence follows the wire row: a genuine extracted row carries
every field; a qc_status="suspect" sentinel row, which Python emits when
the units contract fails, carries empty scan times and pixelRow=-1.
Properties
Section titled “Properties”asOfTime
Section titled “asOfTime”
readonlyasOfTime:null|string
RFC3339-Z knowledge-time string echoed by the server, or null.
delivery
Section titled “delivery”
readonlydelivery:"hosted"
Delivery channel lineage — always "hosted" on this path.
eventTime
Section titled “eventTime”
readonlyeventTime:null|string
Event time (scan start), ISO-8601 UTC, or null.
ingestedAt
Section titled “ingestedAt”
readonlyingestedAt:null|string
knowledgeTime
Section titled “knowledgeTime”
readonlyknowledgeTime:null|string
Knowledge time (leakage anchor), ISO-8601 UTC, or null.
pixelCol
Section titled “pixelCol”
readonlypixelCol:null|number
pixelDataQualityFlag
Section titled “pixelDataQualityFlag”
readonlypixelDataQualityFlag:null|number
pixelRow
Section titled “pixelRow”
readonlypixelRow:null|number
pixelValue
Section titled “pixelValue”
readonlypixelValue:null|number
pressureLevelHpa
Section titled “pressureLevelHpa”
readonlypressureLevelHpa:null|number
product
Section titled “product”
readonlyproduct:string
qcStatus
Section titled “qcStatus”
readonlyqcStatus:string
retrievedAt
Section titled “retrievedAt”
readonlyretrievedAt:string
When the SDK retrieved the row (ISO-8601 UTC).
satellite
Section titled “satellite”
readonlysatellite:string
scanEndUtc
Section titled “scanEndUtc”
readonlyscanEndUtc:null|string
Byte-faithful RFC3339-Z scan-end string, or null.
scanStartUtc
Section titled “scanStartUtc”
readonlyscanStartUtc:null|string
Byte-faithful RFC3339-Z scan-start string (event time), or null.
source
Section titled “source”
readonlysource:string
Satellite family identity — passed through verbatim, never re-derived.
sourceObjectKey
Section titled “sourceObjectKey”
readonlysourceObjectKey:string
station
Section titled “station”
readonlystation:string
stationLat
Section titled “stationLat”
readonlystationLat:null|number
stationLon
Section titled “stationLon”
readonlystationLon:null|number
subsatelliteLongitudeDegrees
Section titled “subsatelliteLongitudeDegrees”
readonlysubsatelliteLongitudeDegrees:null|number
readonlyunits:string
variable
Section titled “variable”
readonlyvariable:string
Type Aliases
Section titled “Type Aliases”SatelliteSourceIdentity
Section titled “SatelliteSourceIdentity”SatelliteSourceIdentity: typeof
SATELLITE_SOURCE_IDENTITIES[number]
Variables
Section titled “Variables”SATELLITE_SOURCE_IDENTITIES
Section titled “SATELLITE_SOURCE_IDENTITIES”
constSATELLITE_SOURCE_IDENTITIES: readonly ["noaa_goes","jma_himawari","noaa_viirs","eumetsat_meteosat"]
The satellite family source identities the hosted rows carry — one identity
per instrument family. Informational: the shim passes source through
verbatim and never re-derives it.
Functions
Section titled “Functions”projectSatelliteRow()
Section titled “projectSatelliteRow()”projectSatelliteRow(
raw,retrievedAt):SatelliteRow
Project one wire row into a canonical SatelliteRow, or throw.
Nothing is defaulted. Turning a missing identity into "", a missing number
into null, or a missing qc_status into "clean" would synthesise a
verdict the server never sent, so a QC-suspect row that lost its verdict in
transit would read as clean. Python validates hosted frames against
schema.satellite.v1; this is the browser’s equivalent, kept compact rather
than generated (the satellite schemas have no generated validator).
Parameters
Section titled “Parameters”unknown
retrievedAt
Section titled “retrievedAt”string
Returns
Section titled “Returns”Throws
Section titled “Throws”a non-object row, a missing/blank required
identity field, or a qc_status outside the schema enum.
satelliteHosted()
Section titled “satelliteHosted()”satelliteHosted(
options):Promise<readonlySatelliteRow[]>
Fetch satellite rows from the hosted weather serving /satellite endpoint.
The TS mirror of the Python satellite(delivery="hosted", ...): GETs
${MOSTLYRIGHT_WEATHER_HOSTED_URL}/satellite?... with the MOSTLYRIGHT_API_KEY header and
returns rows byte-identical to the Python hosted contract. The
source family identity is passed through verbatim; delivery is "hosted".
Pass either station (a code or site id, or a list) or lat+lon (a
coordinate site, resolved to a site id client-side). Supplying both, only one
of lat/lon, or neither throws before any fetch — identity selects which
partition is read, so an ambiguous request must never reach the network.
MV3-safe: fetch + JSON only (via hostedFetchJson). No Node APIs.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<readonly SatelliteRow[]>
Throws
Section titled “Throws”conflicting or incomplete identity options, an
out-of-range or non-finite coordinate, a malformed site id, or an
ICAO-shaped explicit siteId in coordinate mode — all before any network
call.
Throws
Section titled “Throws”when MOSTLYRIGHT_WEATHER_HOSTED_URL /
MOSTLYRIGHT_API_KEY is missing, or station is supplied but empty —
raised before any network call.
Throws
Section titled “Throws”on a non-2xx or non-JSON response (from
hostedFetchJson).