@maschinenlesbar.org/pegel-online-cli
    Preparing search index...

    Type Alias LevelTrend

    LevelTrend:
        | {
            delta: number;
            direction: | "rising"
            | "falling"
            | "steady"
            | "peaked"
            | "bottomed"
            | "oscillating";
            first: Point;
            last: Point & {
                ageMinutes: number
                | undefined;
                aheadMinutes?: number;
                stale: boolean;
            };
            max: Point;
            min: Point;
            notes: string[];
            range: number;
            ratePerDay: number
            | null;
            sample?: Point[];
            searched: {
                end?: string;
                start: string;
                station: string;
                timeseries: string;
            };
            series: {
                comment?: string;
                longname?: string;
                shortname: string;
                unit?: string;
            };
            since?: {
                delta: number;
                direction: "rising"
                | "falling";
                from: Point;
                ratePerDay: number | null;
            };
            station: StationSummary;
            status: "ok";
            swings?: Swings;
            unreliable: boolean;
            verdict: string;
            window: { from: string; missing: number; points: number; to: string };
        }
        | {
            candidates: StationSummary[];
            searched: {
                end?: string;
                start: string;
                station: string;
                timeseries: string;
            };
            status: "ambiguous";
            total: number;
        }
        | {
            reason: string;
            searched: {
                end?: string;
                start: string;
                station: string;
                timeseries: string;
            };
            station?: StationSummary;
            status: "empty";
        }

    The answer of getLevelTrend.

    Type Declaration

    • {
          delta: number;
          direction:
              | "rising"
              | "falling"
              | "steady"
              | "peaked"
              | "bottomed"
              | "oscillating";
          first: Point;
          last: Point & {
              ageMinutes: number
              | undefined;
              aheadMinutes?: number;
              stale: boolean;
          };
          max: Point;
          min: Point;
          notes: string[];
          range: number;
          ratePerDay: number
          | null;
          sample?: Point[];
          searched: {
              end?: string;
              start: string;
              station: string;
              timeseries: string;
          };
          series: {
              comment?: string;
              longname?: string;
              shortname: string;
              unit?: string;
          };
          since?: {
              delta: number;
              direction: "rising"
              | "falling";
              from: Point;
              ratePerDay: number | null;
          };
          station: StationSummary;
          status: "ok";
          swings?: Swings;
          unreliable: boolean;
          verdict: string;
          window: { from: string; missing: number; points: number; to: string };
      }
      • delta: number

        last − first, in the unit.

      • direction: "rising" | "falling" | "steady" | "peaked" | "bottomed" | "oscillating"

        last against first: rising, falling or steady; peaked when the level rose to its maximum and has fallen clearly since, bottomed when it fell to its minimum and has risen clearly since (since says by how much): first against last alone said "rising" after a crest; oscillating when it swings up and down again and again (a tide gauge, a regulated water): first against last is then wherever the tide was (swings has the highs and lows).

      • first: Point
      • last: Point & {
            ageMinutes: number | undefined;
            aheadMinutes?: number;
            stale: boolean;
        }
      • max: Point
      • min: Point
      • notes: string[]
      • range: number
      • ratePerDay: number | null

        delta per day over the span of the points; null for a single point.

      • Optionalsample?: Point[]

        Evenly spaced points for a chart, when asked for.

      • searched: { end?: string; start: string; station: string; timeseries: string }
      • series: { comment?: string; longname?: string; shortname: string; unit?: string }
      • Optionalsince?: {
            delta: number;
            direction: "rising" | "falling";
            from: Point;
            ratePerDay: number | null;
        }

        After a turn (direction peaked or bottomed): the move since the peak or low.

      • station: StationSummary
      • status: "ok"
      • Optionalswings?: Swings

        When the level oscillates: how often it turned, and its first and last high and low waters.

      • unreliable: boolean

        True while the series carries an operator's comment: the values may be wrong.

      • verdict: string
      • window: { from: string; missing: number; points: number; to: string }

        The window the API sent (it keeps about 31 days and clamps a longer one).

    • {
          candidates: StationSummary[];
          searched: {
              end?: string;
              start: string;
              station: string;
              timeseries: string;
          };
          status: "ambiguous";
          total: number;
      }
    • {
          reason: string;
          searched: {
              end?: string;
              start: string;
              station: string;
              timeseries: string;
          };
          station?: StationSummary;
          status: "empty";
      }