@signalk/tracks-plugin 3.0.0-beta.6 → 3.0.0-beta.7
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 +7 -0
- package/dist/index.js +59 -9
- package/dist/index.js.map +1 -1
- package/dist/timeWindow.d.ts +1 -1
- package/dist/utils.d.ts +19 -0
- package/package.json +1 -1
package/dist/timeWindow.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface TrackQuery {
|
|
|
24
24
|
* `timespan`/`timespanOffset` pair. Absent all of them, no window is applied
|
|
25
25
|
* and the whole retained track is returned, as before.
|
|
26
26
|
*/
|
|
27
|
-
export declare function parseTrackQuery(query: Record<string, unknown>, now?: number): TrackQuery;
|
|
27
|
+
export declare function parseTrackQuery(query: Record<string, unknown>, now?: number, alsoAllowed?: readonly string[]): TrackQuery;
|
|
28
28
|
/**
|
|
29
29
|
* Drop points closer together than `resolution` milliseconds, always keeping
|
|
30
30
|
* the first and last so the track keeps its extent.
|
package/dist/utils.d.ts
CHANGED
|
@@ -25,6 +25,25 @@ export declare function createInBounds(bounds: GeoBounds): (position: LatLngTupl
|
|
|
25
25
|
* iterate the result.
|
|
26
26
|
*/
|
|
27
27
|
export declare function splitAtAntimeridian(bounds: GeoBounds): GeoBounds[];
|
|
28
|
+
/**
|
|
29
|
+
* A query parameter was present but malformed.
|
|
30
|
+
*
|
|
31
|
+
* Distinct from absent: a filter nobody asked for is not an error, but one
|
|
32
|
+
* that cannot be honoured must not quietly widen the query. Carries its own
|
|
33
|
+
* message so the handler can hand it to the client, the way `TimeWindowError`
|
|
34
|
+
* already does for the time window.
|
|
35
|
+
*/
|
|
36
|
+
export declare class QueryParameterError extends Error {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A well-formed query the server cannot currently answer.
|
|
40
|
+
*
|
|
41
|
+
* `radius` measures from the own vessel, so it needs a self position. Not
|
|
42
|
+
* having one is an outage, not a client mistake -- the same distinction the
|
|
43
|
+
* single-vessel route already draws for a history provider it cannot read.
|
|
44
|
+
*/
|
|
45
|
+
export declare class SelfPositionUnavailableError extends Error {
|
|
46
|
+
}
|
|
28
47
|
export declare function validateParameters(params: QueryParameters, defaultMaxRadius: number | undefined): TrackParams;
|
|
29
48
|
export declare function createDistanceTo([lat1d, lon1d]: LatLngTuple, debug?: Debug): (d: LatLngTuple | null) => number;
|
|
30
49
|
export declare function resolveContext(vesselId: string, selfContext?: string): string;
|