@azohra/meteo.station 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/dist/air.d.ts +4 -7
- package/dist/air.js +1 -2
- package/dist/client/climatology.d.ts +4 -7
- package/dist/client/climatology.js +1 -2
- package/dist/client/history.d.ts +14 -17
- package/dist/client/history.js +1 -2
- package/dist/client/live.d.ts +9 -11
- package/dist/client/live.js +1 -2
- package/dist/client/poll.d.ts +9 -12
- package/dist/client/poll.js +1 -2
- package/dist/client/stores.d.ts +8 -10
- package/dist/client/stores.js +1 -2
- package/dist/client/ticker.d.ts +1 -4
- package/dist/client/ticker.js +1 -2
- package/dist/climatology.d.ts +13 -15
- package/dist/climatology.js +1 -2
- package/dist/connectivity.d.ts +9 -12
- package/dist/connectivity.js +1 -2
- package/dist/contract-climatology.d.ts +11 -14
- package/dist/contract-climatology.js +1 -2
- package/dist/contract.d.ts +148 -151
- package/dist/contract.js +1 -2
- package/dist/derive.d.ts +24 -26
- package/dist/derive.js +5 -6
- package/dist/display.d.ts +6 -9
- package/dist/display.js +1 -2
- package/dist/elements/elements/AirExtremesElement.d.ts +2 -5
- package/dist/elements/elements/AirExtremesElement.js +6 -20
- package/dist/elements/elements/AirMatrixElement.d.ts +2 -5
- package/dist/elements/elements/AirMatrixElement.js +7 -33
- package/dist/elements/elements/ClimatologyDailyPatternElement.d.ts +2 -5
- package/dist/elements/elements/ClimatologyDailyPatternElement.js +18 -14
- package/dist/elements/elements/ClimatologyRoseElement.d.ts +2 -5
- package/dist/elements/elements/ClimatologyRoseElement.js +6 -17
- package/dist/elements/elements/CompassFanElement.d.ts +2 -5
- package/dist/elements/elements/CompassFanElement.js +6 -66
- package/dist/elements/elements/CurrentConditionsElement.d.ts +2 -5
- package/dist/elements/elements/CurrentConditionsElement.js +8 -28
- package/dist/elements/elements/DailyPatternElement.d.ts +2 -6
- package/dist/elements/elements/DailyPatternElement.js +7 -122
- package/dist/elements/elements/DialElement.d.ts +2 -5
- package/dist/elements/elements/DialElement.js +4 -97
- package/dist/elements/elements/FavorableShareElement.d.ts +2 -5
- package/dist/elements/elements/FavorableShareElement.js +7 -23
- package/dist/elements/elements/FreshnessBadgeElement.d.ts +2 -5
- package/dist/elements/elements/FreshnessBadgeElement.js +1 -2
- package/dist/elements/elements/RecentSummariesElement.d.ts +2 -5
- package/dist/elements/elements/RecentSummariesElement.js +7 -25
- package/dist/elements/elements/SparklineElement.d.ts +2 -6
- package/dist/elements/elements/SparklineElement.js +5 -41
- package/dist/elements/elements/StationCardElement.d.ts +6 -8
- package/dist/elements/elements/StationCardElement.js +5 -20
- package/dist/elements/elements/StationFeedElement.d.ts +2 -5
- package/dist/elements/elements/StationFeedElement.js +5 -4
- package/dist/elements/elements/StationStripElement.d.ts +2 -5
- package/dist/elements/elements/StationStripElement.js +5 -20
- package/dist/elements/elements/StationTableElement.d.ts +3 -6
- package/dist/elements/elements/StationTableElement.js +16 -53
- package/dist/elements/elements/TrendChartElement.d.ts +2 -5
- package/dist/elements/elements/TrendChartElement.js +22 -71
- package/dist/elements/elements/WindArrowElement.d.ts +2 -5
- package/dist/elements/elements/WindArrowElement.js +1 -2
- package/dist/elements/elements/WindHistoryChartElement.d.ts +2 -5
- package/dist/elements/elements/WindHistoryChartElement.js +24 -166
- package/dist/elements/elements/WindRoseElement.d.ts +2 -6
- package/dist/elements/elements/WindRoseElement.js +7 -72
- package/dist/elements/elements/atoms.d.ts +10 -12
- package/dist/elements/elements/atoms.js +12 -40
- package/dist/elements/index.d.ts +3 -5
- package/dist/elements/index.js +4 -5
- package/dist/elements/lib/ambient.d.ts +2 -5
- package/dist/elements/lib/ambient.js +1 -2
- package/dist/elements/lib/attributes.js +1 -2
- package/dist/elements/lib/base.d.ts +3 -6
- package/dist/elements/lib/base.js +1 -2
- package/dist/elements/lib/context.js +1 -2
- package/dist/elements/lib/fragments.js +9 -39
- package/dist/elements/lib/h.js +2 -3
- package/dist/elements/lib/pinned-cursor.js +1 -2
- package/dist/elements/lib/render.js +29 -0
- package/dist/elements/register.js +1 -2
- package/dist/endpoints.d.ts +6 -9
- package/dist/endpoints.js +1 -2
- package/dist/fixtures.d.ts +7 -10
- package/dist/fixtures.js +1 -2
- package/dist/format.d.ts +11 -14
- package/dist/format.js +1 -2
- package/dist/geometry.d.ts +36 -38
- package/dist/geometry.js +3 -3
- package/dist/instruments.d.ts +37 -40
- package/dist/instruments.js +3 -4
- package/dist/merge-current.d.ts +4 -7
- package/dist/merge-current.js +1 -2
- package/dist/react/components/AirExtremes.d.ts +2 -5
- package/dist/react/components/AirExtremes.js +6 -24
- package/dist/react/components/AirMatrix.d.ts +2 -5
- package/dist/react/components/AirMatrix.js +11 -45
- package/dist/react/components/ClimatologyDailyPattern.d.ts +2 -5
- package/dist/react/components/ClimatologyDailyPattern.js +20 -15
- package/dist/react/components/ClimatologyRose.d.ts +2 -5
- package/dist/react/components/ClimatologyRose.js +12 -30
- package/dist/react/components/CompassFan.d.ts +2 -5
- package/dist/react/components/CompassFan.js +7 -75
- package/dist/react/components/CurrentConditions.d.ts +2 -5
- package/dist/react/components/CurrentConditions.js +12 -76
- package/dist/react/components/DailyPattern.d.ts +3 -8
- package/dist/react/components/DailyPattern.js +11 -151
- package/dist/react/components/Dial.d.ts +2 -5
- package/dist/react/components/Dial.js +6 -120
- package/dist/react/components/FavorableShare.d.ts +2 -5
- package/dist/react/components/FavorableShare.js +7 -29
- package/dist/react/components/FreshnessBadge.d.ts +2 -5
- package/dist/react/components/FreshnessBadge.js +6 -14
- package/dist/react/components/Readout.d.ts +2 -5
- package/dist/react/components/Readout.js +1 -2
- package/dist/react/components/RecentSummaries.d.ts +2 -5
- package/dist/react/components/RecentSummaries.js +7 -46
- package/dist/react/components/SceneTree.js +37 -0
- package/dist/react/components/Sparkline.d.ts +2 -5
- package/dist/react/components/Sparkline.js +4 -41
- package/dist/react/components/StationCard.d.ts +8 -10
- package/dist/react/components/StationCard.js +6 -47
- package/dist/react/components/StationFeedProvider.d.ts +3 -6
- package/dist/react/components/StationFeedProvider.js +1 -2
- package/dist/react/components/StationStrip.d.ts +2 -5
- package/dist/react/components/StationStrip.js +6 -62
- package/dist/react/components/StationTable.d.ts +3 -6
- package/dist/react/components/StationTable.js +22 -77
- package/dist/react/components/TrendChart.d.ts +2 -5
- package/dist/react/components/TrendChart.js +9 -65
- package/dist/react/components/WindArrow.d.ts +2 -5
- package/dist/react/components/WindArrow.js +4 -17
- package/dist/react/components/WindHistoryChart.d.ts +2 -5
- package/dist/react/components/WindHistoryChart.js +9 -184
- package/dist/react/components/WindRose.d.ts +2 -7
- package/dist/react/components/WindRose.js +7 -91
- package/dist/react/components/WindSampleStrip.d.ts +2 -5
- package/dist/react/components/WindSampleStrip.js +9 -117
- package/dist/react/components/atoms.d.ts +12 -14
- package/dist/react/components/atoms.js +13 -50
- package/dist/react/hooks/useFreshness.d.ts +1 -4
- package/dist/react/hooks/useFreshness.js +1 -2
- package/dist/react/hooks/useMeasuredChartWidth.d.ts +2 -5
- package/dist/react/hooks/useMeasuredChartWidth.js +1 -2
- package/dist/react/hooks/usePolledJson.js +1 -2
- package/dist/react/hooks/useStation.d.ts +2 -5
- package/dist/react/hooks/useStation.js +1 -2
- package/dist/react/hooks/useStationClimatology.d.ts +2 -5
- package/dist/react/hooks/useStationClimatology.js +1 -2
- package/dist/react/hooks/useStationCurrent.d.ts +2 -5
- package/dist/react/hooks/useStationCurrent.js +4 -4
- package/dist/react/hooks/useStationFeed.d.ts +2 -5
- package/dist/react/hooks/useStationFeed.js +4 -4
- package/dist/react/hooks/useStationLive.d.ts +2 -5
- package/dist/react/hooks/useStationLive.js +1 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +5 -5
- package/dist/react/lib/cells.js +5 -26
- package/dist/react/lib/use-pinned-cursor.js +1 -2
- package/dist/samples.d.ts +8 -11
- package/dist/samples.js +1 -2
- package/dist/scene/air-extremes.js +13 -29
- package/dist/scene/air-matrix.js +46 -60
- package/dist/scene/atoms.js +1 -2
- package/dist/scene/card.js +15 -42
- package/dist/scene/cells.d.ts +4 -0
- package/dist/scene/cells.js +50 -0
- package/dist/scene/chart.d.ts +2 -5
- package/dist/scene/chart.js +3 -3
- package/dist/scene/climatology-pattern.d.ts +1 -2
- package/dist/scene/climatology-pattern.js +11 -13
- package/dist/scene/climatology-rose.d.ts +1 -2
- package/dist/scene/climatology-rose.js +15 -35
- package/dist/scene/compass-fan.js +29 -102
- package/dist/scene/current.d.ts +2 -1
- package/dist/scene/current.js +30 -58
- package/dist/scene/daily-pattern.d.ts +1 -3
- package/dist/scene/daily-pattern.js +21 -29
- package/dist/scene/dial-parts.d.ts +1 -0
- package/dist/scene/dial-parts.js +69 -0
- package/dist/scene/dial.d.ts +1 -2
- package/dist/scene/dial.js +49 -138
- package/dist/scene/favorable-share.js +17 -35
- package/dist/scene/glyphs.js +21 -18
- package/dist/scene/index.d.ts +5 -3
- package/dist/scene/node.js +18 -0
- package/dist/scene/recent-summaries.js +27 -65
- package/dist/scene/rose.js +90 -119
- package/dist/scene/sample-strip.d.ts +1 -2
- package/dist/scene/sample-strip.js +36 -38
- package/dist/scene/sparkline.js +32 -42
- package/dist/scene/strip.js +19 -59
- package/dist/scene/table.js +48 -71
- package/dist/scene/trend.d.ts +1 -2
- package/dist/scene/trend.js +30 -57
- package/dist/scene/wind-history.d.ts +1 -2
- package/dist/scene/wind-history.js +42 -53
- package/dist/scene/wind-plot.js +71 -142
- package/dist/server/adapter.d.ts +7 -10
- package/dist/server/adapter.js +1 -2
- package/dist/server/adapters/campbell.d.ts +18 -20
- package/dist/server/adapters/campbell.js +2 -3
- package/dist/server/adapters/ecowitt.d.ts +12 -15
- package/dist/server/adapters/ecowitt.js +1 -2
- package/dist/server/adapters/tempest.d.ts +10 -13
- package/dist/server/adapters/tempest.js +1 -2
- package/dist/server/adapters/windnerd-climatology.d.ts +5 -8
- package/dist/server/adapters/windnerd-climatology.js +5 -5
- package/dist/server/adapters/windnerd-live.d.ts +2 -5
- package/dist/server/adapters/windnerd-live.js +4 -4
- package/dist/server/adapters/windnerd.d.ts +30 -33
- package/dist/server/adapters/windnerd.js +2 -3
- package/dist/server/config.d.ts +61 -63
- package/dist/server/config.js +1 -2
- package/dist/server/environment.d.ts +20 -22
- package/dist/server/environment.js +1 -2
- package/dist/server/feed.d.ts +19 -21
- package/dist/server/feed.js +1 -2
- package/dist/server/handler.d.ts +4 -7
- package/dist/server/handler.js +1 -2
- package/dist/server/hologram.d.ts +9 -12
- package/dist/server/hologram.js +3 -3
- package/dist/server/live.d.ts +2 -5
- package/dist/server/live.js +1 -2
- package/dist/sse.js +1 -2
- package/dist/strings.d.ts +8 -11
- package/dist/strings.js +1 -2
- package/dist/windnerd.d.ts +4 -7
- package/dist/windnerd.js +1 -2
- package/package.json +12 -17
- package/schema/README.md +1 -1
- package/schema/stationclimatology.schema.json +64 -61
- package/schema/stationcurrent.schema.json +68 -156
- package/schema/stationfeed.schema.json +71 -163
- package/schema/stationhistory.schema.json +37 -46
- package/schema/stationlive.schema.json +221 -306
package/dist/contract.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { DirectionArc } from "@azohra/meteo.core";
|
|
3
|
-
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const airConditionsSchema: z.ZodObject<{
|
|
3
|
+
export declare const STATION_SCHEMA_VERSION = 2;
|
|
4
|
+
export declare const UNAVAILABLE_REASONS: readonly ["upstream_error", "timeout", "rate_limited", "contract_break", "not_configured"];
|
|
5
|
+
export type UnavailableReason = (typeof UNAVAILABLE_REASONS)[number];
|
|
6
|
+
export declare const airConditionsSchema: z.ZodObject<{
|
|
8
7
|
dewPointC: z.ZodNullable<z.ZodNumber>;
|
|
9
8
|
lastLightningStrikeAt: z.ZodNullable<z.ZodString>;
|
|
10
9
|
lastLightningStrikeDistanceKm: z.ZodNullable<z.ZodNumber>;
|
|
@@ -13,22 +12,22 @@ declare const airConditionsSchema: z.ZodObject<{
|
|
|
13
12
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
14
13
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
15
14
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
16
|
-
unknown: "unknown";
|
|
17
15
|
falling: "falling";
|
|
18
16
|
rising: "rising";
|
|
19
17
|
steady: "steady";
|
|
18
|
+
unknown: "unknown";
|
|
20
19
|
}>>;
|
|
21
20
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
22
21
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
23
22
|
solarRadiationWm2: z.ZodNullable<z.ZodNumber>;
|
|
24
23
|
uvIndex: z.ZodNullable<z.ZodNumber>;
|
|
25
24
|
}, z.core.$strip>;
|
|
26
|
-
type AirConditions = z.infer<typeof airConditionsSchema>;
|
|
27
|
-
declare const telemetrySchema: z.ZodObject<{
|
|
25
|
+
export type AirConditions = z.infer<typeof airConditionsSchema>;
|
|
26
|
+
export declare const telemetrySchema: z.ZodObject<{
|
|
28
27
|
batteryVoltage: z.ZodNullable<z.ZodNumber>;
|
|
29
28
|
}, z.core.$strip>;
|
|
30
|
-
type StationTelemetry = z.infer<typeof telemetrySchema>;
|
|
31
|
-
declare const readingSchema: z.ZodObject<{
|
|
29
|
+
export type StationTelemetry = z.infer<typeof telemetrySchema>;
|
|
30
|
+
export declare const readingSchema: z.ZodObject<{
|
|
32
31
|
observedAt: z.ZodString;
|
|
33
32
|
windAvgMps: z.ZodNumber;
|
|
34
33
|
windDirectionDeg: z.ZodNullable<z.ZodNumber>;
|
|
@@ -45,10 +44,10 @@ declare const readingSchema: z.ZodObject<{
|
|
|
45
44
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
46
45
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
47
46
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
48
|
-
unknown: "unknown";
|
|
49
47
|
falling: "falling";
|
|
50
48
|
rising: "rising";
|
|
51
49
|
steady: "steady";
|
|
50
|
+
unknown: "unknown";
|
|
52
51
|
}>>;
|
|
53
52
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
54
53
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
@@ -56,8 +55,8 @@ declare const readingSchema: z.ZodObject<{
|
|
|
56
55
|
uvIndex: z.ZodNullable<z.ZodNumber>;
|
|
57
56
|
}, z.core.$strip>>;
|
|
58
57
|
}, z.core.$strip>;
|
|
59
|
-
type Reading = z.infer<typeof readingSchema>;
|
|
60
|
-
declare const historyPointSchema: z.ZodObject<{
|
|
58
|
+
export type Reading = z.infer<typeof readingSchema>;
|
|
59
|
+
export declare const historyPointSchema: z.ZodObject<{
|
|
61
60
|
observedAt: z.ZodString;
|
|
62
61
|
windAvgMps: z.ZodNumber;
|
|
63
62
|
windGustMps: z.ZodNullable<z.ZodNumber>;
|
|
@@ -71,8 +70,8 @@ declare const historyPointSchema: z.ZodObject<{
|
|
|
71
70
|
seaLevelPressureMinHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
72
71
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
73
72
|
}, z.core.$strip>;
|
|
74
|
-
type HistoryPoint = z.infer<typeof historyPointSchema>;
|
|
75
|
-
declare const historySchema: z.ZodObject<{
|
|
73
|
+
export type HistoryPoint = z.infer<typeof historyPointSchema>;
|
|
74
|
+
export declare const historySchema: z.ZodObject<{
|
|
76
75
|
periodMinutes: z.ZodNumber;
|
|
77
76
|
points: z.ZodArray<z.ZodObject<{
|
|
78
77
|
observedAt: z.ZodString;
|
|
@@ -89,8 +88,8 @@ declare const historySchema: z.ZodObject<{
|
|
|
89
88
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
90
89
|
}, z.core.$strip>>;
|
|
91
90
|
}, z.core.$strip>;
|
|
92
|
-
type History = z.infer<typeof historySchema>;
|
|
93
|
-
declare const recentSummarySchema: z.ZodObject<{
|
|
91
|
+
export type History = z.infer<typeof historySchema>;
|
|
92
|
+
export declare const recentSummarySchema: z.ZodObject<{
|
|
94
93
|
windowMinutes: z.ZodNumber;
|
|
95
94
|
stepMinutes: z.ZodNumber;
|
|
96
95
|
points: z.ZodArray<z.ZodObject<{
|
|
@@ -108,14 +107,14 @@ declare const recentSummarySchema: z.ZodObject<{
|
|
|
108
107
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
109
108
|
}, z.core.$strip>>;
|
|
110
109
|
}, z.core.$strip>;
|
|
111
|
-
type RecentSummary = z.infer<typeof recentSummarySchema>;
|
|
112
|
-
declare const liveSampleSchema: z.ZodObject<{
|
|
110
|
+
export type RecentSummary = z.infer<typeof recentSummarySchema>;
|
|
111
|
+
export declare const liveSampleSchema: z.ZodObject<{
|
|
113
112
|
observedAt: z.ZodString;
|
|
114
113
|
windMps: z.ZodNumber;
|
|
115
114
|
windDirectionDeg: z.ZodNullable<z.ZodNumber>;
|
|
116
115
|
}, z.core.$strip>;
|
|
117
|
-
type LiveSample = z.infer<typeof liveSampleSchema>;
|
|
118
|
-
declare const liveSamplesSchema: z.ZodObject<{
|
|
116
|
+
export type LiveSample = z.infer<typeof liveSampleSchema>;
|
|
117
|
+
export declare const liveSamplesSchema: z.ZodObject<{
|
|
119
118
|
intervalSeconds: z.ZodNumber;
|
|
120
119
|
points: z.ZodArray<z.ZodObject<{
|
|
121
120
|
observedAt: z.ZodString;
|
|
@@ -123,8 +122,8 @@ declare const liveSamplesSchema: z.ZodObject<{
|
|
|
123
122
|
windDirectionDeg: z.ZodNullable<z.ZodNumber>;
|
|
124
123
|
}, z.core.$strip>>;
|
|
125
124
|
}, z.core.$strip>;
|
|
126
|
-
type LiveSamples = z.infer<typeof liveSamplesSchema>;
|
|
127
|
-
declare const capabilitiesSchema: z.ZodObject<{
|
|
125
|
+
export type LiveSamples = z.infer<typeof liveSamplesSchema>;
|
|
126
|
+
export declare const capabilitiesSchema: z.ZodObject<{
|
|
128
127
|
gustLull: z.ZodBoolean;
|
|
129
128
|
temperature: z.ZodBoolean;
|
|
130
129
|
conditions: z.ZodBoolean;
|
|
@@ -133,12 +132,12 @@ declare const capabilitiesSchema: z.ZodObject<{
|
|
|
133
132
|
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
134
133
|
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
135
134
|
}, z.core.$strip>;
|
|
136
|
-
type StationCapabilities = z.infer<typeof capabilitiesSchema>;
|
|
137
|
-
declare const directionArcSchema: z.ZodObject<{
|
|
135
|
+
export type StationCapabilities = z.infer<typeof capabilitiesSchema>;
|
|
136
|
+
export declare const directionArcSchema: z.ZodObject<{
|
|
138
137
|
fromDeg: z.ZodNumber;
|
|
139
138
|
toDeg: z.ZodNumber;
|
|
140
139
|
}, z.core.$strip>;
|
|
141
|
-
declare const stationMetaSchema: z.ZodObject<{
|
|
140
|
+
export declare const stationMetaSchema: z.ZodObject<{
|
|
142
141
|
id: z.ZodString;
|
|
143
142
|
name: z.ZodString;
|
|
144
143
|
sourceLabel: z.ZodString;
|
|
@@ -164,8 +163,32 @@ declare const stationMetaSchema: z.ZodObject<{
|
|
|
164
163
|
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
165
164
|
recommendedPollSeconds: z.ZodNumber;
|
|
166
165
|
}, z.core.$strip>;
|
|
167
|
-
type StationMeta = z.infer<typeof stationMetaSchema>;
|
|
168
|
-
declare const stationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
export type StationMeta = z.infer<typeof stationMetaSchema>;
|
|
167
|
+
export declare const stationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
sourceLabel: z.ZodString;
|
|
171
|
+
pageUrl: z.ZodNullable<z.ZodString>;
|
|
172
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
173
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
174
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
175
|
+
elevationM: z.ZodNullable<z.ZodNumber>;
|
|
176
|
+
declaredFavorableDirections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
177
|
+
fromDeg: z.ZodNumber;
|
|
178
|
+
toDeg: z.ZodNumber;
|
|
179
|
+
}, z.core.$strip>>>>;
|
|
180
|
+
broadcastDelaySeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
181
|
+
capabilities: z.ZodObject<{
|
|
182
|
+
gustLull: z.ZodBoolean;
|
|
183
|
+
temperature: z.ZodBoolean;
|
|
184
|
+
conditions: z.ZodBoolean;
|
|
185
|
+
history: z.ZodBoolean;
|
|
186
|
+
live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
187
|
+
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
188
|
+
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
191
|
+
recommendedPollSeconds: z.ZodNumber;
|
|
169
192
|
status: z.ZodLiteral<"ok">;
|
|
170
193
|
reading: z.ZodObject<{
|
|
171
194
|
observedAt: z.ZodString;
|
|
@@ -184,10 +207,10 @@ declare const stationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
184
207
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
185
208
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
186
209
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
187
|
-
unknown: "unknown";
|
|
188
210
|
falling: "falling";
|
|
189
211
|
rising: "rising";
|
|
190
212
|
steady: "steady";
|
|
213
|
+
unknown: "unknown";
|
|
191
214
|
}>>;
|
|
192
215
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
193
216
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
@@ -241,6 +264,7 @@ declare const stationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
241
264
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
242
265
|
}, z.core.$strip>>;
|
|
243
266
|
}, z.core.$strip>>>>;
|
|
267
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
268
|
id: z.ZodString;
|
|
245
269
|
name: z.ZodString;
|
|
246
270
|
sourceLabel: z.ZodString;
|
|
@@ -265,48 +289,47 @@ declare const stationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
265
289
|
}, z.core.$strip>;
|
|
266
290
|
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
267
291
|
recommendedPollSeconds: z.ZodNumber;
|
|
268
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
269
292
|
status: z.ZodLiteral<"unavailable">;
|
|
270
293
|
reason: z.ZodEnum<{
|
|
271
|
-
upstream_error: "upstream_error";
|
|
272
|
-
timeout: "timeout";
|
|
273
|
-
rate_limited: "rate_limited";
|
|
274
294
|
contract_break: "contract_break";
|
|
275
295
|
not_configured: "not_configured";
|
|
296
|
+
rate_limited: "rate_limited";
|
|
297
|
+
timeout: "timeout";
|
|
298
|
+
upstream_error: "upstream_error";
|
|
276
299
|
}>;
|
|
277
300
|
reading: z.ZodNull;
|
|
278
301
|
history: z.ZodNull;
|
|
279
|
-
id: z.ZodString;
|
|
280
|
-
name: z.ZodString;
|
|
281
|
-
sourceLabel: z.ZodString;
|
|
282
|
-
pageUrl: z.ZodNullable<z.ZodString>;
|
|
283
|
-
latitude: z.ZodNullable<z.ZodNumber>;
|
|
284
|
-
longitude: z.ZodNullable<z.ZodNumber>;
|
|
285
|
-
timeZone: z.ZodNullable<z.ZodString>;
|
|
286
|
-
elevationM: z.ZodNullable<z.ZodNumber>;
|
|
287
|
-
declaredFavorableDirections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
288
|
-
fromDeg: z.ZodNumber;
|
|
289
|
-
toDeg: z.ZodNumber;
|
|
290
|
-
}, z.core.$strip>>>>;
|
|
291
|
-
broadcastDelaySeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
292
|
-
capabilities: z.ZodObject<{
|
|
293
|
-
gustLull: z.ZodBoolean;
|
|
294
|
-
temperature: z.ZodBoolean;
|
|
295
|
-
conditions: z.ZodBoolean;
|
|
296
|
-
history: z.ZodBoolean;
|
|
297
|
-
live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
298
|
-
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
299
|
-
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
300
|
-
}, z.core.$strip>;
|
|
301
|
-
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
302
|
-
recommendedPollSeconds: z.ZodNumber;
|
|
303
302
|
}, z.core.$strip>], "status">;
|
|
304
|
-
type Station = z.infer<typeof stationSchema>;
|
|
305
|
-
declare const stationFeedSchema: z.ZodObject<{
|
|
303
|
+
export type Station = z.infer<typeof stationSchema>;
|
|
304
|
+
export declare const stationFeedSchema: z.ZodObject<{
|
|
306
305
|
schemaVersion: z.ZodLiteral<2>;
|
|
307
306
|
servedAt: z.ZodString;
|
|
308
307
|
primaryStationId: z.ZodNullable<z.ZodString>;
|
|
309
308
|
stations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
309
|
+
id: z.ZodString;
|
|
310
|
+
name: z.ZodString;
|
|
311
|
+
sourceLabel: z.ZodString;
|
|
312
|
+
pageUrl: z.ZodNullable<z.ZodString>;
|
|
313
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
314
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
315
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
316
|
+
elevationM: z.ZodNullable<z.ZodNumber>;
|
|
317
|
+
declaredFavorableDirections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
318
|
+
fromDeg: z.ZodNumber;
|
|
319
|
+
toDeg: z.ZodNumber;
|
|
320
|
+
}, z.core.$strip>>>>;
|
|
321
|
+
broadcastDelaySeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
322
|
+
capabilities: z.ZodObject<{
|
|
323
|
+
gustLull: z.ZodBoolean;
|
|
324
|
+
temperature: z.ZodBoolean;
|
|
325
|
+
conditions: z.ZodBoolean;
|
|
326
|
+
history: z.ZodBoolean;
|
|
327
|
+
live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
328
|
+
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
329
|
+
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
332
|
+
recommendedPollSeconds: z.ZodNumber;
|
|
310
333
|
status: z.ZodLiteral<"ok">;
|
|
311
334
|
reading: z.ZodObject<{
|
|
312
335
|
observedAt: z.ZodString;
|
|
@@ -325,10 +348,10 @@ declare const stationFeedSchema: z.ZodObject<{
|
|
|
325
348
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
326
349
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
327
350
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
328
|
-
unknown: "unknown";
|
|
329
351
|
falling: "falling";
|
|
330
352
|
rising: "rising";
|
|
331
353
|
steady: "steady";
|
|
354
|
+
unknown: "unknown";
|
|
332
355
|
}>>;
|
|
333
356
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
334
357
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
@@ -382,6 +405,7 @@ declare const stationFeedSchema: z.ZodObject<{
|
|
|
382
405
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
383
406
|
}, z.core.$strip>>;
|
|
384
407
|
}, z.core.$strip>>>>;
|
|
408
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
385
409
|
id: z.ZodString;
|
|
386
410
|
name: z.ZodString;
|
|
387
411
|
sourceLabel: z.ZodString;
|
|
@@ -406,17 +430,23 @@ declare const stationFeedSchema: z.ZodObject<{
|
|
|
406
430
|
}, z.core.$strip>;
|
|
407
431
|
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
408
432
|
recommendedPollSeconds: z.ZodNumber;
|
|
409
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
410
433
|
status: z.ZodLiteral<"unavailable">;
|
|
411
434
|
reason: z.ZodEnum<{
|
|
412
|
-
upstream_error: "upstream_error";
|
|
413
|
-
timeout: "timeout";
|
|
414
|
-
rate_limited: "rate_limited";
|
|
415
435
|
contract_break: "contract_break";
|
|
416
436
|
not_configured: "not_configured";
|
|
437
|
+
rate_limited: "rate_limited";
|
|
438
|
+
timeout: "timeout";
|
|
439
|
+
upstream_error: "upstream_error";
|
|
417
440
|
}>;
|
|
418
441
|
reading: z.ZodNull;
|
|
419
442
|
history: z.ZodNull;
|
|
443
|
+
}, z.core.$strip>], "status">>;
|
|
444
|
+
}, z.core.$strip>;
|
|
445
|
+
export type StationFeed = z.infer<typeof stationFeedSchema>;
|
|
446
|
+
export declare const stationCurrentSchema: z.ZodObject<{
|
|
447
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
448
|
+
servedAt: z.ZodString;
|
|
449
|
+
station: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
420
450
|
id: z.ZodString;
|
|
421
451
|
name: z.ZodString;
|
|
422
452
|
sourceLabel: z.ZodString;
|
|
@@ -441,13 +471,6 @@ declare const stationFeedSchema: z.ZodObject<{
|
|
|
441
471
|
}, z.core.$strip>;
|
|
442
472
|
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
443
473
|
recommendedPollSeconds: z.ZodNumber;
|
|
444
|
-
}, z.core.$strip>], "status">>;
|
|
445
|
-
}, z.core.$strip>;
|
|
446
|
-
type StationFeed = z.infer<typeof stationFeedSchema>;
|
|
447
|
-
declare const stationCurrentSchema: z.ZodObject<{
|
|
448
|
-
schemaVersion: z.ZodLiteral<2>;
|
|
449
|
-
servedAt: z.ZodString;
|
|
450
|
-
station: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
451
474
|
status: z.ZodLiteral<"ok">;
|
|
452
475
|
reading: z.ZodObject<{
|
|
453
476
|
observedAt: z.ZodString;
|
|
@@ -466,10 +489,10 @@ declare const stationCurrentSchema: z.ZodObject<{
|
|
|
466
489
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
467
490
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
468
491
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
469
|
-
unknown: "unknown";
|
|
470
492
|
falling: "falling";
|
|
471
493
|
rising: "rising";
|
|
472
494
|
steady: "steady";
|
|
495
|
+
unknown: "unknown";
|
|
473
496
|
}>>;
|
|
474
497
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
475
498
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
@@ -523,6 +546,7 @@ declare const stationCurrentSchema: z.ZodObject<{
|
|
|
523
546
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
524
547
|
}, z.core.$strip>>;
|
|
525
548
|
}, z.core.$strip>>>>;
|
|
549
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
526
550
|
id: z.ZodString;
|
|
527
551
|
name: z.ZodString;
|
|
528
552
|
sourceLabel: z.ZodString;
|
|
@@ -547,45 +571,20 @@ declare const stationCurrentSchema: z.ZodObject<{
|
|
|
547
571
|
}, z.core.$strip>;
|
|
548
572
|
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
549
573
|
recommendedPollSeconds: z.ZodNumber;
|
|
550
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
551
574
|
status: z.ZodLiteral<"unavailable">;
|
|
552
575
|
reason: z.ZodEnum<{
|
|
553
|
-
upstream_error: "upstream_error";
|
|
554
|
-
timeout: "timeout";
|
|
555
|
-
rate_limited: "rate_limited";
|
|
556
576
|
contract_break: "contract_break";
|
|
557
577
|
not_configured: "not_configured";
|
|
578
|
+
rate_limited: "rate_limited";
|
|
579
|
+
timeout: "timeout";
|
|
580
|
+
upstream_error: "upstream_error";
|
|
558
581
|
}>;
|
|
559
582
|
reading: z.ZodNull;
|
|
560
583
|
history: z.ZodNull;
|
|
561
|
-
id: z.ZodString;
|
|
562
|
-
name: z.ZodString;
|
|
563
|
-
sourceLabel: z.ZodString;
|
|
564
|
-
pageUrl: z.ZodNullable<z.ZodString>;
|
|
565
|
-
latitude: z.ZodNullable<z.ZodNumber>;
|
|
566
|
-
longitude: z.ZodNullable<z.ZodNumber>;
|
|
567
|
-
timeZone: z.ZodNullable<z.ZodString>;
|
|
568
|
-
elevationM: z.ZodNullable<z.ZodNumber>;
|
|
569
|
-
declaredFavorableDirections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
570
|
-
fromDeg: z.ZodNumber;
|
|
571
|
-
toDeg: z.ZodNumber;
|
|
572
|
-
}, z.core.$strip>>>>;
|
|
573
|
-
broadcastDelaySeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
574
|
-
capabilities: z.ZodObject<{
|
|
575
|
-
gustLull: z.ZodBoolean;
|
|
576
|
-
temperature: z.ZodBoolean;
|
|
577
|
-
conditions: z.ZodBoolean;
|
|
578
|
-
history: z.ZodBoolean;
|
|
579
|
-
live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
580
|
-
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
581
|
-
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
582
|
-
}, z.core.$strip>;
|
|
583
|
-
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
584
|
-
recommendedPollSeconds: z.ZodNumber;
|
|
585
584
|
}, z.core.$strip>], "status">;
|
|
586
585
|
}, z.core.$strip>;
|
|
587
|
-
type StationCurrent = z.infer<typeof stationCurrentSchema>;
|
|
588
|
-
declare const stationHistorySchema: z.ZodObject<{
|
|
586
|
+
export type StationCurrent = z.infer<typeof stationCurrentSchema>;
|
|
587
|
+
export declare const stationHistorySchema: z.ZodObject<{
|
|
589
588
|
schemaVersion: z.ZodLiteral<2>;
|
|
590
589
|
servedAt: z.ZodString;
|
|
591
590
|
stationId: z.ZodString;
|
|
@@ -607,14 +606,38 @@ declare const stationHistorySchema: z.ZodObject<{
|
|
|
607
606
|
}, z.core.$strip>>;
|
|
608
607
|
}, z.core.$strip>;
|
|
609
608
|
}, z.core.$strip>;
|
|
610
|
-
type StationHistory = z.infer<typeof stationHistorySchema>;
|
|
611
|
-
declare function parseStationHistory(value: unknown): StationHistory | null;
|
|
612
|
-
declare function parseStationHistoryJson(text: string): StationHistory | null;
|
|
613
|
-
declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
609
|
+
export type StationHistory = z.infer<typeof stationHistorySchema>;
|
|
610
|
+
export declare function parseStationHistory(value: unknown): StationHistory | null;
|
|
611
|
+
export declare function parseStationHistoryJson(text: string): StationHistory | null;
|
|
612
|
+
export declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
614
613
|
type: z.ZodLiteral<"init">;
|
|
615
614
|
schemaVersion: z.ZodLiteral<2>;
|
|
616
615
|
servedAt: z.ZodString;
|
|
617
616
|
station: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
617
|
+
id: z.ZodString;
|
|
618
|
+
name: z.ZodString;
|
|
619
|
+
sourceLabel: z.ZodString;
|
|
620
|
+
pageUrl: z.ZodNullable<z.ZodString>;
|
|
621
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
622
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
623
|
+
timeZone: z.ZodNullable<z.ZodString>;
|
|
624
|
+
elevationM: z.ZodNullable<z.ZodNumber>;
|
|
625
|
+
declaredFavorableDirections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
626
|
+
fromDeg: z.ZodNumber;
|
|
627
|
+
toDeg: z.ZodNumber;
|
|
628
|
+
}, z.core.$strip>>>>;
|
|
629
|
+
broadcastDelaySeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
630
|
+
capabilities: z.ZodObject<{
|
|
631
|
+
gustLull: z.ZodBoolean;
|
|
632
|
+
temperature: z.ZodBoolean;
|
|
633
|
+
conditions: z.ZodBoolean;
|
|
634
|
+
history: z.ZodBoolean;
|
|
635
|
+
live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
636
|
+
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
637
|
+
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
640
|
+
recommendedPollSeconds: z.ZodNumber;
|
|
618
641
|
status: z.ZodLiteral<"ok">;
|
|
619
642
|
reading: z.ZodObject<{
|
|
620
643
|
observedAt: z.ZodString;
|
|
@@ -633,10 +656,10 @@ declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
633
656
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
634
657
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
635
658
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
636
|
-
unknown: "unknown";
|
|
637
659
|
falling: "falling";
|
|
638
660
|
rising: "rising";
|
|
639
661
|
steady: "steady";
|
|
662
|
+
unknown: "unknown";
|
|
640
663
|
}>>;
|
|
641
664
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
642
665
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
@@ -690,6 +713,7 @@ declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
690
713
|
seaLevelPressureMaxHpa: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
691
714
|
}, z.core.$strip>>;
|
|
692
715
|
}, z.core.$strip>>>>;
|
|
716
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
693
717
|
id: z.ZodString;
|
|
694
718
|
name: z.ZodString;
|
|
695
719
|
sourceLabel: z.ZodString;
|
|
@@ -714,41 +738,16 @@ declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
714
738
|
}, z.core.$strip>;
|
|
715
739
|
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
716
740
|
recommendedPollSeconds: z.ZodNumber;
|
|
717
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
718
741
|
status: z.ZodLiteral<"unavailable">;
|
|
719
742
|
reason: z.ZodEnum<{
|
|
720
|
-
upstream_error: "upstream_error";
|
|
721
|
-
timeout: "timeout";
|
|
722
|
-
rate_limited: "rate_limited";
|
|
723
743
|
contract_break: "contract_break";
|
|
724
744
|
not_configured: "not_configured";
|
|
745
|
+
rate_limited: "rate_limited";
|
|
746
|
+
timeout: "timeout";
|
|
747
|
+
upstream_error: "upstream_error";
|
|
725
748
|
}>;
|
|
726
749
|
reading: z.ZodNull;
|
|
727
750
|
history: z.ZodNull;
|
|
728
|
-
id: z.ZodString;
|
|
729
|
-
name: z.ZodString;
|
|
730
|
-
sourceLabel: z.ZodString;
|
|
731
|
-
pageUrl: z.ZodNullable<z.ZodString>;
|
|
732
|
-
latitude: z.ZodNullable<z.ZodNumber>;
|
|
733
|
-
longitude: z.ZodNullable<z.ZodNumber>;
|
|
734
|
-
timeZone: z.ZodNullable<z.ZodString>;
|
|
735
|
-
elevationM: z.ZodNullable<z.ZodNumber>;
|
|
736
|
-
declaredFavorableDirections: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
737
|
-
fromDeg: z.ZodNumber;
|
|
738
|
-
toDeg: z.ZodNumber;
|
|
739
|
-
}, z.core.$strip>>>>;
|
|
740
|
-
broadcastDelaySeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
741
|
-
capabilities: z.ZodObject<{
|
|
742
|
-
gustLull: z.ZodBoolean;
|
|
743
|
-
temperature: z.ZodBoolean;
|
|
744
|
-
conditions: z.ZodBoolean;
|
|
745
|
-
history: z.ZodBoolean;
|
|
746
|
-
live: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
747
|
-
battery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
748
|
-
recentSummaries: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
749
|
-
}, z.core.$strip>;
|
|
750
|
-
samplingWindowSeconds: z.ZodNullable<z.ZodNumber>;
|
|
751
|
-
recommendedPollSeconds: z.ZodNumber;
|
|
752
751
|
}, z.core.$strip>], "status">;
|
|
753
752
|
}, z.core.$strip>, z.ZodObject<{
|
|
754
753
|
type: z.ZodLiteral<"samples">;
|
|
@@ -782,10 +781,10 @@ declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
782
781
|
precipitationRateMmPerHour: z.ZodNullable<z.ZodNumber>;
|
|
783
782
|
precipitationTodayMm: z.ZodNullable<z.ZodNumber>;
|
|
784
783
|
pressureTrend: z.ZodNullable<z.ZodEnum<{
|
|
785
|
-
unknown: "unknown";
|
|
786
784
|
falling: "falling";
|
|
787
785
|
rising: "rising";
|
|
788
786
|
steady: "steady";
|
|
787
|
+
unknown: "unknown";
|
|
789
788
|
}>>;
|
|
790
789
|
relativeHumidityPercent: z.ZodNullable<z.ZodNumber>;
|
|
791
790
|
seaLevelPressureHpa: z.ZodNullable<z.ZodNumber>;
|
|
@@ -825,26 +824,24 @@ declare const stationLiveFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
825
824
|
type: z.ZodLiteral<"unavailable">;
|
|
826
825
|
stationId: z.ZodString;
|
|
827
826
|
reason: z.ZodEnum<{
|
|
828
|
-
upstream_error: "upstream_error";
|
|
829
|
-
timeout: "timeout";
|
|
830
|
-
rate_limited: "rate_limited";
|
|
831
827
|
contract_break: "contract_break";
|
|
832
828
|
not_configured: "not_configured";
|
|
829
|
+
rate_limited: "rate_limited";
|
|
830
|
+
timeout: "timeout";
|
|
831
|
+
upstream_error: "upstream_error";
|
|
833
832
|
}>;
|
|
834
833
|
}, z.core.$strip>], "type">;
|
|
835
|
-
type StationLiveFrame = z.infer<typeof stationLiveFrameSchema>;
|
|
836
|
-
declare function parseStationFeed(value: unknown): StationFeed | null;
|
|
837
|
-
declare function parseStationFeedJson(text: string): StationFeed | null;
|
|
838
|
-
declare function parseStationCurrent(value: unknown): StationCurrent | null;
|
|
839
|
-
declare function parseStationCurrentJson(text: string): StationCurrent | null;
|
|
840
|
-
declare function parseStationLiveFrame(value: unknown): StationLiveFrame | null;
|
|
841
|
-
declare function parseStationLiveFrameJson(text: string): StationLiveFrame | null;
|
|
842
|
-
declare function emptyConditions(overrides?: Partial<AirConditions>): AirConditions;
|
|
843
|
-
declare function unavailableStation(meta: StationMeta, reason: UnavailableReason): Station;
|
|
834
|
+
export type StationLiveFrame = z.infer<typeof stationLiveFrameSchema>;
|
|
835
|
+
export declare function parseStationFeed(value: unknown): StationFeed | null;
|
|
836
|
+
export declare function parseStationFeedJson(text: string): StationFeed | null;
|
|
837
|
+
export declare function parseStationCurrent(value: unknown): StationCurrent | null;
|
|
838
|
+
export declare function parseStationCurrentJson(text: string): StationCurrent | null;
|
|
839
|
+
export declare function parseStationLiveFrame(value: unknown): StationLiveFrame | null;
|
|
840
|
+
export declare function parseStationLiveFrameJson(text: string): StationLiveFrame | null;
|
|
841
|
+
export declare function emptyConditions(overrides?: Partial<AirConditions>): AirConditions;
|
|
842
|
+
export declare function unavailableStation(meta: StationMeta, reason: UnavailableReason): Station;
|
|
844
843
|
/** The source's declared favorable sectors, or null when it declares nothing
|
|
845
844
|
* knowable. Data, not judgment: no component reads the meta field itself —
|
|
846
845
|
* a consumer opts in, e.g.
|
|
847
846
|
* `favorableDirections={declaredFavorableDirections(station) ?? ownArcs}`. */
|
|
848
|
-
declare function declaredFavorableDirections(station: StationMeta): DirectionArc[] | null;
|
|
849
|
-
//#endregion
|
|
850
|
-
export { AirConditions, History, HistoryPoint, LiveSample, LiveSamples, Reading, RecentSummary, STATION_SCHEMA_VERSION, Station, StationCapabilities, StationCurrent, StationFeed, StationHistory, StationLiveFrame, StationMeta, StationTelemetry, UNAVAILABLE_REASONS, UnavailableReason, airConditionsSchema, capabilitiesSchema, declaredFavorableDirections, directionArcSchema, emptyConditions, historyPointSchema, historySchema, liveSampleSchema, liveSamplesSchema, parseStationCurrent, parseStationCurrentJson, parseStationFeed, parseStationFeedJson, parseStationHistory, parseStationHistoryJson, parseStationLiveFrame, parseStationLiveFrameJson, readingSchema, recentSummarySchema, stationCurrentSchema, stationFeedSchema, stationHistorySchema, stationLiveFrameSchema, stationMetaSchema, stationSchema, telemetrySchema, unavailableStation };
|
|
847
|
+
export declare function declaredFavorableDirections(station: StationMeta): DirectionArc[] | null;
|
package/dist/contract.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { UPSTREAM_FAILURE_REASONS } from "@azohra/meteo.core";
|
|
3
|
-
|
|
3
|
+
// src/contract.ts
|
|
4
4
|
const STATION_SCHEMA_VERSION = 2;
|
|
5
5
|
const UNAVAILABLE_REASONS = [...UPSTREAM_FAILURE_REASONS, "not_configured"];
|
|
6
6
|
const isoTime = z.string().refine((value) => Number.isFinite(Date.parse(value)), { message: "not an ISO timestamp" }).meta({ format: "date-time" });
|
|
@@ -241,5 +241,4 @@ function unavailableStation(meta, reason) {
|
|
|
241
241
|
function declaredFavorableDirections(station) {
|
|
242
242
|
return station.declaredFavorableDirections ?? null;
|
|
243
243
|
}
|
|
244
|
-
//#endregion
|
|
245
244
|
export { STATION_SCHEMA_VERSION, UNAVAILABLE_REASONS, airConditionsSchema, capabilitiesSchema, declaredFavorableDirections, directionArcSchema, emptyConditions, historyPointSchema, historySchema, liveSampleSchema, liveSamplesSchema, parseStationCurrent, parseStationCurrentJson, parseStationFeed, parseStationFeedJson, parseStationHistory, parseStationHistoryJson, parseStationLiveFrame, parseStationLiveFrameJson, readingSchema, recentSummarySchema, stationCurrentSchema, stationFeedSchema, stationHistorySchema, stationLiveFrameSchema, stationMetaSchema, stationSchema, telemetrySchema, unavailableStation };
|
package/dist/derive.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { History, StationMeta } from "./contract.js";
|
|
2
2
|
import { normalizeDegrees } from "@azohra/meteo.core";
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare function
|
|
9
|
-
|
|
10
|
-
type SpeedThresholds = {
|
|
3
|
+
export declare const CALM_THRESHOLD_MPS = 0.5;
|
|
4
|
+
export declare function isCalm(speedMps: number): boolean;
|
|
5
|
+
export declare const SPEED_UNITS: readonly ["kmh", "knots", "mph", "mps"];
|
|
6
|
+
export type SpeedUnit = (typeof SPEED_UNITS)[number];
|
|
7
|
+
export declare function speedFromMps(mps: number, unit: SpeedUnit): number;
|
|
8
|
+
export declare function speedToMps(value: number, unit: SpeedUnit): number;
|
|
9
|
+
export type SpeedThresholds = {
|
|
11
10
|
unit: SpeedUnit;
|
|
12
11
|
values: readonly number[];
|
|
13
12
|
};
|
|
14
|
-
declare function thresholdsToMps(thresholds: SpeedThresholds): number[];
|
|
15
|
-
declare function speedUnitLabel(unit: SpeedUnit): string;
|
|
16
|
-
declare const COMPASS_POINTS: readonly ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"];
|
|
17
|
-
type CompassPoint = (typeof COMPASS_POINTS)[number];
|
|
18
|
-
declare function compassDirection(bearingDeg: number): CompassPoint;
|
|
19
|
-
type PeriodSummary = {
|
|
13
|
+
export declare function thresholdsToMps(thresholds: SpeedThresholds): number[];
|
|
14
|
+
export declare function speedUnitLabel(unit: SpeedUnit): string;
|
|
15
|
+
export declare const COMPASS_POINTS: readonly ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"];
|
|
16
|
+
export type CompassPoint = (typeof COMPASS_POINTS)[number];
|
|
17
|
+
export declare function compassDirection(bearingDeg: number): CompassPoint;
|
|
18
|
+
export type PeriodSummary = {
|
|
20
19
|
windAvgMps: number;
|
|
21
20
|
peakGustMps: number | null;
|
|
22
21
|
peakGustAt: string | null;
|
|
@@ -28,20 +27,20 @@ type PeriodSummary = {
|
|
|
28
27
|
temperatureLowAt: string | null;
|
|
29
28
|
windRunKm: number;
|
|
30
29
|
};
|
|
31
|
-
declare function periodSummary(history: History): PeriodSummary | null;
|
|
32
|
-
declare function seaLevelPressureHpa(stationPressureHpa: number, elevationM: number, temperatureC?: number | null): number;
|
|
33
|
-
type PressureTendency = "falling" | "rising" | "steady";
|
|
30
|
+
export declare function periodSummary(history: History): PeriodSummary | null;
|
|
31
|
+
export declare function seaLevelPressureHpa(stationPressureHpa: number, elevationM: number, temperatureC?: number | null): number;
|
|
32
|
+
export type PressureTendency = "falling" | "rising" | "steady";
|
|
34
33
|
/** The signed sea-level pressure change over the trailing window, hPa —
|
|
35
34
|
* the number behind the tendency word. The reference is the carried point
|
|
36
35
|
* nearest the window's start, and a record covering under 60% of the
|
|
37
36
|
* window returns null rather than a delta over a shorter span. */
|
|
38
|
-
declare function pressureDeltaHpa(points: ReadonlyArray<{
|
|
37
|
+
export declare function pressureDeltaHpa(points: ReadonlyArray<{
|
|
39
38
|
observedAt: string;
|
|
40
39
|
seaLevelPressureHpa?: number | null;
|
|
41
40
|
}>, { windowHours }?: {
|
|
42
41
|
windowHours?: number;
|
|
43
42
|
}): number | null;
|
|
44
|
-
declare function pressureTendency(points: ReadonlyArray<{
|
|
43
|
+
export declare function pressureTendency(points: ReadonlyArray<{
|
|
45
44
|
observedAt: string;
|
|
46
45
|
seaLevelPressureHpa?: number | null;
|
|
47
46
|
}>, { windowHours, thresholdHpa }?: {
|
|
@@ -52,7 +51,7 @@ declare function pressureTendency(points: ReadonlyArray<{
|
|
|
52
51
|
* sunset to the latest sunrise, from real astronomy. Null without
|
|
53
52
|
* coordinates (never a guessed night), under a polar sky, or when no
|
|
54
53
|
* carried temperature falls inside the window. */
|
|
55
|
-
declare function lastNightLowC(points: ReadonlyArray<{
|
|
54
|
+
export declare function lastNightLowC(points: ReadonlyArray<{
|
|
56
55
|
observedAt: string;
|
|
57
56
|
temperatureC?: number | null;
|
|
58
57
|
}>, latitude: number | null, longitude: number | null, nowMs: number): {
|
|
@@ -60,17 +59,16 @@ declare function lastNightLowC(points: ReadonlyArray<{
|
|
|
60
59
|
fromMs: number;
|
|
61
60
|
toMs: number;
|
|
62
61
|
} | null;
|
|
63
|
-
type FreshnessStatus = "live" | "aging" | "stale";
|
|
64
|
-
type FreshnessThresholds = {
|
|
62
|
+
export type FreshnessStatus = "live" | "aging" | "stale";
|
|
63
|
+
export type FreshnessThresholds = {
|
|
65
64
|
currentForMs: number;
|
|
66
65
|
staleAfterMs: number;
|
|
67
66
|
};
|
|
68
|
-
declare function stationFreshnessThresholds(meta: Pick<StationMeta, "recommendedPollSeconds">): FreshnessThresholds;
|
|
69
|
-
declare function freshness(input: {
|
|
67
|
+
export declare function stationFreshnessThresholds(meta: Pick<StationMeta, "recommendedPollSeconds">): FreshnessThresholds;
|
|
68
|
+
export declare function freshness(input: {
|
|
70
69
|
observedAt: string;
|
|
71
70
|
servedAt: string;
|
|
72
71
|
receivedAtMs: number;
|
|
73
72
|
nowMs: number;
|
|
74
73
|
}, thresholds?: FreshnessThresholds): FreshnessStatus;
|
|
75
|
-
|
|
76
|
-
export { CALM_THRESHOLD_MPS, COMPASS_POINTS, CompassPoint, FreshnessStatus, FreshnessThresholds, PeriodSummary, PressureTendency, SPEED_UNITS, SpeedThresholds, SpeedUnit, compassDirection, freshness, isCalm, lastNightLowC, normalizeDegrees, periodSummary, pressureDeltaHpa, pressureTendency, seaLevelPressureHpa, speedFromMps, speedToMps, speedUnitLabel, stationFreshnessThresholds, thresholdsToMps };
|
|
74
|
+
export { normalizeDegrees };
|