@golemio/pid 3.4.1-dev.1622321089 → 3.4.1-dev.1622952033
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/migrations/postgresql/20250103092631-skip-missing.js +53 -0
- package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +184 -0
- package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +195 -0
- package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
- package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
- package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
- package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js +2 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
- package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +1 -0
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +20 -20
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
- package/dist/output-gateway/pid/domain/DepartureInterfaces.d.ts +7 -0
- package/dist/output-gateway/pid/domain/DepartureInterfaces.js +3 -0
- package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +1 -0
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +4 -5
- package/dist/output-gateway/pid/index.js +1 -0
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +4 -0
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +2 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js +2 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +14 -28
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +195 -84
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +28 -18
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +19 -0
- package/dist/output-gateway/pid/models/helpers/SkipHelper.js +116 -0
- package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +1 -0
- package/dist/output-gateway/pid/models/helpers/const.d.ts +4 -0
- package/dist/output-gateway/pid/models/helpers/const.js +8 -0
- package/dist/output-gateway/pid/models/helpers/const.js.map +1 -0
- package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +4 -1
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +21 -0
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +3 -0
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +1 -1
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +34 -39
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +4 -2
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +178 -175
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +2 -1
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
- package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
- package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.d.ts +10 -0
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +65 -0
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +4 -0
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +3 -0
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
- package/dist/output-gateway/shared/constants/validations.js +1 -1
- package/dist/output-gateway/shared/constants/validations.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
- package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
- package/docs/openapi-output.yaml +11 -3
- package/package.json +2 -2
package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicVehiclePositionsRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicVehiclePositionsRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,gCAAgC,8CAAtC,MAAM,gCAAgC;IAGzC,YAC2C,cAAwC,EACrD,GAAoB;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;QAJ1C,YAAO,GAAuB,SAAS,CAAC,CAAC,qBAAqB;IAKnE,CAAC;IAEG,iBAAiB,CAAC,IAAY;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,WAAmC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YAClE,OAAO,EAAE,CAAC;SACb;QAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;QACvD,IAAI,UAAU,GAAa,EAAE,CAAC;QAE9B,IAAI;YACA,UAAU,GAAG,CAAC,MAAM,UAAU,CAAC,SAAS,CACpC,IAAI,CAAC,OAAO,EACZ,YAAY,EACZ,WAA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,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;YACtC,IAAI,YAAY,KAAK,IAAI,EAAE;gBACvB,SAAS;aACZ;iBAAM;gBACH,IAAI;oBACA,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;iBACtD;gBAAC,OAAO,KAAK,EAAE;oBACZ,MAAM,IAAI,6BAAY,CAAC,4BAA4B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBACtF;aACJ;SACJ;QACD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ,CAAA;2CAzPY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAJ1E,gCAAgC,CAyP5C"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IPublicApiCacheDto } from "../../../../schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto";
|
|
2
2
|
import { IBoundingBoxWithCenter } from "../IBoudingBox";
|
|
3
3
|
export interface IVehiclePositionsRepository {
|
|
4
|
+
setCurrentSetName(name: string): void;
|
|
4
5
|
getAllVehicleIds(boundingBox: IBoundingBoxWithCenter): Promise<string[]>;
|
|
5
6
|
getAllVehiclePositions(vehicleIds: string[]): Promise<IPublicApiCacheDto[]>;
|
|
6
7
|
getAllVehiclePositionsForMultipleTrips(tripIds: string[]): Promise<Map<string, IPublicApiCacheDto[]>>;
|
|
7
8
|
getDetailedVehiclePosition(vehicleId: string, tripdId?: string): Promise<IPublicApiCacheDto | null>;
|
|
8
|
-
|
|
9
|
+
getTripsWithUntrackedVehicles(tripIds: string[]): Promise<Set<string>>;
|
|
9
10
|
}
|
|
@@ -16,7 +16,7 @@ class CustomStopIdGroupValidator {
|
|
|
16
16
|
}
|
|
17
17
|
return true;
|
|
18
18
|
}
|
|
19
|
-
catch
|
|
19
|
+
catch {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -33,7 +33,7 @@ class CustomStopIdGroupValidator {
|
|
|
33
33
|
}
|
|
34
34
|
return parsed[priority];
|
|
35
35
|
}
|
|
36
|
-
catch
|
|
36
|
+
catch {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomStopIdGroupValidator.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.ts"],"names":[],"mappings":";;;;AAEA,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAa,0BAA0B;IA4B3B,MAAM,CAAC,kBAAkB,CAAC,OAAwB;QACtD,IAAI;YACA,IACI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;gBACvB,OAAO,CAAC,MAAM,KAAK,CAAC;gBACpB,OAAO,CAAC,MAAM,GAAG,kBAAkB;gBACnC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC,EACnG;gBACE,OAAO,KAAK,CAAC;aAChB;YAED,OAAO,IAAI,CAAC;SACf;QAAC,
|
|
1
|
+
{"version":3,"file":"CustomStopIdGroupValidator.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.ts"],"names":[],"mappings":";;;;AAEA,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,kBAAkB,GAAG,E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AAK,CAAC,MAAM,GAAG,eAAe,EAAE;YACtD,OAAO,KAAK,CAAC;SAChB;QAED,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,KAAK,MAAM,WAAW,IAAI,KAAK,EAAE;YAC7B,MAAM,OAAO,GAAG,EAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;YAExD,IAAI,CAAC,EAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE;gBACnC,OAAO,KAAK,CAAC;aAChB;YAED,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;YAC7B,IAAI,UAAU,GAAG,eAAe,EAAE;gBAC9B,OAAO,KAAK,CAAC;aAChB;SACJ;QAED,OAAO,IAAI,CAAC;KACf;IAED,MAAM,OAAO,GAAG,EAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,EAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,AAzBqB,CAyBpB"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.VPSubscriber = void 0;
|
|
13
4
|
const RedisSubscriber_1 = require("@golemio/core/dist/helpers/data-access/pubsub/subscribers/RedisSubscriber");
|
|
@@ -16,16 +7,14 @@ class VPSubscriber extends RedisSubscriber_1.RedisSubscriber {
|
|
|
16
7
|
super(options);
|
|
17
8
|
this.repository = repository;
|
|
18
9
|
}
|
|
19
|
-
initialize() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
});
|
|
10
|
+
async initialize() {
|
|
11
|
+
await this.subscribe();
|
|
12
|
+
this.logger.debug("Redis subscriber subscribed to channel for Public API.");
|
|
13
|
+
this.listen((message) => {
|
|
14
|
+
this.logger.debug("Redis subscriber received a message to change repository source.");
|
|
15
|
+
if (message !== undefined) {
|
|
16
|
+
this.repository.setCurrentSetName(message);
|
|
17
|
+
}
|
|
29
18
|
});
|
|
30
19
|
}
|
|
31
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VPSubscriber.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/service/VPSubscriber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VPSubscriber.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/service/VPSubscriber.ts"],"names":[],"mappings":";;;AAAA,+GAAgI;AAGhI,MAAa,YAAa,SAAQ,iCAAe;IAC7C,YAAY,OAA2B,EAAU,UAAuC;QACpF,KAAK,CAAC,OAAO,CAAC,CAAC;QAD8B,eAAU,GAAV,UAAU,CAA6B;IAExF,CAAC;IAEM,KAAK,CAAC,UAAU;QACnB,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QAEvB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YACtF,IAAI,OAAO,KAAK,SAAS,EAAE;gBACvB,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;aAC9C;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAhBD,oCAgBC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.DepartureBoardFacade = void 0;
|
|
13
4
|
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
@@ -23,122 +14,114 @@ class DepartureBoardFacade {
|
|
|
23
14
|
this.descriptorRepository = descriptorRepository;
|
|
24
15
|
this.transformation = new PublicDepartureTransformation_1.PublicDepartureTransformation();
|
|
25
16
|
}
|
|
26
|
-
getAll(stopIds, limit, routeShortNames, minutesAfter) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
async getAll(stopIds, limit, routeShortNames, minutesAfter) {
|
|
18
|
+
let output;
|
|
19
|
+
const sortedStopGroups = this.sortStopGroupsByPriority(stopIds);
|
|
20
|
+
const promises = sortedStopGroups.map(async (stopGroup) => await this.handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter));
|
|
21
|
+
try {
|
|
22
|
+
output = await Promise.all(promises);
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
26
|
+
throw err;
|
|
33
27
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
throw new golemio_errors_1.GeneralError("Error while retrieving cached data", this.constructor.name, err, 500);
|
|
29
|
+
}
|
|
30
|
+
if (output.every((value) => value === null)) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return output.map((value) => {
|
|
35
|
+
if (value === null) {
|
|
36
|
+
return [];
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (output.every((value) => value === null)) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return output.map((value) => {
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return value;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter) {
|
|
56
|
-
var _a;
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
let outputGroup = [];
|
|
59
|
-
const spanDepartures = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getPublicDepartureCache`);
|
|
60
|
-
const departures = yield this.departureRepository.getPublicGtfsDepartureCache(stopGroup.stopIds, minutesAfter);
|
|
61
|
-
spanDepartures === null || spanDepartures === void 0 ? void 0 : spanDepartures.end();
|
|
62
|
-
if (departures.length === 0) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
const spanPositions = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getAllVehiclePositions`);
|
|
66
|
-
const positionsByTrip = yield this.tripRepository.getAllVehiclePositionsForMultipleTrips(departures.map((departure) => departure.trip_id));
|
|
67
|
-
spanPositions === null || spanPositions === void 0 ? void 0 : spanPositions.end();
|
|
68
|
-
const spanTransform = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.transformDepartures`);
|
|
69
|
-
try {
|
|
70
|
-
for (const departure of departures) {
|
|
71
|
-
if (Object.keys(departure).length === 0) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
const positions = (_a = positionsByTrip.get(departure.trip_id)) !== null && _a !== void 0 ? _a : [];
|
|
75
|
-
const duplicatedDepartures = yield this.duplicateDeparturesWithDifferentVehicleIds(departure, positions);
|
|
76
|
-
outputGroup = outputGroup.concat(duplicatedDepartures);
|
|
38
|
+
else {
|
|
39
|
+
return value;
|
|
77
40
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async handleStopGroupDepartures(stopGroup, limit, routeShortNames, minutesAfter) {
|
|
45
|
+
let outputGroup = [];
|
|
46
|
+
const spanDepartures = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getPublicDepartureCache`);
|
|
47
|
+
const departures = await this.departureRepository.getPublicGtfsDepartureCache(stopGroup.stopIds, minutesAfter);
|
|
48
|
+
spanDepartures?.end();
|
|
49
|
+
if (departures.length === 0) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const spanPositions = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.getAllVehiclePositions`);
|
|
53
|
+
const positionsByTrip = await this.tripRepository.getAllVehiclePositionsForMultipleTrips(departures.map((departure) => departure.trip_id));
|
|
54
|
+
spanPositions?.end();
|
|
55
|
+
const spanTransform = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.transformDepartures`);
|
|
56
|
+
try {
|
|
57
|
+
for (const departure of departures) {
|
|
58
|
+
if (Object.keys(departure).length === 0) {
|
|
59
|
+
continue;
|
|
82
60
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
spanTransform === null || spanTransform === void 0 ? void 0 : spanTransform.end();
|
|
61
|
+
const positions = positionsByTrip.get(departure.trip_id) ?? [];
|
|
62
|
+
const duplicatedDepartures = await this.duplicateDeparturesWithDifferentVehicleIds(departure, positions);
|
|
63
|
+
outputGroup = outputGroup.concat(duplicatedDepartures);
|
|
87
64
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// minutesBefore is set to 0 because we want to display departures that are already happening
|
|
93
|
-
// this may change in the future
|
|
94
|
-
outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.removeDeparturesOutsideTimeRange(outputGroup, 0, minutesAfter).slice(0, limit);
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
68
|
+
throw err;
|
|
95
69
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
70
|
+
throw new golemio_errors_1.GeneralError("Error while retrieving cached data", this.constructor.name, err, 500);
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
spanTransform?.end();
|
|
74
|
+
}
|
|
75
|
+
const spanManipulate = (0, trace_provider_1.createChildSpan)(`Departures.${stopGroup.priority}.manipulateDepartures`);
|
|
76
|
+
try {
|
|
77
|
+
outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.filterDeparturesByRouteShortNames(outputGroup, routeShortNames);
|
|
78
|
+
outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.sortDeparturesByPredictedTimestamp(outputGroup);
|
|
79
|
+
// minutesBefore is set to 0 because we want to display departures that are already happening
|
|
80
|
+
// this may change in the future
|
|
81
|
+
outputGroup = DepartureGroupRefiner_1.DepartureGroupRefiner.removeDeparturesOutsideTimeRange(outputGroup, 0, minutesAfter).slice(0, limit);
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
throw new golemio_errors_1.GeneralError("Error while manipulating departures", this.constructor.name, err, 500);
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
spanManipulate?.end();
|
|
88
|
+
}
|
|
89
|
+
return outputGroup;
|
|
104
90
|
}
|
|
105
|
-
duplicateDeparturesWithDifferentVehicleIds(departure, vehiclePositions) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
stopTime: null,
|
|
117
|
-
}));
|
|
118
|
-
return outputGroup;
|
|
119
|
-
}
|
|
120
|
-
// Otherwise, we want to duplicate the departure for each vehicleId
|
|
121
|
-
// (multiple vehicles can be on the same trip at the same time)
|
|
122
|
-
for (const vehiclePosition of vehiclePositions) {
|
|
123
|
-
const vehicleDescriptor = (vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.detailed_info.registration_number)
|
|
124
|
-
? yield this.descriptorRepository.getOneByRegNumber(departure.route_type, vehiclePosition === null || vehiclePosition === void 0 ? void 0 : vehiclePosition.detailed_info.registration_number)
|
|
125
|
-
: null;
|
|
126
|
-
let currentStopTime = null;
|
|
127
|
-
// If the vehicle is a train, we need to get the current stop time
|
|
128
|
-
// to later determine the RT CIS platform code (trains don't have platform codes in GTFS)
|
|
129
|
-
if (vehiclePosition.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN) {
|
|
130
|
-
const stopTimes = yield this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, departure.trip_id);
|
|
131
|
-
currentStopTime = (_a = stopTimes.find((stopTime) => stopTime.sequence === departure.stop_sequence)) !== null && _a !== void 0 ? _a : null;
|
|
132
|
-
}
|
|
133
|
-
outputGroup.push(this.transformation.transformElement({
|
|
134
|
-
departure,
|
|
135
|
-
vehiclePosition,
|
|
136
|
-
vehicleDescriptor,
|
|
137
|
-
stopTime: currentStopTime,
|
|
138
|
-
}));
|
|
139
|
-
}
|
|
91
|
+
async duplicateDeparturesWithDifferentVehicleIds(departure, vehiclePositions) {
|
|
92
|
+
const outputGroup = [];
|
|
93
|
+
// If there are no RT data, we still want to display the departure
|
|
94
|
+
// but without any RT/vehicle information
|
|
95
|
+
if (vehiclePositions.length === 0) {
|
|
96
|
+
outputGroup.push(this.transformation.transformElement({
|
|
97
|
+
departure,
|
|
98
|
+
vehiclePosition: null,
|
|
99
|
+
vehicleDescriptor: null,
|
|
100
|
+
stopTime: null,
|
|
101
|
+
}));
|
|
140
102
|
return outputGroup;
|
|
141
|
-
}
|
|
103
|
+
}
|
|
104
|
+
// Otherwise, we want to duplicate the departure for each vehicleId
|
|
105
|
+
// (multiple vehicles can be on the same trip at the same time)
|
|
106
|
+
for (const vehiclePosition of vehiclePositions) {
|
|
107
|
+
const vehicleDescriptor = vehiclePosition?.detailed_info.registration_number
|
|
108
|
+
? await this.descriptorRepository.getOneByRegNumber(departure.route_type, vehiclePosition?.detailed_info.registration_number)
|
|
109
|
+
: null;
|
|
110
|
+
let currentStopTime = null;
|
|
111
|
+
// If the vehicle is a train, we need to get the current stop time
|
|
112
|
+
// to later determine the RT CIS platform code (trains don't have platform codes in GTFS)
|
|
113
|
+
if (vehiclePosition.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN) {
|
|
114
|
+
const stopTimes = await this.stopTimeRepository.getPublicStopTimeCache(vehiclePosition.vehicle_id, departure.trip_id);
|
|
115
|
+
currentStopTime = stopTimes.find((stopTime) => stopTime.sequence === departure.stop_sequence) ?? null;
|
|
116
|
+
}
|
|
117
|
+
outputGroup.push(this.transformation.transformElement({
|
|
118
|
+
departure,
|
|
119
|
+
vehiclePosition,
|
|
120
|
+
vehicleDescriptor,
|
|
121
|
+
stopTime: currentStopTime,
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
return outputGroup;
|
|
142
125
|
}
|
|
143
126
|
sortStopGroupsByPriority(stopIds) {
|
|
144
127
|
return Array.from(stopIds).sort((a, b) => a.priority - b.priority);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DepartureBoardFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DepartureBoardFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DepartureBoardFacade.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAU5D,+FAA6F;AAC7F,6EAA8F;AAC9F,4EAAyE;AACzE,oGAAiG;AAEjG,MAAa,oBAAoB;IAG7B,YACqB,mBAA6C,EAC7C,cAA2C,EAC3C,kBAAuC,EACvC,oBAAuD;QAHvD,wBAAmB,GAAnB,mBAAmB,CAA0B;QAC7C,mBAAc,GAAd,cAAc,CAA6B;QAC3C,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,yBAAoB,GAApB,oBAAoB,CAAmC;QAExE,IAAI,CAAC,cAAc,GAAG,IAAI,6DAA6B,EAAE,CAAC;IAC9D,CAAC;IAEM,KAAK,CAAC,MAAM,CACf,OAA0C,EAC1C,KAAa,EACb,eAAgC,EAChC,YAAoB;QAEpB,IAAI,MAAkD,CAAC;QAEvD,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAChE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CACjC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,CAAC,CAC7G,CAAC;QAEF,IAAI;YACA,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SACxC;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;gBACrC,MAAM,GAAG,CAAC;aACb;YAED,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAA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E,eAAe;aAC5B,CAAC,CACL,CAAC;SACL;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;IAEO,wBAAwB,CAAC,OAA0C;QACvE,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACvE,CAAC;CACJ;AAnKD,oDAmKC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.DetailedTripFacade = void 0;
|
|
13
4
|
const DetailedTripScopeEnum_1 = require("../../routers/v2/helpers/DetailedTripScopeEnum");
|
|
@@ -17,28 +8,26 @@ class DetailedTripFacade {
|
|
|
17
8
|
this.scopeHandlerFactory = scopeHandlerFactory;
|
|
18
9
|
this.vehiclePositionRepository = vehiclePositionRepository;
|
|
19
10
|
}
|
|
20
|
-
getOneByVehicleId(vehicleId, scopes, tripId) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
async getOneByVehicleId(vehicleId, scopes, tripId) {
|
|
12
|
+
let vehiclePosition = await this.vehiclePositionRepository.getDetailedVehiclePosition(vehicleId);
|
|
13
|
+
if (tripId && vehiclePosition?.gtfs_trip_id !== tripId) {
|
|
14
|
+
vehiclePosition = await this.vehiclePositionRepository.getDetailedVehiclePosition(vehicleId, tripId);
|
|
15
|
+
}
|
|
16
|
+
if (!vehiclePosition) {
|
|
17
|
+
throw new golemio_errors_1.GeneralError("not_found", this.constructor.name, undefined, 404);
|
|
18
|
+
}
|
|
19
|
+
let output = {};
|
|
20
|
+
if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
|
|
21
|
+
output = await this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, vehiclePosition);
|
|
22
|
+
}
|
|
23
|
+
const promises = scopes.map(async (scope) => {
|
|
24
|
+
if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
|
|
25
|
+
return;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
throw new golemio_errors_1.GeneralError("not_found", this.constructor.name, undefined, 404);
|
|
28
|
-
}
|
|
29
|
-
let output = {};
|
|
30
|
-
if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
|
|
31
|
-
output = yield this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, vehiclePosition);
|
|
32
|
-
}
|
|
33
|
-
const promises = scopes.map((scope) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
output = yield this.scopeHandlerFactory.getStrategy(scope).handle(output, vehiclePosition);
|
|
38
|
-
}));
|
|
39
|
-
yield Promise.all(promises);
|
|
40
|
-
return output;
|
|
27
|
+
output = await this.scopeHandlerFactory.getStrategy(scope).handle(output, vehiclePosition);
|
|
41
28
|
});
|
|
29
|
+
await Promise.all(promises);
|
|
30
|
+
return output;
|
|
42
31
|
}
|
|
43
32
|
}
|
|
44
33
|
exports.DetailedTripFacade = DetailedTripFacade;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailedTripFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DetailedTripFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DetailedTripFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/DetailedTripFacade.ts"],"names":[],"mappings":";;;AAEA,0FAAwF;AACxF,6EAAwE;AAGxE,MAAa,kBAAkB;IAC3B,YACY,mBAA4C,EAC5C,yBAAsD;QADtD,wBAAmB,GAAnB,mBAAmB,CAAyB;QAC5C,8BAAyB,GAAzB,yBAAyB,CAA6B;IAC/D,CAAC;IAEG,KAAK,CAAC,iBAAiB,CAC1B,SAAiB,EACjB,MAA2B,EAC3B,MAAe;QAEf,IAAI,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;QAEjG,IAAI,MAAM,IAAI,eAAe,EAAE,YAAY,KAAK,MAAM,EAAE;YACpD,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;SACxG;QAED,IAAI,CAAC,eAAe,EAAE;YAClB,MAAM,IAAI,6BAAY,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;SAC9E;QAED,IAAI,MAAM,GAA2B,EAAE,CAAC;QACxC,IAAI,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,IAAI,CAAC,EAAE;YACzC,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,yCAAiB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;SAC/G;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACxC,IAAI,KAAK,KAAK,yCAAiB,CAAC,IAAI,EAAE;gBAClC,OAAO;aACV;YAED,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,eAAgB,CAAC,CAAC;QAChG,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AArCD,gDAqCC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.GtfsTripLookupFacade = void 0;
|
|
13
4
|
const DetailedTripScopeEnum_1 = require("../../routers/v2/helpers/DetailedTripScopeEnum");
|
|
@@ -18,29 +9,27 @@ class GtfsTripLookupFacade {
|
|
|
18
9
|
this.scopeHandlerFactory = scopeHandlerFactory;
|
|
19
10
|
this.gtfsTripRepository = models_1.models.GTFSTripsModel;
|
|
20
11
|
}
|
|
21
|
-
getOneByGtfsTripId(gtfsTripId, scopes) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
shouldIncludeShapes,
|
|
28
|
-
});
|
|
29
|
-
if (!this.isGtfsTripValid(gtfsTrip)) {
|
|
30
|
-
throw new golemio_errors_1.GeneralError("GTFS trip info not found", this.constructor.name, undefined, 404);
|
|
31
|
-
}
|
|
32
|
-
let output = {};
|
|
33
|
-
if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
|
|
34
|
-
output = this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, gtfsTrip);
|
|
35
|
-
}
|
|
36
|
-
for (const scope of scopes) {
|
|
37
|
-
if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
output = this.scopeHandlerFactory.getStrategy(scope).handle(output, gtfsTrip);
|
|
41
|
-
}
|
|
42
|
-
return output;
|
|
12
|
+
async getOneByGtfsTripId(gtfsTripId, scopes) {
|
|
13
|
+
const shouldIncludeStopTimes = scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.StopTimes);
|
|
14
|
+
const shouldIncludeShapes = scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Shapes);
|
|
15
|
+
const gtfsTrip = await this.gtfsTripRepository.getOneForPublicGtfsLookup(gtfsTripId, {
|
|
16
|
+
shouldIncludeStopTimes,
|
|
17
|
+
shouldIncludeShapes,
|
|
43
18
|
});
|
|
19
|
+
if (!this.isGtfsTripValid(gtfsTrip)) {
|
|
20
|
+
throw new golemio_errors_1.GeneralError("GTFS trip info not found", this.constructor.name, undefined, 404);
|
|
21
|
+
}
|
|
22
|
+
let output = {};
|
|
23
|
+
if (scopes.includes(DetailedTripScopeEnum_1.DetailedTripScope.Info)) {
|
|
24
|
+
output = this.scopeHandlerFactory.getStrategy(DetailedTripScopeEnum_1.DetailedTripScope.Info).handle(output, gtfsTrip);
|
|
25
|
+
}
|
|
26
|
+
for (const scope of scopes) {
|
|
27
|
+
if (scope === DetailedTripScopeEnum_1.DetailedTripScope.Info) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
output = this.scopeHandlerFactory.getStrategy(scope).handle(output, gtfsTrip);
|
|
31
|
+
}
|
|
32
|
+
return output;
|
|
44
33
|
}
|
|
45
34
|
isGtfsTripValid(gtfsTrip) {
|
|
46
35
|
return !!gtfsTrip && !!gtfsTrip.route;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GtfsTripLookupFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/GtfsTripLookupFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GtfsTripLookupFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/service/facade/GtfsTripLookupFacade.ts"],"names":[],"mappings":";;;AACA,0FAAwF;AACxF,uDAA+C;AAM/C,6EAAwE;AAGxE,MAAa,oBAAoB;IAG7B,YAAoB,mBAAgD;QAAhD,wBAAmB,GAAnB,mBAAmB,CAA6B;QAChE,IAAI,CAAC,kBAAkB,GAAG,eAAM,CAAC,cAAc,CAAC;IACpD,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,UAAkB,EAAE,MAA2B;QAC3E,MAAM,sBAAsB,GAAG,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,SAAS,CAAC,CAAC;QAC5E,MAAM,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,yCAAiB,CAAC,MAAM,CAAC,CAAC;QAEtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,UAAU,EAAE;YACjF,sBAAsB;YACtB,mBAAmB;SACtB,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAI,6BAAY,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;SAC7F;QAED,IAAI,MAAM,GAAuB,EAAE,CAAC;QACpC,IAAI,MAAM,CAAC,QAAQ,CAAC,yCAAiB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