@golemio/pid 2.23.2 → 2.23.3-dev.1527535265
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/db/example/03_ropidgtfs_dump.sql +7 -1
- package/db/example/09_departureboards_testdata_nogapfilter.sql +4 -1
- package/db/example/20_jis_infotexts.sql +6 -0
- package/db/migrations/postgresql/20241104000200-transfer-boards.js +53 -0
- package/db/migrations/postgresql/sqls/20241104000200-transfer-boards-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20241104000200-transfer-boards-up.sql +96 -0
- package/dist/helpers/StopEnums.d.ts +12 -0
- package/dist/helpers/StopEnums.js +17 -0
- package/dist/helpers/StopEnums.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +13 -0
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +116 -0
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -0
- package/dist/output-gateway/pid/data-access/DeparturesRepository.d.ts +14 -14
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js +86 -34
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
- package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.d.ts +16 -0
- package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.js +3 -0
- package/dist/output-gateway/pid/data-access/interfaces/DepartureInterfaces.js.map +1 -0
- package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.d.ts +0 -7
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +5 -16
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +31 -0
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +19 -0
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +8 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js +10 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +4 -2
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/FilterHelper.d.ts +4 -4
- package/dist/output-gateway/pid/models/helpers/FilterHelper.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.d.ts +4 -3
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +31 -8
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.d.ts +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +10 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +13 -0
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +62 -0
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -0
- package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +9 -0
- package/dist/output-gateway/pid/service/facade/StopFacade.js +76 -0
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -0
- package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +20 -0
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +104 -0
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +10 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +20 -0
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.d.ts +11 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +30 -0
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.d.ts +22 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +52 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.d.ts +11 -0
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +65 -0
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.d.ts +4 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +25 -2
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/docs/implementation_documentation.md +4 -0
- package/docs/openapi-output.yaml +152 -1
- package/package.json +3 -3
|
@@ -53,6 +53,9 @@ INSERT INTO ropidgtfs_stops_actual ("location_type", "parent_station", "platform
|
|
|
53
53
|
INSERT INTO ropidgtfs_stops_actual ("location_type", "parent_station", "platform_code", "stop_id", "stop_lat", "stop_lon", "stop_name", "stop_url", "wheelchair_boarding", "zone_id", "create_batch_id", "created_at", "created_by", "update_batch_id", "updated_at", "updated_by", "level_id", "stop_code", "stop_desc", "stop_timezone") VALUES (0, 'U306S1', '', 'U306Z102P', 50.07541, 14.34152, 'Nemocnice Motol', '', 1, 'P', -1, '2020-12-04 12:30:26.312286+01', 'integration-engine', NULL, NULL, NULL, 'U306L0', NULL, NULL, NULL);
|
|
54
54
|
INSERT INTO ropidgtfs_stops_actual ("location_type", "parent_station", "platform_code", "stop_id", "stop_lat", "stop_lon", "stop_name", "stop_url", "wheelchair_boarding", "zone_id", "create_batch_id", "created_at", "created_by", "update_batch_id", "updated_at", "updated_by", "level_id", "stop_code", "stop_desc", "stop_timezone") VALUES (1, '', '', 'U306S1', 50.07541, 14.34152, 'Nemocnice Motol', '', 1, 'P', -1, '2020-12-04 12:30:26.312286+01', 'integration-engine', NULL, NULL, NULL, '', NULL, NULL, NULL);
|
|
55
55
|
|
|
56
|
+
INSERT INTO ropidgtfs_cis_stop_groups_actual (avg_jtsk_x,avg_jtsk_y,avg_lat,avg_lon,cis,district_code,full_name,idos_category,idos_name,municipality,name,node,unique_name,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by) VALUES
|
|
57
|
+
(-739208.1,-1044513.56,50.0785027,14.4739637,27902,'AB','Želivského','301003','Želivského','Praha','Želivského',921,'Želivského',NULL,'2024-10-31 05:23:06.850',NULL,NULL,'2024-10-31 05:23:06.850',NULL);
|
|
58
|
+
|
|
56
59
|
INSERT INTO ropidgtfs_trips_actual (bikes_allowed, block_id, direction_id, exceptional, route_id, service_id, shape_id, trip_headsign, trip_id, wheelchair_accessible, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, trip_operation_type, trip_short_name) VALUES (1, '', 0, 0, 'L991', '1111111-1', 'L991V1', 'Nemocnice Motol', '991_1151_190107', 1, NULL, '2019-05-27 03:20:24.44+00', NULL, NULL, '2019-05-27 03:20:24.44+00', NULL, 1, '');
|
|
57
60
|
INSERT INTO ropidgtfs_trips_actual (bikes_allowed, block_id, direction_id, exceptional, route_id, service_id, shape_id, trip_headsign, trip_id, wheelchair_accessible, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, trip_operation_type, trip_short_name) VALUES (1, '', 1, 0, 'L991', '1111111-1', 'L991V2', 'Depo Hostivař', '991_4_190107', 1, NULL, '2019-05-27 03:20:24.44+00', NULL, NULL, '2019-05-27 03:20:24.44+00', NULL, 1, '');
|
|
58
61
|
INSERT INTO ropidgtfs_trips_actual (bikes_allowed, block_id, direction_id, exceptional, route_id, service_id, shape_id, trip_headsign, trip_id, wheelchair_accessible, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, trip_operation_type, trip_short_name) VALUES (1, '', 0, 0, 'L991', '1111111-1', 'L991V3', 'Nemocnice Motol', '991_1152_190107', 1, NULL, '2019-05-27 03:20:24.44+00', NULL, NULL, '2019-05-27 03:20:24.44+00', NULL, 1, '');
|
|
@@ -471,6 +474,10 @@ VALUES
|
|
|
471
474
|
(E'22:15:00',NULL,E'22:15:00',NULL,E'0',E'0',22.88101,NULL,E'U864Z9P',36,E'183_X_1',-1,E'2021-08-20 09:30:28.914+02',NULL,-1,E'2021-08-20 09:30:28.914+02',NULL,NULL);
|
|
472
475
|
|
|
473
476
|
|
|
477
|
+
INSERT INTO "ropidgtfs_stops_actual"("location_type","parent_station","platform_code","stop_id","stop_lat","stop_lon","stop_name","stop_url","wheelchair_boarding","zone_id","create_batch_id","created_at","created_by","update_batch_id","updated_at","updated_by","level_id","stop_code","stop_desc","stop_timezone", "asw_node_id")
|
|
478
|
+
VALUES
|
|
479
|
+
(0,NULL,E'D',E'U474Z4P',50.11063,14.50247,E'Vysočanská',NULL,0,E'P',-1,E'2021-04-14 05:40:41.629+02',NULL,-1,E'2021-04-14 05:40:41.629+02',NULL,NULL,NULL,NULL,NULL, '474');
|
|
480
|
+
|
|
474
481
|
INSERT INTO "ropidgtfs_stops_actual"("location_type","parent_station","platform_code","stop_id","stop_lat","stop_lon","stop_name","stop_url","wheelchair_boarding","zone_id","create_batch_id","created_at","created_by","update_batch_id","updated_at","updated_by","level_id","stop_code","stop_desc","stop_timezone")
|
|
475
482
|
VALUES
|
|
476
483
|
(0,NULL,E'F',E'U106Z6P',50.02823,14.50805,E'Opatov',NULL,0,E'P',-1,E'2021-04-14 05:40:41.542+02',NULL,-1,E'2021-04-14 05:40:41.542+02',NULL,NULL,NULL,NULL,NULL),
|
|
@@ -491,7 +498,6 @@ VALUES
|
|
|
491
498
|
(0,NULL,E'A',E'U371Z1P',50.12769,14.4168,E'Krakov',NULL,0,E'P',-1,E'2021-04-14 05:40:41.608+02',NULL,-1,E'2021-04-14 05:40:41.608+02',NULL,NULL,NULL,NULL,NULL),
|
|
492
499
|
(0,NULL,E'B',E'U409Z2P',50.04708,14.51556,E'Na Košíku',NULL,0,E'P',-1,E'2021-04-14 05:40:41.615+02',NULL,-1,E'2021-04-14 05:40:41.615+02',NULL,NULL,NULL,NULL,NULL),
|
|
493
500
|
(0,NULL,E'B',E'U467Z2P',50.12922,14.48268,E'Třebenická',NULL,0,E'P',-1,E'2021-04-14 05:40:41.628+02',NULL,-1,E'2021-04-14 05:40:41.628+02',NULL,NULL,NULL,NULL,NULL),
|
|
494
|
-
(0,NULL,E'D',E'U474Z4P',50.11063,14.50247,E'Vysočanská',NULL,0,E'P',-1,E'2021-04-14 05:40:41.629+02',NULL,-1,E'2021-04-14 05:40:41.629+02',NULL,NULL,NULL,NULL,NULL),
|
|
495
501
|
(0,NULL,E'B',E'U510Z2P',50.10598,14.49209,E'Českomoravská',NULL,0,E'P',-1,E'2021-04-14 05:40:41.637+02',NULL,-1,E'2021-04-14 05:40:41.638+02',NULL,NULL,NULL,NULL,NULL),
|
|
496
502
|
(0,NULL,E'A',E'U511Z1P',50.13102,14.4231,E'Odra',NULL,0,E'P',-1,E'2021-04-14 05:40:41.638+02',NULL,-1,E'2021-04-14 05:40:41.638+02',NULL,NULL,NULL,NULL,NULL),
|
|
497
503
|
(0,NULL,E'E',E'U52Z5P',50.03109,14.49152,E'Chodov',NULL,0,E'P',-1,E'2021-04-14 05:40:41.521+02',NULL,-1,E'2021-04-14 05:40:41.521+02',NULL,NULL,NULL,NULL,NULL),
|
|
@@ -1493,7 +1493,10 @@ INSERT INTO ropidgtfs_stop_times_actual (arrival_time, arrival_time_seconds, dep
|
|
|
1493
1493
|
INSERT INTO ropidgtfs_stop_times_actual (arrival_time, arrival_time_seconds, departure_time, departure_time_seconds, drop_off_type, pickup_type, shape_dist_traveled, stop_headsign, stop_id, stop_sequence, trip_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, timepoint) VALUES('7:42:00', NULL, '7:42:00', NULL, '0', '0', 17.380799, NULL, 'U612Z12P', 38, '9_7027_220502', -1, '2022-05-23 05:35:26.726', NULL, -1, '2022-05-23 05:35:26.726', NULL, NULL);
|
|
1494
1494
|
|
|
1495
1495
|
INSERT INTO ropidgtfs_stops_actual (level_id, location_type, parent_station, platform_code, stop_code, stop_desc, stop_id, stop_lat, stop_lon, stop_name, stop_timezone, stop_url, wheelchair_boarding, zone_id, asw_node_id, asw_stop_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by) VALUES(NULL, 0, NULL, 'A', NULL, NULL, 'U539Z1P', 50.081158, 14.419593, 'Národní třída', NULL, NULL, 1, 'P', 539, 1, -1, '2022-10-06 05:48:40.317', NULL, -1, '2022-10-06 05:48:40.317', NULL);
|
|
1496
|
-
INSERT INTO ropidgtfs_stops_actual (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES(0, NULL, 'B', 'U539Z2P', 50.081688, 14.419497, 'Národní třída', NULL, 1, 'P', -1, '2022-05-23 05:35:25.596', NULL, -1, '2022-05-23 05:35:25.596', NULL, NULL, NULL, NULL, NULL);
|
|
1496
|
+
INSERT INTO ropidgtfs_stops_actual (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone, asw_node_id) VALUES(0, NULL, 'B', 'U539Z2P', 50.081688, 14.419497, 'Národní třída', NULL, 1, 'P', -1, '2022-05-23 05:35:25.596', NULL, -1, '2022-05-23 05:35:25.596', NULL, NULL, NULL, NULL, NULL, 539);
|
|
1497
|
+
|
|
1498
|
+
INSERT INTO ropidgtfs_cis_stop_groups_actual (avg_jtsk_x,avg_jtsk_y,avg_lat,avg_lon,cis,district_code,full_name,idos_category,idos_name,municipality,"name",node,unique_name,create_batch_id,created_at,created_by,update_batch_id,updated_at,updated_by) VALUES
|
|
1499
|
+
(-743008.563,-1043757.63,50.0805855,14.41992,62887,'AB','Národní třída','301003','Národní třída','Praha','Národní třída',539,'Národní třída',NULL,'2024-11-04 05:41:34.062216+01',NULL,NULL,'2024-11-04 05:41:34.062216+01',NULL);
|
|
1497
1500
|
|
|
1498
1501
|
INSERT INTO ropidgtfs_trips_actual (bikes_allowed, block_id, direction_id, exceptional, route_id, service_id, shape_id, trip_headsign, trip_id, wheelchair_accessible, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, trip_operation_type, trip_short_name) VALUES(0, NULL, 1, 0, 'L18', '1111111-1', 'L18V2', 'Nádraží Podbaba', '18_3621_220516', 2, -1, '2022-05-23 05:35:25.763', NULL, -1, '2022-05-23 05:35:25.763', NULL, NULL, NULL);
|
|
1499
1502
|
INSERT INTO ropidgtfs_trips_actual (bikes_allowed, block_id, direction_id, exceptional, route_id, service_id, shape_id, trip_headsign, trip_id, wheelchair_accessible, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, trip_operation_type, trip_short_name) VALUES(0, NULL, 1, 0, 'L18', '1111111-1', 'L18V2', 'Nádraží Podbaba', '18_3632_220516', 1, -1, '2022-05-23 05:35:25.763', NULL, -1, '2022-05-23 05:35:25.763', NULL, NULL, NULL);
|
|
@@ -115,3 +115,9 @@ INSERT INTO jis_infotexts(id, severity_level, display_type, active_period_start,
|
|
|
115
115
|
INSERT INTO jis_infotexts_ropidgtfs_stops(infotext_id, stop_id, created_at, updated_at)
|
|
116
116
|
VALUES ('e9a15133-e606-406b-b492-9af05c643e7a', 'U52Z2P', '2024-04-19 09:00:00+02', now() + interval '1 day');
|
|
117
117
|
|
|
118
|
+
-- 15
|
|
119
|
+
INSERT INTO jis_infotexts(id, severity_level, display_type, active_period_start, active_period_end, description_text, created_at, updated_at)
|
|
120
|
+
VALUES ('cdcc2d15-2cdc-4205-b82a-5cc819a79738', 'SEVERE', 'INLINE', '2023-03-27 00:00:00.000+02', null, '{"cs": "Nejede to."}', '2024-02-07 13:24:55.000', now() + interval '1 day');
|
|
121
|
+
|
|
122
|
+
INSERT INTO jis_infotexts_ropidgtfs_stops(infotext_id, stop_id, created_at, updated_at)
|
|
123
|
+
VALUES ('cdcc2d15-2cdc-4205-b82a-5cc819a79738', 'U142Z301', '2024-04-19 09:00:00+02', now() + interval '1 day');
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dbm;
|
|
4
|
+
var type;
|
|
5
|
+
var seed;
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var Promise;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
+
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
+
*/
|
|
14
|
+
exports.setup = function(options, seedLink) {
|
|
15
|
+
dbm = options.dbmigrate;
|
|
16
|
+
type = dbm.dataType;
|
|
17
|
+
seed = seedLink;
|
|
18
|
+
Promise = options.Promise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.up = function(db) {
|
|
22
|
+
var filePath = path.join(__dirname, 'sqls', '20241104000200-transfer-boards-up.sql');
|
|
23
|
+
return new Promise( function( resolve, reject ) {
|
|
24
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
+
if (err) return reject(err);
|
|
26
|
+
console.log('received data: ' + data);
|
|
27
|
+
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
.then(function(data) {
|
|
32
|
+
return db.runSql(data);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.down = function(db) {
|
|
37
|
+
var filePath = path.join(__dirname, 'sqls', '20241104000200-transfer-boards-down.sql');
|
|
38
|
+
return new Promise( function( resolve, reject ) {
|
|
39
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
+
if (err) return reject(err);
|
|
41
|
+
console.log('received data: ' + data);
|
|
42
|
+
|
|
43
|
+
resolve(data);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.then(function(data) {
|
|
47
|
+
return db.runSql(data);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports._meta = {
|
|
52
|
+
"version": 1
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
drop function get_transfers;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
-- Companion function for get_departures, but simplified to only return transfer departures
|
|
2
|
+
create function get_transfers (
|
|
3
|
+
stopsIds varchar,
|
|
4
|
+
dateDepartureBetweenStart timestamptz,
|
|
5
|
+
dateDepartureBetweenEnd timestamptz,
|
|
6
|
+
dateCanceledDepartureBetweenStart timestamptz,
|
|
7
|
+
dateCanceledDepartureBetweenEnd timestamptz
|
|
8
|
+
)
|
|
9
|
+
returns table (
|
|
10
|
+
departure_datetime_real timestamptz,
|
|
11
|
+
departure_datetime timestamptz,
|
|
12
|
+
stop_headsign varchar(70),
|
|
13
|
+
stop_id varchar(25),
|
|
14
|
+
platform_code varchar(10),
|
|
15
|
+
trip_id varchar(50),
|
|
16
|
+
trip_headsign varchar(100),
|
|
17
|
+
trip_short_name varchar(30),
|
|
18
|
+
route_short_name varchar(50),
|
|
19
|
+
route_type int2,
|
|
20
|
+
route_id varchar(20),
|
|
21
|
+
is_canceled bool,
|
|
22
|
+
"trip.cis_stop_platform_code" varchar(15),
|
|
23
|
+
is_delay_available bool
|
|
24
|
+
)
|
|
25
|
+
language SQL
|
|
26
|
+
set search_path from current
|
|
27
|
+
as $$
|
|
28
|
+
select
|
|
29
|
+
departure_boards_detailed."computed.departure_datetime_real",
|
|
30
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.departure_datetime",
|
|
31
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.stop_headsign",
|
|
32
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.stop_id",
|
|
33
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.platform_code",
|
|
34
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.trip_id",
|
|
35
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.trip_headsign",
|
|
36
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.trip_short_name",
|
|
37
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.route_short_name",
|
|
38
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.route_type",
|
|
39
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.route_id",
|
|
40
|
+
departure_boards_detailed."is_canceled",
|
|
41
|
+
departure_boards_detailed.cis_stop_platform_code as "trip.cis_stop_platform_code",
|
|
42
|
+
case when departure_boards_detailed."trip.last_position.delay" is null then false else true end as "is_delay_available"
|
|
43
|
+
from (
|
|
44
|
+
select
|
|
45
|
+
("departure_datetime"
|
|
46
|
+
+ MAKE_INTERVAL(secs => (case when "trip.last_position.delay" is null then 0 else "trip.last_position.delay" end))
|
|
47
|
+
- case when (MAKE_INTERVAL(secs => (case when "trip.last_position.delay" is null then 0 else "trip.last_position.delay" end)) > MAKE_INTERVAL())
|
|
48
|
+
then least (
|
|
49
|
+
MAKE_INTERVAL(secs => (case when "trip.last_position.delay" is null then 0 else "trip.last_position.delay" end)),
|
|
50
|
+
("departure_datetime" - "arrival_datetime")::interval
|
|
51
|
+
)
|
|
52
|
+
else MAKE_INTERVAL()
|
|
53
|
+
end
|
|
54
|
+
) "computed.departure_datetime_real",
|
|
55
|
+
"arrival_datetime" + MAKE_INTERVAL(secs => (
|
|
56
|
+
CASE WHEN "trip.last_position.delay" IS NULL THEN 0 ELSE "trip.last_position.delay" end
|
|
57
|
+
)) "computed.arrival_datetime_real",
|
|
58
|
+
"ropidgtfs_precomputed_departures"."stop_headsign" as "ropidgtfs_precomputed_departures.stop_headsign",
|
|
59
|
+
"ropidgtfs_precomputed_departures"."stop_id" as "ropidgtfs_precomputed_departures.stop_id",
|
|
60
|
+
"ropidgtfs_precomputed_departures"."stop_sequence" as "ropidgtfs_precomputed_departures.stop_sequence",
|
|
61
|
+
"ropidgtfs_precomputed_departures"."pickup_type" as "ropidgtfs_precomputed_departures.pickup_type",
|
|
62
|
+
"ropidgtfs_precomputed_departures"."drop_off_type" as "ropidgtfs_precomputed_departures.drop_off_type",
|
|
63
|
+
"ropidgtfs_precomputed_departures"."departure_datetime" as "ropidgtfs_precomputed_departures.departure_datetime",
|
|
64
|
+
"ropidgtfs_precomputed_departures"."platform_code" as "ropidgtfs_precomputed_departures.platform_code",
|
|
65
|
+
"ropidgtfs_precomputed_departures"."max_stop_sequence" as "ropidgtfs_precomputed_departures.max_stop_sequence",
|
|
66
|
+
"ropidgtfs_precomputed_departures"."trip_id" as "ropidgtfs_precomputed_departures.trip_id",
|
|
67
|
+
"ropidgtfs_precomputed_departures"."trip_headsign" as "ropidgtfs_precomputed_departures.trip_headsign",
|
|
68
|
+
"ropidgtfs_precomputed_departures"."trip_short_name" as "ropidgtfs_precomputed_departures.trip_short_name",
|
|
69
|
+
"ropidgtfs_precomputed_departures"."route_short_name" as "ropidgtfs_precomputed_departures.route_short_name",
|
|
70
|
+
"ropidgtfs_precomputed_departures"."route_type" as "ropidgtfs_precomputed_departures.route_type",
|
|
71
|
+
"ropidgtfs_precomputed_departures"."route_id" as "ropidgtfs_precomputed_departures.route_id",
|
|
72
|
+
x."trip.last_position.delay" as "trip.last_position.delay",
|
|
73
|
+
x."trip.is_canceled" as "is_canceled",
|
|
74
|
+
cis_stop.cis_stop_platform_code as "cis_stop_platform_code"
|
|
75
|
+
from
|
|
76
|
+
"ropidgtfs_precomputed_departures" as "ropidgtfs_precomputed_departures"
|
|
77
|
+
left outer join v_vehiclepositions_trip_position_vehicle_info as x on
|
|
78
|
+
"ropidgtfs_precomputed_departures"."trip_id" = x."trip.gtfs_trip_id"
|
|
79
|
+
left join vehiclepositions_cis_stops as cis_stop on
|
|
80
|
+
cis_stop.rt_trip_id = x."trip.id"
|
|
81
|
+
and cis_stop.cis_stop_group_id = "ropidgtfs_precomputed_departures"."cis_stop_group_id"
|
|
82
|
+
) departure_boards_detailed
|
|
83
|
+
where
|
|
84
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.stop_id" = ANY(STRING_TO_ARRAY(stopsIds,','))
|
|
85
|
+
and (
|
|
86
|
+
(departure_boards_detailed."computed.arrival_datetime_real" between dateDepartureBetweenStart and dateDepartureBetweenEnd)
|
|
87
|
+
or (
|
|
88
|
+
departure_boards_detailed."is_canceled" = true
|
|
89
|
+
and
|
|
90
|
+
(departure_boards_detailed."computed.arrival_datetime_real" between dateCanceledDepartureBetweenStart and dateCanceledDepartureBetweenEnd)
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
and (
|
|
94
|
+
departure_boards_detailed."ropidgtfs_precomputed_departures.pickup_type" != '1' and departure_boards_detailed."ropidgtfs_precomputed_departures.stop_sequence" != departure_boards_detailed."ropidgtfs_precomputed_departures.max_stop_sequence"
|
|
95
|
+
);
|
|
96
|
+
$$;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum GtfsStopLocationType {
|
|
2
|
+
/** A location where passengers board or disembark from a transit vehicle */
|
|
3
|
+
StopOrPlatform = 0,
|
|
4
|
+
/** A physical structure or area that contains one or more platform */
|
|
5
|
+
Station = 1,
|
|
6
|
+
/** A location where passengers can enter or exit a station from the street */
|
|
7
|
+
EntranceOrExit = 2,
|
|
8
|
+
/** A location within a station, not matching any other location_type */
|
|
9
|
+
GenericNode = 3,
|
|
10
|
+
/** A specific location on a platform, where passengers can board and/or alight vehicles */
|
|
11
|
+
BoardingArea = 4
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GtfsStopLocationType = void 0;
|
|
4
|
+
var GtfsStopLocationType;
|
|
5
|
+
(function (GtfsStopLocationType) {
|
|
6
|
+
/** A location where passengers board or disembark from a transit vehicle */
|
|
7
|
+
GtfsStopLocationType[GtfsStopLocationType["StopOrPlatform"] = 0] = "StopOrPlatform";
|
|
8
|
+
/** A physical structure or area that contains one or more platform */
|
|
9
|
+
GtfsStopLocationType[GtfsStopLocationType["Station"] = 1] = "Station";
|
|
10
|
+
/** A location where passengers can enter or exit a station from the street */
|
|
11
|
+
GtfsStopLocationType[GtfsStopLocationType["EntranceOrExit"] = 2] = "EntranceOrExit";
|
|
12
|
+
/** A location within a station, not matching any other location_type */
|
|
13
|
+
GtfsStopLocationType[GtfsStopLocationType["GenericNode"] = 3] = "GenericNode";
|
|
14
|
+
/** A specific location on a platform, where passengers can board and/or alight vehicles */
|
|
15
|
+
GtfsStopLocationType[GtfsStopLocationType["BoardingArea"] = 4] = "BoardingArea";
|
|
16
|
+
})(GtfsStopLocationType || (exports.GtfsStopLocationType = GtfsStopLocationType = {}));
|
|
17
|
+
//# sourceMappingURL=StopEnums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopEnums.js","sourceRoot":"","sources":["../../src/helpers/StopEnums.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAeX;AAfD,WAAY,oBAAoB;IAC5B,4EAA4E;IAC5E,mFAAkB,CAAA;IAElB,sEAAsE;IACtE,qEAAW,CAAA;IAEX,8EAA8E;IAC9E,mFAAkB,CAAA;IAElB,wEAAwE;IACxE,6EAAe,CAAA;IAEf,2FAA2F;IAC3F,+EAAgB,CAAA;AACpB,CAAC,EAfW,oBAAoB,oCAApB,oBAAoB,QAe/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropagateTrainDelayTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.ts"],"names":[],"mappings":";;;;;;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ceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sDAA2D;AAC3D,gGAAqF;AAErF,wEAAqE;AAErE,mEAAuF;AACvF,mEAAyD;AAGzD,mFAAqF;AACrF,sFAAmF;AAEnF,MAAa,uBAAwB,SAAQ,uDAAqD;IAU9F,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAVP,cAAS,GAAG,qBAAqB,CAAC;QAClC,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QACtC,WAAM,GAAG,0DAA8B,CAAC;QAgEhD,sBAAiB,GAAG,CACxB,aAAiC,EACjC,eAAuB,EACI,EAAE;YAC7B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;gBAC5C,UAAU,EAAE,CAAC,cAAc,CAAC;gBAC5B,KAAK,EAAE;oBACH,aAAa,EAAE,aAAa;oBAC5B,eAAe,EAAE,EAAE,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,eAAe,EAAE;iBAChD;gBACD,KAAK,EAAE,CAAC,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;gBACnC,GAAG,EAAE,IAAI;aACZ,CAAC,CAAC;YAEH,OAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC;QAC9B,CAAC,CAAA,CAAC;QAtEE,IAAI,CAAC,MAAM,GAAG,gCAA0B,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAC5E,IAAI,CAAC,oBAAoB,GAAG,uBAAkB,CAAC,OAAO,CAClD,iDAAuB,CAAC,yBAAyB,CACpD,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,gCAA0B,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QACxF,IAAI,CAAC,2BAA2B,GAAG,IAAI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Ac;wBAC9B,cAAc,EAAE,gBAAgB,CAAC,QAAQ,CAAC,OAAO;wBACjD,aAAa,EAAE,cAAc;4BACzB,CAAC,CAAC;gCACI;oCACI,OAAO,EAAE,cAAc;oCACvB,yBAAyB,EAAE,yBAAyB;iCACvD;6BACJ;4BACH,CAAC,CAAC,EAAE;qBACX,CAAC,CAAC;iBACN;gBAAC,OAAO,GAAG,EAAE;oBACV,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,SAAS,oDAAoD,YAAY,MAAM,GAAG,CAAC,OAAO,EAAE,CACvG,CAAC;iBACL;aACJ;;KACJ;CAkBJ;AAnFD,0DAmFC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="express" />
|
|
2
|
+
import { InfotextFacade } from "../../service/facade/InfotextFacade";
|
|
3
|
+
import { StopFacade } from "../../service/facade/StopFacade";
|
|
4
|
+
import { TransferFacade } from "../../service/facade/TransferFacade";
|
|
5
|
+
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
6
|
+
export declare class V3TransferBoardsController {
|
|
7
|
+
private stopFacade;
|
|
8
|
+
private infotextFacade;
|
|
9
|
+
private transferFacade;
|
|
10
|
+
constructor(stopFacade: StopFacade, infotextFacade: InfotextFacade, transferFacade: TransferFacade);
|
|
11
|
+
getTransferDepartures: RequestHandler;
|
|
12
|
+
private isValidQueryStringParam;
|
|
13
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.V3TransferBoardsController = void 0;
|
|
28
|
+
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
29
|
+
const InfotextFacade_1 = require("../../service/facade/InfotextFacade");
|
|
30
|
+
const StopFacade_1 = require("../../service/facade/StopFacade");
|
|
31
|
+
const TransferFacade_1 = require("../../service/facade/TransferFacade");
|
|
32
|
+
const RopidRouterUtils_1 = require("../../../shared/RopidRouterUtils");
|
|
33
|
+
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
34
|
+
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
35
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
36
|
+
let V3TransferBoardsController = exports.V3TransferBoardsController = class V3TransferBoardsController {
|
|
37
|
+
constructor(stopFacade, infotextFacade, transferFacade) {
|
|
38
|
+
this.stopFacade = stopFacade;
|
|
39
|
+
this.infotextFacade = infotextFacade;
|
|
40
|
+
this.transferFacade = transferFacade;
|
|
41
|
+
this.getTransferDepartures = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const span = (0, trace_provider_1.createChildSpan)("V3TransferBoardsController.getTransferDepartures");
|
|
43
|
+
const cisId = req.query.cisId;
|
|
44
|
+
const tripNumber = req.query.tripNumber;
|
|
45
|
+
span === null || span === void 0 ? void 0 : span.setAttributes({ cisId, tripNumber });
|
|
46
|
+
// Additional type check for query string parameters
|
|
47
|
+
if (!this.isValidQueryStringParam(cisId) || !this.isValidQueryStringParam(tripNumber)) {
|
|
48
|
+
return res.status(400).json({ error: "cisId and tripNumber are not valid" });
|
|
49
|
+
}
|
|
50
|
+
const currentMoment = (0, moment_timezone_1.default)();
|
|
51
|
+
let timeFrom = null;
|
|
52
|
+
let minutesOffset = 0;
|
|
53
|
+
if (req.query.timeFrom) {
|
|
54
|
+
timeFrom = moment_timezone_1.default.tz(req.query.timeFrom, RopidRouterUtils_1.RopidRouterUtils.TIMEZONE);
|
|
55
|
+
minutesOffset = timeFrom.diff(currentMoment, "minutes");
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
//#region GTFS stops
|
|
59
|
+
let stopIds = [];
|
|
60
|
+
try {
|
|
61
|
+
stopIds = yield this.stopFacade.getStopIdsForTransferBoards(cisId);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
span === null || span === void 0 ? void 0 : span.recordException(error);
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
if (stopIds.length === 0) {
|
|
69
|
+
return res.status(404).json({
|
|
70
|
+
departures: [],
|
|
71
|
+
infotexts: [],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#region Transfer departures and infotexts
|
|
75
|
+
let departuresToInclude = [];
|
|
76
|
+
let infotextsToInclude = [];
|
|
77
|
+
try {
|
|
78
|
+
const [departures, infotexts] = yield Promise.all([
|
|
79
|
+
this.transferFacade.getTransferDepartures(stopIds, tripNumber, currentMoment, minutesOffset),
|
|
80
|
+
this.infotextFacade.getInfotextsForTransferBoards(stopIds, currentMoment, timeFrom),
|
|
81
|
+
]);
|
|
82
|
+
departuresToInclude = departures;
|
|
83
|
+
infotextsToInclude = infotexts;
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
span === null || span === void 0 ? void 0 : span.recordException(error);
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
return res.status(200).json({
|
|
91
|
+
departures: departuresToInclude,
|
|
92
|
+
infotexts: infotextsToInclude,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
next(err);
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
span === null || span === void 0 ? void 0 : span.end();
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
this.isValidQueryStringParam = (param) => {
|
|
103
|
+
return typeof param === "string";
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
exports.V3TransferBoardsController = V3TransferBoardsController = __decorate([
|
|
108
|
+
(0, tsyringe_1.injectable)(),
|
|
109
|
+
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.StopFacade)),
|
|
110
|
+
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.InfotextFacade)),
|
|
111
|
+
__param(2, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.TransferFacade)),
|
|
112
|
+
__metadata("design:paramtypes", [StopFacade_1.StopFacade,
|
|
113
|
+
InfotextFacade_1.InfotextFacade,
|
|
114
|
+
TransferFacade_1.TransferFacade])
|
|
115
|
+
], V3TransferBoardsController);
|
|
116
|
+
//# sourceMappingURL=V3TransferBoardsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V3TransferBoardsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/controllers/v3/V3TransferBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qDAAoD;AACpD,wEAAuE;AACvE,gEAA+D;AAC/D,wEAAuE;AACvE,uEAA+D;AAC/D,+FAA6F;AAE7F,gGAA2E;AAC3E,iEAAwE;AAKjE,IAAM,0BAA0B,wCAAhC,MAAM,0BAA0B;IACnC,YACmC,UAA8B,EAC1B,cAAsC,EACtC,cAAsC;QAFlC,eAAU,GAAV,UAAU,CAAY;QAClB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;QAGtE,0BAAqB,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACpE,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,kDAAkD,CAAC,CAAC;YAEjF,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;YAC9B,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC;YACxC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,CAAC,EAAE,KAAK,EAAE,UAAU,EAAgB,CAAC,CAAC;YAEzD,oDAAoD;YACpD,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAE;gBACnF,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oCAAoC,EAAE,CAAC,CAAC;aAChF;YAED,MAAM,aAAa,GAAG,IAAA,yBAAM,GAAE,CAAC;Y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,GAAG,UAAU,CAAC;oBACjC,kBAAkB,GAAG,SAAS,CAAC;iBAClC;gBAAC,OAAO,KAAK,EAAE;oBACZ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,eAAe,CAAC,KAAK,CAAC,CAAC;oBAC7B,MAAM,KAAK,CAAC;iBACf;gBACD,YAAY;gBAEZ,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACxB,UAAU,EAAE,mBAAmB;oBAC/B,SAAS,EAAE,kBAAkB;iBAChC,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;QAEM,4BAAuB,GAAG,CAAC,KAAuB,EAAmB,EAAE;YAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;QACrC,CAAC,CAAC;IAvEC,CAAC;CAwEP,CAAA;qCA7EY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,UAAU,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;IACjC,WAAA,IAAA,iBAAM,EAAC,uBAAU,CAAC,cAAc,CAAC,CAAA;qCAFiB,uBAAU;QACF,+BAAc;QACd,+BAAc;GAJpE,0BAA0B,CA6EtC"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
currentMoment: Moment;
|
|
6
|
-
minutesBefore: number;
|
|
7
|
-
minutesAfter: number;
|
|
8
|
-
minutesOffset: number;
|
|
9
|
-
mode: DepartureMode;
|
|
10
|
-
isAirCondition: boolean;
|
|
11
|
-
}
|
|
1
|
+
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
2
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
3
|
+
import { IPIDDeparture, ITransferDeparture } from "..";
|
|
4
|
+
import { IDeparturesViewOptions, ITransfersViewOptions } from "./interfaces/DepartureInterfaces";
|
|
12
5
|
export declare class DeparturesRepository {
|
|
13
|
-
private schema;
|
|
14
|
-
private config;
|
|
15
6
|
private connector;
|
|
16
|
-
|
|
7
|
+
private schema;
|
|
8
|
+
private isAirConditioningFeatureEnabled;
|
|
9
|
+
constructor(connector: IDatabaseConnector, config: ISimpleConfig);
|
|
17
10
|
GetOne(id: any): Promise<any>;
|
|
18
11
|
/** Retrieves all departures
|
|
19
12
|
*
|
|
@@ -21,4 +14,11 @@ export declare class DeparturesRepository {
|
|
|
21
14
|
* @returns {Promise<IPIDDeparture[]>} Array of the retrieved records
|
|
22
15
|
*/
|
|
23
16
|
GetAll(options: IDeparturesViewOptions): Promise<IPIDDeparture[]>;
|
|
17
|
+
/** Retrieves transfer departures
|
|
18
|
+
*
|
|
19
|
+
* @param {ITransfersViewOptions} options - All query options
|
|
20
|
+
* @returns {Promise<ITransferDeparture[]>} Array of the retrieved records
|
|
21
|
+
*/
|
|
22
|
+
getTransferDepartures(options: ITransfersViewOptions): Promise<ITransferDeparture[]>;
|
|
23
|
+
private getDepartureTimestamps;
|
|
24
24
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
2
14
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
15
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
16
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,22 +20,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
20
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
21
|
});
|
|
10
22
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
24
|
exports.DeparturesRepository = void 0;
|
|
16
25
|
const const_1 = require("../../../schema-definitions/const");
|
|
17
26
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
18
|
-
const
|
|
19
|
-
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
27
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
20
28
|
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
29
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
21
30
|
const __1 = require("..");
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
const ONE_MINUTE_IN_MILLIS = 60000;
|
|
32
|
+
let DeparturesRepository = exports.DeparturesRepository = class DeparturesRepository {
|
|
33
|
+
constructor(connector, config) {
|
|
34
|
+
this.connector = connector;
|
|
24
35
|
this.schema = const_1.PG_SCHEMA;
|
|
25
|
-
this.
|
|
26
|
-
this.connector = Di_1.OutputGatewayContainer.resolve(CoreToken_1.CoreToken.PostgresConnector);
|
|
36
|
+
this.isAirConditioningFeatureEnabled = config.getBoolean("env.VEHICLE_POSITIONS_IS_AIR_COND_ENABLED", true);
|
|
27
37
|
}
|
|
28
38
|
GetOne(id) {
|
|
29
39
|
throw new Error("Method not implemented.");
|
|
@@ -35,24 +45,7 @@ class DeparturesRepository {
|
|
|
35
45
|
*/
|
|
36
46
|
GetAll(options) {
|
|
37
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const
|
|
39
|
-
const dateDepartureBetweenStart = options.currentMoment
|
|
40
|
-
.clone()
|
|
41
|
-
.add(options.minutesOffset - options.minutesBefore, "minutes")
|
|
42
|
-
.toDate();
|
|
43
|
-
const dateDepartureBetweenEnd = options.currentMoment
|
|
44
|
-
.clone()
|
|
45
|
-
.add(options.minutesOffset + options.minutesAfter, "minutes")
|
|
46
|
-
.toDate();
|
|
47
|
-
const dateCanceledDepartureBetweenStart = moment_timezone_1.default
|
|
48
|
-
.min([
|
|
49
|
-
options.currentMoment.clone().add(options.minutesOffset - options.minutesBefore, "minutes"),
|
|
50
|
-
options.currentMoment.clone().add(options.minutesOffset - 3, "minutes"),
|
|
51
|
-
])
|
|
52
|
-
.toDate();
|
|
53
|
-
const dateCanceledDepartureBetweenEnd = moment_timezone_1.default
|
|
54
|
-
.max(options.currentMoment.clone().add(options.minutesOffset + options.minutesAfter, "minutes"), options.currentMoment.clone().add(options.minutesOffset + 3, "minutes"))
|
|
55
|
-
.toDate();
|
|
48
|
+
const { start, end, canceledStart, canceledEnd } = this.getDepartureTimestamps(options);
|
|
56
49
|
const result = yield this.connector.getConnection().query(`
|
|
57
50
|
SELECT * from ${this.schema}.get_departures(
|
|
58
51
|
$stopsids,
|
|
@@ -67,17 +60,76 @@ class DeparturesRepository {
|
|
|
67
60
|
bind: {
|
|
68
61
|
stopsids: options.stopsIds.join(","),
|
|
69
62
|
mode: options.mode === __1.DepartureMode.ARRIVALS ? 2 : options.mode === __1.DepartureMode.MIXED ? 3 : 1,
|
|
70
|
-
datedeparturebetweenstart:
|
|
71
|
-
datedeparturebetweenend:
|
|
63
|
+
datedeparturebetweenstart: start,
|
|
64
|
+
datedeparturebetweenend: end,
|
|
72
65
|
isnegativeminutesbefore: options.minutesBefore < 0 ? 1 : 0,
|
|
73
|
-
datecanceleddeparturebetweenstart:
|
|
74
|
-
datecanceleddeparturebetweenend:
|
|
75
|
-
airconditioninfoenabled: isAirConditioningFeatureEnabled ? 1 : 0,
|
|
66
|
+
datecanceleddeparturebetweenstart: canceledStart,
|
|
67
|
+
datecanceleddeparturebetweenend: canceledEnd,
|
|
68
|
+
airconditioninfoenabled: this.isAirConditioningFeatureEnabled && options.isAirCondition ? 1 : 0,
|
|
76
69
|
},
|
|
77
70
|
});
|
|
78
71
|
return result;
|
|
79
72
|
});
|
|
80
73
|
}
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
/** Retrieves transfer departures
|
|
75
|
+
*
|
|
76
|
+
* @param {ITransfersViewOptions} options - All query options
|
|
77
|
+
* @returns {Promise<ITransferDeparture[]>} Array of the retrieved records
|
|
78
|
+
*/
|
|
79
|
+
getTransferDepartures(options) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
// Always fall back to 0 minutes before and 60 minutes after
|
|
82
|
+
const minutesBefore = 0;
|
|
83
|
+
const minutesAfter = 60;
|
|
84
|
+
const { start, end, canceledStart, canceledEnd } = this.getDepartureTimestamps({
|
|
85
|
+
currentMoment: options.currentMoment,
|
|
86
|
+
minutesOffset: options.minutesOffset,
|
|
87
|
+
minutesBefore,
|
|
88
|
+
minutesAfter,
|
|
89
|
+
});
|
|
90
|
+
try {
|
|
91
|
+
return yield this.connector.getConnection().query(`
|
|
92
|
+
select * from ${this.schema}.get_transfers(
|
|
93
|
+
$stopsids,
|
|
94
|
+
$datedeparturebetweenstart,
|
|
95
|
+
$datedeparturebetweenend,
|
|
96
|
+
$datecanceleddeparturebetweenstart,
|
|
97
|
+
$datecanceleddeparturebetweenend);`, {
|
|
98
|
+
type: sequelize_1.QueryTypes.SELECT,
|
|
99
|
+
bind: {
|
|
100
|
+
stopsids: options.stopsIds.join(","),
|
|
101
|
+
datedeparturebetweenstart: start,
|
|
102
|
+
datedeparturebetweenend: end,
|
|
103
|
+
datecanceleddeparturebetweenstart: canceledStart,
|
|
104
|
+
datecanceleddeparturebetweenend: canceledEnd,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw new golemio_errors_1.GeneralError("Failed to retrieve transfer departures", this.constructor.name, error, 500);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
getDepartureTimestamps(options) {
|
|
114
|
+
const currentTime = options.currentMoment.valueOf(); // in milliseconds
|
|
115
|
+
// Calculate base timestamps
|
|
116
|
+
const baseStart = currentTime + (options.minutesOffset - options.minutesBefore) * ONE_MINUTE_IN_MILLIS;
|
|
117
|
+
const baseEnd = currentTime + (options.minutesOffset + options.minutesAfter) * ONE_MINUTE_IN_MILLIS;
|
|
118
|
+
// Calculate canceled timestamps
|
|
119
|
+
const canceledBaseStart = currentTime + (options.minutesOffset - 3) * ONE_MINUTE_IN_MILLIS;
|
|
120
|
+
const canceledBaseEnd = currentTime + (options.minutesOffset + 3) * ONE_MINUTE_IN_MILLIS;
|
|
121
|
+
return {
|
|
122
|
+
start: new Date(baseStart),
|
|
123
|
+
end: new Date(baseEnd),
|
|
124
|
+
canceledStart: new Date(Math.min(baseStart, canceledBaseStart)),
|
|
125
|
+
canceledEnd: new Date(Math.max(baseEnd, canceledBaseEnd)),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.DeparturesRepository = DeparturesRepository = __decorate([
|
|
130
|
+
(0, tsyringe_1.injectable)(),
|
|
131
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
132
|
+
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
133
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
134
|
+
], DeparturesRepository);
|
|
83
135
|
//# sourceMappingURL=DeparturesRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/DeparturesRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/data-access/DeparturesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAuC;AAGvC,wEAAqE;AACrE,6EAAwE;AACxE,mEAAiE;AACjE,iEAAwE;AACxE,0BAAsE;AAGtE,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAG5B,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAI7B,YACiD,SAA6B,EAC1C,MAAqB;QADR,cAAS,GAAT,SAAS,CAAoB;QAG1E,IAAI,CAAC,MAAM,GAAG,iBAAS,CAAC;QACxB,IAAI,CAAC,+BAA+B,GAAG,MAAM,CAAC,UAAU,CAAC,2CAA2C,EAAE,IAAI,CAAC,CAAC;IAChH,CAAC;IAED,MAAM,CAAC,EAAO;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACG,MAAM,CAAC,OAA+B;;YACxC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;YACxF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,KAAK,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