kmw-sdk 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,3619 @@
1
+ /**
2
+ * HTTP Basic authentication. **Enterprise only**: the API documents it as
3
+ * "currently for internal and enterprise use only". Use it only if Meteologix
4
+ * told you to.
5
+ */
6
+ interface BasicAuth {
7
+ readonly type: "basic";
8
+ /** User name. Must not contain a colon (RFC 7617). */
9
+ readonly username: string;
10
+ readonly password: string;
11
+ }
12
+ /**
13
+ * HTTP Bearer authentication with a token issued by Meteologix. **Enterprise
14
+ * only**: the API documents it as "currently for internal and enterprise use
15
+ * only". Use it only if Meteologix told you to.
16
+ */
17
+ interface BearerAuth {
18
+ readonly type: "bearer";
19
+ /** The token, sent as `Authorization: Bearer <token>`. */
20
+ readonly token: string;
21
+ }
22
+ /**
23
+ * Alternative authentication for enterprise customers. Everyone else
24
+ * authenticates with an API key.
25
+ */
26
+ type EnterpriseAuth = BasicAuth | BearerAuth;
27
+ /**
28
+ * The header that carries the credentials.
29
+ * @internal
30
+ */
31
+ interface Credentials {
32
+ readonly header: "X-API-Key" | "Authorization";
33
+ readonly value: string;
34
+ }
35
+ /**
36
+ * Rate-limit state as reported by the API in its response headers.
37
+ *
38
+ * The Hobby plan allows 120 requests per minute and 700 requests per day;
39
+ * Business Starter allows 250 requests per minute.
40
+ */
41
+ interface RateLimitInfo {
42
+ /** Value of `x-ratelimit-limit`: the request quota of the current window. */
43
+ readonly limit?: number;
44
+ /** Value of `x-ratelimit-remaining`: requests left in the current window. */
45
+ readonly remaining?: number;
46
+ /** Value of `x-ratelimit-retry-after`: when requests are allowed again after hitting the limit. */
47
+ readonly retryAfter?: Date;
48
+ }
49
+ /** Default API base URL. */
50
+ export declare const DEFAULT_BASE_URL = "https://api.kachelmannwetter.com/v02";
51
+ /** Default per-attempt timeout in milliseconds. */
52
+ export declare const DEFAULT_TIMEOUT = 1e4;
53
+ /**
54
+ * Retry behaviour for transient failures (connection errors, timeouts,
55
+ * HTTP 429 and 5xx). Retries are **disabled by default** because the Hobby
56
+ * plan has a daily request limit.
57
+ */
58
+ interface RetryOptions {
59
+ /** Number of retries after the first attempt. Default: `0`. */
60
+ readonly retries?: number;
61
+ /** Base delay for exponential backoff in ms. Default: `500`. */
62
+ readonly minDelay?: number;
63
+ /**
64
+ * Upper bound for a single delay in ms. Default: `10_000`. A 429 response
65
+ * whose `x-ratelimit-retry-after` lies further in the future is not retried.
66
+ */
67
+ readonly maxDelay?: number;
68
+ }
69
+ /**
70
+ * A query parameter value. Arrays and objects are encoded with PHP-style
71
+ * brackets, e.g. `{ threshold: { temp: 0.1 } }` → `threshold[temp]=0.1` and
72
+ * `{ year: [2025, 2026] }` → `year[0]=2025&year[1]=2026`.
73
+ */
74
+ type QueryValue = string | number | boolean | undefined | readonly QueryValue[] | {
75
+ readonly [key: string]: QueryValue;
76
+ };
77
+ interface RequestOptions {
78
+ /** Aborts the request. The signal's reason is re-thrown unchanged. */
79
+ readonly signal?: AbortSignal | undefined;
80
+ /** Per-attempt timeout in ms; overrides the client default. */
81
+ readonly timeout?: number | undefined;
82
+ }
83
+ /**
84
+ * How a request authenticates (API key, or enterprise Basic/Bearer auth):
85
+ * - `"required"`: send the credentials; fail with {@link MissingApiKeyError}
86
+ * before any network traffic if none are configured.
87
+ * - `"optional"`: send the credentials if some are configured.
88
+ * - `"none"`: never send credentials (endpoints that are public).
89
+ */
90
+ type AuthMode = "required" | "optional" | "none";
91
+ interface InternalRequest extends RequestOptions {
92
+ readonly path: string;
93
+ /** Default: `"required"`. */
94
+ readonly auth?: AuthMode;
95
+ readonly query?: Readonly<Record<string, QueryValue>>;
96
+ readonly accept?: string;
97
+ readonly responseType?: "json" | "text";
98
+ }
99
+ interface HttpClientConfig {
100
+ readonly credentials: Credentials | undefined;
101
+ readonly baseUrl: string;
102
+ readonly timeout: number;
103
+ readonly retry: Required<RetryOptions>;
104
+ readonly fetch: typeof fetch;
105
+ readonly headers: Readonly<Record<string, string>>;
106
+ }
107
+ /**
108
+ * Thin `fetch` wrapper: auth header, timeout, abort, retries and error mapping.
109
+ * @internal
110
+ */
111
+ declare class HttpClient {
112
+ #private;
113
+ constructor(config: HttpClientConfig);
114
+ /** Rate-limit headers of the most recent response, if the API sent any. */
115
+ get rateLimit(): RateLimitInfo | undefined;
116
+ /** Absolute URL for a path, without credentials. */
117
+ url(path: string, query?: Readonly<Record<string, QueryValue>>): string;
118
+ get<T>(request: InternalRequest): Promise<T>;
119
+ }
120
+ /**
121
+ * System of units for forecast and current-weather values.
122
+ *
123
+ * | Quantity | `metric` | `imperial` |
124
+ * | ------------- | ----------------------- | ------------------------ |
125
+ * | Temperature | °C | °F |
126
+ * | Wind speed | **m/s** (not km/h!) | mph |
127
+ * | Precipitation | mm | inch |
128
+ * | Snow amount | mm water equivalent | inch water equivalent |
129
+ * | Snow height | m | inch |
130
+ * | Altitude | m | ft |
131
+ *
132
+ * Station observations ignore this setting: they are always metric with wind
133
+ * speeds in **knots**.
134
+ */
135
+ type UnitSystem = "metric" | "imperial";
136
+ /** A position with `lat`/`lon` keys, as used by this API. */
137
+ interface LatLon {
138
+ /** Latitude in decimal degrees (WGS 84), −90 … 90. */
139
+ readonly lat: number;
140
+ /** Longitude in decimal degrees (WGS 84), −180 … 180. */
141
+ readonly lon: number;
142
+ }
143
+ /** A position with `lat`/`lng` keys, as used by Google Maps, Leaflet and Mapbox. */
144
+ interface LatLng {
145
+ /** Latitude in decimal degrees (WGS 84), −90 … 90. */
146
+ readonly lat: number;
147
+ /** Longitude in decimal degrees (WGS 84), −180 … 180. */
148
+ readonly lng: number;
149
+ }
150
+ /**
151
+ * A geographic position in decimal degrees (WGS 84). Both `{ lat, lon }` and
152
+ * `{ lat, lng }` are accepted, so map library objects and API responses can be
153
+ * passed directly.
154
+ */
155
+ type Coordinates = LatLon | LatLng;
156
+ /** ISO 8601 date-time string, e.g. `"2022-01-01T12:00:00+00:00"`. */
157
+ type DateTimeString = string;
158
+ /** ISO 8601 calendar date, e.g. `"2022-01-01"`. */
159
+ type DateString = string;
160
+ /**
161
+ * Horizontal resolution of the forecast model that produced a forecast.
162
+ *
163
+ * | Value | Resolution |
164
+ * | ------------ | ---------- |
165
+ * | `STANDARD` | ≥ ~10 km |
166
+ * | `HIGH` | ≥ ~4 km |
167
+ * | `SUPER_HIGH` | < ~4 km |
168
+ */
169
+ type ModelResolution = "STANDARD" | "HIGH" | "SUPER_HIGH";
170
+ /** Weather symbols currently documented by the API (without the `_night` suffix). */
171
+ type WeatherSymbolBase = "cloudy" | "fog" | "freezingrain" | "overcast" | "partlycloudy" | "rain" | "raindrizzle" | "rainheavy" | "severethunderstorm" | "showers" | "showersheavy" | "snow" | "snowheavy" | "snowrain" | "snowrainshowers" | "snowshowers" | "snowshowersheavy" | "sunshine" | "thunderstorm" | "wind";
172
+ /**
173
+ * A symbol describing the weather situation, e.g. `"partlycloudy"` or
174
+ * `"rain_night"`. Unknown future symbols are still accepted as plain strings.
175
+ * Use `client.tools.weatherSymbol()` to get the matching SVG.
176
+ */
177
+ type WeatherSymbol = WeatherSymbolBase | `${WeatherSymbolBase}_night` | (string & {});
178
+ /**
179
+ * Forecast models that can be requested explicitly. Omit the option to let
180
+ * the API choose the best available model for the location.
181
+ */
182
+ type ForecastModel = "ALL" | "AUSTRALIA" | "CANADA" | "DWD-MOSMIX" | "ECMWF" | "ECMWF_RAPID1H" | "GFS" | "HARMONIE" | "HRRR" | "ICON-D2" | "ICON-RUC" | "ICON00625" | "ICONWORLD" | "MULTIMOD" | "MULTIMOD-CEUR" | "SWISS1X1" | "SWISS1X1-MOS" | "SWISS1X1-NOW" | "SWISS4X4" | "SWISS4X4NOWCAST" | "SWISSMRF" | "UKMO" | (string & {});
183
+ /** A weather risk flagged for a day or part of a day. */
184
+ interface WeatherRisk {
185
+ /** Kind of risk. */
186
+ readonly type: "wind" | "weather";
187
+ readonly weatherSymbol: WeatherSymbol | null;
188
+ }
189
+ /** Fields shared by all forecast responses. */
190
+ interface ForecastMeta<U extends UnitSystem = UnitSystem> {
191
+ /** Latitude used for the forecast. */
192
+ readonly lat: number;
193
+ /** Longitude used for the forecast. */
194
+ readonly lon: number;
195
+ /** Altitude used for the forecast. Unit: m (metric) · ft (imperial). */
196
+ readonly alt?: number | null;
197
+ /** IANA time zone of the location, e.g. `"Europe/Berlin"`. */
198
+ readonly timeZone: string;
199
+ /** System of units of all values in this response. */
200
+ readonly systemOfUnits: U;
201
+ /** Model run the forecast is based on. */
202
+ readonly run: DateTimeString;
203
+ }
204
+ /** Options accepted by every method. */
205
+ type CallOptions = RequestOptions;
206
+ /**
207
+ * Pass `{ raw: true }` to get the response exactly as the API sent it, typed
208
+ * after the OpenAPI spec, without normalization.
209
+ */
210
+ interface RawOption {
211
+ readonly raw: true;
212
+ }
213
+ /** The default: normalized responses. */
214
+ interface NormalizedOption {
215
+ /** `true` returns the unmodified API response. Default: `false`. */
216
+ readonly raw?: false | undefined;
217
+ }
218
+ /** Options of methods whose response depends on the system of units. */
219
+ interface UnitOptions<V extends UnitSystem> extends RequestOptions {
220
+ /** Overrides the client's `units` for this call. */
221
+ readonly units?: V;
222
+ }
223
+ /**
224
+ * Types of the **experimental** climate endpoints (`client.climate`).
225
+ *
226
+ * These endpoints power the climate time series on kachelmannwetter.com and
227
+ * are **not part of the documented v02 API**. Shapes are passed through
228
+ * largely as the API returns them (including snake_case keys) and may change
229
+ * without notice.
230
+ * @module
231
+ */
232
+ /**
233
+ * Climate parameter:
234
+ *
235
+ * | Value | Meaning | Unit |
236
+ * | -------- | -------------------- | ---- |
237
+ * | `tlmean` | mean air temperature | °C |
238
+ * | `rrsum` | precipitation sum | mm |
239
+ * | `shsum` | sunshine duration | h |
240
+ */
241
+ type ClimateParameter = "tlmean" | "rrsum" | "shsum";
242
+ /** A 30-year reference period such as `"1961-1990"` or `"1991-2020"`. */
243
+ type ClimatePeriod = string;
244
+ /** Season used by `climate.stripes({ by: "bySeason" })`. */
245
+ type ClimateSeason = "spring" | "summer" | "autumn" | "winter";
246
+ /** `absolute` values, or the `difference` to the reference period. */
247
+ type ClimateValueType = "absolute" | "difference";
248
+ /** A span of years with data: `x` = first year, `x2` = last year (inclusive). */
249
+ interface ClimateYearSpan {
250
+ readonly x: number;
251
+ readonly x2: number;
252
+ }
253
+ /** Years with data per parameter. */
254
+ type ClimateAvailability = Readonly<Partial<Record<ClimateParameter, ClimateYearSpan[]>>>;
255
+ /** A station of `climate.stations()`. */
256
+ interface ClimateMapStation {
257
+ /** Data source, e.g. `"dwd_daily"`. */
258
+ readonly member: string;
259
+ /** ISO 3166-1 alpha-2 country code. */
260
+ readonly country: string;
261
+ /** Climate station ID for the other `climate` methods, e.g. `"dwd-00000"`. */
262
+ readonly station: string;
263
+ /** Display name. */
264
+ readonly title: string;
265
+ readonly lat: number;
266
+ readonly lon: number;
267
+ /** First day with data, e.g. `"1891-01-01 00:00:00+00"`. */
268
+ readonly start: string;
269
+ /** Highest temperature on record. Unit: °C. */
270
+ readonly max?: number | null;
271
+ /** Date of `max`. */
272
+ readonly max_time?: string | null;
273
+ /** Number of years with data. */
274
+ readonly years: number;
275
+ /** Share of available data, 0–1. */
276
+ readonly availability: number;
277
+ /** Data quality, 0–1. */
278
+ readonly quality: number;
279
+ readonly details?: ClimateAvailability;
280
+ }
281
+ /** A large city, shown on the climate map for orientation. */
282
+ interface ClimateCity {
283
+ readonly name: string;
284
+ readonly lat: number;
285
+ /** Longitude (named `lng` by the API). */
286
+ readonly lng: number;
287
+ readonly country: string;
288
+ readonly population: number;
289
+ }
290
+ /** Response of `climate.stations()`. */
291
+ interface ClimateStationList {
292
+ readonly stations: ClimateMapStation[];
293
+ readonly cities: ClimateCity[];
294
+ }
295
+ /** One hit of `climate.search()`. */
296
+ interface ClimateSearchResult {
297
+ /** Climate station ID for the other `climate` methods, e.g. `"dwd-00000"`. */
298
+ readonly name: string;
299
+ /** Display name. */
300
+ readonly title: string;
301
+ /** Internal numeric station ID. */
302
+ readonly station_id: number;
303
+ /** Data source, e.g. `"dwd_daily"`. */
304
+ readonly member: string;
305
+ /** ISO 3166-1 alpha-2 country code. */
306
+ readonly country: string;
307
+ /** First year with data. */
308
+ readonly start: number;
309
+ /** Last year with data. */
310
+ readonly end: number;
311
+ readonly years: number;
312
+ readonly actual_years: number;
313
+ /** Years with temperature data. */
314
+ readonly tlmean_avail?: number;
315
+ /** Years with precipitation data. */
316
+ readonly rrsum_avail?: number;
317
+ /** Distance to the matched place. Unit: **m**. `0` for a direct match. */
318
+ readonly distance: number;
319
+ /** `"m"` = the station itself matched, `"r"` = station near a matching place. */
320
+ readonly feature: string;
321
+ /** `"direct_match"` or the name of the matching place. */
322
+ readonly source: string;
323
+ readonly source_type: number;
324
+ readonly number_max?: number;
325
+ readonly match_type: number;
326
+ }
327
+ /** A filter of a climate chart, as used by the website's controls. */
328
+ interface ClimateFilter {
329
+ /** Query parameter(s) the filter sets, e.g. `["start", "end"]` or `"seasons"`. */
330
+ readonly param: string | string[];
331
+ /** Control type, e.g. `"year-span"`, `"select"`, `"toggle"`, `"year"`, `"year-multiselect"`. */
332
+ readonly type: string;
333
+ readonly name: string;
334
+ readonly config: {
335
+ readonly from?: number;
336
+ readonly to?: number;
337
+ readonly default?: unknown;
338
+ /** Maximum number of selected values. */
339
+ readonly limit?: number;
340
+ readonly values?: string[];
341
+ };
342
+ }
343
+ /** A chart type a climate station supports, with its parameters and filters. */
344
+ interface ClimateCapability {
345
+ /** Localized display name. */
346
+ readonly name: string;
347
+ readonly type: "stripes" | "heatmap" | "spaghetti" | (string & {});
348
+ readonly parameters: {
349
+ /** Reference periods available for this parameter. */
350
+ readonly climatePeriods: ClimatePeriod[];
351
+ readonly type: ClimateParameter;
352
+ /** Localized display name. */
353
+ readonly name: string;
354
+ /** `"sum"` for totals (precipitation, sunshine), `"none"` for means. */
355
+ readonly aggregation: "none" | "sum" | (string & {});
356
+ }[];
357
+ readonly filters: {
358
+ /** Grouping, e.g. `"byYear"`, `"bySeason"`, `"byMonth"`, `"daily"`. */
359
+ readonly groupType: string;
360
+ readonly filters: ClimateFilter[];
361
+ }[];
362
+ }
363
+ /** A record value of a climate station. */
364
+ interface ClimateRecord {
365
+ /** Unit of `temp`, e.g. `"°C"` or `"mm"`. */
366
+ readonly unit: string;
367
+ /** The record value (named `temp` for every record type). */
368
+ readonly temp: number;
369
+ /** When the record happened. */
370
+ readonly date: string;
371
+ /** Display format hint, e.g. for monthly records. */
372
+ readonly format?: string;
373
+ }
374
+ /** Response of `climate.station()`. */
375
+ interface ClimateStation {
376
+ readonly station: {
377
+ readonly details: {
378
+ /** Climate station ID, e.g. `"dwd-00000"`. */
379
+ readonly name: string;
380
+ readonly title: string;
381
+ /** Country name. */
382
+ readonly country: string;
383
+ readonly start: string;
384
+ readonly end: string;
385
+ /** Available reference periods. */
386
+ readonly references: ClimatePeriod[];
387
+ readonly region?: string | null;
388
+ readonly source: string;
389
+ readonly id: string;
390
+ };
391
+ readonly capabilities: ClimateCapability[];
392
+ readonly observations: ClimateAvailability;
393
+ readonly stationId: string;
394
+ };
395
+ readonly records: {
396
+ /** Highest temperature. */
397
+ readonly max_temp?: ClimateRecord;
398
+ /** Lowest temperature. */
399
+ readonly min_temp?: ClimateRecord;
400
+ /** Highest daily precipitation. */
401
+ readonly rain_day?: ClimateRecord;
402
+ /** Highest monthly precipitation. */
403
+ readonly rain_avg_month?: ClimateRecord;
404
+ readonly [key: string]: ClimateRecord | undefined;
405
+ };
406
+ }
407
+ /** The request parameters as echoed back by the API. */
408
+ type ClimateRequestEcho = Readonly<Record<string, unknown>>;
409
+ /**
410
+ * Response of `climate.stripes()` ("warming stripes").
411
+ *
412
+ * Each `matrix` row is `[year, categoryIndex, value]`, where `categoryIndex`
413
+ * points into `categories`. Value unit: see {@link ClimateParameter}.
414
+ */
415
+ interface ClimateStripes {
416
+ readonly categories: string[];
417
+ readonly matrix: [year: number, categoryIndex: number, value: number | null][];
418
+ readonly request: ClimateRequestEcho;
419
+ }
420
+ /**
421
+ * Response of `climate.heatmap()`. Value unit: see {@link ClimateParameter}.
422
+ *
423
+ * - `monthly`: `[year, month (1–12), value]`
424
+ * - `seasonal`: `[year, season (0 = spring, 1 = summer, 2 = autumn, 3 = winter), value]`
425
+ * - `yearly`: `[year, 1, value]`
426
+ */
427
+ interface ClimateHeatmap {
428
+ readonly type: ClimateValueType;
429
+ readonly param: ClimateParameter;
430
+ readonly matrix: {
431
+ readonly monthly?: [year: number, month: number, value: number | null][];
432
+ readonly seasonal?: [year: number, season: number, value: number | null][];
433
+ readonly yearly?: [year: number, index: number, value: number | null][];
434
+ };
435
+ readonly request: ClimateRequestEcho;
436
+ }
437
+ /** A daily series of one year. Points are `[dayOfYear (1–366), value]`. */
438
+ interface ClimateDailySeries {
439
+ /** The year. */
440
+ readonly name: number;
441
+ /** Whether this year was requested in `comparedYears`. */
442
+ readonly selected: boolean;
443
+ readonly data: [dayOfYear: number, value: number | null][];
444
+ }
445
+ /** Response of `climate.spaghetti()`: one line per year plus the reference period. */
446
+ interface ClimateSpaghetti {
447
+ readonly series: ClimateDailySeries[];
448
+ readonly reference: {
449
+ /** Reference period, e.g. `"1961-1990"`. */
450
+ readonly name: ClimatePeriod;
451
+ readonly data: [dayOfYear: number, value: number | null][];
452
+ };
453
+ readonly request: ClimateRequestEcho;
454
+ }
455
+ interface ClimateChartOptions extends CallOptions {
456
+ /** `tlmean` (°C), `rrsum` (mm) or `shsum` (h). */
457
+ readonly param: ClimateParameter;
458
+ /** First year. */
459
+ readonly start?: number;
460
+ /** Last year. */
461
+ readonly end?: number;
462
+ /** Reference period, e.g. `"1961-1990"`. See `station().station.details.references`. */
463
+ readonly reference?: ClimatePeriod;
464
+ /** `absolute` values or the `difference` to the reference period. */
465
+ readonly type?: ClimateValueType;
466
+ }
467
+ /** Options of `climate.stripes()`. */
468
+ interface ClimateStripesOptions extends ClimateChartOptions {
469
+ /** One stripe per year (`byYear`, default) or per year for one season (`bySeason`). */
470
+ readonly by?: "byYear" | "bySeason";
471
+ /** Season for `by: "bySeason"`. */
472
+ readonly season?: ClimateSeason;
473
+ }
474
+ /** Options of `climate.heatmap()`. */
475
+ interface ClimateHeatmapOptions extends ClimateChartOptions {
476
+ /** `byYear` (default): all years; `byMonth`: the months of `year`. */
477
+ readonly by?: "byYear" | "byMonth";
478
+ /** Year for `by: "byMonth"`. */
479
+ readonly year?: number;
480
+ }
481
+ /** Options of `climate.spaghetti()`. */
482
+ interface ClimateSpaghettiOptions extends ClimateChartOptions {
483
+ /** Years to highlight (`selected: true`), at most 5. */
484
+ readonly comparedYears?: readonly number[];
485
+ }
486
+ /**
487
+ * **Experimental.** Climate time series (warming stripes, heatmaps, daily
488
+ * curves) of long-term stations. Access via `client.experimental.climate`.
489
+ *
490
+ * These endpoints are **not part of the documented v02 API**: they power the
491
+ * climate pages of kachelmannwetter.com and may change or disappear at any
492
+ * time. They are called with *your* API key. In a live test (November 2026)
493
+ * a regular customer key was rejected with `PermissionDeniedError` (403).
494
+ *
495
+ * @experimental
496
+ */
497
+ declare class ClimateResource {
498
+ #private;
499
+ /** @internal */
500
+ constructor(http: HttpClient);
501
+ /** Climate stations of a country, plus large cities for orientation. */
502
+ stations(country: string, options?: CallOptions): Promise<ClimateStationList>;
503
+ /** Finds climate stations by station or place name. */
504
+ search(query: string, options?: CallOptions): Promise<ClimateSearchResult[]>;
505
+ /** Station details, supported charts, data availability and records. */
506
+ station(stationId: string, options?: CallOptions): Promise<ClimateStation>;
507
+ /** Warming stripes: one value per year (or per season of each year). */
508
+ stripes(stationId: string, options: ClimateStripesOptions): Promise<ClimateStripes>;
509
+ /** Heatmap of monthly, seasonal and yearly values. */
510
+ heatmap(stationId: string, options: ClimateHeatmapOptions): Promise<ClimateHeatmap>;
511
+ /** Daily values of each year ("spaghetti" chart) plus the reference period. */
512
+ spaghetti(stationId: string, options: ClimateSpaghettiOptions): Promise<ClimateSpaghetti>;
513
+ }
514
+ /**
515
+ * Forecast resolution. It also determines how far the forecast reaches:
516
+ *
517
+ * | `timeSteps` | Forecast horizon |
518
+ * | ----------- | ---------------- |
519
+ * | `"1h"` | up to 24 hours |
520
+ * | `"3h"` | up to 120 hours |
521
+ * | `"6h"` | up to 240 hours |
522
+ */
523
+ type ForecastTimeSteps = "1h" | "3h" | "6h";
524
+ /**
525
+ * One time step of the standard parameter package.
526
+ *
527
+ * Values marked "preceding timespan" cover the interval that ends at
528
+ * `dateTime` and whose length is the requested `timeSteps`.
529
+ */
530
+ interface StandardForecastEntry {
531
+ /** Valid time of the values. */
532
+ readonly dateTime: DateTimeString;
533
+ /** Whether it is daytime at `dateTime`. */
534
+ readonly isDay: boolean;
535
+ /** Air temperature 2 m above ground at `dateTime`. Unit: °C (metric) · °F (imperial). */
536
+ readonly temp: number;
537
+ /** Dew point at `dateTime`. Unit: °C (metric) · °F (imperial). */
538
+ readonly dewpoint?: number | null;
539
+ /** Air pressure reduced to mean sea level at `dateTime`. Unit: hPa (both systems). */
540
+ readonly pressureMsl?: number | null;
541
+ /** Relative humidity. Unit: % (0–100). */
542
+ readonly humidityRelative?: number | null;
543
+ /**
544
+ * Average wind speed over the preceding timespan.
545
+ * Unit: **m/s** (metric) · mph (imperial). Multiply m/s by 3.6 for km/h,
546
+ * see `mpsToKmh()`.
547
+ */
548
+ readonly windSpeed?: number | null;
549
+ /** Direction the wind blows from, in degrees (0 = N, 90 = E, 180 = S, 270 = W). */
550
+ readonly windDirection?: number | null;
551
+ /** Wind gust speed over the preceding timespan. Unit: **m/s** (metric) · mph (imperial). */
552
+ readonly windGust?: number | null;
553
+ /** Maximum wind gust speed over the last 3 hours. Unit: **m/s** (metric) · mph (imperial). */
554
+ readonly windGust3h?: number | null;
555
+ /**
556
+ * Effective cloud coverage over the preceding timespan, in % (0–100). Low
557
+ * clouds are weighted more than high clouds.
558
+ */
559
+ readonly cloudCoverage?: number | null;
560
+ /** Sunshine duration in the preceding timespan, in hours (`0.5` = 30 minutes). */
561
+ readonly sunHours?: number | null;
562
+ /**
563
+ * Precipitation (rain and snow) in the current time step, i.e. within the
564
+ * last 1 h / 3 h / 6 h depending on `timeSteps`. Unit: mm (metric) · inch (imperial).
565
+ */
566
+ readonly precCurrent?: number | null;
567
+ /** Precipitation (rain and snow) over the previous 6 hours, if available. Unit: mm · inch. */
568
+ readonly prec6h?: number | null;
569
+ /**
570
+ * Amount of snow as **water equivalent** (kg/m²). This is *not* a snow
571
+ * depth: 1 mm water equivalent is very roughly 1 cm of fresh snow, but the
572
+ * ratio varies a lot. Unit: mm water equivalent (metric) · inch water
573
+ * equivalent (imperial).
574
+ *
575
+ * **Unconfirmed:** the spec does not state the time window of this field
576
+ * (unlike `snowAmount6h`/`12h`/`24h` in the advanced package). It most likely
577
+ * refers to the current time step like `precCurrent`, but this has not been
578
+ * verified.
579
+ */
580
+ readonly snowAmount?: number | null;
581
+ /** Snow depth on the ground. Unit: **m** (metric) · inch (imperial). */
582
+ readonly snowHeight?: number | null;
583
+ }
584
+ /** One time step of the advanced parameter package. */
585
+ interface AdvancedForecastEntry extends StandardForecastEntry {
586
+ /** Minimum 2 m temperature in the preceding 6 hours. Unit: °C · °F. */
587
+ readonly tempMin6h?: number | null;
588
+ /** Maximum 2 m temperature in the preceding 6 hours. Unit: °C · °F. */
589
+ readonly tempMax6h?: number | null;
590
+ /** Minimum 2 m temperature in the preceding 12 hours. Unit: °C · °F. */
591
+ readonly tempMin12h?: number | null;
592
+ /** Maximum 2 m temperature in the preceding 12 hours. Unit: °C · °F. */
593
+ readonly tempMax12h?: number | null;
594
+ /** Low cloud coverage over the preceding timespan, in %. */
595
+ readonly cloudCoverageLow?: number | null;
596
+ /** Medium-height cloud coverage over the preceding timespan, in %. */
597
+ readonly cloudCoverageMedium?: number | null;
598
+ /** High cloud coverage over the preceding timespan, in %. */
599
+ readonly cloudCoverageHigh?: number | null;
600
+ /** Global radiation over the preceding timespan. Unit: Wh/m² (both systems). */
601
+ readonly globalRadiation: number | null;
602
+ /** Precipitation over the previous 12 hours, if available. Unit: mm · inch. */
603
+ readonly prec12h?: number | null;
604
+ /** Precipitation over the previous 24 hours, if available. Unit: mm · inch. */
605
+ readonly prec24h?: number | null;
606
+ /** Precipitation summed up since the start of the model run. Unit: mm · inch. */
607
+ readonly precTotal?: number | null;
608
+ /** Snow within the last 6 hours as water equivalent. Unit: mm WE · inch WE. */
609
+ readonly snowAmount6h?: number | null;
610
+ /** Snow within the last 12 hours as water equivalent. Unit: mm WE · inch WE. */
611
+ readonly snowAmount12h?: number | null;
612
+ /** Snow within the last 24 hours as water equivalent. Unit: mm WE · inch WE. */
613
+ readonly snowAmount24h?: number | null;
614
+ /**
615
+ * Present weather code according to WMO code table 4677 (0–99), e.g. `61` =
616
+ * slight continuous rain. See `classifyWmoCode()`.
617
+ */
618
+ readonly wmoCode?: number | null;
619
+ /** Symbol for display purposes. */
620
+ readonly weatherSymbol: WeatherSymbol | null;
621
+ }
622
+ /** Response of `forecast.standard()`. */
623
+ interface StandardForecast<U extends UnitSystem = UnitSystem> extends ForecastMeta<U> {
624
+ readonly resolution: ModelResolution;
625
+ /** Time steps in chronological order. */
626
+ readonly data: StandardForecastEntry[];
627
+ }
628
+ /** Response of `forecast.advanced()`. */
629
+ interface AdvancedForecast<U extends UnitSystem = UnitSystem> extends ForecastMeta<U> {
630
+ readonly resolution: ModelResolution;
631
+ /** Time steps in chronological order. */
632
+ readonly data: AdvancedForecastEntry[];
633
+ }
634
+ /** Day names used by the 3-day forecast, handy as translation keys. */
635
+ type DayName = "today" | "tomorrow" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
636
+ /** Part of a day: night (0–6), morning (6–12), afternoon (12–18), evening (18–24). */
637
+ type TimeOfDay = "night" | "morning" | "afternoon" | "evening" | (string & {});
638
+ /**
639
+ * Precipitation probabilities that the 3-day forecast returns but the spec
640
+ * does not document (seen in live responses, November 2026). They may be
641
+ * missing or change without notice.
642
+ */
643
+ interface UndocumentedPrecipitationProbabilities {
644
+ /** Probability of any precipitation in this period, in %. Undocumented. */
645
+ readonly precProb?: number | null;
646
+ /** Probability of at least 1 mm of precipitation in this period, in %. Undocumented. */
647
+ readonly precProb1mm?: number | null;
648
+ /** Probability of at least 10 mm of precipitation in this period, in %. Undocumented. */
649
+ readonly precProb10mm?: number | null;
650
+ }
651
+ interface DailySummaryValues extends UndocumentedPrecipitationProbabilities {
652
+ /** Most probable maximum 2 m temperature. Unit: °C · °F. */
653
+ readonly tempMax?: number | null;
654
+ /** Most probable minimum 2 m temperature. Unit: °C · °F. */
655
+ readonly tempMin?: number | null;
656
+ /** Expected precipitation (rain and snow) in this period. Unit: mm · inch. */
657
+ readonly precCurrent?: number | null;
658
+ /** Most probable wind gust speed. Unit: **m/s** (metric) · mph (imperial). */
659
+ readonly windGust?: number | null;
660
+ /** Average wind speed. Unit: **m/s** (metric) · mph (imperial). */
661
+ readonly windSpeed?: number | null;
662
+ /** Average direction the wind blows from, in degrees (0 = N, 90 = E). */
663
+ readonly windDirection?: number | null;
664
+ readonly weatherSymbol: WeatherSymbol | null;
665
+ /** Weather risks during this period. */
666
+ readonly risks: WeatherRisk[];
667
+ }
668
+ /** Summary for one part of a day. */
669
+ interface TimeOfDayForecast extends DailySummaryValues {
670
+ readonly timeOfDay: TimeOfDay;
671
+ /** Whether most of this period is during daytime. */
672
+ readonly isDay: boolean;
673
+ }
674
+ /** Summary for one day. */
675
+ interface DailyForecast extends DailySummaryValues {
676
+ /** Local date. */
677
+ readonly dateTime: DateString;
678
+ /** `"today"`, `"tomorrow"` or the weekday. */
679
+ readonly dayName: DayName;
680
+ /** Most probable sunshine duration, in hours. */
681
+ readonly sunHours?: number | null;
682
+ /** Effective cloud coverage, in %. */
683
+ readonly cloudCoverage?: number | null;
684
+ /** Night, morning, afternoon and evening, in this order. */
685
+ readonly timeOfDay: TimeOfDayForecast[];
686
+ }
687
+ /** Response of `forecast.threeDay()`. */
688
+ interface ThreeDayForecast<U extends UnitSystem = UnitSystem> extends ForecastMeta<U> {
689
+ readonly resolution: ModelResolution;
690
+ /**
691
+ * Three days. Early in the day the first entry is today; later in the day
692
+ * the forecast starts with tomorrow.
693
+ */
694
+ readonly data: DailyForecast[];
695
+ }
696
+ /** One day of the 14-day trend. `…Low`/`…High` are the range across the models used. */
697
+ interface TrendDay {
698
+ /** Local date. */
699
+ readonly dateTime: DateString;
700
+ readonly isWeekend: boolean;
701
+ /** Abbreviated weekday: `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`. */
702
+ readonly weekday: string;
703
+ /** Most probable maximum 2 m temperature. Unit: °C · °F. */
704
+ readonly tempMax?: number | null;
705
+ /** Lowest maximum temperature across models. Unit: °C · °F. */
706
+ readonly tempMaxLow?: number | null;
707
+ /** Highest maximum temperature across models. Unit: °C · °F. */
708
+ readonly tempMaxHigh?: number | null;
709
+ /** Most probable minimum 2 m temperature. Unit: °C · °F. */
710
+ readonly tempMin?: number | null;
711
+ /** Lowest minimum temperature across models. Unit: °C · °F. */
712
+ readonly tempMinLow?: number | null;
713
+ /** Highest minimum temperature across models. Unit: °C · °F. */
714
+ readonly tempMinHigh?: number | null;
715
+ /** Most probable precipitation amount. Unit: mm · inch. */
716
+ readonly prec?: number | null;
717
+ /** Lowest precipitation amount across models. Unit: mm · inch. */
718
+ readonly precLow?: number | null;
719
+ /** Highest precipitation amount across models. Unit: mm · inch. */
720
+ readonly precHigh?: number | null;
721
+ /** Probability of at least 1 mm of precipitation, in %. */
722
+ readonly precProb1mm?: number | null;
723
+ /** Probability of at least 10 mm of precipitation, in %. */
724
+ readonly precProb10mm?: number | null;
725
+ /** `"rain"`, `"snow"` or `"snowrain"` (rain, snow or sleet). */
726
+ readonly precType?: "rain" | "snow" | "snowrain" | (string & {}) | null;
727
+ /** 1 = normal precipitation, 2 = showers, 3 = heavy showers. */
728
+ readonly precIntensity?: number | null;
729
+ /** Text key describing precipitation, for display or translation. */
730
+ readonly precWord?: string | null;
731
+ /** Most probable wind gust speed. Unit: **m/s** (metric) · mph (imperial). */
732
+ readonly windGust?: number | null;
733
+ /** Lowest gust speed across models. Unit: **m/s** · mph. */
734
+ readonly windGustLow?: number | null;
735
+ /** Highest gust speed across models. Unit: **m/s** · mph. */
736
+ readonly windGustHigh?: number | null;
737
+ /** Astronomically possible sunshine duration without clouds, in hours. */
738
+ readonly sunMaxPos?: number | null;
739
+ /** Most probable sunshine duration, in hours. */
740
+ readonly sunHours?: number | null;
741
+ /** Sunshine relative to the possible maximum, in %. */
742
+ readonly sunHoursRelative?: number | null;
743
+ /** Lowest sunshine duration across models, in hours. */
744
+ readonly sunHoursLow?: number | null;
745
+ /** Highest sunshine duration across models, in hours. */
746
+ readonly sunHoursHigh?: number | null;
747
+ /** Cloud coverage in eighths (okta): `4` = 4/8 = 50 %. */
748
+ readonly cloudCoverageEighths: number;
749
+ /** `"clear"`, `"few"`, `"scattered"`, `"broken"` or `"overcast"`. */
750
+ readonly cloudWord: "clear" | "few" | "scattered" | "broken" | "overcast" | (string & {});
751
+ /** 1 = thunderstorms expected, 2 = heavy thunderstorms expected. */
752
+ readonly thunderStorm?: number | null;
753
+ readonly weatherSymbol: WeatherSymbol | null;
754
+ /** Weather risks on this day. */
755
+ readonly risks: WeatherRisk[];
756
+ }
757
+ /** Response of `forecast.trend14Days()`. */
758
+ interface Trend14Days<U extends UnitSystem = UnitSystem> extends ForecastMeta<U> {
759
+ /** Approximate time when the next trend will be available. */
760
+ readonly nextRun: DateTimeString;
761
+ readonly data: TrendDay[];
762
+ }
763
+ interface components {
764
+ schemas: {
765
+ /**
766
+ * @description a measurement unit
767
+ * @example celsius
768
+ * @enum {string|null}
769
+ */
770
+ Unit: "celsius" | "fahrenheit" | "mm" | "cm" | "m" | "km" | "in" | "ft" | "yd" | "mi" | "knots" | "kph" | "mps" | "bft" | null;
771
+ /**
772
+ * @description global radiation in Wh/m² for the preceding timespan
773
+ * @example 220.5
774
+ */
775
+ globalRadiation: number | null;
776
+ /**
777
+ * @description a symbol representing the weather situation, see the [Tools / Weather Symbol](\#/operations/get_tools_weather_symbol) endpoint to get the correct weather symbol
778
+ * @example sunshine
779
+ */
780
+ weatherSymbol: string | null;
781
+ /**
782
+ * @description the weather models resolution
783
+ *
784
+ * | Value | Resolution |
785
+ * | -------- | --------- |
786
+ * | STANDARD | >= ~10km |
787
+ * | HIGH | >= ~4km |
788
+ * | SUPER_HIGH | < ~4km |
789
+ * @example SUPER_HIGH
790
+ * @enum {string}
791
+ */
792
+ modelResolution: "STANDARD" | "HIGH" | "SUPER_HIGH";
793
+ Error: {
794
+ type?: string;
795
+ /** @example An error occurred */
796
+ title?: string;
797
+ /**
798
+ * @description may be any HTTP status code
799
+ * @example 400
800
+ */
801
+ status?: number;
802
+ /** @example more detailed information */
803
+ detail?: string;
804
+ };
805
+ StationObservationLatestData: {
806
+ /** Format: date-time */
807
+ dateTime: string;
808
+ name: string;
809
+ value?: (number | string) | null;
810
+ };
811
+ StationObservationLatestResponse: {
812
+ /**
813
+ * the station's identifier
814
+ * @example 106350
815
+ */
816
+ stationId: string;
817
+ name: string;
818
+ lat?: (number | string) | null;
819
+ lon?: (number | string) | null;
820
+ ele?: number | null;
821
+ /** @default [] */
822
+ data: components["schemas"]["StationObservationLatestData"][] | {
823
+ [key: string]: components["schemas"]["StationObservationLatestData"];
824
+ };
825
+ };
826
+ StationInformation: {
827
+ /**
828
+ * Station ID. This ID may be used for other requests regarding this station. e.g. to get a timeseries of station data.
829
+ * @example 106350
830
+ */
831
+ id: string;
832
+ /**
833
+ * the stations name
834
+ * @example Feldberg/Taunus
835
+ */
836
+ name: string;
837
+ /**
838
+ * latitude of the station's position
839
+ * Format: float
840
+ * @example 50.221
841
+ */
842
+ lat: number;
843
+ /**
844
+ * longitude of the station's position
845
+ * Format: float
846
+ * @example 8.4469
847
+ */
848
+ lon: number;
849
+ /**
850
+ * altitude of the station
851
+ * @example 822
852
+ */
853
+ alt: number;
854
+ /**
855
+ * how precise the measurements of this station are. Some amateur stations may be less precise.
856
+ * @example high
857
+ */
858
+ precision: string;
859
+ /**
860
+ * gives information to which station network this station belongs to / Vereinigte Hagel (VH)
861
+ * @example WMO
862
+ */
863
+ type: string;
864
+ /**
865
+ * did this station send measurements recently
866
+ * @example true
867
+ */
868
+ recentlyActive?: boolean | null;
869
+ /**
870
+ * distance to the location in km
871
+ * Format: float
872
+ * @example 12.6
873
+ */
874
+ distance?: number | null;
875
+ };
876
+ CurrentWeatherResponseData: {
877
+ /**
878
+ * the date and time when this parameter occurred
879
+ * Format: date-time
880
+ */
881
+ dateTime: string;
882
+ /**
883
+ * @description the parameter name
884
+ * @example temp
885
+ */
886
+ name: string;
887
+ /**
888
+ * @description the parameter value
889
+ * @example 12.6
890
+ */
891
+ value?: (boolean | number | string) | null;
892
+ /**
893
+ * @description the data type of the parameter
894
+ * @example bool
895
+ * @enum {string|null}
896
+ */
897
+ type?: "bool" | "int" | "float" | "string" | "array" | "object" | null;
898
+ /**
899
+ * @description the source for the data, if mixed, otherwise check the parent objects's source attribute
900
+ * @example FORECAST
901
+ * @enum {string|null}
902
+ */
903
+ source?: "OBSERVATION" | "ANALYSIS" | "FORECAST" | "MIXED" | null;
904
+ station: components["schemas"]["StationInformation"];
905
+ };
906
+ CurrentWeatherResponse: {
907
+ /**
908
+ * Format: float
909
+ * @description latitude used for the forecast
910
+ * @example 50.3651
911
+ */
912
+ lat: number;
913
+ /**
914
+ * Format: float
915
+ * @description longitude used for the forecast
916
+ * @example 8.7271
917
+ */
918
+ lon: number;
919
+ /**
920
+ * altitude of the location
921
+ * Format: float
922
+ * @description altitude of the location [metric: m, imperial: feet]
923
+ * @example 215
924
+ */
925
+ alt?: number | null;
926
+ /**
927
+ * @description the system of units for values within this forecast response
928
+ * @default metric
929
+ * @example metric
930
+ * @enum {string}
931
+ */
932
+ systemOfUnits: "metric" | "imperial";
933
+ /** @default [] */
934
+ data: {
935
+ [key: string]: components["schemas"]["CurrentWeatherResponseData"];
936
+ };
937
+ };
938
+ WeatherRisk: {
939
+ /**
940
+ * @description type of the weather risk
941
+ * @example wind
942
+ * @enum {string}
943
+ */
944
+ type: "wind" | "weather";
945
+ weatherSymbol: components["schemas"]["weatherSymbol"];
946
+ };
947
+ DailyWeatherTimeOfDayData: {
948
+ /**
949
+ * @description time of day
950
+ * @example morning
951
+ */
952
+ timeOfDay: string;
953
+ /**
954
+ * @description if most of this day part is during daytime
955
+ * @example true
956
+ */
957
+ isDay: boolean;
958
+ /**
959
+ * Format: float
960
+ * @description the maximum temperature 2m above ground [metric: °C, imperial: °F]
961
+ */
962
+ tempMax?: number | null;
963
+ /**
964
+ * Format: float
965
+ * @description the minimum temperature 2m above ground [metric: °C, imperial: °F]
966
+ */
967
+ tempMin?: number | null;
968
+ /**
969
+ * Format: float
970
+ * @description the predicted precipitation (rain, snow) for the current time period of the forecast (e.g for the morning) [metric: mm, imperial: inch]
971
+ * @example 2.6
972
+ */
973
+ precCurrent?: number | null;
974
+ /**
975
+ * Format: float
976
+ * @description the most probable wind gust speed [metric: m/s, imperial: mph]
977
+ */
978
+ windGust?: number | null;
979
+ /**
980
+ * Format: float
981
+ * @description average wind speed (for a timespan) [metric: m/s, imperial: mph]
982
+ * @example 2.5
983
+ */
984
+ windSpeed?: number | null;
985
+ /**
986
+ * Format: float
987
+ * @description average direction from which the wind originates in degree (0=N, 90=E, 180=S, 270=W)
988
+ * @example 84
989
+ */
990
+ windDirection?: number | null;
991
+ weatherSymbol: components["schemas"]["weatherSymbol"];
992
+ /**
993
+ * @description weather risks that may occur during this time
994
+ * @default []
995
+ */
996
+ risks: components["schemas"]["WeatherRisk"][] | {
997
+ [key: string]: components["schemas"]["WeatherRisk"];
998
+ };
999
+ };
1000
+ DailyWeatherResponseData: {
1001
+ /**
1002
+ * Format: date
1003
+ * @description date for the forecast values
1004
+ * @example 2022-01-01
1005
+ */
1006
+ dateTime: string;
1007
+ /**
1008
+ * Format: date
1009
+ * @description textual representation of the day
1010
+ * @example tomorrow
1011
+ * @enum {string}
1012
+ */
1013
+ dayName: "today" | "tomorrow" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
1014
+ /**
1015
+ * Format: float
1016
+ * @description the most probable maximum temperature 2m above ground [metric: °C, imperial: °F]
1017
+ */
1018
+ tempMax?: number | null;
1019
+ /**
1020
+ * Format: float
1021
+ * @description the most probable minimum temperature 2m above ground [metric: °C, imperial: °F]
1022
+ */
1023
+ tempMin?: number | null;
1024
+ /**
1025
+ * Format: float
1026
+ * @description the predicted precipitation (rain, snow) for the current time period of the forecast (e.g for the day) [metric: mm, imperial: inch]
1027
+ * @example 2.6
1028
+ */
1029
+ precCurrent?: number | null;
1030
+ /**
1031
+ * Format: float
1032
+ * @description the most probable wind gust speed [metric: m/s, imperial: mph]
1033
+ */
1034
+ windGust?: number | null;
1035
+ /**
1036
+ * Format: float
1037
+ * @description average wind speed (for a timespan) [metric: m/s, imperial: mph]
1038
+ * @example 2.5
1039
+ */
1040
+ windSpeed?: number | null;
1041
+ /**
1042
+ * Format: float
1043
+ * @description average direction from which the wind originates in degree (0=N, 90=E, 180=S, 270=W)
1044
+ * @example 84
1045
+ */
1046
+ windDirection?: number | null;
1047
+ /**
1048
+ * Format: float
1049
+ * @description the most probable amount of hours the sun will be visible [h]
1050
+ */
1051
+ sunHours?: number | null;
1052
+ /**
1053
+ * Format: float
1054
+ * @description effective cloud coverage within the preceding timespan in % (e.g. low clouds have more priority than high clouds)
1055
+ * @example 12
1056
+ */
1057
+ cloudCoverage?: number | null;
1058
+ weatherSymbol: components["schemas"]["weatherSymbol"];
1059
+ /**
1060
+ * @description weather risks that may occur during this time
1061
+ * @default []
1062
+ */
1063
+ risks: components["schemas"]["WeatherRisk"][] | {
1064
+ [key: string]: components["schemas"]["WeatherRisk"];
1065
+ };
1066
+ timeOfDay: components["schemas"]["DailyWeatherTimeOfDayData"][] | {
1067
+ [key: string]: components["schemas"]["DailyWeatherTimeOfDayData"];
1068
+ };
1069
+ };
1070
+ DailyWeatherResponse: {
1071
+ /**
1072
+ * Format: float
1073
+ * @description latitude used for the forecast
1074
+ * @example 50.3651
1075
+ */
1076
+ lat: number;
1077
+ /**
1078
+ * Format: float
1079
+ * @description longitude used for the forecast
1080
+ * @example 8.7271
1081
+ */
1082
+ lon: number;
1083
+ /**
1084
+ * Format: float
1085
+ * @description altitude used for the forecast [metric: m, imperial: feet]
1086
+ * @example 120
1087
+ */
1088
+ alt?: number | null;
1089
+ resolution: components["schemas"]["modelResolution"];
1090
+ /**
1091
+ * @description the timezone at this location
1092
+ * @example Europe/Berlin
1093
+ */
1094
+ timeZone: string;
1095
+ /**
1096
+ * @description the system of units for values within this forecast response
1097
+ * @default metric
1098
+ * @example metric
1099
+ * @enum {string}
1100
+ */
1101
+ systemOfUnits: "metric" | "imperial";
1102
+ /**
1103
+ * Format: date-time
1104
+ * @description the run of the forecast (e.g. "2022-01-01T12:00:00+00:00")
1105
+ * @example 2022-01-01T12:00:00+00:00
1106
+ */
1107
+ run: string;
1108
+ data: components["schemas"]["DailyWeatherResponseData"][] | {
1109
+ [key: string]: components["schemas"]["DailyWeatherResponseData"];
1110
+ };
1111
+ };
1112
+ Trend14DaysResponseData: {
1113
+ /**
1114
+ * Format: date
1115
+ * @description date for the forecast values
1116
+ * @example 2022-01-01
1117
+ */
1118
+ dateTime: string;
1119
+ /** @description if the day is a day on the weekend (saturday or sunday) */
1120
+ isWeekend: boolean;
1121
+ /** @description the weekday of this day [Mon, Tue, Wed, Thu, Fri, Sat, Sun] */
1122
+ weekday: string;
1123
+ /**
1124
+ * Format: float
1125
+ * @description the most probable maximum temperature 2m above ground [metric: °C, imperial: °F]
1126
+ */
1127
+ tempMax?: number | null;
1128
+ /**
1129
+ * Format: float
1130
+ * @description the lowest of all maximum temperatures from the multiple forecast models used for this trend [metric: °C, imperial: °F]
1131
+ */
1132
+ tempMaxLow?: number | null;
1133
+ /**
1134
+ * Format: float
1135
+ * @description the highest of all maximum temperatures from the multiple forecast models used for this trend [metric: °C, imperial: °F]
1136
+ */
1137
+ tempMaxHigh?: number | null;
1138
+ /**
1139
+ * Format: float
1140
+ * @description the most probable minimum temperature 2m above ground [metric: °C, imperial: °F]
1141
+ */
1142
+ tempMin?: number | null;
1143
+ /**
1144
+ * Format: float
1145
+ * @description the lowest of all minimum temperatures from the multiple forecast models used for this trend [metric: °C, imperial: °F]
1146
+ */
1147
+ tempMinLow?: number | null;
1148
+ /**
1149
+ * Format: float
1150
+ * @description the highest of all minimum temperatures from the multiple forecast models used for this trend [metric: °C, imperial: °F]
1151
+ */
1152
+ tempMinHigh?: number | null;
1153
+ /**
1154
+ * Format: float
1155
+ * @description the most probable amount of precipitation [metric: mm, imperial: inch]
1156
+ */
1157
+ prec?: number | null;
1158
+ /**
1159
+ * Format: float
1160
+ * @description the lowest calculated precipitation amount of the multiple forecast models used for this trend [metric: mm, imperial: inch]
1161
+ */
1162
+ precLow?: number | null;
1163
+ /**
1164
+ * Format: float
1165
+ * @description the highest calculated precipitation amount of the multiple forecast models used for this trend [metric: mm, imperial: inch]
1166
+ */
1167
+ precHigh?: number | null;
1168
+ /**
1169
+ * Format: float
1170
+ * @description the predicted probability of precipitation >= 1mm in %
1171
+ */
1172
+ precProb1mm?: number | null;
1173
+ /**
1174
+ * Format: float
1175
+ * @description the predicted probability of precipitation >= 10mm in %
1176
+ */
1177
+ precProb10mm?: number | null;
1178
+ /** @description the type of precipitation [rain = rain|snow = snow|snowrain = rain, snow or sleet] */
1179
+ precType?: string | null;
1180
+ /** @description the intensity of precipitation [1 = normal precipitation, 2 = showers, 3 = heavy showers] */
1181
+ precIntensity?: number | null;
1182
+ /** @description a text representation of precipitation for display / icon / translation purposes */
1183
+ precWord?: string | null;
1184
+ /**
1185
+ * t
1186
+ * Format: float
1187
+ * @description he most probable wind gust speed [metric: m/s, imperial: mph]
1188
+ */
1189
+ windGust?: number | null;
1190
+ /**
1191
+ * Format: float
1192
+ * @description the lowest calculated gust speed of the multiple forecast models used for this trend [metric: m/s, imperial: mph]
1193
+ */
1194
+ windGustLow?: number | null;
1195
+ /**
1196
+ * Format: float
1197
+ * @description the highest calculated gust speed of the multiple forecast models used for this trend [metric: m/s, imperial: mph]
1198
+ */
1199
+ windGustHigh?: number | null;
1200
+ /**
1201
+ * Format: float
1202
+ * @description maximum possible hours of sunshine during the day if there would be no cloud coverage [h]
1203
+ */
1204
+ sunMaxPos?: number | null;
1205
+ /**
1206
+ * Format: float
1207
+ * @description the most probable amount of hours the sun will be visible [h]
1208
+ */
1209
+ sunHours?: number | null;
1210
+ /**
1211
+ * Format: float
1212
+ * @description the relative value of sunshine during the day [%]
1213
+ */
1214
+ sunHoursRelative?: number | null;
1215
+ /**
1216
+ * Format: float
1217
+ * @description the lowest calculated sunshine duration of the multiple forecast models used for this trend [h]
1218
+ */
1219
+ sunHoursLow?: number | null;
1220
+ /**
1221
+ * Format: float
1222
+ * @description the highest calculated sunshine duration of the multiple forecast models used for this trend [h]
1223
+ */
1224
+ sunHoursHigh?: number | null;
1225
+ /** @description cloud coverage in eighths e.g 1 = 1/8 = 12.5%, 4 = 4/8 = 50% */
1226
+ cloudCoverageEighths: number;
1227
+ /** @description textual representation of cloudiness [clear, few, scattered, broken, overcast] */
1228
+ cloudWord: string;
1229
+ /** @description type of expected thunderstorm activity [1 = thunderstorm expected, 2 = heavy thunderstorms expected] */
1230
+ thunderStorm?: number | null;
1231
+ weatherSymbol: components["schemas"]["weatherSymbol"];
1232
+ /**
1233
+ * @description weather risks that may occur during on this day
1234
+ * @default []
1235
+ */
1236
+ risks: components["schemas"]["WeatherRisk"][] | {
1237
+ [key: string]: components["schemas"]["WeatherRisk"];
1238
+ };
1239
+ };
1240
+ Trend14DaysResponse: {
1241
+ /**
1242
+ * Format: float
1243
+ * @description latitude used for the forecast
1244
+ * @example 50.3651
1245
+ */
1246
+ lat: number;
1247
+ /**
1248
+ * Format: float
1249
+ * @description longitude used for the forecast
1250
+ * @example 8.7271
1251
+ */
1252
+ lon: number;
1253
+ /**
1254
+ * Format: float
1255
+ * @description altitude used for the forecast [metric: m, imperial: feet]
1256
+ * @example 120
1257
+ */
1258
+ alt?: number | null;
1259
+ /**
1260
+ * @description the timezone at this location
1261
+ * @example Europe/Berlin
1262
+ */
1263
+ timeZone: string;
1264
+ /**
1265
+ * @description the system of units for values within this forecast response
1266
+ * @default metric
1267
+ * @example metric
1268
+ * @enum {string}
1269
+ */
1270
+ systemOfUnits: "metric" | "imperial";
1271
+ /**
1272
+ * Format: date-time
1273
+ * @description the run of the forecast (e.g. "2022-01-01T12:00:00+00:00")
1274
+ * @example 2022-01-01T12:00:00+00:00
1275
+ */
1276
+ run: string;
1277
+ /**
1278
+ * Format: date-time
1279
+ * @description the approximate time when the next forecast will be available (e.g. "2022-01-01T15:00:00+00:00")
1280
+ * @example 2022-01-01T15:00:00+00:00
1281
+ */
1282
+ nextRun: string;
1283
+ data: components["schemas"]["Trend14DaysResponseData"][] | {
1284
+ [key: string]: components["schemas"]["Trend14DaysResponseData"];
1285
+ };
1286
+ };
1287
+ StandardResponseData: {
1288
+ /**
1289
+ * @description date and time for the forecast values
1290
+ * @example 2022-01-01T10:00:00+00:00
1291
+ */
1292
+ dateTime: string;
1293
+ /** if it is day or night */
1294
+ isDay: boolean;
1295
+ /**
1296
+ * Format: float
1297
+ * @description the predicted temperature at 2m height (at current timestamp) [metric: °C, imperial: °F]
1298
+ * @example 20.2
1299
+ */
1300
+ temp: number;
1301
+ /**
1302
+ * Format: float
1303
+ * @description the dewpoint (at current timestamp) [metric: °C, imperial: °F]
1304
+ * @example 12.4
1305
+ */
1306
+ dewpoint?: number | null;
1307
+ /**
1308
+ * Format: float
1309
+ * @description barometric air pressure at mean sea level (at current timestamp) [hPa]
1310
+ * @example 1013.5
1311
+ */
1312
+ pressureMsl?: number | null;
1313
+ /**
1314
+ * Format: float
1315
+ * @description relative humidity [%]
1316
+ * @example 56
1317
+ */
1318
+ humidityRelative?: number | null;
1319
+ /**
1320
+ * Format: float
1321
+ * @description average wind speed (for a timespan) [metric: m/s, imperial: mph]
1322
+ * @example 2.5
1323
+ */
1324
+ windSpeed?: number | null;
1325
+ /**
1326
+ * Format: float
1327
+ * @description average direction from which the wind originates in degree (0=N, 90=E, 180=S, 270=W)
1328
+ * @example 84
1329
+ */
1330
+ windDirection?: number | null;
1331
+ /**
1332
+ * Format: float
1333
+ * @description wind gust speed in m/s (for a timespan) [metric: m/s, imperial: mph]
1334
+ * @example 5.7
1335
+ */
1336
+ windGust?: number | null;
1337
+ /**
1338
+ * Format: float
1339
+ * @description maximum wind gust speed for the last 3 hours [metric: m/s, imperial: mph]
1340
+ * @example 5.7
1341
+ */
1342
+ windGust3h?: number | null;
1343
+ /**
1344
+ * Format: float
1345
+ * @description effective cloud coverage within the preceding timespan in % (e.g. low clouds have more priority than high clouds)
1346
+ * @example 12
1347
+ */
1348
+ cloudCoverage?: number | null;
1349
+ /**
1350
+ * Format: float
1351
+ * @description duration of sunshine in hours e.g. 0.5 means 30 minutes of sunshine in the preceding timespan
1352
+ * @example 0.5
1353
+ */
1354
+ sunHours?: number | null;
1355
+ /**
1356
+ * Format: float
1357
+ * @description the predicted precipitation (rain, snow) for the current time period of the forecast (e.g within 1h or 3h) [metric: mm, imperial: inch]
1358
+ * @example 2.6
1359
+ */
1360
+ precCurrent?: number | null;
1361
+ /**
1362
+ * Format: float
1363
+ * @description the predicted precipitation (rain, snow) for the previous 6 hours, if available [metric: mm, imperial: inch]
1364
+ * @example 2.6
1365
+ */
1366
+ prec6h?: number | null;
1367
+ /**
1368
+ * Format: float
1369
+ * @description the amount of snow in kg/m² [metric: mm water equivalent, imperial: inch water equivalent]
1370
+ * @example 22
1371
+ */
1372
+ snowAmount?: number | null;
1373
+ /**
1374
+ * Format: float
1375
+ * @description the height of snow [metric: m, imperial: inch]
1376
+ * @example 0.04
1377
+ */
1378
+ snowHeight?: number | null;
1379
+ };
1380
+ StandardResponse: {
1381
+ /**
1382
+ * Format: float
1383
+ * @description latitude used for the forecast
1384
+ * @example 50.3651
1385
+ */
1386
+ lat: number;
1387
+ /**
1388
+ * Format: float
1389
+ * @description longitude used for the forecast
1390
+ * @example 8.7271
1391
+ */
1392
+ lon: number;
1393
+ /**
1394
+ * Format: float
1395
+ * @description altitude used for the forecast [metric: m, imperial: feet]
1396
+ * @example 120
1397
+ */
1398
+ alt?: number | null;
1399
+ resolution: components["schemas"]["modelResolution"];
1400
+ /**
1401
+ * @description the timezone at this location
1402
+ * @example Europe/Berlin
1403
+ */
1404
+ timeZone: string;
1405
+ /**
1406
+ * @description the system of units for values within this forecast response
1407
+ * @default metric
1408
+ * @example metric
1409
+ * @enum {string}
1410
+ */
1411
+ systemOfUnits: "metric" | "imperial";
1412
+ /**
1413
+ * Format: date-time
1414
+ * @description the run of the forecast (e.g. "2022-01-01T12:00:00+00:00")
1415
+ * @example 2022-01-01T12:00:00+00:00
1416
+ */
1417
+ run: string;
1418
+ data: components["schemas"]["StandardResponseData"][] | {
1419
+ [key: string]: components["schemas"]["StandardResponseData"];
1420
+ };
1421
+ };
1422
+ AdvancedResponseData: {
1423
+ /**
1424
+ * @description date and time for the forecast values
1425
+ * @example 2022-01-01T10:00:00+00:00
1426
+ */
1427
+ dateTime: string;
1428
+ /** if it is day or night */
1429
+ isDay: boolean;
1430
+ /**
1431
+ * Format: float
1432
+ * @description the predicted temperature at 2m height (at current timestamp) [metric: °C, imperial: °F]
1433
+ * @example 20.2
1434
+ */
1435
+ temp: number;
1436
+ /**
1437
+ * Format: float
1438
+ * @description the minimum predicted temperature at 2m height in the preceding 6 hours [metric: °C, imperial: °F]
1439
+ * @example 20.2
1440
+ */
1441
+ tempMin6h?: number | null;
1442
+ /**
1443
+ * Format: float
1444
+ * @description the maximum predicted temperature at 2m height in the preceding 6 hours [metric: °C, imperial: °F]
1445
+ * @example 20.2
1446
+ */
1447
+ tempMax6h?: number | null;
1448
+ /**
1449
+ * Format: float
1450
+ * @description the minimum predicted temperature at 2m height in the preceding 12 hours [metric: °C, imperial: °F]
1451
+ * @example 20.2
1452
+ */
1453
+ tempMin12h?: number | null;
1454
+ /**
1455
+ * Format: float
1456
+ * @description the maximum predicted temperature at 2m height in the preceding 12 hours [metric: °C, imperial: °F]
1457
+ * @example 20.2
1458
+ */
1459
+ tempMax12h?: number | null;
1460
+ /**
1461
+ * Format: float
1462
+ * @description the dewpoint (at current timestamp) [metric: °C, imperial: °F]
1463
+ * @example 12.4
1464
+ */
1465
+ dewpoint?: number | null;
1466
+ /**
1467
+ * Format: float
1468
+ * @description barometric air pressure at mean sea level (at current timestamp) [hPa]
1469
+ * @example 1013.5
1470
+ */
1471
+ pressureMsl?: number | null;
1472
+ /**
1473
+ * Format: float
1474
+ * @description relative humidity [%]
1475
+ * @example 56
1476
+ */
1477
+ humidityRelative?: number | null;
1478
+ /**
1479
+ * Format: float
1480
+ * @description average wind speed (for a timespan) [metric: m/s, imperial: mph]
1481
+ * @example 2.5
1482
+ */
1483
+ windSpeed?: number | null;
1484
+ /**
1485
+ * Format: float
1486
+ * @description average direction from which the wind originates in degree (0=N, 90=E, 180=S, 270=W)
1487
+ * @example 84
1488
+ */
1489
+ windDirection?: number | null;
1490
+ /**
1491
+ * Format: float
1492
+ * @description wind gust speed in m/s (for a timespan) [metric: m/s, imperial: mph]
1493
+ * @example 5.7
1494
+ */
1495
+ windGust?: number | null;
1496
+ /**
1497
+ * Format: float
1498
+ * @description maximum wind gust speed for the last 3 hours [metric: m/s, imperial: mph]
1499
+ * @example 5.7
1500
+ */
1501
+ windGust3h?: number | null;
1502
+ /**
1503
+ * Format: float
1504
+ * @description effective cloud coverage within the preceding timespan in % (e.g. low clouds have more priority than high clouds)
1505
+ * @example 12
1506
+ */
1507
+ cloudCoverage?: number | null;
1508
+ /**
1509
+ * Format: float
1510
+ * @description low cloud coverage within the preceding timespan in %
1511
+ * @example 12
1512
+ */
1513
+ cloudCoverageLow?: number | null;
1514
+ /**
1515
+ * Format: float
1516
+ * @description medium height cloud coverage within the preceding timespan in %
1517
+ * @example 15
1518
+ */
1519
+ cloudCoverageMedium?: number | null;
1520
+ /**
1521
+ * Format: float
1522
+ * @description high cloud coverage within the preceding timespan in %
1523
+ * @example 18
1524
+ */
1525
+ cloudCoverageHigh?: number | null;
1526
+ /**
1527
+ * Format: float
1528
+ * @description duration of sunshine in hours e.g. 0.5 means 30 minutes of sunshine in the preceding timespan
1529
+ * @example 0.5
1530
+ */
1531
+ sunHours?: number | null;
1532
+ globalRadiation: components["schemas"]["globalRadiation"];
1533
+ /**
1534
+ * Format: float
1535
+ * @description the predicted precipitation (rain, snow) for the current time period of the forecast (e.g within 1h or 3h) [metric: mm, imperial: inch]
1536
+ * @example 2.6
1537
+ */
1538
+ precCurrent?: number | null;
1539
+ /**
1540
+ * Format: float
1541
+ * @description the predicted precipitation (rain, snow) for the previous 6 hours, if available [metric: mm, imperial: inch]
1542
+ * @example 2.6
1543
+ */
1544
+ prec6h?: number | null;
1545
+ /**
1546
+ * Format: float
1547
+ * @description the predicted precipitation (rain, snow) for the previous 12 hours, if available [metric: mm, imperial: inch]
1548
+ * @example 2.6
1549
+ */
1550
+ prec12h?: number | null;
1551
+ /**
1552
+ * Format: float
1553
+ * @description the predicted precipitation (rain, snow) for the previous 24 hours, if available [metric: mm, imperial: inch]
1554
+ * @example 2.6
1555
+ */
1556
+ prec24h?: number | null;
1557
+ /**
1558
+ * Format: float
1559
+ * @description the predicted precipitation (rain, snow) sum since the beginning of the model run [metric: mm, imperial: inch]
1560
+ * @example 8.2
1561
+ */
1562
+ precTotal?: number | null;
1563
+ /**
1564
+ * Format: float
1565
+ * @description the amount of snow in kg/m² [metric: mm water equivalent, imperial: inch water equivalent]
1566
+ * @example 22
1567
+ */
1568
+ snowAmount?: number | null;
1569
+ /**
1570
+ * Format: float
1571
+ * @description the amount of snow in kg/m² within 6 hours [metric: mm water equivalent, imperial: inch water equivalent]
1572
+ * @example 22
1573
+ */
1574
+ snowAmount6h?: number | null;
1575
+ /**
1576
+ * Format: float
1577
+ * @description the amount of snow in kg/m² within 12 hours [metric: mm water equivalent, imperial: inch water equivalent]
1578
+ * @example 22
1579
+ */
1580
+ snowAmount12h?: number | null;
1581
+ /**
1582
+ * Format: float
1583
+ * @description the amount of snow in kg/m² within 24 hours [metric: mm water equivalent, imperial: inch water equivalent]
1584
+ * @example 22
1585
+ */
1586
+ snowAmount24h?: number | null;
1587
+ /**
1588
+ * Format: float
1589
+ * @description the height of snow [metric: m, imperial: inch]
1590
+ * @example 0.04
1591
+ */
1592
+ snowHeight?: number | null;
1593
+ /**
1594
+ * @description wmo code according to WMO code table 4677 - see https://www.nodc.noaa.gov/gtspp/document/codetbls/wmocodes/table4677.html
1595
+ * @example 61
1596
+ */
1597
+ wmoCode?: number | null;
1598
+ weatherSymbol: components["schemas"]["weatherSymbol"];
1599
+ };
1600
+ AdvancedResponse: {
1601
+ /**
1602
+ * Format: float
1603
+ * @description latitude used for the forecast
1604
+ * @example 50.3651
1605
+ */
1606
+ lat: number;
1607
+ /**
1608
+ * Format: float
1609
+ * @description longitude used for the forecast
1610
+ * @example 8.7271
1611
+ */
1612
+ lon: number;
1613
+ /**
1614
+ * Format: float
1615
+ * @description altitude used for the forecast [metric: m, imperial: feet]
1616
+ * @example 120
1617
+ */
1618
+ alt?: number | null;
1619
+ resolution: components["schemas"]["modelResolution"];
1620
+ /**
1621
+ * @description the timezone at this location
1622
+ * @example Europe/Berlin
1623
+ */
1624
+ timeZone: string;
1625
+ /**
1626
+ * @description the system of units for values within this forecast response
1627
+ * @default metric
1628
+ * @example metric
1629
+ * @enum {string}
1630
+ */
1631
+ systemOfUnits: "metric" | "imperial";
1632
+ /**
1633
+ * Format: date-time
1634
+ * @description the run of the forecast (e.g. "2022-01-01T12:00:00+00:00")
1635
+ * @example 2022-01-01T12:00:00+00:00
1636
+ */
1637
+ run: string;
1638
+ data: components["schemas"]["AdvancedResponseData"][] | {
1639
+ [key: string]: components["schemas"]["AdvancedResponseData"];
1640
+ };
1641
+ };
1642
+ Threshold: {
1643
+ /** @description the name of the analyzed field */
1644
+ name: string;
1645
+ /**
1646
+ * Format: float
1647
+ * @description number of values that are above the thresholdValue
1648
+ */
1649
+ countAbove: number;
1650
+ /** @description count of all values that have been measured */
1651
+ count: number;
1652
+ /**
1653
+ * Format: float
1654
+ * @description the thresholdValue that has been used for the analysis
1655
+ */
1656
+ thresholdValue: number;
1657
+ };
1658
+ StationObservationAggregateData: {
1659
+ /**
1660
+ * @description the date and time of the observation (ISO 8601)
1661
+ * @example 2022-01-01T10:00:00+00:00
1662
+ */
1663
+ dateTime: string;
1664
+ /**
1665
+ * Format: float
1666
+ * @description latest measured temperature at the time / in this timespan [°C]
1667
+ * @example 16.3
1668
+ */
1669
+ temp?: number | null;
1670
+ /**
1671
+ * Format: float
1672
+ * @description mean temperature within the timespan [°C]
1673
+ * @example 16.3
1674
+ */
1675
+ tempMean?: number | null;
1676
+ /**
1677
+ * Format: float
1678
+ * @description minimum temperature within the timespan [°C]
1679
+ * @example 12
1680
+ */
1681
+ tempMin?: number | null;
1682
+ /**
1683
+ * Format: float
1684
+ * @description maximum temperature within the timespan [°C]
1685
+ * @example 18.5
1686
+ */
1687
+ tempMax?: number | null;
1688
+ /**
1689
+ * Format: float
1690
+ * @description mean dewpoint within the timespan [°C]
1691
+ * @example 8.3
1692
+ */
1693
+ dewpointMean?: number | null;
1694
+ /**
1695
+ * Format: float
1696
+ * @description the sum of precipitation within the timespan [mm]
1697
+ * @example 12
1698
+ */
1699
+ precSum?: number | null;
1700
+ /**
1701
+ * Format: float
1702
+ * @description the best value for precipitation (this may be a corrected value depending on radar data) [mm]
1703
+ * @example 12.2
1704
+ */
1705
+ precSumBest?: number | null;
1706
+ /**
1707
+ * @description this flag determines if the sum of precipitation in the given timespan has been automatically corrected (depending on radar data) [bool]
1708
+ * @example true
1709
+ */
1710
+ precSumModified?: boolean | null;
1711
+ /**
1712
+ * Format: float
1713
+ * @description the sum of precipitation within the previous 24h timespan [mm]
1714
+ * @example 12
1715
+ */
1716
+ prec24h?: number | null;
1717
+ /**
1718
+ * Format: float
1719
+ * @description mean height of measured snow [cm]
1720
+ * @example 4
1721
+ */
1722
+ snowHeightMean?: number | null;
1723
+ /**
1724
+ * Format: float
1725
+ * @description minimum height of measured snow [cm]
1726
+ * @example 4
1727
+ */
1728
+ snowHeightMin?: number | null;
1729
+ /**
1730
+ * Format: float
1731
+ * @description maximum height of measured snow [cm]
1732
+ * @example 4
1733
+ */
1734
+ snowHeightMax?: number | null;
1735
+ /**
1736
+ * Format: float
1737
+ * @description mean wet bulb temperature [°C]
1738
+ * @example 4
1739
+ */
1740
+ wetBulbTempMean?: number | null;
1741
+ /**
1742
+ * Format: float
1743
+ * @description minimum wet bulb temperature [°C]
1744
+ * @example 4
1745
+ */
1746
+ wetBulbTempMin?: number | null;
1747
+ /**
1748
+ * Format: float
1749
+ * @description maximum wet bulb temperature [°C]
1750
+ * @example 4
1751
+ */
1752
+ wetBulbTempMax?: number | null;
1753
+ /**
1754
+ * Format: float
1755
+ * @description the minimum temperature 5cm above ground [°C]
1756
+ * @example 9.3
1757
+ */
1758
+ temp5cmMin?: number | null;
1759
+ /**
1760
+ * Format: float
1761
+ * @description average wind speed [kn]
1762
+ * @example 2.5
1763
+ */
1764
+ windSpeedMean?: number | null;
1765
+ /**
1766
+ * Format: float
1767
+ * @description maximum wind speed [kn]
1768
+ * @example 2.5
1769
+ */
1770
+ windSpeedMax?: number | null;
1771
+ /**
1772
+ * Format: float
1773
+ * @description the maximum wind gust that was observed within the timespan [kn]
1774
+ * @example 9.3
1775
+ */
1776
+ windGustMax?: number | null;
1777
+ /**
1778
+ * @description average direction from which the wind originates in degree (0=N, 90=E, 180=S, 270=W) [°]
1779
+ * @example 90
1780
+ */
1781
+ windDirectionMean?: number | null;
1782
+ /**
1783
+ * Format: float
1784
+ * @description average air pressure at station level (QFE) [hPa]
1785
+ * @example 1000.4
1786
+ */
1787
+ pressureMean?: number | null;
1788
+ /**
1789
+ * Format: float
1790
+ * @description average air pressure at MSL / temperature adjusted (QFF) [hPa]
1791
+ * @example 1013.2
1792
+ */
1793
+ pressureMslMean?: number | null;
1794
+ /**
1795
+ * Format: float
1796
+ * @description average relative humidity [%]
1797
+ * @example 55
1798
+ */
1799
+ humidityRelativeMean?: number | null;
1800
+ /**
1801
+ * Format: float
1802
+ * @description sum of global radiation [kJ/m²]
1803
+ * @example 14000
1804
+ */
1805
+ globalRadiationSum?: number | null;
1806
+ /**
1807
+ * Format: float
1808
+ * @description average leaf wetness [%]
1809
+ * @example 60
1810
+ */
1811
+ leafWetMean?: number | null;
1812
+ /**
1813
+ * Format: float
1814
+ * @description soil temperature 10cm below surface [°C]
1815
+ * @example 3.5
1816
+ */
1817
+ soilTemp10Mean?: number | null;
1818
+ /**
1819
+ * Format: float
1820
+ * @description soil temperature 20cm below surface [°C]
1821
+ * @example 4
1822
+ */
1823
+ soilTemp20Mean?: number | null;
1824
+ /**
1825
+ * Format: float
1826
+ * @description soil temperature 80cm below surface [°C]
1827
+ * @example 4.5
1828
+ */
1829
+ soilTemp80Mean?: number | null;
1830
+ /**
1831
+ * Format: float
1832
+ * @description soil temperature 120cm below surface [°C]
1833
+ * @example 4.8
1834
+ */
1835
+ soilTemp120Mean?: number | null;
1836
+ /**
1837
+ * Format: float
1838
+ * @description soil humidity 10cm below surface [%]
1839
+ * @example 20
1840
+ */
1841
+ soilHumidity10Mean?: number | null;
1842
+ /**
1843
+ * Format: float
1844
+ * @description soil humidity 20cm below surface [%]
1845
+ * @example 20
1846
+ */
1847
+ soilHumidity20Mean?: number | null;
1848
+ /**
1849
+ * Format: float
1850
+ * @description soil humidity 30cm below surface [%]
1851
+ * @example 23
1852
+ */
1853
+ soilHumidity30Mean?: number | null;
1854
+ /**
1855
+ * Format: float
1856
+ * @description soil humidity 60cm below surface [%]
1857
+ * @example 23
1858
+ */
1859
+ soilHumidity60Mean?: number | null;
1860
+ /**
1861
+ * Format: float
1862
+ * @description soil humidity 80cm below surface [%]
1863
+ * @example 23
1864
+ */
1865
+ soilHumidity80Mean?: number | null;
1866
+ /**
1867
+ * Format: float
1868
+ * @description soil humidity 120cm below surface [%]
1869
+ * @example 26
1870
+ */
1871
+ soilHumidity120Mean?: number | null;
1872
+ /**
1873
+ * Format: float
1874
+ * @description soil water potential / tension - 10cm below surface in [kPa]
1875
+ * @example 26
1876
+ */
1877
+ soilWaterPot10Mean?: number | null;
1878
+ /**
1879
+ * Format: float
1880
+ * @description soil water potential / tension - 30cm below surface in [kPa]
1881
+ * @example 26
1882
+ */
1883
+ soilWaterPot30Mean?: number | null;
1884
+ /**
1885
+ * Format: float
1886
+ * @description soil water potential / tension - 60cm below surface in [kPa]
1887
+ * @example 26
1888
+ */
1889
+ soilWaterPot60Mean?: number | null;
1890
+ /** @description thresholds */
1891
+ thresholds?: (components["schemas"]["Threshold"][] | {
1892
+ [key: string]: components["schemas"]["Threshold"];
1893
+ }) | null;
1894
+ /** @description raw quality flags string to determine the aggregated data quality */
1895
+ qualityFlagsRaw?: string | null;
1896
+ };
1897
+ /** Response Object for aggregated observations */
1898
+ StationObservationAggregateResponse: {
1899
+ /**
1900
+ * the station's identifier
1901
+ * @example 106350
1902
+ */
1903
+ stationId: string;
1904
+ name: string;
1905
+ /** @example 50.1 */
1906
+ lat?: (number | string) | null;
1907
+ /** @example 8.3 */
1908
+ lon?: (number | string) | null;
1909
+ ele?: number | null;
1910
+ /** @default [] */
1911
+ data: components["schemas"]["StationObservationAggregateData"][] | {
1912
+ [key: string]: components["schemas"]["StationObservationAggregateData"];
1913
+ };
1914
+ };
1915
+ StationObservationData: {
1916
+ /**
1917
+ * Format: date-time
1918
+ * @description the date and time of the observation
1919
+ * @example 2022-01-01T10:00:00+00:00
1920
+ */
1921
+ dateTime: string;
1922
+ /**
1923
+ * Format: float
1924
+ * @description the temperature at 2m above ground [°C]
1925
+ * @example 23.4
1926
+ */
1927
+ temp?: number | null;
1928
+ /**
1929
+ * Format: float
1930
+ * @description the dewpoint [°C]
1931
+ * @example 13.3
1932
+ */
1933
+ dewpoint?: number | null;
1934
+ /**
1935
+ * Format: float
1936
+ * @description wet bulb temperature [°C]
1937
+ * @example 20.3
1938
+ */
1939
+ wetBulbTemp?: number | null;
1940
+ /**
1941
+ * Format: float
1942
+ * @description average 10min wind speed [kn]
1943
+ * @example 2.5
1944
+ */
1945
+ windSpeed?: number | null;
1946
+ /**
1947
+ * @description average direction from which the wind originates in degree (0=N, 90=E, 180=S, 270=W) [°]
1948
+ * @example 84
1949
+ */
1950
+ windDirection?: (number) | null;
1951
+ /**
1952
+ * Format: float
1953
+ * @description wind gusts speed within reference time / since last observation [kn]
1954
+ * @example 5.7
1955
+ */
1956
+ windGust?: number | null;
1957
+ /**
1958
+ * Format: float
1959
+ * @description wind gusts speed within 10min [kn]
1960
+ * @example 5.7
1961
+ */
1962
+ windGust10m?: number | null;
1963
+ /**
1964
+ * Format: float
1965
+ * @description wind gusts speed within 1h [kn]
1966
+ * @example 7.6
1967
+ */
1968
+ windGust1h?: number | null;
1969
+ /**
1970
+ * Format: float
1971
+ * @description relative humidity [%]
1972
+ * @example 53
1973
+ */
1974
+ humidityRelative?: number | null;
1975
+ /**
1976
+ * Format: float
1977
+ * @description air pressure at MSL / temperature adjusted (QFF) [hPa]
1978
+ * @example 1019.6
1979
+ */
1980
+ pressureMsl?: number | null;
1981
+ /**
1982
+ * Format: float
1983
+ * @description air pressure at station level (QFE) [hPa]
1984
+ * @example 1005.2
1985
+ */
1986
+ pressure?: number | null;
1987
+ /**
1988
+ * Format: float
1989
+ * @description air pressure change within 3h [hPa]
1990
+ * @example -1.3
1991
+ */
1992
+ pressureChange?: number | null;
1993
+ /**
1994
+ * Format: float
1995
+ * @description the temperature 5cm above ground [°C]
1996
+ * @example 27.3
1997
+ */
1998
+ temp5cm?: number | null;
1999
+ /**
2000
+ * Format: float
2001
+ * @description the minimum temperature 5cm above ground [°C]
2002
+ * @example 9.3
2003
+ */
2004
+ temp5cmMin?: number | null;
2005
+ /**
2006
+ * Format: float
2007
+ * @description the minimum temperature 2m above ground within the last 12h [°C]
2008
+ * @example 11.3
2009
+ */
2010
+ tempMin?: number | null;
2011
+ /**
2012
+ * Format: float
2013
+ * @description the maximum temperature 2m above ground within the last 12h [°C]
2014
+ * @example 25.6
2015
+ */
2016
+ tempMax?: number | null;
2017
+ /**
2018
+ * Format: float
2019
+ * @description the minimum temperature 2m above ground within the last hour [°C]
2020
+ * @example 22.6
2021
+ */
2022
+ tempMin1h?: number | null;
2023
+ /**
2024
+ * Format: float
2025
+ * @description the maximum temperature 2m above ground within the last hour [°C]
2026
+ * @example 25.6
2027
+ */
2028
+ tempMax1h?: number | null;
2029
+ /**
2030
+ * Format: float
2031
+ * @description precipitation amount during reference period [mm]
2032
+ * @example 10.5
2033
+ */
2034
+ prec?: number | null;
2035
+ /**
2036
+ * Format: float
2037
+ * @description precipitation reference period in hours [h]
2038
+ * @example 12
2039
+ */
2040
+ precHours?: number | null;
2041
+ /**
2042
+ * Format: float
2043
+ * @description precipitation amount during 10min [mm]
2044
+ * @example 0.4
2045
+ */
2046
+ prec10m?: number | null;
2047
+ /**
2048
+ * Format: float
2049
+ * @description precipitation amount during 1h [mm]
2050
+ * @example 3.2
2051
+ */
2052
+ prec1h?: number | null;
2053
+ /**
2054
+ * Format: float
2055
+ * @description precipitation amount during 6h [mm]
2056
+ * @example 5.5
2057
+ */
2058
+ prec6h?: number | null;
2059
+ /**
2060
+ * Format: float
2061
+ * @description precipitation amount during 24h [mm]
2062
+ * @example 14.5
2063
+ */
2064
+ prec24h?: number | null;
2065
+ /**
2066
+ * @description current height of snow [cm]
2067
+ * @example 6.5
2068
+ */
2069
+ snowHeight?: (number | string) | null;
2070
+ /**
2071
+ * Format: float
2072
+ * @description global radiation within 10min [kJ/m²]
2073
+ * @example 112
2074
+ */
2075
+ globalRadiation10m?: number | null;
2076
+ /**
2077
+ * Format: float
2078
+ * @description global radiation within 1h [kJ/m²]
2079
+ * @example 423
2080
+ */
2081
+ globalRadiation1h?: number | null;
2082
+ /**
2083
+ * Format: float
2084
+ * @description global radiation within 24h [J/cm²]
2085
+ * @example 123
2086
+ */
2087
+ globalRadiation24h?: number | null;
2088
+ /**
2089
+ * Format: float
2090
+ * @description leaf wetness [%]
2091
+ * @example 1.26
2092
+ */
2093
+ leafWet?: number | null;
2094
+ /**
2095
+ * Format: float
2096
+ * @description soil temperature 10cm below surface [°C]
2097
+ * @example 12.5
2098
+ */
2099
+ soilTemp10?: number | null;
2100
+ /**
2101
+ * Format: float
2102
+ * @description soil temperature 20cm below surface [°C]
2103
+ * @example 14.5
2104
+ */
2105
+ soilTemp20?: number | null;
2106
+ /**
2107
+ * Format: float
2108
+ * @description soil temperature 80cm below surface [°C]
2109
+ * @example 14.5
2110
+ */
2111
+ soilTemp80?: number | null;
2112
+ /**
2113
+ * Format: float
2114
+ * @description soil temperature 120cm below surface [°C]
2115
+ * @example 14.5
2116
+ */
2117
+ soilTemp120?: number | null;
2118
+ /**
2119
+ * Format: float
2120
+ * @description soil humidity 10cm below surface [%]
2121
+ * @example 14.5
2122
+ */
2123
+ soilHumidity10?: number | null;
2124
+ /**
2125
+ * Format: float
2126
+ * @description soil humidity 20cm below surface [%]
2127
+ * @example 14.5
2128
+ */
2129
+ soilHumidity20?: number | null;
2130
+ /**
2131
+ * Format: float
2132
+ * @description soil humidity 30cm below surface [%]
2133
+ * @example 14.5
2134
+ */
2135
+ soilHumidity30?: number | null;
2136
+ /**
2137
+ * Format: float
2138
+ * @description soil humidity 60cm below surface [%]
2139
+ * @example 14.5
2140
+ */
2141
+ soilHumidity60?: number | null;
2142
+ /**
2143
+ * Format: float
2144
+ * @description soil humidity 80cm below surface [%]
2145
+ * @example 14.5
2146
+ */
2147
+ soilHumidity80?: number | null;
2148
+ /**
2149
+ * Format: float
2150
+ * @description soil humidity 120cm below surface [%]
2151
+ * @example 14.5
2152
+ */
2153
+ soilHumidity120?: number | null;
2154
+ /**
2155
+ * Format: float
2156
+ * @description soil water potential / tension - 10cm below surface [kPa]
2157
+ * @example -13.54
2158
+ */
2159
+ soilWaterPot10?: number | null;
2160
+ /**
2161
+ * Format: float
2162
+ * @description soil water potential / tension - 30cm below surface [kPa]
2163
+ * @example -25.24
2164
+ */
2165
+ soilWaterPot30?: number | null;
2166
+ /**
2167
+ * Format: float
2168
+ * @description soil water potential / tension - 60cm below surface [kPa]
2169
+ * @example -26.12
2170
+ */
2171
+ soilWaterPot60?: number | null;
2172
+ /** @description thresholds */
2173
+ thresholds: unknown[] | {
2174
+ [key: string]: unknown;
2175
+ };
2176
+ };
2177
+ /** Response Object for raw / 10min observations */
2178
+ StationObservationResponse: {
2179
+ /**
2180
+ * the station's identifier
2181
+ * @example 106350
2182
+ */
2183
+ stationId: string;
2184
+ name: string;
2185
+ /** @example 50.1 */
2186
+ lat?: (number | string) | null;
2187
+ /** @example 8.3 */
2188
+ lon?: (number | string) | null;
2189
+ ele?: number | null;
2190
+ /** @default [] */
2191
+ data: components["schemas"]["StationObservationData"][] | {
2192
+ [key: string]: components["schemas"]["StationObservationData"];
2193
+ };
2194
+ };
2195
+ AstronomyResponseData: {
2196
+ /**
2197
+ * Format: date
2198
+ * @description date for the forecast values
2199
+ * @example 2022-01-01
2200
+ */
2201
+ dateTime: string;
2202
+ /**
2203
+ * Format: date-time
2204
+ * @description date and time of the sunrise
2205
+ * @example 2023-04-28T12:23:45Z
2206
+ */
2207
+ sunrise?: string | null;
2208
+ /**
2209
+ * Format: date-time
2210
+ * @description date and time of the sunset
2211
+ * @example 2023-03-28T10:11:22Z
2212
+ */
2213
+ sunset?: string | null;
2214
+ /**
2215
+ * Format: date-time
2216
+ * @description date and time when the sun is at its zenith
2217
+ * @example 2023-03-28T10:11:22Z
2218
+ */
2219
+ transit?: string | null;
2220
+ /**
2221
+ * Format: date-time
2222
+ * @description date and time when civil dawn begins
2223
+ * @example 2023-03-28T10:11:22Z
2224
+ */
2225
+ civilDawn?: string | null;
2226
+ /**
2227
+ * Format: date-time
2228
+ * @description date and time when civil dusk ends
2229
+ * @example 2023-03-28T10:11:22Z
2230
+ */
2231
+ civilDusk?: string | null;
2232
+ /**
2233
+ * Format: date-time
2234
+ * @description date and time when nautical dawn begins
2235
+ * @example 2023-03-28T10:11:22Z
2236
+ */
2237
+ nauticalDawn?: string | null;
2238
+ /**
2239
+ * Format: date-time
2240
+ * @description date and time when nautical dusk ends
2241
+ * @example 2023-03-28T10:11:22Z
2242
+ */
2243
+ nauticalDusk?: string | null;
2244
+ /**
2245
+ * Format: date-time
2246
+ * @description date and time when astronomical dawn begins
2247
+ * @example 2023-03-28T10:11:22Z
2248
+ */
2249
+ astronomicalDawn?: string | null;
2250
+ /**
2251
+ * Format: date-time
2252
+ * @description date and time when astronomical dusk ends
2253
+ * @example 2023-03-28T10:11:22Z
2254
+ */
2255
+ astronomicalDusk?: string | null;
2256
+ /**
2257
+ * Format: float
2258
+ * @description how much of the moon is illuminated [%]
2259
+ * @example 56
2260
+ */
2261
+ moonIllumination: number;
2262
+ /**
2263
+ * @description moon phase (0 = new moon, 1-49 = waxing moon, 50 = full moon, 51-99 = waning moon) [%]
2264
+ * @example 27
2265
+ */
2266
+ moonPhase: number;
2267
+ /**
2268
+ * Format: date-time
2269
+ * @description date and time when the moon rises
2270
+ * @example 2023-03-28T10:11:22Z
2271
+ */
2272
+ moonRise?: string | null;
2273
+ /**
2274
+ * Format: date-time
2275
+ * @description date and time when the moon sets
2276
+ * @example 2023-03-28T10:11:22Z
2277
+ */
2278
+ moonSet?: string | null;
2279
+ };
2280
+ AstronomyResponse: {
2281
+ /**
2282
+ * latitude used for the forecast
2283
+ * Format: float
2284
+ * @example 50.3651
2285
+ */
2286
+ lat: number;
2287
+ /**
2288
+ * longitude used for the forecast
2289
+ * Format: float
2290
+ * @example 8.7271
2291
+ */
2292
+ lon: number;
2293
+ /**
2294
+ * @description the timezone at this location
2295
+ * @example Europe/Berlin
2296
+ */
2297
+ timeZone: string;
2298
+ /**
2299
+ * Format: date-time
2300
+ * @description when astronomical values have been calculated
2301
+ * @example 2022-01-01T12:00:00+00:00
2302
+ */
2303
+ run: string;
2304
+ /**
2305
+ * Format: date-time
2306
+ * @description date and time of the next full moon
2307
+ * @example 2023-03-28T10:11:22Z
2308
+ */
2309
+ nextFullMoon: string;
2310
+ /**
2311
+ * Format: date-time
2312
+ * @description date and time of the next new moon
2313
+ * @example 2023-03-28T10:11:22Z
2314
+ */
2315
+ nextNewMoon: string;
2316
+ /** @default [] */
2317
+ dailyData: components["schemas"]["AstronomyResponseData"][] | {
2318
+ [key: string]: components["schemas"]["AstronomyResponseData"];
2319
+ };
2320
+ };
2321
+ };
2322
+ responses: {
2323
+ /**
2324
+ * @description Bad Request
2325
+ * This may occur when a parameter is out of bounds.
2326
+ */
2327
+ BadRequest: {
2328
+ headers: {
2329
+ [name: string]: unknown;
2330
+ };
2331
+ content: {
2332
+ "application/json": components["schemas"]["Error"];
2333
+ };
2334
+ };
2335
+ /**
2336
+ * @description Not Found
2337
+ * The resource you are trying to access could not be found.
2338
+ */
2339
+ NotFound: {
2340
+ headers: {
2341
+ [name: string]: unknown;
2342
+ };
2343
+ content: {
2344
+ "application/json": components["schemas"]["Error"];
2345
+ };
2346
+ };
2347
+ /**
2348
+ * @description Unauthorized
2349
+ * You provided no or wrong credentials.
2350
+ */
2351
+ Unauthorized: {
2352
+ headers: {
2353
+ [name: string]: unknown;
2354
+ };
2355
+ content: {
2356
+ "application/json": components["schemas"]["Error"];
2357
+ };
2358
+ };
2359
+ /**
2360
+ * @description Too Many Requests
2361
+ * This may happen if you exceeded the request limit or if there are any pending tasks, that may not be executed multiple times.
2362
+ */
2363
+ TooManyRequests: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": components["schemas"]["Error"];
2369
+ };
2370
+ };
2371
+ /**
2372
+ * @description Forbidden / Access Denied
2373
+ * You do not have enough rights to access this ressource.
2374
+ */
2375
+ AccessDenied: {
2376
+ headers: {
2377
+ [name: string]: unknown;
2378
+ };
2379
+ content: {
2380
+ "application/json": components["schemas"]["Error"];
2381
+ "application/xml": components["schemas"]["Error"];
2382
+ };
2383
+ };
2384
+ };
2385
+ parameters: {
2386
+ /** @description system of units for the response data */
2387
+ units: string;
2388
+ /**
2389
+ * @description the latitude for this request
2390
+ * @example 50.3651
2391
+ */
2392
+ latitude: number;
2393
+ /**
2394
+ * @description the latitude for this request
2395
+ * @example 8.7271
2396
+ */
2397
+ longitude: number;
2398
+ /**
2399
+ * @description if set, you'll only get forecasts that have at least `minHours` of forecast hours
2400
+ * if the `model` parameter is set, `minHours` will be ignored
2401
+ * @example 24
2402
+ */
2403
+ minForecastHours: number;
2404
+ /** @description Explicit forecast model to be used for a forecast. If this parameter is set, it may override parameters like the `minHours` or `minDays` parameter. */
2405
+ ForecastModel: string | null;
2406
+ };
2407
+ requestBodies: never;
2408
+ headers: never;
2409
+ pathItems: never;
2410
+ }
2411
+ interface operations {
2412
+ get_station_observations_latest: {
2413
+ parameters: {
2414
+ query?: never;
2415
+ header?: never;
2416
+ path: {
2417
+ /**
2418
+ * @description the station id to get the measurements
2419
+ * @example 106350
2420
+ */
2421
+ stationId: string;
2422
+ };
2423
+ cookie?: never;
2424
+ };
2425
+ requestBody?: never;
2426
+ responses: {
2427
+ /** @description Successful response */
2428
+ 200: {
2429
+ headers: {
2430
+ [name: string]: unknown;
2431
+ };
2432
+ content: {
2433
+ "application/json": components["schemas"]["StationObservationLatestResponse"];
2434
+ };
2435
+ };
2436
+ /** @description Unauthorized */
2437
+ 401: {
2438
+ headers: {
2439
+ [name: string]: unknown;
2440
+ };
2441
+ content?: never;
2442
+ };
2443
+ };
2444
+ };
2445
+ get_current_weather: {
2446
+ parameters: {
2447
+ query?: {
2448
+ /** @description system of units for the response data */
2449
+ units?: components["parameters"]["units"];
2450
+ };
2451
+ header?: never;
2452
+ path: {
2453
+ /**
2454
+ * @description the latitude for this request
2455
+ * @example 50.3651
2456
+ */
2457
+ lat: components["parameters"]["latitude"];
2458
+ /**
2459
+ * @description the latitude for this request
2460
+ * @example 8.7271
2461
+ */
2462
+ lon: components["parameters"]["longitude"];
2463
+ };
2464
+ cookie?: never;
2465
+ };
2466
+ requestBody?: never;
2467
+ responses: {
2468
+ /** @description Successful response */
2469
+ 200: {
2470
+ headers: {
2471
+ [name: string]: unknown;
2472
+ };
2473
+ content: {
2474
+ "application/json": components["schemas"]["CurrentWeatherResponse"];
2475
+ };
2476
+ };
2477
+ 400: components["responses"]["BadRequest"];
2478
+ 401: components["responses"]["Unauthorized"];
2479
+ };
2480
+ };
2481
+ get_forecast_3days: {
2482
+ parameters: {
2483
+ query?: {
2484
+ /** @description minimum number of days */
2485
+ minDays?: number;
2486
+ /** @description Explicit forecast model to be used for a forecast. If this parameter is set, it may override parameters like the `minHours` or `minDays` parameter. */
2487
+ model?: components["parameters"]["ForecastModel"];
2488
+ /** @description system of units for the response data */
2489
+ units?: components["parameters"]["units"];
2490
+ };
2491
+ header?: {
2492
+ /** @description Accept header */
2493
+ Accept?: "application/vnd.kmw.v2+json" | "application/json";
2494
+ };
2495
+ path: {
2496
+ /**
2497
+ * @description the latitude for this request
2498
+ * @example 50.3651
2499
+ */
2500
+ lat: components["parameters"]["latitude"];
2501
+ /**
2502
+ * @description the latitude for this request
2503
+ * @example 8.7271
2504
+ */
2505
+ lon: components["parameters"]["longitude"];
2506
+ };
2507
+ cookie?: never;
2508
+ };
2509
+ requestBody?: never;
2510
+ responses: {
2511
+ /** @description Successful response */
2512
+ 200: {
2513
+ headers: {
2514
+ [name: string]: unknown;
2515
+ };
2516
+ content: {
2517
+ "application/json": components["schemas"]["DailyWeatherResponse"];
2518
+ };
2519
+ };
2520
+ 400: components["responses"]["BadRequest"];
2521
+ 401: components["responses"]["Unauthorized"];
2522
+ };
2523
+ };
2524
+ get_forecast_trend14days: {
2525
+ parameters: {
2526
+ query?: {
2527
+ /** @description system of units for the response data */
2528
+ units?: components["parameters"]["units"];
2529
+ };
2530
+ header?: never;
2531
+ path: {
2532
+ /**
2533
+ * @description the latitude for this request
2534
+ * @example 50.3651
2535
+ */
2536
+ lat: components["parameters"]["latitude"];
2537
+ /**
2538
+ * @description the latitude for this request
2539
+ * @example 8.7271
2540
+ */
2541
+ lon: components["parameters"]["longitude"];
2542
+ };
2543
+ cookie?: never;
2544
+ };
2545
+ requestBody?: never;
2546
+ responses: {
2547
+ /** @description Successful response */
2548
+ 200: {
2549
+ headers: {
2550
+ [name: string]: unknown;
2551
+ };
2552
+ content: {
2553
+ "application/json": components["schemas"]["Trend14DaysResponse"];
2554
+ };
2555
+ };
2556
+ 400: components["responses"]["BadRequest"];
2557
+ 401: components["responses"]["Unauthorized"];
2558
+ };
2559
+ };
2560
+ get_forecast_standard: {
2561
+ parameters: {
2562
+ query?: {
2563
+ /** @description system of units for the response data */
2564
+ units?: components["parameters"]["units"];
2565
+ };
2566
+ header?: never;
2567
+ path: {
2568
+ /**
2569
+ * @description the latitude for this request
2570
+ * @example 50.3651
2571
+ */
2572
+ lat: components["parameters"]["latitude"];
2573
+ /**
2574
+ * @description the latitude for this request
2575
+ * @example 8.7271
2576
+ */
2577
+ lon: components["parameters"]["longitude"];
2578
+ /** @description the time steps, e.g. 3h for a forecast values every 3 hours (8 values per day) */
2579
+ timeSteps: string;
2580
+ };
2581
+ cookie?: never;
2582
+ };
2583
+ requestBody?: never;
2584
+ responses: {
2585
+ /** @description Successful response */
2586
+ 200: {
2587
+ headers: {
2588
+ [name: string]: unknown;
2589
+ };
2590
+ content: {
2591
+ "application/json": components["schemas"]["StandardResponse"];
2592
+ };
2593
+ };
2594
+ 400: components["responses"]["BadRequest"];
2595
+ 401: components["responses"]["Unauthorized"];
2596
+ };
2597
+ };
2598
+ get_forecast_advanced: {
2599
+ parameters: {
2600
+ query?: {
2601
+ /** @description system of units for the response data */
2602
+ units?: components["parameters"]["units"];
2603
+ };
2604
+ header?: never;
2605
+ path: {
2606
+ /**
2607
+ * @description the latitude for this request
2608
+ * @example 50.3651
2609
+ */
2610
+ lat: components["parameters"]["latitude"];
2611
+ /**
2612
+ * @description the latitude for this request
2613
+ * @example 8.7271
2614
+ */
2615
+ lon: components["parameters"]["longitude"];
2616
+ /** @description the time steps, e.g. 3h for a forecast values every 3 hours (8 values per day) */
2617
+ timeSteps: string;
2618
+ };
2619
+ cookie?: never;
2620
+ };
2621
+ requestBody?: never;
2622
+ responses: {
2623
+ /** @description Successful response */
2624
+ 200: {
2625
+ headers: {
2626
+ [name: string]: unknown;
2627
+ };
2628
+ content: {
2629
+ "application/json": components["schemas"]["AdvancedResponse"];
2630
+ };
2631
+ };
2632
+ 400: components["responses"]["BadRequest"];
2633
+ 401: components["responses"]["Unauthorized"];
2634
+ };
2635
+ };
2636
+ get_station_search: {
2637
+ parameters: {
2638
+ query?: {
2639
+ /**
2640
+ * @description the radius to search for stations in km
2641
+ * @example 10
2642
+ */
2643
+ radius?: number;
2644
+ };
2645
+ header?: never;
2646
+ path: {
2647
+ /**
2648
+ * @description latitude of the center point
2649
+ * @example 50.3651
2650
+ */
2651
+ lat: number;
2652
+ /**
2653
+ * @description longitude of the center point
2654
+ * @example 8.7271
2655
+ */
2656
+ lon: number;
2657
+ };
2658
+ cookie?: never;
2659
+ };
2660
+ requestBody?: never;
2661
+ responses: {
2662
+ /** @description Successful response */
2663
+ 200: {
2664
+ headers: {
2665
+ [name: string]: unknown;
2666
+ };
2667
+ content: {
2668
+ "application/json": components["schemas"]["StationInformation"][];
2669
+ };
2670
+ };
2671
+ 400: components["responses"]["BadRequest"];
2672
+ 401: components["responses"]["Unauthorized"];
2673
+ };
2674
+ };
2675
+ get_station_observations: {
2676
+ parameters: {
2677
+ query?: {
2678
+ /**
2679
+ * @description threshold values to analyze
2680
+ * @example {"temp": 0.1}
2681
+ */
2682
+ threshold?: Record<string, never>;
2683
+ };
2684
+ header?: never;
2685
+ path: {
2686
+ /**
2687
+ * @description the station id to get the measurements
2688
+ * @example 106350
2689
+ */
2690
+ stationId: string;
2691
+ /** @description the maximum resolution of observation data */
2692
+ timeSteps: string;
2693
+ };
2694
+ cookie?: never;
2695
+ };
2696
+ requestBody?: never;
2697
+ responses: {
2698
+ /** @description Successful response */
2699
+ 200: {
2700
+ headers: {
2701
+ [name: string]: unknown;
2702
+ };
2703
+ content: {
2704
+ "application/json": components["schemas"]["StationObservationAggregateResponse"] | components["schemas"]["StationObservationResponse"];
2705
+ };
2706
+ };
2707
+ 400: components["responses"]["BadRequest"];
2708
+ 401: components["responses"]["Unauthorized"];
2709
+ 403: components["responses"]["AccessDenied"];
2710
+ };
2711
+ };
2712
+ get_tools_astronomy: {
2713
+ parameters: {
2714
+ query?: never;
2715
+ header?: never;
2716
+ path: {
2717
+ /**
2718
+ * @description the latitude for this request
2719
+ * @example 50.3651
2720
+ */
2721
+ lat: components["parameters"]["latitude"];
2722
+ /**
2723
+ * @description the latitude for this request
2724
+ * @example 8.7271
2725
+ */
2726
+ lon: components["parameters"]["longitude"];
2727
+ };
2728
+ cookie?: never;
2729
+ };
2730
+ requestBody?: never;
2731
+ responses: {
2732
+ /** @description Successful response */
2733
+ 200: {
2734
+ headers: {
2735
+ [name: string]: unknown;
2736
+ };
2737
+ content: {
2738
+ "application/json": components["schemas"]["AstronomyResponse"];
2739
+ };
2740
+ };
2741
+ 400: components["responses"]["BadRequest"];
2742
+ 401: components["responses"]["Unauthorized"];
2743
+ };
2744
+ };
2745
+ get_tools_weather_symbol: {
2746
+ parameters: {
2747
+ query?: never;
2748
+ header?: never;
2749
+ path: {
2750
+ /** @description use the values of `weatherSymbol` from our forecast responses to get an appropriate image */
2751
+ weatherSymbol: string;
2752
+ format: string;
2753
+ };
2754
+ cookie?: never;
2755
+ };
2756
+ requestBody?: never;
2757
+ responses: {
2758
+ /** @description Successful response */
2759
+ 200: {
2760
+ headers: {
2761
+ [name: string]: unknown;
2762
+ };
2763
+ content: {
2764
+ "image/svg+xml": unknown;
2765
+ };
2766
+ };
2767
+ 400: components["responses"]["BadRequest"];
2768
+ 401: components["responses"]["Unauthorized"];
2769
+ 404: components["responses"]["NotFound"];
2770
+ };
2771
+ };
2772
+ }
2773
+ type Ok<Op extends keyof operations> = operations[Op]["responses"][200] extends {
2774
+ content: {
2775
+ "application/json": infer Body;
2776
+ };
2777
+ } ? Body : never;
2778
+ /** Raw response of `client.current()`. */
2779
+ type RawCurrentWeather = Ok<"get_current_weather">;
2780
+ /** Raw response of `client.forecast.standard()`. */
2781
+ type RawStandardForecast = Ok<"get_forecast_standard">;
2782
+ /** Raw response of `client.forecast.advanced()`. */
2783
+ type RawAdvancedForecast = Ok<"get_forecast_advanced">;
2784
+ /** Raw response of `client.forecast.threeDay()`. */
2785
+ type RawThreeDayForecast = Ok<"get_forecast_3days">;
2786
+ /** Raw response of `client.forecast.trend14Days()`. */
2787
+ type RawTrend14Days = Ok<"get_forecast_trend14days">;
2788
+ /** Raw response of `client.stations.search()`. */
2789
+ type RawStationSearch = Ok<"get_station_search">;
2790
+ /** Raw response of `client.stations.latest()`. */
2791
+ type RawStationLatest = Ok<"get_station_observations_latest">;
2792
+ /** Raw response of `client.stations.observations()`: raw (`"10min"`) or aggregated (`"1h"`, `"1d"`). */
2793
+ type RawObservations = Ok<"get_station_observations">;
2794
+ /** Raw response of `client.tools.astronomy()`. */
2795
+ type RawAstronomy = Ok<"get_tools_astronomy">;
2796
+ /** Options of `forecast.threeDay()`. */
2797
+ interface ThreeDayOptions<V extends UnitSystem> extends UnitOptions<V> {
2798
+ /**
2799
+ * Only use forecast models that cover at least this many days. Ignored by
2800
+ * the API when `model` is set.
2801
+ */
2802
+ readonly minDays?: number;
2803
+ /** Request a specific forecast model. Omit to let the API pick the best one. */
2804
+ readonly model?: ForecastModel;
2805
+ }
2806
+ /** Forecast endpoints. Access via `client.forecast`. */
2807
+ declare class ForecastResource<U extends UnitSystem = UnitSystem> {
2808
+ #private;
2809
+ /** @internal */
2810
+ constructor(http: HttpClient, units: U);
2811
+ /**
2812
+ * Standard parameter package: temperature, wind, precipitation, clouds,
2813
+ * sunshine and snow per time step.
2814
+ *
2815
+ * @param timeSteps `"1h"` (24 h ahead), `"3h"` (120 h) or `"6h"` (240 h).
2816
+ * @example
2817
+ * const forecast = await client.forecast.standard({ lat: 50.1, lon: 8.7 }, "3h");
2818
+ */
2819
+ standard<V extends UnitSystem = U>(location: Coordinates, timeSteps: ForecastTimeSteps, options?: UnitOptions<V> & NormalizedOption): Promise<StandardForecast<V>>;
2820
+ /** Standard parameter package, exactly as the API sent it. */
2821
+ standard<V extends UnitSystem = U>(location: Coordinates, timeSteps: ForecastTimeSteps, options: UnitOptions<V> & RawOption): Promise<RawStandardForecast>;
2822
+ /**
2823
+ * Advanced parameter package: everything from `standard()` plus min/max
2824
+ * temperatures, cloud layers, global radiation, precipitation and snow sums,
2825
+ * WMO code and weather symbol.
2826
+ */
2827
+ advanced<V extends UnitSystem = U>(location: Coordinates, timeSteps: ForecastTimeSteps, options?: UnitOptions<V> & NormalizedOption): Promise<AdvancedForecast<V>>;
2828
+ /** Advanced parameter package, exactly as the API sent it. */
2829
+ advanced<V extends UnitSystem = U>(location: Coordinates, timeSteps: ForecastTimeSteps, options: UnitOptions<V> & RawOption): Promise<RawAdvancedForecast>;
2830
+ /** Daily summaries for three days, each split into night, morning, afternoon and evening. */
2831
+ threeDay<V extends UnitSystem = U>(location: Coordinates, options?: ThreeDayOptions<V> & NormalizedOption): Promise<ThreeDayForecast<V>>;
2832
+ /** Three-day forecast, exactly as the API sent it. */
2833
+ threeDay<V extends UnitSystem = U>(location: Coordinates, options: ThreeDayOptions<V> & RawOption): Promise<RawThreeDayForecast>;
2834
+ /** Daily trend for 14 days, with the range across forecast models. */
2835
+ trend14Days<V extends UnitSystem = U>(location: Coordinates, options?: UnitOptions<V> & NormalizedOption): Promise<Trend14Days<V>>;
2836
+ /** 14-day trend, exactly as the API sent it. */
2837
+ trend14Days<V extends UnitSystem = U>(location: Coordinates, options: UnitOptions<V> & RawOption): Promise<RawTrend14Days>;
2838
+ }
2839
+ /**
2840
+ * Types of the **experimental** weather photo endpoints (`client.photos`).
2841
+ *
2842
+ * These endpoints power the community weather photos on kachelmannwetter.com
2843
+ * and are **not part of the documented v02 API**. Field types were inferred
2844
+ * from observed responses and may change without notice.
2845
+ *
2846
+ * Photos are licensed to Kachelmann GmbH and contain personal data (uploader
2847
+ * names, locations). Respect the photographers' rights and applicable data
2848
+ * protection law when you store or display them.
2849
+ * @module
2850
+ */
2851
+ /** Wind speed unit for `weatherData` in photo responses. */
2852
+ type PhotoWindUnit = "kmh" | "mph" | "knot" | "mps";
2853
+ /** A community or DWD weather photo. */
2854
+ interface WeatherPhoto {
2855
+ readonly id: string;
2856
+ /** Display name of the uploader. */
2857
+ readonly name: string | null;
2858
+ /** When the photo was taken (as reported by the uploader). */
2859
+ readonly datetime: string;
2860
+ readonly likeCount: number;
2861
+ readonly views: number;
2862
+ /** Place name. */
2863
+ readonly locationName: string | null;
2864
+ readonly description: string | null;
2865
+ readonly lat: number | null;
2866
+ readonly lon: number | null;
2867
+ /** Image ID on the photo CDN. */
2868
+ readonly imageId: string | null;
2869
+ /** URL of the full-size image. */
2870
+ readonly url?: string | null;
2871
+ /** URL of a thumbnail. */
2872
+ readonly thumbnail?: string | null;
2873
+ /** `"community"` or `"dwd"`. */
2874
+ readonly source?: "community" | "dwd" | (string & {}) | null;
2875
+ readonly external?: unknown;
2876
+ /** Weather report attached to the photo. Shape not documented. */
2877
+ readonly weatherData?: unknown;
2878
+ /** Upload time. Only set by `photos.get()`. */
2879
+ readonly uploadedAt?: string | null;
2880
+ readonly cameraMake?: string | null;
2881
+ readonly cameraModel?: string | null;
2882
+ readonly photoOriginalTime?: string | null;
2883
+ readonly exposureTime?: string | number | null;
2884
+ readonly apertureValue?: string | number | null;
2885
+ readonly focalLength?: string | number | null;
2886
+ readonly focalLength35mm?: string | number | null;
2887
+ readonly fieldOfView?: string | number | null;
2888
+ /** Altitude from EXIF. */
2889
+ readonly altitude?: string | number | null;
2890
+ readonly isoSpeed?: string | number | null;
2891
+ }
2892
+ /** Options of `photos.list()`. */
2893
+ interface PhotoListOptions extends CallOptions {
2894
+ /** First day (inclusive), `YYYY-MM-DD` or a `Date` (its UTC date is used). */
2895
+ readonly from: DateString | Date;
2896
+ /** Last day (inclusive), `YYYY-MM-DD` or a `Date` (its UTC date is used). */
2897
+ readonly to: DateString | Date;
2898
+ /** Wind unit of the attached weather data. */
2899
+ readonly windUnit?: PhotoWindUnit;
2900
+ /** Length units of the attached weather data. */
2901
+ readonly units?: UnitSystem;
2902
+ }
2903
+ /**
2904
+ * **Experimental.** Read-only access to the community weather photos of
2905
+ * kachelmannwetter.com. Access via `client.photos`.
2906
+ *
2907
+ * These endpoints are **not part of the documented v02 API** and may change
2908
+ * at any time. They are public: no API key is sent. Liking, uploading and
2909
+ * view counting need a user account and are not supported.
2910
+ *
2911
+ * Photos are licensed to Kachelmann GmbH and contain personal data (uploader
2912
+ * names, locations): respect copyright and data protection law.
2913
+ *
2914
+ * @experimental
2915
+ */
2916
+ declare class PhotosResource {
2917
+ #private;
2918
+ /** @internal */
2919
+ constructor(http: HttpClient);
2920
+ /** Number of photos per day, keyed by `YYYY-MM-DD`. */
2921
+ counts(options?: CallOptions): Promise<Record<DateString, number>>;
2922
+ /** Photos taken between two days. */
2923
+ list(options: PhotoListOptions): Promise<WeatherPhoto[]>;
2924
+ /** A single photo. Throws `NotFoundError` if it does not exist. */
2925
+ get(id: string, options?: CallOptions): Promise<WeatherPhoto>;
2926
+ }
2927
+ /**
2928
+ * Resolution of station observations. It also determines how much history
2929
+ * the API returns:
2930
+ *
2931
+ * | `timeSteps` | Values | History |
2932
+ * | ----------- | -------------------------- | -------- |
2933
+ * | `"10min"` | raw observations | 6 hours |
2934
+ * | `"1h"` | hourly aggregates | 24 hours |
2935
+ * | `"1d"` | daily aggregates (local midnight to midnight) | 7 days |
2936
+ *
2937
+ * Aggregates are *not* climatological values: they are also computed when
2938
+ * only some measurements of the interval are present.
2939
+ */
2940
+ type ObservationTimeSteps = "10min" | "1h" | "1d";
2941
+ /** A weather station. */
2942
+ interface StationInformation {
2943
+ /** Station ID, used by `stations.latest()` and `stations.observations()`. */
2944
+ readonly id: string;
2945
+ readonly name: string;
2946
+ /** Latitude of the station, in decimal degrees. */
2947
+ readonly lat: number;
2948
+ /** Longitude of the station, in decimal degrees. */
2949
+ readonly lon: number;
2950
+ /** Altitude of the station. Unit: m. */
2951
+ readonly alt: number;
2952
+ /** How precise the measurements are, e.g. `"high"`. Some amateur stations are less precise. */
2953
+ readonly precision: string;
2954
+ /** Station network, e.g. `"WMO"` or `"VH"` (Vereinigte Hagel). */
2955
+ readonly type: string;
2956
+ /** Whether the station sent measurements recently. */
2957
+ readonly recentlyActive?: boolean | null;
2958
+ /** Distance to the requested location. Unit: km. Only set by `stations.search()`. */
2959
+ readonly distance?: number | null;
2960
+ }
2961
+ /** Station fields shared by all observation responses. */
2962
+ interface StationHeader {
2963
+ readonly stationId: string;
2964
+ readonly name: string;
2965
+ /** Latitude in decimal degrees (numeric strings are converted to numbers). */
2966
+ readonly lat: number | null;
2967
+ /** Longitude in decimal degrees (numeric strings are converted to numbers). */
2968
+ readonly lon: number | null;
2969
+ /** Elevation of the station. Unit: m. */
2970
+ readonly ele: number | null;
2971
+ }
2972
+ /** One measured value of `stations.latest()`. Units as in {@link StationObservation}. */
2973
+ interface LatestObservationValue {
2974
+ /** When the value was measured. */
2975
+ readonly dateTime: DateTimeString;
2976
+ /** Parameter name, e.g. `"temp"` or `"windGust"`. */
2977
+ readonly name: string;
2978
+ readonly value: number | string | null;
2979
+ }
2980
+ /** Response of `stations.latest()`. */
2981
+ interface StationLatest extends StationHeader {
2982
+ /**
2983
+ * Latest value of each measured parameter, keyed by parameter name. Units
2984
+ * are always metric, wind speeds in **knots**, see {@link StationObservation}.
2985
+ */
2986
+ readonly data: Readonly<Record<string, LatestObservationValue>>;
2987
+ }
2988
+ /** Result of a threshold analysis requested with the `threshold` option. */
2989
+ interface Threshold {
2990
+ /** Name of the analyzed parameter, e.g. `"temp"`. */
2991
+ readonly name: string;
2992
+ /** Number of values above `thresholdValue`. */
2993
+ readonly countAbove: number;
2994
+ /** Number of all measured values. */
2995
+ readonly count: number;
2996
+ /** Threshold that was used. */
2997
+ readonly thresholdValue: number;
2998
+ }
2999
+ /**
3000
+ * One raw (10-minute) station observation. Station values are **always
3001
+ * metric** regardless of the client's `units`; wind speeds are in **knots**.
3002
+ * Use `knotsToKmh()` / `knotsToMps()` to convert.
3003
+ */
3004
+ interface StationObservation {
3005
+ /** Time of the observation. */
3006
+ readonly dateTime: DateTimeString;
3007
+ /** Temperature 2 m above ground. Unit: °C. */
3008
+ readonly temp?: number | null;
3009
+ /** Dew point. Unit: °C. */
3010
+ readonly dewpoint?: number | null;
3011
+ /** Wet-bulb temperature. Unit: °C. */
3012
+ readonly wetBulbTemp?: number | null;
3013
+ /** Average 10-minute wind speed. Unit: **kn**. */
3014
+ readonly windSpeed?: number | null;
3015
+ /** Direction the wind blows from, in degrees (0 = N, 90 = E, 180 = S, 270 = W). */
3016
+ readonly windDirection?: number | null;
3017
+ /** Wind gust speed since the last observation. Unit: **kn**. */
3018
+ readonly windGust?: number | null;
3019
+ /** Wind gust speed within 10 minutes. Unit: **kn**. */
3020
+ readonly windGust10m?: number | null;
3021
+ /** Wind gust speed within 1 hour. Unit: **kn**. */
3022
+ readonly windGust1h?: number | null;
3023
+ /** Relative humidity. Unit: %. */
3024
+ readonly humidityRelative?: number | null;
3025
+ /** Air pressure reduced to mean sea level, temperature-adjusted (QFF). Unit: hPa. */
3026
+ readonly pressureMsl?: number | null;
3027
+ /** Air pressure at station level (QFE). Unit: hPa. */
3028
+ readonly pressure?: number | null;
3029
+ /** Air pressure change within 3 hours. Unit: hPa. */
3030
+ readonly pressureChange?: number | null;
3031
+ /** Temperature 5 cm above ground. Unit: °C. */
3032
+ readonly temp5cm?: number | null;
3033
+ /** Minimum temperature 5 cm above ground. Unit: °C. */
3034
+ readonly temp5cmMin?: number | null;
3035
+ /** Minimum temperature 2 m above ground within the last 12 hours. Unit: °C. */
3036
+ readonly tempMin?: number | null;
3037
+ /** Maximum temperature 2 m above ground within the last 12 hours. Unit: °C. */
3038
+ readonly tempMax?: number | null;
3039
+ /** Minimum temperature 2 m above ground within the last hour. Unit: °C. */
3040
+ readonly tempMin1h?: number | null;
3041
+ /** Maximum temperature 2 m above ground within the last hour. Unit: °C. */
3042
+ readonly tempMax1h?: number | null;
3043
+ /** Precipitation during the reference period `precHours`. Unit: mm. */
3044
+ readonly prec?: number | null;
3045
+ /** Length of the reference period of `prec`. Unit: h. */
3046
+ readonly precHours?: number | null;
3047
+ /** Precipitation within 10 minutes. Unit: mm. */
3048
+ readonly prec10m?: number | null;
3049
+ /** Precipitation within 1 hour. Unit: mm. */
3050
+ readonly prec1h?: number | null;
3051
+ /** Precipitation within 6 hours. Unit: mm. */
3052
+ readonly prec6h?: number | null;
3053
+ /** Precipitation within 24 hours. Unit: mm. */
3054
+ readonly prec24h?: number | null;
3055
+ /** Current snow depth (numeric strings are converted to numbers). Unit: **cm**. */
3056
+ readonly snowHeight?: number | null;
3057
+ /** Global radiation within 10 minutes. Unit: kJ/m². */
3058
+ readonly globalRadiation10m?: number | null;
3059
+ /** Global radiation within 1 hour. Unit: kJ/m². */
3060
+ readonly globalRadiation1h?: number | null;
3061
+ /** Global radiation within 24 hours. Unit: **J/cm²** (1 J/cm² = 10 kJ/m²). */
3062
+ readonly globalRadiation24h?: number | null;
3063
+ /** Leaf wetness. Unit: %. */
3064
+ readonly leafWet?: number | null;
3065
+ /** Soil temperature 10 cm below the surface. Unit: °C. */
3066
+ readonly soilTemp10?: number | null;
3067
+ /** Soil temperature 20 cm below the surface. Unit: °C. */
3068
+ readonly soilTemp20?: number | null;
3069
+ /** Soil temperature 80 cm below the surface. Unit: °C. */
3070
+ readonly soilTemp80?: number | null;
3071
+ /** Soil temperature 120 cm below the surface. Unit: °C. */
3072
+ readonly soilTemp120?: number | null;
3073
+ /** Soil humidity 10 cm below the surface. Unit: %. */
3074
+ readonly soilHumidity10?: number | null;
3075
+ /** Soil humidity 20 cm below the surface. Unit: %. */
3076
+ readonly soilHumidity20?: number | null;
3077
+ /** Soil humidity 30 cm below the surface. Unit: %. */
3078
+ readonly soilHumidity30?: number | null;
3079
+ /** Soil humidity 60 cm below the surface. Unit: %. */
3080
+ readonly soilHumidity60?: number | null;
3081
+ /** Soil humidity 80 cm below the surface. Unit: %. */
3082
+ readonly soilHumidity80?: number | null;
3083
+ /** Soil humidity 120 cm below the surface. Unit: %. */
3084
+ readonly soilHumidity120?: number | null;
3085
+ /** Soil water potential (tension) 10 cm below the surface. Unit: kPa. */
3086
+ readonly soilWaterPot10?: number | null;
3087
+ /** Soil water potential (tension) 30 cm below the surface. Unit: kPa. */
3088
+ readonly soilWaterPot30?: number | null;
3089
+ /** Soil water potential (tension) 60 cm below the surface. Unit: kPa. */
3090
+ readonly soilWaterPot60?: number | null;
3091
+ /** Threshold analyses requested with the `threshold` option, keyed by parameter name. */
3092
+ readonly thresholds: Readonly<Record<string, Threshold>>;
3093
+ }
3094
+ /**
3095
+ * One hourly or daily aggregate of station observations. Always metric;
3096
+ * wind speeds in **knots**.
3097
+ */
3098
+ interface StationObservationAggregate {
3099
+ /** Start of the aggregated interval. */
3100
+ readonly dateTime: DateTimeString;
3101
+ /** Latest measured temperature in this interval. Unit: °C. */
3102
+ readonly temp?: number | null;
3103
+ /** Mean temperature. Unit: °C. */
3104
+ readonly tempMean?: number | null;
3105
+ /** Minimum temperature. Unit: °C. */
3106
+ readonly tempMin?: number | null;
3107
+ /** Maximum temperature. Unit: °C. */
3108
+ readonly tempMax?: number | null;
3109
+ /** Mean dew point. Unit: °C. */
3110
+ readonly dewpointMean?: number | null;
3111
+ /** Precipitation sum. Unit: mm. */
3112
+ readonly precSum?: number | null;
3113
+ /** Best precipitation value, possibly corrected with radar data. Unit: mm. */
3114
+ readonly precSumBest?: number | null;
3115
+ /** Whether `precSumBest` was corrected with radar data. */
3116
+ readonly precSumModified?: boolean | null;
3117
+ /** Precipitation sum of the previous 24 hours. Unit: mm. */
3118
+ readonly prec24h?: number | null;
3119
+ /** Mean snow depth. Unit: **cm**. */
3120
+ readonly snowHeightMean?: number | null;
3121
+ /** Minimum snow depth. Unit: **cm**. */
3122
+ readonly snowHeightMin?: number | null;
3123
+ /** Maximum snow depth. Unit: **cm**. */
3124
+ readonly snowHeightMax?: number | null;
3125
+ /** Mean wet-bulb temperature. Unit: °C. */
3126
+ readonly wetBulbTempMean?: number | null;
3127
+ /** Minimum wet-bulb temperature. Unit: °C. */
3128
+ readonly wetBulbTempMin?: number | null;
3129
+ /** Maximum wet-bulb temperature. Unit: °C. */
3130
+ readonly wetBulbTempMax?: number | null;
3131
+ /** Minimum temperature 5 cm above ground. Unit: °C. */
3132
+ readonly temp5cmMin?: number | null;
3133
+ /** Mean wind speed. Unit: **kn**. */
3134
+ readonly windSpeedMean?: number | null;
3135
+ /** Maximum wind speed. Unit: **kn**. */
3136
+ readonly windSpeedMax?: number | null;
3137
+ /** Maximum wind gust. Unit: **kn**. */
3138
+ readonly windGustMax?: number | null;
3139
+ /** Mean direction the wind blows from, in degrees (0 = N, 90 = E). */
3140
+ readonly windDirectionMean?: number | null;
3141
+ /** Mean air pressure at station level (QFE). Unit: hPa. */
3142
+ readonly pressureMean?: number | null;
3143
+ /** Mean air pressure at mean sea level (QFF). Unit: hPa. */
3144
+ readonly pressureMslMean?: number | null;
3145
+ /** Mean relative humidity. Unit: %. */
3146
+ readonly humidityRelativeMean?: number | null;
3147
+ /** Sum of global radiation. Unit: kJ/m². */
3148
+ readonly globalRadiationSum?: number | null;
3149
+ /** Mean leaf wetness. Unit: %. */
3150
+ readonly leafWetMean?: number | null;
3151
+ /** Mean soil temperature 10 cm below the surface. Unit: °C. */
3152
+ readonly soilTemp10Mean?: number | null;
3153
+ /** Mean soil temperature 20 cm below the surface. Unit: °C. */
3154
+ readonly soilTemp20Mean?: number | null;
3155
+ /** Mean soil temperature 80 cm below the surface. Unit: °C. */
3156
+ readonly soilTemp80Mean?: number | null;
3157
+ /** Mean soil temperature 120 cm below the surface. Unit: °C. */
3158
+ readonly soilTemp120Mean?: number | null;
3159
+ /** Mean soil humidity 10 cm below the surface. Unit: %. */
3160
+ readonly soilHumidity10Mean?: number | null;
3161
+ /** Mean soil humidity 20 cm below the surface. Unit: %. */
3162
+ readonly soilHumidity20Mean?: number | null;
3163
+ /** Mean soil humidity 30 cm below the surface. Unit: %. */
3164
+ readonly soilHumidity30Mean?: number | null;
3165
+ /** Mean soil humidity 60 cm below the surface. Unit: %. */
3166
+ readonly soilHumidity60Mean?: number | null;
3167
+ /** Mean soil humidity 80 cm below the surface. Unit: %. */
3168
+ readonly soilHumidity80Mean?: number | null;
3169
+ /** Mean soil humidity 120 cm below the surface. Unit: %. */
3170
+ readonly soilHumidity120Mean?: number | null;
3171
+ /** Mean soil water potential 10 cm below the surface. Unit: kPa. */
3172
+ readonly soilWaterPot10Mean?: number | null;
3173
+ /** Mean soil water potential 30 cm below the surface. Unit: kPa. */
3174
+ readonly soilWaterPot30Mean?: number | null;
3175
+ /** Mean soil water potential 60 cm below the surface. Unit: kPa. */
3176
+ readonly soilWaterPot60Mean?: number | null;
3177
+ /** Threshold analyses requested with the `threshold` option, keyed by parameter name. */
3178
+ readonly thresholds: Readonly<Record<string, Threshold>>;
3179
+ /** Raw quality flags of the aggregated data. */
3180
+ readonly qualityFlagsRaw?: string | null;
3181
+ }
3182
+ /** Response of `stations.observations(id, "10min")`. */
3183
+ interface StationObservations extends StationHeader {
3184
+ /** Observations in chronological order. */
3185
+ readonly data: StationObservation[];
3186
+ }
3187
+ /** Response of `stations.observations(id, "1h" | "1d")`. */
3188
+ interface StationObservationAggregates extends StationHeader {
3189
+ /** Aggregates in chronological order. */
3190
+ readonly data: StationObservationAggregate[];
3191
+ }
3192
+ /** Response type of `stations.observations()` for the given resolution. */
3193
+ type ObservationsFor<T extends ObservationTimeSteps> = T extends "10min" ? StationObservations : StationObservationAggregates;
3194
+ /** Options of `stations.search()`. */
3195
+ interface StationSearchOptions extends CallOptions {
3196
+ /**
3197
+ * Search radius around the location. Unit: km. The API answers HTTP 403
3198
+ * (`PermissionDeniedError`) above **25 km**; this limit is not in the spec.
3199
+ */
3200
+ readonly radius?: number;
3201
+ }
3202
+ /** Options of `stations.observations()`. */
3203
+ interface ObservationOptions extends CallOptions {
3204
+ /**
3205
+ * Count how many values exceed a threshold, per parameter. Results appear
3206
+ * in each entry's `thresholds`, keyed by parameter name.
3207
+ * @example { temp: 25, prec: 0.1 }
3208
+ */
3209
+ readonly threshold?: Readonly<Record<string, number>>;
3210
+ }
3211
+ /** Weather station endpoints. Access via `client.stations`. */
3212
+ declare class StationsResource {
3213
+ #private;
3214
+ /** @internal */
3215
+ constructor(http: HttpClient);
3216
+ /**
3217
+ * Stations near a location, closest first.
3218
+ * @example
3219
+ * const stations = await client.stations.search({ lat: 50.1, lon: 8.7 }, { radius: 20 });
3220
+ */
3221
+ search(location: Coordinates, options?: StationSearchOptions & NormalizedOption): Promise<StationInformation[]>;
3222
+ /** Nearby stations, exactly as the API sent them. */
3223
+ search(location: Coordinates, options: StationSearchOptions & RawOption): Promise<RawStationSearch>;
3224
+ /**
3225
+ * Latest measured value of every parameter of a station. Always metric,
3226
+ * wind speeds in **knots**.
3227
+ */
3228
+ latest(stationId: string, options?: CallOptions & NormalizedOption): Promise<StationLatest>;
3229
+ /** Latest station values, exactly as the API sent them. */
3230
+ latest(stationId: string, options: CallOptions & RawOption): Promise<RawStationLatest>;
3231
+ /**
3232
+ * Observation history of a station. Always metric, wind speeds in **knots**.
3233
+ *
3234
+ * - `"10min"`: raw observations of the last 6 hours
3235
+ * - `"1h"`: hourly aggregates of the last 24 hours
3236
+ * - `"1d"`: daily aggregates of the last 7 days
3237
+ *
3238
+ * Throws `PermissionDeniedError` (HTTP 403) if your plan does not cover the station.
3239
+ * @example
3240
+ * const { data } = await client.stations.observations("106350", "1h", { threshold: { temp: 0 } });
3241
+ */
3242
+ observations<T extends ObservationTimeSteps>(stationId: string, timeSteps: T, options?: ObservationOptions & NormalizedOption): Promise<ObservationsFor<T>>;
3243
+ /** Observation history, exactly as the API sent it. */
3244
+ observations(stationId: string, timeSteps: ObservationTimeSteps, options: ObservationOptions & RawOption): Promise<RawObservations>;
3245
+ }
3246
+ /** Sun and moon times for one day. Times are `null` if the event does not happen (polar day/night). */
3247
+ interface AstronomyDay {
3248
+ /** Local date. */
3249
+ readonly dateTime: DateString;
3250
+ readonly sunrise?: DateTimeString | null;
3251
+ readonly sunset?: DateTimeString | null;
3252
+ /** When the sun is at its highest point. */
3253
+ readonly transit?: DateTimeString | null;
3254
+ /** Start of civil twilight (sun 6° below the horizon). */
3255
+ readonly civilDawn?: DateTimeString | null;
3256
+ /** End of civil twilight. */
3257
+ readonly civilDusk?: DateTimeString | null;
3258
+ /** Start of nautical twilight (sun 12° below the horizon). */
3259
+ readonly nauticalDawn?: DateTimeString | null;
3260
+ /** End of nautical twilight. */
3261
+ readonly nauticalDusk?: DateTimeString | null;
3262
+ /** Start of astronomical twilight (sun 18° below the horizon). */
3263
+ readonly astronomicalDawn?: DateTimeString | null;
3264
+ /** End of astronomical twilight. */
3265
+ readonly astronomicalDusk?: DateTimeString | null;
3266
+ /** Illuminated part of the moon. Unit: % (0–100). */
3267
+ readonly moonIllumination: number;
3268
+ /** Moon phase: 0 = new moon, 1–49 waxing, 50 = full moon, 51–99 waning. */
3269
+ readonly moonPhase: number;
3270
+ readonly moonRise?: DateTimeString | null;
3271
+ readonly moonSet?: DateTimeString | null;
3272
+ }
3273
+ /** Response of `tools.astronomy()`. */
3274
+ interface Astronomy {
3275
+ readonly lat: number;
3276
+ readonly lon: number;
3277
+ /** IANA time zone of the location. */
3278
+ readonly timeZone: string;
3279
+ /** When the values were calculated. */
3280
+ readonly run: DateTimeString;
3281
+ readonly nextFullMoon: DateTimeString;
3282
+ readonly nextNewMoon: DateTimeString;
3283
+ /** 14 days, starting today. */
3284
+ readonly dailyData: AstronomyDay[];
3285
+ }
3286
+ /** Tool endpoints (astronomy, weather symbols). Access via `client.tools`. */
3287
+ declare class ToolsResource {
3288
+ #private;
3289
+ /** @internal */
3290
+ constructor(http: HttpClient);
3291
+ /** Sunrise, sunset, twilight and moon data for the next 14 days. */
3292
+ astronomy(location: Coordinates, options?: CallOptions & NormalizedOption): Promise<Astronomy>;
3293
+ /** Astronomy data, exactly as the API sent it. */
3294
+ astronomy(location: Coordinates, options: CallOptions & RawOption): Promise<RawAstronomy>;
3295
+ /**
3296
+ * Downloads the SVG markup of a weather symbol, e.g. `"partlycloudy_night"`.
3297
+ * The API key is sent if one is configured. The endpoint also works
3298
+ * without one (checked live, November 2026).
3299
+ */
3300
+ weatherSymbol(symbol: WeatherSymbol, options?: CallOptions): Promise<string>;
3301
+ /**
3302
+ * URL of a weather symbol SVG, e.g. for an `<img src>`. The URL contains no
3303
+ * credentials; the endpoint answered without an API key in a live test
3304
+ * (November 2026).
3305
+ */
3306
+ weatherSymbolUrl(symbol: WeatherSymbol): string;
3307
+ }
3308
+ /** Where a current-weather value comes from. */
3309
+ type CurrentValueSource = "OBSERVATION" | "ANALYSIS" | "FORECAST" | "MIXED";
3310
+ /** Data type of a current-weather value as reported by the API. */
3311
+ type CurrentValueType = "bool" | "int" | "float" | "string" | "array" | "object";
3312
+ /** One parameter of the current weather. */
3313
+ interface CurrentValue<T extends number | string | boolean = number | string | boolean> {
3314
+ /** When this value was observed, analysed or forecast. */
3315
+ readonly dateTime: DateTimeString;
3316
+ /** Parameter name, e.g. `"temp"`. */
3317
+ readonly name: string;
3318
+ /** The value. Its unit is the unit of the forecast parameter with the same name. */
3319
+ readonly value: T | null;
3320
+ readonly type?: CurrentValueType | null;
3321
+ /**
3322
+ * Source of the value:
3323
+ * - `OBSERVATION`: a nearby weather station (high precision)
3324
+ * - `ANALYSIS`: gridded analysis, Germany/Austria/Switzerland and surroundings (medium)
3325
+ * - `FORECAST`: forecast model, worldwide (low to medium)
3326
+ */
3327
+ readonly source?: CurrentValueSource | null;
3328
+ /** The station that measured the value, for `OBSERVATION` values. */
3329
+ readonly station?: StationInformation;
3330
+ }
3331
+ /**
3332
+ * Current weather values keyed by parameter name. Which parameters are
3333
+ * present depends on the sources available at the location. Units are those
3334
+ * of the forecast parameters with the same name (see `StandardForecastEntry`).
3335
+ */
3336
+ interface CurrentWeatherData {
3337
+ /** Air temperature 2 m above ground. Unit: °C · °F. */
3338
+ readonly temp?: CurrentValue<number>;
3339
+ /** Dew point. Unit: °C · °F. */
3340
+ readonly dewpoint?: CurrentValue<number>;
3341
+ /** Air pressure at mean sea level. Unit: hPa. */
3342
+ readonly pressureMsl?: CurrentValue<number>;
3343
+ /** Relative humidity. Unit: %. */
3344
+ readonly humidityRelative?: CurrentValue<number>;
3345
+ /** Average wind speed. Unit: **m/s** (metric) · mph (imperial). */
3346
+ readonly windSpeed?: CurrentValue<number>;
3347
+ /** Direction the wind blows from, in degrees. */
3348
+ readonly windDirection?: CurrentValue<number>;
3349
+ /** Wind gust speed. Unit: **m/s** (metric) · mph (imperial). */
3350
+ readonly windGust?: CurrentValue<number>;
3351
+ /** Effective cloud coverage. Unit: %. */
3352
+ readonly cloudCoverage?: CurrentValue<number>;
3353
+ /** Sunshine duration. Unit: h. */
3354
+ readonly sunHours?: CurrentValue<number>;
3355
+ /** Precipitation. Unit: mm · inch. */
3356
+ readonly precCurrent?: CurrentValue<number>;
3357
+ /** Snow amount as water equivalent (not snow depth). Unit: mm WE · inch WE. */
3358
+ readonly snowAmount?: CurrentValue<number>;
3359
+ /** Snow depth. Unit: m · inch. */
3360
+ readonly snowHeight?: CurrentValue<number>;
3361
+ /** Whether it is daytime. */
3362
+ readonly isDay?: CurrentValue<boolean>;
3363
+ /** WMO present weather code (table 4677). */
3364
+ readonly wmoCode?: CurrentValue<number>;
3365
+ readonly weatherSymbol?: CurrentValue<WeatherSymbol>;
3366
+ readonly [name: string]: CurrentValue | undefined;
3367
+ }
3368
+ /** Response of `client.current()`. */
3369
+ interface CurrentWeather<U extends UnitSystem = UnitSystem> {
3370
+ /** Latitude used. */
3371
+ readonly lat: number;
3372
+ /** Longitude used. */
3373
+ readonly lon: number;
3374
+ /** Altitude of the location. Unit: m (metric) · ft (imperial). */
3375
+ readonly alt?: number | null;
3376
+ /** System of units of all values in this response. */
3377
+ readonly systemOfUnits: U;
3378
+ readonly data: CurrentWeatherData;
3379
+ }
3380
+ /**
3381
+ * Experimental modules, accessed via `client.experimental`. They use
3382
+ * undocumented endpoints, are not covered by semver and may be removed.
3383
+ * @experimental
3384
+ */
3385
+ interface ExperimentalApi {
3386
+ /**
3387
+ * Climate time series of long-term stations (warming stripes, heatmaps,
3388
+ * daily curves). In a live test (November 2026) a regular customer key was
3389
+ * rejected with HTTP 403.
3390
+ * @experimental
3391
+ */
3392
+ readonly climate: ClimateResource;
3393
+ }
3394
+ /** Options of `new Kachelmann()`. */
3395
+ interface KachelmannOptions<U extends UnitSystem = "metric"> {
3396
+ /**
3397
+ * Your API key. Defaults to the `KACHELMANN_API_KEY` environment variable
3398
+ * (where `process.env` exists). Only needed for requests that require it;
3399
+ * the photo endpoints work without a key.
3400
+ */
3401
+ readonly apiKey?: string | undefined;
3402
+ /**
3403
+ * **Enterprise only.** Basic or Bearer authentication instead of an API key.
3404
+ * The API documents both as "currently for internal and enterprise use
3405
+ * only": use them only if Meteologix told you to. When set, `apiKey` must be
3406
+ * omitted and `KACHELMANN_API_KEY` is ignored. Not verified against the live
3407
+ * API by this SDK's tests.
3408
+ * @example
3409
+ * new Kachelmann({ auth: { type: "bearer", token: "<token from Meteologix>" } });
3410
+ */
3411
+ readonly auth?: EnterpriseAuth | undefined;
3412
+ /** Default system of units for forecasts and current weather. Default: `"metric"`. */
3413
+ readonly units?: U;
3414
+ /** API base URL. Default: `https://api.kachelmannwetter.com/v02`. */
3415
+ readonly baseUrl?: string;
3416
+ /** Per-attempt timeout in ms. Default: `10000`. */
3417
+ readonly timeout?: number;
3418
+ /**
3419
+ * Retries for connection errors, timeouts, HTTP 429 and 5xx: a number of
3420
+ * retries or detailed options. Default: `0` (disabled), because plans have
3421
+ * a daily request limit.
3422
+ */
3423
+ readonly retry?: number | RetryOptions;
3424
+ /** Custom `fetch` implementation, e.g. for testing or proxies. Default: global `fetch`. */
3425
+ readonly fetch?: typeof fetch;
3426
+ /** Extra headers sent with every request. Credentials cannot be set here. */
3427
+ readonly headers?: Readonly<Record<string, string>>;
3428
+ }
3429
+ /**
3430
+ * Client for the Kachelmannwetter API v02.
3431
+ *
3432
+ * @typeParam U - Default system of units, inferred from `options.units`.
3433
+ * @example
3434
+ * import { Kachelmann } from "kmw-sdk";
3435
+ *
3436
+ * const client = new Kachelmann({ apiKey: process.env.KACHELMANN_API_KEY });
3437
+ * const forecast = await client.forecast.threeDay({ lat: 50.1, lon: 8.7 });
3438
+ */
3439
+ export declare class Kachelmann<U extends UnitSystem = "metric"> {
3440
+ #private;
3441
+ /** Forecasts: standard/advanced time series, 3-day summary and 14-day trend. */
3442
+ readonly forecast: ForecastResource<U>;
3443
+ /** Weather stations: search, latest values and observation history. */
3444
+ readonly stations: StationsResource;
3445
+ /** Astronomy data and weather symbols. */
3446
+ readonly tools: ToolsResource;
3447
+ /**
3448
+ * Endpoints that are known not to work with regular API keys yet. Not
3449
+ * covered by semver. See {@link ExperimentalApi}.
3450
+ * @experimental
3451
+ */
3452
+ readonly experimental: ExperimentalApi;
3453
+ /**
3454
+ * **Experimental**, undocumented: community weather photos (read-only, no key needed).
3455
+ * @experimental
3456
+ */
3457
+ readonly photos: PhotosResource;
3458
+ constructor(options?: KachelmannOptions<U>);
3459
+ /**
3460
+ * Rate-limit headers of the most recent response (`x-ratelimit-*`), if the
3461
+ * API sent any.
3462
+ */
3463
+ get rateLimit(): RateLimitInfo | undefined;
3464
+ /**
3465
+ * Best available current weather at a location, combining station
3466
+ * observations, analysis and forecasts.
3467
+ * @example
3468
+ * const { data } = await client.current({ lat: 50.1, lon: 8.7 });
3469
+ * console.log(data.temp?.value, data.temp?.source);
3470
+ */
3471
+ current<V extends UnitSystem = U>(location: Coordinates, options?: UnitOptions<V> & NormalizedOption): Promise<CurrentWeather<V>>;
3472
+ /** Current weather, exactly as the API sent it. */
3473
+ current<V extends UnitSystem = U>(location: Coordinates, options: UnitOptions<V> & RawOption): Promise<RawCurrentWeather>;
3474
+ }
3475
+ /**
3476
+ * Base class of every error thrown by this SDK.
3477
+ *
3478
+ * Aborts triggered by your own `AbortSignal` are not wrapped: the signal's
3479
+ * reason is re-thrown unchanged, exactly like `fetch` does.
3480
+ */
3481
+ export declare class KachelmannError extends Error {
3482
+ override name: string;
3483
+ }
3484
+ /** Problem details as returned by the API in error responses. */
3485
+ interface ApiProblem {
3486
+ readonly type?: string;
3487
+ readonly title?: string;
3488
+ readonly status?: number;
3489
+ readonly detail?: string;
3490
+ }
3491
+ interface ApiErrorInit {
3492
+ readonly status: number;
3493
+ readonly method: string;
3494
+ /** Request URL. The API key is sent as a header and never appears here. */
3495
+ readonly url: string;
3496
+ readonly body: unknown;
3497
+ readonly rateLimit?: RateLimitInfo | undefined;
3498
+ }
3499
+ /** The API answered with a non-2xx status code. */
3500
+ export declare class ApiError extends KachelmannError {
3501
+ override name: string;
3502
+ /** HTTP status code. */
3503
+ readonly status: number;
3504
+ readonly method: string;
3505
+ /** Request URL (without credentials). */
3506
+ readonly url: string;
3507
+ /** Parsed problem details, if the response body contained any. */
3508
+ readonly problem: ApiProblem | undefined;
3509
+ /** Raw response body (parsed JSON, or text). */
3510
+ readonly body: unknown;
3511
+ /** Rate-limit headers of the failed response, if present. */
3512
+ readonly rateLimit: RateLimitInfo | undefined;
3513
+ /**
3514
+ * @param init - Status, request and response body.
3515
+ * @param hint - Extra explanation appended to the message.
3516
+ */
3517
+ constructor(init: ApiErrorInit, hint?: string);
3518
+ }
3519
+ /** HTTP 400: a parameter is invalid or out of bounds. */
3520
+ export declare class BadRequestError extends ApiError {
3521
+ override name: string;
3522
+ }
3523
+ /** HTTP 401: the API key is missing or wrong. */
3524
+ export declare class AuthenticationError extends ApiError {
3525
+ override name: string;
3526
+ }
3527
+ /**
3528
+ * HTTP 403: your subscription does not cover this resource. Typical causes:
3529
+ * a location or station outside the API locations set in the account portal
3530
+ * (Hobby plans allow two), an endpoint your plan lacks, or a station search
3531
+ * radius above 25 km. `problem` contains the API's explanation; `message`
3532
+ * contains it too, followed by a hint about these causes.
3533
+ */
3534
+ export declare class PermissionDeniedError extends ApiError {
3535
+ override name: string;
3536
+ constructor(init: ApiErrorInit);
3537
+ }
3538
+ /** HTTP 404: the resource does not exist (e.g. an unknown weather symbol). */
3539
+ export declare class NotFoundError extends ApiError {
3540
+ override name: string;
3541
+ }
3542
+ /** HTTP 429: the per-minute or per-day request limit was exceeded. */
3543
+ export declare class RateLimitError extends ApiError {
3544
+ override name: string;
3545
+ /** When requests are allowed again (from `x-ratelimit-retry-after`), if known. */
3546
+ get retryAfter(): Date | undefined;
3547
+ }
3548
+ /** HTTP 5xx: the API had an internal problem. */
3549
+ export declare class ServerError extends ApiError {
3550
+ override name: string;
3551
+ }
3552
+ /** The request did not complete within the configured timeout. */
3553
+ export declare class RequestTimeoutError extends KachelmannError {
3554
+ override name: string;
3555
+ readonly timeout: number;
3556
+ constructor(timeout: number, options?: ErrorOptions);
3557
+ }
3558
+ /** The request failed before a response arrived (DNS, TCP, TLS, ...). See `cause`. */
3559
+ export declare class ConnectionError extends KachelmannError {
3560
+ override name: string;
3561
+ }
3562
+ /**
3563
+ * A request needs an API key, but none was configured (neither `apiKey`,
3564
+ * `KACHELMANN_API_KEY` nor enterprise `auth`). Thrown before any network
3565
+ * traffic.
3566
+ */
3567
+ export declare class MissingApiKeyError extends KachelmannError {
3568
+ override name: string;
3569
+ constructor(options?: ErrorOptions);
3570
+ }
3571
+ /** The API answered with 2xx, but the body could not be parsed or has an unexpected shape. */
3572
+ export declare class InvalidResponseError extends KachelmannError {
3573
+ override name: string;
3574
+ }
3575
+ /** Knots → km/h. */
3576
+ export declare const knotsToKmh: (kn: number, digits?: number) => number;
3577
+ /** Knots → m/s. */
3578
+ export declare const knotsToMps: (kn: number, digits?: number) => number;
3579
+ /** Knots → mph. */
3580
+ export declare const knotsToMph: (kn: number, digits?: number) => number;
3581
+ /** m/s → km/h. */
3582
+ export declare const mpsToKmh: (mps: number, digits?: number) => number;
3583
+ /** m/s → knots. */
3584
+ export declare const mpsToKnots: (mps: number, digits?: number) => number;
3585
+ /** mph → km/h. */
3586
+ export declare const mphToKmh: (mph: number, digits?: number) => number;
3587
+ /** km/h → m/s. */
3588
+ export declare const kmhToMps: (kmh: number, digits?: number) => number;
3589
+ /** °C → °F. */
3590
+ export declare const celsiusToFahrenheit: (c: number, digits?: number) => number;
3591
+ /** °F → °C. */
3592
+ export declare const fahrenheitToCelsius: (f: number, digits?: number) => number;
3593
+ /** Millimetres → inches. */
3594
+ export declare const mmToInch: (mm: number, digits?: number) => number;
3595
+ /** Inches → millimetres. */
3596
+ export declare const inchToMm: (inch: number, digits?: number) => number;
3597
+ /**
3598
+ * Rough group of a WMO present weather code (code table 4677, `0`–`99`):
3599
+ *
3600
+ * | Category | Codes |
3601
+ * | --------------- | ----------------------------------------- |
3602
+ * | `none` | 0–3 (no significant weather) |
3603
+ * | `haze` | 4–9 (haze, smoke, dust) |
3604
+ * | `mist` | 10–12 (mist, shallow fog) |
3605
+ * | `nearby` | 13–19 (lightning, squalls, precipitation in sight) |
3606
+ * | `recent` | 20–29 (weather in the past hour, not now) |
3607
+ * | `duststorm` | 30–35 |
3608
+ * | `blowingSnow` | 36–39 |
3609
+ * | `fog` | 40–49 |
3610
+ * | `drizzle` | 50–59 |
3611
+ * | `rain` | 60–69 |
3612
+ * | `snow` | 70–79 (solid precipitation, not showers) |
3613
+ * | `showers` | 80–90 |
3614
+ * | `thunderstorm` | 91–99 |
3615
+ */
3616
+ export type WmoCategory = "none" | "haze" | "mist" | "nearby" | "recent" | "duststorm" | "blowingSnow" | "fog" | "drizzle" | "rain" | "snow" | "showers" | "thunderstorm";
3617
+ /** Groups a WMO 4677 present weather code. Returns `undefined` for values outside 0–99. */
3618
+ export declare function classifyWmoCode(code: number): WmoCategory | undefined;
3619
+ export type { AdvancedForecast, AdvancedForecastEntry, ApiErrorInit, ApiProblem, Astronomy, AstronomyDay, BasicAuth, BearerAuth, CallOptions, ClimateAvailability, ClimateCapability, ClimateCity, ClimateDailySeries, ClimateFilter, ClimateHeatmap, ClimateHeatmapOptions, ClimateMapStation, ClimateParameter, ClimatePeriod, ClimateRecord, ClimateRequestEcho, ClimateResource, ClimateSearchResult, ClimateSeason, ClimateSpaghetti, ClimateSpaghettiOptions, ClimateStation, ClimateStationList, ClimateStripes, ClimateStripesOptions, ClimateValueType, ClimateYearSpan, Coordinates, CurrentValue, CurrentValueSource, CurrentValueType, CurrentWeather, CurrentWeatherData, DailyForecast, DateString, DateTimeString, DayName, EnterpriseAuth, ExperimentalApi, ForecastMeta, ForecastModel, ForecastResource, ForecastTimeSteps, KachelmannOptions, LatLng, LatLon, LatestObservationValue, ModelResolution, NormalizedOption, ObservationOptions, ObservationTimeSteps, ObservationsFor, PhotoListOptions, PhotoWindUnit, PhotosResource, RateLimitInfo, RawAdvancedForecast, RawAstronomy, RawCurrentWeather, RawObservations, RawOption, RawStandardForecast, RawStationLatest, RawStationSearch, RawThreeDayForecast, RawTrend14Days, RequestOptions, RetryOptions, StandardForecast, StandardForecastEntry, StationHeader, StationInformation, StationLatest, StationObservation, StationObservationAggregate, StationObservationAggregates, StationObservations, StationSearchOptions, StationsResource, ThreeDayForecast, ThreeDayOptions, Threshold, TimeOfDay, TimeOfDayForecast, ToolsResource, Trend14Days, TrendDay, UndocumentedPrecipitationProbabilities, UnitOptions, UnitSystem, WeatherPhoto, WeatherRisk, WeatherSymbol, WeatherSymbolBase };