mobility-toolbox-js 3.0.0-beta.9 → 3.0.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 +11 -3
- package/api/HttpAPI.d.ts +5 -16
- package/api/HttpAPI.js +1 -14
- package/api/RealtimeAPI.d.ts +188 -143
- package/api/RealtimeAPI.js +265 -206
- package/api/RoutingAPI.d.ts +21 -11
- package/api/RoutingAPI.js +17 -7
- package/api/StopsAPI.d.ts +20 -14
- package/api/StopsAPI.js +17 -11
- package/api/WebSocketAPI.d.ts +60 -66
- package/api/WebSocketAPI.js +164 -165
- package/api/index.js +1 -1
- package/api/typedefs.d.ts +0 -102
- package/api/typedefs.js +27 -42
- package/common/controls/StopFinderControlCommon.d.ts +13 -13
- package/common/controls/StopFinderControlCommon.js +32 -32
- package/common/index.d.ts +1 -1
- package/common/index.js +1 -1
- package/common/styles/realtimeDefaultStyle.js +6 -11
- package/common/styles/realtimeHeadingStyle.js +5 -10
- package/common/styles/realtimeSimpleStyle.d.ts +0 -1
- package/common/styles/realtimeSimpleStyle.js +0 -1
- package/common/typedefs.d.ts +11 -121
- package/common/typedefs.js +6 -31
- package/common/utils/RealtimeEngine.d.ts +214 -0
- package/common/utils/RealtimeEngine.js +554 -0
- package/common/utils/compareDepartures.d.ts +2 -2
- package/common/utils/compareDepartures.js +2 -2
- package/common/utils/debounceWebsocketMessages.d.ts +1 -1
- package/common/utils/getLayersAsFlatArray.d.ts +0 -1
- package/common/utils/getLayersAsFlatArray.js +0 -1
- package/common/utils/getMapGlCopyrights.d.ts +1 -1
- package/common/utils/getMapGlCopyrights.js +3 -3
- package/common/utils/getRealtimeModeSuffix.d.ts +1 -0
- package/common/utils/getRealtimeModeSuffix.js +1 -0
- package/common/utils/getVehiclePosition.d.ts +5 -4
- package/common/utils/getVehiclePosition.js +6 -3
- package/common/utils/realtimeConfig.d.ts +1 -1
- package/common/utils/realtimeConfig.js +0 -1
- package/common/utils/renderTrajectories.d.ts +2 -1
- package/common/utils/renderTrajectories.js +7 -6
- package/common/utils/sortAndFilterDepartures.d.ts +2 -1
- package/common/utils/sortAndFilterDepartures.js +2 -1
- package/common/utils/sortByDelay.d.ts +2 -2
- package/common/utils/sortByDelay.js +5 -1
- package/maplibre/controls/CopyrightControl.d.ts +9 -6
- package/maplibre/controls/CopyrightControl.js +11 -8
- package/maplibre/layers/Layer.d.ts +8 -7
- package/maplibre/layers/Layer.js +2 -3
- package/maplibre/layers/RealtimeLayer.d.ts +82 -118
- package/maplibre/layers/RealtimeLayer.js +154 -118
- package/maplibre/utils/getSourceCoordinates.d.ts +1 -0
- package/maplibre/utils/getSourceCoordinates.js +6 -5
- package/mbt.js +14611 -14591
- package/mbt.js.map +4 -4
- package/mbt.min.js +75 -75
- package/mbt.min.js.map +4 -4
- package/ol/controls/CopyrightControl.d.ts +13 -5
- package/ol/controls/CopyrightControl.js +13 -5
- package/ol/controls/RoutingControl.d.ts +105 -101
- package/ol/controls/RoutingControl.js +250 -264
- package/ol/controls/StopFinderControl.d.ts +24 -5
- package/ol/controls/StopFinderControl.js +24 -5
- package/ol/layers/Layer.d.ts +26 -0
- package/ol/layers/Layer.js +39 -0
- package/ol/layers/MaplibreLayer.d.ts +56 -28
- package/ol/layers/MaplibreLayer.js +154 -31
- package/ol/layers/MaplibreStyleLayer.d.ts +71 -149
- package/ol/layers/MaplibreStyleLayer.js +281 -210
- package/ol/layers/RealtimeLayer.d.ts +95 -230
- package/ol/layers/RealtimeLayer.js +209 -211
- package/ol/layers/VectorLayer.d.ts +17 -0
- package/ol/layers/VectorLayer.js +33 -0
- package/ol/layers/index.d.ts +2 -0
- package/ol/layers/index.js +3 -0
- package/ol/renderers/MaplibreLayerRenderer.d.ts +0 -20
- package/ol/renderers/MaplibreLayerRenderer.js +142 -114
- package/ol/renderers/MaplibreStyleLayerRenderer.d.ts +6 -6
- package/ol/renderers/MaplibreStyleLayerRenderer.js +20 -23
- package/ol/renderers/RealtimeLayerRenderer.d.ts +7 -7
- package/ol/renderers/RealtimeLayerRenderer.js +46 -66
- package/ol/styles/fullTrajectoryDelayStyle.js +5 -7
- package/ol/styles/fullTrajectoryStyle.d.ts +1 -2
- package/ol/styles/fullTrajectoryStyle.js +5 -7
- package/ol/styles/routingStyle.d.ts +0 -1
- package/ol/styles/routingStyle.js +13 -10
- package/ol/utils/defineDeprecatedProperties.d.ts +10 -0
- package/ol/utils/defineDeprecatedProperties.js +180 -0
- package/ol/utils/getFeatureInfoAtCoordinate.d.ts +1 -1
- package/ol/utils/getFeatureInfoAtCoordinate.js +11 -17
- package/package.json +44 -44
- package/setupTests.js +17 -4
- package/types/common.d.ts +53 -69
- package/types/index.d.ts +1 -1
- package/types/realtime.d.ts +98 -95
- package/types/routing.d.ts +60 -60
- package/types/stops.d.ts +62 -62
- package/common/mixins/RealtimeLayerMixin.d.ts +0 -273
- package/common/mixins/RealtimeLayerMixin.js +0 -743
- package/ol/layers/MapGlLayer.d.ts +0 -144
- package/ol/layers/MapGlLayer.js +0 -144
- package/ol/mixins/MobilityLayerMixin.d.ts +0 -98
- package/ol/mixins/MobilityLayerMixin.js +0 -6
- package/ol/mixins/PropertiesLayerMixin.d.ts +0 -127
- package/ol/mixins/PropertiesLayerMixin.js +0 -143
package/types/common.d.ts
CHANGED
|
@@ -2,55 +2,56 @@ import { Feature } from 'ol';
|
|
|
2
2
|
import { Coordinate } from 'ol/coordinate';
|
|
3
3
|
import { ObjectEvent } from 'ol/Object';
|
|
4
4
|
import { Pixel } from 'ol/pixel';
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
import { RealtimeTrajectory } from '../api/typedefs';
|
|
7
|
+
|
|
6
8
|
import type {
|
|
7
9
|
CopyrightControl as MbCopyrightControl,
|
|
8
|
-
RealtimeLayer as MbRealtimeLayer,
|
|
9
10
|
layer as MbLayer,
|
|
11
|
+
RealtimeLayer as MbRealtimeLayer,
|
|
10
12
|
} from '../maplibre';
|
|
11
13
|
import type {
|
|
12
|
-
CopyrightControl as OlCopyrightControl,
|
|
13
14
|
MapboxLayer,
|
|
14
15
|
MaplibreLayer,
|
|
15
|
-
|
|
16
|
+
CopyrightControl as OlCopyrightControl,
|
|
16
17
|
layer as OlLayer,
|
|
18
|
+
RealtimeLayer as OlRealtimeLayer,
|
|
17
19
|
} from '../ol';
|
|
18
|
-
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
} from '../ol/mixins/PropertiesLayerMixin';
|
|
20
|
+
|
|
21
|
+
import type { RealtimeMot, RealtimeTrainId } from './realtime';
|
|
22
|
+
|
|
22
23
|
import type { RoutingParameters } from '.';
|
|
23
24
|
|
|
24
|
-
export type StyleCache =
|
|
25
|
+
export type StyleCache = Record<string, AnyCanvas>;
|
|
25
26
|
|
|
26
|
-
export
|
|
27
|
-
time?: number;
|
|
27
|
+
export interface ViewState {
|
|
28
28
|
center?: number[];
|
|
29
29
|
extent?: number[];
|
|
30
|
-
|
|
31
|
-
rotation?: number;
|
|
30
|
+
pixelRatio?: number;
|
|
32
31
|
resolution?: number;
|
|
32
|
+
rotation?: number;
|
|
33
|
+
size?: number[];
|
|
34
|
+
time?: number;
|
|
33
35
|
zoom?: number;
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
+
visible?:boolean;
|
|
37
|
+
}
|
|
36
38
|
|
|
37
|
-
export
|
|
38
|
-
hoverVehicleId?: RealtimeTrainId;
|
|
39
|
-
selectedVehicleId?: RealtimeTrainId;
|
|
40
|
-
useDelayStyle?: boolean;
|
|
41
|
-
delayOutlineColor?: string;
|
|
39
|
+
export interface RealtimeStyleOptions {
|
|
42
40
|
delayDisplay?: number;
|
|
43
|
-
|
|
41
|
+
delayOutlineColor?: string;
|
|
44
42
|
filter?: FilterFunction;
|
|
45
|
-
getRadius?: (type: RealtimeMot, z: number) => number;
|
|
46
43
|
getBgColor?: (type: RealtimeMot) => string;
|
|
47
44
|
getDelayColor?: (
|
|
48
|
-
delay:
|
|
45
|
+
delay: null | number,
|
|
49
46
|
cancelled?: boolean,
|
|
50
47
|
isDelayText?: boolean,
|
|
51
48
|
) => string;
|
|
52
49
|
getDelayFont?: (fontSize: number, text?: string) => string;
|
|
53
|
-
getDelayText?: (delay:
|
|
50
|
+
getDelayText?: (delay: null | number, cancelled?: boolean) => string;
|
|
51
|
+
getMaxRadiusForStrokeAndDelay?: () => number;
|
|
52
|
+
getMaxRadiusForText?: () => number;
|
|
53
|
+
getRadius?: (type: RealtimeMot, z: number) => number;
|
|
54
|
+
getScreenPixel?: (pixel: Pixel, viewState: ViewState) => Pixel;
|
|
54
55
|
getText?: (text?: string) => string;
|
|
55
56
|
getTextColor?: (type: RealtimeMot) => string;
|
|
56
57
|
getTextFont?: (fontSize: number, text?: string) => string;
|
|
@@ -61,14 +62,13 @@ export type RealtimeStyleOptions = {
|
|
|
61
62
|
fontSize: number,
|
|
62
63
|
getFont: (fontSize: number, text?: string) => string,
|
|
63
64
|
) => number;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
hoverVehicleId?: RealtimeTrainId;
|
|
66
|
+
noInterpolate?: boolean;
|
|
67
|
+
selectedVehicleId?: RealtimeTrainId;
|
|
68
|
+
useDelayStyle?: boolean;
|
|
69
|
+
}
|
|
68
70
|
|
|
69
|
-
export type RealtimeTrajectories =
|
|
70
|
-
[key: RealtimeTrainId]: RealtimeTrajectory;
|
|
71
|
-
};
|
|
71
|
+
export type RealtimeTrajectories = Record<RealtimeTrainId, RealtimeTrajectory>;
|
|
72
72
|
|
|
73
73
|
export type RealtimeStyleFunction = (
|
|
74
74
|
trajectory: RealtimeTrajectory,
|
|
@@ -76,54 +76,38 @@ export type RealtimeStyleFunction = (
|
|
|
76
76
|
options: RealtimeStyleOptions,
|
|
77
77
|
) => AnyCanvas | null;
|
|
78
78
|
|
|
79
|
-
export
|
|
79
|
+
export interface RealtimeRenderState {
|
|
80
80
|
center?: Coordinate;
|
|
81
|
-
zoom?: number;
|
|
82
|
-
rotation?: number;
|
|
83
81
|
renderedTrajectories?: RealtimeTrajectory[];
|
|
84
|
-
|
|
82
|
+
rotation?: number;
|
|
83
|
+
zoom?: number;
|
|
84
|
+
}
|
|
85
85
|
|
|
86
|
-
export type
|
|
87
|
-
export type
|
|
88
|
-
export type AnyOlLayer = OlLayer;
|
|
89
|
-
export type AnyMapboxLayer = MapboxLayer | MaplibreLayer;
|
|
90
|
-
export type AnyRealtimeLayer = MbRealtimeLayer | OlRealtimeLayer;
|
|
91
|
-
export type AnyCopyrightControl = MbCopyrightControl | OlCopyrightControl;
|
|
92
|
-
export type AnyMapGlMap = maplibregl.Map | maplibregl.Map;
|
|
93
|
-
export type AnyMapGlMapOptions = maplibregl.MapOptions | maplibregl.MapOptions;
|
|
86
|
+
export type AnyMapGlMap = maplibregl.Map;
|
|
87
|
+
export type AnyMapGlMapOptions = maplibregl.MapOptions;
|
|
94
88
|
export type AnyCanvas = HTMLCanvasElement | OffscreenCanvas;
|
|
95
89
|
export type AnyCanvasContext =
|
|
96
90
|
| CanvasRenderingContext2D
|
|
97
|
-
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
export type
|
|
102
|
-
export type
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
export
|
|
106
|
-
export type AnyMapGlMapClass = GConstructor<AnyMapGlMap>;
|
|
107
|
-
export type AnyCopyrightControlClass = GConstructor<AnyCopyrightControl>;
|
|
108
|
-
|
|
109
|
-
export type LayerGetFeatureInfoResponse = {
|
|
110
|
-
layer: Layer;
|
|
111
|
-
features: Feature[];
|
|
91
|
+
| null
|
|
92
|
+
| OffscreenCanvasRenderingContext2D
|
|
93
|
+
| undefined;
|
|
94
|
+
|
|
95
|
+
export type AnyRealtimeLayer = MbRealtimeLayer | OlRealtimeLayer;
|
|
96
|
+
export type AnyCopyrightControl = MbCopyrightControl | OlCopyrightControl;
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
export interface LayerGetFeatureInfoResponse {
|
|
112
100
|
coordinate: Coordinate;
|
|
113
|
-
|
|
101
|
+
features: Feature[];
|
|
102
|
+
layer: Layer;
|
|
103
|
+
}
|
|
114
104
|
|
|
115
|
-
export
|
|
116
|
-
resolution: number;
|
|
105
|
+
export interface LayerGetFeatureInfoOptions {
|
|
117
106
|
nb?: number;
|
|
118
|
-
|
|
107
|
+
hitTolerance: number = 5;
|
|
108
|
+
}
|
|
119
109
|
|
|
120
|
-
export type UserInteractionCallback = (
|
|
121
|
-
features: Feature[],
|
|
122
|
-
layer: LayerCommonOptions,
|
|
123
|
-
coordinate: Coordinate,
|
|
124
|
-
event: ObjectEvent,
|
|
125
|
-
) => void;
|
|
126
110
|
|
|
127
111
|
export type RoutingGraph = [RoutingParameters.graph, number, number];
|
|
128
112
|
export type RoutingMot = RoutingParameters.mot;
|
|
129
|
-
export type RoutingViaPoint =
|
|
113
|
+
export type RoutingViaPoint = Coordinate | string;
|
package/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Paths as Routing } from './routing';
|
|
2
2
|
import { Paths as Stops } from './stops';
|
|
3
3
|
|
|
4
|
-
export * from './realtime';
|
|
5
4
|
export * from './common';
|
|
5
|
+
export * from './realtime';
|
|
6
6
|
|
|
7
7
|
export type RoutingParameters = Routing['/']['get']['parameters']['query'];
|
|
8
8
|
export type RoutingResponse = Routing['/']['get']['responses']['200']['schema'];
|
package/types/realtime.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Feature, FeatureCollection, Point } from 'geojson';
|
|
2
2
|
|
|
3
|
-
export declare type RealtimeMode = '
|
|
3
|
+
export declare type RealtimeMode = 'raw' | 'schematic' | 'topographic';
|
|
4
4
|
|
|
5
|
-
export declare type RealtimeChannelModeSuffix = '' | '
|
|
5
|
+
export declare type RealtimeChannelModeSuffix = '_schematic' | '';
|
|
6
6
|
|
|
7
7
|
export type RealtimeTrainId = string;
|
|
8
8
|
|
|
@@ -10,38 +10,38 @@ export type RealtimeStationId = number;
|
|
|
10
10
|
|
|
11
11
|
export type RealtimeService =
|
|
12
12
|
| 'redis_websocket_api'
|
|
13
|
-
| 'tralis_stations'
|
|
14
13
|
| 'tralis_fzo'
|
|
15
|
-
| 'tralis_worker'
|
|
16
|
-
| 'tralis_vdv'
|
|
17
|
-
| 'tralis_newsticker'
|
|
18
14
|
| 'tralis_geofox'
|
|
15
|
+
| 'tralis_newsticker'
|
|
16
|
+
| 'tralis_stations'
|
|
17
|
+
| 'tralis_vdv'
|
|
18
|
+
| 'tralis_worker'
|
|
19
19
|
| string;
|
|
20
20
|
|
|
21
|
-
export type RealtimeTenant = '
|
|
21
|
+
export type RealtimeTenant = '' | 'sbb' | 'sbh' | 'sbm' | string;
|
|
22
22
|
|
|
23
23
|
export type RealtimeElevatorState = 'ALL_OPERABLE' | string;
|
|
24
24
|
|
|
25
|
-
export type RealtimeStopState = '
|
|
25
|
+
export type RealtimeStopState = 'BOARDING' | 'LEAVING' | string;
|
|
26
26
|
|
|
27
27
|
export type RealtimeTrajectoryState =
|
|
28
|
-
| 'HIDDEN'
|
|
29
28
|
| 'BOARDING'
|
|
30
|
-
| '
|
|
31
|
-
| 'JOURNEY_CANCELLED'
|
|
29
|
+
| 'HIDDEN'
|
|
30
|
+
| 'JOURNEY_CANCELLED'
|
|
31
|
+
| 'STOP_CANCELLED';
|
|
32
32
|
|
|
33
|
-
export type RealtimeGeneralizationLevel =
|
|
33
|
+
export type RealtimeGeneralizationLevel = 10 | 100 | 30 | 5;
|
|
34
34
|
|
|
35
35
|
export type RealtimeMot =
|
|
36
|
-
| 'tram'
|
|
37
|
-
| 'subway'
|
|
38
|
-
| 'rail'
|
|
39
36
|
| 'bus'
|
|
40
|
-
| 'ferry'
|
|
41
37
|
| 'cablecar'
|
|
42
|
-
| '
|
|
38
|
+
| 'coach'
|
|
39
|
+
| 'ferry'
|
|
43
40
|
| 'funicular'
|
|
44
|
-
| '
|
|
41
|
+
| 'gondola'
|
|
42
|
+
| 'rail'
|
|
43
|
+
| 'subway'
|
|
44
|
+
| 'tram';
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* @type RealtimeBbox
|
|
@@ -60,56 +60,61 @@ export type RealtimeBbox = (number | string)[];
|
|
|
60
60
|
export type RealtimeBuffer = [number, number];
|
|
61
61
|
|
|
62
62
|
export type RealtimeChannelName =
|
|
63
|
-
| 'websocket'
|
|
64
63
|
| 'buffer'
|
|
65
|
-
| 'line'
|
|
66
64
|
| 'extra_geoms'
|
|
67
65
|
| 'healthcheck'
|
|
68
|
-
|
|
|
69
|
-
|
|
|
66
|
+
| 'line'
|
|
67
|
+
| 'websocket'
|
|
70
68
|
| `deleted_vehicles${RealtimeChannelModeSuffix}`
|
|
69
|
+
| `full_trajectory${RealtimeChannelModeSuffix}_${RealtimeTenant}_${RealtimeTrainId}`
|
|
71
70
|
| `stopsequence_${RealtimeTenant}_${RealtimeTrainId}`
|
|
72
|
-
| `
|
|
71
|
+
| `timetable_${RealtimeStationId}`
|
|
72
|
+
| `trajectory${RealtimeChannelModeSuffix}`;
|
|
73
73
|
|
|
74
74
|
export interface RealtimeTrajectoryProperties {
|
|
75
75
|
// Tralis and trafimage
|
|
76
76
|
bounds: [number, number, number, number];
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
// Only after first rendering on a map
|
|
79
|
+
coordinate?: [number, number];
|
|
80
|
+
|
|
81
|
+
delay: null | number;
|
|
82
|
+
|
|
83
|
+
// Tralis
|
|
84
|
+
event?: string;
|
|
85
|
+
event_delay?: number;
|
|
78
86
|
event_timestamp: number;
|
|
87
|
+
event_timestamp?: number;
|
|
79
88
|
gen_level?: RealtimeGeneralizationLevel;
|
|
80
89
|
gen_range: [number, number];
|
|
81
90
|
has_journey: boolean;
|
|
82
91
|
has_realtime: boolean;
|
|
83
92
|
has_realtime_journey: boolean;
|
|
84
93
|
line?: RealtimeLine;
|
|
85
|
-
|
|
94
|
+
name?: string; // deprecated, name is an old property, use line.name instead.
|
|
95
|
+
operator?: string; // deprecated, operator is an old property, use tenant instead.
|
|
96
|
+
operator_provides_realtime_journey: 'no' | 'unknown' | 'yes';
|
|
97
|
+
original_line?: RealtimeLine;
|
|
98
|
+
original_rake?: string;
|
|
99
|
+
original_train_number?: number;
|
|
100
|
+
position_correction?: number;
|
|
86
101
|
rake?: string;
|
|
102
|
+
raw_coordinates?: [number, number];
|
|
103
|
+
|
|
87
104
|
raw_time?: string;
|
|
105
|
+
ride_state?: string;
|
|
106
|
+
|
|
88
107
|
route_identifier: string;
|
|
108
|
+
routeIdentifier?: string;
|
|
89
109
|
state: RealtimeTrajectoryState;
|
|
90
110
|
tenant: string;
|
|
91
|
-
time_intervals?:
|
|
111
|
+
time_intervals?: number[][];
|
|
92
112
|
time_since_update?: string;
|
|
93
113
|
timestamp: number;
|
|
94
114
|
train_id?: RealtimeTrainId;
|
|
95
115
|
train_number?: number;
|
|
96
|
-
type: RealtimeMots;
|
|
97
|
-
|
|
98
|
-
operator?: string; // deprecated, operator is an old property, use tenant instead.
|
|
99
|
-
name?: string; // deprecated, name is an old property, use line.name instead.
|
|
100
|
-
|
|
101
|
-
// Tralis
|
|
102
|
-
event?: string;
|
|
103
|
-
event_delay?: number;
|
|
104
|
-
event_timestamp?: number;
|
|
105
|
-
original_line?: RealtimeLine;
|
|
106
|
-
original_rake?: string;
|
|
107
|
-
original_train_number?: number;
|
|
108
|
-
position_correction?: number;
|
|
109
|
-
raw_coordinates?: [number, number];
|
|
110
|
-
ride_state?: string;
|
|
111
|
-
routeIdentifier?: string;
|
|
112
116
|
transmitting_vehicle?: string;
|
|
117
|
+
type: RealtimeMots;
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
export interface RealtimeTrajectory extends Feature {
|
|
@@ -139,7 +144,7 @@ export interface RealtimeStop {
|
|
|
139
144
|
aimedDepartureTime: number;
|
|
140
145
|
arrivalDelay?: number;
|
|
141
146
|
arrivalTime: number;
|
|
142
|
-
cancelled:
|
|
147
|
+
cancelled: boolean;
|
|
143
148
|
coordinate: number[];
|
|
144
149
|
departureDelay: number;
|
|
145
150
|
departureTime: number;
|
|
@@ -167,14 +172,14 @@ export interface RealtimeStopSequence {
|
|
|
167
172
|
routeIdentifier: string;
|
|
168
173
|
shortName: string;
|
|
169
174
|
stations: RealtimeStop[];
|
|
170
|
-
stroke?:
|
|
175
|
+
stroke?: RealtimeTenant;
|
|
171
176
|
text_color: string;
|
|
172
177
|
type: RealtimeMot;
|
|
173
178
|
vehicleType: number;
|
|
174
179
|
}
|
|
175
180
|
|
|
176
181
|
export interface RealtimeExtraGeomProperties {
|
|
177
|
-
ref:
|
|
182
|
+
ref: number | string;
|
|
178
183
|
}
|
|
179
184
|
|
|
180
185
|
export interface RealtimeExtraGeom extends Feature {
|
|
@@ -182,40 +187,38 @@ export interface RealtimeExtraGeom extends Feature {
|
|
|
182
187
|
}
|
|
183
188
|
|
|
184
189
|
export interface RealtimeExtraGeomDeleted {
|
|
185
|
-
type: 'Deleted';
|
|
186
190
|
properties: RealtimeExtraGeomProperties;
|
|
191
|
+
type: 'Deleted';
|
|
187
192
|
}
|
|
188
193
|
|
|
189
|
-
export type RealtimeExtraGeoms =
|
|
190
|
-
[index: string]: Feature[];
|
|
191
|
-
};
|
|
194
|
+
export type RealtimeExtraGeoms = Record<string, Feature[]>;
|
|
192
195
|
|
|
193
196
|
export interface RealtimeLine {
|
|
194
|
-
id: number;
|
|
195
197
|
color: string;
|
|
196
|
-
|
|
198
|
+
id: number;
|
|
197
199
|
name: string;
|
|
200
|
+
stroke: string;
|
|
198
201
|
text_color: string;
|
|
199
202
|
}
|
|
200
203
|
|
|
201
204
|
export interface RealtimeTransfer {
|
|
202
|
-
mot: RealtimeMot;
|
|
203
205
|
lines: string[];
|
|
206
|
+
mot: RealtimeMot;
|
|
204
207
|
}
|
|
205
208
|
|
|
206
209
|
export interface RealtimeStationproperties extends Feature {
|
|
207
|
-
transfers: RealtimeTransfer[];
|
|
208
210
|
elevatorOutOfOrder: boolean;
|
|
209
|
-
elevatorState: RealtimeElevatorState;
|
|
210
211
|
elevators: object;
|
|
211
|
-
|
|
212
|
-
name: string;
|
|
213
|
-
networkLines: RealtimeLine[];
|
|
214
|
-
hasElevator: boolean;
|
|
215
|
-
hasZOB: boolean;
|
|
212
|
+
elevatorState: RealtimeElevatorState;
|
|
216
213
|
hasAccessibility: boolean;
|
|
217
214
|
hasAirport: boolean;
|
|
215
|
+
hasElevator: boolean;
|
|
216
|
+
hasZOB: boolean;
|
|
217
|
+
name: string;
|
|
218
|
+
networkLines: RealtimeLine[];
|
|
218
219
|
tenant: RealtimeTenant;
|
|
220
|
+
transfers: RealtimeTransfer[];
|
|
221
|
+
uic: RealtimeStationId;
|
|
219
222
|
}
|
|
220
223
|
|
|
221
224
|
export interface RealtimeStation extends Feature {
|
|
@@ -224,30 +227,30 @@ export interface RealtimeStation extends Feature {
|
|
|
224
227
|
}
|
|
225
228
|
|
|
226
229
|
export interface RealtimeDeparture {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
at_station_ds100: string;
|
|
231
|
+
call_id: number;
|
|
232
|
+
created_at: string;
|
|
233
|
+
formation: any;
|
|
234
|
+
fzo_estimated_time: number;
|
|
231
235
|
has_fzo: boolean;
|
|
236
|
+
line: RealtimeLine;
|
|
237
|
+
min_arrival_time: number;
|
|
238
|
+
new_to: boolean;
|
|
232
239
|
next_stoppoints: string[];
|
|
240
|
+
no_stop_between: boolean;
|
|
241
|
+
no_stop_till: any;
|
|
233
242
|
platform: string;
|
|
234
|
-
created_at: string;
|
|
235
|
-
at_station_ds100: string;
|
|
236
|
-
train_number: number;
|
|
237
243
|
ris_aimed_time: number;
|
|
238
|
-
updated_at: number;
|
|
239
|
-
min_arrival_time: number;
|
|
240
244
|
ris_estimated_time: number;
|
|
241
|
-
train_id: RealtimeTrainId;
|
|
242
|
-
fzo_estimated_time: number;
|
|
243
|
-
train_type: number;
|
|
244
|
-
call_id: number;
|
|
245
|
-
line: RealtimeLine;
|
|
246
245
|
state: string; /// (BOARDING|STOP_CANCELLED|JOURNEY_CANCELLED|HIDDEN)/
|
|
247
|
-
|
|
248
|
-
no_stop_till: any;
|
|
249
|
-
timestamp: number; // This property seems to never exists
|
|
246
|
+
time: number;
|
|
250
247
|
timediff: number; // This property seems to alawy been 0
|
|
248
|
+
timestamp: number; // This property seems to never exists
|
|
249
|
+
to: string[];
|
|
250
|
+
train_id: RealtimeTrainId;
|
|
251
|
+
train_number: number;
|
|
252
|
+
train_type: number;
|
|
253
|
+
updated_at: number;
|
|
251
254
|
}
|
|
252
255
|
|
|
253
256
|
export interface RealtimeDepartureExtended extends RealtimeDeparture {
|
|
@@ -269,68 +272,68 @@ export interface RealtimeNews {
|
|
|
269
272
|
export interface RealtimeHealth {
|
|
270
273
|
heathly: boolean;
|
|
271
274
|
service: RealtimeService;
|
|
272
|
-
tenant:
|
|
275
|
+
tenant: null | string;
|
|
273
276
|
}
|
|
274
277
|
|
|
275
278
|
export interface RealtimeExtraGeomsResponse {
|
|
276
|
-
source: `extra_geoms`;
|
|
277
|
-
timestamp: number;
|
|
278
279
|
client_reference: null;
|
|
279
280
|
content: RealtimeExtraGeom | RealtimeExtraGeomDeleted;
|
|
281
|
+
source: `extra_geoms`;
|
|
282
|
+
timestamp: number;
|
|
280
283
|
}
|
|
281
284
|
|
|
282
285
|
export interface RealtimeStationResponse {
|
|
283
|
-
source: `station_${RealtimeStationId}`;
|
|
284
|
-
timestamp: number;
|
|
285
286
|
client_reference: null;
|
|
286
287
|
content: RealtimeNews;
|
|
288
|
+
source: `station_${RealtimeStationId}`;
|
|
289
|
+
timestamp: number;
|
|
287
290
|
}
|
|
288
291
|
|
|
289
292
|
export interface RealtimeNewsTickerResponse {
|
|
290
|
-
source: `${RealtimeTenant}_newsticker`;
|
|
291
|
-
timestamp: number;
|
|
292
293
|
client_reference: null;
|
|
293
294
|
content: RealtimeNews;
|
|
295
|
+
source: `${RealtimeTenant}_newsticker`;
|
|
296
|
+
timestamp: number;
|
|
294
297
|
}
|
|
295
298
|
|
|
296
299
|
export interface RealtimeTimetableResponse {
|
|
297
|
-
source: `timetable_${RealtimeStationId}`;
|
|
298
|
-
timestamp: number;
|
|
299
300
|
client_reference: null;
|
|
300
301
|
content: RealtimeDeparture;
|
|
302
|
+
source: `timetable_${RealtimeStationId}`;
|
|
303
|
+
timestamp: number;
|
|
301
304
|
}
|
|
302
305
|
|
|
303
306
|
export interface RealtimeTrajectoryResponse {
|
|
304
|
-
source: `trajectory${RealtimeChannelModeSuffix}`;
|
|
305
|
-
timestamp: number;
|
|
306
307
|
client_reference: '';
|
|
307
308
|
content: RealtimeTrajectory;
|
|
309
|
+
source: `trajectory${RealtimeChannelModeSuffix}`;
|
|
310
|
+
timestamp: number;
|
|
308
311
|
}
|
|
309
312
|
|
|
310
313
|
export interface RealtimeStopSequenceResponse {
|
|
314
|
+
client_reference: '';
|
|
315
|
+
content: RealtimeStopSequence[];
|
|
311
316
|
source: `stopsequence_${RealtimeTenant}_${RealtimeTrainId}`;
|
|
312
317
|
timestamp: number;
|
|
313
|
-
client_reference: '';
|
|
314
|
-
content: Array<RealtimeStopSequence>;
|
|
315
318
|
}
|
|
316
319
|
|
|
317
320
|
export interface RealtimeBufferResponse {
|
|
318
|
-
source: 'buffer';
|
|
319
|
-
timestamp: number;
|
|
320
321
|
client_reference: '';
|
|
321
322
|
content: RealtimeTrajectoryResponse[];
|
|
323
|
+
source: 'buffer';
|
|
324
|
+
timestamp: number;
|
|
322
325
|
}
|
|
323
326
|
|
|
324
327
|
export interface RealtimeDeletedVehiclesResponse {
|
|
325
|
-
source: `deleted_vehicles${RealtimeChannelModeSuffix}`;
|
|
326
|
-
timestamp: number;
|
|
327
328
|
client_reference: null;
|
|
328
329
|
content: string;
|
|
330
|
+
source: `deleted_vehicles${RealtimeChannelModeSuffix}`;
|
|
331
|
+
timestamp: number;
|
|
329
332
|
}
|
|
330
333
|
|
|
331
334
|
export interface RealtimeHealthCheckResponse {
|
|
332
|
-
source: 'healthcheck';
|
|
333
|
-
timestamp: number;
|
|
334
335
|
client_reference: null;
|
|
335
336
|
content: RealtimeHealth;
|
|
337
|
+
source: 'healthcheck';
|
|
338
|
+
timestamp: number;
|
|
336
339
|
}
|