@maschinenlesbar.org/pegel-online-cli 0.0.7 → 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.
- package/README.md +26 -14
- package/dist/src/cli/commands/stations.d.ts.map +1 -1
- package/dist/src/cli/commands/stations.js +6 -5
- package/dist/src/cli/commands/stations.js.map +1 -1
- package/dist/src/cli/commands/timeseries.d.ts.map +1 -1
- package/dist/src/cli/commands/timeseries.js +10 -11
- package/dist/src/cli/commands/timeseries.js.map +1 -1
- package/dist/src/cli/index.js +2 -0
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/io.d.ts +17 -0
- package/dist/src/cli/io.d.ts.map +1 -1
- package/dist/src/cli/io.js +22 -0
- package/dist/src/cli/io.js.map +1 -1
- package/dist/src/cli/program.d.ts.map +1 -1
- package/dist/src/cli/program.js +4 -3
- package/dist/src/cli/program.js.map +1 -1
- package/dist/src/cli/shared.d.ts +19 -6
- package/dist/src/cli/shared.d.ts.map +1 -1
- package/dist/src/cli/shared.js +66 -15
- package/dist/src/cli/shared.js.map +1 -1
- package/dist/src/client/client.d.ts.map +1 -1
- package/dist/src/client/client.js +51 -15
- package/dist/src/client/client.js.map +1 -1
- package/dist/src/client/engine.d.ts +51 -5
- package/dist/src/client/engine.d.ts.map +1 -1
- package/dist/src/client/engine.js +157 -39
- package/dist/src/client/engine.js.map +1 -1
- package/dist/src/client/errors.d.ts +15 -0
- package/dist/src/client/errors.d.ts.map +1 -1
- package/dist/src/client/errors.js +42 -3
- package/dist/src/client/errors.js.map +1 -1
- package/dist/src/client/http.js +3 -3
- package/dist/src/client/http.js.map +1 -1
- package/dist/src/client/index.d.ts +2 -2
- package/dist/src/client/index.d.ts.map +1 -1
- package/dist/src/client/index.js +2 -2
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/types.d.ts +29 -2
- package/dist/src/client/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvG,cAAc,YAAY,CAAC"}
|
|
@@ -19,6 +19,8 @@ export interface Station {
|
|
|
19
19
|
agency?: string;
|
|
20
20
|
longitude?: number;
|
|
21
21
|
latitude?: number;
|
|
22
|
+
/** Phone number of the station's voice announcement service, e.g. "+49228 286527 566". */
|
|
23
|
+
voiceServiceNumber?: string;
|
|
22
24
|
water?: Water;
|
|
23
25
|
timeseries?: TimeseriesInfo[];
|
|
24
26
|
}
|
|
@@ -31,14 +33,27 @@ export interface CurrentMeasurement {
|
|
|
31
33
|
/** Classification vs. the lowest/highest navigable water marks. */
|
|
32
34
|
stateNswHsw?: string;
|
|
33
35
|
}
|
|
36
|
+
/** The datum a water-level series is measured from (Pegelnullpunkt). */
|
|
37
|
+
export interface GaugeZero {
|
|
38
|
+
/** Height system, e.g. "m. ü. NHN". */
|
|
39
|
+
unit: string;
|
|
40
|
+
value: number;
|
|
41
|
+
/** Date the datum applies from, e.g. "2019-11-01". */
|
|
42
|
+
validFrom?: string;
|
|
43
|
+
}
|
|
34
44
|
/** Metadata for one timeseries of a station (e.g. "W" water level, "Q" flow). */
|
|
35
45
|
export interface TimeseriesInfo {
|
|
36
46
|
shortname: string;
|
|
37
47
|
longname: string;
|
|
38
48
|
unit: string;
|
|
39
49
|
equidistance?: number;
|
|
50
|
+
/** Gauge zero of a water-level series (absent on e.g. flow series). */
|
|
51
|
+
gaugeZero?: GaugeZero;
|
|
40
52
|
currentMeasurement?: CurrentMeasurement;
|
|
41
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Characteristic values (gauge marks), present only when requested; an empty
|
|
55
|
+
* array for a series without marks.
|
|
56
|
+
*/
|
|
42
57
|
characteristicValues?: JsonObject[] | null;
|
|
43
58
|
}
|
|
44
59
|
/** One point of a measurements series. */
|
|
@@ -53,11 +68,23 @@ export interface StationListParams {
|
|
|
53
68
|
/** Water shortname filter. */
|
|
54
69
|
waters?: string;
|
|
55
70
|
fuzzyId?: string;
|
|
71
|
+
/** Embed each station's timeseries list. */
|
|
56
72
|
includeTimeseries?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Embed the current measurement inside each timeseries. Implies
|
|
75
|
+
* `includeTimeseries: true` unless that is set explicitly: the API drops the
|
|
76
|
+
* measurement without the timeseries list.
|
|
77
|
+
*/
|
|
57
78
|
includeCurrentMeasurement?: boolean;
|
|
79
|
+
/** Embed the gauge marks inside each timeseries. Implies `includeTimeseries` like the above. */
|
|
58
80
|
includeCharacteristicValues?: boolean;
|
|
59
81
|
}
|
|
60
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Optional includes for a single-station or single-timeseries request. On a
|
|
84
|
+
* station request, `includeCurrentMeasurement` / `includeCharacteristicValues`
|
|
85
|
+
* imply `includeTimeseries: true` unless that is set explicitly (the API nests
|
|
86
|
+
* both inside the timeseries list and drops them without it).
|
|
87
|
+
*/
|
|
61
88
|
export interface IncludeParams {
|
|
62
89
|
includeTimeseries?: boolean;
|
|
63
90
|
includeCurrentMeasurement?: boolean;
|
|
@@ -1 +1 @@
|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